DEFINITION MODULE TagItem;

(*
**   $Filename: utility/tagitem.i $
**   $Release: 1.0 $
**
**   Clone of 2.0 include file 'utility/tagitem.h'
*)

TYPE
  Tag = LONGCARD;
  TagItemPtr = POINTER TO TagItem;
  TagItem =
    RECORD
      tiTag  : Tag;
      tiData : LONGCARD;
    END;

CONST
  TAGDONE       = 0;
  TAGEND        = 0;
  TAGIGNORE	= 1;
  TAGMORE	= 2;
  TAGSKIP	= 3;
  TAGUSER	= 80000000H;
  TAGFILTERAND	= 0;
  TAGFILTERNOT	= 1;

(*********************************************************************)
(* Various routines used for creating Workbench 2.0 tag lists        *)


PROCEDURE TagIs1(Tag1 : Tag; Data1 : LONGCARD) : TagItemPtr;
(* Pass a single tag and associated data to a routine. The tag is
   automatically terminated with TAGEND. *)


PROCEDURE TagIs4(Tag1 : Tag; Data1 : LONGCARD;
                 Tag2 : Tag; Data2 : LONGCARD;
                 Tag3 : Tag; Data3 : LONGCARD;
                 Tag4 : Tag; Data4 : LONGCARD) : TagItemPtr;
(* Pass up to 4 tags and associated data to a routine. If you have less
   than 4 tags, place a TAGEND on all unused tags and pass anything you
   want for the data. If all tags are used, a TAGEND is added as a fifth
   tag. *)


PROCEDURE TagIs8(Tag1 : Tag; Data1 : LONGCARD;
                 Tag2 : Tag; Data2 : LONGCARD;
                 Tag3 : Tag; Data3 : LONGCARD;
                 Tag4 : Tag; Data4 : LONGCARD;
                 Tag5 : Tag; Data5 : LONGCARD;
                 Tag6 : Tag; Data6 : LONGCARD;
                 Tag7 : Tag; Data7 : LONGCARD;
                 Tag8 : Tag; Data8 : LONGCARD) : TagItemPtr;
(* Pass up to 8 tags and associated data to a routine. If you have less
   than 8 tags, place a TAGEND on all unused tags and pass anything you
   want for the data. If all tags are used, a TAGEND is added as a ninth
   tag. *)


PROCEDURE TagIs16(Tag1 : Tag; Data1 : LONGCARD;
                  Tag2 : Tag; Data2 : LONGCARD;
                  Tag3 : Tag; Data3 : LONGCARD;
                  Tag4 : Tag; Data4 : LONGCARD;
                  Tag5 : Tag; Data5 : LONGCARD;
                  Tag6 : Tag; Data6 : LONGCARD;
                  Tag7 : Tag; Data7 : LONGCARD;
                  Tag8 : Tag; Data8 : LONGCARD;
                  Tag9 : Tag; Data9 : LONGCARD;
                  Tag10: Tag; Data10: LONGCARD;
                  Tag11: Tag; Data11: LONGCARD;
                  Tag12: Tag; Data12: LONGCARD;
                  Tag13: Tag; Data13: LONGCARD;
                  Tag14: Tag; Data14: LONGCARD;
                  Tag15: Tag; Data15: LONGCARD;
                  Tag16: Tag; Data16: LONGCARD) : TagItemPtr;
(* Pass up to 16 tags and associated data to a routine. If you have less
   than 16 tags, place a TAGEND on all unused tags and pass anything you
   want for the data. If all tags are used, a TAGEND is added as a seventeenth
   tag. *)



END TagItem.
