home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / at-inc-bin.lha / os-include / exec / libraries.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  2KB  |  67 lines

  1. #ifndef    EXEC_LIBRARIES_H
  2. #define    EXEC_LIBRARIES_H
  3. /*
  4. **    $VER: libraries.h 39.2 (10.4.92)
  5. **    Includes Release 40.15
  6. **
  7. **    Definitions for use when creating or using Exec libraries
  8. **
  9. **    (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_NODES_H
  14. #include "exec/nodes.h"
  15. #endif /* EXEC_NODES_H */
  16.  
  17.  
  18. /*------ Special Constants ---------------------------------------*/
  19. #define LIB_VECTSIZE    6    /* Each library entry takes 6 bytes */
  20. #define LIB_RESERVED    4    /* Exec reserves the first 4 vectors */
  21. #define LIB_BASE    (-LIB_VECTSIZE)
  22. #define LIB_USERDEF    (LIB_BASE-(LIB_RESERVED*LIB_VECTSIZE))
  23. #define LIB_NONSTD    (LIB_USERDEF)
  24.  
  25. /*------ Standard Functions --------------------------------------*/
  26. #define LIB_OPEN    (-6)
  27. #define LIB_CLOSE    (-12)
  28. #define LIB_EXPUNGE    (-18)
  29. #define LIB_EXTFUNC    (-24)    /* for future expansion */
  30.  
  31.  
  32. /*------ Library Base Structure ----------------------------------*/
  33. /* Also used for Devices and some Resources */
  34. struct Library {
  35.     struct  Node lib_Node;
  36.     UBYTE   lib_Flags;
  37.     UBYTE   lib_pad;
  38.     UWORD   lib_NegSize;        /* number of bytes before library */
  39.     UWORD   lib_PosSize;        /* number of bytes after library */
  40.     UWORD   lib_Version;        /* major */
  41.     UWORD   lib_Revision;        /* minor */
  42.     APTR    lib_IdString;        /* ASCII identification */
  43.     ULONG   lib_Sum;            /* the checksum itself */
  44.     UWORD   lib_OpenCnt;        /* number of current opens */
  45. };    /* Warning: size is not a longword multiple! */
  46.  
  47. /* lib_Flags bit definitions (all others are system reserved) */
  48. #define LIBF_SUMMING    (1<<0)        /* we are currently checksumming */
  49. #define LIBF_CHANGED    (1<<1)        /* we have just changed the lib */
  50. #define LIBF_SUMUSED    (1<<2)        /* set if we should bother to sum */
  51. #define LIBF_DELEXP    (1<<3)        /* delayed expunge */
  52.  
  53.  
  54. /* Temporary Compatibility */
  55. #define lh_Node    lib_Node
  56. #define lh_Flags    lib_Flags
  57. #define lh_pad        lib_pad
  58. #define lh_NegSize    lib_NegSize
  59. #define lh_PosSize    lib_PosSize
  60. #define lh_Version    lib_Version
  61. #define lh_Revision    lib_Revision
  62. #define lh_IdString    lib_IdString
  63. #define lh_Sum        lib_Sum
  64. #define lh_OpenCnt    lib_OpenCnt
  65.  
  66. #endif    /* EXEC_LIBRARIES_H */
  67.