Example #1
0
void printerr (const char *format, ...)
{
    va_list pvar;

    va_start (pvar, format);
    vprinterr (format, pvar);
    va_end (pvar);
}
Example #2
0
void warning(const char *format, ...)
{
    va_list args;

    va_start(args, format);
    vprinterr("Warning: ", 0, format, args);
    va_end(args);
}
Example #3
0
void log(const char *format, ...)
{
    va_list args;

    va_start(args, format);
    vprinterr("Log: ", 0, format, args);
    va_end(args);
}
Example #4
0
 /// Print a formatted string, like printf, in red
 int  printerr(const char * format, ...)
 {
     va_list args;
     va_start( args, format );
     int ret = vprinterr( format, args );
     va_end( args );
     return ret;
 }
Example #5
0
void fatal(const char *format, ...)
{
    va_list args;

    va_start(args, format);
    vprinterr("Fatal error: ", 0, format, args);
    va_end(args);

    exit(EXIT_FAILURE);
}
Example #6
0
int error(const char *format, ...)
{
    va_list args;

    va_start(args, format);
    vprinterr("Error: ", 0, format, args);
    va_end(args);

    return -1;
}
Example #7
0
void fatal_errno(const char *format, ...)
{
    int errnum = errno;
    va_list args;

    va_start(args, format);
    vprinterr("Fatal error: ", errnum, format, args);
    va_end(args);

    exit(EXIT_FAILURE);
}
Example #8
0
int error_errno(const char *format, ...)
{
    int errnum = errno;
    va_list args;

    va_start(args, format);
    vprinterr("Error: ", errnum, format, args);
    va_end(args);

    return -1;
}