Some enhancements I've been working on over the weekend,
[oweals/busybox.git] / shell / cmdedit.h
1 #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 
6  */
7
8 #ifdef __STDC__ 
9 #include <stddef.h>
10
11 typedef size_t (*cmdedit_strwidth_proc)(char *);
12
13 void cmdedit_read_input(char* promptStr, char* command);                /* read a line of input */
14 void cmdedit_setwidth(int);             /* specify width of screen */
15 void cmdedit_histadd(char *);           /* adds entries to hist */
16 void cmdedit_strwidth(cmdedit_strwidth_proc);   /* to bind cmdedit_strlen */
17
18 extern int      (*cmdedit_in_hook)(char *);
19 extern int      (*cmdedit_out_hook)(char *);
20 extern int      (*cmdedit_tab_hook)(char *, int, int *);
21
22 #else   /* not __STDC__ */
23
24 void cmdedit_read_input(char* promptStr, char* command);
25 void cmdedit_setwidth();
26 void cmdedit_histadd();
27 void cmdedit_strwidth();
28
29 extern int      (*cmdedit_in_hook)();
30 extern int      (*cmdedit_out_hook)();
31 extern int      (*cmdedit_tab_hook)();
32
33 #endif /* __STDC__ */
34
35 #endif /* GETLINE_H */