inpcom.c, inp_add_control_section(), transform

This commit is contained in:
rlar 2017-04-20 18:14:16 +02:00
parent ec3198b1a9
commit 84b66b6728
1 changed files with 2 additions and 6 deletions

View File

@ -1398,17 +1398,13 @@ inp_add_control_section(struct line *deck, int *line_number)
found_control = FALSE;
if (!found_run) {
// prev_card->li_next === c
prev_card->li_next = xx_new_line(c, copy("run"), (*line_number)++, 0);
prev_card = prev_card->li_next;
// again: prev_card->li_next === c
prev_card = prev_card->li_next = xx_new_line(prev_card->li_next, copy("run"), (*line_number)++, 0);
found_run = TRUE;
}
if (cp_getvar("rawfile", CP_STRING, rawfile)) {
line = tprintf("write %s", rawfile);
prev_card->li_next = xx_new_line(c, line, (*line_number)++, 0);
prev_card = prev_card->li_next;
prev_card = prev_card->li_next = xx_new_line(prev_card->li_next, line, (*line_number)++, 0);
}
}