Lines Matching full:hp

75 /* Insert new element (hp) in history list after specified predecessor (pp). */
77 hinsert(struct Hist *hp, struct Hist *pp) in hinsert() argument
80 hp->Hnext = fp, hp->Hprev = pp; in hinsert()
81 pp->Hnext = hp; in hinsert()
83 fp->Hprev = hp; in hinsert()
85 histTail = hp; /* meaning hp->Hnext == NULL */ in hinsert()
91 hremove(struct Hist *hp) in hremove() argument
93 struct Hist *pp = hp->Hprev; in hremove()
95 pp->Hnext = hp->Hnext; in hremove()
96 if (hp->Hnext) in hremove()
97 hp->Hnext->Hprev = pp; in hremove()
100 if (hp == histMerg) /* deleting this hint from list */ in hremove()
110 struct Hist *hp, *np; in discardExcess() local
132 for (hp = &Histlist; histCount > (unsigned)hlen && in discardExcess()
133 (np = hp->Hnext) != NULL;) in discardExcess()
137 hp = np; in discardExcess()
753 struct Hist *hp; in createHistHashTable() local
754 for (hp = &Histlist; (hp = hp->Hnext) != NULL;) { in createHistHashTable()
755 unsigned lpHash = hashhist(&hp->Hlex); in createHistHashTable()
756 assert(!hp->Hhash || hp->Hhash == lpHash); in createHistHashTable()
757 hp->Hhash = 0; /* force insert to new hash table */ in createHistHashTable()
758 insertHistHashTable(hp, lpHash); in createHistHashTable()
857 struct Hist *hp; in findHistHashTable() local
861 (hp = histHashTable[hi]) != emptyHTE) { in findHistHashTable()
862 if (hp == deletedHTE) in findHistHashTable()
864 else if (hp->Hhash == hashval && heq(lp, &(hp->Hlex))) in findHistHashTable()
865 return hp; in findHistHashTable()
942 /* masaoki@akebono.tky.hp.com (Kobayashi Masaoki) */ in enthist()
1038 hfree(struct Hist *hp) in hfree() argument
1040 assert(hp != histMerg); in hfree()
1041 if (hp->Hhash) in hfree()
1042 removeHistHashTable(hp); in hfree()
1043 freelex(&hp->Hlex); in hfree()
1044 if (hp->histline) in hfree()
1045 xfree(hp->histline); in hfree()
1046 xfree(hp); in hfree()
1050 phist(struct Hist *hp, int hflg) in phist() argument
1052 if (hp->Href < 0) in phist()
1072 xprintf("#+%010lu\n", (unsigned long)hp->Htime); in phist()
1074 if (HistLit && hp->histline) in phist()
1075 xprintf("%S\n", hp->histline); in phist()
1077 prlex(&hp->Hlex); in phist()
1088 p = tprintf(FMT_HISTORY, cp, NULL, hp->Htime, hp); in phist()
1099 struct Hist *hp; in dophist() local
1110 hp = histTail; in dophist()
1112 for (hp = Histlist.Hnext; in dophist()
1113 --n > 0 && hp->Hnext != NULL; in dophist()
1114 hp = hp->Hnext) in dophist()
1117 if (hp == NULL) in dophist()
1119 for (; hp != &Histlist; hp = hp->Hprev) in dophist()
1120 phist(hp, hflg); in dophist()
1122 for (hp = Histlist.Hnext; n-- > 0 && hp != NULL; hp = hp->Hnext) in dophist()
1123 phist(hp, hflg); in dophist()
1168 struct Hist *np, *hp; in dohist() local
1169 for (hp = &Histlist; (np = hp->Hnext) != NULL;) in dohist()
1191 struct Hist *hp = ptr; in fmthist() local
1196 return xasprintf("%6d", hp->Hnum); in fmthist()
1198 if (HistLit && hp->histline) in fmthist()
1199 return xasprintf("%S", hp->histline); in fmthist()
1204 istr = sprlex(&hp->Hlex); in fmthist()
1374 struct Hist *hp = &Histlist; in loadhist() local
1375 while ((hp = hp->Hnext)) in loadhist()
1376 hp->Hnum = hp->Href = n--; in loadhist()