diff options
Diffstat (limited to 'shell/cmdedit.h')
-rw-r--r-- | shell/cmdedit.h | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/shell/cmdedit.h b/shell/cmdedit.h index 843a74070..0e465e50e 100644 --- a/shell/cmdedit.h +++ b/shell/cmdedit.h | |||
@@ -1,17 +1,35 @@ | |||
1 | /* | 1 | #ifndef GETLINE_H |
2 | * Termios command line History and Editting for NetBSD sh (ash) | 2 | #define GETLINE_H |
3 | * Copyright (c) 1999 | 3 | |
4 | * Main code: Adam Rogoyski <rogoyski@cs.utexas.edu> | 4 | /* unix systems can #define POSIX to use termios, otherwise |
5 | * Etc: Dave Cinege <dcinege@psychosis.com> | 5 | * the bsd or sysv interface will be used |
6 | * Adjusted for busybox: Erik Andersen <andersee@debian.org> | ||
7 | * | ||
8 | * You may use this code as you wish, so long as the original author(s) | ||
9 | * are attributed in any redistributions of the source code. | ||
10 | * This code is 'as is' with no warranty. | ||
11 | * This code may safely be consumed by a BSD or GPL license. | ||
12 | * | ||
13 | */ | 6 | */ |
14 | 7 | ||
15 | extern int cmdedit_read_input(char* prompt, int inputFd, int outputFd, char command[BUFSIZ]); | 8 | #ifdef __STDC__ |
16 | extern void cmdedit_init(void); | 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__ */ | ||
17 | 34 | ||
35 | #endif /* GETLINE_H */ | ||