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

  1. #ifndef UTILITY_TAGITEM_H
  2. #define UTILITY_TAGITEM_H
  3. /*
  4. **    $VER: tagitem.h 39.1 (20.01.92)
  5. **    Includes Release 39.108
  6. **
  7. **    Extended specification mechanism
  8. **
  9. **    (C) Copyright 1989-1992 Commodore-Amiga Inc.
  10. **    All Rights Reserved
  11. */
  12.  
  13. /*****************************************************************************/
  14.  
  15.  
  16. #ifndef EXEC_TYPES_H
  17. #include <exec/types.h>
  18. #endif
  19.  
  20.  
  21. /*****************************************************************************/
  22.  
  23.  
  24. /* Tags are a general mechanism of extensible data arrays for parameter
  25.  * specification and property inquiry. In practice, tags are used in arrays,
  26.  * or chain of arrays.
  27.  *
  28.  */
  29.  
  30. typedef ULONG Tag;
  31.  
  32. struct TagItem
  33. {
  34.     Tag      ti_Tag;    /* identifies the type of data */
  35.     ULONG ti_Data;    /* type-specific data           */
  36. };
  37.  
  38. /* constants for Tag.ti_Tag, system tag values */
  39. #define TAG_DONE   (0L)      /* terminates array of TagItems. ti_Data unused */
  40. #define TAG_END       (0L)   /* synonym for TAG_DONE              */
  41. #define    TAG_IGNORE (1L)      /* ignore this item, not end of array          */
  42. #define    TAG_MORE   (2L)      /* ti_Data is pointer to another array of TagItems
  43.                * note that this tag terminates the current array
  44.                */
  45. #define    TAG_SKIP   (3L)      /* skip this and the next ti_Data items      */
  46.  
  47. /* Indication of user tag, OR this in with user tag values */
  48. #define TAG_USER   (1L<<31)  /* differentiates user tags from system tags */
  49.  
  50. /* NOTE: Until further notice, tag bits 16-30 are RESERVED and should be zero.
  51.  *     Also, the value (TAG_USER | 0) should never be used as a tag value.
  52.  */
  53.  
  54.  
  55. /*****************************************************************************/
  56.  
  57.  
  58. /* Tag filter logic specifiers for use with FilterTagItems() */
  59. #define TAGFILTER_AND 0        /* exclude everything but filter hits    */
  60. #define TAGFILTER_NOT 1        /* exclude only filter hits        */
  61.  
  62.  
  63. /*****************************************************************************/
  64.  
  65.  
  66. /* Mapping types for use with MapTags() */
  67. #define MAP_REMOVE_NOT_FOUND 0    /* remove tags that aren't in mapList */
  68. #define MAP_KEEP_NOT_FOUND   1    /* keep tags that aren't in mapList   */
  69.  
  70.  
  71. /*****************************************************************************/
  72.  
  73.  
  74. /* Merging types for use with MergeTagItems() */
  75. #define MERGE_OR_LIST_1   0    /* list 1's item is preferred         */
  76. #define MERGE_OR_LIST_2   1    /* list 2's item is preferred         */
  77. #define MERGE_AND_LIST_1  2    /* item must appear in both lists    */
  78. #define MERGE_AND_LIST_2  3    /* item must appear in both lists    */
  79. #define MERGE_NOT_LIST_1  4    /* item must not appear in list 1    */
  80. #define MERGE_NOT_LIST_2  5    /* item must not appear in list 2    */
  81. #define MERGE_XOR      6    /* item must appear in only one list */
  82.  
  83.  
  84. /*****************************************************************************/
  85.  
  86.  
  87. #endif /* UTILITY_TAGITEM_H */
  88.