blob: b621ae8ec88932e2a56931202b2dd7de62f32d07 [file] [log] [blame]
Eric Andersen03f9c812000-07-07 20:37:12 +00001#ifndef CMDEDIT_H
2#define CMDEDIT_H
Erik Andersenf0657d32000-04-12 17:49:52 +00003
4/* unix systems can #define POSIX to use termios, otherwise
5 * the bsd or sysv interface will be used
Erik Andersen13456d12000-03-16 08:09:57 +00006 */
7
Erik Andersenf0657d32000-04-12 17:49:52 +00008#ifdef __STDC__
9#include <stddef.h>
Erik Andersen13456d12000-03-16 08:09:57 +000010
Erik Andersenf0657d32000-04-12 17:49:52 +000011typedef size_t (*cmdedit_strwidth_proc)(char *);
12
Erik Andersen1d1d9502000-04-21 01:26:49 +000013void cmdedit_init(void);
Erik Andersenf0657d32000-04-12 17:49:52 +000014void cmdedit_read_input(char* promptStr, char* command); /* read a line of input */
15void cmdedit_setwidth(int); /* specify width of screen */
16void cmdedit_histadd(char *); /* adds entries to hist */
17void cmdedit_strwidth(cmdedit_strwidth_proc); /* to bind cmdedit_strlen */
18
19extern int (*cmdedit_in_hook)(char *);
20extern int (*cmdedit_out_hook)(char *);
21extern int (*cmdedit_tab_hook)(char *, int, int *);
22
23#else /* not __STDC__ */
24
Erik Andersen1d1d9502000-04-21 01:26:49 +000025void cmdedit_init(void);
Erik Andersenf0657d32000-04-12 17:49:52 +000026void cmdedit_read_input(char* promptStr, char* command);
27void cmdedit_setwidth();
28void cmdedit_histadd();
29void cmdedit_strwidth();
30
31extern int (*cmdedit_in_hook)();
32extern int (*cmdedit_out_hook)();
33extern int (*cmdedit_tab_hook)();
34
35#endif /* __STDC__ */
36
Eric Andersen03f9c812000-07-07 20:37:12 +000037#endif /* CMDEDIT_H */