home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / OS2ARC_S.ZIP / ARCS.H < prev    next >
Text File  |  1987-10-14  |  2KB  |  51 lines

  1. /*  ARC - Archive utility - Archive file header format
  2.  
  3.     Version 2.12, created on 12/17/85 at 14:40:26
  4.  
  5. (C) COPYRIGHT 1985 by System Enhancement Associates; ALL RIGHTS RESERVED
  6.  
  7.     By:  Thom Henderson
  8.  
  9.     Description:
  10.          This file defines the format of an archive file header, excluding
  11.          the archive marker and the header version number.
  12.  
  13.          Each entry in an archive begins with a one byte archive marker,
  14.          which is set to 26.  The marker is followed by a one byte
  15.          header type code, from zero to 7.
  16.  
  17.          If the header type code is zero, then it is an end marker, and
  18.          no more data should be read from the archive.
  19.  
  20.          If the header type code is in the range 2 to 7, then it is
  21.          followed by a standard archive header, which is defined below.
  22.  
  23.          If the header type code is one, then it is followed by an older
  24.          format archive header.  The older format header does not contain
  25.          the true length.  A header should be read for a length of
  26.          sizeof(struct heads)-sizeof(long).  Then set length equal to size
  27.          and change the header version to 2.
  28.  
  29.     Programming note:
  30.          The crc value given in the header is based on the unpacked data.
  31.  
  32.     Language:
  33.          Computer Innovations Optimizing C86
  34. */
  35.  
  36. struct heads                           /* archive entry header format */
  37. {   char name[13];                 /* file name */
  38.     long size;                         /* size of file, in bytes */
  39.     unsigned int date;                 /* creation date */
  40.     unsigned int time;                 /* creation time */
  41.     int crc;                           /* cyclic redundancy check */
  42.     long length;                       /* true file length */
  43. }   ;
  44.  
  45.  
  46. #define _ARCMARK 26                 /*    special archive marker */
  47. #define _ARCVER 8                   /*    archive header version code */
  48. #define _STRLEN 100                 /*    system standard string length */
  49. #define _FNLEN 13                   /*    file name length */
  50. #define _MAXARG 25                  /*    maximum number of arguments */
  51.