blob: 27f7b5500dc632292b63c7c469c8a5ac4196af55 [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);
Eric Andersen501c88b2000-07-28 15:14:45 +000014void cmdedit_terminate(void);
Erik Andersenf0657d32000-04-12 17:49:52 +000015void cmdedit_read_input(char* promptStr, char* command); /* read a line of input */
16void cmdedit_setwidth(int); /* specify width of screen */
17void cmdedit_histadd(char *); /* adds entries to hist */
18void cmdedit_strwidth(cmdedit_strwidth_proc); /* to bind cmdedit_strlen */
19
20extern int (*cmdedit_in_hook)(char *);
21extern int (*cmdedit_out_hook)(char *);
22extern int (*cmdedit_tab_hook)(char *, int, int *);
23
24#else /* not __STDC__ */
25
Erik Andersen1d1d9502000-04-21 01:26:49 +000026void cmdedit_init(void);
Erik Andersenf0657d32000-04-12 17:49:52 +000027void cmdedit_read_input(char* promptStr, char* command);
28void cmdedit_setwidth();
29void cmdedit_histadd();
30void cmdedit_strwidth();
31
32extern int (*cmdedit_in_hook)();
33extern int (*cmdedit_out_hook)();
34extern int (*cmdedit_tab_hook)();
35
36#endif /* __STDC__ */
37
Eric Andersen03f9c812000-07-07 20:37:12 +000038#endif /* CMDEDIT_H */