zsh-workers
 help / color / mirror / code / Atom feed
* Removing forced casts between signed/unsigned char pointers
@ 2005-11-15  9:27 Wayne Davison
  2005-11-15 10:00 ` DervishD
  0 siblings, 1 reply; 4+ messages in thread
From: Wayne Davison @ 2005-11-15  9:27 UTC (permalink / raw)
  To: zsh-workers

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:

    http://opencoder.net/zsh-less-unsigned-char.patch

..wayne..


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-15 12:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-15  9:27 Removing forced casts between signed/unsigned char pointers Wayne Davison
2005-11-15 10:00 ` DervishD
2005-11-15 11:03   ` Wayne Davison
2005-11-15 12:15     ` DervishD

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).