示例#1
0
文件: parsehelp.c 项目: guillemj/dpkg
void
parse_error(struct parsedb_state *ps, const char *fmt, ...)
{
  va_list args;

  va_start(args, fmt);
  ohshitv(parse_error_msg(ps, fmt), args);
}
示例#2
0
文件: parsehelp.c 项目: guillemj/dpkg
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);
}
示例#3
0
文件: parsehelp.c 项目: Minipig/dpkg
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);
}
示例#4
0
文件: parsehelp.c 项目: guillemj/dpkg
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);
}
示例#5
0
文件: parsehelp.c 项目: Minipig/dpkg
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);
}