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 / Replacing a Script System's Default Routines


GetScriptUtilityAddress

The GetScriptUtilityAddress function returns a pointer to the specified 1-byte script utility--or the original Roman utility--for the given script system.

FUNCTION GetScriptUtilityAddress (selector: Integer;
                                  before: Boolean;
                                  script: ScriptCode): Ptr;
selector
A value that specifies the name of the utility routine whose address
is needed.
before
A Boolean that specifies which of two routines is needed. If TRUE, the address returned is that of the WorldScript I implementation of the utility. If FALSE, the address returned is that of the original routine (usually the built-in Roman version).
script
The numeric code that specifies the script system whose dispatch table contains the pointers to the utility routines. Constants for all defined script codes are listed on page 6-52.
DESCRIPTION
The GetScriptUtilityAddress function examines the specified script's dispatch table and returns a pointer to the desired routine.

Because each element in the dispatch table consists of a pair of addresses, one for the WorldScript I implementation of the utility, and another for the original (Roman) version of the utility, you can get the address of either routine. Either routine can then be replaced, using the GetScriptUtilityAddress call.

This function can return NIL for the pointer if, for example, either the WorldScript I implementation or the original Roman routine is not used by the script system.

Valid values for the selector parameter are listed on page 6-101.

If the specified script system is not enabled, GetScriptUtilityAddress returns a NIL pointer.

SEE ALSO
WorldScript I is described in the appendix "Built-in Script Support" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996