void log_error(const char *message, ...) { va_list args; va_start(args, message); vlog_message(LOG_ERR, message, args); va_end(args); }
void compile_error(const char *msg, ...) { va_list args; va_start(args, msg); vlog_message(lexer_filename, lexer_nicename, yylineno, false, msg, args); va_end(args); }
/* * Logs the specified message to the debug output * file, if specified with the appropriate environment * variable. */ static void log_message(const char *prefix, const char *format, /*ARGSUSED*/int count, ...) { va_list ap; va_start(ap, count); vlog_message(prefix, format, ap); }
void log_message(const int facility, const char *format, ...) { va_list args; va_start(args, format); vlog_message(facility, format, args); va_end(args); }
void log_error(const char *msg, ...) { va_list args; va_start(args, msg); block body = this_mfile ? this_mfile->body : NULL; vlog_message(body ? body->filename : NULL, body ? body->nicename : NULL, yylineno, false, msg, args); va_end(args); }
void log_message(const char *message, ...) { if (log_verbose) { va_list args; va_start(args, message); vlog_message(LOG_INFO, message, args); va_end(args); } }
/* * Sends the specified output to stdout. If logging is enabled, * the output will also be sent to the log file. */ static void output_text(const char *format, /*ARGSUSED*/int count, ...) { static Boolean need_prefix = TRUE; char *prefix = "OUT"; va_list ap; va_start(ap, count); vlog_message(need_prefix?prefix:NULL, format, ap); (void) vfprintf(stdout, format, ap); if (format[strlen(format) - 1] == '\n') { need_prefix = TRUE; } else { need_prefix = FALSE; } }
static void vwarning(const char *fname, const char *nname, int line, const char *msg, va_list args) { vlog_message(fname, nname, line, true, msg, args); }