void ohshitv(const char *fmt, va_list args) { error_context_errmsg_format(fmt, args); run_error_handler(); }
void ohshitv(const char *fmt, va_list args) { vsnprintf(errmsgbuf, sizeof(errmsgbuf), fmt, args); errmsg= errmsgbuf; run_error_handler(); }
void ohshit(const char *fmt, ...) { va_list args; va_start(args, fmt); error_context_errmsg_format(fmt, args); va_end(args); run_error_handler(); }
void ohshit(const char *fmt, ...) { va_list args; va_start(args, fmt); vsnprintf(errmsgbuf, sizeof(errmsgbuf), fmt, args); va_end(args); errmsg= errmsgbuf; run_error_handler(); }
void ohshite(const char *fmt, ...) { int e; va_list args; char buf[1024]; e=errno; va_start(args, fmt); vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); snprintf(errmsgbuf,sizeof(errmsgbuf),"%s: %s",buf,strerror(e)); errmsg= errmsgbuf; run_error_handler(); }
void ohshite(const char *fmt, ...) { int e, rc; va_list args; e=errno; va_start(args, fmt); rc = error_context_errmsg_format(fmt, args); va_end(args); /* If there was an error, just use the emergency error message buffer, * and ignore the errno value, as we will probably have no space left * anyway. Otherwise append the string for errno. */ if (rc > 0) { char *errmsg = NULL; rc = asprintf(&errmsg, "%s: %s", econtext->errmsg, strerror(e)); if (rc > 0) error_context_errmsg_set(econtext, errmsg); } run_error_handler(); }