Lines Matching defs:hp

75 /* Insert new element (hp) in history list after specified predecessor (pp). */
77 hinsert(struct Hist *hp, struct Hist *pp)
80 hp->Hnext = fp, hp->Hprev = pp;
81 pp->Hnext = hp;
83 fp->Hprev = hp;
85 histTail = hp; /* meaning hp->Hnext == NULL */
91 hremove(struct Hist *hp)
93 struct Hist *pp = hp->Hprev;
95 pp->Hnext = hp->Hnext;
96 if (hp->Hnext)
97 hp->Hnext->Hprev = pp;
100 if (hp == histMerg) /* deleting this hint from list */
110 struct Hist *hp, *np;
132 for (hp = &Histlist; histCount > (unsigned)hlen &&
133 (np = hp->Hnext) != NULL;)
137 hp = np;
743 struct Hist *hp;
744 for (hp = &Histlist; (hp = hp->Hnext) != NULL;) {
745 unsigned lpHash = hashhist(&hp->Hlex);
746 assert(!hp->Hhash || hp->Hhash == lpHash);
747 hp->Hhash = 0; /* force insert to new hash table */
748 insertHistHashTable(hp, lpHash);
847 struct Hist *hp;
851 (hp = histHashTable[hi]) != emptyHTE) {
852 if (hp == deletedHTE)
854 else if (hp->Hhash == hashval && heq(lp, &(hp->Hlex)))
855 return hp;
932 /* masaoki@akebono.tky.hp.com (Kobayashi Masaoki) */
1028 hfree(struct Hist *hp)
1030 assert(hp != histMerg);
1031 if (hp->Hhash)
1032 removeHistHashTable(hp);
1033 freelex(&hp->Hlex);
1034 if (hp->histline)
1035 xfree(hp->histline);
1036 xfree(hp);
1040 phist(struct Hist *hp, int hflg)
1042 if (hp->Href < 0)
1062 xprintf("#+%010lu\n", (unsigned long)hp->Htime);
1064 if (HistLit && hp->histline)
1065 xprintf("%S\n", hp->histline);
1067 prlex(&hp->Hlex);
1078 p = tprintf(FMT_HISTORY, cp, NULL, hp->Htime, hp);
1089 struct Hist *hp;
1100 hp = histTail;
1102 for (hp = Histlist.Hnext;
1103 --n > 0 && hp->Hnext != NULL;
1104 hp = hp->Hnext)
1107 if (hp == NULL)
1109 for (; hp != &Histlist; hp = hp->Hprev)
1110 phist(hp, hflg);
1112 for (hp = Histlist.Hnext; n-- > 0 && hp != NULL; hp = hp->Hnext)
1113 phist(hp, hflg);
1158 struct Hist *np, *hp;
1159 for (hp = &Histlist; (np = hp->Hnext) != NULL;)
1181 struct Hist *hp = ptr;
1186 return xasprintf("%6d", hp->Hnum);
1188 if (HistLit && hp->histline)
1189 return xasprintf("%S", hp->histline);
1194 istr = sprlex(&hp->Hlex);
1356 struct Hist *hp = &Histlist;
1357 while ((hp = hp->Hnext))
1358 hp->Hnum = hp->Href = n--;