Lines Matching defs:np
63 struct Hist *hp, *np;
80 for (hp = &Histlist; (np = hp->Hnext) != NULL;)
81 if (eventno - np->Href >= histlen || histlen == 0)
82 hp->Hnext = np->Hnext, hfree(np);
84 hp = np;
110 struct Hist *np;
144 np = p ? p : xmalloc(sizeof(*np));
148 np->Htime = Htime;
152 (void) time(&(np->Htime));
154 if (p == np)
155 return np;
157 np->Hnum = np->Href = event;
159 copylex(&np->Hlex, lp);
161 np->histline = Strsave(histline.s);
163 np->histline = NULL;
166 np->Hlex.next = lp->next;
167 lp->next->prev = &np->Hlex;
168 np->Hlex.prev = lp->prev;
169 lp->prev->next = &np->Hlex;
170 np->histline = NULL;
174 while ((p = pp->Hnext) && (p->Htime > np->Htime))
176 while (p && p->Htime == np->Htime)
178 if (heq(&p->Hlex, &np->Hlex))
181 hfree(np);
190 p->Hnum = np->Hnum; p->Href = np->Href;
191 np->Hnum = n; np->Href = r;
194 np->Hnext = pp->Hnext;
195 pp->Hnext = np;
196 return (np);
252 struct Hist *np, *hp;
253 for (hp = &Histlist; (np = hp->Hnext) != NULL;)
254 hp->Hnext = np->Hnext, hfree(np);
272 dohist1(struct Hist *hp, int *np, int hflg)
274 int print = (*np) > 0;
283 (*np)--;
285 dohist1(hp->Hnext, np, hflg);
290 if (*np >= 0)