home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / PASCAL / TBTREE16.ZIP / FILEDECS.PAS < prev    next >
Pascal/Delphi Source File  |  1989-07-13  |  5KB  |  110 lines

  1. (* TBTree16             Copyright (c)  1988,1989       Dean H. Farwell II    *)
  2.  
  3. unit FileDecs;
  4.  
  5. (*****************************************************************************)
  6. (*                                                                           *)
  7. (*                     F I L E   D E C L A R A T I O N S                     *)
  8. (*                                                                           *)
  9. (*****************************************************************************)
  10.  
  11.  
  12. (* This unit is required because these declarations are needed by both
  13.    the Files unit and the Page unit.  They logically belong in the File unit
  14.    but putting them there means that the File unit can not depend on the
  15.    Page unit which it does.  In other words, separately declaring this
  16.    info alleviates the recursive unit dependency problem which would occur.  *)
  17.  
  18. (* Version Information
  19.  
  20.    Version 1.1 - No Changes
  21.  
  22.    Version 1.2 - No Changes
  23.  
  24.    Version 1.3 - No Changes
  25.  
  26.    Version 1.4 - Added CURRENTVERSION string constant
  27.  
  28.                - Added PathString type
  29.  
  30.                - Added VersionString type
  31.  
  32.                - Deleted BITMAP and LLIST from FileTypes type
  33.                  LLIST files are still created, but a file type designator is
  34.                  not needed.
  35.  
  36.                - Changed definition for RecordNumber type to reflect actual
  37.                  legal values for record numbers.  -1 is no longer a legal
  38.                  value.  It was intended as use as an error flag, but is
  39.                  not being used as such in TBTREE.
  40.  
  41.                - Added UserDataArray type
  42.  
  43.    Version 1.5 - No Changes
  44.  
  45.    Version 1.6 - Added VLRDATA to the FileTypes enumerated type              *)
  46.  
  47. (*\*)
  48. (*////////////////////////// I N T E R F A C E //////////////////////////////*)
  49.  
  50. interface
  51.  
  52. const
  53.     FNSIZE = 80;                (* Max number of characters in a file name.
  54.                                    80 characters is used since a file name
  55.                                    may consist of a drive specifier and/or
  56.                                    directory info along with the actual
  57.                                    name
  58.  
  59.                                    for example -
  60.                                               A:\mydir\thisdir\xxxxxxxx.yyy  *)
  61.  
  62.  
  63.     RNSIZE = 4;                 (* bytes required to store a record number *)
  64.  
  65.     CURRENTVERSION = 'VER1.6';
  66.  
  67. type
  68.     FileTypes = (INDEX,DATA,VLRDATA);  (* file types of interest to the user *)
  69.  
  70.     FnString = String[FnSize];      (* See FNSIZE definition above for an
  71.                                        example of a file name                *)
  72.  
  73.     PathString = FnString;          (* This type is added to enhance future
  74.                                        products.  It is used to hold the
  75.                                        path.  The path can include the
  76.                                        drive designator and the directory
  77.                                        path.  It can used to hold path info
  78.                                        in any application.  Since this has
  79.                                        the FnString as the base type,
  80.                                        entire file names can be created by
  81.                                        concatenating the path with the file
  82.                                        name.  This may or may not be useful
  83.                                        in user applications.  It really
  84.                                        just makes code easier to read if
  85.                                        this type is used for path info and
  86.                                        FnString is used for file names
  87.                                        (with or without path)                *)
  88.  
  89.     VersionString = String[6];      (* Used to store version information in
  90.                                        the parameter records for the different
  91.                                        file types.                           *)
  92.  
  93.     RecordNumber = 0 .. MAXLONGINT;               (* range of record numbers *)
  94.  
  95.     PrNumber = RecordNumber;   (* Physical Record Number within a file       *)
  96.     LrNumber = RecordNumber;   (* Logical Record Number within a file        *)
  97.                                (* For both of the above type definitions     *)
  98.  
  99.     UserDataArray  = Array [0 .. 255] of Byte;  (* used to store user data
  100.                                                    in parameter records      *)
  101.  
  102. (*!*)
  103. (*\*)
  104. (*///////////////////// I M P L E M E N T A T I O N /////////////////////////*)
  105.  
  106. implementation
  107.  
  108.  
  109. end.                                                 (* end of FileDecs unit *)
  110.