In there is any line start in the sequence being popped,
then the new symbol is considered to start a line.
Signed-off-by: NeilBrown <neil@brown.name>
void(*do_free)(short sym, void *asn))
{
int i;
- short indents;
+ short indents = 0;
+ int sol = 0;
+
p->tos -= num;
- if (start_of_line)
- *start_of_line =
- !p->stack[p->tos].since_newline;
- indents = 0;
for (i = 0; i < num; i++) {
+ sol |= !p->stack[p->tos+1].since_newline;
indents += p->stack[p->tos+i].indents;
do_free(p->stack[p->tos+i].sym,
p->asn_stack[p->tos+i]);
}
+ if (start_of_line)
+ *start_of_line = sol;
return indents;
}