home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / ARC521-2.ZIP / ARCS.H < prev    next >
C/C++ Source or Header  |  1989-12-29  |  2KB  |  46 lines

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