home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Emulatory / AROS / include / clib / utility_protos.h < prev   
Encoding:
C/C++ Source or Header  |  1978-03-06  |  8.2 KB  |  235 lines

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