search_init(): * Initialize the search stuff */
| 64 | * Initialize the search stuff |
| 65 | */ |
| 66 | protected int |
| 67 | search_init(EditLine *el) |
| 68 | { |
| 69 | |
| 70 | el->el_search.patbuf = el_malloc(EL_BUFSIZ * |
| 71 | sizeof(*el->el_search.patbuf)); |
| 72 | if (el->el_search.patbuf == NULL) |
| 73 | return -1; |
| 74 | el->el_search.patlen = 0; |
| 75 | el->el_search.patdir = -1; |
| 76 | el->el_search.chacha = '\0'; |
| 77 | el->el_search.chadir = CHAR_FWD; |
| 78 | el->el_search.chatflg = 0; |
| 79 | return 0; |
| 80 | } |
| 81 | |
| 82 | |
| 83 | /* search_end(): |