static void PrintMsg (const FilePos* Pos, const char* Desc, const char* Format, ...) /* Format and output an error/warning message. */ { va_list ap; va_start (ap, Format); VPrintMsg (Pos, Desc, Format, ap); va_end (ap); }
void PError (const FilePos* Pos, const char* Format, ...) /* Print an error message giving an explicit file and position. */ { va_list ap; va_start (ap, Format); VPrintMsg (Pos, "Error", Format, ap); va_end (ap); /* Count errors */ ++ErrorCount; }
void LogMsg(uint32_t level, const char* pszFormat, ...) { va_list args; va_start(args, pszFormat); if (level <= s_loglevel) { VPrintMsg(pszFormat, args); } va_end(args); }
void PWarning (const FilePos* Pos, unsigned Level, const char* Format, ...) /* Print warning message giving an explicit file and position. */ { if (Level <= WarnLevel) { va_list ap; va_start (ap, Format); VPrintMsg (Pos, "Warning", Format, ap); va_end (ap); /* Count warnings */ ++WarningCount; } }
void ErrorMsg (const Collection* LineInfos, const char* Format, va_list ap) /* Print an error message */ { /* The first entry in the collection is that of the actual source pos */ const LineInfo* LI = CollConstAt (LineInfos, 0); /* Output an error for this position */ VPrintMsg (GetSourcePos (LI), "Error", Format, ap); /* Add additional notifications if necessary */ AddNotifications (LineInfos); /* Count errors */ ++ErrorCount; }
static void WarningMsg (const Collection* LineInfos, const char* Format, va_list ap) /* Print warning message. */ { /* The first entry in the collection is that of the actual source pos */ const LineInfo* LI = CollConstAt (LineInfos, 0); /* Output a warning for this position */ VPrintMsg (GetSourcePos (LI), "Warning", Format, ap); /* Add additional notifications if necessary */ AddNotifications (LineInfos); /* Count warnings */ ++WarningCount; }