cleanup, use wl_cons()
This commit is contained in:
parent
1754427bee
commit
7a7250cdbd
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue