home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD2.0 / Text_Autodocs / utility.doc < prev    next >
Encoding:
Text File  |  1992-09-02  |  25.8 KB  |  1,000 lines

  1. TABLE OF CONTENTS
  2.  
  3. utility.library/AllocateTagItems
  4. utility.library/Amiga2Date
  5. utility.library/CallHookPkt
  6. utility.library/CheckDate
  7. utility.library/CloneTagItems
  8. utility.library/Date2Amiga
  9. utility.library/FilterTagChanges
  10. utility.library/FilterTagItems
  11. utility.library/FindTagItem
  12. utility.library/FreeTagItems
  13. utility.library/GetTagData
  14. utility.library/MapTags
  15. utility.library/NextTagItem
  16. utility.library/PackBoolTags
  17. utility.library/RefreshTagItemClones
  18. utility.library/SDivMod32
  19. utility.library/SMult32
  20. utility.library/Stricmp
  21. utility.library/Strnicmp
  22. utility.library/TagInArray
  23. utility.library/ToLower
  24. utility.library/ToUpper
  25. utility.library/UDivMod32
  26. utility.library/UMult32
  27. utility.library/AllocateTagItems             utility.library/AllocateTagItems
  28.  
  29.     NAME
  30.     AllocateTagItems --  Allocate a TagItem array (or chain). (V36)
  31.  
  32.     SYNOPSIS
  33.     tagList = AllocateTagItems( numItems )
  34.     D0                    D0
  35.  
  36.     struct TagItem *AllocateTagItems( ULONG numItems);
  37.  
  38.     FUNCTION
  39.     Allocates the specified number of usable TagItems slots, and does
  40.     so in a format that the function FreeTagItems can handle.
  41.  
  42.     Note that to access the TagItems in 'tagList', you should use
  43.     the function NextTagItem().  This will insure you respect any
  44.     chaining (TAG_MORE) that the list uses, and will skip any
  45.     TAG_IGNORE items that AllocateTagItems() might use to stash
  46.     size and other information.
  47.  
  48.     INPUTS
  49.     numItems    - the number of TagItem slots you want to allocate.
  50.  
  51.     RESULT
  52.     tagList        - the allocated chain of TagItem structures.  Will
  53.                   return NULL if unsuccessful.
  54.  
  55.     BUGS
  56.  
  57.     SEE ALSO
  58.     FreeTagItems(), CloneTagItems()
  59.  
  60. utility.library/Amiga2Date                         utility.library/Amiga2Date
  61.  
  62.    NAME
  63.     Amiga2Date -- Calculate the date from a timestamp.  (V36)
  64.  
  65.    SYNOPSIS
  66.     Amiga2Date( AmigaTime, Date )
  67.                 D0         A0
  68.  
  69.     void Amiga2Date( ULONG, struct ClockData * );
  70.  
  71.    FUNCTION
  72.     Fills in a ClockData structure with the date and time calculated
  73.     from a ULONG containing the number of seconds from 01-Jan-1978
  74.     to the date.
  75.  
  76.    INPUTS
  77.     AmigaTime     - the number of seconds from 01-Jan-1978.
  78.  
  79.    RESULTS
  80.     Date        - filled in with the date/time specified by
  81.               AmigaTime.
  82.  
  83.    NOTES
  84.  
  85.    SEE ALSO
  86.     CheckDate(), Date2Amiga()
  87.  
  88.    BUGS
  89.  
  90. utility.library/CallHookPkt                       utility.library/CallHookPkt
  91.  
  92.     NAME
  93.     CallHookPkt -- Invoke a Hook function callback. (V36)
  94.  
  95.     SYNOPSIS
  96.     return = CallHookPkt( hook, object, paramPkt )
  97.     D0              A0    A2        A1
  98.  
  99.     ULONG CallHookPkt( struct Hook *hook, VOID *object, VOID *paramPkt );
  100.  
  101.     FUNCTION
  102.     Performs the callback standard defined by a Hook structure.
  103.     This function is really very simple; it effectively performs
  104.     a JMP to Hook->h_Entry.
  105.  
  106.     It is probably just as well to do this operation in an
  107.     assembly language function linked in to your program, possibly
  108.     from a compiler supplied library or a builtin function.
  109.  
  110.     It is anticipated that C programs will often call a 'varargs'
  111.     variant of this function which will be named CallHook.  This
  112.     function must be provided in a compiler specific library, but
  113.     an example of use would be:
  114.  
  115.     returnval = CallHook( hook, dataobject, COMMAND_ID, param1, param2 );
  116.  
  117.     This function CallHook can be implemented in many C compilers
  118.     like this:
  119.     CallHook( hook, object, command, ... )
  120.     struct Hook    *hook;
  121.     VOID        *object;
  122.     ULONG        command;
  123.     {
  124.         return ( CallHookPkt( hook, object, (VOID *) &command ) );
  125.     }
  126.  
  127.     INPUTS
  128.     Hook        - pointer to Hook structure as defined in
  129.               utility/hooks.h
  130.     Object        - useful data structure in the particular context the
  131.               hook is being used for.
  132.     ParamPkt    - pointer to a parameter packet (often built on the
  133.               stack); by convention this packet should start off
  134.               with a longword command code, and the remaining
  135.               data in the packet depends on that command.
  136.  
  137.     RESULT
  138.     return        - The meaning of the value returned in D0 depends on
  139.               the context in which the Hook is being used.
  140.  
  141.     NOTES
  142.     The functions called through this function should follow normal
  143.     register conventions unless EXPLICITLY documented otherwise (and
  144.     they have a good reason too).
  145.  
  146.     BUGS
  147.  
  148.     SEE ALSO
  149.     utility/hooks.h
  150.  
  151. utility.library/CheckDate                           utility.library/CheckDate
  152.  
  153.    NAME
  154.     CheckDate -- Checks ClockData struct for legal date. (V36)
  155.  
  156.    SYNOPSIS
  157.     AmigaTime = CheckDate( Date )
  158.     D0                     A0
  159.  
  160.     ULONG CheckDate( struct ClockData * );
  161.  
  162.    FUNCTION
  163.     Determines if the Date is a legal date and returns the number
  164.     of seconds to Date from 01-Jan-1978 if it is.
  165.  
  166.    INPUTS
  167.     Date         - pointer to a ClockData structure.
  168.  
  169.    RESULTS
  170.     AmigaTime     - 0 if Date invalid; otherwise, the number of
  171.               seconds to Date from 01-Jan-1978.
  172.  
  173.    NOTES
  174.  
  175.    BUGS
  176.     The wday field of the ClockData structure is not checked.
  177.  
  178.    SEE ALSO
  179.     Amiga2Date(), Date2Amiga()
  180.  
  181. utility.library/CloneTagItems                   utility.library/CloneTagItems
  182.  
  183.     NAME
  184.     CloneTagItems -- Copies a TagItem list.  (V36)
  185.  
  186.     SYNOPSIS
  187.     newTagList = CloneTagItems( tagList )
  188.     D0                A0
  189.  
  190.     struct TagItem *CloneTagItems( struct TagItem *tagList );
  191.  
  192.     FUNCTION
  193.     Copies the essential contents of a tagItem list.  Internally,
  194.     it uses AllocateTagItems() so that you can use FreeTagItems().
  195.  
  196.     INPUTS
  197.     tagList        - TagItem list to clone.
  198.  
  199.     RESULT
  200.     newTagList    - resultant copy.
  201.  
  202.     BUGS
  203.  
  204.     SEE ALSO
  205.     AllocateTagItems(), FreeTagItems(), RefreshTagItemClones()
  206.  
  207. utility.library/Date2Amiga                         utility.library/Date2Amiga
  208.  
  209.    NAME
  210.     Date2Amiga -- Calculate seconds from 01-Jan-1978.  (V36)
  211.  
  212.    SYNOPSIS
  213.     AmigaTime = Date2Amiga( Date )
  214.     D0                      A0
  215.  
  216.     ULONG Date2Amiga( struct ClockData * );
  217.  
  218.    FUNCTION
  219.     Calculates the number of seconds from 01-Jan-1978 to the date
  220.     specified in the ClockData structure.
  221.  
  222.    INPUTS
  223.     Date         - pointer to a ClockData structure containing the
  224.               date of interest.
  225.  
  226.    RESULTS
  227.     AmigaTime     - the number of seconds from 01-Jan-1978 to the
  228.               date specified in Date.
  229.  
  230.    NOTES
  231.     This function does no sanity checking of the data in Date.
  232.  
  233.    SEE ALSO
  234.     Amiga2Date(), CheckDate()
  235.  
  236.    BUGS
  237.  
  238. utility.library/FilterTagChanges             utility.library/FilterTagChanges
  239.  
  240.     NAME
  241.     FilterTagChanges -- Eliminate TagItems which specify no change. (V36)
  242.  
  243.     SYNOPSIS
  244.     FilterTagChanges( changeList, oldValues, apply)
  245.               A0          A1     D0
  246.  
  247.     void FilterTagChanges( struct TagItem *changeList,
  248.                    struct TagItem *oldValues, LONG apply );
  249.  
  250.     FUNCTION
  251.     Eliminate items from a "change list" that specify values already
  252.     in effect in existing list.  Optionally update the existing list
  253.     if the Boolean 'Apply' is true.
  254.  
  255.     The elimination is done by changing the ti_Tag field to TAG_IGNORE.
  256.     So, this function may change the input tag list(s).
  257.  
  258.     INPUTS
  259.     changeList     - specification of new tag-value pairs.
  260.     oldValues    - a list of existing tag item pairs.
  261.     apply        - Boolean specification as to whether the values in
  262.               oldValues are to be updated to the values in
  263.               changeList.
  264.  
  265.     RESULT
  266.     None.
  267.  
  268.     EXAMPLE
  269.     Assume you have an attribute list for an object (oldValues)
  270.     which looks like this:
  271.  
  272.         ATTR_Size,  "large",
  273.         ATTR_Color, "orange",
  274.         ATTR_Shape, "square",
  275.  
  276.     If you receive a new TagList containing some changes (changeList),
  277.     which looks like this:
  278.  
  279.         ATTR_Size,  "large",
  280.         ATTR_Shape, "triangle"
  281.  
  282.     If you call FilterTagChanges(), changeList will be modified to
  283.     contain only those attributes which are different from the
  284.     oldValues.  All other tagitems will have their tag-values set to
  285.     TAG_IGNORE.  The resulting changeList will become:
  286.  
  287.         TAG_IGNORE, "large",
  288.         ATTR_Shape, "triangle"
  289.  
  290.     If apply was set to TRUE, oldValues would be:
  291.  
  292.         ATTR_Size,  "large"
  293.         ATTR_Color, "orange"
  294.         ATTR_Shape, "triangle"
  295.  
  296.     BUGS
  297.  
  298.     SEE ALSO
  299.  
  300. utility.library/FilterTagItems                 utility.library/FilterTagItems
  301.  
  302.     NAME
  303.     FilterTagItems - Remove selected items from a TagItem list. (V36)
  304.  
  305.     SYNOPSIS
  306.     nvalid = FilterTagItems(tagList, tagArray, logic)
  307.     D0               A0    A1      D0
  308.  
  309.     ULONG FilterTagItems(struct TagItem *tagList, Tag *tagArray,
  310.                  LONG logic);
  311.  
  312.     FUNCTION
  313.     Removes TagItems from a TagItem list (by changing ti_Tag to
  314.     TAG_IGNORE) depending on whether its ti_Tag value is
  315.     found in an array of TagValues.
  316.  
  317.     If the 'logic' parameter is TAGFILTER_AND, then all items
  318.     not appearing in the list are excluded.
  319.  
  320.     If 'logic' is TAGFILTER_NOT, then items not found in the
  321.     array are preserved, and the ones in the array are cast out.
  322.  
  323.     INPUTS
  324.     tagList        - input list of tag items which is to be filtered
  325.               by having selected items changed to TAG_IGNORE.
  326.     tagArray    - an array of Tag values, terminated by TAG_END,
  327.               as specified in the notes on TagInArray().
  328.     logic        - specification whether items in TagArray are to
  329.               be included or excluded in the filtered result.
  330.  
  331.     RESULT
  332.     nvalid        - number of valid items left in resulting filtered
  333.               list.
  334.  
  335.     BUGS
  336.  
  337.     SEE ALSO
  338.     TagInArray()
  339.  
  340. utility.library/FindTagItem                       utility.library/FindTagItem
  341.  
  342.     NAME
  343.     FindTagItem -- Scans TagItem list for a Tag. (V36)
  344.  
  345.     SYNOPSIS
  346.     tag = FindTagItem( tagVal, tagList)
  347.     D0           D0       A0
  348.  
  349.     struct TagItem *FindTagItem( Tag tagVal, struct TagItem *tagList );
  350.  
  351.     FUNCTION
  352.     Scans a TagItem "List", which is in fact a chain of arrays
  353.     of TagItem structures as defined in utility/tagitem.h.
  354.     Returns a pointer to the FIRST item with ti_Tag matching the
  355.     'TagVal' parameter.
  356.  
  357.     INPUTS
  358.     tagVal         - Tag value to search for.
  359.     tagList        - beginning of TagItem list to scan.
  360.  
  361.     RESULT
  362.     Returns a pointer to the item with ti_Tag matching 'TagVal'.
  363.     Returns NULL if there is no match or if TagList is NULL.
  364.  
  365.     BUGS
  366.  
  367.     SEE ALSO
  368.     utility/tagitem.h, GetTagData(), PackBoolTags(), NextTagItem()
  369.  
  370. utility.library/FreeTagItems                     utility.library/FreeTagItems
  371.  
  372.     NAME
  373.     FreeTagItems --  Frees allocated TagItem lists. (V36)
  374.  
  375.     SYNOPSIS
  376.     FreeTagItems( tagList )
  377.             A0
  378.  
  379.     void FreeTagItems( struct TagItem *tagList );
  380.  
  381.     FUNCTION
  382.     Frees the memory of a TagItem list allocated either by
  383.     AllocateTagItems() or CloneTagItems().
  384.  
  385.     INPUTS
  386.     TagList        - list to free.  Must be created by functions
  387.               specified. A value of NULL for 'tagList' is safe.
  388.  
  389.     RESULT
  390.     None.
  391.  
  392.     BUGS
  393.  
  394.     SEE ALSO
  395.     AllocateTagItems(), CloneTagItems()
  396.  
  397. utility.library/GetTagData                         utility.library/GetTagData
  398.  
  399.     NAME
  400.     GetTagData -- Obtain data corresponding to Tag. (V36)
  401.  
  402.     SYNOPSIS
  403.     value = GetTagData(tagVal, default, tagList)
  404.     D0           D0       D1        A0
  405.  
  406.     ULONG GetTagData(Tag TagVal, ULONG Default, struct TagItem *TagList)
  407.  
  408.     FUNCTION
  409.     Searches a TagItem list for a matching Tag value, and returns the
  410.     corresponding ti_Data value for the TagItem found.  If none
  411.     found, will return the value passed it as 'default'.
  412.  
  413.     INPUTS
  414.     tagVal         - Tag value to search for.
  415.     default        - value to be returned if tagVal is not found.
  416.     tagList     - the TagItem list to search.
  417.  
  418.     RESULT
  419.     value        - The ti_Data value for first matching TagItem, or
  420.               'default' if a ti_Tag matching 'Tag' is not found.
  421.  
  422.     BUGS
  423.  
  424.     SEE ALSO
  425.     utility/tagitem.h, FindTagItem(), PackBoolTags(), NextTagItem()
  426.  
  427. utility.library/MapTags                               utility.library/MapTags
  428.  
  429.     NAME
  430.     MapTags    -- Convert ti_Tag values in a list via map pairing. (V36)
  431.  
  432.     SYNOPSIS
  433.     MapTags(tagList, mapList, includeMiss)
  434.         A0     A1       D0
  435.  
  436.     void MapTags(struct TagItem *tagList, struct TagItem mapList,
  437.              LONG includeMiss);
  438.  
  439.     FUNCTION
  440.     Apply a "mapping list" mapList to tagList:
  441.  
  442.     If the ti_Tag field of an item in tagList appears as ti_Tag in some
  443.     item in mapList, overwrite ti_Tag with the corresponding ti_Data
  444.     from the map list.
  445.  
  446.     If a tag in tagList does not appear in the mapList, you can choose
  447.     to have it removed by changing it to TAG_IGNORE. Do this by setting
  448.     includeMiss to FALSE.
  449.  
  450.     If you want to have items which do not appear in the mapList
  451.     survive the mapping as-is, set includeMiss to 1.
  452.  
  453.     This is central to gadget interconnections where you want
  454.     to convert the tag values from one space (the sender) to
  455.     another (the receiver).
  456.  
  457.     INPUTS
  458.     tagList        - Input list of tag items which is to be mapped
  459.               to Tag values as specified in mapList.
  460.     mapList     - a "mapping list" tagItem list which pairs Tag
  461.               values expected to appear in tagList with new
  462.               values to be substituted in the ti_Tag fields of
  463.               tagList.  May be NULL, which means that all items
  464.               in tagList will be eliminated.
  465.     includeMiss    - 0 to remove tags from tagList not in mapList,
  466.               1 to remove
  467.  
  468.     RESULT
  469.     None.
  470.  
  471.     EXAMPLE
  472.     /* Consider this source list: */
  473.         struct TagItem list[] = {
  474.         { MY_SIZE,     71 },
  475.         { MY_WEIGHT,     200 },
  476.         { TAG_END,    } };
  477.  
  478.     /* And the mapping list: */
  479.         struct TagItem map[] = {
  480.         { MY_SIZE,     HIS_TALL },
  481.         { TAG_END,    } };
  482.  
  483.     /* Then after MapTags( list, map, 0 ), 'list' will become: */
  484.         { HIS_TALL, 71 },
  485.         { TAG_IGNORE, },
  486.         { TAG_END, }
  487.  
  488.     /* Then after MapTags( list, map, 1 ), 'list' will become: */
  489.         { HIS_TALL, 71 },
  490.         { MY_WEIGHT, 200 },
  491.         { TAG_END, }
  492.  
  493.     NOTES
  494.     The procedure will change the values of the input tag list
  495.     tagList (but not mapList).
  496.  
  497.     You can "filter" a list by passing includeMiss as 0, and having the
  498.     data items in the map list equal the corresponding tags.
  499.  
  500.     You can perform the inverse filter ("everything but") by passing
  501.     includeMiss equal to 1, and creating a map item for every tag you
  502.     want to filter out, pairing it with a mapped data value of
  503.     TAG_IGNORE.
  504.  
  505.     For safety and "order independence" of tag item arrays, if you
  506.     attempt to map some tag to the value TAG_END, the value TAG_IGNORE
  507.     will be substituted instead.
  508.  
  509.     BUGS
  510.  
  511.     SEE ALSO
  512.  
  513. utility.library/NextTagItem                       utility.library/NextTagItem
  514.  
  515.     NAME
  516.     NextTagItem -- Iterate TagItem lists. (V36)
  517.  
  518.     SYNOPSIS
  519.     next_tag = NextTagItem( tagItemPtr )
  520.     D0            A0
  521.  
  522.     struct TagItem *NextTagItem( struct TagItem **tagItemPtr );
  523.  
  524.     FUNCTION
  525.     Iterates through a (chained) array of TagItem structures,
  526.     skipping and chaining as dictated by system tags.  TAG_SKIP
  527.     will cause it to skip the entry and the next, TAG_IGNORE ignores
  528.     that single entry, and TAG_MORE has a pointer to another array
  529.     of tags (and terminates the current array!)  TAG_DONE also
  530.     terminates the current array.  Each call returns either the next
  531.     tagitem you should examine, or NULL at the end.
  532.  
  533.     INPUTS
  534.     tagItemPtr     - doubly-indirect reference to a TagItem structure.
  535.               The pointer will be changed to keep track of the
  536.               iteration.
  537.  
  538.     RESULT
  539.     next_tag    - Each TagItem in the array or chain of arrays that
  540.               should be processed according to system Tag values
  541.               (in utility/tagitem.h) is returned in turn with
  542.               successive calls.
  543.  
  544.     EXAMPLE
  545.     Iterate( struct TagItem *tags );
  546.     {
  547.         struct TagItem *tstate;
  548.         struct TagItem *tag;
  549.  
  550.         tstate = tags;
  551.         while ( tag = NextTagItem( &tstate ) )
  552.         {
  553.             switch ( tag->ti_Tag )
  554.             {
  555.              case TAG1:
  556.                 ...
  557.                 break;
  558.              case TAG2:
  559.                 ...
  560.                 break;
  561.             ...
  562.             }
  563.         }
  564.        }
  565.  
  566.     NOTES
  567.     Do NOT use the value of *tagItemPtr, but rather use the pointer
  568.     returned by NextTagItem().
  569.  
  570.  
  571.     BUGS
  572.  
  573.     SEE ALSO
  574.     utility/tagitem.h, GetTagData(), PackBoolTags(), FindTagItem()
  575.  
  576. utility.library/PackBoolTags                     utility.library/PackBoolTags
  577.  
  578.     NAME
  579.     PackBoolTags --  Builds a "Flag" word from a TagList. (V36)
  580.  
  581.     SYNOPSIS
  582.     boolflags = PackBoolTags( initialFlags, tagList, boolMap )
  583.     D0              D0            A0       A1
  584.  
  585.     ULONG PackBoolTags( ULONG initialFlags, struct TagItem *tagList,
  586.                 struct TagItem *boolMap );
  587.  
  588.     FUNCTION
  589.     Picks out the Boolean TagItems in a TagItem list and converts
  590.     them into bit-flag representations according to a correspondence
  591.     defined by the TagItem list 'BoolMap.'
  592.  
  593.     A Boolean TagItem is one where only the logical value of
  594.     the ti_Data is relevant.  If this field is 0, the value is
  595.     FALSE, otherwise TRUE.
  596.  
  597.  
  598.     INPUTS
  599.     initialFlags     - a starting set of bit-flags which will be changed
  600.               by the processing of TRUE and FALSE Boolean tags
  601.               in tagList.
  602.     tagList        - a TagItem list which may contain several TagItems
  603.               defined to be "Boolean" by their presence in
  604.               boolMap.  The logical value of ti_Data determines
  605.               whether a TagItem causes the bit-flag value related
  606.               by boolMap to set or cleared in the returned flag
  607.               longword.
  608.     boolMap        - a TagItem list defining the Boolean Tags to be
  609.               recognized, and the bit (or bits) in the returned
  610.               longword that are to be set or cleared when a
  611.               Boolean Tag is found to be TRUE or FALSE in
  612.               tagList.
  613.  
  614.     RESULT
  615.     boolflags    - the accumulated longword of bit-flags, starting
  616.               with InitialFlags and modified by each Boolean
  617.               TagItem encountered.
  618.  
  619.     EXAMPLE
  620.  
  621.     /* define some nice user tag values ... */
  622.     enum mytags { tag1 = TAG_USER+1, tag2, tag3, tag4, tag5 };
  623.  
  624.     /* this TagItem list defines the correspondence between Boolean tags
  625.      * and bit-flag values.
  626.      */
  627.     struct TagItem    boolmap[] = {
  628.         { tag1,  0x0001 },
  629.         { tag2,  0x0002 },
  630.         { tag3,  0x0004 },
  631.         { tag4,  0x0008 },
  632.         { TAG_DONE }
  633.     };
  634.  
  635.     /* You are probably passed these by some client, and you want
  636.      * to "collapse" the Boolean content into a single longword.
  637.      */
  638.  
  639.     struct TagItem    boolexample[] = {
  640.         { tag1,  TRUE },
  641.         { tag2,  FALSE },
  642.         { tag5, Irrelevant },
  643.         { tag3,  TRUE },
  644.         { TAG_DONE }
  645.     };
  646.  
  647.     /* Perhaps 'boolflags' already has a current value of 0x800002. */
  648.     boolflags = PackBoolTags( boolflags, boolexample, boolmap );
  649.  
  650.     /* The resulting new value of 'boolflags' will be 0x80005. /*
  651.  
  652.     BUGS
  653.     There are some undefined cases if there is duplication of
  654.     a given Tag in either list.  It is probably safe to say that
  655.     the *last* of identical Tags in TagList will hold sway.
  656.  
  657.     SEE ALSO
  658.     utility/tagitem.h, GetTagData(), FindTagItem(), NextTagItem()
  659.  
  660. utility.library/RefreshTagItemClones     utility.library/RefreshTagItemClones
  661.  
  662.     NAME
  663.     RefreshTagItemClones -- Rejuvenates a clone from the original. (V36)
  664.  
  665.     SYNOPSIS
  666.     RefreshTagItemClones( cloneTagItems, originalTagItems )
  667.                   A0         A1
  668.  
  669.     void RefreshTagItemClones( struct TagItem *cloneTagItems,
  670.                   struct TagItem *originalTagItems );
  671.  
  672.     FUNCTION
  673.     If (and only if) the tag items 'cloneTagItems' were created
  674.     from 'originalTagItems' by CloneTagItems(), and if originalTagItems
  675.     has not been changed in any way, you can reset the clone list
  676.     to its original state by using this function.
  677.  
  678.     INPUTS
  679.     CloneTagItems    - return value from CloneTagItems(originalTagItems).
  680.     OriginalTagItems- a tag list that hasn't changed.
  681.  
  682.     RESULT
  683.     None.
  684.  
  685.     EXAMPLE
  686.  
  687.     BUGS
  688.  
  689.     SEE ALSO
  690.     CloneTagItems(), AllocateTagItems(), FreeTagItems()
  691.  
  692. utility.library/SDivMod32                           utility.library/SDivMod32
  693.  
  694.    NAME
  695.     SDivMod32 -- Signed 32 by 32 bit division and modulus. (V36)
  696.  
  697.    SYNOPSIS
  698.     Quotient:Remainder = SDivMod32( Dividend, Divisor )
  699.     D0       D1                     D0        D1
  700.  
  701.     LONG SDivMod32( LONG, LONG );
  702.  
  703.    FUNCTION
  704.     Divides the signed 32 bit dividend by the signed 32 bit divisor
  705.        and returns a signed 32 bit quotient and remainder.
  706.  
  707.    INPUTS
  708.     Dividend     - signed 32 bit dividend.
  709.     Divisor     - signed 32 bit divisor.
  710.  
  711.    RESULTS
  712.     Quotient     - signed 32 quotient of the division.
  713.     Remainder     - signed 32 remainder of the division.
  714.  
  715.    NOTES
  716.  
  717.    SEE ALSO
  718.     SMult32(), UDivMod32(), UMult32()
  719.  
  720.    BUGS
  721.  
  722. utility.library/SMult32                               utility.library/SMult32
  723.  
  724.    NAME
  725.     SMult32 -- Signed 32 by 32 bit multiply with 32 bit result. (V36)
  726.  
  727.    SYNOPSIS
  728.     Result = SMult32( Arg1, Arg2 )
  729.     D0                D0    D1
  730.  
  731.     LONG SMult32( LONG, LONG );
  732.  
  733.    FUNCTION
  734.     Returns the signed 32 bit result of multiplying Arg1 by Arg2.
  735.  
  736.    INPUTS
  737.     Arg1, Arg2    - signed multiplicands.
  738.  
  739.    RESULTS
  740.     Result        - the signed 32 bit result of multiplying
  741.               Arg1 by Arg2.
  742.  
  743.    NOTES
  744.  
  745.    SEE ALSO
  746.     SDivMod32(), UDivMod32(), UMult32()
  747.  
  748.    BUGS
  749.  
  750. utility.library/Stricmp                               utility.library/Stricmp
  751.  
  752.     NAME
  753.     Stricmp    --  Case-insensitive string compare. (V37)
  754.  
  755.     SYNOPSIS
  756.     res = Stricmp(string1, string2)
  757.     D0        A0       A1
  758.  
  759.     LONG Stricmp(char *, char *);
  760.  
  761.     FUNCTION
  762.     Stricmp compares two strings, ignoring case.  It handles all
  763.     internationalization issues.  If the strings have different lengths,
  764.     the shorter is treated as if it were extended with zeros.
  765.  
  766.     INPUTS
  767.     string1, string2 - strings to be compared
  768.  
  769.     RESULT
  770.     res - negative if string1 is below string2, 0 if they're the same, and
  771.           positive if string1 is above string2.
  772.  
  773.     NOTES
  774.     Commodore is planning a localization library which will take care
  775.     of most details pertaining to system integration into different
  776.     cultures, locales, and territories.
  777.  
  778.     This function will automatically be replaced by a localized version
  779.     whenever the locale.library is loaded in memory. As such, the
  780.     collating order may change depending on the locale currently
  781.     defined by the user. Take this fact into consideration when using
  782.     this function, and do not rely on obtaining specific collating
  783.     sequences.
  784.  
  785.     BUGS
  786.  
  787.     SEE ALSO
  788.     Strnicmp()
  789.  
  790. utility.library/Strnicmp                             utility.library/Strnicmp
  791.  
  792.     NAME
  793.     Strnicmp--  Case-insensitive string compare, length-limited. (V37)
  794.  
  795.     SYNOPSIS
  796.     res = Strnicmp(string1, string2, length)
  797.     D0        A0       A1       D0
  798.  
  799.     LONG Strnicmp(char *, char *, LONG length);
  800.  
  801.     FUNCTION
  802.  
  803.     Strnicmp compares two strings, ignoring case.  It handles all
  804.     internationalization issues.  If the strings have different lengths,
  805.     the shorter is treated as if it were extended with zeros.  It never
  806.     compares more than <length> characters.
  807.  
  808.     INPUTS
  809.     string1, string2 - strings to be compared
  810.     length         - maximum number of characters to examine
  811.  
  812.     RESULT
  813.     res - negative if string1 is below string2, 0 if they're the same, and
  814.           positive if string1 is above string2.
  815.  
  816.     NOTES
  817.     Commodore is planning a localization library which will take care
  818.     of most details pertaining to system integration into different
  819.     cultures, locales, and territories.
  820.  
  821.     This function will automatically be replaced by a localized version
  822.     whenever the locale.library is loaded in memory. As such, the
  823.     collating order may change depending on the locale currently
  824.     defined by the user. Take this fact into consideration when using
  825.     this function, and do not rely on obtaining specific collating
  826.     sequences.
  827.  
  828.     BUGS
  829.  
  830.     SEE ALSO
  831.     Stricmp()
  832.  
  833. utility.library/TagInArray                         utility.library/TagInArray
  834.  
  835.     NAME
  836.     TagInArray  -- Check if a Tag value appears in a Tag array. (V36)
  837.  
  838.     SYNOPSIS
  839.     BOOL TagInArray( tag, tagArray )
  840.     D0             D0   A0
  841.  
  842.     BOOL TagInArray( Tag tag, Tag *tagArray);
  843.  
  844.     FUNCTION
  845.     Perform a quick scan to see if a tag value appears in
  846.     an array terminated with TAG_END.  Returns TRUE if
  847.     the value is found.
  848.  
  849.     The 'tagArray' must be terminated by TAG_END.  It should
  850.     NOT contain other system tag values, such as TAG_MORE
  851.     or TAG_IGNORE.  Note that this is an array of Tag values, NOT
  852.     an array of TagItems.
  853.  
  854.     This is sort of a "one shot" version of FilterTagItems().
  855.  
  856.     INPUTS
  857.     tag         - Tag value to search array for.
  858.     tagArray    - a simple array terminated by TAG_END.
  859.  
  860.     RESULT
  861.     Boolean success of search.
  862.  
  863.     BUGS
  864.  
  865.     SEE ALSO
  866.     FilterTagItems()
  867.  
  868. utility.library/ToLower                               utility.library/ToLower
  869.  
  870.     NAME
  871.     ToLower - Convert a character to lowercase. (V37)
  872.  
  873.     SYNOPSIS
  874.     char = ToLower(char)
  875.     D0        D0
  876.  
  877.     char ToLower(char);
  878.  
  879.     FUNCTION
  880.     Converts a character to lowercase, handling international character
  881.     sets.
  882.  
  883.     INPUTS
  884.     char - character to be converted.
  885.  
  886.     RESULT
  887.     char - lowercase version of input character.
  888.  
  889.     NOTES
  890.     Commodore is planning a localization library which will take care
  891.     of most details pertaining to system integration into different
  892.     cultures, locales, and territories.
  893.  
  894.     This function will automatically be replaced by a localized version
  895.     whenever the locale.library is loaded in memory. As such, the
  896.     resulting converted character may change depending on the locale
  897.     currently defined by the user. Take this fact into consideration when
  898.     using this function, and do not rely on obtaining specific
  899.     conversions.
  900.  
  901.     BUGS
  902.  
  903.     SEE ALSO
  904.  
  905. utility.library/ToUpper                               utility.library/ToUpper
  906.  
  907.     NAME
  908.     ToUpper - Convert a character to uppercase. (V37)
  909.  
  910.     SYNOPSIS
  911.     char = ToUpper(char)
  912.     D0        D0
  913.  
  914.     char ToUpper(char);
  915.  
  916.     FUNCTION
  917.     Converts a character to uppercase, handling international character
  918.     sets.
  919.  
  920.     INPUTS
  921.     char - character to be converted.
  922.  
  923.     RESULT
  924.     char - uppercase version of input character.
  925.  
  926.     NOTES
  927.     Commodore is planning a localization library which will take care
  928.     of most details pertaining to system integration into different
  929.     cultures, locales, and territories.
  930.  
  931.     This function will automatically be replaced by a localized version
  932.     whenever the locale.library is loaded in memory. As such, the
  933.     resulting converted character may change depending on the locale
  934.     currently defined by the user. Take this fact into consideration when
  935.     using this function, and do not rely on obtaining specific
  936.     conversions.
  937.  
  938.     BUGS
  939.  
  940.     SEE ALSO
  941.  
  942. utility.library/UDivMod32                           utility.library/UDivMod32
  943.  
  944.    NAME
  945.     UDivMod32 -- Unsigned 32 by 32 bit division and modulus. (V36)
  946.  
  947.    SYNOPSIS
  948.     Quotient:Remainder = UDivMod32( Dividend, Divisor )
  949.     D0       D1                     D0        D1
  950.  
  951.     ULONG UDivMod32( ULONG, ULONG );
  952.  
  953.    FUNCTION
  954.     Divides the unsigned 32 bit dividend by the unsigned 32 bit divisor
  955.     and returns a unsigned 32 bit quotient and remainder.
  956.  
  957.    INPUTS
  958.     Dividend     - unsigned 32 bit dividend.
  959.     Divisor     - unsigned 32 bit divisor.
  960.  
  961.    RESULTS
  962.     Quotient     - unsigned 32 quotient of the division.
  963.     Remainder     - unsigned 32 remainder of the division.
  964.  
  965.    NOTES
  966.  
  967.    SEE ALSO
  968.     SDivMod32(), SMult32(), UMult32()
  969.  
  970.    BUGS
  971.  
  972. utility.library/UMult32                               utility.library/UMult32
  973.  
  974.    NAME
  975.     UMult32 -- Unsigned 32 by 32 bit multiply with 32 bit result. (V36)
  976.  
  977.    SYNOPSIS
  978.     Result = UMult32( Arg1, Arg2 )
  979.     D0                D0    D1
  980.  
  981.     ULONG UMult32( ULONG, ULONG );
  982.  
  983.    FUNCTION
  984.     Returns the unsigned 32 bit result of multiplying Arg1 by Arg2.
  985.  
  986.    INPUTS
  987.     Arg1, Arg2        - unsigned multiplicands.
  988.  
  989.    RESULTS
  990.     Result            - the unsigned 32 bit result of
  991.                   multiplying Arg1 by Arg2.
  992.  
  993.    NOTES
  994.  
  995.    SEE ALSO
  996.     SDivMod32(), SMult32(), UDivMod32()
  997.  
  998.    BUGS
  999.  
  1000.