The 'itl2' Resource Header
The 'itl2' Resource Header
The 'itl2' resource header allows you to index localized character type and
conversion tables in the Roman Script System. The Figure below shows the
structure of the 'itl2' resource header. All fields in this header are 16-bit
words. Each field designated as an offset is the signed offset, in bytes, from the
beginning of the 'itl2' resource to the specified code block or table. The header
is followed by the actual code chunks and tables, which may be in any order.
The position of each is specified by the corresponding offset in the header.
With system software version 7.0, the 'itl2' header has been extended to
include two new sections: section 3, containing fields for the lengths of all of
the code blocks and tables for which there are offsets in sections 1 and 2 in the
'itl2' resource header, and section 4, containing offset and length pairs for
tables that are new with system software version 6.0.7 and for future tables.
Section 1 of the header contains a format flag and five offsets to code chunks
that can be used to modify the default sorting behavior. Before system software
version 6.0.4, the rsvdHook offset was an unused sorting hook offset. It now is
a format flag: a value of -1 indicates that the 'itl2' resource is in the system
software version 6.0.4 (or newer) format.
Section 2 contains offsets to tables for character type (typeList offset,
classArray offset), character conversion (upperList offset, lowerList offset,
upperNoMarkList offset, and noMarkList offset), and word break (wordTable
offset and wrapTable offset). These offsets to tables are used by the
LowerText, UpperText, StripText, and StripUpperText procedures
and by the Script Manager's CharType, Transliterate, and FindWord
routines. They are only used in system software version 6.0.4 and later, and
may not be present on earlier systems. It also contains a version number and a
format code that are used by DeRez.
The wordTable offset and wrapTable offset are also offsets to tables used by
the Roman FindWord routines in system software version 6.0.4 and by the
general FindWord routine in system software version 7.0.
The remainder of the fields in the resource header, in Section 3 and Section 4,
are only required in system software version 7.0 and later, and may not be
present in earlier versions.
Section 3 contains fields for the lengths of all of the code blocks and tables for
which there are offsets in sections 1 and 2 of the 'itl2' resource header.
Lengths in this section need only be supplied for tables that may be returned by
the IUGetItlTable procedure.
Section 4 contains offset and length pairs for tables to be added in the future.
The first offset/length pair in this section is reserved for the FindScriptTable
data type, which defines an optional table that associates every character code
in a single-byte script's character set with either the Roman or native script.
If this table is not present, the offset and length should be 0.
The data structure defined by the FindScriptTable type consists of a series of
byte pairs with the format . The character code is
the last character code in a range of characters that belongs to the script
specified by the script code. The first character code in the range is assumed to
be the last character code in the previous range plus 1, or 0 for the first
range. The last pair must have character code 0xFF. For example, if the
character set encoding for script smSample were defined such that 0x00-7F
and 0xA0 were Roman characters and the remaining characters were native
characters in smSample, the table would appear as follows:
dc.b 0x7F,smRoman
dc.b 0x9F,smSample
dc.b 0xA0,smRoman
dc.b 0xFF,smSample
The Figure below describes the new 'itl2' header format.
The 'itl2' resource header