Lines Matching refs:history

186  * generic function for moving around history
194 if (FUNW(history)(h, &ev, op) != 0)
220 static const char _dothistory[] = "/.history";
279 FUN(history,end)(h);
297 h = FUN(history,init)();
301 FUNW(history)(h, &ev, H_SETSIZE, INT_MAX); /* unlimited */
304 el_set(e, EL_HIST, history, h);
312 FUN(history,end)(h);
418 FUNW(history)(h, &ev, H_GETSIZE);
425 * history functions
430 * history expansion functions
506 if (FUNW(history)(h, &ev, H_FIRST) != 0)
564 if (FUNW(history)(h, &ev, H_CURR) != 0) {
583 FUNW(history)(h, &ev, H_FIRST);
599 if (FUNW(history)(h, &ev, H_CURR) != 0)
605 (void)FUNW(history)(h, &ev, H_SET, num);
611 * the real function doing history expansion - takes as argument command
863 * csh-style history expansion
1110 * limit size of history record to ``max'' events
1120 if (FUNW(history)(h, &ev, H_SETSIZE, max) == 0)
1126 * "unlimit" size of history - set the limit to maximum allowed int value
1134 FUNW(history)(h, &ev, H_SETSIZE, INT_MAX);
1287 * read history from a file given
1298 return (FUNW(history)(h, &ev, H_LOAD, filename) == -1 ?
1304 * write history to a file given
1315 return (FUNW(history)(h, &ev, H_SAVE, filename) == -1 ?
1321 * returns history ``num''th event
1336 if (FUNW(history)(h, &ev, H_CURR) != 0)
1341 if (FUNW(history)(h, &ev, H_LAST) != 0)
1345 if (FUNW(history)(h, &ev, H_NEXT_EVDATA, num, &she.data))
1351 (void)FUNW(history)(h, &ev, H_SET, curr_num);
1358 * add the line to history table
1374 (void)FUNW(history)(h, &ev, H_ENTER, wline);
1375 if (FUNW(history)(h, &ev, H_GETSIZE) == 0)
1383 * remove the specified entry from the history list and return it.
1397 if (FUNW(history)(h, &ev, H_DELDATA, num, &he->data) != 0) {
1403 if (FUNW(history)(h, &ev, H_GETSIZE) == 0)
1424 if (FUNW(history)(h, &ev, H_CURR) != 0)
1429 if (FUNW(history)(h, &ev, H_LAST) != 0)
1436 if (FUNW(history)(h, &ev, H_NEXT_EVDATA, num, &he->data))
1443 if (FUNW(history)(h, &ev, H_REPLACE, line, data))
1447 if (FUNW(history)(h, &ev, H_SET, curr_num))
1457 * clear the history list - delete all entries
1464 (void)FUNW(history)(h, &ev, H_CLEAR);
1470 * returns offset of the current history event
1478 if (FUNW(history)(h, &ev, H_CURR) != 0)
1482 (void)FUNW(history)(h, &ev, H_FIRST);
1484 while (ev.num != curr_num && FUNW(history)(h, &ev, H_NEXT) == 0)
1492 * returns current history event or NULL if there is no such event
1503 * returns total number of bytes history events' data are using
1512 if (FUNW(history)(h, &ev, H_CURR) != 0)
1516 (void)FUNW(history)(h, &ev, H_FIRST);
1520 while (FUNW(history)(h, &ev, H_NEXT) == 0);
1523 FUNW(history)(h, &ev, H_PREV_EVENT, curr_num);
1530 * sets the position in the history list to ``pos''
1541 (void)FUNW(history)(h, &ev, H_CURR);
1545 * use H_DELDATA to set to nth history (without delete) by passing
1548 if (FUNW(history)(h, &ev, H_DELDATA, pos, (void **)-1)) {
1549 (void)FUNW(history)(h, &ev, H_SET, curr_num);
1557 * returns previous event in history and shifts pointer accordingly
1568 * returns next event in history and shifts pointer accordingly
1579 * searches for first history event containing the str
1589 if (FUNW(history)(h, &ev, H_CURR) != 0)
1597 if (FUNW(history)(h, &ev, direction < 0 ? H_NEXT:H_PREV) != 0)
1600 (void)FUNW(history)(h, &ev, H_SET, curr_num);
1606 * searches for first history event beginning with str
1613 return (FUNW(history)(h, &ev, direction < 0 ?
1619 * search for event in history containing str, starting at offset
1634 if (FUNW(history)(h, &ev, H_CURR) != 0)
1638 if (history_set_pos(off) != 0 || FUNW(history)(h, &ev, H_CURR) != 0)
1645 if (FUNW(history)(h, &ev, (pos < 0) ? H_PREV : H_NEXT) != 0)
1650 (void)FUNW(history)(h, &ev,