home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROS_m68k_bin.lha / AROS / include / defines / utility.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-08  |  8.1 KB  |  240 lines

  1. #ifndef DEFINES_UTILITY_H
  2. #define DEFINES_UTILITY_H
  3.  
  4. #ifndef  EXEC_TYPES_H
  5. #   include <exec/types.h>
  6. #endif
  7. #ifndef AROS_LIBCALL_H
  8. #   include <aros/libcall.h>
  9. #endif
  10.  
  11. /*
  12.     Defines
  13. */
  14. #define AddNamedObject(nameSpace, object) \
  15.     AROS_LC2(BOOL, AddNamedObject, \
  16.     AROS_LCA(struct NamedObject *, nameSpace, A0), \
  17.     AROS_LCA(struct NamedObject *, object, A1), \
  18.     struct UtilityBase *, UtilityBase, 37, Utility)
  19.  
  20. #define AllocateTagItems(numTags) \
  21.     AROS_LC1(struct TagItem *, AllocateTagItems, \
  22.     AROS_LCA(ULONG, numTags, D0), \
  23.     struct UtilityBase *, UtilityBase, 11, Utility)
  24.  
  25. #define AllocNamedObjectA(name, tagList) \
  26.     AROS_LC2(struct NamedObject *, AllocNamedObjectA, \
  27.     AROS_LCA(STRPTR          , name, A0), \
  28.     AROS_LCA(struct TagItem *, tagList, A1), \
  29.     struct UtilityBase *, UtilityBase, 38, Utility)
  30.  
  31. #define Amiga2Date(seconds, result) \
  32.     AROS_LC2(void, Amiga2Date, \
  33.     AROS_LCA(ULONG             , seconds, D0), \
  34.     AROS_LCA(struct ClockData *, result, A0), \
  35.     struct Library *, UtilityBase, 20, Utility)
  36.  
  37. #define ApplyTagChanges(list, changelist) \
  38.     AROS_LC2(void, ApplyTagChanges, \
  39.     AROS_LCA(struct TagItem *, list,       A0), \
  40.     AROS_LCA(struct TagItem *, changelist, A1), \
  41.     struct UtilityBase *, UtilityBase, 31, Utility)
  42.  
  43. #define AttemptRemNamedObject(object) \
  44.     AROS_LC1(LONG, AttemptRemNamedObject, \
  45.     AROS_LCA(struct NamedObject *, object, A0), \
  46.     struct Library *, UtilityBase, 39, Utility)
  47.  
  48. #define CallHookPkt(hook, object, paramPacket) \
  49.     AROS_LC3(ULONG, CallHookPkt, \
  50.     AROS_LCA(struct Hook *, hook, A0), \
  51.     AROS_LCA(APTR         , object, A2), \
  52.     AROS_LCA(APTR         , paramPacket, A1), \
  53.     struct Library *, UtilityBase, 17, Utility)
  54.  
  55. #define CheckDate(date) \
  56.     AROS_LC1(ULONG, CheckDate, \
  57.     AROS_LCA(struct ClockData *, date, A0), \
  58.     struct Library *, UtilityBase, 22, Utility)
  59.  
  60. #define CloneTagItems(tagList) \
  61.     AROS_LC1(struct TagItem *, CloneTagItems, \
  62.     AROS_LCA(struct TagItem *, tagList, A0), \
  63.     struct UtilityBase *, UtilityBase, 12, Utility)
  64.  
  65. #define Date2Amiga(date) \
  66.     AROS_LC1(ULONG, Date2Amiga, \
  67.     AROS_LCA(struct ClockData *, date, A0), \
  68.     struct UtilityBase *, UtilityBase, 21, Utility)
  69.  
  70. #define FilterTagChanges(changeList, originalList, apply) \
  71.     AROS_LC3(void, FilterTagChanges, \
  72.     AROS_LCA(struct TagItem *, changeList, A0), \
  73.     AROS_LCA(struct TagItem *, originalList, A1), \
  74.     AROS_LCA(BOOL            , apply, D0), \
  75.     struct Library *, UtilityBase, 9, Utility)
  76.  
  77. #define FilterTagItems(tagList, filterArray, logic) \
  78.     AROS_LC3(ULONG, FilterTagItems, \
  79.     AROS_LCA(struct TagItem *, tagList, A0), \
  80.     AROS_LCA(Tag            *, filterArray, A1), \
  81.     AROS_LCA(ULONG           , logic, D0), \
  82.     struct Library *, UtilityBase, 16, Utility)
  83.  
  84. #define FindNamedObject(nameSpace, name, lastObject) \
  85.     AROS_LC3(struct NamedObject *, FindNamedObject, \
  86.     AROS_LCA(struct NamedObject *, nameSpace, A0), \
  87.     AROS_LCA(STRPTR              , name, A1), \
  88.     AROS_LCA(struct NamedObject *, lastObject, A2), \
  89.     struct UtilityBase *, UtilityBase, 40, Utility)
  90.  
  91. #define FindTagItem(tagValue, tagList) \
  92.     AROS_LC2(struct TagItem *, FindTagItem, \
  93.     AROS_LCA(Tag,              tagValue, D0), \
  94.     AROS_LCA(struct TagItem *, tagList,  A0), \
  95.     struct UtilityBase *, UtilityBase, 5, Utility)
  96.  
  97. #define FreeNamedObject(object) \
  98.     AROS_LC1(void, FreeNamedObject, \
  99.     AROS_LCA(struct NamedObject *, object, A0), \
  100.     struct UtilityBase *, UtilityBase, 41, Utility)
  101.  
  102. #define FreeTagItems(tagList) \
  103.     AROS_LC1(void, FreeTagItems, \
  104.     AROS_LCA(struct TagItem *, tagList, A0), \
  105.     struct UtilityBase *, UtilityBase, 13, Utility)
  106.  
  107. #define GetTagData(tagValue, defaultVal, tagList) \
  108.     AROS_LC3(ULONG, GetTagData, \
  109.     AROS_LCA(Tag             , tagValue, D0), \
  110.     AROS_LCA(ULONG           , defaultVal, D1), \
  111.     AROS_LCA(struct TagItem *, tagList, A0), \
  112.     struct UtilityBase *, UtilityBase, 6, Utility)
  113.  
  114. #define GetUniqueID() \
  115.     AROS_LC0(ULONG, GetUniqueID, \
  116.     struct UtilityBase *, UtilityBase, 45, Utility)
  117.  
  118. #define MapTags(tagList, mapList, mapType) \
  119.     AROS_LC3(void, MapTags, \
  120.     AROS_LCA(struct TagItem *, tagList, A0), \
  121.     AROS_LCA(struct TagItem *, mapList, A1), \
  122.     AROS_LCA(ULONG           , mapType, D0), \
  123.     struct Library *, UtilityBase, 10, Utility)
  124.  
  125. #define NamedObjectName(object) \
  126.     AROS_LC1(STRPTR, NamedObjectName, \
  127.     AROS_LCA(struct NamedObject *, object, A0), \
  128.     struct UtilityBase *, UtilityBase, 42, Utility)
  129.  
  130. #define NextTagItem(tagListPtr) \
  131.     AROS_LC1(struct TagItem *, NextTagItem, \
  132.     AROS_LCA(struct TagItem **, tagListPtr, A0), \
  133.     struct Library *, UtilityBase, 8, Utility)
  134.  
  135. #define PackBoolTags(initialFlags, tagList, boolMap) \
  136.     AROS_LC3(ULONG, PackBoolTags, \
  137.     AROS_LCA(ULONG           , initialFlags, D0), \
  138.     AROS_LCA(struct TagItem *, tagList, A0), \
  139.     AROS_LCA(struct TagItem *, boolMap, A1), \
  140.     struct UtilityBase *, UtilityBase, 7, Utility)
  141.  
  142. #define PackStructureTags(pack, packTable, tagList) \
  143.     AROS_LC3(ULONG, PackStructureTags, \
  144.     AROS_LCA(APTR            , pack, A0), \
  145.     AROS_LCA(ULONG          *, packTable, A1), \
  146.     AROS_LCA(struct TagItem *, tagList, A2), \
  147.     struct Library *, UtilityBase, 35, Utility)
  148.  
  149. #define RefreshTagItemClones(clone, original) \
  150.     AROS_LC2(void, RefreshTagItemClones, \
  151.     AROS_LCA(struct TagItem *, clone, A0), \
  152.     AROS_LCA(struct TagItem *, original, A1), \
  153.     struct UtilityBase *, UtilityBase, 14, Utility)
  154.  
  155. #define ReleaseNamedObject(object) \
  156.     AROS_LC1(void, ReleaseNamedObject, \
  157.     AROS_LCA(struct NamedObject *, object, A0), \
  158.     struct UtilityBase *, UtilityBase, 43, Utility)
  159.  
  160. #define RemNamedObject(object, message) \
  161.     AROS_LC2(void, RemNamedObject, \
  162.     AROS_LCA(struct NamedObject *, object, A0), \
  163.     AROS_LCA(struct Message     *, message, A1), \
  164.     struct UtilityBase *, UtilityBase, 44, Utility)
  165.  
  166. #define SDivMod32(dividend, divisor) \
  167.     AROS_LC2(QUAD, SDivMod32, \
  168.     AROS_LCA(LONG, dividend, D0), \
  169.     AROS_LCA(LONG, divisor, D1), \
  170.     struct UtilityBase *, UtilityBase, 25, Utility)
  171.  
  172. #define SMult32(arg1, arg2) \
  173.     AROS_LC2(LONG, SMult32, \
  174.     AROS_LCA(LONG, arg1, D0), \
  175.     AROS_LCA(LONG, arg2, D1), \
  176.     struct UtilityBase *, UtilityBase, 23, Utility)
  177.  
  178. #define SMult64(arg1, arg2) \
  179.     AROS_LC2(QUAD, SMult64, \
  180.     AROS_LCA(LONG, arg1, D0), \
  181.     AROS_LCA(LONG, arg2, D1), \
  182.     struct UtilityBase *, UtilityBase, 33, Utility)
  183.  
  184. #define Stricmp(string1, string2) \
  185.     AROS_LC2(LONG, Stricmp, \
  186.     AROS_LCA(STRPTR, string1, A0), \
  187.     AROS_LCA(STRPTR, string2, A1), \
  188.     struct UtilityBase *, UtilityBase, 27, Utility)
  189.  
  190. #define Strnicmp(string1, string2, length) \
  191.     AROS_LC3(LONG, Strnicmp, \
  192.     AROS_LCA(STRPTR, string1, A0), \
  193.     AROS_LCA(STRPTR, string2, A1), \
  194.     AROS_LCA(LONG,   length,  D0), \
  195.     struct UtilityBase *, UtilityBase, 28, Utility)
  196.  
  197. #define TagInArray(tagValue, tagArray) \
  198.     AROS_LC2(BOOL, TagInArray, \
  199.     AROS_LCA(Tag  , tagValue, D0), \
  200.     AROS_LCA(Tag *, tagArray, A0), \
  201.     struct UtilityBase *, UtilityBase, 15, Utility)
  202.  
  203. #define ToLower(character) \
  204.     AROS_LC1I(UBYTE, ToLower, \
  205.     AROS_LCA(ULONG, character, D0), \
  206.     struct UtilityBase *, UtilityBase, 30, Utility)
  207.  
  208. #define ToUpper(character) \
  209.     AROS_LC1I(UBYTE, ToUpper, \
  210.     AROS_LCA(ULONG, character, D0), \
  211.     struct UtilityBase *, UtilityBase, 29, Utility)
  212.  
  213. #define UDivMod32(dividend, divisor) \
  214.     AROS_LC2(ULONG, UDivMod32, \
  215.     AROS_LCA(ULONG, dividend, D0), \
  216.     AROS_LCA(ULONG, divisor, D1), \
  217.     struct Library *, UtilityBase, 26, Utility)
  218.  
  219. #define UMult32(arg1, arg2) \
  220.     AROS_LC2(ULONG, UMult32, \
  221.     AROS_LCA(ULONG        , arg1, D0), \
  222.     AROS_LCA(ULONG        , arg2, D1), \
  223.     struct UtilityBase *, UtilityBase, 24, Utility)
  224.  
  225. #define UMult64(arg1, arg2) \
  226.     AROS_LC2(UQUAD, UMult64, \
  227.     AROS_LCA(ULONG, arg1, D0), \
  228.     AROS_LCA(ULONG, arg2, D1), \
  229.     struct UtilityBase *, UtilityBase, 34, Utility)
  230.  
  231. #define UnpackStructureTags(pack, packTable, tagList) \
  232.     AROS_LC3(ULONG, UnpackStructureTags, \
  233.     AROS_LCA(APTR            , pack, A0), \
  234.     AROS_LCA(ULONG          *, packTable, A1), \
  235.     AROS_LCA(struct TagItem *, tagList, A2), \
  236.     struct Library *, UtilityBase, 36, Utility)
  237.  
  238.  
  239. #endif /* DEFINES_UTILITY_H */
  240.