home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / PIBCAT14.ZIP / PIBCAT.GLO < prev    next >
Encoding:
Text File  |  1988-04-28  |  5.3 KB  |  110 lines

  1. (*----------------------------------------------------------------------*)
  2. (*                   GLOBAL VARIABLE DEFINITIONS                        *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. USES                               (* DOS but not IBM PC specific *)
  6.    Dos;
  7.  
  8. TYPE
  9.  
  10.    AnyStr   = STRING[255]  (* Matches any string for parameter passing *);
  11.  
  12.    String2  = STRING[2]    (* Two character string *);
  13.  
  14.    String3  = STRING[3]    (* Three character string *);
  15.  
  16.    String8  = STRING[8]    (* Eight character string *);
  17.  
  18.    FileStr  = STRING[65]   (* File name string *);
  19.  
  20. (*----------------------------------------------------------------------*)
  21. (*                  Error types for .ARC and .LBR files                 *)
  22. (*----------------------------------------------------------------------*)
  23.  
  24. CONST
  25.    Open_Error    = 1               (* Error when opening file    *);
  26.    Format_Error  = 2               (* .ARC/.LBR format bad       *);
  27.    End_Of_File   = 3               (* End of .ARC/.LBR directory *);
  28.  
  29. (*----------------------------------------------------------------------*)
  30. (*                    Global program variables                          *)
  31. (*----------------------------------------------------------------------*)
  32.  
  33. CONST
  34.    FF_Char               : CHAR = ^L        (* Form feed character      *);
  35.  
  36. TYPE
  37.    Output_Buffer         = ARRAY[1..4096] OF CHAR;
  38.  
  39. VAR
  40.    Cat_Drive             : CHAR             (* Drive to catalog         *);
  41.    Output_File           : TEXT             (* File to receive output   *);
  42.    Output_File_Name      : AnyStr           (* Output file name         *);
  43.    Output_File_Buffer    : Output_Buffer    (* Output file buffer       *);
  44.    Do_Printer_Format     : BOOLEAN          (* Format for printer       *);
  45.    Left_Margin           : INTEGER          (* Left margin              *);
  46.    Page_Size             : INTEGER          (* Page size for output     *);
  47.    Expand_Arcs           : BOOLEAN          (* TRUE to expand .ARC/.LBR *);
  48.    Expand_Arcs_In        : BOOLEAN          (* TRUE to expand .ARC/.LBR *)
  49.                                             (* in main catalog list     *);
  50.    Left_Margin_String    : AnyStr           (* Blanks for left margin   *);
  51.    ArcLbr_Indent         : INTEGER          (* Indent for .ARC/.LBR     *);
  52.    User_Break            : BOOLEAN          (* TRUE if ^C stops liting  *);
  53.    Find_Spec             : AnyStr           (* File spec for listing    *);
  54.    Entry_Spec            : AnyStr           (* Entry spec for listing   *);
  55.    Entry_Name            : AnyStr           (* Name portion, entry spec *);
  56.    Entry_Ext             : AnyStr           (* Extension, entry spec    *);
  57.    Use_Entry_Spec        : BOOLEAN          (* TRUE to use entry spec   *);
  58.    Total_Files           : LONGINT          (* Total files found        *);
  59.    Total_Space           : LONGINT          (* Total space used         *);
  60.    Total_Entries         : LONGINT          (* Total entries found      *);
  61.    Total_ESpace          : LONGINT          (* Total space used, entries*);
  62.    Total_Dirs            : LONGINT          (* Total dirs scanned       *);
  63.    Page_Number           : INTEGER          (* Current page number      *);
  64.    Lines_Left            : INTEGER          (* Lines left on cur. page  *);
  65.    Help_Only             : BOOLEAN          (* TRUE if doing help only  *);
  66.  
  67. (*----------------------------------------------------------------------*)
  68. (*                  Titles and subtitles for paginated listings         *)
  69. (*----------------------------------------------------------------------*)
  70.  
  71. VAR
  72.    Volume_Title : AnyStr           (* Main title for entire listing *);
  73.    Subdir_Title : AnyStr           (* Current subdirectory title    *);
  74.    File_Title   : AnyStr           (* Current .ARC/.LBR file if any *);
  75.  
  76. (*----------------------------------------------------------------------*)
  77. (*                  Saved file names from nested directories            *)
  78. (*----------------------------------------------------------------------*)
  79.  
  80. CONST
  81.    MaxFiles              = 2048             (* Maximum files handled    *);
  82.  
  83. TYPE
  84.  
  85.    Short_Dir_Record = RECORD
  86.                          File_Attr : BYTE        (* File attributes *);
  87.                          File_Time : LONGINT     (* Creation time   *);
  88.                          File_Size : LONGINT     (* Size in bytes   *);
  89.                          File_Name : STRING[12]  (* File name       *);
  90.                       END;
  91.  
  92. VAR
  93.                                    (* List of files in current and all *)
  94.                                    (* previous directories along path  *)
  95.                                    (* back to root directory.          *)
  96.  
  97.    File_Stack : ARRAY[1..MaxFiles] OF Short_Dir_Record;
  98.  
  99.                                    (* # of files currently saved       *)
  100.    File_Count : INTEGER;
  101.  
  102. (*----------------------------------------------------------------------*)
  103. (*                  Names of the months for date conversions            *)
  104. (*----------------------------------------------------------------------*)
  105.  
  106. (* STRUCTURED *) CONST
  107.    Month_Names : ARRAY[1..12] OF STRING[3] =
  108.                  ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
  109.                   'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' );
  110.