summaryrefslogtreecommitdiff
path: root/readline/nls.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-12-08 22:31:39 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-12-08 22:31:39 +0000
commit711a125cd3c4a70294cd96615120cb61b64ef88e (patch)
treecd5afad1dcbda8ecd4316225edaed77fc3174ee6 /readline/nls.c
parent726941b1ecf998b928ad0e0f84d637849f6c3e63 (diff)
downloadgdb-711a125cd3c4a70294cd96615120cb61b64ef88e.tar.gz
Import of readline 4.3.
Non-readline modified files: src/gdb/ChangeLog src/gdb/defs.h src/gdb/cli/cli-cmds.c src/gdb/cli/cli-setshow.c src/gdb/tui/ChangeLog src/gdb/tui/tuiWin.c In readline directory: * compat.c, mbutil.c, misc.c, rlmbutil.h, rltypedefs.h, text.c, doc/history.0, doc/history.3, support/wcwidth.c, examples/readlinebuf.h, examples/rlcat.c: New files. * CHANGELOG, CHANGES, INSTALL, MANIFEST, Makefile.in, README, aclocal.m4, ansi_stdlib.h, bind.c, callback.c, chardefs.h, complete.c, config.h.in, configure, configure.in, display.c, emacs_keymap.c, funmap.c, histexpand.c, histfile.c, histlib.h, history.c, history.h, histsearch.c, input.c, isearch.c, keymaps.c, keymaps.h, kill.c, macro.c, nls.c, parens.c, posixdir.h, readline.c, readline.h, rlconf.h, rldefs.h, rlprivate.h, rlshell.h, rlstdc.h, rltty.c, savestring.c, search.c, shell.c, signals.c, terminal.c, tilde.c, tilde.h, undo.c, util.c, vi_keymap.c, vi_mode.c, xmalloc.c, xmalloc.h, doc/Makefile.in, doc/hist.texinfo, doc/hstech.texinfo, doc/hsuser.texinfo, doc/manvers.texinfo, doc/readline.3, doc/rlman.texinfo, doc/rltech.texinfo, doc/rluser.texinfo doc/rluserman.texinfo, doc/texi2dvi, doc/texi2html, shlib/Makefile.in, support/install.sh, support/mkdirs, support/mkdist, support/shlib-install, support/shobj-conf, examples/Inputrc, examples/Makefile.in, examples/fileman.c, examples/histexamp.c, examples/manexamp.c, examples/rl.c, examples/rlfe.c, examples/rltest.c, examples/rlversion.c: Modified files.
Diffstat (limited to 'readline/nls.c')
-rw-r--r--readline/nls.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/readline/nls.c b/readline/nls.c
index 67bed8a6fa4..706c8195c10 100644
--- a/readline/nls.c
+++ b/readline/nls.c
@@ -71,8 +71,8 @@ static char *legal_lang_values[] =
0
};
-static char *normalize_codeset __P((char *));
-static char *find_codeset __P((char *, size_t *));
+static char *normalize_codeset PARAMS((char *));
+static char *find_codeset PARAMS((char *, size_t *));
#endif /* !HAVE_SETLOCALE */
/* Check for LC_ALL, LC_CTYPE, and LANG and use the first with a value
@@ -105,9 +105,9 @@ _rl_init_eightbit ()
/* We don't have setlocale. Finesse it. Check the environment for the
appropriate variables and set eight-bit mode if they have the right
values. */
- lspec = get_env_value ("LC_ALL");
- if (lspec == 0) lspec = get_env_value ("LC_CTYPE");
- if (lspec == 0) lspec = get_env_value ("LANG");
+ lspec = sh_get_env_value ("LC_ALL");
+ if (lspec == 0) lspec = sh_get_env_value ("LC_CTYPE");
+ if (lspec == 0) lspec = sh_get_env_value ("LANG");
if (lspec == 0 || (t = normalize_codeset (lspec)) == 0)
return (0);
for (i = 0; t && legal_lang_values[i]; i++)
@@ -141,10 +141,10 @@ normalize_codeset (codeset)
all_digits = 1;
for (len = 0, i = 0; i < namelen; i++)
{
- if (isalnum (codeset[i]))
+ if (ISALNUM ((unsigned char)codeset[i]))
{
len++;
- all_digits &= isdigit (codeset[i]);
+ all_digits &= _rl_digit_p (codeset[i]);
}
}
@@ -162,9 +162,9 @@ normalize_codeset (codeset)
}
for (i = 0; i < namelen; i++)
- if (isalpha (codeset[i]))
- *wp++ = (isupper (codeset[i])) ? tolower (codeset[i]) : codeset[i];
- else if (isdigit (codeset[i]))
+ if (ISALPHA ((unsigned char)codeset[i]))
+ *wp++ = _rl_to_lower (codeset[i]);
+ else if (_rl_digit_p (codeset[i]))
*wp++ = codeset[i];
*wp = '\0';