home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / tug__002 / dearcglb.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-08-08  |  5.1 KB  |  150 lines

  1. {TUG PDS CERT 1.01 (Pascal)
  2.  
  3. ==========================================================================
  4.  
  5.                   TUG PUBLIC DOMAIN SOFTWARE CERTIFICATION
  6.  
  7. The Turbo User Group (TUG) is recognized by Borland International as the
  8. official support organization for Turbo languages.  This file has been
  9. compiled and verified by the TUG library staff.  We are reasonably certain
  10. that the information contained in this file is public domain material, but
  11. it is also subject to any restrictions applied by its author.
  12.  
  13. This diskette contains PROGRAMS and/or DATA determined to be in the PUBLIC
  14. DOMAIN, provided as a service of TUG for the use of its members.  The
  15. Turbo User Group will not be liable for any damages, including any lost
  16. profits, lost savings or other incidental or consequential damages arising
  17. out of the use of or inability to use the contents, even if TUG has been
  18. advised of the possibility of such damages, or for any claim by any
  19. other party.
  20.  
  21. To the best of our knowledge, the routines in this file compile and function
  22. properly in accordance with the information described below.
  23.  
  24. If you discover an error in this file, we would appreciate it if you would
  25. report it to us.  To report bugs, or to request information on membership
  26. in TUG, please contact us at:
  27.  
  28.              Turbo User Group
  29.              PO Box 1510
  30.              Poulsbo, Washington USA  98370
  31.  
  32. --------------------------------------------------------------------------
  33.                        F i l e    I n f o r m a t i o n
  34.  
  35. * DESCRIPTION
  36. Turbo Pascal V4.0 DEARC global variables and type definations.
  37.  
  38. * ASSOCIATED FILES
  39. DEARC.PAS
  40. DEARCABT.PAS
  41. DEARCGLB.PAS
  42. DEARCIO.PAS
  43. DEARCLZW.PAS
  44. DEARCUNP.PAS
  45. DEARCUSQ.PAS
  46. DEARC.TXT
  47.  
  48. * CHECKED BY
  49. DRM 08/08/88
  50.  
  51. * KEYWORDS
  52. TURBO PASCAL V4.0
  53.  
  54. ==========================================================================
  55. }
  56. (**
  57.  *
  58.  *  Module:       dearcglb.pas
  59.  *  Description:  DEARC global variables and type definitions
  60.  *
  61.  *  Revision History:
  62.  *    7-26-88 : unitized for Turbo v4.0
  63.  *
  64. **)
  65.  
  66.  
  67. unit dearcglb;
  68.  
  69. interface
  70.  
  71. (*
  72.  *  constant definitions
  73.  *)
  74. const
  75.   BLOCKSIZE  = 512;             { I/O block size }
  76.   arcmarc    = 26;              { special archive marker }
  77.   arcver     = 9;               { max archive header version code }
  78.   strlen     = 100;             { standard string length }
  79.   fnlen      = 12;              { file name length - 1 }
  80.  
  81. const crctab : array [0..255] of word =
  82.   (
  83.     $0000, $C0C1, $C181, $0140, $C301, $03C0, $0280, $C241,
  84.     $C601, $06C0, $0780, $C741, $0500, $C5C1, $C481, $0440,
  85.     $CC01, $0CC0, $0D80, $CD41, $0F00, $CFC1, $CE81, $0E40,
  86.     $0A00, $CAC1, $CB81, $0B40, $C901, $09C0, $0880, $C841,
  87.     $D801, $18C0, $1980, $D941, $1B00, $DBC1, $DA81, $1A40,
  88.     $1E00, $DEC1, $DF81, $1F40, $DD01, $1DC0, $1C80, $DC41,
  89.     $1400, $D4C1, $D581, $1540, $D701, $17C0, $1680, $D641,
  90.     $D201, $12C0, $1380, $D341, $1100, $D1C1, $D081, $1040,
  91.     $F001, $30C0, $3180, $F141, $3300, $F3C1, $F281, $3240,
  92.     $3600, $F6C1, $F781, $3740, $F501, $35C0, $3480, $F441,
  93.     $3C00, $FCC1, $FD81, $3D40, $FF01, $3FC0, $3E80, $FE41,
  94.     $FA01, $3AC0, $3B80, $FB41, $3900, $F9C1, $F881, $3840,
  95.     $2800, $E8C1, $E981, $2940, $EB01, $2BC0, $2A80, $EA41,
  96.     $EE01, $2EC0, $2F80, $EF41, $2D00, $EDC1, $EC81, $2C40,
  97.     $E401, $24C0, $2580, $E541, $2700, $E7C1, $E681, $2640,
  98.     $2200, $E2C1, $E381, $2340, $E101, $21C0, $2080, $E041,
  99.     $A001, $60C0, $6180, $A141, $6300, $A3C1, $A281, $6240,
  100.     $6600, $A6C1, $A781, $6740, $A501, $65C0, $6480, $A441,
  101.     $6C00, $ACC1, $AD81, $6D40, $AF01, $6FC0, $6E80, $AE41,
  102.     $AA01, $6AC0, $6B80, $AB41, $6900, $A9C1, $A881, $6840,
  103.     $7800, $B8C1, $B981, $7940, $BB01, $7BC0, $7A80, $BA41,
  104.     $BE01, $7EC0, $7F80, $BF41, $7D00, $BDC1, $BC81, $7C40,
  105.     $B401, $74C0, $7580, $B541, $7700, $B7C1, $B681, $7640,
  106.     $7200, $B2C1, $B381, $7340, $B101, $71C0, $7080, $B041,
  107.     $5000, $90C1, $9181, $5140, $9301, $53C0, $5280, $9241,
  108.     $9601, $56C0, $5780, $9741, $5500, $95C1, $9481, $5440,
  109.     $9C01, $5CC0, $5D80, $9D41, $5F00, $9FC1, $9E81, $5E40,
  110.     $5A00, $9AC1, $9B81, $5B40, $9901, $59C0, $5880, $9841,
  111.     $8801, $48C0, $4980, $8941, $4B00, $8BC1, $8A81, $4A40,
  112.     $4E00, $8EC1, $8F81, $4F40, $8D01, $4DC0, $4C80, $8C41,
  113.     $4400, $84C1, $8581, $4540, $8701, $47C0, $4680, $8641,
  114.     $8201, $42C0, $4380, $8341, $4100, $81C1, $8081, $4040
  115.   );
  116.  
  117. type
  118.   strtype = string[strlen];
  119.   fntype  = array [0..fnlen] of char;
  120.   buftype = array [1..BLOCKSIZE] of byte;
  121.   heads   = record
  122.               name   : fntype;
  123.               size   : longint;
  124.               date   : word;
  125.               time   : word;
  126.               crc    : integer;
  127.               length : longint
  128.             end;
  129.  
  130. var
  131.     hdrver   : byte;
  132.     arcfile  : file;
  133.     arcbuf   : buftype;
  134.     arcptr   : integer;
  135.     arcname  : strtype;
  136.     endfile  : boolean;
  137.     extfile  : file;
  138.     extbuf   : buftype;
  139.     extptr   : integer;
  140.     extname  : strtype;
  141.     crcval   : integer;
  142.     size     : longint;
  143.     state    : (NOHIST, INREP);
  144.     firstch  : boolean;
  145.  
  146. implementation
  147.  
  148. end.
  149.  
  150.