home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / packer / arc / arctool / dearcglb.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-09-29  |  3.5 KB  |  113 lines

  1. {
  2.                        F i l e    I n f o r m a t i o n
  3.  
  4. * DESCRIPTION
  5. Turbo Pascal V4.0 DEARC global variables and type definations.
  6.  
  7. * ASSOCIATED FILES
  8. DEARC.PAS
  9. DEARCABT.PAS
  10. DEARCGLB.PAS
  11. DEARCIO.PAS
  12. DEARCLZW.PAS
  13. DEARCUNP.PAS
  14. DEARCUSQ.PAS
  15. DEARC.TXT
  16.  
  17. }
  18. (**
  19.  *
  20.  *  Module:       dearcglb.pas
  21.  *  Description:  DEARC global variables and type definitions
  22.  *
  23.  *  Revision History:
  24.  *    7-26-88 : unitized for Turbo v4.0
  25.  *
  26. **)
  27.  
  28.  
  29. unit dearcglb;
  30.  
  31. interface
  32.  
  33. (*
  34.  *  constant definitions
  35.  *)
  36. const
  37.   BLOCKSIZE  = 512;             { I/O block size }
  38.   arcmarc    = 26;              { special archive marker }
  39.   arcver     = 9;               { max archive header version code }
  40.   strlen     = 100;             { standard string length }
  41.   fnlen      = 12;              { file name length - 1 }
  42.  
  43. const crctab : array [0..255] of word =
  44.   (
  45.     $0000, $C0C1, $C181, $0140, $C301, $03C0, $0280, $C241,
  46.     $C601, $06C0, $0780, $C741, $0500, $C5C1, $C481, $0440,
  47.     $CC01, $0CC0, $0D80, $CD41, $0F00, $CFC1, $CE81, $0E40,
  48.     $0A00, $CAC1, $CB81, $0B40, $C901, $09C0, $0880, $C841,
  49.     $D801, $18C0, $1980, $D941, $1B00, $DBC1, $DA81, $1A40,
  50.     $1E00, $DEC1, $DF81, $1F40, $DD01, $1DC0, $1C80, $DC41,
  51.     $1400, $D4C1, $D581, $1540, $D701, $17C0, $1680, $D641,
  52.     $D201, $12C0, $1380, $D341, $1100, $D1C1, $D081, $1040,
  53.     $F001, $30C0, $3180, $F141, $3300, $F3C1, $F281, $3240,
  54.     $3600, $F6C1, $F781, $3740, $F501, $35C0, $3480, $F441,
  55.     $3C00, $FCC1, $FD81, $3D40, $FF01, $3FC0, $3E80, $FE41,
  56.     $FA01, $3AC0, $3B80, $FB41, $3900, $F9C1, $F881, $3840,
  57.     $2800, $E8C1, $E981, $2940, $EB01, $2BC0, $2A80, $EA41,
  58.     $EE01, $2EC0, $2F80, $EF41, $2D00, $EDC1, $EC81, $2C40,
  59.     $E401, $24C0, $2580, $E541, $2700, $E7C1, $E681, $2640,
  60.     $2200, $E2C1, $E381, $2340, $E101, $21C0, $2080, $E041,
  61.     $A001, $60C0, $6180, $A141, $6300, $A3C1, $A281, $6240,
  62.     $6600, $A6C1, $A781, $6740, $A501, $65C0, $6480, $A441,
  63.     $6C00, $ACC1, $AD81, $6D40, $AF01, $6FC0, $6E80, $AE41,
  64.     $AA01, $6AC0, $6B80, $AB41, $6900, $A9C1, $A881, $6840,
  65.     $7800, $B8C1, $B981, $7940, $BB01, $7BC0, $7A80, $BA41,
  66.     $BE01, $7EC0, $7F80, $BF41, $7D00, $BDC1, $BC81, $7C40,
  67.     $B401, $74C0, $7580, $B541, $7700, $B7C1, $B681, $7640,
  68.     $7200, $B2C1, $B381, $7340, $B101, $71C0, $7080, $B041,
  69.     $5000, $90C1, $9181, $5140, $9301, $53C0, $5280, $9241,
  70.     $9601, $56C0, $5780, $9741, $5500, $95C1, $9481, $5440,
  71.     $9C01, $5CC0, $5D80, $9D41, $5F00, $9FC1, $9E81, $5E40,
  72.     $5A00, $9AC1, $9B81, $5B40, $9901, $59C0, $5880, $9841,
  73.     $8801, $48C0, $4980, $8941, $4B00, $8BC1, $8A81, $4A40,
  74.     $4E00, $8EC1, $8F81, $4F40, $8D01, $4DC0, $4C80, $8C41,
  75.     $4400, $84C1, $8581, $4540, $8701, $47C0, $4680, $8641,
  76.     $8201, $42C0, $4380, $8341, $4100, $81C1, $8081, $4040
  77.   );
  78.  
  79. type
  80.   strtype = string[strlen];
  81.   fntype  = array [0..fnlen] of char;
  82.   buftype = array [1..BLOCKSIZE] of byte;
  83.   heads   = record
  84.               name   : fntype;
  85.               size   : longint;
  86.               date   : word;
  87.               time   : word;
  88.               crc    : integer;
  89.               length : longint
  90.             end;
  91.  
  92. var
  93.     hdrver   : byte;
  94.     arcfile  : file;
  95.     arcbuf   : buftype;
  96.     arcptr   : integer;
  97.     arcname  : strtype;
  98.     endfile  : boolean;
  99.     extfile  : file;
  100.     extbuf   : buftype;
  101.     extptr   : integer;
  102.     extname  : strtype;
  103.     crcval   : integer;
  104.     size     : longint;
  105.     state    : (NOHIST, INREP);
  106.     firstch  : boolean;
  107.  
  108. implementation
  109.  
  110. end.
  111.  
  112. 
  113.