Lines Matching refs:history
377 if (histptr >= history && last_line != hist_source->line) { in hist_execute()
427 if ((size_t)hp < (size_t)history) { in hist_get()
449 if ((n = findhist(histptr - history - 1, 0, str, anchored)) < 0) in hist_get()
452 hp = &history[n]; in hist_get()
461 if (histptr < history || (!allow_cur && histptr == history)) { in hist_get_newest()
472 if (histptr <= history) { in hist_get_oldest()
476 return (history); in hist_get_oldest()
495 int last = histptr - history; in histnum()
501 current = &history[n]; in histnum()
516 int maxhist = histptr - history; in findhist()
523 hp = &history[start]; in findhist()
524 for (; hp >= history && hp <= histptr; hp += incr) in findhist()
527 return (hp - history); in findhist()
539 int cursize = histptr - history; in sethistsize()
543 memmove(history, histptr - n + 1, n * sizeof(char *)); in sethistsize()
547 history = aresize2(history, n, sizeof(char *), APERM); in sethistsize()
550 histptr = history + cursize; in sethistsize()
581 histptr = history - 1; in sethistfile()
596 if (history == (char **)NULL) { in init_histvec()
598 history = alloc2(histsize, sizeof(char *), APERM); in init_histvec()
599 histptr = history - 1; in init_histvec()
660 if (++hp >= history + histsize) { in histsave()
662 afree(*history, APERM); in histsave()
663 for (hp = history; hp < history + histsize - 1; hp++) in histsave()
755 if (lines > histsize && histptr >= history) { in hist_init()
776 hp = history; in hist_init()
855 if (histptr >= history && lno - 1 != s->line) { in histload()
859 if (lno >= s->line - (histptr - history) && lno <= s->line) { in histload()