Home | History | Annotate | Download | only in src

Lines Matching defs:hp

83 	char **hfirst, **hlast, **hp;
174 hp = first ? hist_get(first, false, false) :
176 if (!hp)
178 return (hist_replace(hp, pat, rep, gflag));
227 for (hp = rflag ? hlast : hfirst;
228 hp >= hfirst && hp <= hlast; hp += rflag ? -1 : 1) {
231 hist_source->line - (int)(histptr - hp));
234 s = *hp;
255 for (hp = rflag ? hlast : hfirst;
256 hp >= hfirst && hp <= hlast; hp += rflag ? -1 : 1)
257 shf_fprintf(shf, "%s\n", *hp);
360 hist_replace(char **hp, const char *pat, const char *rep, bool globr)
365 strdupx(line, *hp, ATEMP);
376 for (s = *hp; (s1 = strstr(s, pat)) && (!any_subst || globr);
408 char **hp = NULL;
412 hp = histptr + (n < 0 ? n : (n - hist_source->line));
413 if ((ptrdiff_t)hp < (ptrdiff_t)history) {
415 hp = hist_get_oldest();
418 hp = NULL;
420 } else if ((ptrdiff_t)hp > (ptrdiff_t)histptr) {
422 hp = hist_get_newest(allow_cur);
425 hp = NULL;
427 } else if (!allow_cur && hp == histptr) {
429 hp = NULL;
438 hp = &history[n];
440 return (hp);
512 char **hp;
520 hp = &history[start];
521 for (; hp >= history && hp <= histptr; hp += incr)
522 if ((anchored && strncmp(*hp, str, len) == 0) ||
523 (!anchored && strstr(*hp, str)))
524 return (hp - history);
638 char **hp;
660 hp = histptr;
662 if (++hp >= history + histsize) {
665 for (hp = history; hp < history + histsize - 1; hp++)
666 hp[0] = hp[1];
668 *hp = c;
669 histptr = hp;
960 char **hp;
963 hp = &histptr[lno - s->line];
964 if (*hp)
965 afree(*hp, APERM);
966 strdupx(*hp, line, APERM);