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) {
279 hist_source->line - (int)(histptr - hp));
282 s = *hp;
303 for (hp = rflag ? hlast : hfirst;
304 hp >= hfirst && hp <= hlast; hp += rflag ? -1 : 1)
305 shf_fprintf(shf, "%s\n", *hp);
421 char **hp = NULL;
425 hp = histptr + (n < 0 ? n : (n - hist_source->line));
426 if ((ptrdiff_t)hp < (ptrdiff_t)history) {
428 hp = hist_get_oldest();
431 hp = NULL;
433 } else if ((ptrdiff_t)hp > (ptrdiff_t)histptr) {
435 hp = hist_get_newest(allow_cur);
438 hp = NULL;
440 } else if (!allow_cur && hp == histptr) {
442 hp = NULL;
451 hp = &history[n];
453 return (hp);
514 char **hp;
522 hp = &history[start];
523 for (; hp >= history && hp <= histptr; hp += incr)
524 if ((anchored && strncmp(*hp, str, len) == 0) ||
525 (!anchored && strstr(*hp, str)))
526 return (hp - history);
634 char **hp;
657 hp = histptr;
659 if (++hp >= history + histsize) {
662 for (hp = history; hp < history + histsize - 1; hp++)
663 hp[0] = hp[1];
665 *hp = c;
666 histptr = hp;
753 char *nhname, **hp;
772 hp = history;
773 while (hp < histptr) {
775 s->line - (histptr - hp), *hp))
777 ++hp;
853 char **hp;
856 hp = &histptr[lno - s->line];
857 if (*hp)
858 afree(*hp, APERM);
859 strdupx(*hp, (char *)(base + 4), APERM);