home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / std_unix / volume.11 / text0014.txt < prev    next >
Encoding:
Text File  |  1987-07-18  |  1.1 KB  |  43 lines

  1.  
  2. N.064    April 23, 1987    ``Comments on 1003.1 N.048,'' Dominic Dunlop.
  3.  
  4. Comments on 1003.1 N48 (addition of cpio format to 1003.1 chapter 10)
  5.  
  6. 1.
  7. The structure proposed is archaic, in that it uses
  8.     short    h_mtime[2]    and
  9.     short    h_filesize[2]
  10. yet says nothing about the ordering of the half-words
  11. in the array.  This allows the possibility that different
  12. implementations could make different "big endian" vs.
  13. "little endian" decisions on the same underlying
  14. architecture.
  15.  
  16.     Proposal: replace declarations above with
  17.         long    h_mtime    and
  18.         long    h_filesize
  19.                 or with
  20.         time_t    h_mtime
  21.         off_t    h_filesize
  22.  
  23. (Former probably more compatible with "shape" of
  24. existing structgure; latter, using same types as
  25. corresponding fields in struct stat, arguably
  26. more correct (this argument could be extended
  27. to other fields in struct Hdr as well)).
  28.  
  29. 2.
  30. Scanf format is incorrect.  It should be
  31.  
  32.         "%6ho%6ho%6ho%6ho%6ho%6ho%6ho%6ho%11lo%6ho%11lo%s"
  33.  
  34. (As I know to my cost, format published by AT&T
  35. does not work on architectures where
  36.         sizeof(int) == sizeof(long)
  37. )
  38.  
  39.                 Dominic Dunlop    4/23/87
  40.  
  41. Volume-Number: Volume 11, Number 15
  42.  
  43.