cut: fix appending to unused cut buffer and support for wide characters
commit53b5b0c8e89673871f4d89702ecb2e22ca61c8e8
authorWolfgang Jenkner <wjenkner@inode.at>
Wed, 9 Apr 2008 14:43:41 +0000 (9 16:43 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 4 May 2008 12:30:13 +0000 (4 14:30 +0200)
tree51ba71c571497fba706cefc381e862e3f41e12e7
parent7bdd574d4225d2047c24b266f835b3f1036e83b3
cut: fix appending to unused cut buffer and support for wide characters

Fix an if clause whose test assumes that a successful isupper test
returns 1 (grepping through the nvi sources, I haven't found other cases
where a character classification function is used with this assumption).

This fixes the following problem (on my i686 glibc based Gnu/Linux
system): Take an unused cut buffer, say a, and append something to
it, like "Ayy.  Now, :di b shows a cut buffer named (uppercase!) A.
Repeating "Ayy shows this bogus buffer twice instead of appending to it.
This affects both the 8-bit and wchar version.
common/cut.c
common/cut.h
common/multibyte.h