zsh-workers
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: zsh-workers@sunsite.dk
Subject: Removing forced casts between signed/unsigned char pointers
Date: Tue, 15 Nov 2005 01:27:20 -0800	[thread overview]
Message-ID: <20051115092720.GA13478@dot.blorf.net> (raw)

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..


             reply	other threads:[~2005-11-15  9:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-15  9:27 Wayne Davison [this message]
2005-11-15 10:00 ` DervishD
2005-11-15 11:03   ` Wayne Davison
2005-11-15 12:15     ` DervishD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051115092720.GA13478@dot.blorf.net \
    --to=wayned@users.sourceforge.net \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).