]>
Commit | Line | Data |
---|---|---|
28ef6c31 JA |
1 | /* rltypedefs.h -- Type declarations for readline functions. */ |
2 | ||
ac50fbac | 3 | /* Copyright (C) 2000-2011 Free Software Foundation, Inc. |
28ef6c31 | 4 | |
3185942a JA |
5 | This file is part of the GNU Readline Library (Readline), a library |
6 | for reading lines of text with interactive input and history editing. | |
28ef6c31 | 7 | |
3185942a JA |
8 | Readline is free software: you can redistribute it and/or modify |
9 | it under the terms of the GNU General Public License as published by | |
10 | the Free Software Foundation, either version 3 of the License, or | |
28ef6c31 JA |
11 | (at your option) any later version. |
12 | ||
3185942a JA |
13 | Readline is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
28ef6c31 JA |
16 | GNU General Public License for more details. |
17 | ||
3185942a JA |
18 | You should have received a copy of the GNU General Public License |
19 | along with Readline. If not, see <http://www.gnu.org/licenses/>. | |
20 | */ | |
28ef6c31 JA |
21 | |
22 | #ifndef _RL_TYPEDEFS_H_ | |
23 | #define _RL_TYPEDEFS_H_ | |
24 | ||
25 | #ifdef __cplusplus | |
26 | extern "C" { | |
27 | #endif | |
28 | ||
28ef6c31 JA |
29 | /* New style. */ |
30 | ||
31 | #if !defined (_RL_FUNCTION_TYPEDEF) | |
32 | # define _RL_FUNCTION_TYPEDEF | |
33 | ||
34 | /* Bindable functions */ | |
f73dda09 | 35 | typedef int rl_command_func_t PARAMS((int, int)); |
28ef6c31 JA |
36 | |
37 | /* Typedefs for the completion system */ | |
f73dda09 JA |
38 | typedef char *rl_compentry_func_t PARAMS((const char *, int)); |
39 | typedef char **rl_completion_func_t PARAMS((const char *, int, int)); | |
28ef6c31 | 40 | |
f73dda09 JA |
41 | typedef char *rl_quote_func_t PARAMS((char *, int, char *)); |
42 | typedef char *rl_dequote_func_t PARAMS((char *, int)); | |
28ef6c31 | 43 | |
f73dda09 | 44 | typedef int rl_compignore_func_t PARAMS((char **)); |
28ef6c31 | 45 | |
f73dda09 | 46 | typedef void rl_compdisp_func_t PARAMS((char **, int, int)); |
28ef6c31 JA |
47 | |
48 | /* Type for input and pre-read hook functions like rl_event_hook */ | |
f73dda09 | 49 | typedef int rl_hook_func_t PARAMS((void)); |
28ef6c31 JA |
50 | |
51 | /* Input function type */ | |
f73dda09 | 52 | typedef int rl_getc_func_t PARAMS((FILE *)); |
28ef6c31 JA |
53 | |
54 | /* Generic function that takes a character buffer (which could be the readline | |
55 | line buffer) and an index into it (which could be rl_point) and returns | |
56 | an int. */ | |
f73dda09 | 57 | typedef int rl_linebuf_func_t PARAMS((char *, int)); |
28ef6c31 JA |
58 | |
59 | /* `Generic' function pointer typedefs */ | |
f73dda09 | 60 | typedef int rl_intfunc_t PARAMS((int)); |
28ef6c31 | 61 | #define rl_ivoidfunc_t rl_hook_func_t |
f73dda09 JA |
62 | typedef int rl_icpfunc_t PARAMS((char *)); |
63 | typedef int rl_icppfunc_t PARAMS((char **)); | |
28ef6c31 | 64 | |
f73dda09 JA |
65 | typedef void rl_voidfunc_t PARAMS((void)); |
66 | typedef void rl_vintfunc_t PARAMS((int)); | |
67 | typedef void rl_vcpfunc_t PARAMS((char *)); | |
68 | typedef void rl_vcppfunc_t PARAMS((char **)); | |
b80f6443 JA |
69 | |
70 | typedef char *rl_cpvfunc_t PARAMS((void)); | |
71 | typedef char *rl_cpifunc_t PARAMS((int)); | |
72 | typedef char *rl_cpcpfunc_t PARAMS((char *)); | |
73 | typedef char *rl_cpcppfunc_t PARAMS((char **)); | |
74 | ||
28ef6c31 JA |
75 | #endif /* _RL_FUNCTION_TYPEDEF */ |
76 | ||
77 | #ifdef __cplusplus | |
78 | } | |
79 | #endif | |
80 | ||
81 | #endif /* _RL_TYPEDEFS_H_ */ |