hist.h 631 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _tinyrl_hist_h
  2. #define _tinyrl_hist_h
  3. #include <faux/faux.h>
  4. #include <faux/list.h>
  5. typedef struct hist_s hist_t;
  6. typedef faux_list_node_t hist_node_t;
  7. C_DECL_BEGIN
  8. hist_t *hist_new(const char *hist_fname, size_t stifle);
  9. void hist_free(hist_t *hist);
  10. void hist_add(hist_t *hist, const char *line, bool_t temp);
  11. void hist_clear(hist_t *hist);
  12. void hist_pos_reset(hist_t *hist);
  13. const char *hist_pos(hist_t *hist);
  14. const char *hist_pos_up(hist_t *hist);
  15. const char *hist_pos_down(hist_t *hist);
  16. extern int hist_save(const hist_t *hist);
  17. extern int hist_restore(hist_t *hist);
  18. C_DECL_END
  19. #endif // _tinyrl_hist_h