[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reconciliation of libsnprintfv vs. autogen
From: |
Larry Jones |
Subject: |
Re: Reconciliation of libsnprintfv vs. autogen |
Date: |
Mon, 26 Feb 2007 01:05:02 -0500 (EST) |
Bruce Korb writes:
>
> Larry Jones wrote:
> >
> > 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. :)
The problem isn't <NUL>, it's <DEL> -- all bits set is -0 on a ones
complement machine, which compares equal to zero and thus makes <DEL>
turn into <NUL> and terminate the string where you don't want it to. I
believe that there are current DSPs that use ones complement.
-Larry Jones
I don't want to be THIS good! -- Calvin
- Re: snprintfv for gnulib?, (continued)
- Re: snprintfv for gnulib?, Bruno Haible, 2007/02/23
- Reconciliation of libsnprintfv vs. autogen, Bruce Korb, 2007/02/25
- Re: Reconciliation of libsnprintfv vs. autogen, Bruno Haible, 2007/02/25
- Re: Reconciliation of libsnprintfv vs. autogen, Bruce Korb, 2007/02/25
- Re: Reconciliation of libsnprintfv vs. autogen, Larry Jones, 2007/02/25
- Re: Reconciliation of libsnprintfv vs. autogen, Bruce Korb, 2007/02/25
- Re: Reconciliation of libsnprintfv vs. autogen,
Larry Jones <=
- Re: Reconciliation of libsnprintfv vs. autogen, Paul Eggert, 2007/02/26
- Re: Reconciliation of libsnprintfv vs. autogen, Daniel Jacobowitz, 2007/02/25
- Re: Reconciliation of libsnprintfv vs. autogen, Ralf Wildenhues, 2007/02/25
- Re: Reconciliation of libsnprintfv vs. autogen, Daniel Jacobowitz, 2007/02/26
- Re: Reconciliation of libsnprintfv vs. autogen, Bruce Korb, 2007/02/26
- Re: Reconciliation of libsnprintfv vs. autogen, Daniel Jacobowitz, 2007/02/26
- Re: Reconciliation of libsnprintfv vs. autogen, Paolo Bonzini, 2007/02/26
- Re: Reconciliation of libsnprintfv vs. autogen, Daniel Jacobowitz, 2007/02/26
- Re: snprintfv for gnulib?, Daniel Jacobowitz, 2007/02/23
- Re: snprintfv for gnulib?, Daniel Jacobowitz, 2007/02/23