Browse Source

Fix for the wrong line mumber in listing command of .end lines.

pre-master-46
pnenzi 19 years ago
parent
commit
7e4700ea2d
  1. 6
      ChangeLog
  2. 4
      src/frontend/inp.c

6
ChangeLog

@ -1,3 +1,9 @@
2007-09-14 Paolo Nenzi <p.nenzi@ieee.org>
* src/frontend/inp.c: fixed a bug in com_list() that skipped a line number
when in displaying the ".end" line. I just moved the line increment at the
end of the for cicle (after the instruction that skips the ".end" line).
2007-09-12 Dietmar Warning <dietmar.warning@arcor.de> 2007-09-12 Dietmar Warning <dietmar.warning@arcor.de>
* src/frontend/terminal.c: fixed segmentation fault occurring when messages * src/frontend/terminal.c: fixed segmentation fault occurring when messages
>4096 bytes are sent to out_printf() function. The fix uses asprintf if >4096 bytes are sent to out_printf() function. The fix uses asprintf if

4
src/frontend/inp.c

@ -135,7 +135,6 @@ top1:
for (here = deck; here; here = here->li_next) { for (here = deck; here; here = here->li_next) {
if (renumber) if (renumber)
here->li_linenum = i; here->li_linenum = i;
i++;
if (ciprefix(".end", here->li_line) && if (ciprefix(".end", here->li_line) &&
!isalpha(here->li_line[4])) !isalpha(here->li_line[4]))
continue; continue;
@ -156,6 +155,7 @@ top1:
fprintf(file, "%s\n", here->li_error); fprintf(file, "%s\n", here->li_error);
} }
} }
i++;
} }
if (extras) { if (extras) {
deck = extras; deck = extras;
@ -173,7 +173,6 @@ top2:
if ((here->li_actual == NULL) || (here == deck)) { if ((here->li_actual == NULL) || (here == deck)) {
if (renumber) if (renumber)
here->li_linenum = i; here->li_linenum = i;
i++;
if (ciprefix(".end", here->li_line) && if (ciprefix(".end", here->li_line) &&
!isalpha(here->li_line[4])) !isalpha(here->li_line[4]))
continue; continue;
@ -240,6 +239,7 @@ top2:
} }
here->li_linenum = i; here->li_linenum = i;
} }
i++;
} }
if (extras) { if (extras) {
deck = extras; deck = extras;

Loading…
Cancel
Save