| 1 | #include <stdio.h> |
| 2 | #include <stdlib.h> |
| 3 | #include <string.h> |
| 4 | #include <readline/history.h> |
| 5 | #include <readline/readline.h> |
| 6 | |
| 7 | int main(void) { |
| 8 | using_history(); |
| 9 | add_history("Vinix history"); |
| 10 | HIST_ENTRY *entry = history_get(history_base); |
| 11 | int valid = rl_readline_version == RL_READLINE_VERSION && entry && |
| 12 | strcmp(entry->line, "Vinix history") == 0; |
| 13 | clear_history(); |
| 14 | return valid ? EXIT_SUCCESS : EXIT_FAILURE; |
| 15 | } |
| 16 |