hist_init(): * Initialization function. */
| 51 | * Initialization function. |
| 52 | */ |
| 53 | protected int |
| 54 | hist_init(EditLine *el) |
| 55 | { |
| 56 | |
| 57 | el->el_history.fun = NULL; |
| 58 | el->el_history.ref = NULL; |
| 59 | el->el_history.buf = el_malloc(EL_BUFSIZ * sizeof(*el->el_history.buf)); |
| 60 | el->el_history.sz = EL_BUFSIZ; |
| 61 | if (el->el_history.buf == NULL) |
| 62 | return -1; |
| 63 | el->el_history.last = el->el_history.buf; |
| 64 | return 0; |
| 65 | } |
| 66 | |
| 67 | |
| 68 | /* hist_end(): |