diff options
author | Tomas Heinrich <heinrich.tomas@gmail.com> | 2010-06-01 08:33:18 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-01 08:33:18 +0200 |
commit | 11bcf4b22449d08b61617183c1951db98457653a (patch) | |
tree | 34d1983e1f1b5eb38d8c764ab9f2b406404b862e /include | |
parent | 39a04f71ca8ccf81de2cdbd538df519cf34ef2e6 (diff) | |
download | busybox-w32-11bcf4b22449d08b61617183c1951db98457653a.tar.gz busybox-w32-11bcf4b22449d08b61617183c1951db98457653a.tar.bz2 busybox-w32-11bcf4b22449d08b61617183c1951db98457653a.zip |
lineedit: fix column display for wide and combining chars in TAB completion
function old new delta
unicode_strwidth - 20 +20
read_line_input 4945 4953 +8
unicode_strlen 31 - -31
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/0 up/down: 28/-31) Total: -3 bytes
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/unicode.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/unicode.h b/include/unicode.h index eaf67c833..e9e2bd14a 100644 --- a/include/unicode.h +++ b/include/unicode.h | |||
@@ -23,7 +23,8 @@ enum { | |||
23 | 23 | ||
24 | #if !ENABLE_UNICODE_SUPPORT | 24 | #if !ENABLE_UNICODE_SUPPORT |
25 | 25 | ||
26 | # define unicode_strlen(string) strlen(string) | 26 | # define unicode_strlen(string) strlen(string) |
27 | # define unicode_strwidth(string) strlen(string) | ||
27 | # define unicode_status UNICODE_OFF | 28 | # define unicode_status UNICODE_OFF |
28 | # define init_unicode() ((void)0) | 29 | # define init_unicode() ((void)0) |
29 | 30 | ||
@@ -49,7 +50,10 @@ enum { | |||
49 | # define ENABLE_UNICODE_BIDI_SUPPORT 0 | 50 | # define ENABLE_UNICODE_BIDI_SUPPORT 0 |
50 | # endif | 51 | # endif |
51 | 52 | ||
53 | /* Number of unicode chars. Falls back to strlen() on invalid unicode */ | ||
52 | size_t FAST_FUNC unicode_strlen(const char *string); | 54 | size_t FAST_FUNC unicode_strlen(const char *string); |
55 | /* Width on terminal */ | ||
56 | size_t FAST_FUNC unicode_strwidth(const char *string); | ||
53 | enum { | 57 | enum { |
54 | UNI_FLAG_PAD = (1 << 0), | 58 | UNI_FLAG_PAD = (1 << 0), |
55 | }; | 59 | }; |