MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / yyerror

Method yyerror

src/twparser/yylex.cpp:626–646  ·  view source on GitHub ↗

Print error message, showing current line number

Source from the content-addressed store, hash-verified

624
625// Print error message, showing current line number
626void
627yy_scan::yyerror(const char *fmt, ...)
628{
629 va_list va;
630
631 va_start(va, fmt);
632#ifdef LEX_WINDOWS
633 // Windows has no concept of a standard error output!
634 // send output to yyout as a simple solution
635 if (yylineno)
636 fprintf(yyout, "%d: ", yylineno);
637 (void) vfprintf(yyout, fmt, va);
638 fputc('\n', yyout);
639#else /* LEX_WINDOWS */
640 if (yylineno)
641 fprintf(stderr, "%d: ", yylineno);
642 (void) vfprintf(stderr, fmt, va);
643 fputc('\n', stderr);
644#endif /* LEX_WINDOWS */
645 va_end(va);
646}
647
648
649#ifdef LEX_WINDOWS

Callers 1

yyparse.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected