Nice() in Sys V.4

Blair P. Houghton bhoughto at nevin.intel.com
Sun Mar 24 16:09:42 AEST 1991


In article <11393 at dog.ee.lbl.gov> torek at 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 at nncrcae.Columbia.NCR.COM>
>wescott at 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.



More information about the Comp.unix.programmer mailing list