Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf!altger!doitcr!de.intel.com!intelhf!ichips!iwarp.intel.com!inews!nevin!bhoughto From: bhoughto@nevin.intel.com (Blair P. Houghton) Newsgroups: comp.unix.programmer Subject: Re: Nice() in Sys V.4 Keywords: nice(), priocntl(), ioctl() Message-ID: <3424@inews.intel.com> Date: 24 Mar 91 06:09:42 GMT References: <318@secola.Columbia.NCR.COM> <1991Mar21.141753.28726@nncrcae.Columbia.NCR.COM> <11393@dog.ee.lbl.gov> Sender: news@inews.intel.com Organization: Intel Corp, Chandler, AZ Lines: 48 In article <11393@dog.ee.lbl.gov> torek@elf.ee.lbl.gov (Chris Torek) writes: Or was this someone poking around in Chris' office while his xrn happened to be displaying comp.lang.c... >In article <1991Mar21.141753.28726@nncrcae.Columbia.NCR.COM> >wescott@Columbia.NCR.COM (Mike Wescott) writes: >[quoting proc(4) from some SVR4 system] >> The argument p is a generic pointer whose type depends on >> the specific ioctl code. Where not specifically mentioned >> below, its value should be zero. > >Whoop! Whoop! Confusion alert! Pooh, pooh; pedantry alert... >Does this mean `the argument p should be a null-pointer-to-char', or >does it mean `the argument p should be a pointer-to-char holding the >address of an int whose value is zero', or does it mean something else? > >It is impossible for p to have the `value ... zero' because p is a >pointer---Pointers Are Not Integers---but this means we must guess at >what was really meant. Braap. The "integer constant expression" 0 is a "null pointer constant" and becomes the type of the pointer to which it is assigned or with which it is compared. A pointer may very well have the value 0 [1], and when it does it is a "null pointer." This is all in the standard, ANSI X3.159-1989, at sec. 3.2.2.3, p. 38, ll. 1-4. It's clear what is meant by what he said. [2] --Blair "Plplplplpl... :-P' " [1] Or any other value an implementor wants it to; check out p. 37, l. 38 to see the word "value" used to refer to the value of a pointer. 0, however, is the only one with a specified integral representation. [2] If in fact he meant "the value of the object to which it points should be 0", then he's most definitely NOT said it.