home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Peter Lewis / MacBinary II+ 1.0.0 / MacBinary II Standard next >
Encoding:
Text File  |  1994-01-01  |  7.2 KB  |  80 lines  |  [TEXT/ttxt]

  1. These are the new changes to the MacBinary Standard, as generally agreed
  2. upon in the MacBinary II Conference 6/21/87, and as changed in the followup
  3. conference 6/28/87.  Revised 7/24/87 to reflect suggestions and clarifications
  4. that came later, and to include all necessary information needed from the
  5. original MacBinary standard document to implement MacBinary II.
  6.  
  7. The new standard will be very similar to the original MacBinary standard as
  8. described in [MacBinary Standard].  (Reading the original standard is
  9. recommended for a full understanding of implementation and philosophy
  10. behind the MacBinary I and II formats.)  The binary format consists of a
  11. 128-byte header containing all the information necessary to reproduce the
  12. document's directory entry on the receiving Macintosh; followed by the
  13. document's Data Fork (if it has one), padded with nulls to a multiple of
  14. 128 bytes (if necessary); followed by the document's Resource Fork (again, 
  15. padded if necessary). The lengths of these forks (either or both of which
  16. may be zero) are contained in the header.
  17.  
  18. The format of the header for MacBinary II is as follows:
  19.  
  20.   Offset 000-Byte, old version number, must be kept at zero for compatibility
  21.   Offset 001-Byte, Length of filename (must be in the range 1-63)
  22.   Offset 002-1 to 63 chars, filename (only "length" bytes are significant).
  23.   Offset 065-Long Word, file type (normally expressed as four characters)
  24.   Offset 069-Long Word, file creator (normally expressed as four characters)
  25.   Offset 073-Byte, original Finder flags
  26.                                  Bit 7 - Locked.
  27.                                  Bit 6 - Invisible.
  28.                                  Bit 5 - Bundle.
  29.                                  Bit 4 - System.
  30.                                  Bit 3 - Bozo.
  31.                                  Bit 2 - Busy.
  32.                                  Bit 1 - Changed.
  33.                                  Bit 0 - Inited.
  34.   Offset 074-Byte, zero fill, must be zero for compatibility
  35.   Offset 075-Word, file's vertical position within its window.
  36.   Offset 077-Word, file's horizontal position within its window.
  37.   Offset 079-Word, file's window or folder ID.
  38.   Offset 081-Byte, "Protected" flag (in low order bit).
  39.   Offset 082-Byte, zero fill, must be zero for compatibility
  40.   Offset 083-Long Word, Data Fork length (bytes, zero if no Data Fork).
  41.   Offset 087-Long Word, Resource Fork length (bytes, zero if no R.F.).
  42.   Offset 091-Long Word, File's creation date
  43.   Offset 095-Long Word, File's "last modified" date.
  44.   Offset 099-Word, length of Get Info comment to be sent after the resource
  45.              fork (if implemented, see below).
  46.  *Offset 101-Byte, Finder Flags, bits 0-7. (Bits 8-15 are already in byte 73)
  47.  *Offset 116-Long Word, Length of total files when packed files are unpacked.
  48.              This is only used by programs that pack and unpack on the fly,
  49.              mimicing a standalone utility such as PackIt.  A program that is
  50.              uploading a single file must zero this location when sending a
  51.              file.  Programs that do not unpack/uncompress files when
  52.              downloading may ignore this value.
  53.  *Offset 120-Word, Length of a secondary header.  If this is non-zero,
  54.              Skip this many bytes (rounded up to the next multiple of 128)
  55.              This is for future expansion only, when sending files with
  56.              MacBinary, this word should be zero.
  57.  *Offset 122-Byte, Version number of Macbinary II that the uploading program
  58.              is written for (the version begins at 129)
  59.  *Offset 123-Byte, Minimum MacBinary II version needed to read this file
  60.              (start this value at 129 129)
  61.  *Offset 124-Word, CRC of previous 124 bytes
  62.  
  63.  *This is newly defined for MacBinary II.
  64.  
  65. All values are stored in normal 68000 order, with Most Significant Byte
  66. appearing first then the file.  Any bytes in the header not defined above
  67. should be set to zero.
  68.  
  69. The original MacBinary format was ammended to include the sending of the FCMT
  70. (Get Info comment) after the resource fork was sent, if the length for such
  71. comment, given in offset 99, is not zero.  To the best of our knowledge, no
  72. program has implemented this feature, due to Apple's stated position that no
  73. program should read or write these comments.  The definition remains in
  74. MacBinary II, so that should Apple ever provide a documented way of reading and
  75. writing these comments, terminal programs will be able to take advantage of
  76. this feature. 
  77.  
  78. All Finder flags and information would be uploaded, however, a downloading
  79. program should clear the Finder flag bits of
  80.   0 - Set i