On 07/04/2011 02:39, Joerg Sonnenberger wrote: > Hi Ingo, > at the moment, as soon as ROFF_ie is seen, r->stackpos is incremented. > This happens in roff.c 1028. But the corresponding code for handling > ROFF_el in 995 doesn't decrement it again. Shouldn't it be > rule = r->rstack[r->rstackpos--]; > in line 998? > > Attached is a trivial example. Joerg, Enclosed is a patch that follows this logic, plus some clean-up and documentation (it works on test.1 and doesn't seem to cause problems anywhere else). The rstackpos, yes, can be safely "consumed" when the `el' is called, and need not wait until the nodes are popped. Ingo, any comments? Thanks, Kristaps