                IFND    LIBRARIES_OPENUTIL_I
LIBRARIES_OPENUTIL_I        SET 1

**
**              $VER: OpenUtil.i 2.0
**
**              Standard asm definitions for OpenUtil.library
**
**              (C) Copyright 1998 Oliver "Bloodrock" Lange
**                  All Rights Reserved
**

        IFND EXEC_LIBRARIES_I
                INCLUDE "exec/libraries.i"
        ENDC
        IFND DOS_DOS_I
                INCLUDE "dos/dos.i"
        ENDC
        IFND DEVICES_TIMER_I
                INCLUDE "devices/timer.i"
        ENDC
        IFND GRAPHICS_TEXT_I
                INCLUDE "graphics/text.i"
        ENDC
        IFND PREFS_PREFHDR_H
                INCLUDE "prefs/prefhdr.i"
        ENDC
        IFND UTILITY_TAGITEM_I
                INCLUDE "utility/tagitem.i"
        ENDC


** Basic Library defines **

OPENUTILNAME    Macro
                        dc.b    "OpenUtil.library",0
                EndM

OPENUTILVERSION EQU     2


** (String Justification): mode defines **

OU_LEFT    EQU 0
OU_RIGHT   EQU 1
OU_CENTER  EQU 2


** oCheckSum() calculation Types **

oCSTYPE_CRC_32AX366 EQU 1
oCSTYPE_CRC_16a     EQU 2
oCSTYPE_CRC_CCITT   EQU 3


** oCreatePath() / oMakePath() Flags **

        BITDEF  oCPF,CREATESUBDIRS,0    ; create all sub dirs, if necessary
        BITDEF  oCPF,OVERRIDEEXISTS,1   ; override OBJECT_EXISTS

** oCutList() Flags **

        BITDEF  oCLS,EXCLUSIVE,0 ; exclude <StartRecord> from being deleted
        BITDEF  oCLS,UP,1        ; cut in upward direction (else downward)


** oFCopyMove() Flags **

        BITDEF  oFCM,MOVE,0      ; move instead of copying
        BITDEF  oFCM,KEEPINFO,1  ; keep Source comment & protection bits
        BITDEF  oFCM,REPLACE,2   ; replace existing file/dir
        BITDEF  oFCM,FORCE,3     ; force operation (override source protection bits)


** oFileDirHandleA(): Tags **

oFDH_Action              EQU (TAG_USER+ 1)
oFDH_Recursive           EQU (TAG_USER+ 2)
oFDH_Protection          EQU (TAG_USER+ 3)
oFDH_DirProtection       EQU (TAG_USER+ 4)
oFDH_MaxCopyBuffer       EQU (TAG_USER+ 5)
oFDH_ForceDelete         EQU (TAG_USER+ 6)
oFDH_DirComments         EQU (TAG_USER+ 7)
oFDH_FileCount           EQU (TAG_USER+ 8)
oFDH_ByteCount           EQU (TAG_USER+ 9)
oFDH_DirCount            EQU (TAG_USER+10)
oFDH_MemoryPool          EQU (TAG_USER+11)
oFDH_StatusHook          EQU (TAG_USER+12)
oFDH_StatusHookUserData  EQU (TAG_USER+13)
oFDH_oFCopyMoveFlags     EQU (TAG_USER+14)
oFDH_OnError             EQU (TAG_USER+15)
oFDH_Pattern             EQU (TAG_USER+16)
oFDH_CreateSubDirs       EQU (TAG_USER+17)

** oFileDirHandleA(): oFDH_Action defines **

oFDH_ACTION_COUNT               EQU 0
oFDH_ACTION_DELETE              EQU 1
oFDH_ACTION_MOVE                EQU 2
oFDH_ACTION_COPY                EQU 3
oFDH_ACTION_COMMENT             EQU 4
oFDH_ACTION_SETPROTECTION       EQU 5
oFDH_ACTION_CLEARPROTECTION     EQU 6
oFDH_ACTION_SWAPPROTECTION      EQU 7

** oFileDirHandleA(): possible Results **

oFDH_RESULT_SUCCESS             EQU 0
oFDH_RESULT_BUFFERALLOCFAIL     EQU 1
oFDH_RESULT_DIRLOCKFAIL         EQU 2
oFDH_RESULT_EXAMINEFAIL         EQU 3
oFDH_RESULT_DESTNOTDIR          EQU 4
oFDH_RESULT_SOURCENOTVALID      EQU 5
oFDH_RESULT_DESTNOTVALID        EQU 6
oFDH_RESULT_NOPROTBITMASK       EQU 7
oFDH_RESULT_USERABORTREQUEST    EQU 8
oFDH_RESULT_REQUIREDTAGMISSING  EQU 9

** oFileDirHandleA(): Hook data structure **

        STRUCTURE oFDHHookData,0
        APTR      ofdhh_OpenUtilBase;
        APTR      ofdhh_CurrentFIB;
        APTR      ofdhh_TagList;
        BPTR      ofdhh_SourceLock;
        APTR      ofdhh_Source;
        APTR      ofdhh_Destination;
        APTR      ofdhh_FiFile;
        APTR      ofdhh_SeFile;
        APTR      ofdhh_PatternBuffer;
        LONG      ofdhh_StatusCode;
        APTR      ofdhh_UserData;
        LABEL     ofdhh_SIZEOF

** oFileDirHandleA(): status codes, as set in oFDHHookData->StatusCode **

oFDH_HOOKSTAT_EXAMINEFAIL    EQU -3
oFDH_HOOKSTAT_DIRLOCKFAIL    EQU -2
oFDH_HOOKSTAT_OUTOFMEMORY    EQU -1
oFDH_HOOKSTAT_UPDATE         EQU  0
oFDH_HOOKSTAT_BYTECOUNTFAIL  EQU  1
oFDH_HOOKSTAT_GETPROTECTFAIL EQU  2
oFDH_HOOKSTAT_SETPROTECTFAIL EQU  3
oFDH_HOOKSTAT_DELETEFAIL     EQU  4
oFDH_HOOKSTAT_ADDPARTFAIL    EQU  5
oFDH_HOOKSTAT_oFCOPYMOVEFAIL EQU  6
oFDH_HOOKSTAT_SETCOMMENTFAIL EQU  7
oFDH_HOOKSTAT_CREATEDIRFAIL  EQU  8
oFDH_HOOKSTAT_PATTERNFAIL    EQU  9

** oFileDirHandleA() StatusHook: possible return codes **

oFDH_HOOK_RETURN_OK          EQU  0
oFDH_HOOK_RETURN_SKIP        EQU  1
oFDH_HOOK_RETURN_ABORT       EQU  2


** oFormatVarStrA() Tags; not for use with oFormatVarStrRDFA() **

oFVS_VarBuffer_0       EQU (TAG_USER+48)
oFVS_VarBuffer_1       EQU (TAG_USER+49)
oFVS_VarBuffer_2       EQU (TAG_USER+50)
oFVS_VarBuffer_3       EQU (TAG_USER+51)
oFVS_VarBuffer_4       EQU (TAG_USER+52)
oFVS_VarBuffer_5       EQU (TAG_USER+53)
oFVS_VarBuffer_6       EQU (TAG_USER+54)
oFVS_VarBuffer_7       EQU (TAG_USER+55)
oFVS_VarBuffer_8       EQU (TAG_USER+56)
oFVS_VarBuffer_9       EQU (TAG_USER+57)

** oFormatVarStrA() & oFormatVarStrRDFA() Tags **

oFVS_KeepVar           EQU (TAG_USER+1)

oFVS_VarBuffer_A       EQU (TAG_USER+65)
oFVS_VarBuffer_B       EQU (TAG_USER+66)
oFVS_VarBuffer_C       EQU (TAG_USER+67)
oFVS_VarBuffer_D       EQU (TAG_USER+68)
oFVS_VarBuffer_E       EQU (TAG_USER+69)
oFVS_VarBuffer_F       EQU (TAG_USER+70)
oFVS_VarBuffer_G       EQU (TAG_USER+71)
oFVS_VarBuffer_H       EQU (TAG_USER+72)
oFVS_VarBuffer_I       EQU (TAG_USER+73)
oFVS_VarBuffer_J       EQU (TAG_USER+74)
oFVS_VarBuffer_K       EQU (TAG_USER+75)
oFVS_VarBuffer_L       EQU (TAG_USER+76)
oFVS_VarBuffer_M       EQU (TAG_USER+77)
oFVS_VarBuffer_N       EQU (TAG_USER+78)
oFVS_VarBuffer_O       EQU (TAG_USER+79)
oFVS_VarBuffer_P       EQU (TAG_USER+80)
oFVS_VarBuffer_Q       EQU (TAG_USER+81)
oFVS_VarBuffer_R       EQU (TAG_USER+82)
oFVS_VarBuffer_S       EQU (TAG_USER+83)
oFVS_VarBuffer_T       EQU (TAG_USER+84)
oFVS_VarBuffer_U       EQU (TAG_USER+85)
oFVS_VarBuffer_V       EQU (TAG_USER+86)
oFVS_VarBuffer_W       EQU (TAG_USER+87)
oFVS_VarBuffer_X       EQU (TAG_USER+88)
oFVS_VarBuffer_Y       EQU (TAG_USER+89)
oFVS_VarBuffer_Z       EQU (TAG_USER+90)
oFVS_VarBuffer_a       EQU (TAG_USER+97)
oFVS_VarBuffer_b       EQU (TAG_USER+98)
oFVS_VarBuffer_c       EQU (TAG_USER+99)
oFVS_VarBuffer_d       EQU (TAG_USER+100)
oFVS_VarBuffer_e       EQU (TAG_USER+101)
oFVS_VarBuffer_f       EQU (TAG_USER+102)
oFVS_VarBuffer_g       EQU (TAG_USER+103)
oFVS_VarBuffer_h       EQU (TAG_USER+104)
oFVS_VarBuffer_i       EQU (TAG_USER+105)
oFVS_VarBuffer_j       EQU (TAG_USER+106)
oFVS_VarBuffer_k       EQU (TAG_USER+107)
oFVS_VarBuffer_l       EQU (TAG_USER+108)
oFVS_VarBuffer_m       EQU (TAG_USER+109)
oFVS_VarBuffer_n       EQU (TAG_USER+110)
oFVS_VarBuffer_o       EQU (TAG_USER+111)
oFVS_VarBuffer_p       EQU (TAG_USER+112)
oFVS_VarBuffer_q       EQU (TAG_USER+113)
oFVS_VarBuffer_r       EQU (TAG_USER+114)
oFVS_VarBuffer_s       EQU (TAG_USER+115)
oFVS_VarBuffer_t       EQU (TAG_USER+116)
oFVS_VarBuffer_u       EQU (TAG_USER+117)
oFVS_VarBuffer_v       EQU (TAG_USER+118)
oFVS_VarBuffer_w       EQU (TAG_USER+119)
oFVS_VarBuffer_x       EQU (TAG_USER+120)
oFVS_VarBuffer_y       EQU (TAG_USER+121)
oFVS_VarBuffer_z       EQU (TAG_USER+122)


** oFileToList() Tags **

oFTL_Buffer         EQU (TAG_USER+1)
oFTL_BufSize        EQU (TAG_USER+2)
oFTL_MsgWait        EQU (TAG_USER+3)
oFTL_NodeNameOffset EQU (TAG_USER+4)


** oGetFile() Tags **

oGFI_Pattern        EQU (TAG_USER+1)
oGFI_PubScreenName  EQU (TAG_USER+2)
oGFI_NoIcons        EQU (TAG_USER+3)
oGFI_DirsOnly       EQU (TAG_USER+4)


** oGetFont() Flags **

        BITDEF oGFO,FRONTPEN,0
        BITDEF oGFO,BACKPEN,1
        BITDEF oGFO,DRAWMODE,2
        BITDEF oGFO,STYLES,3


** oListToFile() Tags **

oLTF_Buffer         EQU (TAG_USER+1)
oLTF_BufSize        EQU (TAG_USER+2)
oLTF_MsgWait        EQU (TAG_USER+3)


** oLoadFileA() Tags **

oLF_MemPool   EQU (TAG_USER+1)
oLF_MemAttrs  EQU (TAG_USER+2)
oLF_KeepLock  EQU (TAG_USER+3)
oLF_KeepFH    EQU (TAG_USER+4)
oLF_Force     EQU (TAG_USER+5)


** oSaveFileA() Tags **

oSF_KeepFH    EQU (TAG_USER+1)
oSF_Overwrite EQU (TAG_USER+2)
oSF_Force     EQU (TAG_USER+3)


** oMemFile structure, as returned by oLoadFileA() **

        STRUCTURE oMemFile,0
        BPTR      omf_Lock           ; shared Lock if oLF_KeepLock was used, else NULL.
        BPTR      omf_FH             ; read FileHandle if oLF_KeepFH was used, else NULL.
        STRUCT    omf_FIB,fib_SIZEOF ; contains all file information as loaded.
        ULONG     omf_Pad            ; currently only used to QuadWord-align Body 
        ULONG     omf_Size           ; file size (equals oMemFile->FIB.fib_Size)
        APTR      omf_Body           ; the memory address of the file image.
        LABEL     omf_Image          ; the file image (Body) follows.
        LABEL     omf_SIZEOF


** oMatch() defines, as used with:
**
**   oBuildDirInfoA()
**   oSearchRecordA()
**
** If you're going to call a function which uses oMatch(), please also read the
** documentation of that function. It states which of the following match modes 
** and other defines are supported by the desired function, and about how to
** use it (maybe using special Tag defines).

oMATCHMODE_Byte       EQU 1
oMATCHMODE_Word       EQU 2
oMATCHMODE_Long       EQU 3
oMATCHMODE_QuadPtr    EQU 4
oMATCHMODE_StrBegin   EQU 5
oMATCHMODE_StrEnd     EQU 6
oMATCHMODE_StrAny     EQU 7
oMATCHMODE_StrExact   EQU 8
oMATCHMODE_StrPattern EQU 9


** oBuildDirInfoA() Tags **

oBDI_BuildDirTree  EQU (TAG_USER+1)
oBDI_MatchAny      EQU (TAG_USER+1000+oMATCHMODE_StrAny)
oBDI_MatchBegin    EQU (TAG_USER+1000+oMATCHMODE_StrBegin)
oBDI_MatchEnd      EQU (TAG_USER+1000+oMATCHMODE_StrEnd)
oBDI_MatchExact    EQU (TAG_USER+1000+oMATCHMODE_StrExact)
oBDI_MatchPattern  EQU (TAG_USER+1000+oMATCHMODE_StrPattern)
oBDI_CaseSensitive EQU (TAG_USER+7)
oBDI_Recursive     EQU (TAG_USER+8)
oBDI_ScanInfoHook  EQU (TAG_USER+9)
oBDI_ErrorHook     EQU (TAG_USER+10)
oBDI_SortOrder     EQU (TAG_USER+11)
oBDI_NoDirs        EQU (TAG_USER+12)
oBDI_NoFiles       EQU (TAG_USER+13)
oBDI_OnError       EQU (TAG_USER+14)

** oBuildDirInfoA() oBDI_SortOrder defines **

oBDISO_Mixed      EQU 0
oBDISO_DirsFirst  EQU 1
oBDISO_FilesFirst EQU 2

** oBuildDirInfoA() oBDI_OnError defines **

oBDION_Abort      EQU 0
oBDION_Break      EQU 1
oBDION_Continue   EQU 2

**  struct oDirInfo & struct oDirEntry, as created by oBuildDirInfoA(); this
**  structure comes filled with information which depends on the passed Tags.
**  For example, if you specify a file pattern, ByteCount holds the overall
**  byte count of all matching files instead of the whole path.

        STRUCTURE oDirInfo,0
        ULONG     odi_ByteCount    ; Overall byte size of all files stored in this
                                   ; directory. If oBDI_Recursive is set, all files
                                   ; in all sub-directories get added, too.

        ULONG     odi_FileCount    ; Number of files stored in this directory.
                                   ; If oBDI_Recursive is set, all files in all
                                   ; sub-directories get added, too.

        ULONG     odi_DirCount     ; Number of directories in this directory.
                                   ; If oBDI_Recursive is set, all directories in
                                   ; all sub-directories get added, too.

        LONG      odi_ErrorCode    ; AmigaDOS ErrorCode. This is what you get when
                                   ; calling IoErr() after oBuildDirInfoA().

        APTR      odi_DirTree      ; If oBDI_BuildDirTree is set, oBuildDirInfoA()
                                   ; builds up a directory tree using Nodes of
                                   ; struct oDirEntry type.
                                   ; If oBDI_Recursive is set, this List comes back
                                   ; in two dimensions, as explained below. Else,
                                   ; this field will be NULL. If you have specified
                                   ; a pattern, DirTree only contains matching entries.
                                   ; This pointer is an Exec List Header holding the
                                   ; oDirEntry Nodes.

        APTR      odi_DirTreePool  ; An Exec memory Pool, created by oBuildDirInfoA()
                                   ; if oBDI_BuildDirTree or oBDI_Recursive is set,
                                   ; else NULL.

        STRUCT    odi_ActualDir,256 ; This string contains the path which is currently
                                    ; being examined. If you're using a ScanInfo and/or
                                   ; Error Hook, it'll receive this string in A2.

        ; The following fields hold copies of the passed Tag data and other internal
        ; data used to save some Stack space when scanning recursively. You may refer
        ; to these fields after calling oBuildDirInfoA(), if you want.

        ULONG  odi_BuildDirTree
        APTR   odi_Pattern
        APTR   odi_PatternToken    ; (516 bytes) for pattern strings of max. 255+1 bytes
        ULONG  odi_MatchType       ; oMatch() compatible oMATCHMODE_Xxx value for file name matching
        ULONG  odi_MatchCase
        ULONG  odi_Recursive
        APTR   odi_ScanInfoHook
        APTR   odi_ErrorHook
        ULONG  odi_SortOrder
        ULONG  odi_NoDirs
        ULONG  odi_NoFiles
        ULONG  odi_OnError
        BPTR   odi_BaseDirLock
        ULONG  odi_RLevel          ; tmp. recursion count

        LABEL  odi_SIZEOF


** struct oDirEntry: the DirTree structure **

        STRUCTURE oDirEntry,0
        STRUCT    ode_ListNode,LN_SIZE  ; ln_Succ & ln_Pred point to the next/previous
                                        ; directory entries, while ln_Name points to
                                        ; fib_FileName.

        APTR      ode_Contents          ; This will be NULL if the current entry is a
                                        ; file. If it's a directory, Contents points one
                                        ; level down to it's contents. If the directory
                                        ; is empty, Contents is set to NULL.
                                        ; If oBDI_Recursive isn't set, Contents is
                                        ; always NULL.

        APTR      ode_Parent            ; This pointer is the counterpart to the Contents
                                        ; pointer, which holds the parent directory entry.
                                        ; If Parent is NULL, you have reached the topmost
                                        ; instance of the whole directory tree.
                                        ; If oBDI_Recursive isn't set, this field is
                                        ; always NULL.

        STRUCT    ode_FIB,fib_SIZEOF    ; Full FileInfoBlock copy of the current entry
                                        ; providing all available information.

        LABEL     ode_SIZEOF


** oGetMouse() Tags **

oGetMouse_X        EQU (TAG_USER+1)
oGetMouse_Y        EQU (TAG_USER+2)
oGetMouse_Screen   EQU (TAG_USER+3)
oGetMouse_Window   EQU (TAG_USER+4)
oGetMouse_LMB      EQU (TAG_USER+5)
oGetMouse_RMB      EQU (TAG_USER+6)
oGetMouse_MMB      EQU (TAG_USER+7)


** oLoadPrefs() / oSavePrefs() file structure **

;  The following struct explains the contents of files created by oSavePrefs().
;  Your application won't need this anyway, but if you like details, here
;  they are. Note that things may change in the future, so do not handle
;  the files yourself if your application shall stay future compatible.

        STRUCTURE oPRFHeader,0      ; Prefs file header as created by oSavePrefs()
        ULONG   ophd_FORMID         ; "FORM" IFF identifier
        ULONG   ophd_FORMSize       ; == (file size - 8)
        ULONG   ophd_PREFID         ; "PREF" Amiga Prefs file identifier
        ULONG   ophd_PRHDID         ; "PRHD" PrefHeader Chunk ID
        ULONG   ophd_PRHDSize       ; "PRHD" Chunk size == sizeof(struct PrefHeader)
        STRUCT  ophd_PrefHeader,PrefHeader_SIZEOF ; struct PrefHeader
        ULONG   ophd_OUID           ; "oPRF" declares this file as created using oSavePrefs()
        ULONG   ophd_ChunkSize      ; currently 146 bytes + body size; body is always LONG-aligned
        UWORD   ophd_oPRFVersion    ; oPRF file version number for internal use; currently == 1.
        STRUCT  ophd_ObjectName,32  ; Object name as passed to oSavePrefs()
        ULONG   ophd_ObjectVersion  ; Object version number as passed to oSavePrefs()
        ULONG   ophd_ObjectRevision ; Object revision number as passed to oSavePrefs()
        STRUCT  ophd_VerString,80   ; Standard Amiga version string
        ULONG   ophd_GroupID        ; GroupID as declared by the application
        ULONG   ophd_SubID          ; SubID as declared by the application
        ULONG   ophd_SubSize        ; Size of the application data part (body) which
                                    ; begins directly behind the oPRFHeader.
        ULONG   ophd_SubRealSize    ; Real body size after decompression; if there's no
                                    ; compression, SubRealSize equals SubSize.
        ULONG   ophd_Compression    ; Used compression method. Currently there's none, so this
                                    ; is currently NULL (no compression).
        ULONG   ophd_CRC32          ; 32-bit CRC checksum of the body which follows the oPRFHeader (after decompression)
        LABEL   ophd_SIZEOF

oPRF_OBJNAME_MAXLEN EQU 79  ; 79 chars + null-byte, as defined in the structure above
oPRF_VERSTR_MAXLEN  EQU 31  ; 31 chars + null-byte, as defined in the structure above


** oRequestLibA() Tags **

oRL_TitleText      EQU (TAG_USER+1)
oRL_DefaultName    EQU (TAG_USER+2)
oRL_FilePattern    EQU (TAG_USER+3)


** Random Seed **

  STRUCTURE oRndSeed,0
    ULONG   ors_RndSeed       ; current RndSeed value
    ULONG   ors_RenewRate     ; RndSeed renew rate (see autodoc description)
    ULONG   ors_RenewCount    ; If RenewCount reaches RenewRate, RenewCount gets
                              ; reset and RndSeed gets renewed by adding the new
                              ; system time (micro seconds).
    ULONG   ors_Add           ; Add Value for oRandom()
    UWORD   ors_Mult          ; Multiply Value for oRandom()
    LABEL   ors_SIZEOF


** oCreateStatusBarA() Tags **

oSTB_MaxValue    EQU     (TAG_USER+1)
oSTB_DrawBorder  EQU     (TAG_USER+2)


** oDeleteStatusBar() Erase values **

oSTB_ERASEBAR    EQU  1
oSTB_ERASEALL    EQU  2


** oStatusBar structure (read only) **

  STRUCTURE  oStatusBar,0
       APTR  osb_RPort       ; Window RastPort
       APTR  osb_VisualInfo  ; Screen VisualInfo
       WORD  osb_Left        ; Left edge in RastPort
       WORD  osb_Top         ; Top edge in RastPort
       WORD  osb_Width       ; Width
       WORD  osb_Height      ; Height
       ULONG osb_MaxValue    ; Maximum value (for 100%)
       ULONG osb_LastWidth   ; Last (current) value
       WORD  osb_HasBorder   ; TRUE or FALSE
      LABEL  osb_SIZEOF               


** Flags for oNumToStr() and oNum64ToStr() **
** Note: flags marked with "(-)" are not available for oNum64ToStr(). **

        BITDEF  oNTS,HEX,0           ; (-) Output hex string
        BITDEF  oNTS,BIN,1           ; (-) Output binary string
        BITDEF  oNTS,WORD,2          ; (-) Output size WORD
        BITDEF  oNTS,BYTE,3          ; (-) Output size BYTE
        BITDEF  oNTS,LEADINGZEROES,4 ; (+) Output leading zeroes
        BITDEF  oNTS,LEADINGSIGN,5   ; (+) Add leading numeric system sign
        BITDEF  oNTS,RIGHTFORMAT,6   ; (+) Right formatted output
        BITDEF  oNTS,LEFTFORMAT,7    ; (+) Left formatted output
        BITDEF  oNTS,CENTERFORMAT,8  ; (+) Center formatted output
        BITDEF  oNTS,TENDLEFT,9      ; (+) Left tendence center formatting
        BITDEF  oNTS,LOWERCASE,10    ; (-) Hex characters lowercase
        BITDEF  oNTS,GROUPING,11     ; (+) Separate digit groups
        BITDEF  oNTS,NUMLOCALE,12    ; (+) Use numeric Locale group separator
        BITDEF  oNTS,MONLOCALE,13    ; (+) Use monetary Locale group separator
        BITDEF  oNTS,SIGNED,14       ; (+) Handle value as signed number
        BITDEF  oNTS,PLUSSIGN,15     ; (+) Use "+" char for signed pos. values
        BITDEF  oNTS,SWAPSIGNS,16    ; (+) Swap "-/+/ " and "#/$/%" positions


** oSearchRecordA() Tags **

oSR_CaseSensitive        EQU (TAG_USER+1)
oSR_Pointer              EQU (TAG_USER+2)
oSR_StartNode            EQU (TAG_USER+3)
oSR_Exclusive            EQU (TAG_USER+4)
oSR_Up                   EQU (TAG_USER+5)


** oSetFileExtension() Flags **

        BITDEF oSFE,REPLACELAST,0    ; replace rightmost extension with new extension
        BITDEF oSFE,REPLACEALL,1     ; replace all extensions with new extension
        BITDEF oSFE,RENAME,2         ; rename file on disk


** oSortList() **

** Size for oSL_Buffer **

oSORTBUFFER_SIZE  EQU  2048

** oSortList() Modes **

oSORTMODE_STRING  EQU 1
oSORTMODE_BYTE    EQU 2
oSORTMODE_WORD    EQU 3
oSORTMODE_LONG    EQU 4
oSORTMODE_QUAD    EQU 5

** oSortList() Tags **

oSL_Padout        EQU (TAG_USER+1)
oSL_Table         EQU (TAG_USER+2)
oSL_Signed        EQU (TAG_USER+3)
oSL_Downward      EQU (TAG_USER+4)
oSL_Pointer       EQU (TAG_USER+5)
oSL_Buffer        EQU (TAG_USER+6)


** oSuggestWindowPos() Tags **

oSWP_MouseGadget EQU (TAG_USER+1)


** oMsgWait structure (read only) **

      STRUCTURE oMsgWait,0
       APTR     omw_Window
       APTR     omw_VisualInfo
       APTR     omw_GList
       APTR     omw_StatusBar
       APTR     omw_BodyText
       STRUCT   omw_GadgetFont,ta_SIZEOF
       UWORD    omw_IECode
      LABEL     omw_SIZEOF


** oLockWindow() Window Lock structure **

      STRUCTURE oWindowLock,0
       APTR     owl_Window
       ULONG    owl_OldIDCMPFlags
       LONG     owl_MinWidth
       LONG     owl_MinHeight
       LONG     owl_MaxWidth
       LONG     owl_MaxHeight
       UBYTE    owl_SizeFix
      LABEL     owl_SIZEOF


** Library base **

** Fields declared as private ARE private. Do not use 'em. **

 STRUCTURE OpenUtilLibrary,LIB_SIZE

   * LIBRARY PRIVATE *

   UBYTE   OU_Flags                ; see also:
   UBYTE   OU_pad                  ; "sample.library.asm", documented in the
   BPTR    OU_SegList              ; Amiga ROM Kernel Reference Manual: Libraries

   * PUBLIC FIELDS *               ; may be READ from your program

   APTR    OU_SysBase              ; exec.library Base            V39+
   APTR    OU_DOSBase              ; dos.library Base             V39+
   APTR    OU_GfxBase              ; graphics.library Base        V39+
   APTR    OU_LocaleBase           ; locale.library Base          V39+
   APTR    OU_AslBase              ; asl.library Base             V39+
   APTR    OU_TimerBase            ; timer.device Library Base   (V39+)
   APTR    OU_IconBase             ; icon.library Base            V39+
   APTR    OU_InputBase            ; input.device Library Base   (V39+)
   APTR    OU_IntuitionBase        ; intuition.library Base       V39+
   APTR    OU_UtilityBase          ; utility.library Base         V39+
   APTR    OU_GadToolsBase         ; gadtools.library Base        V39+

   APTR    OU_LowerCaseTable       ; standard string to lower-case translation table
   APTR    OU_UpperCaseTable       ; standard string to upper-case translation table
   APTR    OU_PutChProc            ; PutChProc() for RawDoFmt()
   APTR    OU_Topaz8               ; Standard TextAttr structure for topaz.font 8

   * PRIVATE FIELDS *

   STRUCT  OU_InputIO,IOSTD_SIZE   ; unused IORequest for input.library functions
   STRUCT  OU_TimerIO,IOTV_SIZE    ; unused IORequest for timer.library functions

   * PUBLIC FIELDS (V2) *

   APTR    OU_ConsoleBase          ; console.device Library Base (V39+)
   APTR    OU_CxBase               ; commodities.library Base     V39+
   APTR    OU_DiskfontBase         ; diskfont.library Base        V39+
   APTR    OU_ExpansionBase        ; expansion.library Base       V39+
   APTR    OU_IFFParseBase         ; iffparse.library Base        V39+
   APTR    OU_KeymapBase           ; keymap.library Base          V37+
   APTR    OU_LayersBase           ; layers.library Base          V39+

   STRUCT  OU_ConsoleIO,IOSTD_SIZE ; unused IORequest for console.library functions

   APTR    OU_IntuitionName        ; intuition.library name
   APTR    OU_AslName              ; asl.library name
   APTR    OU_CxName               ; commodities.library name
   APTR    OU_DiskfontName         ; diskfont.library name
   APTR    OU_DOSName              ; dos.library name
   APTR    OU_ExpansionName        ; expansion.library name
   APTR    OU_GadToolsName         ; gadtools.library name
   APTR    OU_GfxName              ; graphics.library name
   APTR    OU_IconName             ; icon.library name
   APTR    OU_IFFParseName         ; iffparse.library name
   APTR    OU_KeymapName           ; keymap.library name
   APTR    OU_LayersName           ; layers.library name
   APTR    OU_LocaleName           ; locale.library name
   APTR    OU_SysName              ; exec.library name
   APTR    OU_UtilityName          ; utility.library name
   APTR    OU_ConsoleName          ; console.library name
   APTR    OU_InputName            ; input.library name
   APTR    OU_TimerName            ; timer.library name

   LABEL   OU_SIZEOF

 ENDC    ; LIBRARIES_OPENUTIL_I
