Annotation of XNU/bsd/hfs/hfs_macos_defs.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             6:  * The contents of this file constitute Original Code as defined in and
        !             7:  * are subject to the Apple Public Source License Version 1.1 (the
        !             8:  * "License").  You may not use this file except in compliance with the
        !             9:  * License.  Please obtain a copy of the License at
        !            10:  * http://www.apple.com/publicsource and read it before using this file.
        !            11:  * 
        !            12:  * This Original Code and all software distributed under the License are
        !            13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
        !            14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
        !            15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
        !            16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
        !            17:  * License for the specific language governing rights and limitations
        !            18:  * under the License.
        !            19:  * 
        !            20:  * @APPLE_LICENSE_HEADER_END@
        !            21:  */
        !            22: /*
        !            23:        File:           hfs_macos_types.h
        !            24:  
        !            25:        Contains:       Basic Macintosh OS data types.
        !            26:  
        !            27:        Version:        System 7.5
        !            28:  
        !            29:        DRI:            Nick Kledzik
        !            30:  
        !            31:        Warning:        *** APPLE INTERNAL USE ONLY ***
        !            32:                                This file may contain unreleased API's
        !            33:                                
        !            34:                                This file is not to be exported
        !            35:        History:
        !            36:        12-Aug-1999     Scott Roberts   Created from ConditionalMacros.h, MacOSStubs.h, MacOSTypes.h
        !            37: 
        !            38:  
        !            39:  
        !            40: */
        !            41: 
        !            42: 
        !            43: #ifndef __hfs_macos_types__
        !            44: #define __hfs_macos_types__
        !            45: 
        !            46: 
        !            47: #include <sys/param.h>
        !            48:        #ifdef KERNEL
        !            49:        #include <libkern/libkern.h>
        !            50:        #include <sys/systm.h>
        !            51:        #endif
        !            52: 
        !            53: #include <sys/types.h>
        !            54: #include <sys/time.h>
        !            55: #include <sys/proc.h>
        !            56: #include <sys/lock.h>
        !            57: 
        !            58: /****** START OF CONDITIONALMACROS *********/
        !            59: 
        !            60:        #if defined(__ppc__) || defined(powerpc) || defined(ppc)
        !            61:                #define TARGET_CPU_PPC                  1
        !            62:                #define TARGET_CPU_68K                  0
        !            63:                #define TARGET_CPU_X86                  0
        !            64:                #define TARGET_CPU_MIPS                 0
        !            65:                #define TARGET_CPU_SPARC                0   
        !            66:                #define TARGET_CPU_ALPHA                0
        !            67:                #define TARGET_RT_MAC_CFM               0
        !            68:                #define TARGET_RT_MAC_MACHO             1
        !            69:                #define TARGET_RT_MAC_68881             0
        !            70:                #define TARGET_RT_LITTLE_ENDIAN 0
        !            71:                #define TARGET_RT_BIG_ENDIAN    1
        !            72:        #elif defined(m68k)
        !            73:                #define TARGET_CPU_PPC                  0
        !            74:                #define TARGET_CPU_68K                  1
        !            75:                #define TARGET_CPU_X86                  0
        !            76:                #define TARGET_CPU_MIPS                 0
        !            77:                #define TARGET_CPU_SPARC                0   
        !            78:                #define TARGET_CPU_ALPHA                0
        !            79:                #define TARGET_RT_MAC_CFM               0
        !            80:                #define TARGET_RT_MAC_MACHO             1
        !            81:                #define TARGET_RT_MAC_68881             0
        !            82:                #define TARGET_RT_LITTLE_ENDIAN 0
        !            83:                #define TARGET_RT_BIG_ENDIAN    1
        !            84:        #elif defined(sparc)
        !            85:                #define TARGET_CPU_PPC                  0
        !            86:                #define TARGET_CPU_68K                  0
        !            87:                #define TARGET_CPU_X86                  0
        !            88:                #define TARGET_CPU_MIPS                 0
        !            89:                #define TARGET_CPU_SPARC                1
        !            90:                #define TARGET_CPU_ALPHA                0
        !            91:                #define TARGET_RT_MAC_CFM               0
        !            92:                #define TARGET_RT_MAC_MACHO             1
        !            93:                #define TARGET_RT_MAC_68881             0
        !            94:                #define TARGET_RT_LITTLE_ENDIAN 0
        !            95:                #define TARGET_RT_BIG_ENDIAN    1
        !            96:        #elif defined(__i386__) || defined(i386) || defined(intel)
        !            97:                #define TARGET_CPU_PPC                  0
        !            98:                #define TARGET_CPU_68K                  0
        !            99:                #define TARGET_CPU_X86                  1
        !           100:                #define TARGET_CPU_MIPS                 0
        !           101:                #define TARGET_CPU_SPARC                0
        !           102:                #define TARGET_CPU_ALPHA                0
        !           103:                #define TARGET_RT_MAC_CFM               0
        !           104:                #define TARGET_RT_MAC_MACHO             1
        !           105:                #define TARGET_RT_MAC_68881             0
        !           106:                #define TARGET_RT_LITTLE_ENDIAN 1
        !           107:                #define TARGET_RT_BIG_ENDIAN    0
        !           108:        #else
        !           109:                #error unrecognized GNU C compiler
        !           110:        #endif
        !           111: 
        !           112: 
        !           113:        #define TARGET_OS_MAC                           0
        !           114:        #define TARGET_OS_WIN32                         0
        !           115:        #define TARGET_OS_UNIX                          0
        !           116: 
        !           117:        #define PRAGMA_IMPORT                           0
        !           118:        #define PRAGMA_STRUCT_ALIGN                     1
        !           119:        #define PRAGMA_ONCE                                     0
        !           120:        #define PRAGMA_STRUCT_PACK                      0
        !           121:        #define PRAGMA_STRUCT_PACKPUSH          0
        !           122:        #define PRAGMA_ENUM_PACK                        0
        !           123:        #define PRAGMA_ENUM_ALWAYSINT           0
        !           124:        #define PRAGMA_ENUM_OPTIONS                     0
        !           125:        #define FOUR_CHAR_CODE(x)                       (x)
        !           126: 
        !           127:        #define TYPE_EXTENDED                           0
        !           128:        #if __GNUC__ >= 2
        !           129:                #define TYPE_LONGLONG                   1
        !           130:        #else
        !           131:                #define TYPE_LONGLONG                   0
        !           132:        #endif
        !           133:        #ifdef __cplusplus
        !           134:                #define TYPE_BOOL                               1
        !           135:        #else
        !           136:                #define TYPE_BOOL                               0
        !           137:        #endif
        !           138:        
        !           139:        #define FUNCTION_PASCAL                         0
        !           140:        #define FUNCTION_DECLSPEC                       0
        !           141:        #define FUNCTION_WIN32CC                        0                       
        !           142: 
        !           143: 
        !           144:        #define EXTERN_API(_type)                                               extern _type
        !           145:        #define EXTERN_API_C(_type)                                             extern _type
        !           146:        #define EXTERN_API_STDCALL(_type)                               extern _type
        !           147:        #define EXTERN_API_C_STDCALL(_type)                             extern _type
        !           148:        
        !           149:        #define DEFINE_API(_type)                                               _type
        !           150:        #define DEFINE_API_C(_type)                                             _type
        !           151:        #define DEFINE_API_STDCALL(_type)                               _type
        !           152:        #define DEFINE_API_C_STDCALL(_type)                             _type
        !           153: 
        !           154:        #define CALLBACK_API(_type, _name)                              _type ( * _name)
        !           155:        #define CALLBACK_API_C(_type, _name)                    _type ( * _name)
        !           156:        #define CALLBACK_API_STDCALL(_type, _name)              _type ( * _name)
        !           157:        #define CALLBACK_API_C_STDCALL(_type, _name)    _type ( * _name)
        !           158:        
        !           159:        #define TARGET_API_MACOS_X 1
        !           160:        #define TARGET_API_MAC_OS8 0
        !           161:        #define TARGET_API_MAC_CARBON 0
        !           162:        
        !           163:        #define ONEWORDINLINE(w1)
        !           164:        #define TWOWORDINLINE(w1,w2)
        !           165:        #define THREEWORDINLINE(w1,w2,w3)
        !           166:        #define FOURWORDINLINE(w1,w2,w3,w4)
        !           167:        #define FIVEWORDINLINE(w1,w2,w3,w4,w5)
        !           168:        #define SIXWORDINLINE(w1,w2,w3,w4,w5,w6)
        !           169:        #define SEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7)
        !           170:        #define EIGHTWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8)
        !           171:        #define NINEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9)
        !           172:        #define TENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10)
        !           173:        #define ELEVENWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11)
        !           174:        #define TWELVEWORDINLINE(w1,w2,w3,w4,w5,w6,w7,w8,w9,w10,w11,w12)
        !           175:        
        !           176: 
        !           177: /****** START OF MACOSTYPES *********/
        !           178: 
        !           179: 
        !           180: /*
        !           181:    4.4BSD's sys/types.h defines size_t without defining __size_t__:
        !           182:    Things are a lot clearer from here on if we define __size_t__ now.
        !           183:  */
        !           184: #define __size_t__
        !           185: 
        !           186: /*
        !           187:        Convert kernel's diagnostic flag to MacOS's
        !           188: */
        !           189: #if HFS_DIAGNOSTIC
        !           190:     #define DEBUG_BUILD 1
        !           191: #else
        !           192:     #define DEBUG_BUILD 0
        !           193: #endif /* DIAGNOSTIC */
        !           194: 
        !           195: /********************************************************************************
        !           196: 
        !           197:        Special values in C
        !           198:        
        !           199:                NULL            The C standard for an impossible pointer value
        !           200:                nil                     A carry over from pascal, NULL is prefered for C
        !           201:                
        !           202: *********************************************************************************/
        !           203: #ifndef NULL
        !           204:        #define NULL 0
        !           205: #endif
        !           206: 
        !           207: #ifndef nil
        !           208:        #define nil NULL
        !           209: #endif
        !           210: 
        !           211: 
        !           212: /********************************************************************************
        !           213: 
        !           214:        Base integer types for all target OS's and CPU's
        !           215:        
        !           216:                UInt8                    8-bit unsigned integer 
        !           217:                SInt8                    8-bit signed integer
        !           218:                UInt16                  16-bit unsigned integer 
        !           219:                SInt16                  16-bit signed integer                   
        !           220:                UInt32                  32-bit unsigned integer 
        !           221:                SInt32                  32-bit signed integer   
        !           222:                UInt64                  64-bit unsigned integer 
        !           223:                SInt64                  64-bit signed integer   
        !           224: 
        !           225: *********************************************************************************/
        !           226: typedef u_int8_t                                       UInt8;
        !           227: typedef int8_t                                         SInt8;
        !           228: typedef u_int16_t                                      UInt16;
        !           229: typedef int16_t                                        SInt16;
        !           230: typedef u_int32_t                                      UInt32;
        !           231: typedef int32_t                                        SInt32;
        !           232: typedef u_int64_t                                      UInt64;
        !           233: typedef int64_t                                        SInt64;
        !           234: 
        !           235: 
        !           236: 
        !           237: /********************************************************************************
        !           238: 
        !           239:        Base floating point types 
        !           240:        
        !           241:                Float32                 32 bit IEEE float:  1 sign bit, 8 exponent bits, 23 fraction bits
        !           242:                Float64                 64 bit IEEE float:  1 sign bit, 11 exponent bits, 52 fraction bits      
        !           243:                Float80                 80 bit MacOS float: 1 sign bit, 15 exponent bits, 1 integer bit, 63 fraction bits
        !           244:                Float96                 96 bit 68881 float: 1 sign bit, 15 exponent bits, 16 pad bits, 1 integer bit, 63 fraction bits
        !           245:                
        !           246:        Note: These are fixed size floating point types, useful when writing a floating
        !           247:                  point value to disk.  If your compiler does not support a particular size 
        !           248:                  float, a struct is used instead.
        !           249:                  Use of of the NCEG types (e.g. double_t) or an ANSI C type (e.g. double) if
        !           250:                  you want a floating point representation that is natural for any given
        !           251:                  compiler, but might be a different size on different compilers.
        !           252: 
        !           253: *********************************************************************************/
        !           254: typedef float                          Float32;
        !           255: typedef double                         Float64;
        !           256: 
        !           257: struct Float80 {
        !           258:        SInt16  exp;
        !           259:        UInt16  man[4];
        !           260: };
        !           261: typedef struct Float80 Float80;
        !           262: 
        !           263: struct Float96 {
        !           264:        SInt16  exp[2];         /* the second 16-bits is always zero */
        !           265:        UInt16  man[4];
        !           266: };
        !           267: typedef struct Float96 Float96;
        !           268: 
        !           269: 
        !           270: 
        !           271: /********************************************************************************
        !           272: 
        !           273:        MacOS Memory Manager types
        !           274:        
        !           275:                Ptr                             Pointer to a non-relocatable block
        !           276:                Handle                  Pointer to a master pointer to a relocatable block
        !           277:                Size                    The number of bytes in a block (signed for historical reasons)
        !           278:                
        !           279: *********************************************************************************/
        !           280: typedef char *                                                 Ptr;
        !           281: typedef Ptr *                                                  Handle;
        !           282: typedef long                                                   Size;
        !           283: /********************************************************************************
        !           284: 
        !           285:        Higher level basic types
        !           286:        
        !           287:                OSErr                                   16-bit result error code
        !           288:                OSStatus                                32-bit result error code
        !           289:                LogicalAddress                  Address in the clients virtual address space
        !           290:                ConstLogicalAddress             Address in the clients virtual address space that will only be read
        !           291:                PhysicalAddress                 Real address as used on the hardware bus
        !           292:                BytePtr                                 Pointer to an array of bytes
        !           293:                ByteCount                               The size of an array of bytes
        !           294:                ByteOffset                              An offset into an array of bytes
        !           295:                ItemCount                               32-bit iteration count
        !           296:                OptionBits                              Standard 32-bit set of bit flags
        !           297:                PBVersion                               ?
        !           298:                Duration                                32-bit millisecond timer for drivers
        !           299:                AbsoluteTime                    64-bit clock
        !           300:                ScriptCode                              The coarse features of a written language (e.g. Roman vs Cyrillic)
        !           301:                LangCode                                A particular language (e.g. English)
        !           302:                RegionCode                              A variation of a language (British vs American English)
        !           303:                FourCharCode                    A 32-bit value made by packing four 1 byte characters together
        !           304:                OSType                                  A FourCharCode used in the OS and file system (e.g. creator)
        !           305:                ResType                                 A FourCharCode used to tag resources (e.g. 'DLOG')
        !           306:                
        !           307: *********************************************************************************/
        !           308: typedef SInt16                                                         OSErr;
        !           309: typedef SInt32                                                         OSStatus;
        !           310: typedef void *                                                 LogicalAddress;
        !           311: typedef const void *                                   ConstLogicalAddress;
        !           312: typedef void *                                                 PhysicalAddress;
        !           313: typedef UInt8 *                                                        BytePtr;
        !           314: typedef UInt32                                                         ByteCount;
        !           315: typedef UInt32                                                         ByteOffset;
        !           316: typedef SInt32                                                         Duration;
        !           317: typedef UInt64                                                 AbsoluteTime;
        !           318: typedef UInt32                                                         OptionBits;
        !           319: typedef UInt32                                                         ItemCount;
        !           320: typedef UInt32                                                         PBVersion;
        !           321: typedef SInt16                                                         ScriptCode;
        !           322: typedef SInt16                                                         LangCode;
        !           323: typedef SInt16                                                         RegionCode;
        !           324: typedef unsigned long                                  FourCharCode;
        !           325: typedef FourCharCode                                   OSType;
        !           326: typedef FourCharCode                                   ResType;
        !           327: typedef OSType *                                               OSTypePtr;
        !           328: typedef ResType *                                              ResTypePtr;
        !           329: 
        !           330: 
        !           331: /********************************************************************************
        !           332: 
        !           333:        Boolean types and values
        !           334:        
        !           335:                Boolean                 A one byte value, holds "false" (0) or "true" (1)
        !           336:                false                   The Boolean value of zero (0)
        !           337:                true                    The Boolean value of one (1)
        !           338:                
        !           339: *********************************************************************************/
        !           340: /*
        !           341:        The identifiers "true" and "false" are becoming keywords in C++
        !           342:        and work with the new built-in type "bool"
        !           343:        "Boolean" will remain an unsigned char for compatibility with source
        !           344:        code written before "bool" existed.
        !           345: */
        !           346: #if !TYPE_BOOL
        !           347: 
        !           348: enum {
        !           349:        false                                           = 0,
        !           350:        true                                            = 1
        !           351: };
        !           352: 
        !           353: #endif  /*  !TYPE_BOOL */
        !           354: 
        !           355: typedef unsigned char                                  Boolean;
        !           356: 
        !           357: 
        !           358: /********************************************************************************
        !           359: 
        !           360:        Function Pointer Types
        !           361:        
        !           362:                ProcPtr                                 Generic pointer to a function
        !           363:                Register68kProcPtr              Pointer to a 68K function that expects parameters in registers
        !           364:                UniversalProcPtr                Pointer to classic 68K code or a RoutineDescriptor
        !           365:                
        !           366:                ProcHandle                              Pointer to a ProcPtr
        !           367:                UniversalProcHandle             Pointer to a UniversalProcPtr
        !           368:                
        !           369: *********************************************************************************/
        !           370: typedef long (*ProcPtr)();
        !           371: typedef void (*Register68kProcPtr)();
        !           372: 
        !           373: typedef ProcPtr                                                UniversalProcPtr;
        !           374: 
        !           375: typedef ProcPtr *                                              ProcHandle;
        !           376: typedef UniversalProcPtr *                             UniversalProcHandle;
        !           377: 
        !           378: /********************************************************************************
        !           379: 
        !           380:        Quickdraw Types
        !           381:        
        !           382:                Point                           2D Quickdraw coordinate, range: -32K to +32K
        !           383:                Rect                            Rectangluar Quickdraw area
        !           384:                Style                           Quickdraw font rendering styles
        !           385:                StyleParameter          Style when used as a parameter (historical 68K convention)
        !           386:                StyleField                      Style when used as a field (historical 68K convention)
        !           387:                CharParameter           Char when used as a parameter (historical 68K convention)
        !           388:                
        !           389:        Note:   The original Macintosh toolbox in 68K Pascal defined Style as a SET.  
        !           390:                        Both Style and CHAR occupy 8-bits in packed records or 16-bits when 
        !           391:                        used as fields in non-packed records or as parameters. 
        !           392:                
        !           393: *********************************************************************************/
        !           394: struct Point {
        !           395:        short                                                   v;
        !           396:        short                                                   h;
        !           397: };
        !           398: typedef struct Point Point;
        !           399: 
        !           400: typedef Point *                                                        PointPtr;
        !           401: struct Rect {
        !           402:        short                                                   top;
        !           403:        short                                                   left;
        !           404:        short                                                   bottom;
        !           405:        short                                                   right;
        !           406: };
        !           407: typedef struct Rect Rect;
        !           408: 
        !           409: typedef Rect *                                                 RectPtr;
        !           410: typedef short                                                  CharParameter;
        !           411: 
        !           412: enum {
        !           413:        normal                                          = 0,
        !           414:        bold                                            = 1,
        !           415:        italic                                          = 2,
        !           416:        underline                                       = 4,
        !           417:        outline                                         = 8,
        !           418:        shadow                                          = 0x10,
        !           419:        condense                                        = 0x20,
        !           420:        extend                                          = 0x40
        !           421: };
        !           422: 
        !           423: typedef unsigned char                                  Style;
        !           424: typedef short                                                  StyleParameter;
        !           425: typedef Style                                                  StyleField;
        !           426: 
        !           427: 
        !           428: /********************************************************************************
        !           429: 
        !           430:        Common Constants
        !           431:        
        !           432:                noErr                                   OSErr: function performed properly - no error
        !           433:                kNilOptions                             OptionBits: all flags false
        !           434:                kInvalidID                              KernelID: NULL is for pointers as kInvalidID is for ID's
        !           435:                kVariableLengthArray    array bounds: variable length array
        !           436: 
        !           437:        Note: kVariableLengthArray is used in array bounds to specify a variable length array.
        !           438:                  It is ususally used in variable length structs when the last field is an array
        !           439:                  of any size.  Before ANSI C, we used zero as the bounds of variable length 
        !           440:                  array, but zero length array are illegal in ANSI C.  Example usage:
        !           441:        
        !           442:                struct FooList 
        !           443:                {
        !           444:                        short   listLength;
        !           445:                        Foo             elements[kVariableLengthArray];
        !           446:                };
        !           447:                
        !           448: *********************************************************************************/
        !           449: 
        !           450: enum {
        !           451:        noErr                                           = 0
        !           452: };
        !           453: 
        !           454: 
        !           455: enum {
        !           456:        kNilOptions                                     = 0
        !           457: };
        !           458: 
        !           459: #define kInvalidID      0
        !           460: 
        !           461: enum {
        !           462:        kVariableLengthArray            = 1
        !           463: };
        !           464: 
        !           465: 
        !           466: 
        !           467: /********************************************************************************
        !           468: 
        !           469:        String Types
        !           470:        
        !           471:                UniChar                                 A single UniCode character (16-bits)
        !           472: 
        !           473:                StrNNN                                  Pascal string holding up to NNN bytes
        !           474:                StringPtr                               Pointer to a pascal string
        !           475:                StringHandle                    Pointer to a StringPtr
        !           476:                ConstStrNNNParam                For function parameters only - means string is const
        !           477:                
        !           478:                CStringPtr                              Pointer to a C string       (same as:  char*)
        !           479:                ConstCStringPtr                 Pointer to a const C string (same as:  const char*)
        !           480:                
        !           481:        Note: The length of a pascal string is stored in the first byte.
        !           482:                  A pascal string does not have a termination byte and can be at most 255 bytes long.
        !           483:                  The first character in a pascal string is offset one byte from the start of the string. 
        !           484:                  
        !           485:                  A C string is terminated with a byte of value zero.  
        !           486:                  A C string has no length limitation.
        !           487:                  The first character in a C string is the first byte of the string. 
        !           488:                  
        !           489:                
        !           490: *********************************************************************************/
        !           491: typedef UInt16                                                         UniChar;
        !           492: typedef unsigned char                                  Str255[256];
        !           493: typedef unsigned char                                  Str63[64];
        !           494: typedef unsigned char                                  Str32[33];
        !           495: typedef unsigned char                                  Str31[32];
        !           496: typedef unsigned char                                  Str27[28];
        !           497: typedef unsigned char                                  Str15[16];
        !           498: /*
        !           499:        The type Str32 is used in many AppleTalk based data structures.
        !           500:        It holds up to 32 one byte chars.  The problem is that with the
        !           501:        length byte it is 33 bytes long.  This can cause weird alignment
        !           502:        problems in structures.  To fix this the type "Str32Field" has
        !           503:        been created.  It should only be used to hold 32 chars, but
        !           504:        it is 34 bytes long so that there are no alignment problems.
        !           505: */
        !           506: typedef unsigned char                                  Str32Field[34];
        !           507: typedef unsigned char *                                        StringPtr;
        !           508: typedef StringPtr *                                            StringHandle;
        !           509: typedef const unsigned char *                  ConstStr255Param;
        !           510: typedef const unsigned char *                  ConstStr63Param;
        !           511: typedef const unsigned char *                  ConstStr32Param;
        !           512: typedef const unsigned char *                  ConstStr31Param;
        !           513: typedef const unsigned char *                  ConstStr27Param;
        !           514: typedef const unsigned char *                  ConstStr15Param;
        !           515: #ifdef __cplusplus
        !           516: inline unsigned char StrLength(ConstStr255Param string) { return (*string); }
        !           517: #else
        !           518: #define StrLength(string) (*(unsigned char *)(string))
        !           519: #endif  /*  defined(__cplusplus)  */
        !           520: 
        !           521: typedef const unsigned char *                  ConstUTF8Param;
        !           522: 
        !           523: /*********************************************************************************
        !           524: 
        !           525:        Old names for types
        !           526:                
        !           527: *********************************************************************************/
        !           528: typedef UInt8                                                  Byte;
        !           529: typedef SInt8                                                  SignedByte;
        !           530: typedef SInt64 *                                               WidePtr;
        !           531: typedef UInt64 *                                               UnsignedWidePtr;
        !           532: typedef Float80                                                extended80;
        !           533: typedef Float96                                                extended96;
        !           534: typedef SInt8                                                  VHSelect;
        !           535: 
        !           536: 
        !           537: EXTERN_API( void )
        !           538: DebugStr                                               (ConstStr255Param               debuggerMsg);
        !           539: 
        !           540: /*********************************************************************************
        !           541: 
        !           542:        Added types for HFSPlus MacOS X functionality. Needs to be incorporated to
        !           543:        other places
        !           544:                
        !           545: *********************************************************************************/
        !           546: 
        !           547:     typedef struct vnode* FileReference;
        !           548:     #define kNoFileReference NULL
        !           549: 
        !           550: 
        !           551: #define HFSInstrumentation 0
        !           552: 
        !           553: 
        !           554: /***** START OF MACOSSTUBS ********/
        !           555: 
        !           556: 
        !           557: /*
        !           558:        SizeTDef.h -- Common definitions
        !           559:        
        !           560:        size_t - this type is defined by several ANSI headers.
        !           561: */
        !           562: #if ! defined (__size_t__)
        !           563:        #define __size_t__
        !           564:         #if defined (__xlc) || defined (__xlC) || defined (__xlC__) || defined (__MWERKS__)
        !           565:                typedef unsigned long size_t;
        !           566:         #else  /* __xlC */
        !           567:                typedef unsigned int size_t;
        !           568:        #endif  /* __xlC */
        !           569: #endif /* __size_t__ */
        !           570: 
        !           571: 
        !           572: struct FSSpec {
        !           573:        long                                                    parID;
        !           574:        Str255                                                  name;
        !           575: };
        !           576: typedef struct FSSpec FSSpec;
        !           577: 
        !           578: /*
        !           579:        StdDef.h -- Common definitions
        !           580:        
        !           581: */
        !           582: 
        !           583: #define offsetof(structure,field) ((size_t)&((structure *) 0)->field)
        !           584: 
        !           585: 
        !           586: 
        !           587: /*
        !           588:        File:           Errors.h
        !           589:  
        !           590: */
        !           591: enum {
        !           592:        paramErr                                        = -50,                                                  /*error in user parameter list*/
        !           593:        noHardwareErr                           = -200,                                                 /*Sound Manager Error Returns*/
        !           594:        notEnoughHardwareErr            = -201,                                                 /*Sound Manager Error Returns*/
        !           595:        userCanceledErr                         = -128,
        !           596:        qErr                                            = -1,                                                   /*queue element not found during deletion*/
        !           597:        vTypErr                                         = -2,                                                   /*invalid queue element*/
        !           598:        corErr                                          = -3,                                                   /*core routine number out of range*/
        !           599:        unimpErr                                        = -4,                                                   /*unimplemented core routine*/
        !           600:        SlpTypeErr                                      = -5,                                                   /*invalid queue element*/
        !           601:        seNoDB                                          = -8,                                                   /*no debugger installed to handle debugger command*/
        !           602:        controlErr                                      = -17,                                                  /*I/O System Errors*/
        !           603:        statusErr                                       = -18,                                                  /*I/O System Errors*/
        !           604:        readErr                                         = -19,                                                  /*I/O System Errors*/
        !           605:        writErr                                         = -20,                                                  /*I/O System Errors*/
        !           606:        badUnitErr                                      = -21,                                                  /*I/O System Errors*/
        !           607:        unitEmptyErr                            = -22,                                                  /*I/O System Errors*/
        !           608:        openErr                                         = -23,                                                  /*I/O System Errors*/
        !           609:        closErr                                         = -24,                                                  /*I/O System Errors*/
        !           610:        dRemovErr                                       = -25,                                                  /*tried to remove an open driver*/
        !           611:        dInstErr                                        = -26                                                   /*DrvrInstall couldn't find driver in resources*/
        !           612: };
        !           613: 
        !           614: enum {                                                                                                                         /* Printing Errors */
        !           615:        iMemFullErr                                     = -108,
        !           616:        iIOAbort                                        = -27,                                                  /*Scrap Manager errors*/
        !           617:        noScrapErr                                      = -100,                                                 /*No scrap exists error*/
        !           618:        noTypeErr                                       = -102,                                                 /*No object of that type in scrap*/
        !           619:        memROZWarn                                      = -99,                                                  /*soft error in ROZ*/
        !           620:        memROZError                                     = -99,                                                  /*hard error in ROZ*/
        !           621:        memROZErr                                       = -99,                                                  /*hard error in ROZ*/
        !           622:        memFullErr                                      = -108,                                                 /*Not enough room in heap zone*/
        !           623:        nilHandleErr                            = -109,                                                 /*Master Pointer was NIL in HandleZone or other*/
        !           624:        memWZErr                                        = -111,                                                 /*WhichZone failed (applied to free block)*/
        !           625:        memPurErr                                       = -112,                                                 /*trying to purge a locked or non-purgeable block*/
        !           626:        memAdrErr                                       = -110                                                  /*address was odd; or out of range*/
        !           627: };
        !           628: 
        !           629: 
        !           630: 
        !           631: enum {
        !           632:        abortErr                                        = -27,                                                  /*IO call aborted by KillIO*/
        !           633:        iIOAbortErr                                     = -27,                                                  /*IO abort error (Printing Manager)*/
        !           634:        notOpenErr                                      = -28,                                                  /*Couldn't rd/wr/ctl/sts cause driver not opened*/
        !           635:        unitTblFullErr                          = -29,                                                  /*unit table has no more entries*/
        !           636:        dceExtErr                                       = -30,                                                  /*dce extension error*/
        !           637:        slotNumErr                                      = -360,                                                 /*invalid slot # error*/
        !           638:        gcrOnMFMErr                                     = -400,                                                 /*gcr format on high density media error*/
        !           639:        dirFulErr                                       = -33,                                                  /*Directory full*/
        !           640:        dskFulErr                                       = -34,                                                  /*disk full*/
        !           641:        nsvErr                                          = -35,                                                  /*no such volume*/
        !           642:        ioErr                                           = -36,                                                  /*I/O error (bummers)*/
        !           643:        bdNamErr                                        = -37,                                                  /*there may be no bad names in the final system!*/
        !           644:        fnOpnErr                                        = -38,                                                  /*File not open*/
        !           645:        eofErr                                          = -39,                                                  /*End of file*/
        !           646:        posErr                                          = -40,                                                  /*tried to position to before start of file (r/w)*/
        !           647:        mFulErr                                         = -41,                                                  /*memory full (open) or file won't fit (load)*/
        !           648:        tmfoErr                                         = -42,                                                  /*too many files open*/
        !           649:        fnfErr                                          = -43,                                                  /*File not found*/
        !           650:        wPrErr                                          = -44,                                                  /*diskette is write protected.*/
        !           651:        fLckdErr                                        = -45                                                   /*file is locked*/
        !           652: };
        !           653: 
        !           654: 
        !           655: enum {
        !           656:        vLckdErr                                        = -46,                                                  /*volume is locked*/
        !           657:        fBsyErr                                         = -47,                                                  /*File is busy (delete)*/
        !           658:        dupFNErr                                        = -48,                                                  /*duplicate filename (rename)*/
        !           659:        opWrErr                                         = -49,                                                  /*file already open with with write permission*/
        !           660:        rfNumErr                                        = -51,                                                  /*refnum error*/
        !           661:        gfpErr                                          = -52,                                                  /*get file position error*/
        !           662:        volOffLinErr                            = -53,                                                  /*volume not on line error (was Ejected)*/
        !           663:        permErr                                         = -54,                                                  /*permissions error (on file open)*/
        !           664:        volOnLinErr                                     = -55,                                                  /*drive volume already on-line at MountVol*/
        !           665:        nsDrvErr                                        = -56,                                                  /*no such drive (tried to mount a bad drive num)*/
        !           666:        noMacDskErr                                     = -57,                                                  /*not a mac diskette (sig bytes are wrong)*/
        !           667:        extFSErr                                        = -58,                                                  /*volume in question belongs to an external fs*/
        !           668:        fsRnErr                                         = -59,                                                  /*file system internal error:during rename the old entry was deleted but could not be restored.*/
        !           669:        badMDBErr                                       = -60,                                                  /*bad master directory block*/
        !           670:        wrPermErr                                       = -61,                                                  /*write permissions error*/
        !           671:        dirNFErr                                        = -120,                                                 /*Directory not found*/
        !           672:        tmwdoErr                                        = -121,                                                 /*No free WDCB available*/
        !           673:        badMovErr                                       = -122,                                                 /*Move into offspring error*/
        !           674:        wrgVolTypErr                            = -123,                                                 /*Wrong volume type error [operation not supported for MFS]*/
        !           675:        volGoneErr                                      = -124                                                  /*Server volume has been disconnected.*/
        !           676: };
        !           677: 
        !           678: enum {
        !           679:                                                                                                                                /*Dictionary Manager errors*/
        !           680:        notBTree                                        = -410,                                                 /*The file is not a dictionary.*/
        !           681:        btNoSpace                                       = -413,                                                 /*Can't allocate disk space.*/
        !           682:        btDupRecErr                                     = -414,                                                 /*Record already exists.*/
        !           683:        btRecNotFnd                                     = -415,                                                 /*Record cannot be found.*/
        !           684:        btKeyLenErr                                     = -416,                                                 /*Maximum key length is too long or equal to zero.*/
        !           685:        btKeyAttrErr                            = -417,                                                 /*There is no such a key attribute.*/
        !           686:        unknownInsertModeErr            = -20000,                                               /*There is no such an insert mode.*/
        !           687:        recordDataTooBigErr                     = -20001,                                               /*The record data is bigger than buffer size (1024 bytes).*/
        !           688:        invalidIndexErr                         = -20002                                                /*The recordIndex parameter is not valid.*/
        !           689: };
        !           690: 
        !           691: 
        !           692: enum {
        !           693:        fidNotFound                                     = -1300,                                                /*no file thread exists.*/
        !           694:        fidExists                                       = -1301,                                                /*file id already exists*/
        !           695:        notAFileErr                                     = -1302,                                                /*directory specified*/
        !           696:        diffVolErr                                      = -1303,                                                /*files on different volumes*/
        !           697:        catChangedErr                           = -1304,                                                /*the catalog has been modified*/
        !           698:        desktopDamagedErr                       = -1305,                                                /*desktop database files are corrupted*/
        !           699:        sameFileErr                                     = -1306,                                                /*can't exchange a file with itself*/
        !           700:        badFidErr                                       = -1307,                                                /*file id is dangling or doesn't match with the file number*/
        !           701:        notARemountErr                          = -1308,                                                /*when _Mount allows only remounts and doesn't get one*/
        !           702:        fileBoundsErr                           = -1309,                                                /*file's EOF, offset, mark or size is too big*/
        !           703:        fsDataTooBigErr                         = -1310,                                                /*file or volume is too big for system*/
        !           704:        volVMBusyErr                            = -1311,                                                /*can't eject because volume is in use by VM*/
        !           705:        envNotPresent                           = -5500,                                                /*returned by glue.*/
        !           706:        envBadVers                                      = -5501,                                                /*Version non-positive*/
        !           707:        envVersTooBig                           = -5502,                                                /*Version bigger than call can handle*/
        !           708:        fontDecError                            = -64,                                                  /*error during font declaration*/
        !           709:        fontNotDeclared                         = -65,                                                  /*font not declared*/
        !           710:        fontSubErr                                      = -66,                                                  /*font substitution occured*/
        !           711:        fontNotOutlineErr                       = -32615,                                               /*bitmap font passed to routine that does outlines only*/
        !           712:        firstDskErr                                     = -84,                                                  /*I/O System Errors*/
        !           713:        lastDskErr                                      = -64,                                                  /*I/O System Errors*/
        !           714:        noDriveErr                                      = -64,                                                  /*drive not installed*/
        !           715:        offLinErr                                       = -65,                                                  /*r/w requested for an off-line drive*/
        !           716:        noNybErr                                        = -66                                                   /*couldn't find 5 nybbles in 200 tries*/
        !           717: };
        !           718: 
        !           719: enum {
        !           720:                                                                                                                                /* general text errors*/
        !           721:        kTextUnsupportedEncodingErr     = -8738,                                                /* specified encoding not supported for this operation*/
        !           722:        kTextMalformedInputErr          = -8739,                                                /* in DBCS, for example, high byte followed by invalid low byte*/
        !           723:        kTextUndefinedElementErr        = -8740,                                                /* text conversion errors*/
        !           724:        kTECMissingTableErr                     = -8745,
        !           725:        kTECTableChecksumErr            = -8746,
        !           726:        kTECTableFormatErr                      = -8747,
        !           727:        kTECCorruptConverterErr         = -8748,                                                /* invalid converter object reference*/
        !           728:        kTECNoConversionPathErr         = -8749,
        !           729:        kTECBufferBelowMinimumSizeErr = -8750,                                          /* output buffer too small to allow processing of first input text element*/
        !           730:        kTECArrayFullErr                        = -8751,                                                /* supplied name buffer or TextRun, TextEncoding, or UnicodeMapping array is too small*/
        !           731:        kTECBadTextRunErr                       = -8752,
        !           732:        kTECPartialCharErr                      = -8753,                                                /* input buffer ends in the middle of a multibyte character, conversion stopped*/
        !           733:        kTECUnmappableElementErr        = -8754,
        !           734:        kTECIncompleteElementErr        = -8755,                                                /* text element may be incomplete or is too long for internal buffers*/
        !           735:        kTECDirectionErr                        = -8756,                                                /* direction stack overflow, etc.*/
        !           736:        kTECGlobalsUnavailableErr       = -8770,                                                /* globals have already been deallocated (premature TERM)*/
        !           737:        kTECItemUnavailableErr          = -8771,                                                /* item (e.g. name) not available for specified region (& encoding if relevant)*/
        !           738:                                                                                                                                /* text conversion status codes*/
        !           739:        kTECUsedFallbacksStatus         = -8783,
        !           740:        kTECNeedFlushStatus                     = -8784,
        !           741:        kTECOutputBufferFullStatus      = -8785,                                                /* output buffer has no room for conversion of next input text element (partial conversion)*/
        !           742:                                                                                                                                /* deprecated error & status codes for low-level converter*/
        !           743:        unicodeChecksumErr                      = -8769,
        !           744:        unicodeNoTableErr                       = -8768,
        !           745:        unicodeVariantErr                       = -8767,
        !           746:        unicodeFallbacksErr                     = -8766,
        !           747:        unicodePartConvertErr           = -8765,
        !           748:        unicodeBufErr                           = -8764,
        !           749:        unicodeCharErr                          = -8763,
        !           750:        unicodeElementErr                       = -8762,
        !           751:        unicodeNotFoundErr                      = -8761,
        !           752:        unicodeTableFormatErr           = -8760,
        !           753:        unicodeDirectionErr                     = -8759,
        !           754:        unicodeContextualErr            = -8758,
        !           755:        unicodeTextEncodingDataErr      = -8757
        !           756: };
        !           757: 
        !           758: 
        !           759: /*
        !           760:        File:           MacMemory.h
        !           761:  
        !           762:  
        !           763: */
        !           764: 
        !           765: 
        !           766: /*
        !           767:        File:           MixedMode.h
        !           768:  
        !           769: */
        !           770: 
        !           771: /* Calling Conventions */
        !           772: typedef unsigned short                                         CallingConventionType;
        !           773: 
        !           774: enum {
        !           775:        kPascalStackBased                       = 0,
        !           776:        kCStackBased                            = 1,
        !           777:        kRegisterBased                          = 2,
        !           778:        kD0DispatchedPascalStackBased = 8,
        !           779:        kD1DispatchedPascalStackBased = 12,
        !           780:        kD0DispatchedCStackBased        = 9,
        !           781:        kStackDispatchedPascalStackBased = 14,
        !           782:        kThinkCStackBased                       = 5
        !           783: };
        !           784: 
        !           785: 
        !           786:        #define STACK_UPP_TYPE(name)    name
        !           787:        #define REGISTER_UPP_TYPE(name) name
        !           788: 
        !           789: 
        !           790: /*
        !           791:        File:           OSUtils.h
        !           792:  
        !           793: */
        !           794: typedef struct QElem QElem;
        !           795: 
        !           796: typedef QElem *                                                        QElemPtr;
        !           797: struct QHdr {
        !           798:        short                                                   qFlags;
        !           799:        QElemPtr                                                qHead;
        !           800:        QElemPtr                                                qTail;
        !           801: };
        !           802: typedef struct QHdr QHdr;
        !           803: 
        !           804: typedef QHdr *                                                 QHdrPtr;
        !           805: 
        !           806: typedef CALLBACK_API( void , DeferredTaskProcPtr )(long dtParam);
        !           807: /*
        !           808:        WARNING: DeferredTaskProcPtr uses register based parameters under classic 68k
        !           809:                         and cannot be written in a high-level language without 
        !           810:                         the help of mixed mode or assembly glue.
        !           811: */
        !           812: typedef REGISTER_UPP_TYPE(DeferredTaskProcPtr)                                         DeferredTaskUPP;
        !           813: enum { uppDeferredTaskProcInfo = 0x0000B802 };                                         /* register no_return_value Func(4_bytes:A1) */
        !           814: #define NewDeferredTaskProc(userRoutine)                                               (DeferredTaskUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDeferredTaskProcInfo, GetCurrentArchitecture())
        !           815: #define CallDeferredTaskProc(userRoutine, dtParam)                     CALL_ONE_PARAMETER_UPP((userRoutine), uppDeferredTaskProcInfo, (dtParam))
        !           816: struct DeferredTask {
        !           817:        QElemPtr                                                qLink;
        !           818:        short                                                   qType;
        !           819:        short                                                   dtFlags;
        !           820:        DeferredTaskUPP                                 dtAddr;
        !           821:        long                                                    dtParam;
        !           822:        long                                                    dtReserved;
        !           823: };
        !           824: typedef struct DeferredTask DeferredTask;
        !           825: 
        !           826: typedef DeferredTask *                                 DeferredTaskPtr;
        !           827: 
        !           828: /*
        !           829:        File:           Finder.h
        !           830:  
        !           831:  
        !           832: */
        !           833: 
        !           834: /*     
        !           835:        The following declerations used to be in Files.�, 
        !           836:        but are Finder specific and were moved here.
        !           837: */
        !           838: 
        !           839: enum {
        !           840:                                                                 /* Finder Flags */
        !           841:     kIsOnDesk                                  = 0x0001,
        !           842:     kColor                                             = 0x000E,
        !           843:     kIsShared                                  = 0x0040,                                               /* bit 0x0080 is hasNoINITS */
        !           844:     kHasBeenInited                             = 0x0100,                                               /* bit 0x0200 was the letter bit for AOCE, but is now reserved for future use */
        !           845:     kHasCustomIcon                             = 0x0400,
        !           846:     kIsStationery                              = 0x0800,
        !           847:     kNameLocked                                        = 0x1000,
        !           848:     kHasBundle                                 = 0x2000,
        !           849:     kIsInvisible                               = 0x4000,
        !           850:     kIsAlias                                   = 0x8000
        !           851: };
        !           852: 
        !           853: 
        !           854: enum {
        !           855:                                                                                                                                /* Finder Constants */
        !           856:        fOnDesk                                         = 1,
        !           857:        fHasBundle                                      = 8192,
        !           858:        fTrash                                          = -3,
        !           859:        fDesktop                                        = -2,
        !           860:        fDisk                                           = 0
        !           861: };
        !           862: 
        !           863: #if PRAGMA_STRUCT_ALIGN
        !           864:        #pragma options align=mac68k
        !           865: #elif PRAGMA_STRUCT_PACKPUSH
        !           866:        #pragma pack(push, 2)
        !           867: #elif PRAGMA_STRUCT_PACK
        !           868:        #pragma pack(2)
        !           869: #endif
        !           870: 
        !           871: 
        !           872: struct FInfo {
        !           873:        OSType                                                  fdType;                                         /*the type of the file*/
        !           874:        OSType                                                  fdCreator;                                      /*file's creator*/
        !           875:        unsigned short                                  fdFlags;                                        /*flags ex. hasbundle,invisible,locked, etc.*/
        !           876:        Point                                                   fdLocation;                                     /*file's location in folder*/
        !           877:        short                                                   fdFldr;                                         /*folder containing file*/
        !           878: };
        !           879: typedef struct FInfo FInfo;
        !           880: 
        !           881: struct FXInfo {
        !           882:        short                                                   fdIconID;                                       /*Icon ID*/
        !           883:        short                                                   fdUnused[3];                            /*unused but reserved 6 bytes*/
        !           884:        SInt8                                                   fdScript;                                       /*Script flag and number*/
        !           885:        SInt8                                                   fdXFlags;                                       /*More flag bits*/
        !           886:        short                                                   fdComment;                                      /*Comment ID*/
        !           887:        long                                                    fdPutAway;                                      /*Home Dir ID*/
        !           888: };
        !           889: typedef struct FXInfo FXInfo;
        !           890: 
        !           891: struct DInfo {
        !           892:        Rect                                                    frRect;                                         /*folder rect*/
        !           893:        unsigned short                                  frFlags;                                        /*Flags*/
        !           894:        Point                                                   frLocation;                                     /*folder location*/
        !           895:        short                                                   frView;                                         /*folder view*/
        !           896: };
        !           897: typedef struct DInfo DInfo;
        !           898: 
        !           899: struct DXInfo {
        !           900:        Point                                                   frScroll;                                       /*scroll position*/
        !           901:        long                                                    frOpenChain;                            /*DirID chain of open folders*/
        !           902:        SInt8                                                   frScript;                                       /*Script flag and number*/
        !           903:        SInt8                                                   frXFlags;                                       /*More flag bits*/
        !           904:        short                                                   frComment;                                      /*comment*/
        !           905:        long                                                    frPutAway;                                      /*DirID*/
        !           906: };
        !           907: typedef struct DXInfo DXInfo;
        !           908: 
        !           909: #if PRAGMA_STRUCT_ALIGN
        !           910:        #pragma options align=reset
        !           911: #elif PRAGMA_STRUCT_PACKPUSH
        !           912:        #pragma pack(pop)
        !           913: #elif PRAGMA_STRUCT_PACK
        !           914:        #pragma pack()
        !           915: #endif
        !           916: 
        !           917: 
        !           918: enum {
        !           919:        fsRtParID                                       = 1,
        !           920:        fsRtDirID                                       = 2
        !           921: };
        !           922: 
        !           923: 
        !           924: 
        !           925: #if PRAGMA_STRUCT_ALIGN
        !           926:        #pragma options align=mac68k
        !           927: #elif PRAGMA_STRUCT_PACKPUSH
        !           928:        #pragma pack(push, 2)
        !           929: #elif PRAGMA_STRUCT_PACK
        !           930:        #pragma pack(2)
        !           931: #endif
        !           932: 
        !           933: 
        !           934: #if PRAGMA_STRUCT_ALIGN
        !           935:        #pragma options align=reset
        !           936: #elif PRAGMA_STRUCT_PACKPUSH
        !           937:        #pragma pack(pop)
        !           938: #elif PRAGMA_STRUCT_PACK
        !           939:        #pragma pack()
        !           940: #endif
        !           941: 
        !           942: 
        !           943: /*
        !           944:  * UTGetBlock options
        !           945:  */
        !           946: 
        !           947: enum {
        !           948:        gbDefault                                       = 0,                                                    /* default value - read if not found */
        !           949:                                                                                                                                /*      bits and masks */
        !           950:        gbReadBit                                       = 0,                                                    /* read block from disk (forced read) */
        !           951:        gbReadMask                                      = 0x0001,
        !           952:        gbExistBit                                      = 1,                                                    /* get existing cache block */
        !           953:        gbExistMask                                     = 0x0002,
        !           954:        gbNoReadBit                                     = 2,                                                    /* don't read block from disk if not found in cache */
        !           955:        gbNoReadMask                            = 0x0004,
        !           956:        gbReleaseBit                            = 3,                                                    /* release block immediately after GetBlock */
        !           957:        gbReleaseMask                           = 0x0008
        !           958: };
        !           959: 
        !           960: 
        !           961: /*
        !           962:  * UTReleaseBlock options
        !           963:  */
        !           964: 
        !           965: enum {
        !           966:        rbDefault                                       = 0,                                                    /* default value - just mark the buffer not in-use */
        !           967:                                                                                                                                /*      bits and masks */
        !           968:        rbWriteBit                                      = 0,                                                    /* force write buffer to disk */
        !           969:        rbWriteMask                                     = 0x0001,
        !           970:        rbTrashBit                                      = 1,                                                    /* trash buffer contents after release */
        !           971:        rbTrashMask                                     = 0x0002,
        !           972:        rbDirtyBit                                      = 2,                                                    /* mark buffer dirty */
        !           973:        rbDirtyMask                                     = 0x0004,
        !           974:        rbFreeBit                                       = 3,                                                    /* free the buffer (save in the hash) */
        !           975:        rbFreeMask                                      = 0x000A                                                /* rbFreeMask (rbFreeBit + rbTrashBit) works as rbTrash on < System 7.0 RamCache; on >= System 7.0, rbfreeMask overrides rbTrash */
        !           976: };
        !           977: 
        !           978: /*
        !           979:  * UTFlushCache options
        !           980:  */
        !           981: 
        !           982: enum {
        !           983:        fcDefault                                       = 0,                                                    /* default value - pass this fcOption to just flush any dirty buffers */
        !           984:                                                                                                                                /*      bits and masks */
        !           985:        fcTrashBit                                      = 0,                                                    /* (don't pass this as fcOption, use only for testing bit) */
        !           986:        fcTrashMask                                     = 0x0001,                                               /* pass this fcOption value to flush and trash cache blocks */
        !           987:        fcFreeBit                                       = 1,                                                    /* (don't pass this as fcOption, use only for testing bit) */
        !           988:        fcFreeMask                                      = 0x0003                                                /* pass this fcOption to flush and free cache blocks (Note: both fcTrash and fcFree bits are set) */
        !           989: };
        !           990: 
        !           991: 
        !           992: 
        !           993: /*
        !           994:  * FCBRec.fcbFlags bits
        !           995:  */
        !           996: 
        !           997: enum {
        !           998:        fcbWriteBit                                     = 0,                                                    /* Data can be written to this file */
        !           999:        fcbWriteMask                            = 0x01,
        !          1000:        fcbResourceBit                          = 1,                                                    /* This file is a resource fork */
        !          1001:        fcbResourceMask                         = 0x02,
        !          1002:        fcbWriteLockedBit                       = 2,                                                    /* File has a locked byte range */
        !          1003:        fcbWriteLockedMask                      = 0x04,
        !          1004:        fcbSharedWriteBit                       = 4,                                                    /* File is open for shared write access */
        !          1005:        fcbSharedWriteMask                      = 0x10,
        !          1006:        fcbFileLockedBit                        = 5,                                                    /* File is locked (write-protected) */
        !          1007:        fcbFileLockedMask                       = 0x20,
        !          1008:        fcbOwnClumpBit                          = 6,                                                    /* File has clump size specified in FCB */
        !          1009:        fcbOwnClumpMask                         = 0x40,
        !          1010:        fcbModifiedBit                          = 7,                                                    /* File has changed since it was last flushed */
        !          1011:        fcbModifiedMask                         = 0x80
        !          1012: };
        !          1013: 
        !          1014: 
        !          1015: /*
        !          1016:        File:           TextCommon.h
        !          1017:  
        !          1018: */
        !          1019: 
        !          1020: /* LocaleIdentifier is an obsolete Copland typedef, will be removed soon*/
        !          1021: typedef UInt32                                                         LocaleIdentifier;
        !          1022: /* TextEncodingBase type & values */
        !          1023: /* (values 0-32 correspond to the Script Codes defined in Inside Macintosh: Text pages 6-52 and 6-53 */
        !          1024: typedef UInt32                                                         TextEncodingBase;
        !          1025: 
        !          1026: enum {
        !          1027:                                                                                                                                /* Mac OS encodings*/
        !          1028:        kTextEncodingMacRoman           = 0L,
        !          1029:        kTextEncodingMacJapanese        = 1,
        !          1030:        kTextEncodingMacChineseTrad     = 2,
        !          1031:        kTextEncodingMacKorean          = 3,
        !          1032:        kTextEncodingMacArabic          = 4,
        !          1033:        kTextEncodingMacHebrew          = 5,
        !          1034:        kTextEncodingMacGreek           = 6,
        !          1035:        kTextEncodingMacCyrillic        = 7,
        !          1036:        kTextEncodingMacDevanagari      = 9,
        !          1037:        kTextEncodingMacGurmukhi        = 10,
        !          1038:        kTextEncodingMacGujarati        = 11,
        !          1039:        kTextEncodingMacOriya           = 12,
        !          1040:        kTextEncodingMacBengali         = 13,
        !          1041:        kTextEncodingMacTamil           = 14,
        !          1042:        kTextEncodingMacTelugu          = 15,
        !          1043:        kTextEncodingMacKannada         = 16,
        !          1044:        kTextEncodingMacMalayalam       = 17,
        !          1045:        kTextEncodingMacSinhalese       = 18,
        !          1046:        kTextEncodingMacBurmese         = 19,
        !          1047:        kTextEncodingMacKhmer           = 20,
        !          1048:        kTextEncodingMacThai            = 21,
        !          1049:        kTextEncodingMacLaotian         = 22,
        !          1050:        kTextEncodingMacGeorgian        = 23,
        !          1051:        kTextEncodingMacArmenian        = 24,
        !          1052:        kTextEncodingMacChineseSimp     = 25,
        !          1053:        kTextEncodingMacTibetan         = 26,
        !          1054:        kTextEncodingMacMongolian       = 27,
        !          1055:        kTextEncodingMacEthiopic        = 28,
        !          1056:        kTextEncodingMacCentralEurRoman = 29,
        !          1057:        kTextEncodingMacVietnamese      = 30,
        !          1058:        kTextEncodingMacExtArabic       = 31,                                                   /* The following use script code 0, smRoman*/
        !          1059:        kTextEncodingMacSymbol          = 33,
        !          1060:        kTextEncodingMacDingbats        = 34,
        !          1061:        kTextEncodingMacTurkish         = 35,
        !          1062:        kTextEncodingMacCroatian        = 36,
        !          1063:        kTextEncodingMacIcelandic       = 37,
        !          1064:        kTextEncodingMacRomanian        = 38,                                                   /* The following use script code 4, smArabic*/
        !          1065:        kTextEncodingMacFarsi           = 0x8C,                                                 /* Like MacArabic but uses Farsi digits*/
        !          1066:                                                                                                                                /* The following use script code 7, smCyrillic*/
        !          1067:        kTextEncodingMacUkrainian       = 0x98,                                                 /* The following use script code 32, smUnimplemented*/
        !          1068:        kTextEncodingMacVT100           = 0xFC,                                                 /* VT100/102 font from Comm Toolbox: Latin-1 repertoire + box drawing etc*/
        !          1069:                                                                                                                                /* Special Mac OS encodings*/
        !          1070:        kTextEncodingMacHFS                     = 0xFF,                                                 /* Meta-value, should never appear in a table.*/
        !          1071:                                                                                                                                /* Unicode & ISO UCS encodings begin at 0x100*/
        !          1072:        kTextEncodingUnicodeDefault     = 0x0100,                                               /* Meta-value, should never appear in a table.*/
        !          1073:        kTextEncodingUnicodeV1_1        = 0x0101,
        !          1074:        kTextEncodingISO10646_1993      = 0x0101,                                               /* Code points identical to Unicode 1.1*/
        !          1075:        kTextEncodingUnicodeV2_0        = 0x0103,                                               /* New location for Korean Hangul*/
        !          1076:                                                                                                                                /* ISO 8-bit and 7-bit encodings begin at 0x200*/
        !          1077:        kTextEncodingISOLatin1          = 0x0201,                                               /* ISO 8859-1*/
        !          1078:        kTextEncodingISOLatin2          = 0x0202,                                               /* ISO 8859-2*/
        !          1079:        kTextEncodingISOLatinCyrillic = 0x0205,                                         /* ISO 8859-5*/
        !          1080:        kTextEncodingISOLatinArabic     = 0x0206,                                               /* ISO 8859-6, = ASMO 708, =DOS CP 708*/
        !          1081:        kTextEncodingISOLatinGreek      = 0x0207,                                               /* ISO 8859-7*/
        !          1082:        kTextEncodingISOLatinHebrew     = 0x0208,                                               /* ISO 8859-8*/
        !          1083:        kTextEncodingISOLatin5          = 0x0209,                                               /* ISO 8859-9*/
        !          1084:                                                                                                                                /* MS-DOS & Windows encodings begin at 0x400*/
        !          1085:        kTextEncodingDOSLatinUS         = 0x0400,                                               /* code page 437*/
        !          1086:        kTextEncodingDOSGreek           = 0x0405,                                               /* code page 737 (formerly code page 437G)*/
        !          1087:        kTextEncodingDOSBalticRim       = 0x0406,                                               /* code page 775*/
        !          1088:        kTextEncodingDOSLatin1          = 0x0410,                                               /* code page 850, "Multilingual"*/
        !          1089:        kTextEncodingDOSGreek1          = 0x0411,                                               /* code page 851*/
        !          1090:        kTextEncodingDOSLatin2          = 0x0412,                                               /* code page 852, Slavic*/
        !          1091:        kTextEncodingDOSCyrillic        = 0x0413,                                               /* code page 855, IBM Cyrillic*/
        !          1092:        kTextEncodingDOSTurkish         = 0x0414,                                               /* code page 857, IBM Turkish*/
        !          1093:        kTextEncodingDOSPortuguese      = 0x0415,                                               /* code page 860*/
        !          1094:        kTextEncodingDOSIcelandic       = 0x0416,                                               /* code page 861*/
        !          1095:        kTextEncodingDOSHebrew          = 0x0417,                                               /* code page 862*/
        !          1096:        kTextEncodingDOSCanadianFrench = 0x0418,                                        /* code page 863*/
        !          1097:        kTextEncodingDOSArabic          = 0x0419,                                               /* code page 864*/
        !          1098:        kTextEncodingDOSNordic          = 0x041A,                                               /* code page 865*/
        !          1099:        kTextEncodingDOSRussian         = 0x041B,                                               /* code page 866*/
        !          1100:        kTextEncodingDOSGreek2          = 0x041C,                                               /* code page 869, IBM Modern Greek*/
        !          1101:        kTextEncodingDOSThai            = 0x041D,                                               /* code page 874, also for Windows*/
        !          1102:        kTextEncodingDOSJapanese        = 0x0420,                                               /* code page 932, also for Windows*/
        !          1103:        kTextEncodingDOSChineseSimplif = 0x0421,                                        /* code page 936, also for Windows*/
        !          1104:        kTextEncodingDOSKorean          = 0x0422,                                               /* code page 949, also for Windows; Unified Hangul Code*/
        !          1105:        kTextEncodingDOSChineseTrad     = 0x0423,                                               /* code page 950, also for Windows*/
        !          1106:        kTextEncodingWindowsLatin1      = 0x0500,                                               /* code page 1252*/
        !          1107:        kTextEncodingWindowsANSI        = 0x0500,                                               /* code page 1252 (alternate name)*/
        !          1108:        kTextEncodingWindowsLatin2      = 0x0501,                                               /* code page 1250, Central Europe*/
        !          1109:        kTextEncodingWindowsCyrillic = 0x0502,                                          /* code page 1251, Slavic Cyrillic*/
        !          1110:        kTextEncodingWindowsGreek       = 0x0503,                                               /* code page 1253*/
        !          1111:        kTextEncodingWindowsLatin5      = 0x0504,                                               /* code page 1254, Turkish*/
        !          1112:        kTextEncodingWindowsHebrew      = 0x0505,                                               /* code page 1255*/
        !          1113:        kTextEncodingWindowsArabic      = 0x0506,                                               /* code page 1256*/
        !          1114:        kTextEncodingWindowsBalticRim = 0x0507,                                         /* code page 1257*/
        !          1115:        kTextEncodingWindowsKoreanJohab = 0x0510,                                       /* code page 1361, for Windows NT*/
        !          1116:                                                                                                                                /* Various national standards begin at 0x600*/
        !          1117:        kTextEncodingUS_ASCII           = 0x0600,
        !          1118:        kTextEncodingJIS_X0201_76       = 0x0620,
        !          1119:        kTextEncodingJIS_X0208_83       = 0x0621,
        !          1120:        kTextEncodingJIS_X0208_90       = 0x0622,
        !          1121:        kTextEncodingJIS_X0212_90       = 0x0623,
        !          1122:        kTextEncodingJIS_C6226_78       = 0x0624,
        !          1123:        kTextEncodingGB_2312_80         = 0x0630,
        !          1124:        kTextEncodingGBK_95                     = 0x0631,                                               /* annex to GB 13000-93; for Windows 95*/
        !          1125:        kTextEncodingKSC_5601_87        = 0x0640,                                               /* same as KSC 5601-92 without Johab annex*/
        !          1126:        kTextEncodingKSC_5601_92_Johab = 0x0641,                                        /* KSC 5601-92 Johab annex*/
        !          1127:        kTextEncodingCNS_11643_92_P1 = 0x0651,                                          /* CNS 11643-1992 plane 1*/
        !          1128:        kTextEncodingCNS_11643_92_P2 = 0x0652,                                          /* CNS 11643-1992 plane 2*/
        !          1129:        kTextEncodingCNS_11643_92_P3 = 0x0653,                                          /* CNS 11643-1992 plane 3 (was plane 14 in 1986 version)*/
        !          1130:                                                                                                                                /* ISO 2022 collections begin at 0x800*/
        !          1131:        kTextEncodingISO_2022_JP        = 0x0820,
        !          1132:        kTextEncodingISO_2022_JP_2      = 0x0821,
        !          1133:        kTextEncodingISO_2022_CN        = 0x0830,
        !          1134:        kTextEncodingISO_2022_CN_EXT = 0x0831,
        !          1135:        kTextEncodingISO_2022_KR        = 0x0840,                                               /* EUC collections begin at 0x900*/
        !          1136:        kTextEncodingEUC_JP                     = 0x0920,                                               /* ISO 646, 1-byte katakana, JIS 208, JIS 212*/
        !          1137:        kTextEncodingEUC_CN                     = 0x0930,                                               /* ISO 646, GB 2312-80*/
        !          1138:        kTextEncodingEUC_TW                     = 0x0931,                                               /* ISO 646, CNS 11643-1992 Planes 1-16*/
        !          1139:        kTextEncodingEUC_KR                     = 0x0940,                                               /* ISO 646, KS C 5601-1987*/
        !          1140:                                                                                                                                /* Misc standards begin at 0xA00*/
        !          1141:        kTextEncodingShiftJIS           = 0x0A01,                                               /* plain Shift-JIS*/
        !          1142:        kTextEncodingKOI8_R                     = 0x0A02,                                               /* Russian internet standard*/
        !          1143:        kTextEncodingBig5                       = 0x0A03,                                               /* Big-5 (has variants)*/
        !          1144:        kTextEncodingMacRomanLatin1     = 0x0A04,                                               /* Mac OS Roman permuted to align with ISO Latin-1*/
        !          1145:        kTextEncodingHZ_GB_2312         = 0x0A05,                                               /* HZ (RFC 1842, for Chinese mail & news)*/
        !          1146:                                                                                                                                /* Other platform encodings*/
        !          1147:        kTextEncodingNextStepLatin      = 0x0B01,                                               /* NextStep encoding*/
        !          1148:                                                                                                                                /* EBCDIC & IBM host encodings begin at 0xC00*/
        !          1149:        kTextEncodingEBCDIC_US          = 0x0C01,                                               /* basic EBCDIC-US*/
        !          1150:        kTextEncodingEBCDIC_CP037       = 0x0C02,                                               /* code page 037, extended EBCDIC (Latin-1 set) for US,Canada...*/
        !          1151:                                                                                                                                /* Special value*/
        !          1152:        kTextEncodingMultiRun           = 0x0FFF,                                               /* Multi-encoding text with external run info*/
        !          1153:                                                                                                                                /* The following are older names for backward compatibility*/
        !          1154:        kTextEncodingMacTradChinese     = 2,
        !          1155:        kTextEncodingMacRSymbol         = 8,
        !          1156:        kTextEncodingMacSimpChinese     = 25,
        !          1157:        kTextEncodingMacGeez            = 28,
        !          1158:        kTextEncodingMacEastEurRoman = 29,
        !          1159:        kTextEncodingMacUninterp        = 32
        !          1160: };
        !          1161: 
        !          1162: /* TextEncodingVariant type & values */
        !          1163: typedef UInt32                                                         TextEncodingVariant;
        !          1164: 
        !          1165: enum {
        !          1166:                                                                                                                                /* Default TextEncodingVariant, for any TextEncodingBase*/
        !          1167:        kTextEncodingDefaultVariant     = 0,                                                    /* Variants of kTextEncodingMacIcelandic                                                                                                        */
        !          1168:        kMacIcelandicStandardVariant = 0,                                                       /* 0xBB & 0xBC are fem./masc. ordinal indicators*/
        !          1169:        kMacIcelandicTrueTypeVariant = 1,                                                       /* 0xBB & 0xBC are fi/fl ligatures*/
        !          1170:                                                                                                                                /* Variants of kTextEncodingMacJapanese*/
        !          1171:        kMacJapaneseStandardVariant     = 0,
        !          1172:        kMacJapaneseStdNoVerticalsVariant = 1,
        !          1173:        kMacJapaneseBasicVariant        = 2,
        !          1174:        kMacJapanesePostScriptScrnVariant = 3,
        !          1175:        kMacJapanesePostScriptPrintVariant = 4,
        !          1176:        kMacJapaneseVertAtKuPlusTenVariant = 5,                                         /* Variant options for most Japanese encodings (MacJapanese, ShiftJIS, EUC-JP, ISO 2022-JP)     */
        !          1177:                                                                                                                                /* These can be OR-ed into the variant value in any combination*/
        !          1178:        kJapaneseNoOneByteKanaOption = 0x20,
        !          1179:        kJapaneseUseAsciiBackslashOption = 0x40,                                        /* Variants of kTextEncodingMacArabic*/
        !          1180:        kMacArabicStandardVariant       = 0,                                                    /* 0xC0 is 8-spoke asterisk, 0x2A & 0xAA are asterisk (e.g. Cairo)*/
        !          1181:        kMacArabicTrueTypeVariant       = 1,                                                    /* 0xC0 is asterisk, 0x2A & 0xAA are multiply signs (e.g. Baghdad)*/
        !          1182:        kMacArabicThuluthVariant        = 2,                                                    /* 0xC0 is Arabic five-point star, 0x2A & 0xAA are multiply signs*/
        !          1183:        kMacArabicAlBayanVariant        = 3,                                                    /* 8-spoke asterisk, multiply sign, Koranic ligatures & parens*/
        !          1184:                                                                                                                                /* Variants of kTextEncodingMacFarsi*/
        !          1185:        kMacFarsiStandardVariant        = 0,                                                    /* 0xC0 is 8-spoke asterisk, 0x2A & 0xAA are asterisk (e.g. Tehran)*/
        !          1186:        kMacFarsiTrueTypeVariant        = 1,                                                    /* asterisk, multiply signs, Koranic ligatures, geometric shapes*/
        !          1187:                                                                                                                                /* Variants of kTextEncodingMacHebrew*/
        !          1188:        kMacHebrewStandardVariant       = 0,
        !          1189:        kMacHebrewFigureSpaceVariant = 1,                                                       /* Variants of Unicode & ISO 10646 encodings*/
        !          1190:        kUnicodeNoSubset                        = 0,
        !          1191:        kUnicodeNoCompatibilityVariant = 1,
        !          1192:        kUnicodeMaxDecomposedVariant = 2,
        !          1193:        kUnicodeNoComposedVariant       = 3,
        !          1194:        kUnicodeNoCorporateVariant      = 4,                                                    /* Variants of Big-5 encoding*/
        !          1195:        kBig5_BasicVariant                      = 0,
        !          1196:        kBig5_StandardVariant           = 1,                                                    /* 0xC6A1-0xC7FC: kana, Cyrillic, enclosed numerics*/
        !          1197:        kBig5_ETenVariant                       = 2,                                                    /* adds kana, Cyrillic, radicals, etc with hi bytes C6-C8,F9*/
        !          1198:                                                                                                                                /* The following are older names for backward compatibility*/
        !          1199:        kJapaneseStandardVariant        = 0,
        !          1200:        kJapaneseStdNoVerticalsVariant = 1,
        !          1201:        kJapaneseBasicVariant           = 2,
        !          1202:        kJapanesePostScriptScrnVariant = 3,
        !          1203:        kJapanesePostScriptPrintVariant = 4,
        !          1204:        kJapaneseVertAtKuPlusTenVariant = 5,                                            /* kJapaneseStdNoOneByteKanaVariant = 6,        // replaced by kJapaneseNoOneByteKanaOption*/
        !          1205:                                                                                                                                /* kJapaneseBasicNoOneByteKanaVariant = 7,      // replaced by kJapaneseNoOneByteKanaOption     */
        !          1206:        kHebrewStandardVariant          = 0,
        !          1207:        kHebrewFigureSpaceVariant       = 1
        !          1208: };
        !          1209: 
        !          1210: /* TextEncodingFormat type & values */
        !          1211: typedef UInt32                                                         TextEncodingFormat;
        !          1212: 
        !          1213: enum {
        !          1214:                                                                                                                                /* Default TextEncodingFormat for any TextEncodingBase*/
        !          1215:        kTextEncodingDefaultFormat      = 0,                                                    /* Formats for Unicode & ISO 10646*/
        !          1216:        kUnicode16BitFormat                     = 0,
        !          1217:        kUnicodeUTF7Format                      = 1,
        !          1218:        kUnicodeUTF8Format                      = 2,
        !          1219:        kUnicode32BitFormat                     = 3
        !          1220: };
        !          1221: 
        !          1222: /* TextEncoding type */
        !          1223: typedef UInt32                                                         TextEncoding;
        !          1224: /* name part selector for GetTextEncodingName*/
        !          1225: typedef UInt32                                                         TextEncodingNameSelector;
        !          1226: 
        !          1227: enum {
        !          1228:        kTextEncodingFullName           = 0,
        !          1229:        kTextEncodingBaseName           = 1,
        !          1230:        kTextEncodingVariantName        = 2,
        !          1231:        kTextEncodingFormatName         = 3
        !          1232: };
        !          1233: 
        !          1234: /* Types used in conversion */
        !          1235: struct TextEncodingRun {
        !          1236:        ByteOffset                                              offset;
        !          1237:        TextEncoding                                    textEncoding;
        !          1238: };
        !          1239: typedef struct TextEncodingRun TextEncodingRun;
        !          1240: 
        !          1241: typedef TextEncodingRun *                              TextEncodingRunPtr;
        !          1242: typedef const TextEncodingRun *                        ConstTextEncodingRunPtr;
        !          1243: struct ScriptCodeRun {
        !          1244:        ByteOffset                                              offset;
        !          1245:        ScriptCode                                              script;
        !          1246: };
        !          1247: typedef struct ScriptCodeRun ScriptCodeRun;
        !          1248: 
        !          1249: typedef ScriptCodeRun *                                        ScriptCodeRunPtr;
        !          1250: typedef const ScriptCodeRun *                  ConstScriptCodeRunPtr;
        !          1251: typedef UInt8 *                                                        TextPtr;
        !          1252: typedef const UInt8 *                                  ConstTextPtr;
        !          1253: /* Basic types for Unicode characters and strings: */
        !          1254: typedef UniChar *                                              UniCharArrayPtr;
        !          1255: typedef const UniChar *                                        ConstUniCharArrayPtr;
        !          1256: /* enums for TextEncoding Conversion routines*/
        !          1257: 
        !          1258: enum {
        !          1259:        kTextScriptDontCare                     = -128,
        !          1260:        kTextLanguageDontCare           = -128,
        !          1261:        kTextRegionDontCare                     = -128
        !          1262: };
        !          1263: 
        !          1264: 
        !          1265: 
        !          1266: /*
        !          1267:        File:           UnicodeConverter.h
        !          1268:  
        !          1269:  
        !          1270: */
        !          1271: 
        !          1272: /* Unicode conversion contexts: */
        !          1273: typedef struct OpaqueTextToUnicodeInfo*  TextToUnicodeInfo;
        !          1274: typedef struct OpaqueUnicodeToTextInfo*  UnicodeToTextInfo;
        !          1275: typedef struct OpaqueUnicodeToTextRunInfo*  UnicodeToTextRunInfo;
        !          1276: typedef const TextToUnicodeInfo                ConstTextToUnicodeInfo;
        !          1277: typedef const UnicodeToTextInfo                ConstUnicodeToTextInfo;
        !          1278: /* UnicodeMapVersion type & values */
        !          1279: typedef SInt32                                                         UnicodeMapVersion;
        !          1280: 
        !          1281: enum {
        !          1282:        kUnicodeUseLatestMapping        = -1,
        !          1283:        kUnicodeUseHFSPlusMapping       = 4
        !          1284: };
        !          1285: 
        !          1286: /* Types used in conversion */
        !          1287: struct UnicodeMapping {
        !          1288:        TextEncoding                                    unicodeEncoding;
        !          1289:        TextEncoding                                    otherEncoding;
        !          1290:        UnicodeMapVersion                               mappingVersion;
        !          1291: };
        !          1292: typedef struct UnicodeMapping UnicodeMapping;
        !          1293: 
        !          1294: typedef UnicodeMapping *                               UnicodeMappingPtr;
        !          1295: typedef const UnicodeMapping *                 ConstUnicodeMappingPtr;
        !          1296: /* Control flags for ConvertFromUnicodeToText and ConvertFromTextToUnicode */
        !          1297: 
        !          1298: enum {
        !          1299:        kUnicodeUseFallbacksBit         = 0,
        !          1300:        kUnicodeKeepInfoBit                     = 1,
        !          1301:        kUnicodeDirectionalityBits      = 2,
        !          1302:        kUnicodeVerticalFormBit         = 4,
        !          1303:        kUnicodeLooseMappingsBit        = 5,
        !          1304:        kUnicodeStringUnterminatedBit = 6,
        !          1305:        kUnicodeTextRunBit                      = 7,
        !          1306:        kUnicodeKeepSameEncodingBit     = 8
        !          1307: };
        !          1308: 
        !          1309: 
        !          1310: enum {
        !          1311:        kUnicodeUseFallbacksMask        = 1L << kUnicodeUseFallbacksBit,
        !          1312:        kUnicodeKeepInfoMask            = 1L << kUnicodeKeepInfoBit,
        !          1313:        kUnicodeDirectionalityMask      = 3L << kUnicodeDirectionalityBits,
        !          1314:        kUnicodeVerticalFormMask        = 1L << kUnicodeVerticalFormBit,
        !          1315:        kUnicodeLooseMappingsMask       = 1L << kUnicodeLooseMappingsBit,
        !          1316:        kUnicodeStringUnterminatedMask = 1L << kUnicodeStringUnterminatedBit,
        !          1317:        kUnicodeTextRunMask                     = 1L << kUnicodeTextRunBit,
        !          1318:        kUnicodeKeepSameEncodingMask = 1L << kUnicodeKeepSameEncodingBit
        !          1319: };
        !          1320: 
        !          1321: /* Values for kUnicodeDirectionality field */
        !          1322: 
        !          1323: enum {
        !          1324:        kUnicodeDefaultDirection        = 0,
        !          1325:        kUnicodeLeftToRight                     = 1,
        !          1326:        kUnicodeRightToLeft                     = 2
        !          1327: };
        !          1328: 
        !          1329: /* Directionality masks for control flags */
        !          1330: 
        !          1331: enum {
        !          1332:        kUnicodeDefaultDirectionMask = kUnicodeDefaultDirection << kUnicodeDirectionalityBits,
        !          1333:        kUnicodeLeftToRightMask         = kUnicodeLeftToRight << kUnicodeDirectionalityBits,
        !          1334:        kUnicodeRightToLeftMask         = kUnicodeRightToLeft << kUnicodeDirectionalityBits
        !          1335: };
        !          1336: 
        !          1337: /* Control flags for TruncateForUnicodeToText: */
        !          1338: /*
        !          1339:    Now TruncateForUnicodeToText uses control flags from the same set as used by
        !          1340:    ConvertFromTextToUnicode, ConvertFromUnicodeToText, etc., but only
        !          1341:    kUnicodeStringUnterminatedMask is meaningful for TruncateForUnicodeToText.
        !          1342:    
        !          1343:    Previously two special control flags were defined for TruncateForUnicodeToText:
        !          1344:                kUnicodeTextElementSafeBit = 0
        !          1345:                kUnicodeRestartSafeBit = 1
        !          1346:    However, neither of these was implemented.
        !          1347:    Instead of implementing kUnicodeTextElementSafeBit, we now use
        !          1348:    kUnicodeStringUnterminatedMask since it accomplishes the same thing and avoids
        !          1349:    having special flags just for TruncateForUnicodeToText
        !          1350:    Also, kUnicodeRestartSafeBit is unnecessary, since restart-safeness is handled by
        !          1351:    setting kUnicodeKeepInfoBit with ConvertFromUnicodeToText.
        !          1352:    If TruncateForUnicodeToText is called with one or both of the old special control
        !          1353:    flags set (bits 0 or 1), it will not generate a paramErr, but the old bits have no
        !          1354:    effect on its operation.
        !          1355: */
        !          1356: 
        !          1357: /* Filter bits for filter field in QueryUnicodeMappings and CountUnicodeMappings: */
        !          1358: 
        !          1359: enum {
        !          1360:        kUnicodeMatchUnicodeBaseBit     = 0,
        !          1361:        kUnicodeMatchUnicodeVariantBit = 1,
        !          1362:        kUnicodeMatchUnicodeFormatBit = 2,
        !          1363:        kUnicodeMatchOtherBaseBit       = 3,
        !          1364:        kUnicodeMatchOtherVariantBit = 4,
        !          1365:        kUnicodeMatchOtherFormatBit     = 5
        !          1366: };
        !          1367: 
        !          1368: 
        !          1369: enum {
        !          1370:        kUnicodeMatchUnicodeBaseMask = 1L << kUnicodeMatchUnicodeBaseBit,
        !          1371:        kUnicodeMatchUnicodeVariantMask = 1L << kUnicodeMatchUnicodeVariantBit,
        !          1372:        kUnicodeMatchUnicodeFormatMask = 1L << kUnicodeMatchUnicodeFormatBit,
        !          1373:        kUnicodeMatchOtherBaseMask      = 1L << kUnicodeMatchOtherBaseBit,
        !          1374:        kUnicodeMatchOtherVariantMask = 1L << kUnicodeMatchOtherVariantBit,
        !          1375:        kUnicodeMatchOtherFormatMask = 1L << kUnicodeMatchOtherFormatBit
        !          1376: };
        !          1377: 
        !          1378: /* Control flags for SetFallbackUnicodeToText */
        !          1379: 
        !          1380: enum {
        !          1381:        kUnicodeFallbackSequencingBits = 0
        !          1382: };
        !          1383: 
        !          1384: 
        !          1385: enum {
        !          1386:        kUnicodeFallbackSequencingMask = 3L << kUnicodeFallbackSequencingBits
        !          1387: };
        !          1388: 
        !          1389: /* values for kUnicodeFallbackSequencing field */
        !          1390: 
        !          1391: enum {
        !          1392:        kUnicodeFallbackDefaultOnly     = 0L,
        !          1393:        kUnicodeFallbackCustomOnly      = 1L,
        !          1394:        kUnicodeFallbackDefaultFirst = 2L,
        !          1395:        kUnicodeFallbackCustomFirst     = 3L
        !          1396: };
        !          1397: 
        !          1398: 
        !          1399: 
        !          1400: /*
        !          1401:        File:           Timer.h
        !          1402:  
        !          1403:  
        !          1404: */
        !          1405: 
        !          1406: 
        !          1407: enum {
        !          1408:                                                                                                                                /* high bit of qType is set if task is active */
        !          1409:        kTMTaskActive                           = (1L << 15)
        !          1410: };
        !          1411: 
        !          1412: typedef struct TMTask                                  TMTask;
        !          1413: typedef TMTask *                                               TMTaskPtr;
        !          1414: typedef CALLBACK_API( void , TimerProcPtr )(TMTaskPtr tmTaskPtr);
        !          1415: /*
        !          1416:        WARNING: TimerProcPtr uses register based parameters under classic 68k
        !          1417:                         and cannot be written in a high-level language without 
        !          1418:                         the help of mixed mode or assembly glue.
        !          1419: */
        !          1420: typedef REGISTER_UPP_TYPE(TimerProcPtr)                                                TimerUPP;
        !          1421: struct TMTask {
        !          1422:        QElemPtr                                                qLink;
        !          1423:        short                                                   qType;
        !          1424:        TimerUPP                                                tmAddr;
        !          1425:        long                                                    tmCount;
        !          1426:        long                                                    tmWakeUp;
        !          1427:        long                                                    tmReserved;
        !          1428: };
        !          1429: 
        !          1430: 
        !          1431: /*
        !          1432:        File:           TextCommonPriv.h
        !          1433:  
        !          1434:  
        !          1435: */
        !          1436: 
        !          1437: 
        !          1438: /*
        !          1439:    -----------------------------------------------------------------------------------------------------------
        !          1440:    TextEncoding creation & extraction macros.
        !          1441:    Current packed format:
        !          1442:                31 30 29    26 25                 16 15                             0
        !          1443:                |pack| format |       variant       |              base              |
        !          1444:                |vers|        |                     |                                |
        !          1445:                |2bit| 4 bits |       10 bits       |            16 bits             |
        !          1446:    Unpacked elements
        !          1447:                base                                 15                             0
        !          1448:                |                0                  |            16 bits             |
        !          1449:                variant                                              9              0
        !          1450:                |                0                                  |      10 bits   |
        !          1451:                format                                                       3      0
        !          1452:                |                0                                          | 4 bits |
        !          1453:    -----------------------------------------------------------------------------------------------------------
        !          1454: */
        !          1455: 
        !          1456: enum {
        !          1457:        kTextEncodingVersion            = 0
        !          1458: };
        !          1459: 
        !          1460: 
        !          1461: enum {
        !          1462:        kTextEncodingBaseShiftBits      = 0,                                                    /*      <13>*/
        !          1463:        kTextEncodingVariantShiftBits = 16,                                                     /*      <13>*/
        !          1464:        kTextEncodingFormatShiftBits = 26,                                                      /*      <13><16>*/
        !          1465:        kTextEncodingVersionShiftBits = 30
        !          1466: };
        !          1467: 
        !          1468: 
        !          1469: 
        !          1470: enum {
        !          1471:        kTextEncodingBaseSourceMask     = 0x0000FFFF,                                   /*      16 bits <13>*/
        !          1472:        kTextEncodingVariantSourceMask = 0x000003FF,                            /*      10 bits <13><16>*/
        !          1473:        kTextEncodingFormatSourceMask = 0x0000000F,                                     /*       4 bits <13><16>*/
        !          1474:        kTextEncodingVersionSourceMask = 0x00000003                                     /*       2 bits*/
        !          1475: };
        !          1476: 
        !          1477: 
        !          1478: enum {
        !          1479:        kTextEncodingBaseMask           = kTextEncodingBaseSourceMask << kTextEncodingBaseShiftBits,
        !          1480:        kTextEncodingVariantMask        = kTextEncodingVariantSourceMask << kTextEncodingVariantShiftBits,
        !          1481:        kTextEncodingFormatMask         = kTextEncodingFormatSourceMask << kTextEncodingFormatShiftBits,
        !          1482:        kTextEncodingVersionMask        = kTextEncodingVersionSourceMask << kTextEncodingVersionShiftBits
        !          1483: };
        !          1484: 
        !          1485: 
        !          1486: enum {
        !          1487:        kTextEncodingVersionShifted     = (kTextEncodingVersion & kTextEncodingVersionSourceMask) << kTextEncodingVersionShiftBits
        !          1488: };
        !          1489: 
        !          1490: 
        !          1491: #define CreateTextEncodingPriv(base,variant,format) \
        !          1492:                                ( ((base & kTextEncodingBaseSourceMask) << kTextEncodingBaseShiftBits) \
        !          1493:                                | ((variant & kTextEncodingVariantSourceMask) << kTextEncodingVariantShiftBits) \
        !          1494:                                | ((format & kTextEncodingFormatSourceMask) << kTextEncodingFormatShiftBits) \
        !          1495:                                | (kTextEncodingVersionShifted) )
        !          1496: #define GetTextEncodingBasePriv(encoding) \
        !          1497:                                ((encoding & kTextEncodingBaseMask) >> kTextEncodingBaseShiftBits)
        !          1498: #define GetTextEncodingVariantPriv(encoding) \
        !          1499:                                ((encoding & kTextEncodingVariantMask) >> kTextEncodingVariantShiftBits)
        !          1500: #define GetTextEncodingFormatPriv(encoding) \
        !          1501:                                ((encoding & kTextEncodingFormatMask) >> kTextEncodingFormatShiftBits)
        !          1502: #define IsMacTextEncoding(encoding) ((encoding & 0x0000FF00L) == 0x00000000L)
        !          1503: #define IsUnicodeTextEncoding(encoding) ((encoding & 0x0000FF00L) == 0x00000100L)
        !          1504: /* TextEncoding used by HFS*/
        !          1505: 
        !          1506: enum {
        !          1507:        kMacHFSTextEncoding                     = 0x000000FF
        !          1508: };
        !          1509: 
        !          1510: 
        !          1511: /*
        !          1512:        File:           Instrumentation.h
        !          1513: 
        !          1514: 
        !          1515: */
        !          1516: /*******************************************************************/
        !          1517: /*                        Types                                                       */
        !          1518: /*******************************************************************/
        !          1519: /* Reference to an instrumentation class */
        !          1520: typedef struct InstOpaqueClassRef* InstClassRef;
        !          1521: 
        !          1522: /* Aliases to the generic instrumentation class for each type of class */
        !          1523: typedef InstClassRef InstPathClassRef;
        !          1524: typedef InstClassRef InstTraceClassRef;
        !          1525: typedef InstClassRef InstHistogramClassRef;
        !          1526: typedef InstClassRef InstSplitHistogramClassRef;
        !          1527: typedef InstClassRef InstMagnitudeClassRef;
        !          1528: typedef InstClassRef InstGrowthClassRef;
        !          1529: typedef InstClassRef InstTallyClassRef;
        !          1530: 
        !          1531: /* Reference to a data descriptor */
        !          1532: typedef struct InstOpaqueDataDescriptorRef* InstDataDescriptorRef;
        !          1533: 
        !          1534: 
        !          1535: /*******************************************************************/
        !          1536: /*            Constant Definitions                                 */
        !          1537: /*******************************************************************/
        !          1538: 
        !          1539: /* Reference to the root of the class hierarchy */
        !          1540: #define kInstRootClassRef       ( (InstClassRef) -1)
        !          1541: 
        !          1542: /* Options used for creating classes */
        !          1543: typedef OptionBits InstClassOptions;
        !          1544: 
        !          1545: 
        !          1546: enum {
        !          1547:        kInstDisableClassMask                   = 0x00,                 /* Create the class disabled */
        !          1548:        kInstEnableClassMask                    = 0x01,                 /* Create the class enabled */
        !          1549: 
        !          1550:        kInstSummaryTraceClassMask              = 0x20                  /* Create a summary trace class instead of a regular one */
        !          1551: };
        !          1552: 
        !          1553:                                                                
        !          1554: 
        !          1555: EXTERN_API( Boolean )
        !          1556: EqualString                                            (ConstStr255Param               str1,
        !          1557:                                                                 ConstStr255Param               str2,
        !          1558:                                                                 Boolean                                caseSensitive,
        !          1559:                                                                 Boolean                                diacSensitive);
        !          1560: 
        !          1561:                                                                 
        !          1562: 
        !          1563: 
        !          1564: /*
        !          1565:        File:           LowMemPriv.h
        !          1566:  
        !          1567:  
        !          1568: */
        !          1569: 
        !          1570: /* The following replace storage used in low-mem on MacOS: */
        !          1571: extern struct FSVarsRec * gFSMVars;
        !          1572: 
        !          1573: 
        !          1574: #define LMGetFSMVars() gFSMVars
        !          1575: 
        !          1576: 
        !          1577: 
        !          1578: EXTERN_API( void )
        !          1579: InsTime                                                        (QElemPtr                               tmTaskPtr);
        !          1580: EXTERN_API( void )
        !          1581: PrimeTime                                              (QElemPtr                               tmTaskPtr,
        !          1582:                                                                 long                                   count);
        !          1583: EXTERN_API( void )
        !          1584: RmvTime                                                        (QElemPtr                               tmTaskPtr);
        !          1585: 
        !          1586: 
        !          1587:                                                                 
        !          1588: 
        !          1589: /* PROTOTYPES */
        !          1590: 
        !          1591: #if HFS_DIAGNOSTIC
        !          1592:        extern void RequireFileLock(FileReference vp, int shareable);
        !          1593: #else
        !          1594:        #define RequireFileLock(vp,s)
        !          1595: #endif
        !          1596: 
        !          1597: 
        !          1598: EXTERN_API( void )
        !          1599: BlockMove                                              (const void *                   srcPtr,
        !          1600:                                                                 void *                                 destPtr,
        !          1601:                                                                 Size                                   byteCount);
        !          1602: EXTERN_API( void )
        !          1603: BlockMoveData                                  (const void *                   srcPtr,
        !          1604:                                                                 void *                                 destPtr,
        !          1605:                                                                 Size                                   byteCount);
        !          1606: 
        !          1607: EXTERN_API_C( void )
        !          1608: BlockMoveUncached                              (const void *                   srcPtr,
        !          1609:                                                                 void *                                 destPtr,
        !          1610:                                                                 Size                                   byteCount);
        !          1611: 
        !          1612: EXTERN_API_C( void )
        !          1613: BlockMoveDataUncached                  (const void *                   srcPtr,
        !          1614:                                                                 void *                                 destPtr,
        !          1615:                                                                 Size                                   byteCount);
        !          1616: 
        !          1617: EXTERN_API_C( void )
        !          1618: BlockZero                                              (void *                                 destPtr,
        !          1619:                                                                 Size                                   byteCount);
        !          1620: 
        !          1621: EXTERN_API_C( void )
        !          1622: BlockZeroUncached                              (void *                                 destPtr,
        !          1623:                                                                 Size                                   byteCount);
        !          1624: 
        !          1625: EXTERN_API( Ptr )
        !          1626: NewPtr                                                 (Size                                   byteCount);
        !          1627: 
        !          1628: EXTERN_API( Ptr )
        !          1629: NewPtrSys                                              (Size                                   byteCount);
        !          1630: 
        !          1631: EXTERN_API( Ptr )
        !          1632: NewPtrClear                                            (Size                                   byteCount);
        !          1633: 
        !          1634: EXTERN_API( Ptr )
        !          1635: NewPtrSysClear                                 (Size                                   byteCount);
        !          1636: 
        !          1637: EXTERN_API( OSErr )
        !          1638: MemError                                               (void);
        !          1639: 
        !          1640: EXTERN_API( void )
        !          1641: DisposePtr                                             (Ptr                                    p);
        !          1642: 
        !          1643: EXTERN_API( Size )
        !          1644: GetPtrSize                                             (Ptr                                    p);
        !          1645: 
        !          1646: EXTERN_API( void )
        !          1647: SetPtrSize                                             (Ptr                                    p,
        !          1648:                                                                 Size                                   newSize);
        !          1649:                                                                 
        !          1650: EXTERN_API( void )
        !          1651: DisposeHandle                                  (Handle                                 h);
        !          1652: 
        !          1653: EXTERN_API( void )
        !          1654: SetHandleSize                                  (Handle                                 h,
        !          1655:                                                                 Size                                   newSize);
        !          1656: 
        !          1657: /*
        !          1658:        File:           DateTimeUtils.h
        !          1659:  
        !          1660:  
        !          1661: */
        !          1662: EXTERN_API( void )
        !          1663: GetDateTime                                            (unsigned long *                secs);
        !          1664: 
        !          1665: 
        !          1666: 
        !          1667: #endif /* __hfs_macos_types__ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.