void error_msg(const char *s, ...) { va_list p; va_start(p, s); verror_msg_helper(s, p, NULL, logmode); va_end(p); }
void perror_msg(const char *s, ...) { va_list p; va_start(p, s); /* Guard against "<error message>: Success" */ verror_msg_helper(s, p, errno ? strerror(errno) : NULL, logmode); va_end(p); }
void error_msg(const char *s, ...) { va_list p; va_start(p, s); verror_msg_helper(s, p, NULL, (logmode | LOGMODE_CUSTOM)); va_end(p); }
void perror_msg_and_die(const char *s, ...) { va_list p; va_start(p, s); /* Guard against "<error message>: Success" */ verror_msg_helper(s, p, errno ? strerror(errno) : NULL, (logmode | LOGMODE_CUSTOM)); va_end(p); xfunc_die(); }