Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Command line editing and history |
| 3 | * Copyright (c) 2010, Jouni Malinen <j@w1.fi> |
| 4 | * |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 5 | * This software may be distributed under the terms of the BSD license. |
| 6 | * See README for more details. |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef EDIT_H |
| 10 | #define EDIT_H |
| 11 | |
| 12 | int edit_init(void (*cmd_cb)(void *ctx, char *cmd), |
| 13 | void (*eof_cb)(void *ctx), |
| 14 | char ** (*completion_cb)(void *ctx, const char *cmd, int pos), |
Dmitry Shmidt | 61d9df3 | 2012-08-29 16:22:06 -0700 | [diff] [blame] | 15 | void *ctx, const char *history_file, const char *ps); |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 16 | void edit_deinit(const char *history_file, |
| 17 | int (*filter_cb)(void *ctx, const char *cmd)); |
| 18 | void edit_clear_line(void); |
| 19 | void edit_redraw(void); |
| 20 | |
| 21 | #endif /* EDIT_H */ |