home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Programmieren / Kurztests / PascalPCQ / Include / Exec / Libraries.i < prev    next >
Text File  |  1990-08-28  |  2KB  |  71 lines

  1. {
  2.     Libraries.i for PCQ Pascal
  3.  
  4.     This file defines the library structure, plus all the constants
  5.     and routines used for libraries.
  6. }
  7.  
  8. {$I "Include:Exec/Nodes.i"}
  9.  
  10. const
  11.     LIB_VECTSIZE    = 6;
  12.     LIB_RESERVED    = 4;
  13.     LIB_BASE        = -LIB_VECTSIZE;
  14.     LIB_USERDEF        = LIB_BASE - (LIB_RESERVED * LIB_VECTSIZE);
  15.     LIB_NONSTD        = LIB_USERDEF;
  16.  
  17.     LIB_OPEN        = -6;
  18.     LIB_CLOSE        = -12;
  19.     LIB_EXPUNGE        = -18;
  20.     LIB_EXTFUNC        = -24;
  21.  
  22. type
  23.     Library = Record
  24.     lib_Node    : Node;
  25.     lib_Flags    : Byte;
  26.     lib_Pad        : Byte;
  27.     lib_NegSize    : Short;    { Number of bytes before library }
  28.     lib_PosSize    : Short;    { Number of bytes after library }
  29.     lib_Version    : Short;
  30.     lib_Revision    : Short;
  31.     lib_IDString    : String;
  32.     lib_Sum        : Integer;    { Library checksum }
  33.     lib_OpenCnt    : Short;    { Current clients }
  34.     end;
  35.     LibraryPtr = ^Library;
  36.  
  37. const
  38.     LIBF_SUMMING    = 1;    { Library is checksumming }
  39.     LIBF_CHANGED    = 2;    { Lib has been changed }
  40.     LIBF_SUMUSED    = 4;    { Should use checksum }
  41.     LIBF_DELEXP        = 8;    { Delayed expunge }
  42.  
  43. Procedure AddLibrary(lib : LibraryPtr);
  44.     External;
  45.  
  46. Procedure CloseLibrary(lib : LibraryPtr);
  47.     External;
  48.  
  49. Function MakeFunctions(target, functionarray, dispbase : Address) : Integer;
  50.     External;
  51.  
  52. Function MakeLibrary(vec, struct, init : Address;
  53.             dSize : Integer;
  54.             segList : Address) : LibraryPtr;
  55.     External;
  56.  
  57. Function OpenLibrary(libName : String; version : Integer) : LibraryPtr;
  58.     External;
  59.  
  60. Procedure RemLibrary(library : LibraryPtr);
  61.     External;
  62.  
  63. Function SetFunction(library : LibraryPtr;
  64.             funcOff : Integer;
  65.             funcEntry : Address) : Address;
  66.     External;
  67.  
  68. Procedure SumLibrary(library : LibraryPtr);
  69.     External;
  70.  
  71.