Lines Matching refs:history
178 static History *h = NULL;
245 len = strlen(p->pw_dir) + sizeof("/.history");
249 (void)snprintf(path, len, "%s/.history", p->pw_dir);
341 history(h, &ev, H_SETSIZE, INT_MAX); /* unlimited */
344 el_set(e, EL_HIST, history, h);
495 history(h, &ev, H_GETSIZE);
504 * history functions
509 * history expansion functions
586 if (history(h, &ev, H_FIRST) != 0)
643 if (history(h, &ev, H_CURR) != 0) {
661 history(h, &ev, H_FIRST);
676 if (history(h, &ev, H_CURR) != 0)
682 (void)history(h, &ev, H_SET, num);
805 * the real function doing history expansion - takes as argument command
986 * csh-style history expansion
1232 * limit size of history record to ``max'' events
1243 if (history(h, &ev, H_SETSIZE, max) == 0) {
1258 * "unlimit" size of history - set the limit to maximum allowed int value
1266 history(h, &ev, H_SETSIZE, INT_MAX);
1420 * read history from a file given
1432 if (history(h, &ev, H_LOAD, filename) == -1)
1434 if (history(h, &ev, H_GETSIZE) == 0)
1443 * write history to a file given
1454 return history(h, &ev, H_SAVE, filename) == -1 ?
1472 if (history(h, &ev, H_NSAVE_FP, (size_t)n, fp) == -1) {
1482 * returns history ``num''th event
1500 history(h, &ev, H_CURR) != 0)
1505 * use H_DELDATA to set to nth history (without delete) by passing
1508 if (history(h, &ev, H_DELDATA, num - history_base, (void **)-1) != 0)
1512 if (history(h, &ev, H_CURR) != 0)
1514 if (history(h, &ev, H_NEXT_EVDATA, ev.num, &she.data) != 0)
1519 (void)history(h, &ev, H_SET, curr_num);
1525 (void)history(h, &ev, H_SET, curr_num);
1531 * add the line to history table
1541 if (history(h, &ev, H_ENTER, line) == -1)
1544 (void)history(h, &ev, H_GETSIZE);
1556 * remove the specified entry from the history list and return it.
1570 if (history(h, &ev, H_DELDATA, num, &he->data) != 0) {
1576 if (history(h, &ev, H_GETSIZE) == 0)
1597 if (history(h, &ev, H_CURR) != 0)
1602 if (history(h, &ev, H_LAST) != 0)
1609 if (history(h, &ev, H_NEXT_EVDATA, num, &he->data))
1616 if (history(h, &ev, H_REPLACE, line, data))
1620 if (history(h, &ev, H_SET, curr_num))
1630 * clear the history list - delete all entries
1640 (void)history(h, &ev, H_CLEAR);
1646 * returns offset of the current history event
1664 if (history(h, &ev, H_LAST) != 0)
1684 } while (history(h, &ev, H_PREV) == 0);
1690 * returns current history event or NULL if there is no such event
1697 if (history(h, &ev, H_PREV_EVENT, history_offset + 1) != 0)
1707 * returns total number of bytes history events' data are using
1716 if (history(h, &ev, H_CURR) != 0)
1720 (void)history(h, &ev, H_FIRST);
1724 while (history(h, &ev, H_NEXT) == 0);
1727 history(h, &ev, H_PREV_EVENT, curr_num);
1734 * sets the position in the history list to ``pos''
1748 * returns previous event in history and shifts pointer accordingly
1759 if (history(h, &ev, H_LAST) != 0)
1768 * returns next event in history and shifts pointer accordingly
1778 if (history(h, &ev, H_LAST) != 0)
1787 * searches for first history event containing the str
1796 if (history(h, &ev, H_CURR) != 0)
1803 if (history(h, &ev, direction < 0 ? H_NEXT:H_PREV) != 0)
1806 (void)history(h, &ev, H_SET, curr_num);
1812 * searches for first history event beginning with str
1819 return (history(h, &ev, direction < 0 ?
1825 * search for event in history containing str, starting at offset
1839 if (history(h, &ev, H_CURR) != 0)
1843 if (!history_set_pos(off) || history(h, &ev, H_CURR) != 0)
1849 if (history(h, &ev, (pos < 0) ? H_PREV : H_NEXT) != 0)
1854 (void)history(h, &ev,