Index: [thread] [date] [subject] [author]
  From: becka@rz.uni-duesseldorf.de
  To  : ggi-develop@eskimo.com
  Date: Mon, 1 Feb 1999 20:59:48 +0100 (MET)

Re: OT: NULL==0 again :) (was Re: libggi beta on Solaris)

Hi !

> > > I have fixed the obvious occurences of %s with possibly-NULL arguments by
> > > replacing the argument 'bla' by 'bla ? bla : "(nil)"'.

> > Weren't you the one who was pointing out that we can't assume that NULL == 0
> > on all platforms earlier?  Might want to make that `bla != NULL ? blah :
> > "(nil)"'

This _is_ portable. 

> Actually, NULL == (void*)0 or some other pointer type, but the hardware
> representation of that might be non-zero.

Yes. Just as "if (pointer)" is legal, the above construct also is.

> However I remember seeing GGI code that does the above, we need to autoconf
> that ;)

Oh - now I get you. You mean initializing pointer arrays with 0 ...

IIRC we explicitly set all these pointers later. That is, they may be
invalid up to some point, but then they get set to something real
(ggi_zero,ggi_error and such).

Cu, ANdy

-- 
= Andreas Beck                    |  Email :  <andreas.beck@ggi-project.org> =

Index: [thread] [date] [subject] [author]