c == '#' || c == '{' || c == '}' || c == '.') {
/* single-char command */
rdadd(&rs, c);
+ prevpos = rsc.pos;
} else if (c == 'u') {
int len = 0;
do {
stack_style = 2, /* \e, \c, \cw */
stack_idx = 4, /* \I, \i, \ii */
stack_hyper = 8, /* \W */
- stack_quote = 16, /* \q */
+ stack_quote = 16 /* \q */
} type;
word **whptr; /* to restore from \u alternatives */
word **idximplicit; /* to restore from \u alternatives */
}
stk_free(parsestk);
prev_para_type = par.type;
- addpara(par, ret);
+ /*
+ * Before we add the paragraph to the output list, we
+ * should check that there was any text in it at all; there
+ * might not be if (for example) the paragraph contained
+ * nothing but an unrecognised command sequence, and if we
+ * put an empty paragraph on the list it may confuse the
+ * back ends later on.
+ */
+ if (par.words) {
+ addpara(par, ret);
+ }
if (t.type == tok_eof)
already = TRUE;
}
in->csstate = charset_init_state;
in->wcpos = in->nwc = 0;
in->pushback_chars = NULL;
- read_file(&hptr, in, idx, macros);
+ if (strcmp(in->filenames[in->currindex] +
+ strlen(in->filenames[in->currindex]) - 4, ".afm") == 0)
+ read_afm_file(in);
+ else if (strcmp(in->filenames[in->currindex] +
+ strlen(in->filenames[in->currindex]) - 4, ".pfa") == 0)
+ read_pfa_file(in);
+ else
+ read_file(&hptr, in, idx, macros);
}
in->currindex++;
}