Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Removing forced casts between signed/unsigned char pointers

There were a few compiler warnings about pointers and differ in
signedness in the non-multibyte code that I wanted to fix.  I first
looked at the easy fix of adding a few new forced casts, but I didn't
like how many casts to and from "unsigned char *" and "char *" we were
getting in the code.  Instead, I decided to change some of the functions
and global pointers that were taking/returning unsigned char pointers to
make them take/return normal char pointers.  This allowed me to remove a
bunch of forced casts.

I was careful in my changes to preserve any unsigned features of the old
code (for instance, ztrcmp() still compares the character values in an
unsigned manner even though it takes normal "char *" strings).  In two
spots in the code there were unsigned char values being assigned and
restored to/from a "char save" value, so this potentially fixed a
problem for those broken systems that have trouble converting
signed<->unsigned char values without extra casts.

If anyone would like to see all the changes I just checked in, you'll
find a unified diff of them here:



Messages sorted by: Reverse Date, Date, Thread, Author