home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v7 / text0012.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  2.3 KB

  1. From: seismo!decvax!ittatc!bunker!garys (Gary Samuelson)
  2. Date: Wed, 1 Oct 86 11:04:08 edt
  3. Organization: Bunker Ramo, Trumbull CT
  4.  
  5. In article <5836@ut-sally.UUCP> you write:
  6. >If settz is called with a string for which the implementation
  7. >can not find a conversion, settz shall return -1...
  8.  
  9. Under section 4.5.3.4, the appropriate value for errno is not
  10. specified for this case.  See suggested additional wording, below.
  11.  
  12. >4.5.3.4  Errors
  13. >    If the function returns -1 the value stored in errno may be
  14. >interpreted as follows:
  15.  
  16. I suggest the following change in wording:
  17.  
  18. -[EFAULT]    The argument p points outside the process's allocated
  19. -    address space.
  20.  
  21. +[EFAULT]    The argument p does not point to a readable string.
  22.  
  23. This covers the case where the beginning of the string is within
  24. the process's address space, but the end is not.
  25.  
  26. I suggest the following additional wording:
  27.  
  28. +[EINVAL]    The argument p points to a string for which the
  29. +    implementation could not find a conversion.
  30.  
  31. >4.5.4  Get Local Time
  32. >Functions:  localtime(), ctime()
  33. >
  34. >4.5.4.1  Synopsis
  35. >    #include <time.h>
  36.  
  37. It is not clear that the type of 'timer' specified for 'ctime'
  38. also applies to 'localtime'.  I suggest the following additional
  39. wording:
  40.  
  41. >    struct tm *localtime(timer)
  42. +    time_t *timer;
  43. +
  44. >    char *ctime(timer)
  45. >    time_t *timer;
  46.  
  47. >4.5.4.3  Returns
  48.  
  49. The description of ctime's return value specifies not only the return
  50. value of ctime, but also how ctime should be coded (i.e., 'ctime' must
  51. call 'asctime').  I suggest the following change in wording:
  52.  
  53. -    The ctime() function returns the pointer returned by the
  54. -asctime() function with that broken-down time as argument.
  55.  
  56. +    The ctime() function returns a pointer to a string containing
  57. +the time, converted to the same format produced by 'asctime'.
  58.  
  59. >4.5.4.4  Errors
  60.  
  61. I suggest the following change in wording:
  62.  
  63. -[EFAULT]    The argument p points outside the process's allocated
  64. -    address space.
  65.  
  66. +[EFAULT]    The argument p does not point to a readable object of
  67. +    type time_t.
  68.  
  69. This covers the cases where the first byte of time_t is in the address
  70. space, but the last byte isn't, and where the pointer is not properly
  71. aligned.
  72.  
  73. I suggest the following additional wording:
  74.  
  75. +[EINVAL]    The argument points to an object which does not contain
  76. +    a valid time_t value.
  77.  
  78. Gary Samuelson
  79.  
  80.  
  81. Volume-Number: Volume 7, Number 13
  82.  
  83.