* read history from a file given */
| 1346 | * read history from a file given |
| 1347 | */ |
| 1348 | int |
| 1349 | read_history(const char *filename) |
| 1350 | { |
| 1351 | HistEvent ev; |
| 1352 | |
| 1353 | if (h == NULL || e == NULL) |
| 1354 | rl_initialize(); |
| 1355 | if (filename == NULL && (filename = _default_history_file()) == NULL) |
| 1356 | return errno; |
| 1357 | return history(h, &ev, H_LOAD, filename) == -1 ? |
| 1358 | (errno ? errno : EINVAL) : 0; |
| 1359 | } |
| 1360 | |
| 1361 | |
| 1362 | /* |
nothing calls this directly
no test coverage detected