Browse Source

cleanup, use wl_cons()

rlar 14 years ago
parent
commit
7a7250cdbd
  1. 4
      src/frontend/com_hardcopy.c
  2. 4
      src/frontend/parser/lexical.c

4
src/frontend/com_hardcopy.c

@ -144,9 +144,7 @@ com_hardcopy(wordlist *wl)
buf2 = prompt(cp_in); buf2 = prompt(cp_in);
if (!buf2) if (!buf2)
return; return;
wl = TMALLOC(struct wordlist, 1);
wl->wl_word = buf2;
wl->wl_next = NULL;
wl = wl_cons(buf2, NULL);
wl = process(wl); wl = process(wl);
} }

4
src/frontend/parser/lexical.c

@ -75,10 +75,8 @@ static int numeofs = 0;
*/ */
#define newword cw->wl_word = copy(buf); \ #define newword cw->wl_word = copy(buf); \
cw->wl_next = alloc(struct wordlist); \
cw->wl_next->wl_prev = cw; \
wl_append(cw, wl_cons(NULL, NULL)); \
cw = cw->wl_next; \ cw = cw->wl_next; \
cw->wl_next = NULL; \
bzero(buf, NEW_BSIZE_SP); \ bzero(buf, NEW_BSIZE_SP); \
i = 0; i = 0;

Loading…
Cancel
Save