2 This file is licensed to you under the license specified in the included file
3 `LICENSE'. Look there for further details.
8 Called by yyparse on error.
17 extern int gengetopt_count_line;
18 extern char * gengetopt_input_filename;
21 extern char linebuf[];
27 yyerror (const char *s)
30 (gengetopt_input_filename ? gengetopt_input_filename : "gengetopt");
32 fprintf (stderr, "%s:%d: %s %s\n", source, gengetopt_count_line, s, yytext);
34 if (/*!linebuf || */!strlen(linebuf))
37 fprintf (stderr, "%s:%d: %s\n", source, gengetopt_count_line, linebuf);
38 fprintf (stderr, "%s:%d: %*s\n", source, gengetopt_count_line,
43 yyerror (gengetopt_option *opt, const char *s)
46 (opt->filename ? opt->filename : "gengetopt");
48 cerr << source << ":" << opt->linenum << ": " << s << endl;