Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 6 - Script Manager / Script Manager Reference
Routines / Directly Accessing International Resources


GetIntlResourceTable

The GetIntlResourceTable procedure gives you access to a specific word-selection, line-break, number-parts, untoken, or whitespace table from the appropriate international resource.

PROCEDURE GetIntlResourceTable (script: ScriptCode; 
                                tableCode: Integer; 
                                VAR itlHandle: Handle; 
                                VAR offset: LongInt; 
                                VAR length: LongInt);
script
A script code, the value that specifies a particular script system. Constants for all defined script codes are listed on page 6-52.
tableCode
A number that specifies which table is requested.
itlHandle
Upon completion of the call, contains a handle to the string-manipulation ('itl2') or tokens ('itl4') resource containing the table specified in the tableCode parameter.
offset
Upon completion of the call, contains the offset (in bytes) to the specified table from the beginning of the resource.
length
Upon completion of the call, contains the size of the table (in bytes).
DESCRIPTION
When you provide a script code in the script parameter, and a table code in the tableCode parameter, GetIntlResourceTable returns a handle to the string-manipulation resource or tokens resource containing that table, the offset of the specified table from the beginning of the resource, and the length of the table.

If the script system whose table is requested is not available, GetIntlResourceTable returns a NIL handle.

Constants for all defined script codes are listed on page 6-52.

These are the defined constants for tableCode:
ConstantValueExplanation
smWordSelectTable0Word-break table
smWordWrapTable1Line-break table
smNumberPartsTable2Number-parts table
smUnTokenTable3Untoken table
smWhiteSpaceList4Whitespace table

If you wish to manipulate the contents of the table you have requested, use the size returned in the length parameter to allocate a buffer, and perform a block move of the table's contents into that buffer.

SPECIAL CONSIDERATIONS
GetIntlResourceTable may move memory; your application should not call this procedure at interrupt time.

SEE ALSO
Block moves are described in the Memory Manager chapter of Inside Macintosh: Memory.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996