Example #1
0
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);
}
Example #2
0
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;
}
Example #3
0
    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);
    }
Example #4
0
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;
    }
}
Example #5
0
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;
}
Example #6
0
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;
}