negative addresses

Dieter Woerz woerz at iaoobelix.UUCP
Fri May 20 22:41:30 AEST 1988


In article <10001 at tekecs.TEK.COM> andrew at 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 at unido.bitnet
UUCP:   ...{uunet!unido, pyramid}!iaoobel!woerz



More information about the Comp.lang.c mailing list