summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomas Heinrich <heinrich.tomas@gmail.com>2010-03-18 18:35:37 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-03-18 18:35:37 +0100
commitc5c006c10c060e7f1a97250d039051b93ed390b2 (patch)
treeb281136c99e6a27a530282a0b1b7eaf938704bb2 /include
parent98f1dc12f1554aca6c3743bec1c3d8982a077f7c (diff)
downloadbusybox-w32-c5c006c10c060e7f1a97250d039051b93ed390b2.tar.gz
busybox-w32-c5c006c10c060e7f1a97250d039051b93ed390b2.tar.bz2
busybox-w32-c5c006c10c060e7f1a97250d039051b93ed390b2.zip
lineedit: first shot at optional unicode bidi input support
function old new delta read_line_input 4886 5003 +117 in_uint16_table - 97 +97 in_interval_table - 78 +78 static.rtl_b - 68 +68 unicode_isrtl - 55 +55 isrtl_str - 51 +51 static.rtl_p - 42 +42 unicode_conv_to_printable2 633 477 -156 ------------------------------------------------------------------------------ (add/remove: 6/0 grow/shrink: 1/1 up/down: 508/-156) Total: 352 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.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/unicode.h b/include/unicode.h
index 857aab138..05bdbca02 100644
--- a/include/unicode.h
+++ b/include/unicode.h
@@ -18,6 +18,8 @@ enum {
18 UNICODE_ON = 2, 18 UNICODE_ON = 2,
19}; 19};
20 20
21#define unicode_isrtl(wc) 0
22
21#if !ENABLE_FEATURE_ASSUME_UNICODE 23#if !ENABLE_FEATURE_ASSUME_UNICODE
22 24
23# define unicode_strlen(string) strlen(string) 25# define unicode_strlen(string) strlen(string)
@@ -26,6 +28,17 @@ enum {
26 28
27#else 29#else
28 30
31# if CONFIG_LAST_SUPPORTED_WCHAR < 126 || CONFIG_LAST_SUPPORTED_WCHAR >= 0x30000
32# define LAST_SUPPORTED_WCHAR 0x2ffff
33# else
34# define LAST_SUPPORTED_WCHAR CONFIG_LAST_SUPPORTED_WCHAR
35# endif
36
37# if LAST_SUPPORTED_WCHAR < 0x590
38# undef ENABLE_UNICODE_BIDI_SUPPORT
39# define ENABLE_UNICODE_BIDI_SUPPORT 0
40# endif
41
29size_t FAST_FUNC unicode_strlen(const char *string); 42size_t FAST_FUNC unicode_strlen(const char *string);
30enum { 43enum {
31 UNI_FLAG_PAD = (1 << 0), 44 UNI_FLAG_PAD = (1 << 0),
@@ -78,6 +91,10 @@ size_t wcrtomb(char *s, wchar_t wc, mbstate_t *ps) FAST_FUNC;
78int iswspace(wint_t wc) FAST_FUNC; 91int iswspace(wint_t wc) FAST_FUNC;
79int iswalnum(wint_t wc) FAST_FUNC; 92int iswalnum(wint_t wc) FAST_FUNC;
80int iswpunct(wint_t wc) FAST_FUNC; 93int iswpunct(wint_t wc) FAST_FUNC;
94# if ENABLE_UNICODE_BIDI_SUPPORT
95# undef unicode_isrtl
96int unicode_isrtl(wint_t wc) FAST_FUNC;
97# endif
81 98
82 99
83# endif /* !LOCALE_SUPPORT */ 100# endif /* !LOCALE_SUPPORT */