Commit Graph

11 Commits

Author SHA1 Message Date
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
2edba21f4c more fine-grained Unicode support
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-29 09:11:47 +01:00
Denys Vlasenko
307b24c851 testsuite-discovered fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-25 02:00:16 +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
94ca6943bc *: small code shrinks and compile fix for unicode
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-20 02:51:09 +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
fff73641e4 widen "Unicode in environment" check
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-16 16:09:25 +02:00
Denys Vlasenko
01ba1676af lineedit+unicode: code shrink
function                                             old     new   delta
wcrtomb_internal                                     161      83     -78

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-16 03:06:22 +02:00
Denys Vlasenko
f6106e6041 comment fixes, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-16 02:27:04 +02: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