/* Copyright (c) 1979 Regents of the University of California */
register struct Hist
*hp
, *np
;
while (*cp
&& digit(*cp
))
/* avoid a looping snafu */
histlen
= getn(value("history"));
/* throw away null lines */
if (sp
->next
->word
[0] == '\n')
for (hp
= &Histlist
; np
= hp
->Hnext
;)
if (eventno
- np
->Href
>= histlen
|| histlen
== 0)
hp
->Hnext
= np
->Hnext
, hfree(np
);
enthist(++eventno
, sp
, 1);
enthist(event
, lp
, docopy
)
register struct wordent
*lp
;
register struct Hist
*np
;
np
= (struct Hist
*) calloc(1, sizeof *np
);
np
->Hnum
= np
->Href
= event
;
np
->Hlex
.next
= lp
->next
;
lp
->next
->prev
= &np
->Hlex
;
np
->Hlex
.prev
= lp
->prev
;
lp
->prev
->next
= &np
->Hlex
;
np
->Hnext
= Histlist
.Hnext
;
register struct Hist
*hp
;
if (getn(value("history")) == 0)
register struct Hist
*hp
;
register struct Hist
*hp
;
printf("%6d\t", hp
->Hnum
);