aboutsummaryrefslogtreecommitdiff
path: root/shell/cmdedit.h
diff options
context:
space:
mode:
Diffstat (limited to 'shell/cmdedit.h')
-rw-r--r--shell/cmdedit.h46
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
15extern int cmdedit_read_input(char* prompt, int inputFd, int outputFd, char command[BUFSIZ]); 8#ifdef __STDC__
16extern void cmdedit_init(void); 9#include <stddef.h>
10
11typedef 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__ */
17 34
35#endif /* GETLINE_H */