示例#1
0
void    msg_printf(int level, const char *format,...)
{
    va_list ap;

    va_start(ap, format);
    msg_vprintf(level, format, ap);
    va_end(ap);
}
示例#2
0
NORETURN vmsg_panic(const char *fmt, va_list ap)
{
    if (msg_exiting++ == 0) {
	msg_vprintf(MSG_PANIC, fmt, ap);
    }
    sleep(1);
    abort();					/* Die! */
    /* In case we're running as a signal handler. */
    _exit(1);					/* DIE!! */
}
示例#3
0
NORETURN vmsg_fatal_status(int status, const char *fmt, va_list ap)
{
    if (msg_exiting++ == 0) {
	msg_vprintf(MSG_FATAL, fmt, ap);
	if (msg_cleanup_fn)
	    msg_cleanup_fn();
    }
    sleep(1);
    /* In case we're running as a signal handler. */
    _exit(status);
}
示例#4
0
void    vmsg_error(const char *fmt, va_list ap)
{
    msg_vprintf(MSG_ERROR, fmt, ap);
    if (++msg_error_count >= msg_error_bound)
	msg_fatal("too many errors - program terminated");
}
示例#5
0
void    vmsg_warn(const char *fmt, va_list ap)
{
    msg_vprintf(MSG_WARN, fmt, ap);
}
示例#6
0
void    vmsg_info(const char *fmt, va_list ap)
{
    msg_vprintf(MSG_INFO, fmt, ap);
}