2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
23 File: HFSUnicodeWrappers.h
25 Contains: IPI to Unicode routines used by File Manager.
31 Copyright: © 1996-1997 by Apple Computer, Inc., all rights reserved.
35 DRI: xxx put dri here xxx
37 Other Contact: xxx put other contact here xxx
39 Technology: xxx put technology here xxx
47 Change History (most recent first):
49 <CS11> 11/16/97 djb Change Unicode.h to UnicodeConverter.h.
50 <CS10> 11/7/97 msd Remove prototype for CompareUnicodeNames(). Add prototype for
52 <CS9> 10/13/97 djb Add encoding/index macros and add prototypes for new Get/Set
54 <CS8> 9/15/97 djb InitUnicodeConverter now takes a boolean.
55 <CS7> 9/10/97 msd Add prototype for InitializeEncodingContext.
56 <CS6> 6/26/97 DSH Include "MockConverter" prototype for DFA usage.
57 <CS5> 6/25/97 DSH Removed Prototype definitions, and checked in Unicode.h and
58 TextCommon.h from Julio Gonzales into InternalInterfaces.
59 <CS4> 6/25/97 msd Add prototypes for some new Unicode routines that haven't
60 appeared in MasterInterfaces yet.
61 <CS3> 6/18/97 djb Add more ConversionContexts routines.
62 <CS2> 6/13/97 djb Switched to ConvertUnicodeToHFSName, ConvertHFSNameToUnicode, &
64 <CS1> 4/28/97 djb first checked in
65 <HFS1> 12/12/96 msd first checked in
68 #ifndef _HFSUNICODEWRAPPERS_
69 #define _HFSUNICODEWRAPPERS_
71 #include <sys/appleapiopts.h>
74 #ifdef __APPLE_API_PRIVATE
76 #include "../../hfs_macos_defs.h"
77 #include "../../hfs_format.h"
80 extern OSErr
ConvertUnicodeToUTF8Mangled ( ByteCount srcLen
,
81 ConstUniCharArrayPtr srcStr
,
83 ByteCount
*actualDstLen
,
84 unsigned char* dstStr
,
85 HFSCatalogNodeID cnid
);
88 This routine compares two Unicode names based on an ordering defined by the HFS Plus B-tree.
89 This ordering must stay fixed for all time.
92 -n name1 < name2 (i.e. name 1 sorts before name 2)
96 NOTE: You should not depend on the magnitude of the result, just its sign. That is, when name1 < name2, then any
97 negative number may be returned.
100 extern SInt32
FastUnicodeCompare(register ConstUniCharArrayPtr str1
, register ItemCount length1
,
101 register ConstUniCharArrayPtr str2
, register ItemCount length2
);
104 extern SInt32
FastRelString( ConstStr255Param str1
, ConstStr255Param str2
);
107 extern HFSCatalogNodeID
GetEmbeddedFileID( ConstStr31Param filename
, UInt32 length
, UInt32
*prefixLength
);
109 #endif /* __APPLE_API_PRIVATE */
111 #endif /* _HFSUNICODEWRAPPERS_ */