Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!ames!ptsfa!ihnp4!inuxc!pur-ee!uiucdcs!uiucdcsp!lopez From: lopez@uiucdcsp.cs.uiuc.edu Newsgroups: comp.lang.c Subject: Re: To comment 48: Xenix Message-ID: <77200001@uiucdcsp> Date: Fri, 24-Apr-87 20:16:00 EDT Article-I.D.: uiucdcsp.77200001 Posted: Fri Apr 24 20:16:00 1987 Date-Received: Sun, 26-Apr-87 22:08:17 EDT Lines: 46 Nf-ID: #N:uiucdcsp:77200001:000:1386 Nf-From: uiucdcsp.cs.uiuc.edu!lopez Apr 24 19:16:00 1987 Reply to Xenix Comments by Dave. Being a User of Microport's Unix System V I don't have to deal with the madness of Microsoft. The problem of having pointers that are not the same length as integers cost me a day and alot of steam. But I think that declaring: #define NULL (char *)0 is expensive but will always do the trick for all models (small,large,huge) On UNIX System V AT I had done the typical tricks in C of: if (!charptr) Even though I new it was crypt, but efficient. But all of that worked while I was in the small memory model, when I went to large I core dumped my brain. For now pointers were 32 bits instead of 16 bits, but integers are 16 bits. So after alot of frustration I figured out that NULL was defined as 0L. Which makes sense since we need a 32 bit zero value, which is not an integer. But As for people saying that if (charptr == 0) should work, "for any good C programmer's" I think thats hogwash. On every system I have ever used if (!charptr) worked, but I am happy that System V/AT has finally forced me to write code that is less crypt. if (charptr == NULL) is easier to read by everyone, and less likely to be a source of unexpected bugs. As for Microport's product, I think it is the real McCoy. Xenix is for people who have no class. Frank Lopez University of Illinois