cleanup, use wl_cons()

This commit is contained in:
rlar 2012-07-27 21:36:15 +02:00
parent 1754427bee
commit 7a7250cdbd
2 changed files with 2 additions and 6 deletions

View File

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

View File

@ -75,10 +75,8 @@ static int numeofs = 0;
*/
#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->wl_next = NULL; \
bzero(buf, NEW_BSIZE_SP); \
i = 0;