Path: utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!bbn!rochester!pt.cs.cmu.edu!speech2.cs.cmu.edu!jgk From: jgk@speech2.cs.cmu.edu (Joe Keane) Newsgroups: comp.lang.c Subject: Re: #defining NULL as (-1) in stdio Message-ID: <2020@pt.cs.cmu.edu> Date: 22 Jun 88 18:25:03 GMT References: <8806221521.AA00536@decwrl.dec.com> Sender: netnews@pt.cs.cmu.edu Organization: Carnegie Mellon Lines: 24 In article <8806221521.AA00536@decwrl.dec.com> minow@thundr.dec.com (Martin Minow THUNDR::MINOW ML3-5/U26 223-9922) writes: >In a recent posting, sun!gorodish!guy comments on another posting: >>[`#define NULL (-1)' is unacceptable] >While this is true as far as it goes, the documentation for early Unix >systems were not always careful to explain that NULL was zero. Of course not, since it's explained in K&R. >Of course, the shave-a-byte-off-the-source-code weenies would probably >write > if (fd = fopen(...)) { Weenies like Dennis Ritchie, i suppose? It's used all through K&R, what more do you want? >Somewhere in the distant past, I recommended to the Ansi committee that >NULL should have been made a reserved word with undefined content. They >rejected this request, as they didn't want to add any reserved words to >the language. That's not the right reason. --Joe