]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - readline/compat.c
Prevent a possible seg-fault in the section merging code, by always creating a paddin...
[thirdparty/binutils-gdb.git] / readline / compat.c
CommitLineData
9255ee31
EZ
1/* compat.c -- backwards compatibility functions. */
2
cc88a640 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*/
21
9255ee31
EZ
22#define READLINE_LIBRARY
23
24#if defined (HAVE_CONFIG_H)
25# include <config.h>
26#endif
27
28#include <stdio.h>
29
30#include "rlstdc.h"
31#include "rltypedefs.h"
32
33extern void rl_free_undo_list PARAMS((void));
34extern int rl_maybe_save_line PARAMS((void));
35extern int rl_maybe_unsave_line PARAMS((void));
36extern int rl_maybe_replace_line PARAMS((void));
37
38extern int rl_crlf PARAMS((void));
39extern int rl_ding PARAMS((void));
40extern int rl_alphabetic PARAMS((int));
41
42extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *));
43extern char *rl_username_completion_function PARAMS((const char *, int));
44extern char *rl_filename_completion_function PARAMS((const char *, int));
45
46/* Provide backwards-compatible entry points for old function names. */
47
48void
49free_undo_list ()
50{
51 rl_free_undo_list ();
52}
53
54int
55maybe_replace_line ()
56{
57 return rl_maybe_replace_line ();
58}
59
60int
61maybe_save_line ()
62{
63 return rl_maybe_save_line ();
64}
65
66int
67maybe_unsave_line ()
68{
69 return rl_maybe_unsave_line ();
70}
71
72int
73ding ()
74{
75 return rl_ding ();
76}
77
78int
79crlf ()
80{
81 return rl_crlf ();
82}
83
84int
85alphabetic (c)
86 int c;
87{
88 return rl_alphabetic (c);
89}
90
91char **
92completion_matches (s, f)
93 const char *s;
94 rl_compentry_func_t *f;
95{
96 return rl_completion_matches (s, f);
97}
98
99char *
100username_completion_function (s, i)
101 const char *s;
102 int i;
103{
104 return rl_username_completion_function (s, i);
105}
106
107char *
108filename_completion_function (s, i)
109 const char *s;
110 int i;
111{
112 return rl_filename_completion_function (s, i);
113}