[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reconciliation of libsnprintfv vs. autogen

From: Bruce Korb
Subject: Re: Reconciliation of libsnprintfv vs. autogen
Date: Sun, 25 Feb 2007 15:35:50 -0800
User-agent: Thunderbird (X11/20060911)

Larry Jones wrote:
> Bruce Korb writes:
>> I guess it is a preference issue:  I like to remember as few
>> special cases as absolutely possible.  There's too much to
>> remember as it is.  "Never dereference a cast pointer" is simple.
> Yes, it is.  Unfortunately, it's also wrong.  If you have a pointer to
> char but need to treat the data it points to as unsigned char, you have
> to cast the pointer and dereference it to get the correct value on ones
> complement systems -- dereferencing and then casting doesn't work
> because -0 gets converted to +0.

OK.  In this case, we know we're not playing with NUL bytes 'cuz they
terminate strings.  Where are these ones complement machines anyway?
I've not bumped into any for decades.  In other words, I'm not sure
I want to care about them anymore.  I don't work in a museum.  :)

Thanks  - Bruce

reply via email to

[Prev in Thread] Current Thread [Next in Thread]