void parse_error(struct parsedb_state *ps, const char *fmt, ...) { va_list args; va_start(args, fmt); ohshitv(parse_error_msg(ps, fmt), args); }
void parse_warn(struct parsedb_state *ps, const char *fmt, ...) { va_list args; va_start(args, fmt); warningv(parse_error_msg(ps, fmt), args); va_end(args); }
void parse_error(struct parsedb_state *ps, const struct pkginfo *pigp, const char *fmt, ...) { va_list args; char buf1[768], buf2[1000], *q; parse_error_msg(ps, pigp, _("parse error"), buf1); q = str_escape_fmt(buf2, buf1, sizeof(buf2)); strcat(q,fmt); va_start(args, fmt); ohshitv(buf2, args); }
void parse_problem(struct parsedb_state *ps, const char *fmt, ...) { va_list args; char *str; va_start(args, fmt); m_vasprintf(&str, parse_error_msg(ps, fmt), args); va_end(args); if (ps->err.type == DPKG_MSG_WARN) warning("%s: %s", str, ps->err.str); else ohshit("%s: %s", str, ps->err.str); free(str); }
void parse_warn(struct parsedb_state *ps, const struct pkginfo *pigp, const char *fmt, ...) { va_list args; char buf1[768], buf2[1000], *q; parse_error_msg(ps, pigp, _("warning"), buf1); q = str_escape_fmt(buf2, buf1, sizeof(buf2)); strcat(q, fmt); va_start(args, fmt); ps->warncount++; strcat(q, "\n"); if (vfprintf(stderr, buf2, args) == EOF) ohshite(_("failed to write parsing warning")); va_end(args); }