busybox/coreutils
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
..
libcoreutils *: use "can't" instead of "cannot" 2009-11-13 09:08:27 +01:00
basename.c basename: fix error code. again. deja vu feeling... 2008-11-06 15:13:33 +00:00
cal.c libbb: better unicode width support. Hopefully fixes bug 839. 2010-01-24 07:44:03 +01:00
cat.c *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
catv.c *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
chgrp.c add -fvisibility=hidden to CC flags, mark XXX_main functions 2007-10-11 10:05:36 +00:00
chmod.c *: mass renaming of USE_XXXX to IF_XXXX 2009-04-21 11:09:40 +00:00
chown.c chown: -2 bytes 2010-01-23 00:13:32 +01:00
chroot.c *: remove a few more cases of argc usage. -89 bytes. 2009-11-28 15:18:53 +01:00
cksum.c split: handle - as "use stdin". +13 bytes. Closes bug 741. 2009-11-26 05:43:16 +01:00
comm.c comm: almost total rewrite; add testsuite 2008-07-15 06:45:14 +00:00
Config.in date: introduce FEATURE_DATE_COMPAT; shrink 2010-01-23 23:37:52 +01:00
cp.c cp: fix -H handling 2010-01-15 22:05:07 +01:00
cut.c fix examples which used non-standard cut -b0-NNN 2010-01-18 12:25:09 +01:00
date.c date: introduce FEATURE_DATE_COMPAT; shrink 2010-01-23 23:37:52 +01:00
dd.c *: introduce and use ffulsh_all() 2009-11-02 14:19:51 +01:00
df.c libbb: better unicode width support. Hopefully fixes bug 839. 2010-01-24 07:44:03 +01:00
dirname.c *: remove a few more cases of argc usage. -89 bytes. 2009-11-28 15:18:53 +01:00
dos2unix.c *: remove a few more cases of argc usage. -89 bytes. 2009-11-28 15:18:53 +01:00
du.c libbb/human_readable.c: shrink; and reduce bss usage 2009-10-13 01:25:09 +02:00
echo.c *: introduce and use ffulsh_all() 2009-11-02 14:19:51 +01:00
env.c env: don't SEGV on bare "env -" 2009-11-12 14:52:47 +01:00
expand.c libbb: better unicode width support. Hopefully fixes bug 839. 2010-01-24 07:44:03 +01:00
expr.c more C standard compat fixes from Dan Fandrich 2009-09-06 12:47:55 +02:00
false.c *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
fold.c fold: unicode support. Based on a patch by Tomas Heinrich <heinrich.tomas@gmail.com> 2010-01-04 20:49:58 +01:00
fsync.c fsync: new applet by Pekka Pessi (Pekka.Pessi AT nokia.com) 2009-06-18 08:20:02 +02:00
head.c more C standard compat fixes from Dan Fandrich 2009-09-06 12:47:55 +02:00
hostid.c *: remove some uses of argc 2010-01-04 14:15:38 +01:00
id_test.sh id: coreutils compat by Tito + test script 2008-10-29 00:27:31 +00:00
id.c *: use "can't" instead of "cannot" 2009-11-13 09:08:27 +01:00
install.c cp: fix -H handling 2010-01-15 22:05:07 +01:00
Kbuild fsync: new applet by Pekka Pessi (Pekka.Pessi AT nokia.com) 2009-06-18 08:20:02 +02:00
length.c *: introduce and use ffulsh_all() 2009-11-02 14:19:51 +01:00
ln.c *: remove a few more cases of argc usage. -89 bytes. 2009-11-28 15:18:53 +01:00
logname.c *: remove some uses of argc 2010-01-04 14:15:38 +01:00
ls.c libbb: better unicode width support. Hopefully fixes bug 839. 2010-01-24 07:44:03 +01:00
md5_sha1_sum.c *: use "can't" instead of "cannot" 2009-11-13 09:08:27 +01:00
mkdir.c *: remove a few more cases of argc usage. -89 bytes. 2009-11-28 15:18:53 +01:00
mkfifo.c *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
mknod.c *: add -Wunused-parameter; fix resulting breakage 2008-03-17 09:00:54 +00:00
mv.c *: use "can't" instead of "cannot" 2009-11-13 09:08:27 +01:00
nice.c add -fvisibility=hidden to CC flags, mark XXX_main functions 2007-10-11 10:05:36 +00:00
nohup.c *: remove some uses of argc 2010-01-04 14:15:38 +01:00
od_bloaty.c od: fix -tx without length spec 2009-11-22 15:37:16 +01:00
od.c *: optimize most of isXXXXX() macros 2009-10-23 03:16:08 +02:00
printenv.c cksum, printenv: report errors via exitcode 2008-11-11 22:59:41 +00:00
printf.c printf: (allegedly) fix testsuite failure 2009-06-27 00:07:23 +02:00
pwd.c *: introduce and use ffulsh_all() 2009-11-02 14:19:51 +01:00
readlink.c readlink: support -n, -v, -s and -q too if support for -f is requested 2009-06-12 13:16:21 +02:00
realpath.c *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
rm.c *: use "can't" instead of "cannot" 2009-11-13 09:08:27 +01:00
rmdir.c *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
seq.c *: introduce and use ffulsh_all() 2009-11-02 14:19:51 +01:00
sleep.c more C standard compat fixes from Dan Fandrich 2009-09-06 12:47:55 +02:00
sort.c sort: make sort -o FILE FILE (same FILE) work. Closes bug 785. -3 bytes 2009-12-13 02:09:22 +01:00
split.c split: handle - as "use stdin". +13 bytes. Closes bug 741. 2009-11-26 05:43:16 +01:00
stat.c *: remove a few more cases of argc usage. -89 bytes. 2009-11-28 15:18:53 +01:00
stty.c stty: code shrink -44 bytes 2009-12-11 15:00:17 +01:00
sum.c fix up potential printf's with unsafe format strings 2009-10-24 17:47:56 +02:00
sync.c INSTALL: update obsolete doc, as suggested by Doug Clapp (doug.clapp AT triad.rr.com) 2010-01-13 22:43:13 +01:00
tac.c *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
tail.c more C standard compat fixes from Dan Fandrich 2009-09-06 12:47:55 +02:00
tee.c ash,hush: add TODO for rare build failure 2008-11-25 01:36:03 +00:00
test_ptr_hack.c add forgotten files. I am forgetting it all the time :( 2008-04-22 18:07:41 +00:00
test.c test: use index_in_strings 2009-09-12 22:41:57 +02:00
touch.c touch: needs another fix after last utimes() fixes 2009-11-30 11:36:14 +01:00
tr.c libbb: robustify isXXXX(). +39 bytes 2009-11-18 11:34:43 +01:00
true.c *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
tty.c *: make 2 more "int argc"'s unused; more saved if !DESKTOP 2010-01-04 13:16:08 +01:00
uname.c more C standard compat fixes from Dan Fandrich 2009-09-06 12:47:55 +02:00
uniq.c uniq: shave off whole 10 bytes off, oh my 2009-08-31 05:15:21 +02:00
usleep.c *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
uudecode.c libbb: [x]fopen_for_{read,write} introduced and used. 2008-07-21 23:05:26 +00:00
uuencode.c *: remove some uses of argc 2010-01-04 14:15:38 +01:00
wc.c fix fallout from isprint() changes 2009-11-20 19:14:19 +01:00
who.c remove a few superfluous includes 2008-11-25 13:33:11 +00:00
whoami.c *: remove some uses of argc 2010-01-04 14:15:38 +01:00
yes.c *: remove a few more cases of argc usage. -89 bytes. 2009-11-28 15:18:53 +01:00