Lines Matching refs:hp
93 char **hfirst, **hlast, **hp, *editor = NULL;
184 hp = first ? hist_get(first, false, false) :
186 if (!hp)
190 strdupx(line, *hp, ATEMP);
201 for (s = *hp; (s1 = strstr(s, pat)) &&
272 for (hp = rflag ? hlast : hfirst;
273 hp >= hfirst && hp <= hlast; hp += rflag ? -1 : 1) {
277 (unsigned long)(histptr - hp));
280 s = *hp;
300 for (hp = rflag ? hlast : hfirst;
301 hp >= hfirst && hp <= hlast; hp += rflag ? -1 : 1)
302 shf_fprintf(shf, Tf_sN, *hp);
391 char **hp = NULL;
395 hp = histptr + (n < 0 ? n : (n - hist_source->line));
396 if ((size_t)hp < (size_t)history) {
398 hp = hist_get_oldest();
401 hp = NULL;
403 } else if ((size_t)hp > (size_t)histptr) {
405 hp = hist_get_newest(allow_cur);
408 hp = NULL;
410 } else if (!allow_cur && hp == histptr) {
412 hp = NULL;
422 hp = &history[n];
424 return (hp);
485 char **hp;
493 hp = &history[start];
494 for (; hp >= history && hp <= histptr; hp += incr)
495 if ((anchored && strncmp(*hp, str, len) == 0) ||
496 (!anchored && strstr(*hp, str)))
497 return (hp - history);
612 char **hp, *c;
679 hp = histptr;
681 if (++hp >= history + histsize) {
684 for (hp = history; hp < history + histsize - 1; hp++)
685 hp[0] = hp[1];
687 *hp = c;
688 histptr = hp;
818 char *nhname, **hp;
838 hp = history;
839 while (hp < histptr) {
841 hist_source->line - (histptr - hp), *hp))
843 ++hp;
935 char **hp;
938 hp = &histptr[lno - s->line];
939 afree(*hp, APERM);
940 strdupx(*hp, (char *)(base + 4), APERM);