-/* $Id: eqn.c,v 1.40 2014/04/20 16:46:04 schwarze Exp $ */
+/* $Id: eqn.c,v 1.44 2014/07/06 19:09:00 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
p++;
if ('\0' == *p)
return(er);
- mandoc_msg(MANDOCERR_ARGSLOST, ep->parse, ln, pos, NULL);
+ mandoc_vmsg(MANDOCERR_ARG_SKIP, ep->parse,
+ ln, pos, "EN %s", p);
return(er);
}
for (i = 0; i < (int)EQNSYM__MAX; i++)
if (EQNSTREQ(&eqnsyms[i].str, start, sz)) {
sym[63] = '\0';
- snprintf(sym, 62, "\\[%s]", eqnsyms[i].sym);
+ (void)snprintf(sym, 62, "\\[%s]", eqnsyms[i].sym);
bp->text = mandoc_strdup(sym);
return(EQN_OK);
}
ep->cur++;
} else {
if (q)
- EQN_MSG(MANDOCERR_BADQUOTE, ep);
+ EQN_MSG(MANDOCERR_ARG_QUOTE, ep);
next = strchr(start, '\0');
*sz = (size_t)(next - start);
ep->cur += *sz;
if (i == (int)ep->defsz) {
ep->defsz++;
- ep->defs = mandoc_realloc(ep->defs,
- ep->defsz * sizeof(struct eqn_def));
+ ep->defs = mandoc_reallocarray(ep->defs,
+ ep->defsz, sizeof(struct eqn_def));
ep->defs[i].key = ep->defs[i].val = NULL;
}