diff options
author | Tom Tromey <tom@tromey.com> | 2018-10-07 12:52:13 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-08-12 10:57:56 -0600 |
commit | 775e241e9c5f2b2ff2b59972ab70e5f20763fae6 (patch) | |
tree | 597ab643dce69ee6e98e46ecac00ee85f447bb4b /readline/mbutil.c | |
parent | 08132bdd876fa1825810f90ecc25390dd4ded457 (diff) | |
download | gdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.zip gdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.tar.gz gdb-775e241e9c5f2b2ff2b59972ab70e5f20763fae6.tar.bz2 |
Import readline 7.0 (patch 5)
This imports readline 7.0 (up to patch 5) while preserving all
gdb-local changes.
This was done by checking out the readline git repository, making a
branch based on the gdb baseline revision, applying the gdb changes to
that branch, and then merging from readline 7.
readline/ChangeLog.gdb
2019-08-12 Tom Tromey <tom@tromey.com>
* Imported readline 7.0 patch 5.
Diffstat (limited to 'readline/mbutil.c')
-rw-r--r-- | readline/mbutil.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/readline/mbutil.c b/readline/mbutil.c index eeb7e55..314a49b 100644 --- a/readline/mbutil.c +++ b/readline/mbutil.c @@ -1,6 +1,6 @@ /* mbutil.c -- readline multibyte character utility functions */ -/* Copyright (C) 2001-2009 Free Software Foundation, Inc. +/* Copyright (C) 2001-2015 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. @@ -64,6 +64,9 @@ int rl_byte_oriented = 0; int rl_byte_oriented = 1; #endif +/* Ditto */ +int _rl_utf8locale = 0; + /* **************************************************************** */ /* */ /* Multibyte Character Utility Functions */ @@ -119,7 +122,7 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero) point += tmp; if (find_non_zero) { - if (wcwidth (wc) == 0) + if (WCWIDTH (wc) == 0) continue; else count--; @@ -132,7 +135,7 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero) if (find_non_zero) { tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps); - while (MB_NULLWCH (tmp) == 0 && MB_INVALIDCH (tmp) == 0 && wcwidth (wc) == 0) + while (MB_NULLWCH (tmp) == 0 && MB_INVALIDCH (tmp) == 0 && WCWIDTH (wc) == 0) { point += tmp; tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps); @@ -142,7 +145,7 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero) return point; } -static int +/*static*/ int _rl_find_prev_mbchar_internal (string, seed, find_non_zero) char *string; int seed, find_non_zero; @@ -184,7 +187,7 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero) { if (find_non_zero) { - if (wcwidth (wc) != 0) + if (WCWIDTH (wc) != 0) prev = point; } else @@ -263,7 +266,7 @@ _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2) if point is invalied (point < 0 || more than string length), it returns -1 */ int -_rl_adjust_point(string, point, ps) +_rl_adjust_point (string, point, ps) char *string; int point; mbstate_t *ps; |