Commit Graph

12 Commits

Author SHA1 Message Date
Denys Vlasenko
19158a837d unicode: s/FEATURE_ASSUME_UNICODE/UNICODE_SUPPORT, add UNICODE_USING_LOCALE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 14:06:56 +01:00
Tomas Heinrich
aa167556cd unicode: optional table for better handling of neutral bidi chars
Off:
function                                             old     new   delta
unicode_bidi_isrtl                                     -      55     +55
isrtl_str                                             51      65     +14
unicode_isrtl                                         55       -     -55
read_line_input                                     5003    4937     -66
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 1/1 up/down: 69/-121)           Total: -52 bytes

On:
function                                             old     new   delta
static.neutral_b                                       -     320    +320
static.neutral_p                                       -     142    +142
unicode_bidi_isrtl                                     -      55     +55
unicode_bidi_is_neutral_wchar                          -      55     +55
isrtl_str                                             51      59      +8
unicode_isrtl                                         55       -     -55
read_line_input                                     5003    4937     -66
------------------------------------------------------------------------------
(add/remove: 4/4 grow/shrink: 1/1 up/down: 580/-121)          Total: 459 bytes

Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 13:13:24 +01:00
Tomas Heinrich
c5c006c10c 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>
2010-03-18 18:35:37 +01:00
Denys Vlasenko
2f8a46032d fix Unicode build on glibc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-19 08:47:17 +01:00
Denys Vlasenko
bb1dcc9aab more thorough fix for systems with strange socklen_t
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-02 12:45:38 +01:00
Denys Vlasenko
d8528b8e56 ls: unicode fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-31 05:15:38 +01:00
Denys Vlasenko
e17764c8fb further work on unicodization
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-30 23:16:21 +01:00
Denys Vlasenko
9f93d62192 libbb: better unicode width support. Hopefully fixes bug 839.
Also opens up a possibility to make other unicode stuff smaller
and more correct later. but:

function                                             old     new   delta
static.combining                                       -     516    +516
bb_wcwidth                                             -     328    +328
unicode_cut_nchars                                     -     141    +141
mbstowc_internal                                       -      93     +93
in_table                                               -      78     +78
cal_main                                             899     961     +62
static.combining0x10000                                -      40     +40
unicode_strlen                                         -      31     +31
bb_mbstrlen                                           31       -     -31
bb_mbstowcs                                          173     102     -71
------------------------------------------------------------------------------
(add/remove: 7/1 grow/shrink: 1/1 up/down: 1289/-102)        Total: 1187 bytes

Uses code of Markus Kuhn, which is in public domain:
http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
"Permission to use, copy, modify, and distribute this software
 for any purpose and without fee is hereby granted. The author
 disclaims all warranties with regard to this software."

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-24 07:44:03 +01:00
Denys Vlasenko
9c3b84a304 ls: make it so that group never glues itself to file size
+ smaller enhancements: inode is long long; -h is a bit narrower; etc

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-18 01:55:00 +01:00
Denys Vlasenko
28055028a7 fold: unicode support. Based on a patch by Tomas Heinrich <heinrich.tomas@gmail.com>
General Unicode support is tweaked to expose unicode_status.

function                                             old     new   delta
init_unicode                                           -      77     +77
write2stdout                                           -      19     +19
adjust_column                                         68      71      +3
unicode_status                                         -       1      +1
unicode_is_enabled                                     1       -      -1
grep_main                                            780     773      -7
fold_main                                            619     552     -67
check_unicode_in_env                                  77       -     -77
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 1/2 up/down: 100/-152)          Total: -52 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 20:49:58 +01:00
Denys Vlasenko
fda8f57360 tweaking Unicode support
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-11 22:26:48 +02:00
Denys Vlasenko
42a8fd0db0 added simplified Unicode support for non-locale-enabled builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-11 21:36:13 +02:00