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);
|
buf2 = prompt(cp_in);
|
||||||
if (!buf2)
|
if (!buf2)
|
||||||
return;
|
return;
|
||||||
wl = TMALLOC(struct wordlist, 1);
|
wl = wl_cons(buf2, NULL);
|
||||||
wl->wl_word = buf2;
|
|
||||||
wl->wl_next = NULL;
|
|
||||||
wl = process(wl);
|
wl = process(wl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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); \
|
wl_append(cw, wl_cons(NULL, NULL)); \
|
||||||
cw->wl_next->wl_prev = cw; \
|
|
||||||
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…
Reference in New Issue