Localizing Word Selection and Line Break Tables
Localizing Word Selection and Line Break Tables
Until system software version 7.0, each script system provided its own
version of the FindWord procedure, which locates word boundaries for word
selection and line breaking by examining a block of text to determine the
boundaries of the word that includes a specified character in the block. The
NFindWord procedure is a new, state- table-driven version of FindWord
that is faster and more powerful. It can replace the script-dependent versions
of FindWord so that script systems need only supply the appropriate tables
in their 'itl2' resource. The break tables used by NFindWord are in a new
format, which is documented in the section entitled,
Defining Word Boundaries and Line Breaks.
When FindWord is called, the Script Manager examines the breaks
parameter to determine if the call can be routed to the NFindWord procedure.
If breaks is an explicit pointer to a break table and the table is in the new
format, the call is routed to NFindWord. Also, if breaks is 0 or -1 to specify
one of the default break tables and if the script's 'itl2' resource contains tables
in the new format, the call is routed to NFindWord. Otherwise, the call is
routed to the script's FindWord procedure so that old-format break tables
continue to work. The Script Manager assumes tables are in the new format
if the high-order bit of the first byte is 1.
You can also call NFindWord directly.