static char *sccsid
= "@(#)hist.c 4.1 %G%";
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)
if (*vp
&& eq(*vp
, "-r")) {
dohist1(Histlist
.Hnext
, &n
, rflg
);
dohist1(hp
->Hnext
, np
, rflg
);
register struct Hist
*hp
;
printf("%6d\t", hp
->Hnum
);