1 |
330 |
jeremybenn |
/* rltypedefs.h -- Type declarations for readline functions. */
|
2 |
|
|
|
3 |
|
|
/* Copyright (C) 2000-2004 Free Software Foundation, Inc.
|
4 |
|
|
|
5 |
|
|
This file is part of the GNU Readline Library, a library for
|
6 |
|
|
reading lines of text with interactive input and history editing.
|
7 |
|
|
|
8 |
|
|
The GNU Readline Library is free software; you can redistribute it
|
9 |
|
|
and/or modify it under the terms of the GNU General Public License
|
10 |
|
|
as published by the Free Software Foundation; either version 2, or
|
11 |
|
|
(at your option) any later version.
|
12 |
|
|
|
13 |
|
|
The GNU Readline Library is distributed in the hope that it will be
|
14 |
|
|
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
15 |
|
|
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16 |
|
|
GNU General Public License for more details.
|
17 |
|
|
|
18 |
|
|
The GNU General Public License is often shipped with GNU software, and
|
19 |
|
|
is generally kept in a file called COPYING or LICENSE. If you do not
|
20 |
|
|
have a copy of the license, write to the Free Software Foundation,
|
21 |
|
|
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
22 |
|
|
|
23 |
|
|
#ifndef _RL_TYPEDEFS_H_
|
24 |
|
|
#define _RL_TYPEDEFS_H_
|
25 |
|
|
|
26 |
|
|
#ifdef __cplusplus
|
27 |
|
|
extern "C" {
|
28 |
|
|
#endif
|
29 |
|
|
|
30 |
|
|
/* Old-style */
|
31 |
|
|
|
32 |
|
|
#if !defined (_FUNCTION_DEF)
|
33 |
|
|
# define _FUNCTION_DEF
|
34 |
|
|
|
35 |
|
|
typedef int Function ();
|
36 |
|
|
typedef void VFunction ();
|
37 |
|
|
typedef char *CPFunction ();
|
38 |
|
|
typedef char **CPPFunction ();
|
39 |
|
|
|
40 |
|
|
#endif /* _FUNCTION_DEF */
|
41 |
|
|
|
42 |
|
|
/* New style. */
|
43 |
|
|
|
44 |
|
|
#if !defined (_RL_FUNCTION_TYPEDEF)
|
45 |
|
|
# define _RL_FUNCTION_TYPEDEF
|
46 |
|
|
|
47 |
|
|
/* Bindable functions */
|
48 |
|
|
typedef int rl_command_func_t PARAMS((int, int));
|
49 |
|
|
|
50 |
|
|
/* Typedefs for the completion system */
|
51 |
|
|
typedef char *rl_compentry_func_t PARAMS((const char *, int));
|
52 |
|
|
typedef char **rl_completion_func_t PARAMS((const char *, int, int));
|
53 |
|
|
|
54 |
|
|
typedef char *rl_quote_func_t PARAMS((char *, int, char *));
|
55 |
|
|
typedef char *rl_dequote_func_t PARAMS((char *, int));
|
56 |
|
|
|
57 |
|
|
typedef int rl_compignore_func_t PARAMS((char **));
|
58 |
|
|
|
59 |
|
|
typedef void rl_compdisp_func_t PARAMS((char **, int, int));
|
60 |
|
|
|
61 |
|
|
/* Type for input and pre-read hook functions like rl_event_hook */
|
62 |
|
|
typedef int rl_hook_func_t PARAMS((void));
|
63 |
|
|
|
64 |
|
|
/* Input function type */
|
65 |
|
|
typedef int rl_getc_func_t PARAMS((FILE *));
|
66 |
|
|
|
67 |
|
|
/* Generic function that takes a character buffer (which could be the readline
|
68 |
|
|
line buffer) and an index into it (which could be rl_point) and returns
|
69 |
|
|
an int. */
|
70 |
|
|
typedef int rl_linebuf_func_t PARAMS((char *, int));
|
71 |
|
|
|
72 |
|
|
/* `Generic' function pointer typedefs */
|
73 |
|
|
typedef int rl_intfunc_t PARAMS((int));
|
74 |
|
|
#define rl_ivoidfunc_t rl_hook_func_t
|
75 |
|
|
typedef int rl_icpfunc_t PARAMS((char *));
|
76 |
|
|
typedef int rl_icppfunc_t PARAMS((char **));
|
77 |
|
|
|
78 |
|
|
typedef void rl_voidfunc_t PARAMS((void));
|
79 |
|
|
typedef void rl_vintfunc_t PARAMS((int));
|
80 |
|
|
typedef void rl_vcpfunc_t PARAMS((char *));
|
81 |
|
|
typedef void rl_vcppfunc_t PARAMS((char **));
|
82 |
|
|
|
83 |
|
|
typedef char *rl_cpvfunc_t PARAMS((void));
|
84 |
|
|
typedef char *rl_cpifunc_t PARAMS((int));
|
85 |
|
|
typedef char *rl_cpcpfunc_t PARAMS((char *));
|
86 |
|
|
typedef char *rl_cpcppfunc_t PARAMS((char **));
|
87 |
|
|
|
88 |
|
|
#endif /* _RL_FUNCTION_TYPEDEF */
|
89 |
|
|
|
90 |
|
|
#ifdef __cplusplus
|
91 |
|
|
}
|
92 |
|
|
#endif
|
93 |
|
|
|
94 |
|
|
#endif /* _RL_TYPEDEFS_H_ */
|