Browse Source

parser/lexical.c, #6/10, cleanup

pre-master-46
rlar 10 years ago
parent
commit
9a7e915a9f
  1. 9
      src/frontend/parser/lexical.c

9
src/frontend/parser/lexical.c

@ -268,12 +268,13 @@ nloop:
goto done; goto done;
} }
// cp_ccom doesn't mess wlist, read only access to wlist->wl_word
buf[i++] = '\0'; buf[i++] = '\0';
linebuf[j++] = '\0';
// cp_ccom doesn't mess wlist, read only access to wlist->wl_word
cp_ccom(wlist, buf, FALSE); cp_ccom(wlist, buf, FALSE);
(void) fputc('\r', cp_out); (void) fputc('\r', cp_out);
prompt(); prompt();
linebuf[j++] = '\0';
for (j = 0; linebuf[j]; j++) for (j = 0; linebuf[j]; j++)
#ifdef TIOCSTI #ifdef TIOCSTI
(void) ioctl(fileno(cp_out), TIOCSTI, linebuf + j); (void) ioctl(fileno(cp_out), TIOCSTI, linebuf + j);
@ -296,9 +297,10 @@ nloop:
case ESCAPE: case ESCAPE:
if (cp_interactive && !cp_nocc) { if (cp_interactive && !cp_nocc) {
buf[i++] = '\0';
linebuf[j++] = '\0';
fputs("\b\b \b\b\r", cp_out); fputs("\b\b \b\b\r", cp_out);
prompt(); prompt();
linebuf[j++] = '\0';
for (j = 0; linebuf[j]; j++) for (j = 0; linebuf[j]; j++)
#ifdef TIOCSTI #ifdef TIOCSTI
(void) ioctl(fileno(cp_out), TIOCSTI, linebuf + j); (void) ioctl(fileno(cp_out), TIOCSTI, linebuf + j);
@ -306,7 +308,6 @@ nloop:
fputc(linebuf[j], cp_out); /* But you can't edit */ fputc(linebuf[j], cp_out); /* But you can't edit */
#endif #endif
// cp_ccom doesn't mess wlist, read only access to wlist->wl_word // cp_ccom doesn't mess wlist, read only access to wlist->wl_word
buf[i++] = '\0';
cp_ccom(wlist, buf, TRUE); cp_ccom(wlist, buf, TRUE);
goto nloop; goto nloop;
} }

Loading…
Cancel
Save