Commit | Line | Data |
---|---|---|
9255ee31 EZ |
1 | /* rltypedefs.h -- Type declarations for readline functions. */ |
2 | ||
5836a818 | 3 | /* Copyright (C) 2000-2009 Free Software Foundation, Inc. |
9255ee31 | 4 | |
cc88a640 JK |
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. | |
9255ee31 | 7 | |
cc88a640 JK |
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 | |
9255ee31 EZ |
11 | (at your option) any later version. |
12 | ||
cc88a640 JK |
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 | |
9255ee31 EZ |
16 | GNU General Public License for more details. |
17 | ||
cc88a640 JK |
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 | */ | |
9255ee31 EZ |
21 | |
22 | #ifndef _RL_TYPEDEFS_H_ | |
23 | #define _RL_TYPEDEFS_H_ | |
24 | ||
25 | #ifdef __cplusplus | |
26 | extern "C" { | |
27 | #endif | |
28 | ||
5836a818 | 29 | /* Old-style */ |
9255ee31 EZ |
30 | |
31 | #if !defined (_FUNCTION_DEF) | |
32 | # define _FUNCTION_DEF | |
33 | ||
34 | typedef int Function (); | |
35 | typedef void VFunction (); | |
36 | typedef char *CPFunction (); | |
37 | typedef char **CPPFunction (); | |
38 | ||
39 | #endif /* _FUNCTION_DEF */ | |
40 | ||
41 | /* New style. */ | |
42 | ||
43 | #if !defined (_RL_FUNCTION_TYPEDEF) | |
44 | # define _RL_FUNCTION_TYPEDEF | |
45 | ||
46 | /* Bindable functions */ | |
47 | typedef int rl_command_func_t PARAMS((int, int)); | |
48 | ||
49 | /* Typedefs for the completion system */ | |
50 | typedef char *rl_compentry_func_t PARAMS((const char *, int)); | |
51 | typedef char **rl_completion_func_t PARAMS((const char *, int, int)); | |
52 | ||
53 | typedef char *rl_quote_func_t PARAMS((char *, int, char *)); | |
54 | typedef char *rl_dequote_func_t PARAMS((char *, int)); | |
55 | ||
56 | typedef int rl_compignore_func_t PARAMS((char **)); | |
57 | ||
58 | typedef void rl_compdisp_func_t PARAMS((char **, int, int)); | |
59 | ||
60 | /* Type for input and pre-read hook functions like rl_event_hook */ | |
61 | typedef int rl_hook_func_t PARAMS((void)); | |
62 | ||
63 | /* Input function type */ | |
64 | typedef int rl_getc_func_t PARAMS((FILE *)); | |
65 | ||
66 | /* Generic function that takes a character buffer (which could be the readline | |
67 | line buffer) and an index into it (which could be rl_point) and returns | |
68 | an int. */ | |
69 | typedef int rl_linebuf_func_t PARAMS((char *, int)); | |
70 | ||
71 | /* `Generic' function pointer typedefs */ | |
72 | typedef int rl_intfunc_t PARAMS((int)); | |
73 | #define rl_ivoidfunc_t rl_hook_func_t | |
74 | typedef int rl_icpfunc_t PARAMS((char *)); | |
75 | typedef int rl_icppfunc_t PARAMS((char **)); | |
76 | ||
77 | typedef void rl_voidfunc_t PARAMS((void)); | |
78 | typedef void rl_vintfunc_t PARAMS((int)); | |
79 | typedef void rl_vcpfunc_t PARAMS((char *)); | |
80 | typedef void rl_vcppfunc_t PARAMS((char **)); | |
5bdf8622 DJ |
81 | |
82 | typedef char *rl_cpvfunc_t PARAMS((void)); | |
83 | typedef char *rl_cpifunc_t PARAMS((int)); | |
84 | typedef char *rl_cpcpfunc_t PARAMS((char *)); | |
85 | typedef char *rl_cpcppfunc_t PARAMS((char **)); | |
86 | ||
9255ee31 EZ |
87 | #endif /* _RL_FUNCTION_TYPEDEF */ |
88 | ||
89 | #ifdef __cplusplus | |
90 | } | |
91 | #endif | |
92 | ||
93 | #endif /* _RL_TYPEDEFS_H_ */ |