home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DC-POS24.LZX / pOS / Guide.lzx / Guide / pExec / Library.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-11  |  6.0 KB  |  149 lines

  1. @DATABASE "pExec/Library.h"
  2. @MASTER   "Work2:AD/IInc/pExec/Library.h"
  3. @REMARK   This file was created by ADtoHT 2.0 on 11-Mär-97  13:34:25
  4. @REMARK   Do not edit
  5. @REMARK   ADtoHT is © 1993-1995 Christian Stieber
  6.  
  7. @NODE MAIN "pExec/Library.h"
  8. @TOC "__pOS_Dev.guide/MAIN"
  9.  
  10. @{"pExec/Library.h" LINK File}
  11.  
  12.  
  13. @{b}Structures@{ub}
  14.  
  15. @{"pOS_Library" LINK "pExec/Library.h/File" 26}             @{"pOS_LibraryFunction" LINK "pExec/Library.h/File" 17}  @{"pOS_ResidentLibInit" LINK "pExec/Library.h/File" 95}
  16. @{"pOS_StdLibraryFunction" LINK "pExec/Library.h/File" 64}  
  17.  
  18.  
  19. @{b}#defines@{ub}
  20.  
  21. @{"_pOS_FreeLibraryMem()" LINK "pExec/Library.h/File" 115}  @{"_pOS_FreeLibraryMem2()" LINK "pExec/Library.h/File" 118}        @{"_pOS_GetLibraryFunction()" LINK "pExec/Library.h/File" 80}
  22. @{"_pOS_GetStdLibFunc()" LINK "pExec/Library.h/File" 83}   @{"_pOS_GetStdLibraryFunction()" LINK "pExec/Library.h/File" 77}  
  23.  
  24. @ENDNODE
  25. @NODE File "pExec/Library.h"
  26. #ifndef __INC_POS_PEXEC_LIBRARY_H
  27. #define __INC_POS_PEXEC_LIBRARY_H
  28. /*******************************************************************
  29.  Includes Release 24
  30.  (C) Copyright 1995-1997 proDAD
  31.      All Rights Reserved
  32.  
  33.  $AUT Holger Burkarth
  34.  $DAT >>Library.h<<   05 Aug 1996    12:43:07 - (C) ProDAD
  35. *******************************************************************/
  36. #ifndef __INC_POS_PEXEC_LIST_H
  37. #include <@{"pExec/List.h" LINK "pExec/List.h/File"}>
  38. #endif
  39.  
  40. /*----------------------------------
  41. -----------------------------------*/
  42. struct pOS_LibraryFunction
  43. {
  44.   @{"ULONG" LINK "pExec/Types.h/File" 91} (*func)(@{"_R_LB" LINK "pExec/Types.h/File" 35} @{"struct pOS_Library" LINK File 26}*,...);
  45.   @{"UBYTE" LINK "pExec/Types.h/File" 95} _d[8];
  46. };
  47.  
  48.  
  49. /*----------------------------------
  50. -----------------------------------*/
  51. struct pOS_Library
  52. {
  53.   @{"struct pOS_ExNode" LINK "pExec/List.h/File" 37}         lib_Node;
  54.   @{"ULONG" LINK "pExec/Types.h/File" 91}                     lib_Flags;       /* (enum pOS_LibraryFlags) */
  55.   @{"UWORD" LINK "pExec/Types.h/File" 93}                     lib_NegSize;     /* number of bytes before library */
  56.   @{"UWORD" LINK "pExec/Types.h/File" 93}                     lib_PosSize;     /* number of bytes after library */
  57.   @{"UWORD" LINK "pExec/Types.h/File" 93}                     lib_Version;     /* major */
  58.   @{"UWORD" LINK "pExec/Types.h/File" 93}                     lib_Revision;    /* minor */
  59.   const @{"CHAR" LINK "pExec/Types.h/File" 100}               *lib_IdString;    /* ASCII Identification */
  60.   const @{"struct pOS_TagItem" LINK "pUtil/TagItem.h/File" 19} *lib_Describe;    /*  */
  61.   @{"ULONG" LINK "pExec/Types.h/File" 91}                     lib_Sum;         /* the Checksum itself */
  62.   @{"UWORD" LINK "pExec/Types.h/File" 93}                     lib_OpenCnt;     /* number of current opens */
  63.   @{"struct pOS_SegmentLst" LINK "pDOS/Segment.h/File" 32}    *lib_Segm;
  64.   @{"UWORD" LINK "pExec/Types.h/File" 93}                     lib_pad1;
  65. };
  66.  
  67.  
  68.  
  69. enum pOS_LibraryFlags
  70. {
  71.   LIBF_SUMMING =0x01, /* we are currently checksumming */
  72.   LIBF_CHANGED =0x02, /* we have just changed the lib */
  73.   LIBF_SUMUSED =0x04, /* set if we should bother to sum */
  74.   LIBF_DELEXP  =0x08, /* delayed expunge */
  75.  
  76.   LIBF_ROM     =0x20, /* Lib is RomLib */
  77. /** 0x80 => reserved in resident **/
  78.  
  79.   LIBF_Unique    =0x1000, /* Lib wird geklont, kein Multi-Open erlaubt */
  80.   LIBF_DevAsLib  =0x2000, /* Device kann als Library geöffnet werden */
  81. };
  82.  
  83.  
  84.  
  85. /*----------------------------------
  86.  Rückwärtsgerichtete Struktur, LibBase
  87.  steht auf das Ende der Struct.
  88. -----------------------------------*/
  89. struct pOS_StdLibraryFunction
  90. {
  91.   @{"struct pOS_LibraryFunction" LINK File 17} Reserved[8];
  92.  
  93.   @{"struct pOS_SegmentLst" LINK "pDOS/Segment.h/File" 32}* (*Expunge_func)(@{"_R_LB" LINK "pExec/Types.h/File" 35} @{"struct pOS_Library" LINK File 26}*);
  94.   @{"UBYTE" LINK "pExec/Types.h/File" 95} _d3[8];
  95.   @{"VOID" LINK "pExec/Types.h/File" 83}  (*Close_func)(@{"_R_LB" LINK "pExec/Types.h/File" 35} @{"struct pOS_Library" LINK File 26}*);
  96.   @{"UBYTE" LINK "pExec/Types.h/File" 95} _d2[8];
  97.   @{"BOOL" LINK "pExec/Types.h/File" 99}  (*Open_func)(@{"_R_LB" LINK "pExec/Types.h/File" 35} @{"struct pOS_Library" LINK File 26}*);
  98.   @{"UBYTE" LINK "pExec/Types.h/File" 95} _d1[8];
  99. }; /* => LibBase */
  100.  
  101.  
  102. #define _pOS_GetStdLibraryFunction(lib) \\
  103.  ( (@{"struct pOS_StdLibraryFunction" LINK File 64}*)((@{"ULONG" LINK "pExec/Types.h/File" 91})(lib) - sizeof(@{"struct pOS_StdLibraryFunction" LINK File 64})) )
  104.  
  105. #define _pOS_GetLibraryFunction(lib,index) \\
  106.  ( (@{"struct pOS_LibraryFunction" LINK File 17}*)((@{"ULONG" LINK "pExec/Types.h/File" 91})(lib) - (index)*sizeof(@{"struct pOS_LibraryFunction" LINK File 17})) )
  107.  
  108. #define _pOS_GetStdLibFunc(type,lib) \\
  109.  ( (type*)((@{"ULONG" LINK "pExec/Types.h/File" 91})(lib) - sizeof(type)) )
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118. /*----------------------------------
  119. -----------------------------------*/
  120. struct pOS_ResidentLibInit
  121. {
  122.             @{"size_t" LINK "pExec/Types.h/File" 113}  lit_DataSize;         /* library data space size */
  123.   @{"__CONST__" LINK "pExec/Types.h/File" 120} @{"ULONG" LINK "pExec/Types.h/File" 91} **lit_FuncTable;        /* table of entry points   */
  124.             @{"VOID" LINK "pExec/Types.h/File" 83}   *lit_DataInit;         /* table of data initializers */
  125.             @{"BOOL" LINK "pExec/Types.h/File" 99}  (*lit_InitFunc)(@{"_R_LB" LINK "pExec/Types.h/File" 35} struct pOS_ExecBase*,_R_A0 struct pOS_Library*); /* initialization function to run */
  126.   @{"UBYTE" LINK "pExec/Types.h/File" 95} lit_Reserved[8];
  127. };
  128.  
  129.  
  130.  
  131. enum pOS_LibraryFuncID
  132. {
  133.   LIBFUNCID_Base    = 0xffffff00, /** z.B.  (@{"ULONG" LINK "pExec/Types.h/File" 91}*)(LIBFUNCID_Base | LIBFUNCID_Reverse) **/
  134.   LIBFUNCID_Reverse = 0x80,
  135. };
  136.  
  137.  
  138. /*********************************/
  139.  
  140. #define _pOS_FreeLibraryMem(exec,lib) \\
  141.  pOS_FreeMem(exec,(@{"APTR" LINK "pExec/Types.h/File" 87})((@{"ULONG" LINK "pExec/Types.h/File" 91})(lib)-(lib)->lib_NegSize),(lib)->lib_NegSize+(lib)->lib_PosSize);
  142.  
  143. #define _pOS_FreeLibraryMem2(lib) \\
  144.  pOS_FreeMem((@{"APTR" LINK "pExec/Types.h/File" 87})((@{"ULONG" LINK "pExec/Types.h/File" 91})(lib)-(lib)->lib_NegSize),(lib)->lib_NegSize+(lib)->lib_PosSize);
  145.  
  146.  
  147. #endif
  148. @ENDNODE
  149.