home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 2 / FFMCD02.bin / useful / os-include / clib / utility_protos.h < prev    next >
C/C++ Source or Header  |  1992-09-24  |  4KB  |  117 lines

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