1 {
2      File:       CarbonCore/TextUtils.h
3 
4      Contains:   Text Utilities Interfaces.
5 
6      Copyright:  � 1985-2011 Apple Inc. All rights reserved.
7 
8      Bugs?:      For bug reports, consult the following page on
9                  the World Wide Web:
10 
11                      http://bugs.freepascal.org
12 
13 }
14 {
15     Modified for use with Free Pascal
16     Version 308
17     Please report any bugs to <gpc@microbizz.nl>
18 }
19 
20 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
21 {$mode macpas}
22 {$modeswitch cblocks}
23 {$packenum 1}
24 {$macro on}
25 {$inline on}
26 {$calling mwpascal}
27 
28 unit TextUtils;
29 interface
30 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
31 {$setc GAP_INTERFACES_VERSION := $0308}
32 
33 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
34     {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
35 {$endc}
36 
37 {$ifc defined CPUPOWERPC and defined CPUI386}
38 	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
39 {$endc}
40 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
41 	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
42 {$endc}
43 
44 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
45 	{$setc __ppc__ := 1}
46 {$elsec}
47 	{$setc __ppc__ := 0}
48 {$endc}
49 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
50 	{$setc __ppc64__ := 1}
51 {$elsec}
52 	{$setc __ppc64__ := 0}
53 {$endc}
54 {$ifc not defined __i386__ and defined CPUI386}
55 	{$setc __i386__ := 1}
56 {$elsec}
57 	{$setc __i386__ := 0}
58 {$endc}
59 {$ifc not defined __x86_64__ and defined CPUX86_64}
60 	{$setc __x86_64__ := 1}
61 {$elsec}
62 	{$setc __x86_64__ := 0}
63 {$endc}
64 {$ifc not defined __arm__ and defined CPUARM}
65 	{$setc __arm__ := 1}
66 {$elsec}
67 	{$setc __arm__ := 0}
68 {$endc}
69 {$ifc not defined __arm64__ and defined CPUAARCH64}
70   {$setc __arm64__ := 1}
71 {$elsec}
72   {$setc __arm64__ := 0}
73 {$endc}
74 
75 {$ifc defined cpu64}
76   {$setc __LP64__ := 1}
77 {$elsec}
78   {$setc __LP64__ := 0}
79 {$endc}
80 
81 
82 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
83 	{$error Conflicting definitions for __ppc__ and __i386__}
84 {$endc}
85 
86 {$ifc defined __ppc__ and __ppc__}
87 	{$setc TARGET_CPU_PPC := TRUE}
88 	{$setc TARGET_CPU_PPC64 := FALSE}
89 	{$setc TARGET_CPU_X86 := FALSE}
90 	{$setc TARGET_CPU_X86_64 := FALSE}
91 	{$setc TARGET_CPU_ARM := FALSE}
92 	{$setc TARGET_CPU_ARM64 := FALSE}
93 	{$setc TARGET_OS_MAC := TRUE}
94 	{$setc TARGET_OS_IPHONE := FALSE}
95 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
96 	{$setc TARGET_OS_EMBEDDED := FALSE}
97 {$elifc defined __ppc64__ and __ppc64__}
98 	{$setc TARGET_CPU_PPC := FALSE}
99 	{$setc TARGET_CPU_PPC64 := TRUE}
100 	{$setc TARGET_CPU_X86 := FALSE}
101 	{$setc TARGET_CPU_X86_64 := FALSE}
102 	{$setc TARGET_CPU_ARM := FALSE}
103 	{$setc TARGET_CPU_ARM64 := FALSE}
104 	{$setc TARGET_OS_MAC := TRUE}
105 	{$setc TARGET_OS_IPHONE := FALSE}
106 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
107 	{$setc TARGET_OS_EMBEDDED := FALSE}
108 {$elifc defined __i386__ and __i386__}
109 	{$setc TARGET_CPU_PPC := FALSE}
110 	{$setc TARGET_CPU_PPC64 := FALSE}
111 	{$setc TARGET_CPU_X86 := TRUE}
112 	{$setc TARGET_CPU_X86_64 := FALSE}
113 	{$setc TARGET_CPU_ARM := FALSE}
114 	{$setc TARGET_CPU_ARM64 := FALSE}
115 {$ifc defined iphonesim}
116  	{$setc TARGET_OS_MAC := FALSE}
117 	{$setc TARGET_OS_IPHONE := TRUE}
118 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
119 {$elsec}
120 	{$setc TARGET_OS_MAC := TRUE}
121 	{$setc TARGET_OS_IPHONE := FALSE}
122 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
123 {$endc}
124 	{$setc TARGET_OS_EMBEDDED := FALSE}
125 {$elifc defined __x86_64__ and __x86_64__}
126 	{$setc TARGET_CPU_PPC := FALSE}
127 	{$setc TARGET_CPU_PPC64 := FALSE}
128 	{$setc TARGET_CPU_X86 := FALSE}
129 	{$setc TARGET_CPU_X86_64 := TRUE}
130 	{$setc TARGET_CPU_ARM := FALSE}
131 	{$setc TARGET_CPU_ARM64 := FALSE}
132 {$ifc defined iphonesim}
133  	{$setc TARGET_OS_MAC := FALSE}
134 	{$setc TARGET_OS_IPHONE := TRUE}
135 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
136 {$elsec}
137 	{$setc TARGET_OS_MAC := TRUE}
138 	{$setc TARGET_OS_IPHONE := FALSE}
139 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
140 {$endc}
141 	{$setc TARGET_OS_EMBEDDED := FALSE}
142 {$elifc defined __arm__ and __arm__}
143 	{$setc TARGET_CPU_PPC := FALSE}
144 	{$setc TARGET_CPU_PPC64 := FALSE}
145 	{$setc TARGET_CPU_X86 := FALSE}
146 	{$setc TARGET_CPU_X86_64 := FALSE}
147 	{$setc TARGET_CPU_ARM := TRUE}
148 	{$setc TARGET_CPU_ARM64 := FALSE}
149 	{$setc TARGET_OS_MAC := FALSE}
150 	{$setc TARGET_OS_IPHONE := TRUE}
151 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
152 	{$setc TARGET_OS_EMBEDDED := TRUE}
153 {$elifc defined __arm64__ and __arm64__}
154 	{$setc TARGET_CPU_PPC := FALSE}
155 	{$setc TARGET_CPU_PPC64 := FALSE}
156 	{$setc TARGET_CPU_X86 := FALSE}
157 	{$setc TARGET_CPU_X86_64 := FALSE}
158 	{$setc TARGET_CPU_ARM := FALSE}
159 	{$setc TARGET_CPU_ARM64 := TRUE}
160 {$ifc defined ios}
161 	{$setc TARGET_OS_MAC := FALSE}
162 	{$setc TARGET_OS_IPHONE := TRUE}
163 	{$setc TARGET_OS_EMBEDDED := TRUE}
164 {$elsec}
165 	{$setc TARGET_OS_MAC := TRUE}
166 	{$setc TARGET_OS_IPHONE := FALSE}
167 	{$setc TARGET_OS_EMBEDDED := FALSE}
168 {$endc}
169 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
170 {$elsec}
171 	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
172 {$endc}
173 
174 {$ifc defined __LP64__ and __LP64__ }
175   {$setc TARGET_CPU_64 := TRUE}
176 {$elsec}
177   {$setc TARGET_CPU_64 := FALSE}
178 {$endc}
179 
180 {$ifc defined FPC_BIG_ENDIAN}
181 	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
182 	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
183 {$elifc defined FPC_LITTLE_ENDIAN}
184 	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
185 	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
186 {$elsec}
187 	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
188 {$endc}
189 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
190 {$setc CALL_NOT_IN_CARBON := FALSE}
191 {$setc OLDROUTINENAMES := FALSE}
192 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
193 {$setc OPAQUE_UPP_TYPES := TRUE}
194 {$setc OTCARBONAPPLICATION := TRUE}
195 {$setc OTKERNEL := FALSE}
196 {$setc PM_USE_SESSION_APIS := TRUE}
197 {$setc TARGET_API_MAC_CARBON := TRUE}
198 {$setc TARGET_API_MAC_OS8 := FALSE}
199 {$setc TARGET_API_MAC_OSX := TRUE}
200 {$setc TARGET_CARBON := TRUE}
201 {$setc TARGET_CPU_68K := FALSE}
202 {$setc TARGET_CPU_MIPS := FALSE}
203 {$setc TARGET_CPU_SPARC := FALSE}
204 {$setc TARGET_OS_UNIX := FALSE}
205 {$setc TARGET_OS_WIN32 := FALSE}
206 {$setc TARGET_RT_MAC_68881 := FALSE}
207 {$setc TARGET_RT_MAC_CFM := FALSE}
208 {$setc TARGET_RT_MAC_MACHO := TRUE}
209 {$setc TYPED_FUNCTION_POINTERS := TRUE}
210 {$setc TYPE_BOOL := FALSE}
211 {$setc TYPE_EXTENDED := FALSE}
212 {$setc TYPE_LONGLONG := TRUE}
213 uses MacTypes,IntlResources;
214 {$endc} {not MACOSALLINCLUDE}
215 
216 
217 {$ifc TARGET_OS_MAC}
218 
219 
220 {$ALIGN MAC68K}
221 
222 {
223 
224     Here are the current System 7 routine names and the translations to the older forms.
225     Please use the newer forms in all new code and migrate the older names out of existing
226     code as maintainance permits.
227 
228     NEW NAME                    OLD NAMEs                   OBSOLETE FORM (no script code)
229 
230     FindScriptRun
231     FindWordBreaks                                          NFindWord, FindWord
232     GetIndString
233     GetString
234     Munger
235     NewString
236     SetString
237     StyledLineBreak
238     TruncString
239     TruncText
240 
241     UpperString ($A054)         UprString, UprText
242     UppercaseText               SCUpperText (a only)        UpperText ($A456)
243     LowercaseText                                           LwrString, LowerText, LwrText ($A056)
244     StripDiacritics                                         StripText ($A256)
245     UppercaseStripDiacritics                                StripUpperText ($A656)
246 
247 
248 }
249 
250 { TruncCode, StyledLineBreakCode, and truncation constants moved to QuickDrawText.i }
251 {$ifc not TARGET_CPU_64}
252 type
253 	ScriptRunStatusPtr = ^ScriptRunStatus;
254 	ScriptRunStatus = record
255 		script: SInt8;
256 		runVariant: SInt8;
257 	end;
258 type
259 	BreakTable = record
260 		charTypes: packed array [0..255] of char;
261 		tripleLength: SInt16;
262 		triples: array [0..0] of SInt16;
263 	end;
264 	BreakTablePtr = ^BreakTable;
265 type
266 	NBreakTable = record
267 		flags1: SInt8;
268 		flags2: SInt8;
269 		version: SInt16;
270 		classTableOff: SInt16;
271 		auxCTableOff: SInt16;
272 		backwdTableOff: SInt16;
273 		forwdTableOff: SInt16;
274 		doBackup: SInt16;
275 		length: SInt16;                 { length of NBreakTable }
276 		charTypes: packed array [0..255] of char;
277 		tables: array [0..0] of SInt16;
278 	end;
279 	NBreakTablePtr = ^NBreakTable;
280 {$endc} {not TARGET_CPU_64}
281 
282 { The following functions are new names that work on 68k and PowerPC}
283 
284 {
285  *  Munger()   *** DEPRECATED ***
286  *
287  *  Deprecated:
288  *    Use CFStringFindAndReplace or CFDataFind plus CFDataReplaceBytes
289  *    (or strstr plus memmove), depending on usage; see discussion.
290  *
291  *  Discussion:
292  *    For text operations performed with Munger, use
293  *    CFStringFindAndReplace instead.
294  *
295  *    For operations on arbitrary bytes performed with Munger, use
296  *    CFDataFind plus CFDataReplaceBytes instead (Another option is to
297  *    use strstr plus memmove).
298  *
299  *  Availability:
300  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.6
301  *    CarbonLib:        in CarbonLib 1.0 and later
302  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
303  }
Mungernull304 function Munger( h: Handle; offset: SIGNEDLONG; ptr1: {const} UnivPtr; len1: SIGNEDLONG; ptr2: {const} UnivPtr; len2: SIGNEDLONG ): SIGNEDLONG; external name '_Munger';
305 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *)
306 
307 
308 {$ifc not TARGET_CPU_64}
309 {
310  *  NewString()   *** DEPRECATED ***
311  *
312  *  Deprecated:
313  *    use CFStringCreateCopy instead.
314  *
315  *  Discussion:
316  *    This function is no longer recommended. Please use
317  *    CFStringCreateCopy instead.
318  *
319  *  Availability:
320  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
321  *    CarbonLib:        in CarbonLib 1.0 and later
322  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
323  }
NewStringnull324 function NewString( const (*var*) theString: Str255 ): StringHandle; external name '_NewString';
325 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
326 
327 
328 {
329  *  SetString()   *** DEPRECATED ***
330  *
331  *  Deprecated:
332  *    use CFStringCreateWithPascalString and CFStringReplaceAll instead.
333  *
334  *  Discussion:
335  *    This function is no longer recommended. Please use
336  *    CFStringCreateWithPascalString and CFStringReplaceAll instead.
337  *
338  *  Availability:
339  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
340  *    CarbonLib:        in CarbonLib 1.0 and later
341  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
342  }
343 procedure SetString( theString: StringHandle; const (*var*) strNew: Str255 ); external name '_SetString';
344 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
345 
346 
347 {
348  *  GetString()   *** DEPRECATED ***
349  *
350  *  Deprecated:
351  *    use CFBundleCopyLocalizedString instead.
352  *
353  *  Discussion:
354  *    This function is no longer recommended. Please use
355  *    CFBundleCopyLocalizedString instead.
356  *
357  *  Availability:
358  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
359  *    CarbonLib:        in CarbonLib 1.0 and later
360  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
361  }
GetStringnull362 function GetString( stringID: SInt16 ): StringHandle; external name '_GetString';
363 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
364 
365 
366 {$endc} {not TARGET_CPU_64}
367 
368 {$ifc not TARGET_CPU_64}
369 {
370  *  GetIndString()   *** DEPRECATED ***
371  *
372  *  Deprecated:
373  *    use CFBundleCopyLocalizedString instead.
374  *
375  *  Discussion:
376  *    This function is no longer recommended. Please use
377  *    CFBundleCopyLocalizedString instead.
378  *
379  *  Availability:
380  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
381  *    CarbonLib:        in CarbonLib 1.0 and later
382  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
383  }
384 procedure GetIndString( var theString: Str255; strListID: SInt16; itemIndex: SInt16 ); external name '_GetIndString';
385 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
386 
387 
388 {$endc} {not TARGET_CPU_64}
389 
390 {
391  *  setstring()
392  *
393  *  Availability:
394  *    Mac OS X:         not available
395  *    CarbonLib:        not available
396  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
397  }
398 
399 
400 {$ifc not TARGET_CPU_64}
401 {
402  *  newstring()   *** DEPRECATED ***
403  *
404  *  Deprecated:
405  *    use CFStringCreateCopy instead.
406  *
407  *  Discussion:
408  *    This function is no longer recommended. Please use
409  *    CFStringCreateCopy instead.
410  *
411  *  Availability:
412  *    Mac OS X:         not available [32-bit only] but deprecated in 10.4
413  *    CarbonLib:        not available
414  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
415  }
416 
417 
418 {$endc} {not TARGET_CPU_64}
419 
420 {
421  *  getindstring()
422  *
423  *  Availability:
424  *    Mac OS X:         not available
425  *    CarbonLib:        not available
426  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
427  }
428 
429 
430 {$ifc not TARGET_CPU_64}
431 {
432  *  FindWordBreaks()   *** DEPRECATED ***
433  *
434  *  Deprecated:
435  *    use UCFindTextBreak instead.
436  *
437  *  Discussion:
438  *    This function is no longer recommended. Please use
439  *    UCFindTextBreak instead.
440  *
441  *  Availability:
442  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
443  *    CarbonLib:        in CarbonLib 1.0 and later
444  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
445  }
446 procedure FindWordBreaks( textPtr: Ptr; textLength: SInt16; offset: SInt16; leadingEdge: Boolean; breaks: BreakTablePtr; var offsets: OffsetTable; script: ScriptCode ); external name '_FindWordBreaks';
447 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
448 
449 
450 {
451  *  LowercaseText()   *** DEPRECATED ***
452  *
453  *  Deprecated:
454  *    use CFStringLowercase instead.
455  *
456  *  Discussion:
457  *    This function is no longer recommended. Please use
458  *    CFStringLowercase instead.
459  *
460  *  Availability:
461  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
462  *    CarbonLib:        in CarbonLib 1.0 and later
463  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
464  }
465 procedure LowercaseText( textPtr: Ptr; len: SInt16; script: ScriptCode ); external name '_LowercaseText';
466 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
467 
468 
469 {
470  *  UppercaseText()   *** DEPRECATED ***
471  *
472  *  Deprecated:
473  *    use CFStringUppercase instead.
474  *
475  *  Discussion:
476  *    This function is no longer recommended. Please use
477  *    CFStringUppercase instead.
478  *
479  *  Availability:
480  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
481  *    CarbonLib:        in CarbonLib 1.0 and later
482  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
483  }
484 procedure UppercaseText( textPtr: Ptr; len: SInt16; script: ScriptCode ); external name '_UppercaseText';
485 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
486 
487 
488 {
489  *  StripDiacritics()   *** DEPRECATED ***
490  *
491  *  Deprecated:
492  *    use CFStringTransform instead.
493  *
494  *  Discussion:
495  *    This function is no longer recommended. Please use
496  *    CFStringTransform instead.
497  *
498  *  Availability:
499  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
500  *    CarbonLib:        in CarbonLib 1.0 and later
501  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
502  }
503 procedure StripDiacritics( textPtr: Ptr; len: SInt16; script: ScriptCode ); external name '_StripDiacritics';
504 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
505 
506 
507 {
508  *  UppercaseStripDiacritics()   *** DEPRECATED ***
509  *
510  *  Deprecated:
511  *    use CFStringTransform instead.
512  *
513  *  Discussion:
514  *    This function is no longer recommended. Please use
515  *    CFStringTransform instead.
516  *
517  *  Availability:
518  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
519  *    CarbonLib:        in CarbonLib 1.0 and later
520  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
521  }
522 procedure UppercaseStripDiacritics( textPtr: Ptr; len: SInt16; script: ScriptCode ); external name '_UppercaseStripDiacritics';
523 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
524 
525 
526 {
527  *  FindScriptRun()   *** DEPRECATED ***
528  *
529  *  Deprecated:
530  *    No longer needed on MacOS X.
531  *
532  *  Discussion:
533  *    This function is obsolate.
534  *
535  *  Availability:
536  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
537  *    CarbonLib:        in CarbonLib 1.0 and later
538  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
539  }
FindScriptRunnull540 function FindScriptRun( textPtr: Ptr; textLen: SIGNEDLONG; var lenUsed: SIGNEDLONG ): ScriptRunStatus; external name '_FindScriptRun';
541 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
542 
543 
544 {
545     The following functions are old names, but are required for PowerPC builds
546     because InterfaceLib exports these names, instead of the new ones.
547 }
548 
549 {$endc} {not TARGET_CPU_64}
550 
551 {
552  *  FindWord()
553  *
554  *  Availability:
555  *    Mac OS X:         not available
556  *    CarbonLib:        not available
557  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
558  }
559 
560 
561 {
562  *  NFindWord()
563  *
564  *  Availability:
565  *    Mac OS X:         not available
566  *    CarbonLib:        not available
567  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
568  }
569 
570 
571 {
572    On 68K machines, LwrText, LowerText, StripText, UpperText and StripUpperText
573    return an error code in register D0, but System 7 PowerMacs do not emulate
574    this properly, so checking D0 is unreliable.
575 }
576 
577 {
578  *  LwrText()
579  *
580  *  Availability:
581  *    Mac OS X:         not available
582  *    CarbonLib:        not available
583  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
584  }
585 
586 
587 {
588  *  LowerText()
589  *
590  *  Availability:
591  *    Mac OS X:         not available
592  *    CarbonLib:        not available
593  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
594  }
595 
596 
597 {
598  *  StripText()
599  *
600  *  Availability:
601  *    Mac OS X:         not available
602  *    CarbonLib:        not available
603  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
604  }
605 
606 
607 {
608  *  UpperText()
609  *
610  *  Availability:
611  *    Mac OS X:         not available
612  *    CarbonLib:        not available
613  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
614  }
615 
616 
617 {
618  *  StripUpperText()
619  *
620  *  Availability:
621  *    Mac OS X:         not available
622  *    CarbonLib:        not available
623  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
624  }
625 
626 
627 { The following are new names which are exported by InterfaceLib}
628 
629 {$ifc not TARGET_CPU_64}
630 {
631  *  UpperString()   *** DEPRECATED ***
632  *
633  *  Deprecated:
634  *    use CFStringUppercase instead.
635  *
636  *  Discussion:
637  *    This function is no longer recommended. Please use
638  *    CFStringUppercase instead.
639  *
640  *  Availability:
641  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
642  *    CarbonLib:        in CarbonLib 1.0 and later
643  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
644  }
645 procedure UpperString( var theString: Str255; diacSensitive: Boolean ); external name '_UpperString';
646 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
647 
648 
649 {$endc} {not TARGET_CPU_64}
650 
651 {$ifc not TARGET_CPU_64}
652 {
653  *  upperstring()   *** DEPRECATED ***
654  *
655  *  Deprecated:
656  *    use CFStringUppercase instead.
657  *
658  *  Discussion:
659  *    This function is no longer recommended. Please use
660  *    CFStringUppercase instead.
661  *
662  *  Availability:
663  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
664  *    CarbonLib:        in CarbonLib 1.0 and later
665  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
666  }
667 (*
668   overloading not available
669 procedure upperstring( theString: CStringPtr; diacSensitive: Boolean ); external name '_upperstring';
670 *)
671 // AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
672 
673 {$endc} {not TARGET_CPU_64}
674 
675 
676 { Old routine name but no new names are mapped to it:}
677 {
678  *  UprText()
679  *
680  *  Availability:
681  *    Mac OS X:         not available
682  *    CarbonLib:        not available
683  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
684  }
685 
686 
687 {
688     Functions for converting between C and Pascal Strings
689     (Previously in Strings.h)
690 
691     Note: CopyPascalStringToC, CopyCStringToPascal, c2pstrcpy, and p2cstrcpy
692           are written to allow inplace conversion.  That is, the src and dst
693           parameters can point to the memory location.  These functions
694           are available in CarbonLib and CarbonAccessors.o.
695 
696     Note: c2pstr, C2PStr, p2cstr, and P2CStr are all deprecated.  These functions
697           only do inplace conversion and often require casts to call them.  This can
698           cause bugs because you can easily cast away a const and change the
699           contents of a read-only buffer.  These functions are available
700           in InterfaceLib, or when building for Carbon if you #define OLDP2C,
701           then they are available as a macro.
702 
703 }
704 {$ifc not TARGET_CPU_64}
705 {
706  *  c2pstrcpy()   *** DEPRECATED ***
707  *
708  *  Deprecated:
709  *    use CFString instead.
710  *
711  *  Discussion:
712  *    This function is no longer recommended. Please use CFString
713  *    instead.
714  *
715  *  Availability:
716  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
717  *    CarbonLib:        in CarbonLib 1.0 and later
718  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0.2 and later
719  }
720 procedure c2pstrcpy( var dst: Str255; src: ConstCStringPtr ); external name '_c2pstrcpy';
721 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
722 
723 
724 {
725  *  p2cstrcpy()   *** DEPRECATED ***
726  *
727  *  Deprecated:
728  *    use CFString instead.
729  *
730  *  Discussion:
731  *    This function is no longer recommended. Please use CFString
732  *    instead.
733  *
734  *  Availability:
735  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
736  *    CarbonLib:        in CarbonLib 1.0 and later
737  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0.2 and later
738  }
739 procedure p2cstrcpy( dst: CStringPtr; const (*var*) src: Str255 ); external name '_p2cstrcpy';
740 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
741 
742 
743 {
744  *  CopyPascalStringToC()   *** DEPRECATED ***
745  *
746  *  Deprecated:
747  *    use CFString instead.
748  *
749  *  Discussion:
750  *    This function is no longer recommended. Please use CFString
751  *    instead.
752  *
753  *  Availability:
754  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
755  *    CarbonLib:        in CarbonLib 1.0 and later
756  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0.2 and later
757  }
758 procedure CopyPascalStringToC( const (*var*) src: Str255; dst: CStringPtr ); external name '_CopyPascalStringToC';
759 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
760 
761 
762 {
763  *  CopyCStringToPascal()   *** DEPRECATED ***
764  *
765  *  Deprecated:
766  *    use CFString instead.
767  *
768  *  Discussion:
769  *    This function is no longer recommended. Please use CFString
770  *    instead.
771  *
772  *  Availability:
773  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
774  *    CarbonLib:        in CarbonLib 1.0 and later
775  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0.2 and later
776  }
777 procedure CopyCStringToPascal( src: ConstCStringPtr; var dst: Str255 ); external name '_CopyCStringToPascal';
778 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
779 
780 
781 {$endc} {not TARGET_CPU_64}
782 
783 {$ifc not TARGET_CPU_64}
784 {
785  *  c2pstr()   *** DEPRECATED ***
786  *
787  *  Availability:
788  *    Mac OS X:         in version 10.4 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
789  *    CarbonLib:        not available
790  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
791  }
792 (*
793   overloading not available
794 function c2pstr( aStr: CStringPtr ): StringPtr; external name '_c2pstr';
795 *)
796 //AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED;
797 
798 
799 {
800  *  C2PStr()   *** DEPRECATED ***
801  *
802  *  Availability:
803  *    Mac OS X:         in version 10.4 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
804  *    CarbonLib:        not available
805  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
806  }
C2PStrnull807 function C2PStr( cString: UnivPtr ): StringPtr; external name '_C2PStr';
808 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
809 
810 {
811  *  p2cstr()   *** DEPRECATED ***
812  *
813  *  Availability:
814  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
815  *    CarbonLib:        not available
816  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
817  }
818 (*
819   overloading based on result type not possible
820 function p2cstr( aStr: StringPtr ): CStringPtr; external name '_p2cstr';
821 *)
822 //AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4;
823 
824 
825 {
826  *  P2CStr()   *** DEPRECATED ***
827  *
828  *  Availability:
829  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
830  *    CarbonLib:        not available
831  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
832  }
P2CStrnull833 function P2CStr( pString: StringPtr ): Ptr; external name '_P2CStr';
834 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
835 
836 {$endc} {not TARGET_CPU_64}
837 
838 
839 {$endc} {TARGET_OS_MAC}
840 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
841 
842 end.
843 {$endc} {not MACOSALLINCLUDE}
844