home *** CD-ROM | disk | FTP | other *** search
- From: seismo!decvax!ittatc!bunker!garys (Gary Samuelson)
- Date: Wed, 1 Oct 86 11:04:08 edt
- Organization: Bunker Ramo, Trumbull CT
-
- In article <5836@ut-sally.UUCP> you write:
- >If settz is called with a string for which the implementation
- >can not find a conversion, settz shall return -1...
-
- Under section 4.5.3.4, the appropriate value for errno is not
- specified for this case. See suggested additional wording, below.
-
- >4.5.3.4 Errors
- > If the function returns -1 the value stored in errno may be
- >interpreted as follows:
-
- I suggest the following change in wording:
-
- -[EFAULT] The argument p points outside the process's allocated
- - address space.
-
- +[EFAULT] The argument p does not point to a readable string.
-
- This covers the case where the beginning of the string is within
- the process's address space, but the end is not.
-
- I suggest the following additional wording:
-
- +[EINVAL] The argument p points to a string for which the
- + implementation could not find a conversion.
-
- >4.5.4 Get Local Time
- >Functions: localtime(), ctime()
- >
- >4.5.4.1 Synopsis
- > #include <time.h>
-
- It is not clear that the type of 'timer' specified for 'ctime'
- also applies to 'localtime'. I suggest the following additional
- wording:
-
- > struct tm *localtime(timer)
- + time_t *timer;
- +
- > char *ctime(timer)
- > time_t *timer;
-
- >4.5.4.3 Returns
-
- The description of ctime's return value specifies not only the return
- value of ctime, but also how ctime should be coded (i.e., 'ctime' must
- call 'asctime'). I suggest the following change in wording:
-
- - The ctime() function returns the pointer returned by the
- -asctime() function with that broken-down time as argument.
-
- + The ctime() function returns a pointer to a string containing
- +the time, converted to the same format produced by 'asctime'.
-
- >4.5.4.4 Errors
-
- I suggest the following change in wording:
-
- -[EFAULT] The argument p points outside the process's allocated
- - address space.
-
- +[EFAULT] The argument p does not point to a readable object of
- + type time_t.
-
- This covers the cases where the first byte of time_t is in the address
- space, but the last byte isn't, and where the pointer is not properly
- aligned.
-
- I suggest the following additional wording:
-
- +[EINVAL] The argument points to an object which does not contain
- + a valid time_t value.
-
- Gary Samuelson
-
-
- Volume-Number: Volume 7, Number 13
-
-