Lines Matching refs:hp
93 char **hfirst, **hlast, **hp, *editor = NULL; in c_fc() local
184 hp = first ? hist_get(first, false, false) : in c_fc()
186 if (!hp) in c_fc()
190 strdupx(line, *hp, ATEMP); in c_fc()
201 for (s = *hp; (s1 = strstr(s, pat)) && in c_fc()
272 for (hp = rflag ? hlast : hfirst; in c_fc()
273 hp >= hfirst && hp <= hlast; hp += rflag ? -1 : 1) { in c_fc()
277 (unsigned long)(histptr - hp)); in c_fc()
280 s = *hp; in c_fc()
300 for (hp = rflag ? hlast : hfirst; in c_fc()
301 hp >= hfirst && hp <= hlast; hp += rflag ? -1 : 1) in c_fc()
302 shf_fprintf(shf, Tf_sN, *hp); in c_fc()
391 char **hp = NULL; in hist_get() local
395 hp = histptr + (n < 0 ? n : (n - hist_source->line)); in hist_get()
396 if ((size_t)hp < (size_t)history) { in hist_get()
398 hp = hist_get_oldest(); in hist_get()
401 hp = NULL; in hist_get()
403 } else if ((size_t)hp > (size_t)histptr) { in hist_get()
405 hp = hist_get_newest(allow_cur); in hist_get()
408 hp = NULL; in hist_get()
410 } else if (!allow_cur && hp == histptr) { in hist_get()
412 hp = NULL; in hist_get()
421 hp = &history[n]; in hist_get()
423 return (hp); in hist_get()
484 char **hp; in findhist() local
492 hp = &history[start]; in findhist()
493 for (; hp >= history && hp <= histptr; hp += incr) in findhist()
494 if ((anchored && strncmp(*hp, str, len) == 0) || in findhist()
495 (!anchored && strstr(*hp, str))) in findhist()
496 return (hp - history); in findhist()
611 char **hp, *c; in histsave() local
678 hp = histptr; in histsave()
680 if (++hp >= history + histsize) { in histsave()
683 for (hp = history; hp < history + histsize - 1; hp++) in histsave()
684 hp[0] = hp[1]; in histsave()
686 *hp = c; in histsave()
687 histptr = hp; in histsave()
817 char *nhname, **hp; in hist_persist_init() local
837 hp = history; in hist_persist_init()
838 while (hp < histptr) { in hist_persist_init()
840 hist_source->line - (histptr - hp), *hp)) in hist_persist_init()
842 ++hp; in hist_persist_init()
934 char **hp; in histload() local
937 hp = &histptr[lno - s->line]; in histload()
938 afree(*hp, APERM); in histload()
939 strdupx(*hp, (char *)(base + 4), APERM); in histload()