]> git.ipfire.org Git - thirdparty/bash.git/blame - lib/readline/compat.c
bash-5.2 distribution sources and documentation
[thirdparty/bash.git] / lib / readline / compat.c
CommitLineData
28ef6c31
JA
1/* compat.c -- backwards compatibility functions. */
2
74091dd4 3/* Copyright (C) 2000-2021 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*/
21
28ef6c31
JA
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
74091dd4
CR
33extern void rl_free_undo_list (void);
34extern int rl_maybe_save_line (void);
35extern int rl_maybe_unsave_line (void);
36extern int rl_maybe_replace_line (void);
f73dda09 37
74091dd4
CR
38extern int rl_crlf (void);
39extern int rl_ding (void);
40extern int rl_alphabetic (int);
f73dda09 41
74091dd4
CR
42extern char **rl_completion_matches (const char *, rl_compentry_func_t *);
43extern char *rl_username_completion_function (const char *, int);
44extern char *rl_filename_completion_function (const char *, int);
28ef6c31
JA
45
46/* Provide backwards-compatible entry points for old function names. */
47
48void
d233b485 49free_undo_list (void)
28ef6c31
JA
50{
51 rl_free_undo_list ();
52}
53
54int
d233b485 55maybe_replace_line (void)
28ef6c31
JA
56{
57 return rl_maybe_replace_line ();
58}
59
60int
d233b485 61maybe_save_line (void)
28ef6c31
JA
62{
63 return rl_maybe_save_line ();
64}
65
66int
d233b485 67maybe_unsave_line (void)
28ef6c31
JA
68{
69 return rl_maybe_unsave_line ();
70}
71
72int
d233b485 73ding (void)
28ef6c31
JA
74{
75 return rl_ding ();
76}
77
78int
d233b485 79crlf (void)
28ef6c31
JA
80{
81 return rl_crlf ();
82}
83
84int
d233b485 85alphabetic (int c)
28ef6c31
JA
86{
87 return rl_alphabetic (c);
88}
89
90char **
d233b485 91completion_matches (const char *s, rl_compentry_func_t *f)
28ef6c31
JA
92{
93 return rl_completion_matches (s, f);
94}
95
96char *
d233b485 97username_completion_function (const char *s, int i)
28ef6c31
JA
98{
99 return rl_username_completion_function (s, i);
100}
101
102char *
d233b485 103filename_completion_function (const char *s, int i)
28ef6c31
JA
104{
105 return rl_filename_completion_function (s, i);
106}