Path: utzoo!mnetor!uunet!husc6!rutgers!mtune!codas!ateng!chip From: chip@ateng.UUCP (Chip Salzenberg) Newsgroups: comp.unix.xenix Subject: Re: pathalias under SCO Message-ID: <133@ateng.UUCP> Date: 27 Dec 87 14:46:53 GMT References: <2472@killer.UUCP> <116@slxsys.specialix.co.uk> Reply-To: chip@ateng.UUCP (Chip Salzenberg) Organization: A T Engineering, Tampa, FL Lines: 34 In article <2472@killer.UUCP> chip@killer.UUCP (Chip Rosenthal) writes: >Has anybody out there brought up pathalias under SCO XENIX? I get a >segmentation violation if I try to run enough map data through it. Moving > . > while ((n = Table[probe]) != 0) { > if (unique) > goto skip; > . In article <116@slxsys.specialix.co.uk> jpp@slxsys.UUCP (John Pettitt) writes: >The problem is that ptr != int. Table is declared >extrn node **Table; >Comparing this to 0 will not work in 286 Large model. This is not true; any pointer may be compared to 0 without problem. In fact, the only correct declaration of NULL is 0. (See K&R) On the other hand, passing 0 as a function parameter in the place of a pointer is not portable, and will not work in large model. All NULL function arguments should be casted (if you want a portable program :-)). For example: "setbuf(stdout, NULL);" is not portable. On the other hand, "setbuf(stdout, (char *)NULL);" is portable. (If you doubt this, consider medium model, where function pointers and data pointers have different sizes. No one value for NULL will work when used as the second parameter of both setbuf() and signal().) Microsoft, among others, has sullied K&R's simple definition of NULL in an attempt to make incorrect programs work. Oh well. -- Chip Salzenberg "chip@ateng.UUCP" or "{codas,uunet}!ateng!chip" A T Engineering My employer's opinions are not mine, but these are. "Gentlemen, your work today has been outstanding, and I intend to recommend you all for promotion -- in whatever fleet we end up serving." - JTK