blob: 0e465e50e3a503d4eb088da46edbec75e8efe5fd [file] [log] [blame]
Erik Andersenf0657d32000-04-12 17:49:52 +00001#ifndef GETLINE_H
2#define GETLINE_H
3
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
13void cmdedit_read_input(char* promptStr, char* command); /* read a line of input */
14void cmdedit_setwidth(int); /* specify width of screen */
15void cmdedit_histadd(char *); /* adds entries to hist */
16void cmdedit_strwidth(cmdedit_strwidth_proc); /* to bind cmdedit_strlen */
17
18extern int (*cmdedit_in_hook)(char *);
19extern int (*cmdedit_out_hook)(char *);
20extern int (*cmdedit_tab_hook)(char *, int, int *);
21
22#else /* not __STDC__ */
23
24void cmdedit_read_input(char* promptStr, char* command);
25void cmdedit_setwidth();
26void cmdedit_histadd();
27void cmdedit_strwidth();
28
29extern int (*cmdedit_in_hook)();
30extern int (*cmdedit_out_hook)();
31extern int (*cmdedit_tab_hook)();
32
33#endif /* __STDC__ */
34
35#endif /* GETLINE_H */