Updates for move of net apps to rosapps
[reactos.git] / reactos / apps / utils / net / ncftp / ncftp / getline.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 #define GL_BUF_SIZE 1024
9
10 /* Result codes available for gl_get_result() */
11 #define GL_OK 0 /* Valid line of input entered */
12 #define GL_EOF (-1) /* End of input */
13 #define GL_INTERRUPT (-2) /* User hit Ctrl+C */
14
15 typedef size_t (*gl_strwidth_proc)(char *);
16 typedef int (*gl_in_hook_proc)(char *);
17 typedef int (*gl_out_hook_proc)(char *);
18 typedef int (*gl_tab_hook_proc)(char *, int, int *, size_t);
19 typedef size_t (*gl_strlen_proc)(const char *);
20 typedef char * (*gl_tab_completion_proc)(const char *, int);
21
22 char *getline(char *); /* read a line of input */
23 void gl_setwidth(int); /* specify width of screen */
24 void gl_setheight(int); /* specify height of screen */
25 void gl_histadd(char *); /* adds entries to hist */
26 void gl_strwidth(gl_strwidth_proc); /* to bind gl_strlen */
27 void gl_tab_completion(gl_tab_completion_proc);
28 char *gl_local_filename_completion_proc(const char *, int);
29 void gl_set_home_dir(const char *homedir);
30 void gl_histsavefile(const char *const path);
31 void gl_histloadfile(const char *const path);
32 char *gl_getpass(const char *const prompt, char *const pass, int dsize);
33 int gl_get_result(void);
34
35 #ifndef _getline_c_
36
37 extern gl_in_hook_proc gl_in_hook;
38 extern gl_out_hook_proc gl_out_hook;
39 extern gl_tab_hook_proc gl_tab_hook;
40 extern gl_strlen_proc gl_strlen;
41 extern gl_tab_completion_proc gl_completion_proc;
42 extern int gl_filename_quoting_desired;
43 extern const char *gl_filename_quote_characters;
44 extern int gl_ellipses_during_completion;
45 extern int gl_completion_exact_match_extra_char;
46 extern char gl_buf[GL_BUF_SIZE];
47
48 #endif /* ! _getline_c_ */
49
50 #endif /* GETLINE_H */