~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to packages/extra/univint/Dictionary.pas

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
     File:       Dictionary.p
 
3
 
 
4
     Contains:   Dictionary Manager Interfaces
 
5
 
 
6
     Version:    Technology: System 7
 
7
                 Release:    Universal Interfaces 3.4.2
 
8
 
 
9
     Copyright:  � 1992-2002 by Apple Computer, Inc., all rights reserved.
 
10
 
 
11
     Bugs?:      For bug reports, consult the following page on
 
12
                 the World Wide Web:
 
13
 
 
14
                     http://www.freepascal.org/bugs.html
 
15
 
 
16
}
 
17
 
 
18
 
 
19
{
 
20
    Modified for use with Free Pascal
 
21
    Version 200
 
22
    Please report any bugs to <gpc@microbizz.nl>
 
23
}
 
24
 
 
25
{$mode macpas}
 
26
{$packenum 1}
 
27
{$macro on}
 
28
{$inline on}
 
29
{$CALLING MWPASCAL}
 
30
 
 
31
unit Dictionary;
 
32
interface
 
33
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
 
34
{$setc GAP_INTERFACES_VERSION := $0200}
 
35
 
 
36
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
 
37
    {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
 
38
{$endc}
 
39
 
 
40
{$ifc defined CPUPOWERPC and defined CPUI386}
 
41
        {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
 
42
{$endc}
 
43
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
 
44
        {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
 
45
{$endc}
 
46
 
 
47
{$ifc not defined __ppc__ and defined CPUPOWERPC}
 
48
        {$setc __ppc__ := 1}
 
49
{$elsec}
 
50
        {$setc __ppc__ := 0}
 
51
{$endc}
 
52
{$ifc not defined __i386__ and defined CPUI386}
 
53
        {$setc __i386__ := 1}
 
54
{$elsec}
 
55
        {$setc __i386__ := 0}
 
56
{$endc}
 
57
 
 
58
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
 
59
        {$error Conflicting definitions for __ppc__ and __i386__}
 
60
{$endc}
 
61
 
 
62
{$ifc defined __ppc__ and __ppc__}
 
63
        {$setc TARGET_CPU_PPC := TRUE}
 
64
        {$setc TARGET_CPU_X86 := FALSE}
 
65
{$elifc defined __i386__ and __i386__}
 
66
        {$setc TARGET_CPU_PPC := FALSE}
 
67
        {$setc TARGET_CPU_X86 := TRUE}
 
68
{$elsec}
 
69
        {$error Neither __ppc__ nor __i386__ is defined.}
 
70
{$endc}
 
71
{$setc TARGET_CPU_PPC_64 := FALSE}
 
72
 
 
73
{$ifc defined FPC_BIG_ENDIAN}
 
74
        {$setc TARGET_RT_BIG_ENDIAN := TRUE}
 
75
        {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
 
76
{$elifc defined FPC_LITTLE_ENDIAN}
 
77
        {$setc TARGET_RT_BIG_ENDIAN := FALSE}
 
78
        {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
 
79
{$elsec}
 
80
        {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
 
81
{$endc}
 
82
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
 
83
{$setc CALL_NOT_IN_CARBON := FALSE}
 
84
{$setc OLDROUTINENAMES := FALSE}
 
85
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
 
86
{$setc OPAQUE_UPP_TYPES := TRUE}
 
87
{$setc OTCARBONAPPLICATION := TRUE}
 
88
{$setc OTKERNEL := FALSE}
 
89
{$setc PM_USE_SESSION_APIS := TRUE}
 
90
{$setc TARGET_API_MAC_CARBON := TRUE}
 
91
{$setc TARGET_API_MAC_OS8 := FALSE}
 
92
{$setc TARGET_API_MAC_OSX := TRUE}
 
93
{$setc TARGET_CARBON := TRUE}
 
94
{$setc TARGET_CPU_68K := FALSE}
 
95
{$setc TARGET_CPU_MIPS := FALSE}
 
96
{$setc TARGET_CPU_SPARC := FALSE}
 
97
{$setc TARGET_OS_MAC := TRUE}
 
98
{$setc TARGET_OS_UNIX := FALSE}
 
99
{$setc TARGET_OS_WIN32 := FALSE}
 
100
{$setc TARGET_RT_MAC_68881 := FALSE}
 
101
{$setc TARGET_RT_MAC_CFM := FALSE}
 
102
{$setc TARGET_RT_MAC_MACHO := TRUE}
 
103
{$setc TYPED_FUNCTION_POINTERS := TRUE}
 
104
{$setc TYPE_BOOL := FALSE}
 
105
{$setc TYPE_EXTENDED := FALSE}
 
106
{$setc TYPE_LONGLONG := TRUE}
 
107
uses MacTypes,AEDataModel,Files,AERegistry,CodeFragments,MacErrors;
 
108
 
 
109
 
 
110
{$ALIGN POWER}
 
111
 
 
112
{
 
113
=============================================================================================
 
114
 Modern Dictionary Manager
 
115
=============================================================================================
 
116
}
 
117
{
 
118
    Dictionary information
 
119
}
 
120
 
 
121
const
 
122
        kDictionaryFileType                     = $64696374 (* 'dict' *);
 
123
        kDCMDictionaryHeaderSignature = $64696374 (* 'dict' *);
 
124
        kDCMDictionaryHeaderVersion     = 2;
 
125
 
 
126
        kDCMAnyFieldTag                         = $2A2A2A2A (* '****' *);
 
127
        kDCMAnyFieldType                        = $2A2A2A2A (* '****' *);
 
128
 
 
129
        {       
 
130
            Contents of a Field Info Record (an AERecord)
 
131
                }
 
132
        keyDCMFieldTag                          = $66746167 (* 'ftag' *);                                               {  typeEnumeration  }
 
133
        keyDCMFieldType                         = $66747970 (* 'ftyp' *);                                               {  typeEnumeration  }
 
134
        keyDCMMaxRecordSize                     = $6D72737A (* 'mrsz' *);                                               {  typeMagnitude  }
 
135
        keyDCMFieldAttributes           = $66617472 (* 'fatr' *);
 
136
        keyDCMFieldDefaultData          = $66646566 (* 'fdef' *);
 
137
        keyDCMFieldName                         = $666E616D (* 'fnam' *);                                               {  typeChar  }
 
138
        keyDCMFieldFindMethods          = $66666E64 (* 'ffnd' *);                                               {  typeAEList of typeDCMFindMethod  }
 
139
 
 
140
        {       
 
141
            Special types for fields of a Field Info Record
 
142
                }
 
143
        typeDCMFieldAttributes          = $66617472 (* 'fatr' *);
 
144
        typeDCMFindMethod                       = $666D7468 (* 'fmth' *);
 
145
 
 
146
 
 
147
        {       
 
148
            Field attributes
 
149
                }
 
150
        kDCMIndexedFieldMask            = $00000001;
 
151
        kDCMRequiredFieldMask           = $00000002;
 
152
        kDCMIdentifyFieldMask           = $00000004;
 
153
        kDCMFixedSizeFieldMask          = $00000008;
 
154
        kDCMHiddenFieldMask                     = $80000000;
 
155
 
 
156
 
 
157
type
 
158
        DCMFieldAttributes                                      = OptionBits;
 
159
        {       
 
160
            Standard dictionary properties
 
161
                }
 
162
 
 
163
const
 
164
        pDCMAccessMethod                        = $616D7464 (* 'amtd' *);                                               {  data type: typeChar ReadOnly  }
 
165
        pDCMPermission                          = $7065726D (* 'perm' *);                                               {  data type: typeUInt16  }
 
166
        pDCMListing                                     = $6C697374 (* 'list' *);                                               {  data type: typeUInt16  }
 
167
        pDCMMaintenance                         = $6D746E63 (* 'mtnc' *);                                               {  data type: typeUInt16  }
 
168
        pDCMLocale                                      = $6C6F636C (* 'locl' *);                                               {  data type: typeUInt32.  Optional; default = kLocaleIdentifierWildCard  }
 
169
        pDCMClass                                       = $70636C73 (* 'pcls' *);                                               {  data type: typeUInt16  }
 
170
        pDCMCopyright                           = $696E666F (* 'info' *);                                               {  data type: typeChar  }
 
171
 
 
172
        {       
 
173
            pDCMPermission property constants
 
174
                }
 
175
        kDCMReadOnlyDictionary          = 0;
 
176
        kDCMReadWriteDictionary         = 1;
 
177
 
 
178
        {       
 
179
            pDCMListing property constants
 
180
                }
 
181
        kDCMAllowListing                        = 0;
 
182
        kDCMProhibitListing                     = 1;
 
183
 
 
184
        {       
 
185
            pDCMClass property constants
 
186
                }
 
187
        kDCMUserDictionaryClass         = 0;
 
188
        kDCMSpecificDictionaryClass     = 1;
 
189
        kDCMBasicDictionaryClass        = 2;
 
190
 
 
191
        {       
 
192
            Standard search method
 
193
                }
 
194
        kDCMFindMethodExactMatch        = $3D202020 (* '=   ' *);
 
195
        kDCMFindMethodBeginningMatch = $62677774 (* 'bgwt' *);
 
196
        kDCMFindMethodContainsMatch     = $636F6E74 (* 'cont' *);
 
197
        kDCMFindMethodEndingMatch       = $656E6473 (* 'ends' *);
 
198
        kDCMFindMethodForwardTrie       = $66747269 (* 'ftri' *);                                               {  used for morphological analysis }
 
199
        kDCMFindMethodBackwardTrie      = $62747269 (* 'btri' *);                                               {  used for morphological analysis }
 
200
 
 
201
 
 
202
type
 
203
        DCMFindMethod                                           = OSType;
 
204
        {       
 
205
            AccessMethod features
 
206
                }
 
207
 
 
208
const
 
209
        kDCMCanUseFileDictionaryMask = $00000001;
 
210
        kDCMCanUseMemoryDictionaryMask = $00000002;
 
211
        kDCMCanStreamDictionaryMask     = $00000004;
 
212
        kDCMCanHaveMultipleIndexMask = $00000008;
 
213
        kDCMCanModifyDictionaryMask     = $00000010;
 
214
        kDCMCanCreateDictionaryMask     = $00000020;
 
215
        kDCMCanAddDictionaryFieldMask = $00000040;
 
216
        kDCMCanUseTransactionMask       = $00000080;
 
217
 
 
218
 
 
219
type
 
220
        DCMAccessMethodFeature                          = OptionBits;
 
221
        DCMUniqueID                                                     = UInt32;
 
222
        DCMObjectID    = ^SInt32; { an opaque 32-bit type }
 
223
        DCMObjectIDPtr = ^DCMObjectID;  { when a var xx:DCMObjectID parameter can be nil, it is changed to xx: DCMObjectIDPtr }
 
224
        DCMAccessMethodID                                       = DCMObjectID;
 
225
        DCMDictionaryID                                         = DCMObjectID;
 
226
        DCMObjectRef    = ^SInt32; { an opaque 32-bit type }
 
227
        DCMObjectRefPtr = ^DCMObjectRef;  { when a var xx:DCMObjectRef parameter can be nil, it is changed to xx: DCMObjectRefPtr }
 
228
        DCMDictionaryRef                                        = DCMObjectRef;
 
229
        DCMDictionaryStreamRef                          = DCMObjectRef;
 
230
        DCMObjectIterator    = ^SInt32; { an opaque 32-bit type }
 
231
        DCMObjectIteratorPtr = ^DCMObjectIterator;  { when a var xx:DCMObjectIterator parameter can be nil, it is changed to xx: DCMObjectIteratorPtr }
 
232
        DCMAccessMethodIterator                         = DCMObjectIterator;
 
233
        DCMDictionaryIterator                           = DCMObjectIterator;
 
234
        DCMFoundRecordIterator    = ^SInt32; { an opaque 32-bit type }
 
235
        DCMFoundRecordIteratorPtr = ^DCMFoundRecordIterator;  { when a var xx:DCMFoundRecordIterator parameter can be nil, it is changed to xx: DCMFoundRecordIteratorPtr }
 
236
        {       
 
237
            Field specification declarations
 
238
                }
 
239
        DCMFieldTag                                                     = DescType;
 
240
        DCMFieldTagPtr                                                  = ^DCMFieldTag;
 
241
        DCMFieldType                                            = DescType;
 
242
        {       
 
243
            Dictionary header information
 
244
                }
 
245
        DCMDictionaryHeaderPtr = ^DCMDictionaryHeader;
 
246
        DCMDictionaryHeader = record
 
247
                headerSignature:                FourCharCode;
 
248
                headerVersion:                  UInt32;
 
249
                headerSize:                             ByteCount;
 
250
                accessMethod:                   Str63;
 
251
        end;
 
252
 
 
253
        {       
 
254
            Callback routines
 
255
                }
 
256
{$ifc TYPED_FUNCTION_POINTERS}
 
257
        DCMProgressFilterProcPtr = function(determinateProcess: boolean; percentageComplete: UInt16; callbackUD: UInt32): boolean;
 
258
{$elsec}
 
259
        DCMProgressFilterProcPtr = ProcPtr;
 
260
{$endc}
 
261
 
 
262
{$ifc OPAQUE_UPP_TYPES}
 
263
        DCMProgressFilterUPP = ^SInt32; { an opaque UPP }
 
264
{$elsec}
 
265
        DCMProgressFilterUPP = UniversalProcPtr;
 
266
{$endc} 
 
267
 
 
268
const
 
269
        uppDCMProgressFilterProcInfo = $00000E50;
 
270
{$ifc CALL_NOT_IN_CARBON}
 
271
        {
 
272
         *  NewDCMProgressFilterUPP()
 
273
         *  
 
274
         *  Availability:
 
275
         *    Non-Carbon CFM:   available as macro/inline
 
276
         *    CarbonLib:        not available
 
277
         *    Mac OS X:         not available
 
278
                }
 
279
function NewDCMProgressFilterUPP(userRoutine: DCMProgressFilterProcPtr): DCMProgressFilterUPP; external name '_NewDCMProgressFilterUPP'; { old name was NewDCMProgressFilterProc }
 
280
{
 
281
 *  DisposeDCMProgressFilterUPP()
 
282
 *  
 
283
 *  Availability:
 
284
 *    Non-Carbon CFM:   available as macro/inline
 
285
 *    CarbonLib:        not available
 
286
 *    Mac OS X:         not available
 
287
 }
 
288
procedure DisposeDCMProgressFilterUPP(userUPP: DCMProgressFilterUPP); external name '_DisposeDCMProgressFilterUPP';
 
289
{
 
290
 *  InvokeDCMProgressFilterUPP()
 
291
 *  
 
292
 *  Availability:
 
293
 *    Non-Carbon CFM:   available as macro/inline
 
294
 *    CarbonLib:        not available
 
295
 *    Mac OS X:         not available
 
296
 }
 
297
function InvokeDCMProgressFilterUPP(determinateProcess: boolean; percentageComplete: UInt16; callbackUD: UInt32; userRoutine: DCMProgressFilterUPP): boolean; external name '_InvokeDCMProgressFilterUPP'; { old name was CallDCMProgressFilterProc }
 
298
{$endc}  {CALL_NOT_IN_CARBON}
 
299
 
 
300
{
 
301
    Library version
 
302
}
 
303
{
 
304
 *  DCMLibraryVersion()
 
305
 *  
 
306
 *  Availability:
 
307
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
308
 *    CarbonLib:        in CarbonLib 1.0 and later
 
309
 *    Mac OS X:         in version 10.0 and later
 
310
 }
 
311
function DCMLibraryVersion: UInt32; external name '_DCMLibraryVersion';
 
312
 
 
313
{
 
314
    Create/delete dictionary
 
315
}
 
316
{
 
317
 *  DCMNewDictionary()
 
318
 *  
 
319
 *  Availability:
 
320
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
321
 *    CarbonLib:        in CarbonLib 1.0 and later
 
322
 *    Mac OS X:         in version 10.0 and later
 
323
 }
 
324
function DCMNewDictionary(accessMethodID: DCMAccessMethodID; const (*var*) newDictionaryFile: FSSpec; scriptTag: ScriptCode; const (*var*) listOfFieldInfoRecords: AEDesc; invisible: boolean; recordCapacity: ItemCount; var newDictionary: DCMDictionaryID): OSStatus; external name '_DCMNewDictionary';
 
325
 
 
326
{
 
327
 *  DCMDeriveNewDictionary()
 
328
 *  
 
329
 *  Availability:
 
330
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
331
 *    CarbonLib:        in CarbonLib 1.0 and later
 
332
 *    Mac OS X:         in version 10.0 and later
 
333
 }
 
334
function DCMDeriveNewDictionary(srcDictionary: DCMDictionaryID; const (*var*) newDictionaryFile: FSSpec; scriptTag: ScriptCode; invisible: boolean; recordCapacity: ItemCount; var newDictionary: DCMDictionaryID): OSStatus; external name '_DCMDeriveNewDictionary';
 
335
 
 
336
{
 
337
 *  DCMDeleteDictionary()
 
338
 *  
 
339
 *  Availability:
 
340
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
341
 *    CarbonLib:        in CarbonLib 1.0 and later
 
342
 *    Mac OS X:         in version 10.0 and later
 
343
 }
 
344
function DCMDeleteDictionary(dictionaryID: DCMDictionaryID): OSStatus; external name '_DCMDeleteDictionary';
 
345
 
 
346
{
 
347
    Register dictionary
 
348
}
 
349
{
 
350
 *  DCMRegisterDictionaryFile()
 
351
 *  
 
352
 *  Availability:
 
353
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
354
 *    CarbonLib:        in CarbonLib 1.0 and later
 
355
 *    Mac OS X:         in version 10.0 and later
 
356
 }
 
357
function DCMRegisterDictionaryFile(const (*var*) dictionaryFile: FSSpec; var dictionaryID: DCMDictionaryID): OSStatus; external name '_DCMRegisterDictionaryFile';
 
358
 
 
359
{
 
360
 *  DCMUnregisterDictionary()
 
361
 *  
 
362
 *  Availability:
 
363
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
364
 *    CarbonLib:        in CarbonLib 1.0 and later
 
365
 *    Mac OS X:         in version 10.0 and later
 
366
 }
 
367
function DCMUnregisterDictionary(dictionaryID: DCMDictionaryID): OSStatus; external name '_DCMUnregisterDictionary';
 
368
 
 
369
{
 
370
    Open dictionary
 
371
}
 
372
{
 
373
 *  DCMOpenDictionary()
 
374
 *  
 
375
 *  Availability:
 
376
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
377
 *    CarbonLib:        in CarbonLib 1.0 and later
 
378
 *    Mac OS X:         in version 10.0 and later
 
379
 }
 
380
function DCMOpenDictionary(dictionaryID: DCMDictionaryID; protectKeySize: ByteCount; protectKey: ConstLogicalAddress; var dictionaryRef: DCMDictionaryRef): OSStatus; external name '_DCMOpenDictionary';
 
381
 
 
382
{
 
383
 *  DCMCloseDictionary()
 
384
 *  
 
385
 *  Availability:
 
386
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
387
 *    CarbonLib:        in CarbonLib 1.0 and later
 
388
 *    Mac OS X:         in version 10.0 and later
 
389
 }
 
390
function DCMCloseDictionary(dictionaryRef: DCMDictionaryRef): OSStatus; external name '_DCMCloseDictionary';
 
391
 
 
392
{
 
393
    Change access privilege
 
394
}
 
395
{
 
396
 *  DCMGetDictionaryWriteAccess()
 
397
 *  
 
398
 *  Availability:
 
399
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
400
 *    CarbonLib:        in CarbonLib 1.0 and later
 
401
 *    Mac OS X:         in version 10.0 and later
 
402
 }
 
403
function DCMGetDictionaryWriteAccess(dictionaryRef: DCMDictionaryRef; timeOutDuration: Duration): OSStatus; external name '_DCMGetDictionaryWriteAccess';
 
404
 
 
405
{
 
406
 *  DCMReleaseDictionaryWriteAccess()
 
407
 *  
 
408
 *  Availability:
 
409
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
410
 *    CarbonLib:        in CarbonLib 1.0 and later
 
411
 *    Mac OS X:         in version 10.0 and later
 
412
 }
 
413
function DCMReleaseDictionaryWriteAccess(dictionaryRef: DCMDictionaryRef; commitTransaction: boolean): OSStatus; external name '_DCMReleaseDictionaryWriteAccess';
 
414
 
 
415
{
 
416
    Find records
 
417
}
 
418
{
 
419
 *  DCMFindRecords()
 
420
 *  
 
421
 *  Availability:
 
422
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
423
 *    CarbonLib:        in CarbonLib 1.0 and later
 
424
 *    Mac OS X:         in version 10.0 and later
 
425
 }
 
426
function DCMFindRecords(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; findMethod: DCMFindMethod; preFetchedDataNum: ItemCount; preFetchedData: DCMFieldTagPtr; skipCount: ItemCount; maxRecordCount: ItemCount; var recordIterator: DCMFoundRecordIterator): OSStatus; external name '_DCMFindRecords';
 
427
 
 
428
{
 
429
 *  DCMCountRecordIterator()
 
430
 *  
 
431
 *  Availability:
 
432
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
433
 *    CarbonLib:        in CarbonLib 1.0 and later
 
434
 *    Mac OS X:         in version 10.0 and later
 
435
 }
 
436
function DCMCountRecordIterator(recordIterator: DCMFoundRecordIterator): ItemCount; external name '_DCMCountRecordIterator';
 
437
 
 
438
{
 
439
 *  DCMIterateFoundRecord()
 
440
 *  
 
441
 *  Availability:
 
442
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
443
 *    CarbonLib:        in CarbonLib 1.0 and later
 
444
 *    Mac OS X:         in version 10.0 and later
 
445
 }
 
446
function DCMIterateFoundRecord(recordIterator: DCMFoundRecordIterator; maxKeySize: ByteCount; var actualKeySize: ByteCount; keyData: LogicalAddress; var uniqueID: DCMUniqueID; var dataList: AEDesc): OSStatus; external name '_DCMIterateFoundRecord';
 
447
 
 
448
{
 
449
 *  DCMDisposeRecordIterator()
 
450
 *  
 
451
 *  Availability:
 
452
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
453
 *    CarbonLib:        in CarbonLib 1.0 and later
 
454
 *    Mac OS X:         in version 10.0 and later
 
455
 }
 
456
function DCMDisposeRecordIterator(recordIterator: DCMFoundRecordIterator): OSStatus; external name '_DCMDisposeRecordIterator';
 
457
 
 
458
{
 
459
    Dump dictionary
 
460
}
 
461
{
 
462
 *  DCMCountRecord()
 
463
 *  
 
464
 *  Availability:
 
465
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
466
 *    CarbonLib:        in CarbonLib 1.0 and later
 
467
 *    Mac OS X:         in version 10.0 and later
 
468
 }
 
469
function DCMCountRecord(dictionaryID: DCMDictionaryID; var count: ItemCount): OSStatus; external name '_DCMCountRecord';
 
470
 
 
471
{
 
472
 *  DCMGetRecordSequenceNumber()
 
473
 *  
 
474
 *  Availability:
 
475
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
476
 *    CarbonLib:        in CarbonLib 1.0 and later
 
477
 *    Mac OS X:         in version 10.0 and later
 
478
 }
 
479
function DCMGetRecordSequenceNumber(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; var sequenceNum: ItemCount): OSStatus; external name '_DCMGetRecordSequenceNumber';
 
480
 
 
481
{
 
482
 *  DCMGetNthRecord()
 
483
 *  
 
484
 *  Availability:
 
485
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
486
 *    CarbonLib:        in CarbonLib 1.0 and later
 
487
 *    Mac OS X:         in version 10.0 and later
 
488
 }
 
489
function DCMGetNthRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; serialNum: ItemCount; maxKeySize: ByteCount; var keySize: ByteCount; keyData: LogicalAddress; var uniqueID: DCMUniqueID): OSStatus; external name '_DCMGetNthRecord';
 
490
 
 
491
{
 
492
 *  DCMGetNextRecord()
 
493
 *  
 
494
 *  Availability:
 
495
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
496
 *    CarbonLib:        in CarbonLib 1.0 and later
 
497
 *    Mac OS X:         in version 10.0 and later
 
498
 }
 
499
function DCMGetNextRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; maxKeySize: ByteCount; var nextKeySize: ByteCount; nextKeyData: LogicalAddress; var nextUniqueID: DCMUniqueID): OSStatus; external name '_DCMGetNextRecord';
 
500
 
 
501
{
 
502
 *  DCMGetPrevRecord()
 
503
 *  
 
504
 *  Availability:
 
505
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
506
 *    CarbonLib:        in CarbonLib 1.0 and later
 
507
 *    Mac OS X:         in version 10.0 and later
 
508
 }
 
509
function DCMGetPrevRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; maxKeySize: ByteCount; var prevKeySize: ByteCount; prevKeyData: LogicalAddress; var prevUniqueID: DCMUniqueID): OSStatus; external name '_DCMGetPrevRecord';
 
510
 
 
511
{
 
512
    Get field data
 
513
}
 
514
{
 
515
 *  DCMGetFieldData()
 
516
 *  
 
517
 *  Availability:
 
518
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
519
 *    CarbonLib:        in CarbonLib 1.0 and later
 
520
 *    Mac OS X:         in version 10.0 and later
 
521
 }
 
522
function DCMGetFieldData(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; numOfData: ItemCount; dataTag: DCMFieldTagPtr; var dataList: AEDesc): OSStatus; external name '_DCMGetFieldData';
 
523
 
 
524
{
 
525
 *  DCMSetFieldData()
 
526
 *  
 
527
 *  Availability:
 
528
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
529
 *    CarbonLib:        in CarbonLib 1.0 and later
 
530
 *    Mac OS X:         in version 10.0 and later
 
531
 }
 
532
function DCMSetFieldData(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; const (*var*) dataList: AEDesc): OSStatus; external name '_DCMSetFieldData';
 
533
 
 
534
{
 
535
    Add record
 
536
}
 
537
{
 
538
 *  DCMAddRecord()
 
539
 *  
 
540
 *  Availability:
 
541
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
542
 *    CarbonLib:        in CarbonLib 1.0 and later
 
543
 *    Mac OS X:         in version 10.0 and later
 
544
 }
 
545
function DCMAddRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; checkOnly: boolean; const (*var*) dataList: AEDesc; var newUniqueID: DCMUniqueID): OSStatus; external name '_DCMAddRecord';
 
546
 
 
547
{
 
548
 *  DCMDeleteRecord()
 
549
 *  
 
550
 *  Availability:
 
551
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
552
 *    CarbonLib:        in CarbonLib 1.0 and later
 
553
 *    Mac OS X:         in version 10.0 and later
 
554
 }
 
555
function DCMDeleteRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID): OSStatus; external name '_DCMDeleteRecord';
 
556
 
 
557
{
 
558
    Reorganize/compact dictionary
 
559
}
 
560
{
 
561
 *  DCMReorganizeDictionary()
 
562
 *  
 
563
 *  Availability:
 
564
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
565
 *    CarbonLib:        in CarbonLib 1.0 and later
 
566
 *    Mac OS X:         in version 10.0 and later
 
567
 }
 
568
function DCMReorganizeDictionary(dictionaryID: DCMDictionaryID; extraCapacity: ItemCount; progressProc: DCMProgressFilterUPP; userData: UInt32): OSStatus; external name '_DCMReorganizeDictionary';
 
569
 
 
570
{
 
571
 *  DCMCompactDictionary()
 
572
 *  
 
573
 *  Availability:
 
574
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
575
 *    CarbonLib:        in CarbonLib 1.0 and later
 
576
 *    Mac OS X:         in version 10.0 and later
 
577
 }
 
578
function DCMCompactDictionary(dictionaryID: DCMDictionaryID; progressProc: DCMProgressFilterUPP; userData: UInt32): OSStatus; external name '_DCMCompactDictionary';
 
579
 
 
580
{
 
581
    DictionaryID utilities
 
582
}
 
583
{
 
584
 *  DCMGetFileFromDictionaryID()
 
585
 *  
 
586
 *  Availability:
 
587
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
588
 *    CarbonLib:        in CarbonLib 1.0 and later
 
589
 *    Mac OS X:         in version 10.0 and later
 
590
 }
 
591
function DCMGetFileFromDictionaryID(dictionaryID: DCMDictionaryID; var fileRef: FSSpec): OSStatus; external name '_DCMGetFileFromDictionaryID';
 
592
 
 
593
{
 
594
 *  DCMGetDictionaryIDFromFile()
 
595
 *  
 
596
 *  Availability:
 
597
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
598
 *    CarbonLib:        in CarbonLib 1.0 and later
 
599
 *    Mac OS X:         in version 10.0 and later
 
600
 }
 
601
function DCMGetDictionaryIDFromFile(const (*var*) fileRef: FSSpec; var dictionaryID: DCMDictionaryID): OSStatus; external name '_DCMGetDictionaryIDFromFile';
 
602
 
 
603
{
 
604
 *  DCMGetDictionaryIDFromRef()
 
605
 *  
 
606
 *  Availability:
 
607
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
608
 *    CarbonLib:        in CarbonLib 1.0 and later
 
609
 *    Mac OS X:         in version 10.0 and later
 
610
 }
 
611
function DCMGetDictionaryIDFromRef(dictionaryRef: DCMDictionaryRef): DCMDictionaryID; external name '_DCMGetDictionaryIDFromRef';
 
612
 
 
613
{
 
614
    Field information and manipulation
 
615
}
 
616
{
 
617
 *  DCMGetDictionaryFieldInfo()
 
618
 *  
 
619
 *  Availability:
 
620
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
621
 *    CarbonLib:        in CarbonLib 1.0 and later
 
622
 *    Mac OS X:         in version 10.0 and later
 
623
 }
 
624
function DCMGetDictionaryFieldInfo(dictionaryID: DCMDictionaryID; fieldTag: DCMFieldTag; var fieldInfoRecord: AEDesc): OSStatus; external name '_DCMGetDictionaryFieldInfo';
 
625
 
 
626
{
 
627
    Dictionary property
 
628
}
 
629
{
 
630
 *  DCMGetDictionaryProperty()
 
631
 *  
 
632
 *  Availability:
 
633
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
634
 *    CarbonLib:        in CarbonLib 1.0 and later
 
635
 *    Mac OS X:         in version 10.0 and later
 
636
 }
 
637
function DCMGetDictionaryProperty(dictionaryID: DCMDictionaryID; propertyTag: DCMFieldTag; maxPropertySize: ByteCount; var actualSize: ByteCount; propertyValue: LogicalAddress): OSStatus; external name '_DCMGetDictionaryProperty';
 
638
 
 
639
{
 
640
 *  DCMSetDictionaryProperty()
 
641
 *  
 
642
 *  Availability:
 
643
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
644
 *    CarbonLib:        in CarbonLib 1.0 and later
 
645
 *    Mac OS X:         in version 10.0 and later
 
646
 }
 
647
function DCMSetDictionaryProperty(dictionaryID: DCMDictionaryID; propertyTag: DCMFieldTag; propertySize: ByteCount; propertyValue: ConstLogicalAddress): OSStatus; external name '_DCMSetDictionaryProperty';
 
648
 
 
649
{
 
650
 *  DCMGetDictionaryPropertyList()
 
651
 *  
 
652
 *  Availability:
 
653
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
654
 *    CarbonLib:        in CarbonLib 1.0 and later
 
655
 *    Mac OS X:         in version 10.0 and later
 
656
 }
 
657
function DCMGetDictionaryPropertyList(dictionaryID: DCMDictionaryID; maxPropertyNum: ItemCount; var numProperties: ItemCount; propertyTag: DCMFieldTagPtr): OSStatus; external name '_DCMGetDictionaryPropertyList';
 
658
 
 
659
{
 
660
    Seaarch dictionary
 
661
}
 
662
{
 
663
 *  DCMCreateDictionaryIterator()
 
664
 *  
 
665
 *  Availability:
 
666
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
667
 *    CarbonLib:        in CarbonLib 1.0 and later
 
668
 *    Mac OS X:         in version 10.0 and later
 
669
 }
 
670
function DCMCreateDictionaryIterator(var dictionaryIterator: DCMDictionaryIterator): OSStatus; external name '_DCMCreateDictionaryIterator';
 
671
 
 
672
{
 
673
    Search AccessMethod
 
674
}
 
675
{
 
676
 *  DCMCreateAccessMethodIterator()
 
677
 *  
 
678
 *  Availability:
 
679
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
680
 *    CarbonLib:        in CarbonLib 1.0 and later
 
681
 *    Mac OS X:         in version 10.0 and later
 
682
 }
 
683
function DCMCreateAccessMethodIterator(var accessMethodIterator: DCMAccessMethodIterator): OSStatus; external name '_DCMCreateAccessMethodIterator';
 
684
 
 
685
{
 
686
    Iterator Operation
 
687
}
 
688
{
 
689
 *  DCMCountObjectIterator()
 
690
 *  
 
691
 *  Availability:
 
692
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
693
 *    CarbonLib:        in CarbonLib 1.0 and later
 
694
 *    Mac OS X:         in version 10.0 and later
 
695
 }
 
696
function DCMCountObjectIterator(iterator: DCMObjectIterator): ItemCount; external name '_DCMCountObjectIterator';
 
697
 
 
698
{
 
699
 *  DCMIterateObject()
 
700
 *  
 
701
 *  Availability:
 
702
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
703
 *    CarbonLib:        in CarbonLib 1.0 and later
 
704
 *    Mac OS X:         in version 10.0 and later
 
705
 }
 
706
function DCMIterateObject(iterator: DCMObjectIterator; var objectID: DCMObjectID): OSStatus; external name '_DCMIterateObject';
 
707
 
 
708
{
 
709
 *  DCMResetObjectIterator()
 
710
 *  
 
711
 *  Availability:
 
712
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
713
 *    CarbonLib:        in CarbonLib 1.0 and later
 
714
 *    Mac OS X:         in version 10.0 and later
 
715
 }
 
716
function DCMResetObjectIterator(iterator: DCMObjectIterator): OSStatus; external name '_DCMResetObjectIterator';
 
717
 
 
718
{
 
719
 *  DCMDisposeObjectIterator()
 
720
 *  
 
721
 *  Availability:
 
722
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
723
 *    CarbonLib:        in CarbonLib 1.0 and later
 
724
 *    Mac OS X:         in version 10.0 and later
 
725
 }
 
726
function DCMDisposeObjectIterator(iterator: DCMObjectIterator): OSStatus; external name '_DCMDisposeObjectIterator';
 
727
 
 
728
{
 
729
    Get AccessMethod information
 
730
}
 
731
{
 
732
 *  DCMGetAccessMethodIDFromName()
 
733
 *  
 
734
 *  Availability:
 
735
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
736
 *    CarbonLib:        in CarbonLib 1.0 and later
 
737
 *    Mac OS X:         in version 10.0 and later
 
738
 }
 
739
function DCMGetAccessMethodIDFromName(const (*var*) accessMethodName: Str63; var accessMethodID: DCMAccessMethodID): OSStatus; external name '_DCMGetAccessMethodIDFromName';
 
740
 
 
741
{
 
742
    Field Info Record routines
 
743
}
 
744
{
 
745
 *  DCMCreateFieldInfoRecord()
 
746
 *  
 
747
 *  Availability:
 
748
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
749
 *    CarbonLib:        in CarbonLib 1.0 and later
 
750
 *    Mac OS X:         in version 10.0 and later
 
751
 }
 
752
function DCMCreateFieldInfoRecord(fieldTag: DescType; fieldType: DescType; maxRecordSize: ByteCount; fieldAttributes: DCMFieldAttributes; var fieldDefaultData: AEDesc; numberOfFindMethods: ItemCount; var findMethods: DCMFindMethod; var fieldInfoRecord: AEDesc): OSStatus; external name '_DCMCreateFieldInfoRecord';
 
753
 
 
754
{
 
755
 *  DCMGetFieldTagAndType()
 
756
 *  
 
757
 *  Availability:
 
758
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
759
 *    CarbonLib:        in CarbonLib 1.0 and later
 
760
 *    Mac OS X:         in version 10.0 and later
 
761
 }
 
762
function DCMGetFieldTagAndType(const (*var*) fieldInfoRecord: AEDesc; var fieldTag: DCMFieldTag; var fieldType: DCMFieldType): OSStatus; external name '_DCMGetFieldTagAndType';
 
763
 
 
764
{
 
765
 *  DCMGetFieldMaxRecordSize()
 
766
 *  
 
767
 *  Availability:
 
768
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
769
 *    CarbonLib:        in CarbonLib 1.0 and later
 
770
 *    Mac OS X:         in version 10.0 and later
 
771
 }
 
772
function DCMGetFieldMaxRecordSize(const (*var*) fieldInfoRecord: AEDesc; var maxRecordSize: ByteCount): OSStatus; external name '_DCMGetFieldMaxRecordSize';
 
773
 
 
774
{
 
775
 *  DCMGetFieldAttributes()
 
776
 *  
 
777
 *  Availability:
 
778
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
779
 *    CarbonLib:        in CarbonLib 1.0 and later
 
780
 *    Mac OS X:         in version 10.0 and later
 
781
 }
 
782
function DCMGetFieldAttributes(const (*var*) fieldInfoRecord: AEDesc; var attributes: DCMFieldAttributes): OSStatus; external name '_DCMGetFieldAttributes';
 
783
 
 
784
{
 
785
 *  DCMGetFieldDefaultData()
 
786
 *  
 
787
 *  Availability:
 
788
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
789
 *    CarbonLib:        in CarbonLib 1.0 and later
 
790
 *    Mac OS X:         in version 10.0 and later
 
791
 }
 
792
function DCMGetFieldDefaultData(const (*var*) fieldInfoRecord: AEDesc; desiredType: DescType; var fieldDefaultData: AEDesc): OSStatus; external name '_DCMGetFieldDefaultData';
 
793
 
 
794
{
 
795
 *  DCMGetFieldFindMethods()
 
796
 *  
 
797
 *  Availability:
 
798
 *    Non-Carbon CFM:   in DictionaryMgrLib 1.0 and later
 
799
 *    CarbonLib:        in CarbonLib 1.0 and later
 
800
 *    Mac OS X:         in version 10.0 and later
 
801
 }
 
802
function DCMGetFieldFindMethods(const (*var*) fieldInfoRecord: AEDesc; findMethodsArrayMaxSize: ItemCount; var findMethods: DCMFindMethod; var actualNumberOfFindMethods: ItemCount): OSStatus; external name '_DCMGetFieldFindMethods';
 
803
 
 
804
{
 
805
    Check Dictionary Manager availability
 
806
}
 
807
{$ifc TARGET_RT_MAC_CFM}
 
808
{
 
809
        DCMDictionaryManagerAvailable() is a macro available only in C/C++.  
 
810
        To get the same functionality from pascal or assembly, you need
 
811
        to test if Dictionary Manager functions are not NULL.
 
812
        For instance:
 
813
        
 
814
            IF @DCMLibraryVersion <> kUnresolvedCFragSymbolAddress THEN
 
815
                gDictionaryManagerAvailable = TRUE;
 
816
            ELSE
 
817
                gDictionaryManagerAvailable = FALSE;
 
818
            end
 
819
    
 
820
}
 
821
{$elsec}
 
822
  {$ifc TARGET_RT_MAC_MACHO}
 
823
{ Dictionary Manager is always available on OS X }
 
824
  {$endc}
 
825
{$endc}
 
826
 
 
827
{
 
828
=============================================================================================
 
829
    Definitions for Japanese Analysis Module
 
830
=============================================================================================
 
831
}
 
832
{
 
833
    Default dictionary access method for Japanese analysis
 
834
}
 
835
{
 
836
    Data length limitations of Apple Japanese dictionaries
 
837
}
 
838
 
 
839
const
 
840
        kMaxYomiLengthInAppleJapaneseDictionary = 40;
 
841
        kMaxKanjiLengthInAppleJapaneseDictionary = 64;
 
842
 
 
843
        {       
 
844
            Defined field tags of Apple Japanese dictionary
 
845
                }
 
846
        kDCMJapaneseYomiTag                     = $796F6D69 (* 'yomi' *);
 
847
        kDCMJapaneseHyokiTag            = $68796F6B (* 'hyok' *);
 
848
        kDCMJapaneseHinshiTag           = $68696E73 (* 'hins' *);
 
849
        kDCMJapaneseWeightTag           = $68696E64 (* 'hind' *);
 
850
        kDCMJapanesePhoneticTag         = $68746F6E (* 'hton' *);
 
851
        kDCMJapaneseAccentTag           = $61636E74 (* 'acnt' *);
 
852
        kDCMJapaneseOnKunReadingTag     = $4F6E4B6E (* 'OnKn' *);
 
853
        kDCMJapaneseFukugouInfoTag      = $66756B75 (* 'fuku' *);
 
854
 
 
855
        kDCMJapaneseYomiType            = $75747874 (* 'utxt' *);
 
856
        kDCMJapaneseHyokiType           = $75747874 (* 'utxt' *);
 
857
        kDCMJapaneseHinshiType          = $68696E73 (* 'hins' *);
 
858
        kDCMJapaneseWeightType          = $73686F72 (* 'shor' *);
 
859
        kDCMJapanesePhoneticType        = $75747874 (* 'utxt' *);
 
860
        kDCMJapaneseAccentType          = $62797465 (* 'byte' *);
 
861
        kDCMJapaneseOnKunReadingType = $75747874 (* 'utxt' *);
 
862
        kDCMJapaneseFukugouInfoType     = $66756B75 (* 'fuku' *);
 
863
 
 
864
 
 
865
        {       
 
866
        =============================================================================================
 
867
         System 7 Dictionary Manager
 
868
        =============================================================================================
 
869
                }
 
870
{$ALIGN MAC68K}
 
871
                                                                                                                                {  Dictionary data insertion modes  }
 
872
        kInsert                                         = 0;                                                    {  Only insert the input entry if there is nothing in the dictionary that matches the key.  }
 
873
        kReplace                                        = 1;                                                    {  Only replace the entries which match the key with the input entry.  }
 
874
        kInsertOrReplace                        = 2;                                                    {  Insert the entry if there is nothing in the dictionary which matches the key, otherwise replaces the existing matched entries with the input entry.  }
 
875
 
 
876
        {        This Was InsertMode    }
 
877
 
 
878
type
 
879
        DictionaryDataInsertMode                        = SInt16;
 
880
 
 
881
const
 
882
                                                                                                                                {  Key attribute constants  }
 
883
        kIsCaseSensitive                        = $10;                                                  {  case sensitive = 16        }
 
884
        kIsNotDiacriticalSensitive      = $20;                                                  {  diac not sensitive = 32     }
 
885
 
 
886
                                                                                                                                {  Registered attribute type constants.    }
 
887
        kNoun                                           = -1;
 
888
        kVerb                                           = -2;
 
889
        kAdjective                                      = -3;
 
890
        kAdverb                                         = -4;
 
891
 
 
892
        {        This Was AttributeType         }
 
893
 
 
894
type
 
895
        DictionaryEntryAttribute                        = SInt8;
 
896
        {        Dictionary information record  }
 
897
        DictionaryInformationPtr = ^DictionaryInformation;
 
898
        DictionaryInformation = record
 
899
                dictionaryFSSpec:               FSSpec;
 
900
                numberOfRecords:                SInt32;
 
901
                currentGarbageSize:             SInt32;
 
902
                script:                                 ScriptCode;
 
903
                maximumKeyLength:               SInt16;
 
904
                keyAttributes:                  SInt8;
 
905
        end;
 
906
 
 
907
        DictionaryAttributeTablePtr = ^DictionaryAttributeTable;
 
908
        DictionaryAttributeTable = packed record
 
909
                datSize:                                UInt8;
 
910
                datTable:                               array [0..0] of DictionaryEntryAttribute;
 
911
        end;
 
912
 
 
913
{$ifc CALL_NOT_IN_CARBON}
 
914
        {
 
915
         *  InitializeDictionary()
 
916
         *  
 
917
         *  Availability:
 
918
         *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 
919
         *    CarbonLib:        not available
 
920
         *    Mac OS X:         not available
 
921
                }
 
922
function InitializeDictionary(const (*var*) theFsspecPtr: FSSpec; maximumKeyLength: SInt16; keyAttributes: SInt8; script: ScriptCode): OSErr; external name '_InitializeDictionary';
 
923
{
 
924
 *  OpenDictionary()
 
925
 *  
 
926
 *  Availability:
 
927
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 
928
 *    CarbonLib:        not available
 
929
 *    Mac OS X:         not available
 
930
 }
 
931
function OpenDictionary(const (*var*) theFsspecPtr: FSSpec; accessPermission: SInt8; var dictionaryReference: SInt32): OSErr; external name '_OpenDictionary';
 
932
{
 
933
 *  CloseDictionary()
 
934
 *  
 
935
 *  Availability:
 
936
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 
937
 *    CarbonLib:        not available
 
938
 *    Mac OS X:         not available
 
939
 }
 
940
function CloseDictionary(dictionaryReference: SInt32): OSErr; external name '_CloseDictionary';
 
941
{
 
942
 *  InsertRecordToDictionary()
 
943
 *  
 
944
 *  Availability:
 
945
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 
946
 *    CarbonLib:        not available
 
947
 *    Mac OS X:         not available
 
948
 }
 
949
function InsertRecordToDictionary(dictionaryReference: SInt32; const (*var*) key: Str255; recordDataHandle: Handle; whichMode: DictionaryDataInsertMode): OSErr; external name '_InsertRecordToDictionary';
 
950
{
 
951
 *  DeleteRecordFromDictionary()
 
952
 *  
 
953
 *  Availability:
 
954
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 
955
 *    CarbonLib:        not available
 
956
 *    Mac OS X:         not available
 
957
 }
 
958
function DeleteRecordFromDictionary(dictionaryReference: SInt32; const (*var*) key: Str255): OSErr; external name '_DeleteRecordFromDictionary';
 
959
{
 
960
 *  FindRecordInDictionary()
 
961
 *  
 
962
 *  Availability:
 
963
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 
964
 *    CarbonLib:        not available
 
965
 *    Mac OS X:         not available
 
966
 }
 
967
function FindRecordInDictionary(dictionaryReference: SInt32; const (*var*) key: Str255; requestedAttributeTablePointer: DictionaryAttributeTablePtr; recordDataHandle: Handle): OSErr; external name '_FindRecordInDictionary';
 
968
{
 
969
 *  FindRecordByIndexInDictionary()
 
970
 *  
 
971
 *  Availability:
 
972
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 
973
 *    CarbonLib:        not available
 
974
 *    Mac OS X:         not available
 
975
 }
 
976
function FindRecordByIndexInDictionary(dictionaryReference: SInt32; recordIndex: SInt32; requestedAttributeTablePointer: DictionaryAttributeTablePtr; var recordKey: Str255; recordDataHandle: Handle): OSErr; external name '_FindRecordByIndexInDictionary';
 
977
{
 
978
 *  GetDictionaryInformation()
 
979
 *  
 
980
 *  Availability:
 
981
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 
982
 *    CarbonLib:        not available
 
983
 *    Mac OS X:         not available
 
984
 }
 
985
function GetDictionaryInformation(dictionaryReference: SInt32; var theDictionaryInformation: DictionaryInformation): OSErr; external name '_GetDictionaryInformation';
 
986
{
 
987
 *  CompactDictionary()
 
988
 *  
 
989
 *  Availability:
 
990
 *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
 
991
 *    CarbonLib:        not available
 
992
 *    Mac OS X:         not available
 
993
 }
 
994
function CompactDictionary(dictionaryReference: SInt32): OSErr; external name '_CompactDictionary';
 
995
{$endc}  {CALL_NOT_IN_CARBON}
 
996
 
 
997
{$ALIGN MAC68K}
 
998
 
 
999
 
 
1000
end.