home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / OTL-MC6.DMS / in.adf / incl.lha / INCLUDE / clib / utility_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-29  |  3.9 KB  |  131 lines

  1. #ifndef  CLIB_UTILITY_PROTOS_H
  2. #define  CLIB_UTILITY_PROTOS_H
  3.  
  4. /*
  5. **    $VER: utility_protos.h 39.12 (10.2.93)
  6. **    Includes Release 40.15
  7. **
  8. **    C prototypes. For use with 32 bit integers only.
  9. **
  10. **    (C) Copyright 1990-1993 Commodore-Amiga, Inc.
  11. **        All Rights Reserved
  12. */
  13.  
  14. #ifndef  EXEC_TYPES_H
  15. #include <exec/types.h>
  16. #endif
  17. #ifndef  EXEC_PORTS_H
  18. #include <exec/ports.h>
  19. #endif
  20. #ifndef  UTILITY_TAGITEM_H
  21. #include <utility/tagitem.h>
  22. #endif
  23. #ifndef  UTILITY_DATE_H
  24. #include <utility/date.h>
  25. #endif
  26. #ifndef  UTILITY_HOOKS_H
  27. #include <utility/hooks.h>
  28. #endif
  29. #ifndef  UTILITY_NAME_H
  30. #include <utility/name.h>
  31. #endif
  32.  
  33. #ifdef __cplusplus
  34. #define CLIBCPLUSON
  35. #pragma -
  36. #endif
  37.  
  38. /*--- functions in V36 or higher (Release 2.0) ---*/
  39.  
  40. /* Tag item functions */
  41.  
  42. struct TagItem *FindTagItem( Tag tagVal, struct TagItem *tagList );
  43. ULONG GetTagData( Tag tagValue, unsigned long defaultVal,
  44.     struct TagItem *tagList );
  45. ULONG PackBoolTags( unsigned long initialFlags, struct TagItem *tagList,
  46.     struct TagItem *boolMap );
  47. struct TagItem *NextTagItem( struct TagItem **tagListPtr );
  48. void FilterTagChanges( struct TagItem *changeList,
  49.     struct TagItem *originalList, unsigned long apply );
  50. void MapTags( struct TagItem *tagList, struct TagItem *mapList,
  51.     unsigned long mapType );
  52. struct TagItem *AllocateTagItems( unsigned long numTags );
  53. struct TagItem *CloneTagItems( struct TagItem *tagList );
  54. void FreeTagItems( struct TagItem *tagList );
  55. void RefreshTagItemClones( struct TagItem *clone, struct TagItem *original );
  56. BOOL TagInArray( Tag tagValue, Tag *tagArray );
  57. ULONG FilterTagItems( struct TagItem *tagList, Tag *filterArray,
  58.     unsigned long logic );
  59.  
  60. /* Hook functions */
  61.  
  62. ULONG CallHookPkt( struct Hook *hook, APTR object, APTR paramPacket );
  63.  
  64. /* Date functions */
  65.  
  66. void Amiga2Date( unsigned long seconds, struct ClockData *result );
  67. ULONG Date2Amiga( struct ClockData *date );
  68. ULONG CheckDate( struct ClockData *date );
  69.  
  70. /* 32 bit integer muliply functions */
  71.  
  72. LONG SMult32( long arg1, long arg2 );
  73. ULONG UMult32( unsigned long arg1, unsigned long arg2 );
  74.  
  75. /* 32 bit integer division funtions. The quotient and the remainder are */
  76. /* returned respectively in d0 and d1 */
  77.  
  78. LONG SDivMod32( long dividend, long divisor );
  79. ULONG UDivMod32( unsigned long dividend, unsigned long divisor );
  80. /*--- functions in V37 or higher (Release 2.04) ---*/
  81.  
  82. /* International string routines */
  83.  
  84. LONG Stricmp( STRPTR string1, STRPTR string2 );
  85. LONG Strnicmp( STRPTR string1, STRPTR string2, long length );
  86. UBYTE ToUpper( unsigned long character );
  87. UBYTE ToLower( unsigned long character );
  88. /*--- functions in V39 or higher (Release 3) ---*/
  89.  
  90. /* More tag Item functions */
  91.  
  92. void ApplyTagChanges( struct TagItem *list, struct TagItem *changeList );
  93.  
  94. /* 64 bit integer muliply functions. The results are 64 bit quantities */
  95. /* returned in D0 and D1 */
  96.  
  97. LONG SMult64( long arg1, long arg2 );
  98. ULONG UMult64( unsigned long arg1, unsigned long arg2 );
  99.  
  100. /* Structure to Tag and Tag to Structure support routines */
  101.  
  102. ULONG PackStructureTags( APTR pack, ULONG *packTable,
  103.     struct TagItem *tagList );
  104. ULONG UnpackStructureTags( APTR pack, ULONG *packTable,
  105.     struct TagItem *tagList );
  106.  
  107. /* New, object-oriented NameSpaces */
  108.  
  109. BOOL AddNamedObject( struct NamedObject *nameSpace,
  110.     struct NamedObject *object );
  111. struct NamedObject *AllocNamedObjectA( STRPTR name, struct TagItem *tagList );
  112. struct NamedObject *AllocNamedObject( STRPTR name, Tag tag1, ... );
  113. LONG AttemptRemNamedObject( struct NamedObject *object );
  114. struct NamedObject *FindNamedObject( struct NamedObject *nameSpace,
  115.     STRPTR name, struct NamedObject *lastObject );
  116. void FreeNamedObject( struct NamedObject *object );
  117. STRPTR NamedObjectName( struct NamedObject *object );
  118. void ReleaseNamedObject( struct NamedObject *object );
  119. void RemNamedObject( struct NamedObject *object, struct Message *message );
  120.  
  121. /* Unique ID generator */
  122.  
  123. ULONG GetUniqueID( void );
  124.  
  125. #ifdef CLIBCPLUSON
  126. #undef CLIBCPLUSON
  127. #pragma +
  128. #endif
  129.  
  130. #endif     /* CLIB_UTILITY_PROTOS_H */
  131.