edit.h 596 B

123456789101112131415161718192021
  1. /*
  2. * Command line editing and history
  3. * Copyright (c) 2010, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef EDIT_H
  9. #define EDIT_H
  10. int edit_init(void (*cmd_cb)(void *ctx, char *cmd),
  11. void (*eof_cb)(void *ctx),
  12. char ** (*completion_cb)(void *ctx, const char *cmd, int pos),
  13. void *ctx, const char *history_file);
  14. void edit_deinit(const char *history_file,
  15. int (*filter_cb)(void *ctx, const char *cmd));
  16. void edit_clear_line(void);
  17. void edit_redraw(void);
  18. #endif /* EDIT_H */