Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Nov 2000 23:56:38 -0500
From:      "Louis A. Mamakos" <louie@TransSys.COM>
To:        "Daniel C. Sobral" <dcs@newsguy.com>
Cc:        Garance A Drosehn <gad@FreeBSD.ORG>, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/usr.sbin/lpr/lpd printjob.c 
Message-ID:  <200011150456.eAF4ucG61031@whizzo.transsys.com>
In-Reply-To: Your message of "Wed, 15 Nov 2000 06:43:38 %2B0900." <3A11B20A.8AE1A5CA@newsguy.com> 
References:  <200011142132.NAA19274@freefall.freebsd.org> <3A11B20A.8AE1A5CA@newsguy.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Garance A Drosehn wrote:
> > 
> > gad         2000/11/14 13:32:52 PST
> > 
> >   Modified files:
> >     usr.sbin/lpr/lpd     printjob.c
> >   Log:
> >   Get rid of 'exit(-1)' calls.  Exit codes are limited to 8 bits under most
> >   Unixes, so -1 becomes 0xFF for 2's complement and 0xFE (?) for 1's
> >   complement.
> 
> That's true, but, afaik, C standard mandates 2's complement. Also, you
> forgot 0x01 for sign-bit. :-)

The sign bit is still 0x80 for an 8 bit signed integer.  Perhaps you're
thinking about the end-around-carry? 

Having actually used a C compiler on a 1's complement, 36-bit word addressable
CPU architecture, I don't think this is the case.. 

Anyway, my K&R is mostly silent on the issue of 1's complement CPU
architectures, referring to the ~ operater as the 1's complement unary
operator.  

louie







To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011150456.eAF4ucG61031>