const char *p;
p = strrchr(prog, '/');
- progname = p ? p + 1 : progname;
+ progname = p ? p + 1 : prog;
}
/* Report an error or warning in Unix style, given a captured argument
* to have, so we can allocate the `parents' vector and fill it in.
*/
sect->nparents = av.n/2;
- sect->parents = xmalloc(sect->nparents*sizeof(sect->parents));
+ sect->parents = xmalloc(sect->nparents*sizeof(*sect->parents));
for (i = 0; i < av.n; i += 2) {
n = av.v[i + 1] - av.v[i];
parent = config_find_section_n(conf, 0, av.v[i], n);
size_t n;
/* It would be best if we could process literal text at high speed. To
- * this end,
+ * this end, we have a table, indexed by the low-order bits of F, to tell
+ * us which special characters we need to stop at. This way, we can use
+ * `strcspn' to skip over literal text and stop at the next character which
+ * needs special handling. Entries in this table with a null pointer
+ * correspond to impossible flag settings.
*/
static const char *const delimtab[] = {