ctype bug

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Wed Jul 6 01:24:50 PDT 2005


Lately Matthew Dillon <dillon at xxxxxxxxxxxxxxxxxxxx> said:

>     Whoops, we have a problem with the ctype code... it is not properly
>     folding negative integers (i.e. when a signed char is passed to 
>     an is*() function).
> 
>     The is*() functions are returning non-zero for all negative numbers,
>     which is wrong.

uhm, actually not... I was confused as well, but it was my utf-8 xterm
playing tricks on me. If you look close, the program just outputs
printable chars (at least on syscons), it skips some in between.
I don't get the system. As soon as you assign the int to any char
(signed, unsigned, plain) and pass this char, the negative numbers
are not shown.

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low $$$ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Attachment:
pgp00006.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00006.pgp
Type: application/octet-stream
Size: 189 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/commits/attachments/20050706/2117c619/attachment-0017.obj>


More information about the Commits mailing list