Home | History | Annotate | Download | only in src

Lines Matching refs:hp

96 	char **hfirst, **hlast, **hp, *editor = NULL;
187 hp = first ? hist_get(first, false, false) :
189 if (!hp)
193 strdupx(line, *hp, ATEMP);
204 for (s = *hp; (s1 = strstr(s, pat)) &&
275 for (hp = rflag ? hlast : hfirst;
276 hp >= hfirst && hp <= hlast; hp += rflag ? -1 : 1) {
280 (unsigned long)(histptr - hp));
283 s = *hp;
304 for (hp = rflag ? hlast : hfirst;
305 hp >= hfirst && hp <= hlast; hp += rflag ? -1 : 1)
306 shf_fprintf(shf, "%s\n", *hp);
422 char **hp = NULL;
426 hp = histptr + (n < 0 ? n : (n - hist_source->line));
427 if ((size_t)hp < (size_t)history) {
429 hp = hist_get_oldest();
432 hp = NULL;
434 } else if ((size_t)hp > (size_t)histptr) {
436 hp = hist_get_newest(allow_cur);
439 hp = NULL;
441 } else if (!allow_cur && hp == histptr) {
443 hp = NULL;
452 hp = &history[n];
454 return (hp);
515 char **hp;
523 hp = &history[start];
524 for (; hp >= history && hp <= histptr; hp += incr)
525 if ((anchored && strncmp(*hp, str, len) == 0) ||
526 (!anchored && strstr(*hp, str)))
527 return (hp - history);
636 char **hp;
658 hp = histptr;
660 if (++hp >= history + histsize) {
663 for (hp = history; hp < history + histsize - 1; hp++)
664 hp[0] = hp[1];
666 *hp = c;
667 histptr = hp;
757 char *nhname, **hp;
776 hp = history;
777 while (hp < histptr) {
779 s->line - (histptr - hp), *hp))
781 ++hp;
857 char **hp;
860 hp = &histptr[lno - s->line];
861 if (*hp)
862 afree(*hp, APERM);
863 strdupx(*hp, (char *)(base + 4), APERM);