summaryrefslogtreecommitdiff
path: root/cmd-line-utils/readline/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-line-utils/readline/util.c')
-rw-r--r--cmd-line-utils/readline/util.c34
1 files changed, 28 insertions, 6 deletions
diff --git a/cmd-line-utils/readline/util.c b/cmd-line-utils/readline/util.c
index d5fe51a7bf2..e44ef64349d 100644
--- a/cmd-line-utils/readline/util.c
+++ b/cmd-line-utils/readline/util.c
@@ -1,6 +1,6 @@
/* util.c -- readline utility functions */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -21,7 +21,9 @@
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
#define READLINE_LIBRARY
-#include "config_readline.h"
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
#include <sys/types.h>
#include <fcntl.h>
@@ -42,6 +44,7 @@
/* System-specific feature definitions and include files. */
#include "rldefs.h"
+#include "rlmbutil.h"
#if defined (TIOCSTAT_IN_SYS_IOCTL)
# include <sys/ioctl.h>
@@ -76,13 +79,29 @@ rl_alphabetic (c)
strchr (pathname_alphabetic_chars, c) != NULL);
}
+#if defined (HANDLE_MULTIBYTE)
+int
+_rl_walphabetic (wc)
+ wchar_t wc;
+{
+ int c;
+
+ if (iswalnum (wc))
+ return (1);
+
+ c = wc & 0177;
+ return (_rl_allow_pathname_alphabetic_chars &&
+ strchr (pathname_alphabetic_chars, c) != NULL);
+}
+#endif
+
/* How to abort things. */
int
_rl_abort_internal ()
{
rl_ding ();
rl_clear_message ();
- _rl_init_argument ();
+ _rl_reset_argument ();
rl_clear_pending_input ();
RL_UNSETSTATE (RL_STATE_MACRODEF);
@@ -95,13 +114,15 @@ _rl_abort_internal ()
}
int
-rl_abort (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_abort (count, key)
+ int count, key;
{
return (_rl_abort_internal ());
}
int
-rl_tty_status (int count __attribute__((unused)), int key __attribute__((unused)))
+rl_tty_status (count, key)
+ int count, key;
{
#if defined (TIOCSTAT)
ioctl (1, TIOCSTAT, (char *)0);
@@ -150,7 +171,8 @@ rl_extend_line_buffer (len)
/* A function for simple tilde expansion. */
int
-rl_tilde_expand (int ignore __attribute__((unused)), int key __attribute__((unused)))
+rl_tilde_expand (ignore, key)
+ int ignore, key;
{
register int start, end;
char *homedir, *temp;