Xref: utzoo comp.arch:4933 comp.lang.c:10296 Path: utzoo!attcan!uunet!mcvax!unido!iaoobelix!woerz From: woerz@iaoobelix.UUCP (Dieter Woerz) Newsgroups: comp.arch,comp.lang.c Subject: Re: negative addresses Message-ID: <168@iaoobelix.UUCP> Date: 20 May 88 12:41:30 GMT References: <2393@uvacs.CS.VIRGINIA.EDU> <21541@amdcad.AMD.COM> <1988May12.162906.16901@utzoo.uucp> <7881@brl-smoke.ARPA> <10001@tekecs.TEK.COM> Reply-To: woerz@iaoobelix.UUCP (Dieter Woerz) Organization: Fraunhofer Institut fuer Arbeitswirtschaft und Organisation Lines: 37 Posted: Fri May 20 13:41:30 1988 In article <10001@tekecs.TEK.COM> andrew@frip.gwd.tek.com (Andrew Klossner) writes: > ... >In routine ttout: > > if (tbuf->c_ptr) > >appears twice. (And in the same routine, > > if (tbuf->c_ptr == NULL) > >appears twice. Multiple hackers have clogged through here.) > >In routine ttioctl: > > if (tp->t_rbuf.c_ptr) { > if (tp->t_tbuf.c_ptr) { > ... I have to admit, that the others may not work, but I think you should be able to tweak the compilers for that architecture to do a comparision of such pointers with the Zero-Pointer of that architecture, which is not necessaryly zero. The second example is should work simply if you redefine NULL to the value of the Zero-Pointer. ------------------------------------------------------------------------------ Dieter Woerz Fraunhofer Institut fuer Arbeitswirtschaft und Organisation Abt. 453 Holzgartenstrasse 17 D-7000 Stuttgart 1 W-Germany BITNET: iaoobel.uucp!woerz@unido.bitnet UUCP: ...{uunet!unido, pyramid}!iaoobel!woerz