mirror of
https://github.com/elliotnunn/supermario.git
synced 2025-02-16 14:30:32 +00:00
1674 lines
75 KiB
Plaintext
1674 lines
75 KiB
Plaintext
|
;
|
|||
|
; File: ScriptPriv.a (formerly ScriptEqu.priv)
|
|||
|
;
|
|||
|
; Contains: Private equates for Script Manager, private shared equates for
|
|||
|
; script systems, and private equates for the Roman Script System.
|
|||
|
;
|
|||
|
; Written by: KWK Ken Krugler
|
|||
|
; JDT Joe Ternasky
|
|||
|
; MED Mark Davis
|
|||
|
; LDC Lee Collins
|
|||
|
; PKE Peter Edberg
|
|||
|
; SMB Sue Bartalo
|
|||
|
; YS Yishai Steinhart
|
|||
|
;
|
|||
|
; Copyright: © 1986-1992 by Apple Computer, Inc., all rights reserved.
|
|||
|
;
|
|||
|
; Change History (most recent first):
|
|||
|
;
|
|||
|
; <SM9> 12/1/92 CSS Update from Reality:
|
|||
|
; <74> 11/17/92 PKE Move the equates needed to build itl4Roman.a into a separate
|
|||
|
; file IntlResourcesPriv.a, which we can give to localizers along
|
|||
|
; with itl4Roman.a (so we don't give out ScriptPriv.a). For now,
|
|||
|
; include IntlResourcesPriv.a here as well.
|
|||
|
; <SM8> 11/10/92 CSS Update from Reality:
|
|||
|
; <73> 10/16/92 PKE Move the _SCxxx trap names (and selectors) back here until we
|
|||
|
; can get rid of them, since the public interfaces will contain
|
|||
|
; the new names per New IM.
|
|||
|
; <SM7> 10/28/92 SWC Changed ScriptEqu.a->Script.a.
|
|||
|
; <SM6> 7/7/92 CSS Update from Reality:
|
|||
|
; <72> 6/26/92 SMB #1033660,<kst>: The flags being set for Simplified Chinese TSM
|
|||
|
; components is incorrect. Changed from $9300 to $9900. (see
|
|||
|
; SimpChineseFlags) Added some additional equates for component
|
|||
|
; flags and masks for the kbd menu.
|
|||
|
; <71> 6/17/92 SMB #1024950,<cv>: Added indices for strings in About Keyboards
|
|||
|
; dialogs.
|
|||
|
; <SM5> 7/1/92 RB Updated the version of the Script Manager in ROM, since
|
|||
|
; SuperMario is Cube-E based.
|
|||
|
; <70> 6/1/92 PKE #1031279: This depends on ScriptEqu.a, so include it (no effect
|
|||
|
; on objects).
|
|||
|
; <69> 5/19/92 PKE #1030321,<jh>: Add interface for private direct access to
|
|||
|
; existing NFindScriptRun routine.
|
|||
|
; <68> 5/14/92 PKE #1027061,<ha>: Add interface for private ScriptToRange routine
|
|||
|
; that returns resource ID range for a script.
|
|||
|
; <67> 5/14/92 PKE #1029395,<bbm>: Move FindScriptTable record here (where it
|
|||
|
; belongs) from ScriptMgrExtensions.a.
|
|||
|
; <66> 5/10/92 SMB #1026551,<pke>: Freed space that used to contain
|
|||
|
; sVectOldDrawMenuBar in smgrRecord since no longer patching
|
|||
|
; DrawMenuBar in the SMgr (added this in Cube-E b1 and are
|
|||
|
; removing it in b2). Renamed kDefaultInputMethodID to
|
|||
|
; kDefaultIMIconID.
|
|||
|
; <65> 5/10/92 SMB #1026551,<ksm>: Added kDefaultInputMethodID constant. Added
|
|||
|
; smKeySynchKbdMenuState.
|
|||
|
; <64> 4/10/92 SMB #1026551,<pke>: Added vector, sVectOldDrawMenuBar, in smgrRecord
|
|||
|
; for patch to DrawMenuBar.
|
|||
|
; <63> 4/8/92 PKE #1026516,<cv>: Move SCxxx interfaces for some ScriptMgr routines
|
|||
|
; from private interfaces (here) to public (ScriptEqu.a). Other
|
|||
|
; changes: (1) Needed for #1026551, define smgrAppDisableKybds
|
|||
|
; field in SMgrAppRecord (to keep keyboard disable state in Script
|
|||
|
; Mgr app globals); (2) Needed for #1026778, define scriptID field
|
|||
|
; in ScriptRecord so we can get script ID from ScriptRecord in
|
|||
|
; FindWord and elsewhere.
|
|||
|
; <62> 4/5/92 PKE #1025317,<csd>: Expand fixed space at beginning of SMgrAppRecord
|
|||
|
; for use by one-byte extension.
|
|||
|
; <61> 4/3/92 SMB #1019369,<pke>: Add HaveOldJapanIMbit bit value. Changed
|
|||
|
; smKeyDisabState to smKeyDisableState.
|
|||
|
; <60> 2/10/92 JH ScriptRecord was spelled with all lowercase in the
|
|||
|
; scriptSystemRecord that was brought over for Japanese input
|
|||
|
; method compatibility. Changed so its case is consistent with
|
|||
|
; the other mentions of ScriptRecord.
|
|||
|
; <59> 2/5/92 YS Added some of the universal one byte privete get/set script
|
|||
|
; verbs (smScriptSysBase, smScriptAppBase,smScriptFntBase).
|
|||
|
; <58> 1/15/92 SMB Add a new field to the keyboard menu records. Add constants for
|
|||
|
; processing of input methods. #1019369: updated smLastEVerb to
|
|||
|
; smKeyDisabState to correspond to new GetEnvirons verb,
|
|||
|
; smgrDisableKybds, to return keyboard disabled state.
|
|||
|
; <57> 12/11/91 SMB For Cube-E, renamed AuxKeyboardMenuInfo members and
|
|||
|
; KCHRInstalledRec (is now ItemInstalledRec) with new names. Added
|
|||
|
; itemInfo to both records for component identifier. Reordered
|
|||
|
; members in AuxKeyboardMenuInfo. Renamed scriptRecord's
|
|||
|
; scriptKCHRCount member to scriptInputCount.
|
|||
|
; <56> 12/6/91 PKE #1017161: Make TestLetter available through private Script Mgr
|
|||
|
; selector, for use by script systems. Change smLowCall to match.
|
|||
|
; <55> 12/3/91 PKE For Cube-E, change Script Mgr version to $710. Add macro for
|
|||
|
; SCParseTable (implementation already exists).
|
|||
|
; <54> 10/28/91 PKE Add macros for SCLowerText, SCStripText, SCCharByte, SCCharType,
|
|||
|
; SCFindWord (the implementations already exist).
|
|||
|
; <53> 10/16/91 PKE For Cube-E (and Bruges): Increment Script Mgr version number.
|
|||
|
; <52> 10/8/91 PKE For Cube-E (and Bruges): Reserve 5 Script Mgr selectors for
|
|||
|
; Unicode translation routines (not implemented yet). Add selector
|
|||
|
; and/or macro for new (currently private) routines RealScript,
|
|||
|
; Font2RealScript, SCLwrString, SCTransliterate (needed for bugs
|
|||
|
; #1013149, #1012949); change smLowCall accordingly. Clean up some
|
|||
|
; more conditionals; change some "smgr>=$700" to "NOT forRom",
|
|||
|
; since we still have to rearrange other source files before we
|
|||
|
; can build all 7.0 changes into ROMs.
|
|||
|
; <51> 10/2/91 YS changed 'smgrIntlMode' (in SMgrRecord) to 'smgrUnivInstalled'.
|
|||
|
; changed a reserved (last in ScriptRecord) to 'scriptQDPatches'.
|
|||
|
; <50> 9/24/91 PKE Eliminate some conditionals for pre-7.0 versions, other
|
|||
|
; cleanups.
|
|||
|
; <49> 9/5/91 JH fixed so all forRom conditionals are spelled with the same case
|
|||
|
; (i.e. forRom ) two were previously spelled ForROM, while the
|
|||
|
; rest were spelled forRom. Made dealing with CASE ON/CASE OFF
|
|||
|
; simpler.
|
|||
|
; <48> 8/22/91 JSM Clean up header.
|
|||
|
; <47> 2/1/91 PKE JSM,#81409: Changes in JustDatRec to support bug fix and
|
|||
|
; cleanups in RomanNewJust.a.
|
|||
|
; <46> 1/30/91 gbm sab, #38: Change the ‘already including this file’ variable to
|
|||
|
; all uppercase (for security reasons)
|
|||
|
; <45> 1/14/91 PKE (stb) Made changes to JustDataRec needed for fixes to NDrawJust
|
|||
|
; etc. Added ClientLLRecord and ThPrWidthTable. Use formerly
|
|||
|
; reserved field in SMgrRecord for smgrClientLLRecHndl, handle to
|
|||
|
; ClientLLRecord. Added macro for private FindCharInSet routine
|
|||
|
; from Kevin M; this routine will be used by Dialog Mgr & Finder.
|
|||
|
; Corrected some comments.
|
|||
|
; <44> 1/7/91 SMB (JDR) approved the last change!
|
|||
|
; <43> 1/7/91 SMB Adding a new byte that indicates whether the Keyboard Menu is
|
|||
|
; displayed (rather than use the smgrKeyboardMenuPtr for this)
|
|||
|
; since the Keyboard menu structures have to always exist so the
|
|||
|
; KeyScript verb "NextKeybdInScript" is meaningful (and
|
|||
|
; functions!). Changing the default keyboard marker to a null.
|
|||
|
; <42> 12/14/90 SMB (csd) I forgot the approval signature for the previous change.
|
|||
|
; <41> 12/14/90 SMB Moved KeyScript verb, smKeyModalDialog, here and renamed it
|
|||
|
; smKeyDisableAboutKybds. Also added new KeyScript verb
|
|||
|
; smKeyEnableAboutKybds. Fixes bug #74905.
|
|||
|
; <40> 12/10/90 PKE (VL) Add macro for private _ReInitScripts routine to be called
|
|||
|
; after net booting switches system files. It cleans up Script Mgr
|
|||
|
; data structures based on resources in old file, then calls
|
|||
|
; _InitScripts to set up new structures based on current file.
|
|||
|
; Also, renamed smgrIconFlag2 field (formerly reserved) of
|
|||
|
; SMgrRecord to smgrKeyScriptResult, since we now use it to
|
|||
|
; indicate KeyScript result.
|
|||
|
; <39> 8/24/90 PKE Remove smgrCharExtra and smgrSlop from SMgrRecord, since they
|
|||
|
; have been replaced by qdChExtra and qdRunSlop in GrafGlobals.
|
|||
|
; <38> 8/8/90 PKE Changes to JustDataRec that are needed in order to fix bugs in
|
|||
|
; new justified text routines.
|
|||
|
; <37> 8/7/90 PKE NEEDED FOR SIXPACK: Redefined doScriptMgrForAUX symbol so Script
|
|||
|
; Mgr patch installs are moved to Mac+A/UX section of patch files
|
|||
|
; in SixPack as well as 7.0.
|
|||
|
; <36> 8/7/90 SMB Adding back in changes for <33> and renaming AboutKeyboards to
|
|||
|
; AboutKybdsIndex. Added KeybdDefaultMrk for localizing default
|
|||
|
; keybd marker in menuitems. Also added commented out indices for
|
|||
|
; help strings in Keyboard Menu STR# resource.
|
|||
|
; <35> 8/5/90 PKE Add doScriptMgrForAUX symbol. Controls moving Script Mgr patches
|
|||
|
; to A/UX section of patch files (if they are not already there).
|
|||
|
; <34> 8/5/90 SMB Backing out changes for <33>. Will add in later.
|
|||
|
; <33> 8/5/90 SMB Added KCHRname and KCHRid to KCHRInstalledRec and renamed
|
|||
|
; KCHREnabledRec to KCHRInstalledRec. Added DefMarkIndex and
|
|||
|
; AboutKeyboards as indices for new strings in Keyboard Menu STR#
|
|||
|
; resource. Added more comments about the use of smgrDisableKybds.
|
|||
|
; <32> 8/2/90 PKE Added smgrDisableKybds flag field to SMgrRecord.
|
|||
|
; <31> 7/25/90 PKE Add private _InitScriptApp and _CleanupScriptApp routines to be
|
|||
|
; called when apps are launched and closed in order to set up and
|
|||
|
; delete the new application-specific script globals (which, for
|
|||
|
; now, just contain the application itl cache). Added
|
|||
|
; SMgrAppRecord structure for app-specific globals.
|
|||
|
; <30> 7/20/90 PKE Added scriptAvail vector (called by _InitScripts) and
|
|||
|
; scriptAddFonts vector (called by _AddScriptFonts) to
|
|||
|
; ScriptRecord for use during initialization; rearranged
|
|||
|
; scriptValidStyles, scriptAliasStyle, and scriptInItlm fields.
|
|||
|
; Removed sVectFixSMgrWorld2 field from SMgrRecord; we no longer
|
|||
|
; need it; rearrange other fields to group reserved space; affects
|
|||
|
; ptch 4, 27, 39. Added smgrFixWorldInPtch27 feature symbol.
|
|||
|
; <29> 7/16/90 PKE Renamed Cache2Rec to NewItlCacheRec. Updated ItlmHeaderRec to
|
|||
|
; include regionData table.
|
|||
|
; <28> 7/11/90 PKE Added _IsCmdChar private routine macro for common code that
|
|||
|
; tests for Command-key combinations in an international way
|
|||
|
; (standard FilterProc will use this to check for Cmd-period).
|
|||
|
; <27> 7/5/90 PKE NEEDED FOR SIXPACK: Define smgrSixPack symbol here since we are
|
|||
|
; now using it in several places; change appropriate $606
|
|||
|
; references here to smgrSixPack.
|
|||
|
; <26> 6/22/90 SMB Added DoCmdKeyEquivalents feature symbol for code that will be
|
|||
|
; used once command key equivalents can appear in the Keybd Menu.
|
|||
|
; <25> 6/13/90 PKE Added _RebuildKeybdMenu private routine macro for new routine
|
|||
|
; called by Mover to inform Script Mgr of keyboard changes in the
|
|||
|
; System file. Updated smLowCall accordingly.
|
|||
|
; <24> 6/1/90 SMB Added scriptKCHRCount to ScriptRecord for use with Keyboard
|
|||
|
; Menu. Added indices for strings in Keyboard Menu STR# resource.
|
|||
|
; Changed keyboard menu id to its real #.
|
|||
|
; <23> 5/31/90 PKE Added new fields to ScriptRecord: scriptValidStyles,
|
|||
|
; scriptAliasStyle. Updated smLastSVerb from smScriptSysFondSize
|
|||
|
; (was ignoring smScriptHelpFondSize!) to smScriptAliasStyle.
|
|||
|
; Added _SetKbdMenuInfo private trap macro for use by Process Mgr
|
|||
|
; and updated smLowCall accordingly.
|
|||
|
; <22> 5/29/90 PKE NEEDED FOR SIXPACK: Turned on smgrUseDispTablePtr and
|
|||
|
; romanKeepSelector flags for SIXPACK. These changes are flagged
|
|||
|
; with <22>.
|
|||
|
; <21> 5/29/90 DDG NEEDED FOR SIXPACK: Changed all the sixpack conditionals from
|
|||
|
; six-point-oh-seven to six-point-oh-six.
|
|||
|
; <20> 5/24/90 PKE Added smgrDispatchInPtch27 symbol.
|
|||
|
; <19> 5/11/90 PKE Added _AddScriptFonts private trap macro for use by
|
|||
|
; StartSystem.a; update smLowCall accordingly.
|
|||
|
; <18> 5/8/90 PKE Added Cache2Rec record for itl2/4 secondary cache. Temporarily
|
|||
|
; added ItlmHeaderRec here; will move to ScriptEqu.a later (when
|
|||
|
; it gets stable). Added scriptInItlm flag in scriptRecord.
|
|||
|
; <17> 5/5/90 PKE Added _InitScripts and _InitKeybdMenu private trap macros for
|
|||
|
; use by StartSystem.a and Process Mgr respectively. Made SysVers
|
|||
|
; default to $700 if undefined. Added Sue's KeyboardMenu stuff:
|
|||
|
; ScriptMgrKeyboardMenu feature symbol; SMgrRecord fields
|
|||
|
; smgrKeyboardMenuPtr, sVectInitMenus, sVectOldSystemMenu, and
|
|||
|
; sVectInitKeyboardMenu; ScriptRecord field scriptKeysItemNum; and
|
|||
|
; kKeyboardMenuID constant. Removed sVectInitResources and
|
|||
|
; sVectInitWindows since they are no longer used.
|
|||
|
; <16> 4/30/90 PKE NEEDED FOR SIXPACK: Updated ScriptMgr version number for 6.0.6.
|
|||
|
; <15> 4/27/90 Greg prevent redefinition warnings by avoiding multiple inclusions
|
|||
|
; <14> 4/24/90 PKE Added smgrSlop field to SMgrRecord. Used for passing slop value
|
|||
|
; used by pic opcode.
|
|||
|
; <13> 4/10/90 PKE Added new feature symbols. Used feature symbols, smgrROMVers,
|
|||
|
; and smgrSysVers instead of buildLevel. Defined
|
|||
|
; doScriptMgrUseKscn and doScriptMgrRstKCHRFix for ROM builds too.
|
|||
|
; Deleted obsolete smgrEMOffset and lowerNoMarkListOffset
|
|||
|
; constants.
|
|||
|
; <12> 3/26/90 PKE Now change conditionals so we do the following for SysVers >=
|
|||
|
; $607 instead of SysVers >= $700: (1) load ptch 27 and ptch 39,
|
|||
|
; (2) use script autoinitialization and simple script version of
|
|||
|
; FindScriptRun.
|
|||
|
; <11> 3/26/90 PKE Define smgrSysVers and smgrROMVers. Removed sVectFixSpExtra
|
|||
|
; field in SMgrRecord; no longer needed (see <4>). Move definition
|
|||
|
; here of symbols that control Script Mgr patches in PTCHes
|
|||
|
; (definitions were in PTCH source), and added new ones. Added
|
|||
|
; installScriptMgrPtch27 and installScriptMgrPtch39 symbols.
|
|||
|
; <10> 3/21/90 PKE Added scriptAppFondSize and scriptHelpFondSize fields in
|
|||
|
; ScriptRecord. Deleted obsolete oldMacTweek flag and related
|
|||
|
; conditionalization of GetSmgrCore macro.
|
|||
|
; <9> 3/21/90 SMB Added romanDoSimpleScripts feature conditional.
|
|||
|
; <8> 3/19/90 PKE Added new Script Mgr feature conditionals.
|
|||
|
; <7> 3/4/90 PKE Deleted obsolete _LwrStringToUpr opword.
|
|||
|
; <6> 2/22/90 PKE Added smgrCharExtra field in SMgrRecord, added JustDataRec
|
|||
|
; record.
|
|||
|
; <5> 1/17/90 PKE Added smgrRegionCode and smgrDummy fields to SMgrRecord, updated
|
|||
|
; smLastEVerb to smRegionCode.
|
|||
|
; <4> 1/11/90 PKE Moved definitions of sisHighCall and fisHighCall from
|
|||
|
; ScriptEqu.a to here so we can conditionalize them. Added
|
|||
|
; sVectFixSpExtra in SMgrRecord.
|
|||
|
; <3> 1/4/90 PKE Fixed up header.
|
|||
|
; <2> 1/4/90 PKE NEEDED FOR 6.0.5: Bumped ScriptMgr version numbers for 6.0.5.
|
|||
|
; Updated header to BBS format.
|
|||
|
; <1> 12/17/89 CCH Adding for the first time into BBS. Updated file name references.
|
|||
|
;
|
|||
|
; (BBS versions above,EASE versions below:)
|
|||
|
; <3.5> 11/17/89 pke Fixed KybdDriverData record: DeadKey state should be long, not
|
|||
|
; word.
|
|||
|
; <3.4> 10/02/89 pke Changed smLastEVerb to be smKCHRCache.
|
|||
|
; <3.3> 09/xx/89 pke Moved definitions of smLastEVerb, smLastSVerb, and
|
|||
|
; smLowCall/smLowCall60x here from ScriptEqu.a so we can
|
|||
|
; conditionalize them; they don't need to be public anyway. Add
|
|||
|
; private romanVersPriv and romanVersPtch4 constants to be
|
|||
|
; independent of version number in ScriptEqu.a.
|
|||
|
; <3.2> 09/15/89 pke Add smgrDoubleByte field in SMgrRecord.
|
|||
|
; <3.1> 09/06/89 pke Fancier way of defining version numbers, so version number at
|
|||
|
; various stages of Script Mgr installation is correct. Use one
|
|||
|
; reserved vector in SMgrRecord for sVectCallInterface.
|
|||
|
; <3.0> 09/01/89 pke Deleted unused vectors for patched routines, rearranged the
|
|||
|
; ones that are used to come up with some reserved space.
|
|||
|
; <2.9> 08/27/89 pke Added 2.18 and 2.22 version numbers for IntlForce bug fix in
|
|||
|
; Scripts604 build. Added sVectSMgrInitFonts and
|
|||
|
; sVectSMgrPostMunging vectors (for 7.0 only).
|
|||
|
; <2.8> 08/26/89 pke Get rid of itlr stuff (conditionalized out anyway); change
|
|||
|
; SMgrRecord comments/conditionals to show real status in ROMs;
|
|||
|
; add sVectSMgrCalcRect vector (for 7.0 only). Deleted
|
|||
|
; newItl2Tables symbol.
|
|||
|
; 07/10/89 pke Since 6/30/89 changes won't make it into Portable, fix SMgrRecord
|
|||
|
; so all new stuff is at the end: remove reserved space after
|
|||
|
; sVectKeyTrans, so low part of SMgrRecord matches Portable ROM
|
|||
|
; version. Also make labels for new part available for IIci build
|
|||
|
; only.
|
|||
|
; 06/30/89 pke Extensions to SMgrRecord: added sVectSwapIcon,sVectSwapKybd, and
|
|||
|
; sVectFixSMgrWorld plus some reserved space for additional vectors.
|
|||
|
; Define OPWORD _LwrStringToUpr for temporary use.
|
|||
|
; 06/27/89 pke Updated SMgr version number for IIci, since it has one bug fix
|
|||
|
; that's not in Portable.
|
|||
|
; 06/23/89 pke Restructured conditionals for defining buildLevel & smgrVersPriv;
|
|||
|
; named some of the formerly reserved fields in ScriptRecord (will
|
|||
|
; be used for new font/size info).
|
|||
|
; 05/22/89 pke Added fDPEMEP constant for number formatting routines
|
|||
|
; 04/26/89 pke Added smgrDispTable,smgrHigh,smgrLow to SmgrRecord, corresponding
|
|||
|
; fields to ScriptRecord (from reserved space in each record)
|
|||
|
; 04/06/89 pke Moved equates for new itl2 tables to ScriptEqu.a
|
|||
|
; 03/15/89 pke Changed version number for ROM from $220 to $214
|
|||
|
; 03/13/89 pke Changed back to old order of offsets to tables (would have caused
|
|||
|
; too many problems with existing prototypes).
|
|||
|
; 03/12/89 pke Modified equates for itl2 table offsets, which were rearranged
|
|||
|
; today. Added some fields in SmgrRecord for script icon location
|
|||
|
; data. Added private version number smgrVersPriv so we can set it
|
|||
|
; appropriately for the different builds.
|
|||
|
; 02/28/89 pke Conditionalize out remaining itlR-related stuff; rearranged new
|
|||
|
; stuff in SMgrRecord; use buildLevel >= 1 to conditionalize
|
|||
|
; changes from 6.0.3.
|
|||
|
; 02/21/89 pke Get rid of itlR before it ever becomes part of a system; move
|
|||
|
; its tables to itl2. Conditionalize out ItlrRecord defn, add some
|
|||
|
; equates for new itl2 offsets.
|
|||
|
; 12/02/88 pke added sVectKeyTrans field in SMgrRecord for upcoming KeyTrans
|
|||
|
; patch roll-in; removed 'forRom' conditionalization of some
|
|||
|
; SMgrRecord fields - existing fields should not move!
|
|||
|
;
|
|||
|
; (pre-EASE history below:)
|
|||
|
; 10/18/88 ldc added wordTable and wrapTable to ItlRRec
|
|||
|
; 10/10/88 ldc added smgrCurITLK to SmgrRecord
|
|||
|
; 10/5/88 ldc Changed ScriptRecord.scriptFlags to ScriptRecord.scriptXFlags
|
|||
|
; to emphasize that they are 'X'tra, and not currently used
|
|||
|
; 9/23/88 ldc Added vector for old UprString and offset to no diacritic upper
|
|||
|
; case table in ItlRRec
|
|||
|
; 6/17/88 ldc Added internal vectors for ScriptMgrUtilNum.a
|
|||
|
; 6/15/88 ldc Added smgrRecord.itlRHandle
|
|||
|
; 6/14/88 ldc Added ItlRRecord
|
|||
|
; 4/25/88 ldc Added vectors for patched out old routines
|
|||
|
; Above changes are post-6.0.3
|
|||
|
; 4/1/88 smb Removed number format equates and placed back in nScriptEqu.a.
|
|||
|
; 3/24/88 smb Added number format equates and NumFormatString record (moved
|
|||
|
; from nScriptEqu.a).
|
|||
|
; 2/22/88 med Added emFirstKeyboard to expandMemRec
|
|||
|
; 2/8/88 med Added itlCache to expandMemRec
|
|||
|
; 1/13/88 med Misc equate changes, change bufTweaks for BufPtr installation
|
|||
|
; 1/4/88 med Moved itl4 equates to ScriptEqu, fleshed out
|
|||
|
; 11/10/87 med Removed OldMac support
|
|||
|
; 8/18/87 med Added smCharPortion verb
|
|||
|
; 7/7/87 med Added environment flags fields
|
|||
|
; 5/19/87 KLH moved records to SysEqu.a per Mark Davis.
|
|||
|
; 5/19/87 KLH moved some data structures back to ScriptEqu.a.
|
|||
|
; 3/13/87 med Changed expand mem keyDeadState to long
|
|||
|
; 3/9/87 med Added date,time,context record equates, reorganized
|
|||
|
; 3/7/87 med Added check for QDExist for sanity check in GetTheFont macro
|
|||
|
; 3/6/87 med Added smScriptFlags field.
|
|||
|
; Added CharType field masks.
|
|||
|
; Included calendar, number format equates
|
|||
|
; 3/4/87 med Dropped GetThePort macro: use GetTheFont macro
|
|||
|
; 2/26/87 med Added expandMem and KeyCache equates temporarily.
|
|||
|
; Removed smgrKeyCache, smgrKeyDeadState.
|
|||
|
; Restored smPunctBlank (somehow got omitted).
|
|||
|
; Included language equates.
|
|||
|
; 1/28/87 MED Added CheckAReg for a little type checking in macros.
|
|||
|
; Fixed use of wholeSmgr.
|
|||
|
; Added and used smgrEMOffset.
|
|||
|
; 1/19/87 jdt Modified getSMgrCore macro to use expaned low memory block.
|
|||
|
; 1/13/87 jdt Replaced smAppScript verb and global with smLastScript.
|
|||
|
; 1/5/87 jdt Changed hook names for itl2. We now have the exit hook.
|
|||
|
; Added result to Pack6 sorting stack frame.
|
|||
|
; 1/2/87 jdt New version number for release.
|
|||
|
; 12/23/86 jdt Fixed macros for Script Manager routines.
|
|||
|
; Rearranged constants into public and private sets.
|
|||
|
; 12/23/86 med Added private equates flag.
|
|||
|
; 12/22/86 jdt Added the smBidirect variable to the Script Manager gloabls.
|
|||
|
; Changed compatability flag names.
|
|||
|
; Added last environment and script verb constants.
|
|||
|
; Fixed new selector for KeyScript.
|
|||
|
; 12/5/86 jdt Added ParseTable macro to ScriptUtil list.
|
|||
|
; Removed the KeyTrans trap macro.
|
|||
|
; Added CharByte byte types.
|
|||
|
; 11/25/86 jdt Added compatability flags for MS, MPW, AIS 1.0, and old apps.
|
|||
|
; Moved itl2 routine equates here from Pack6Equ.a.
|
|||
|
; 11/21/86 MED Added the GetThePort macro for MPW compatability.
|
|||
|
; 11/21/86 jdt Moved the Roman equates here.
|
|||
|
; 11/20/86 jdt New version number for Universal system file changes.
|
|||
|
; 11/16/86 KWK Removed GMT, latitude and longitude vars from SmgrRecord.
|
|||
|
; Re-adjusted size of core back to version 1.0 for AIS.
|
|||
|
; Fixed some script range equates.
|
|||
|
; Added the _ParseTable macro, selector
|
|||
|
; 10/25/86 jdt Yet another ugly patch for KanjiTalk. We force the KanjiTalk
|
|||
|
; system font ID number to be in the Japanese script range, so
|
|||
|
; the version number has changed again.
|
|||
|
; 10/17/86 jdt Bumped high byte of version number for SMgr globals change.
|
|||
|
; 10/16/86 KWK It's ugly...added 3 vectors after smgrPrintAction for backwards
|
|||
|
; compatibilty with KanjiTalk 1.0 applications and system file.
|
|||
|
; 10/9/86 JDT Added dead key state to the script manager globals.
|
|||
|
; Removed smgrCore and smgrOldCore constants.
|
|||
|
; Use Ken's macro or else.
|
|||
|
; 9/5/86 JDT Wacky force flags added to script manager globals and supported
|
|||
|
; by FontScript and IntlScript.
|
|||
|
; IntlScript removed and trap selectors reorganized.
|
|||
|
; 9/3/86 JDT Wet'n'wild reorganization. Region bundles eliminated.
|
|||
|
; 8/28/86 JDT Moved KeyTrans variables into Script Manager core.
|
|||
|
; 8/23/86 KWK Removed ScriptVersion equate, added Mark's complete set of
|
|||
|
; script equates (yes, that's right, smMongolian lives).
|
|||
|
; Added 'itl2' equate (Sorting hooks).
|
|||
|
; 8/21/86 JDT Modified for Script Manager.
|
|||
|
; 8/19/86 KWK Minor equate changes for new trap architecture.
|
|||
|
; 8/5/86 JDT Major reorganization of sis and script structures.
|
|||
|
; 8/1/86 JDT Replaced the FindScriptRun and NextBlock routines with the
|
|||
|
; DrawJust and MeasureJust routines.
|
|||
|
; 7/22/86 JDT Split the Blocker into four separate routines.
|
|||
|
; 7/21/86 JDT Added language field to region bundles and script entry.
|
|||
|
; 7/14/86 JDT Region names no longer appear in the region bundle. The name of
|
|||
|
; the region is now the region bundle resource name, and the
|
|||
|
; region code is the resource id number.
|
|||
|
; 7/13/86 JDT Reorganized sis and script records, constants.
|
|||
|
; 7/13/86 KWK Mega-changes for standard routine trap-out, Roman script init,
|
|||
|
; et. al.
|
|||
|
; 7/12/86 KWK Added new equates from Joe's SISEqu.a file, global ptr table,
|
|||
|
; SISFullAscii/SISEnabled flags, changed macros back to Pack8
|
|||
|
; calls.
|
|||
|
; 7/11/86 KWK New today.
|
|||
|
;___________________________________________________________________________________________________
|
|||
|
|
|||
|
IF &TYPE('__INCLUDINGSCRIPTPRIV__') = 'UNDEFINED' THEN
|
|||
|
__INCLUDINGSCRIPTPRIV__ SET 1
|
|||
|
|
|||
|
|
|||
|
include 'Script.a' ; <70><SM7>
|
|||
|
include 'InternalMacros.a' ; <46>
|
|||
|
include 'IntlResourcesPriv.a' ; <74>
|
|||
|
|
|||
|
IF &type('forRom')='UNDEFINED' THEN ; <02/21/89 pke>
|
|||
|
forRom: equ 0 ; <02/21/89 pke>
|
|||
|
ENDIF ; <02/21/89 pke>
|
|||
|
|
|||
|
IF NOT forRom THEN ; <17><***JH***>made forRom match casewise
|
|||
|
IF &type('SysVers')='UNDEFINED' THEN ; <02/21/89 pke>
|
|||
|
SysVers: equ $700 ; <02/21/89 pke><17>
|
|||
|
ENDIF ; <02/21/89 pke>
|
|||
|
ENDIF
|
|||
|
|
|||
|
IF (&TYPE('Scripts604') = 'UNDEFINED') THEN ; <08/27/89 pke>
|
|||
|
Scripts604 equ 0 ; <08/27/89 pke>
|
|||
|
ENDIF
|
|||
|
|
|||
|
IF &type('smgrSixPack')='UNDEFINED' THEN ; <27>
|
|||
|
smgrSixPack equ $606 ; <27>
|
|||
|
ENDIF ; <27>
|
|||
|
|
|||
|
; We define smgrSysVers to use in conditionals, because SysVers is not defined
|
|||
|
; if NOT forRom. We also need to set up a separate smgrROMVers. <11>
|
|||
|
|
|||
|
IF forRom THEN
|
|||
|
smgrSysVers equ 0
|
|||
|
;smgrROMVers equ 1 ; IIci/fx/Erickson ROM <SM5> rb
|
|||
|
smgrROMVers equ 2 ; SuperMario/Cube-E in ROM <SM5> rb
|
|||
|
ELSE
|
|||
|
smgrSysVers equ SysVers
|
|||
|
smgrROMVers equ 0
|
|||
|
ENDIF
|
|||
|
|
|||
|
; restructured the following conditionals <06/23/89 pke><08/27/89 pke><11><50>
|
|||
|
IF smgrROMVers >= 2 THEN ; <11>
|
|||
|
buildLevel: equ 3 ; <11>
|
|||
|
smgrVersPriv: equ $710 ; <11><SM5> rb
|
|||
|
romanVersPriv: equ $710 ; <11><SM5> rb
|
|||
|
ELSEIF smgrROMVers >= 1 THEN ; <11>
|
|||
|
buildLevel: equ 2 ; <02/21/89 pke>
|
|||
|
;smgrVersPriv: equ $214 ; 2.20 (not used anymore)
|
|||
|
;smgrVersPriv: equ $215 ; 2.21 (Portable, IIci, IIfx) <06/27/89 pke>
|
|||
|
smgrVersPriv: equ $216 ; 2.22 (2.21 + IntlForce bug fix) <08/27/89 pke>
|
|||
|
romanVersPriv: equ $101 ; <3.3>
|
|||
|
ELSEIF SysVers > $701 THEN ; <55>
|
|||
|
buildLevel: equ 3 ; <55>
|
|||
|
smgrVersPriv: equ $710 ; <55>
|
|||
|
smgrVersPTCHRom: equ $710 ; <55>
|
|||
|
smgrVersPtch4: equ $710 ; should get rid of this <55>
|
|||
|
romanVersPriv: equ $710 ; <55>
|
|||
|
romanVersPtch4: equ $710 ; should get rid of this <55>
|
|||
|
ELSEIF SysVers = $701 THEN ; <53>
|
|||
|
buildLevel: equ 3 ; <53>
|
|||
|
smgrVersPriv: equ $701 ; <53>
|
|||
|
smgrVersPTCHRom: equ $701 ; <53>
|
|||
|
smgrVersPtch4: equ $701 ; should get rid of this <53>
|
|||
|
romanVersPriv: equ $701 ; <53>
|
|||
|
romanVersPtch4: equ $701 ; should get rid of this <53>
|
|||
|
ELSEIF SysVers = $700 THEN
|
|||
|
buildLevel: equ 3 ; <06/23/89 pke>
|
|||
|
smgrVersPriv: equ $700 ; change 3.0 to 7.0 <06/23/89 pke>
|
|||
|
smgrVersPTCHRom: equ $700 ; code level with new ROMs + PTCH <3.1>
|
|||
|
smgrVersPtch4: equ $213 ; code level with ptch 4 <3.1>
|
|||
|
romanVersPriv: equ $700 ; <3.3>
|
|||
|
romanVersPtch4: equ $101 ; <3.3>
|
|||
|
ELSE ; <50>
|
|||
|
aerror 'ScriptPriv.a no longer works for pre-7.0 System builds' ; <50>
|
|||
|
ENDIF
|
|||
|
|
|||
|
;----------------------------------------------
|
|||
|
; Old Script Mgr version numbers: <50>
|
|||
|
;
|
|||
|
; SysVers
|
|||
|
; >=smgrSixPack $605 SS-604 $604 before
|
|||
|
;buildLevel: 1 1 1 1 0 ;
|
|||
|
;smgrVersPriv: $230* $213** $212*** $211 $20F ;
|
|||
|
;smgrVersPTCHRom: $231* $217 $216 ; with new ROMs + PTCH
|
|||
|
;smgrVersPtch4: $230* $213 $212 ; with ptch 4
|
|||
|
;romanVersPriv: $101 $101 $101 $101 $101 ;
|
|||
|
;
|
|||
|
;* new BCD numbering
|
|||
|
;** 2.19 (2.18 + String2Date bug fix)
|
|||
|
;*** 2.18 (2.17 + IntlForce bug fix)
|
|||
|
;----------------------------------------------
|
|||
|
|
|||
|
; Feature conditionals for existing features. For now, just define these outside the
|
|||
|
; specific build symbol definitions. The definition of which build a feature goes in
|
|||
|
; can not be changed until the symbol is correctly used everywhere it needs to be.
|
|||
|
; In any case, if we change which build a feature goes in, we can only change it to
|
|||
|
; be earlier than System 7.
|
|||
|
|
|||
|
smgrUseStdExit equ (1) ; new in 7.0 & Portable/IIci ROMs <8><11><50>
|
|||
|
smgrUseDispTablePtr equ (1) ; new in 6.0.6 & Portable/IIci ROMs <8><11><22><27><50>
|
|||
|
romanKeepSelector equ (1) ; new in 6.0.6 & Portable/IIci ROMs <8><11><22><27><50>
|
|||
|
smgrUseItl2Tables equ (1) ; new in 6.0.4 & Portable/IIci ROMs <13><50>
|
|||
|
smgrSys7Extensions equ ((NOT forRom) OR (smgrROMVers >= 2)) ; new in 7.0 <13>
|
|||
|
smgrKeyScriptDoItlk equ (1) ; new in 7.0 & Portable/IIci ROMs <13><50>
|
|||
|
smgrKeyScriptItlkFix equ ((NOT forRom) OR (smgrROMVers >= 2)) ; new in 7.0 <13>
|
|||
|
smgrKeyGetSetInPtch27 equ (NOT forRom) ; T from 7.0 <13>
|
|||
|
smgrDispatchInPtch27 equ (NOT forRom) ; T from 7.0 <20>
|
|||
|
smgrKeepObsolete equ (NOT ((NOT forRom) OR (smgrROMVers >= 2))) ; F from 7.0 <13>
|
|||
|
smgrKeepMacsBugSym equ (NOT ((NOT forRom) OR (smgrROMVers >= 2))) ; F from 7.0 <13>
|
|||
|
smgrFixWorldInPtch27 equ (NOT forRom) ; T from 7.0 <30>
|
|||
|
|
|||
|
; These feature conditionals are for new features.
|
|||
|
|
|||
|
smgrHasAutoInit equ ((NOT forRom) OR (smgrROMVers >= 2)) ; new in 6.0.6 <8><9><11><12><27>
|
|||
|
romanDoSimpleScripts equ ((NOT forRom) OR (smgrROMVers >= 2)) ; new in 6.0.6 <9><11><12><27>
|
|||
|
ScriptMgrKeyboardMenu equ ((NOT forRom) OR (smgrROMVers >= 2)) ; new in 7.0 <17>
|
|||
|
DoCmdKeyEquivalents equ 0 ; <26>
|
|||
|
|
|||
|
; The following conditionals govern which patches to include, particularly in <11>
|
|||
|
; the ROM-specific patch files. For 7.0, these patches are in ptch 39, so they
|
|||
|
; aren't included in the ROM-specific PTCHes. The flags are there so we can
|
|||
|
; turn on bug fixes for 6.x builds: e.g., flags that are currently 0 indicate
|
|||
|
; fixes that may be turned on here for 6.1.
|
|||
|
|
|||
|
; in ptch 39 if we have it
|
|||
|
IF NOT forRom THEN ;<***jh***>made case match other forRom's
|
|||
|
doScriptMgrPack6Fix equ (1) ; new in 6.0.4 <11><52>
|
|||
|
doScriptMgrStr2DatFix equ (1) ; new in 6.0.5 <11><52>
|
|||
|
doScriptMgrNewVectors equ (1) ; new in 7.0 <11><52>
|
|||
|
doScriptMgrSetROMVers equ (1) ; new in SS-6.0.4 <11><52>
|
|||
|
doScriptMgrForAUX equ (1) ; new in 6.0.6 <35><37><52>
|
|||
|
ENDIF
|
|||
|
doScriptMgrUseKscn equ ((NOT forRom) OR (smgrROMVers >= 2)) ; new in 7.0 <11><13>
|
|||
|
doScriptMgrRstKCHRFix equ ((NOT forRom) OR (smgrROMVers >= 2)) ; new in 7.0 <11><13>
|
|||
|
|
|||
|
; in ptch 27 if we have it
|
|||
|
doScriptMgrGestalt equ ((NOT forRom) OR (smgrROMVers >= 2)) ; new in 6.0.4 <11><13>
|
|||
|
doScriptMgrLwrString2 equ ((NOT forRom) OR (smgrROMVers >= 2)) ; new in SS-6.0.4 <11><13>
|
|||
|
|
|||
|
; The following conditionals control 'ptch' installation in the ROM-specific
|
|||
|
; PTCHes. If these are changed, then {OptionFiles} in Build must be updated,
|
|||
|
; as well as Sys.r.
|
|||
|
|
|||
|
installScriptMgrPtch27 equ (NOT forRom) ; new in 6.0.6 <11><12><13><17><27>
|
|||
|
installScriptMgrPtch39 equ (NOT forRom) ; new in 6.0.6 <11><12><13><17><27>
|
|||
|
|
|||
|
; Flags for various tweaks, which should go away as more applications and
|
|||
|
; script interface systems understand how the Script Manager works.
|
|||
|
|
|||
|
msTweaks equ 0 ; MicroSoft Excel compatibility tweaks.
|
|||
|
appTweaks equ 1 ; old application compatibility tweaks.
|
|||
|
|
|||
|
testScriptManager equ 0
|
|||
|
|
|||
|
; Check the validity of fixed values defined in ScriptEqu.a
|
|||
|
|
|||
|
IF ItlbRecord.itlbSize<>20 THEN
|
|||
|
aerror &concat('itlbSize wrong: ',&i2s(itlbSize))
|
|||
|
ENDIF
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Private trap macros for initialization. InitScripts is called by StartSystem.a
|
|||
|
; before any system file INITs, and does FixSMgrWorld stuff plus any extensions.
|
|||
|
; InitScriptMenu is called by Process Mgr (a.k.a. MultiFinder) after _InitMenus
|
|||
|
; has been called.
|
|||
|
; _AddScriptFonts is also called by StartSystem.a, but after all system file
|
|||
|
; INITs. It is needed so that scripts that may load additional fonts over the
|
|||
|
; network can do so.
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
DefSmgrRoutine InitScripts, -38,0,2 ; smSel… = $8200FFDA <17>
|
|||
|
DefSmgrRoutine InitKeybdMenu, -40,0,2 ; smSel… = $8200FFD8 <17>
|
|||
|
DefSmgrRoutine AddScriptFonts, -42,0,2 ; smSel… = $8200FFD6 <19>
|
|||
|
DefSmgrRoutine SetKbdMenuInfo, -44,10,2 ; smSel… = $820AFFD4 <23>
|
|||
|
DefSmgrRoutine RebuildKeybdMenu, -46,0,2 ; smSel… = $8200FFD2 <25>
|
|||
|
DefSmgrRoutine IsCmdChar, -48,6,2 ; smSel… = $8206FFD0 <28>
|
|||
|
DefSmgrRoutine InitScriptApp, -50,0,2 ; smSel… = $8200FFCE <31>
|
|||
|
DefSmgrRoutine CleanupScriptApp, -52,0,2 ; smSel… = $8200FFCC <31>
|
|||
|
DefSmgrRoutine ReInitScripts, -54,0,2 ; smSel… = $8200FFCA <40>
|
|||
|
DefSmgrRoutine FindCharInSet, -56,16,4 ; smSel… = $8410FFC8 <45>
|
|||
|
|
|||
|
DefSmgrRoutine TranslateFromUnicode, -58,12,2 ; smSel… = $820CFFC6 <52>
|
|||
|
DefSmgrRoutine TranslateToUnicode, -60,8,2 ; smSel… = $8208FFC4 <52>
|
|||
|
DefSmgrRoutine TranslateNoBreakFromUnicode,-62,26,2; smSel… = $821AFFC2 <52>
|
|||
|
DefSmgrRoutine SetCachedTablesNoPurge, -64,0,2 ; smSel… = $8200FFC0 <52>
|
|||
|
DefSmgrRoutine SetCachedTablesPurge, -66,0,0 ; smSel… = $8000FFBE <52>
|
|||
|
DefSmgrRoutine HaveFontTranslationTable, -68,6,4 ; smSel… = $8406FFBC <52>
|
|||
|
|
|||
|
DefSmgrRoutine RealScript, -70,0,2 ; smSel… = $8200FFBA <52>
|
|||
|
DefSmgrRoutine Font2RealScript, -72,2,2 ; smSel… = $8202FFB8 <52>
|
|||
|
DefSmgrRoutine TestLetter, -76,2,2 ; smSel… = $8202FFB4 <56>
|
|||
|
DefSmgrRoutine ScriptToRange, -78,2,4 ; smSel… = $8402FFB2 <68>
|
|||
|
DefSmgrRoutine NFindScriptRun, -80,16,2 ; smSel… = $8210FFB0 <69>
|
|||
|
|
|||
|
macro
|
|||
|
_InitScripts ; <17>
|
|||
|
move.l #smSelInitScripts,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_InitKeybdMenu ; <17>
|
|||
|
move.l #smSelInitKeybdMenu,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_AddScriptFonts ; <19>
|
|||
|
move.l #smSelAddScriptFonts,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SetKbdMenuInfo ; <23>
|
|||
|
move.l #smSelSetKbdMenuInfo,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_RebuildKeybdMenu ; <25>
|
|||
|
move.l #smSelRebuildKeybdMenu,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_IsCmdChar ; <28>
|
|||
|
move.l #smSelIsCmdChar,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_InitScriptApp ; <31>
|
|||
|
move.l #smSelInitScriptApp,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_CleanupScriptApp ; <31>
|
|||
|
move.l #smSelCleanupScriptApp,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_ReInitScripts ; <40>
|
|||
|
move.l #smSelReInitScripts,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_FindCharInSet ; <45>
|
|||
|
move.l #smSelFindCharInSet,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
|
|||
|
macro
|
|||
|
_RealScript ; <52>
|
|||
|
move.l #smSelRealScript,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_Font2RealScript ; <52>
|
|||
|
move.l #smSelFont2RealScript,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
; ----------------------------------------------------------------------------- <56>
|
|||
|
; FUNCTION TestLetter(testChar: CHAR): BOOLEAN; {Pascal calling conventions}
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
macro
|
|||
|
_TestLetter ; <56>
|
|||
|
move.l #smSelTestLetter,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
macro
|
|||
|
_ScriptToRange ; <68>
|
|||
|
move.l #smSelScriptToRange,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_NFindScriptRun ; <69>
|
|||
|
move.l #smSelNFindScriptRun,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
DefSmgrRoutine GetScriptRoutineAddr, 56, 4, 4 ; $84040038 implemented only by one-byte scripts
|
|||
|
DefSmgrRoutine SetScriptRoutineAddr, 58, 8, 0 ; $8008003A implemented only by one-byte scripts
|
|||
|
DefSmgrRoutine GetQDPatchAddr, 60, 6, 4 ; $8406003C implemented only by one-byte scripts
|
|||
|
DefSmgrRoutine SetQDPatchAddr, 62, 10, 0 ; $800A003E implemented only by one-byte scripts
|
|||
|
|
|||
|
smSelSCGetScriptRoutineAddr EQU (1<<30)++smSelGetScriptRoutineAddr ; <73>
|
|||
|
smSelSCSetScriptRoutineAddr EQU (1<<30)++smSelSetScriptRoutineAddr ; <73>
|
|||
|
smSelSCGetQDPatchAddr EQU (1<<30)++smSelGetQDPatchAddr ; <73>
|
|||
|
smSelSCSetQDPatchAddr EQU (1<<30)++smSelSetQDPatchAddr ; <73>
|
|||
|
|
|||
|
smSelSCCharByte EQU (1<<30)++smSelCharByte ; <73>
|
|||
|
smSelSCCharType EQU (1<<30)++smSelCharType ; <73>
|
|||
|
smSelSCTranslit EQU (1<<30)++smSelTranslit ; <73>
|
|||
|
smSelSCFindWord EQU (1<<30)++smSelFindWord ; <73>
|
|||
|
smSelSCParseTable EQU (1<<30)++smSelParseTable ; <73>
|
|||
|
|
|||
|
macro
|
|||
|
_SCGetScriptRoutineAddr ; <73>
|
|||
|
move.l #smSelSCGetScriptRoutineAddr,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCSetScriptRoutineAddr ; <73>
|
|||
|
move.l #smSelSCSetScriptRoutineAddr,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCGetQDPatchAddr ; <73>
|
|||
|
move.l #smSelSCGetQDPatchAddr,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCSetQDPatchAddr ; <73>
|
|||
|
move.l #smSelSCSetQDPatchAddr,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCLowerText ; <73>
|
|||
|
move.w #sclwrDoLower,-(sp)
|
|||
|
move.l #smSelSCLwrString,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCStripText ; <73>
|
|||
|
move.w #sclwrDoStrip,-(sp)
|
|||
|
move.l #smSelSCLwrString,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCUpperText ; <73>
|
|||
|
move.w #sclwrDoUpper,-(sp)
|
|||
|
move.l #smSelSCLwrString,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCStripUpperText ; <73>
|
|||
|
move.w #sclwrDoStripUpper,-(sp)
|
|||
|
move.l #smSelSCLwrString,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCCharByte ; <73>
|
|||
|
move.l #smSelSCCharByte,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCCharType ; <73>
|
|||
|
move.l #smSelSCCharType,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCTransliterate ; <73>
|
|||
|
move.l #smSelSCTranslit,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCFindWord ; <73>
|
|||
|
move.l #smSelSCFindWord,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
macro
|
|||
|
_SCParseTable ; <73>
|
|||
|
move.l #smSelSCParseTable,-(sp)
|
|||
|
_ScriptUtil
|
|||
|
endm
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Constants moved from ScriptEqu.a so we can conditionalize them. These don't
|
|||
|
; need to be in the public equates anyway. <3.3>
|
|||
|
;
|
|||
|
; We need a better way of setting these limits based on the combination of <17>
|
|||
|
; feature conditionals.
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
smLastEVerb EQU smKeyDisableState ; Last GetEnvirons verb. <58><61>
|
|||
|
smLastSVerb EQU smScriptAliasStyle ; Last public script verb. <23>
|
|||
|
smLowCall EQU smNFindScriptRun ; lowest script manager routine <69>
|
|||
|
|
|||
|
sisHighCall EQU smNPortionText ; highest Roman script routine <4>
|
|||
|
|
|||
|
; Moved these KeyScript verbs here since adding smKeyEnableAboutKybds after the 7.0 interfaces have
|
|||
|
; frozen. (and we also don't believe a developer will ever want them!) <41>
|
|||
|
smKeyDisableAboutKybds EQU -13 ; Disable ‘About…’ menu item since another dialog is up <41>
|
|||
|
; was named smKeyModalDialog in ScriptEqu.a.
|
|||
|
smKeyEnableAboutKybds EQU -14 ; Enable ‘About…’ menu item <41>
|
|||
|
smKeySynchKbdMenuState EQU -18 ; synchronize kbd menu state to current process' flag <65>
|
|||
|
|
|||
|
; private one byte SetScript/GetScript verbs - used by TextEdit in Cube-E <59>
|
|||
|
|
|||
|
smScriptSysBase EQU -26 ; Roman font to use with the system font
|
|||
|
smScriptAppBase EQU -28 ; Roman font to use with the application font
|
|||
|
smScriptFntBase EQU -30 ; Roman font to use with all other fonts
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Script Manager Global record
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Record declaration for the environment globals.
|
|||
|
; Note: The printer action routine must be at offset #22 for compatability
|
|||
|
; with KanjiTalk 1.0.
|
|||
|
|
|||
|
smgrCount equ 65 ; number of script entries.
|
|||
|
|
|||
|
SMgrRecord record 0
|
|||
|
smgrVersion ds.w 1 ; Script Manager version number.
|
|||
|
smgrMunged ds.w 1 ; Globals change count.
|
|||
|
smgrEnabled ds.b 1 ; Count of enabled scripts
|
|||
|
smgrBidirect ds.b 1 ; At least one bidirectional script.
|
|||
|
; The following pair of bytes must be word-aligned, as they are occasionally
|
|||
|
; treated as a single word.
|
|||
|
smgrFontForce ds.b 1 ; force font flag.
|
|||
|
smgrIntlForce ds.b 1 ; force intl flag.
|
|||
|
; The following pair of bytes must be word-aligned, as they are occasionally
|
|||
|
; treated as a single word.
|
|||
|
smgrForced ds.b 1 ; Script was forced to system script.
|
|||
|
smgrDefault ds.b 1 ; Script was defaulted to Roman script.
|
|||
|
;
|
|||
|
smgrGenFlags ds.l 1 ; general flags long <7/7/87med>
|
|||
|
smgrOverride ds.l 1 ; script override flags <7/7/87med>
|
|||
|
|
|||
|
ds.l 1 ; reserved for overriding
|
|||
|
|
|||
|
smgrPrint ds.l 1 ; printer action dispatcher.
|
|||
|
smgrUnivInstalled ds.l 1 ; if we have the universal init, what scripts it supports.<51>
|
|||
|
smgrCharByte ds.l 1 ; CharByte vector.
|
|||
|
smgrCharType ds.l 1 ; CharType vector.
|
|||
|
|
|||
|
smgrSysScript ds.w 1 ; preferred system script.
|
|||
|
smgrLastScript ds.w 1 ; last keyboard script.
|
|||
|
smgrKeyScript ds.w 1 ; keyboard script.
|
|||
|
|
|||
|
smgrRect ds.w 4 ; toggling rectangle.
|
|||
|
smgrSysRef ds.w 1 ; System file volRefNum.
|
|||
|
smgrKeySwap ds.l 1 ; Handle to current 'KSWP' resource <45>
|
|||
|
smgrCharPortion ds.w 1 ; Ch vs Sp Extra proportion, 4.12 fixed
|
|||
|
smgrReservedB ds.w 1 ;
|
|||
|
smgrReservedC ds.l 1 ;
|
|||
|
|
|||
|
smgrCSisPtr ds.l 1 ; contextual SIS globals ptr
|
|||
|
smgrCSisFlags ds.l 1 ; flag bits for contextual SIS
|
|||
|
smgrNumRepPtr ds.l 1 ; ptr to number rep dispatch list
|
|||
|
smgrDateRepPtr ds.l 1 ; ptr to date rep dispatch list
|
|||
|
|
|||
|
smgrDispTable ds.l 1 ; ptr to SMgr dispatch table <04/26/89 pke>
|
|||
|
smgrDispLow ds.w 1 ; low selector value <04/26/89 pke>
|
|||
|
smgrDispHigh ds.w 1 ; high selector value <04/26/89 pke>
|
|||
|
|
|||
|
; <3.2><13>
|
|||
|
smgrDoubleByte ds.b 1 ; Boolean; T => at least one 2-byte script <3.2>
|
|||
|
smgrDisableKybds ds.b 1 ; T=>disable keybds not in Sys/Roman script/1=>disable all kbds <32><33>
|
|||
|
smgrRegionCode ds.w 1 ; region code (verXxx) from itlc <5>
|
|||
|
smgrClientLLRecHndl ds.l 1 ; handle to line layout rec for PicComment <45>
|
|||
|
|
|||
|
ds.l 1 ; reserved <39><45>
|
|||
|
|
|||
|
; <17>
|
|||
|
smgrKeyboardMenuPtr ds.l 1
|
|||
|
smgrKbdMenuAvail ds.b 1 ; madam, your menu is showing! <43>
|
|||
|
ds.b 3 ; reserved <43>
|
|||
|
|
|||
|
smgrDummy ds.l 1 ; dummy field - all zero; for 7.0 only <5>
|
|||
|
|
|||
|
smgrEntry ds.l smgrCount ; script global entries (ptrs to ScriptRecord).
|
|||
|
|
|||
|
; New stuff for 604 & IIci ROMs - removed conditionals <50>
|
|||
|
; Removed conditionals on some of these - structure should stay fixed <12/02/88 pke>
|
|||
|
; Rearranged this stuff, since it hasn't gone into any systems yet <02/28/89 pke>
|
|||
|
|
|||
|
smgrCurITLK ds.l 1 ; handle to current itlk <45>
|
|||
|
|
|||
|
; following are for the delimiter table used by the tokenizer in ScriptMgrUtilText.a <4/27/88ldc>
|
|||
|
dTabNegOffset ds.w 1 ; negative offset for endParse's benefit
|
|||
|
delimMap ds.l 4 ; delimiter table
|
|||
|
|
|||
|
; script icon section: <03/12/89 pke>
|
|||
|
smgrIconOffset ds.w 1 ; script icon offset (pixels)
|
|||
|
smgrIconSideFlag ds.b 1 ; script icon side (0=right,$ff=left)
|
|||
|
|
|||
|
smgrKeyScriptResult ds.b 1 ; T iff KeyScript verb caused some action <40>
|
|||
|
|
|||
|
;---------------vectors for patched routines (used by RAM version ≥7.0 only)-----------------------
|
|||
|
; rearranged, turning unused vectors into reserved space. Size doesn't change. <09/01/89 pke>
|
|||
|
; sVectInitWindows and sVectInitResources became unused, so rearrange again. <17>
|
|||
|
|
|||
|
sVectInitApplZone ds.l 1 ; old InitApplZone routine pointer <4/26/88ldc>
|
|||
|
sVectGetOSEvent ds.l 1 ; old GetOSEvent routine pointer <4/26/88ldc>
|
|||
|
sVectKeyTrans ds.l 1 ; old KeyTrans routine pointer <12/02/88 pke>
|
|||
|
sVectScriptUtil ds.l 1 ; old ScriptUtil routine pointer <4/26/88ldc>
|
|||
|
sVectLwrString ds.l 1 ; old LwrString routine pointer <4/25/88ldc>
|
|||
|
|
|||
|
; <17>
|
|||
|
sVectInitMenus ds.l 1 ; old InitMenus routine pointer <17><30>
|
|||
|
sVectOldSystemMenu ds.l 1 ; old SystemMenu routine pointer <17><30>
|
|||
|
|
|||
|
ds.l 5 ; reserved space <3.0><17><30><64>
|
|||
|
|
|||
|
;---------------vectors for internal routines (used by ROM version only)---------------------------
|
|||
|
;
|
|||
|
; Although these are used by ROM, they are set up both RAM and ROM versions.
|
|||
|
; Note that in 7.0, sVectFixSMgrWorld is effectively inactivated by stuffing the
|
|||
|
; address of an rts; the FixSMgrWorld code in ROM is not used.
|
|||
|
|
|||
|
; from ScriptMgrUtilNum.a
|
|||
|
|
|||
|
sVectAppendSymbol ds.l 1 ; AppendSymbol routine pointer <6/17/88ldc>
|
|||
|
sVectConvertToString ds.l 1 ; ConvertToString routine pointer <6/17/88ldc>
|
|||
|
sVectExpHandling ds.l 1 ; ExpHandling routine pointer <6/17/88ldc>
|
|||
|
sVectExpMatching ds.l 1 ; ExpMatching routine pointer <6/17/88ldc>
|
|||
|
sVectCheckForDigits ds.l 1 ; CheckForDigits routine pointer <6/17/88ldc>
|
|||
|
sVectMatchingSubstring ds.l 1 ; MatchingSubstring routine pointer <6/17/88ldc>
|
|||
|
sVectCond ds.l 1 ; Cond routine pointer <6/17/88ldc>
|
|||
|
sVectCheckForm ds.l 1 ; CheckForm routine pointer <6/17/88ldc
|
|||
|
sVectTackOnExp ds.l 1 ; TackOnExp routine pointer <6/17/88ldc>
|
|||
|
sVectMakeExp ds.l 1 ; MakeExp routine pointer <6/17/88ldc>
|
|||
|
sVectCheckPartsIntegrity ds.l 1 ; CheckPartsIntegrity routine pointer <6/17/88ldc>
|
|||
|
sVectRetrieveChar ds.l 1 ; RetrieveChar routine pointer <6/17/88ldc>
|
|||
|
sVectIsSubstring ds.l 1 ; IsSubstring routine pointer <6/17/88ldc>
|
|||
|
|
|||
|
; from elsewhere
|
|||
|
|
|||
|
sVectSwapIcon ds.l 1 ; SwapIcon routine pointer <06/30/89 pke>
|
|||
|
sVectSwapKybd ds.l 1 ; SwapKybd routine pointer <06/30/89 pke>
|
|||
|
sVectFixSMgrWorld ds.l 1 ; FixSMgrWorld routine pointer <06/30/89 pke>
|
|||
|
|
|||
|
;---------------vectors for communication between ptches, managers, etc.---------------------------
|
|||
|
|
|||
|
; <13>
|
|||
|
sVectSMgrCalcRect ds.l 1 ; SMgrCalcRect routine pointer <08/26/89 pke>
|
|||
|
sVectSMgrInitFonts ds.l 1 ; SMgrInitFonts routine pointer <08/27/89 pke>
|
|||
|
sVectSMgrPostMunging ds.l 1 ; SMgrPostMunging routine pointer <08/27/89 pke>
|
|||
|
sVectCallInterface ds.l 1 ; <3.1> <09/06/89 pke>
|
|||
|
|
|||
|
; <17>
|
|||
|
sVectInitKeyboardMenu ds.l 1 ; InitKeyboardMenu routine pointer <17>
|
|||
|
|
|||
|
ds.l 3 ; reserved vector space <06/30/89 pke>
|
|||
|
|
|||
|
smgrSize equ * ; size of script manager core.
|
|||
|
|
|||
|
; Check the validity of fixed values in SMgrRecord
|
|||
|
|
|||
|
IF smgrPrint<>22 THEN
|
|||
|
aerror &concat('smgrPrint at wrong location: ',&i2s(smgrPrint))
|
|||
|
ENDIF
|
|||
|
IF smgrEntry<>114 THEN
|
|||
|
aerror &concat('smgrEntry at wrong location: ',&i2s(smgrEntry))
|
|||
|
ENDIF
|
|||
|
|
|||
|
IF smgrSize<>544 THEN ; <17>
|
|||
|
aerror &concat('SMgrRecord is wrong size: ',&i2s(smgrSize)) ; <17>
|
|||
|
ENDIF
|
|||
|
|
|||
|
endr
|
|||
|
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Private Script Manager globals flags bits
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
smOverPortion equ 0 ; override portion text.
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Record declaration for the script globals. This first set is always the
|
|||
|
; same for every script. Local variables that are specific to each script
|
|||
|
; follow the fields described here in the globals.
|
|||
|
|
|||
|
ScriptRecord record 0
|
|||
|
scriptVersion ds.w 1 ; script version number.
|
|||
|
scriptMunged ds.w 1 ; script globals change count.
|
|||
|
scriptEnabled ds.b 1 ; script enabled flag.
|
|||
|
scriptRight ds.b 1 ; right to left flag.
|
|||
|
scriptJust ds.b 1 ; justification flag.
|
|||
|
scriptRedraw ds.b 1 ; word redraw flag.
|
|||
|
|
|||
|
scriptSysFond ds.w 1 ; preferred system font.
|
|||
|
scriptAppFond ds.w 1 ; preferred application font.
|
|||
|
|
|||
|
scriptBundle ds ItlbRecord ; bundle
|
|||
|
|
|||
|
scriptPrint ds.l 1 ; printer action vector.
|
|||
|
scriptTrap ds.l 1 ; ScriptUtil trap vector.
|
|||
|
|
|||
|
scriptCreator ds.l 1 ; sis creator signature.
|
|||
|
scriptFile ds.l 1 ; sis file name.
|
|||
|
scriptName ds.l 1 ; sis name.
|
|||
|
|
|||
|
scriptXFlags ds.l 1 ; <10/5/88ldc> 'X'tra flags for
|
|||
|
scriptOverRide1 ds.l 1 ; for overriding
|
|||
|
scriptOverRide2 ds.l 1 ; for overriding
|
|||
|
|
|||
|
; use 2 longwords of reserved space <04/26/89 pke>
|
|||
|
scriptDispTable ds.l 1 ; ptr to script dispatch table <04/26/89 pke>
|
|||
|
scriptDispLow ds.w 1 ; low selector value <04/26/89 pke>
|
|||
|
scriptDispHigh ds.w 1 ; high selector value <04/26/89 pke>
|
|||
|
|
|||
|
; use 4 longwords of reserved space <06/23/89 pke>
|
|||
|
scriptMonoFondSize ds.l 1 ; default monospace FOND (hi) & size (lo) <06/23/89 pke>
|
|||
|
scriptPrefFondSize ds.l 1 ; preferred FOND (hi) & size (lo) <06/23/89 pke>
|
|||
|
scriptSmallFondSize ds.l 1 ; default small FOND (hi) & size (lo) <06/23/89 pke>
|
|||
|
scriptSysFondSize ds.l 1 ; default system FOND (hi) & size (lo) <06/23/89 pke>
|
|||
|
scriptAppFondSize ds.l 1 ; default app FOND (hi) & size (lo) <10>
|
|||
|
scriptHelpFondSize ds.l 1 ; default Help Mgr FOND (hi) & size (lo) <10>
|
|||
|
|
|||
|
; <17>
|
|||
|
scriptKeysItemNum ds.b 1 ; default input menu item number (actual, not relative to script) <17>
|
|||
|
scriptInputCount ds.b 1 ; count of # of enabled KCHRs <24><57>
|
|||
|
|
|||
|
scriptValidStyles ds.b 1 ; Style- set of all valid styles for script <23>
|
|||
|
scriptAliasStyle ds.b 1 ; Style- alias style for script <23>
|
|||
|
scriptInItlm ds.b 1 ; true iff this script has 'itlm' entry <18>
|
|||
|
scriptID ds.b 1 ; this script's scriptcode <63>
|
|||
|
ds.b 2 ; reserved. <24><63>
|
|||
|
scriptAvail ds.l 1 ; Avail routine vector, or 0 if unused <30>
|
|||
|
scriptAddFonts ds.l 1 ; AddFonts routine vector, or 0 if unused <30>
|
|||
|
scriptQDPatches ds.l 1 ; the qd routines dispatch table.(universal init) <51> <10><30>
|
|||
|
scriptSize equ * ; size of script entry.
|
|||
|
|
|||
|
IF scriptSize<>116 THEN ; <17>
|
|||
|
aerror &concat('ScriptRecord is wrong size: ',&i2s(scriptSize)) ; <17>
|
|||
|
ENDIF
|
|||
|
endr
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Private Macros for the Script Manager and Script Interface Systems.
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
;____________________________________________________________
|
|||
|
; paranoid type checking
|
|||
|
|
|||
|
macro
|
|||
|
CheckReg &AReg,&RegType
|
|||
|
if &UpCase(&SubStr(&AReg,1,1))<>&UpCase(&RegType) then
|
|||
|
aerror &concat('Bad Reg in Macro',&AReg,' ',&RegType)
|
|||
|
endif
|
|||
|
endm
|
|||
|
|
|||
|
;____________________________________________________________
|
|||
|
; Script Manager environment macro. Load smgrCore from IntlSpec.
|
|||
|
|
|||
|
macro
|
|||
|
GetSmgrCore ®
|
|||
|
move.l intlSpec,® ; get directly <11/10/87med>
|
|||
|
endm
|
|||
|
|
|||
|
;____________________________________________________________
|
|||
|
; Current font macro.
|
|||
|
|
|||
|
;mpwPtr equ $316 ; MPW global pointer.
|
|||
|
|
|||
|
macro
|
|||
|
GetTheFont &AReg,&DReg
|
|||
|
CheckReg &AReg,a ; is it an A reg?
|
|||
|
CheckReg &DReg,d ; is it an D reg?
|
|||
|
|
|||
|
tst.b QDExist ; test QDNotThere
|
|||
|
beq.s @TryRealFont ; QD not there, exit gracefully
|
|||
|
@DefaultFont
|
|||
|
clr.l &DReg ; use font 0
|
|||
|
bra.s @EndGetTheFont ; done
|
|||
|
@TryRealFont
|
|||
|
move.l grafGlobals(a5),&DReg ; is it there? (sanity check)
|
|||
|
ble.s @DefaultFont ; get the real one
|
|||
|
move.l &DReg,&AReg ; load grafGlobals.
|
|||
|
move.l thePort(&AReg),&AReg ; load thePort.
|
|||
|
move.w txFont(&AReg),&DReg ; get the font
|
|||
|
@EndGetTheFont
|
|||
|
endm
|
|||
|
|
|||
|
;____________________________________________________________
|
|||
|
; Macro CheckA6
|
|||
|
; Environment a6,a7,localFrame
|
|||
|
; Function Fall into the debugger if sp not balanced
|
|||
|
; Location Insert just before UNLK command
|
|||
|
;____________________________________________________________
|
|||
|
macro
|
|||
|
CheckA6 &debugSwitch=testScriptManager,&lFrame=localFrame
|
|||
|
if &eval(&debugSwitch) then
|
|||
|
movem.l d0,-(sp) ; save reg
|
|||
|
move.l a6,d0 ; for compare
|
|||
|
add.l #&lFrame-4,d0 ; exclude frame, saved reg
|
|||
|
cmp.l a7,d0 ; same?
|
|||
|
movem.l (sp)+,d0 ; restore reg
|
|||
|
beq.s @1 ; yes, skip
|
|||
|
pea @2 ; string
|
|||
|
_DebugStr
|
|||
|
bra.s @1 ; continue
|
|||
|
@2:
|
|||
|
dc.b 'Stack Unbalanced.'
|
|||
|
align 2
|
|||
|
@1:
|
|||
|
endif
|
|||
|
endMacro
|
|||
|
;____________________________________________________________
|
|||
|
; Macro CheckSelector
|
|||
|
; Environment a6,a7,localFrame
|
|||
|
; Function Check that SmgrUtil routine has correct selector
|
|||
|
; Location Insert just before LINK command
|
|||
|
;____________________________________________________________
|
|||
|
macro
|
|||
|
CheckSelector &debugSwitch=testScriptManager,&aSize=argSize,&rSize=resultSize
|
|||
|
if &eval(&debugSwitch) then
|
|||
|
move.w 4(sp),d0 ; high bit set?
|
|||
|
bge.s @0 ; no, bad
|
|||
|
cmp.b #&aSize-4,d0 ; returnSize ok?
|
|||
|
bne.s @0 ; bad
|
|||
|
lsr.w #8,d0 ; get args
|
|||
|
and.b #$7f,d0 ; mask top bit off
|
|||
|
cmp.b #&rSize,d0 ; argSize ok?
|
|||
|
beq.s @1 ; yes, skip
|
|||
|
@0:
|
|||
|
pea @2 ; string
|
|||
|
_DebugStr
|
|||
|
bra.s @1 ; continue
|
|||
|
@2:
|
|||
|
dc.b 'Bad Smgr Selector.'
|
|||
|
align 2
|
|||
|
@1:
|
|||
|
endif
|
|||
|
endMacro
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Private equates for Script Manager resource structures and Roman Interface System
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
; Roman script constants.
|
|||
|
|
|||
|
romanCoreSize equ ScriptRecord.scriptSize ; size of Roman globals.
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; IntlTokenize, itl4 private equates
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
; moved the ones needed for itl4 into IntlResourcesPriv.a <74>
|
|||
|
|
|||
|
fExists equ 0
|
|||
|
fIsEPlus equ 1
|
|||
|
fIsEMinus equ 2
|
|||
|
fIsPercent equ 3
|
|||
|
fIsDecimal equ 4
|
|||
|
fIsAltNum equ 5
|
|||
|
|
|||
|
fHi equ 0
|
|||
|
fLo equ 1
|
|||
|
fDEMEP equ $1600
|
|||
|
fEMEP equ $0600
|
|||
|
fEXISTF equ $0100
|
|||
|
fExAlF equ $2100
|
|||
|
fDPEMEP equ $1E00 ; <05/22/89 pke>
|
|||
|
|
|||
|
; The following is the internal format created by Str2Format and used by Format2Str,
|
|||
|
; FormatStr2X, and FormatX2Str. The string in formString is a concatenation of the
|
|||
|
; format specifier strings for each of the 3 formats. Bytes in formString with value <32
|
|||
|
; are number parts token codes, as specified in ScriptEqu.a (tokLeftQuote,…); others
|
|||
|
; are literals. The startLocs and decLocs arrays specify the start index and decimal
|
|||
|
; point index in formString for each of the 3 possible formats. Since the start index
|
|||
|
; for the positive format is always 1, startLocs[fPositive] instead has an index value
|
|||
|
; just past the end of formString. The preDig and postDig arays specify the number of
|
|||
|
; digits before and after the decimal point in each of the 3 formats. The high byte of
|
|||
|
; the flags value for each format has bit flags whose bit numbers are defined above
|
|||
|
; (fExists..fIsAltNum). <comment added 05/22/89 pke>
|
|||
|
|
|||
|
FormatStringPriv record 0,increment
|
|||
|
fLength ds.b 1 ; length of format String (less this byte)
|
|||
|
fVersion ds.b 1 ; version number
|
|||
|
decLocs ds.w 3 ; ARRAY[fPositive..fZero] OF INTEGER
|
|||
|
startLocs ds.w 3 ; ARRAY[fPositive..fZero] OF INTEGER
|
|||
|
preDig ds.w 3 ; ARRAY[fPositive..fZero] OF INTEGER
|
|||
|
postDig ds.w 3 ; ARRAY[fPositive..fZero] OF INTEGER
|
|||
|
flags ds.w 3 ; ARRAY[fPositive..fZero] OF BitPack
|
|||
|
fReserved ds.w 6
|
|||
|
fixedLength equ *
|
|||
|
formString ds.b 1 ; Pascal-style string of variable length
|
|||
|
; (here we only show space for length byte)
|
|||
|
ENDR
|
|||
|
|
|||
|
; ----------------------------------------------------------------------------- <6>
|
|||
|
; New structure for justified text routines in RomanNewJust.a.
|
|||
|
; Rearranged, fields renamed. <45><47>
|
|||
|
;
|
|||
|
; Fields marked (f) are set by InitFontAndScale, which must be called before
|
|||
|
; any of the other routines listed below.
|
|||
|
; Fields marked (w) are set by InitWeight (called by CalcSpChExtra if slop≠0
|
|||
|
; and it hasn't already been called within the current external routine)
|
|||
|
; Fields marked (c) are set by CalcSpChExtra
|
|||
|
; Fields marked (d) are set by DoSpChExtra
|
|||
|
; The oldSpExtra field , marked (d?), is set by DoSpChExtra if it sets the
|
|||
|
; corresponding restoreSE boolean TRUE.
|
|||
|
; Flags marked (•) are initialized to 0 by InitFontAndScale, and set later
|
|||
|
; by the routine indicated.
|
|||
|
;
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
JustDataRec record 0
|
|||
|
inScaling ds.l 1 ;(f) Fixed, input horiz scaling (numer.h/denom.h) <38><47>
|
|||
|
outScaling ds.l 1 ;(f) Fixed, output horiz scaling (numer.h/denom.h) <47>
|
|||
|
charPortion ds.l 1 ;(w) Fixed, char portion
|
|||
|
spPortion ds.l 1 ;(w) Fixed, space portion
|
|||
|
weight ds.l 1 ;(w) Fixed, (num spaces)*sp + (adjusted num chars)*cp
|
|||
|
runSlop ds.l 1 ;(c) Fixed, slop used to calculate Sp & Ch Extra <45>
|
|||
|
addSpExtra ds.l 1 ;(c) Fixed, add'l SpaceExtra amount (signed!) <45>
|
|||
|
addSpExScal ds.l 1 ;(c) Fixed, (add'l SpaceExtra amount)/hScaling <45>
|
|||
|
addChExtra ds.l 1 ;(c) Fixed, add'l CharExtra amount (signed!)
|
|||
|
addChExScal ds.l 1 ;(c) Fixed, (add'l CharExtra amount)/hScaling <45>
|
|||
|
oldSpExtra ds.l 1 ;(d?)Fixed, old SpExtra value
|
|||
|
noInterCh ds.b 1 ;(f) if TRUE, FOND does not allow interchar spacing <45>
|
|||
|
inScalTrue ds.b 1 ;(f) if TRUE, inScaling ≠ 1.0 <38><47>
|
|||
|
outScalTrue ds.b 1 ;(f) if TRUE, outScaling ≠ 1.0 <47>
|
|||
|
startNoFwd ds.b 1 ;(•w)if TRUE, start pen move is 0, not 0.5 ce
|
|||
|
endBackup ds.b 1 ;(•w)if TRUE, end pen move is -1.0ce, not -0.5ce
|
|||
|
haveWeight ds.b 1 ;(•c)if TRUE, we have computed the weight <45>
|
|||
|
restoreSE ds.b 1 ;(d) if TRUE, we need to restore spExtra <47>
|
|||
|
align 4 ; force size to long multiple for easy copy <45>
|
|||
|
jdRecSize equ * ; size of record
|
|||
|
endr
|
|||
|
|
|||
|
; Id & record for secret LaserWriter line layout pic opcode, 157. <45>
|
|||
|
;
|
|||
|
; This PicComment overrides the LaserWriter line layout algorithm, and
|
|||
|
; contains parameters that will be passed directly to a PostScript awidthshow
|
|||
|
; command. It only affects the next StdText call, and is only recognized by
|
|||
|
; the LaserWriter driver.
|
|||
|
|
|||
|
clientLLComment equ 157 ; ID of secret PicComment
|
|||
|
|
|||
|
ClientLLRecord record 0,incr
|
|||
|
chCount ds.w 1 ; textLen for next StdText
|
|||
|
major ds.l 1 ; Fixed, point width added to space char
|
|||
|
spChar ds.w 1 ; char to be used as space char
|
|||
|
minor ds.l 1 ; Fixed, point width added to ALL chars
|
|||
|
ulLength ds.l 1 ; Fixed, underline length
|
|||
|
cllRecSize equ * ; size of record
|
|||
|
endr
|
|||
|
|
|||
|
; Width table used in printing code, from equates in Print Shop PrEqu.a file. <45>
|
|||
|
|
|||
|
ThPrWidthTable record 0,incr
|
|||
|
fntNum ds.w 1 ; font family number for this table
|
|||
|
fntStyle ds.w 1 ; font style info (in lo byte)
|
|||
|
fntType ds.b 1 ; 0=bitmap, 3=sfnt, 1=other spline (e.g. PS), -1=noWidthsFont
|
|||
|
modFlag ds.b 1 ; set if natural widths have been modified
|
|||
|
ptSize ds.l 1 ; pt size multiplier (Fixed)
|
|||
|
styleDelta ds.l 1 ; value to be added to all width entry values (Fixed)
|
|||
|
styleFactor ds.l 1 ; style multiplier for condense/expand (Fixed)
|
|||
|
theTable ds.l 256 ; table of Fixed widths
|
|||
|
prWTabSize equ * ; size of record
|
|||
|
endr
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; New structure for generic FindScriptRun table header <67>
|
|||
|
; (moved from ScriptMgrExtensions.a)
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
FindScriptTable record 0
|
|||
|
flags1 ds.b 1 ;
|
|||
|
flags2 ds.b 1 ; must be negative to indicate new format
|
|||
|
version ds.w 1 ;
|
|||
|
length ds.w 1 ; total length of this table
|
|||
|
classTableOffset ds.w 1 ; offset to main class table
|
|||
|
auxCTableOffset ds.w 1 ; offset to aux class table (for 2-byte)
|
|||
|
stateTableOffset ds.w 1 ; offset to state table
|
|||
|
returnTableOffset ds.w 1 ; offset to table of return values
|
|||
|
reserved ds.w 1 ;
|
|||
|
endr
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Structure for ScriptToRange <68>
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
ScriptRange record 0,increment
|
|||
|
min ds.w 1
|
|||
|
max ds.w 1
|
|||
|
endr
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Constants for new keyboard menu stuff <17>
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
kKeyboardMenuID equ -16491 ; <24>
|
|||
|
kDefaultIMIconID equ -16492 ; <66>
|
|||
|
kKeyboardMenuItemsID equ kKeyboardMenuID-4 ; STR# ID <71>
|
|||
|
|
|||
|
; indices for strings in Keyboard Menu STR# resource (kKeybdMenuItemsID)
|
|||
|
DefMarkIndex equ 1 ; <33>
|
|||
|
AboutKybdsIndex equ 2 ; <33>
|
|||
|
;;NextScriptIndex equ 3 ; <24><33>currently not used
|
|||
|
;;NextKeybdIndex equ 4 ; <24><33>currently not used
|
|||
|
|
|||
|
; indices for strings in About Keyboards dialogs <71>
|
|||
|
kCheckActiveKbdIndex equ 1 ; checked menu item explanation index <71>
|
|||
|
kRotateKbdsIndex equ 2 ; rotate keyboards and scripts index <71>
|
|||
|
|
|||
|
KeybdDefaultMrk equ $00 ; null is the default mark <31><43>
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Records of auxilliary information for Keyboard Menu. <24>
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
AuxKeyboardMenuInfo record 0 ; ptr stored in smgrKeyboardMenuPtr
|
|||
|
IF 0 THEN ; <57>
|
|||
|
IconSuiteH ds.l 1 ; IconSuiteH for this KCHR
|
|||
|
KCHRid ds.w 1 ; KCHR id for current KCHR resource
|
|||
|
KCHRposn ds.w 1 ; ordering within the script in the menu
|
|||
|
ELSE ; <57>
|
|||
|
itemRsrcID ds.w 1 ; KCHR/old-style IM resource id <57>
|
|||
|
itemScriptPosn ds.w 1 ; ordering within the script in the menu (relative to script!)
|
|||
|
itemType ds.b 1 ; 0 = KCHR, 1 = new IM, 2 = old IM <58>
|
|||
|
itemUnused ds.b 1 ; unused byte: for future kludges <58>
|
|||
|
iconSuiteH ds.l 1 ; IconSuiteH for this item
|
|||
|
auxItemInfo ds.l 1 ; use as necc for the item (IM will store 'component') <57>
|
|||
|
ENDIF ; <57>
|
|||
|
AuxMenuInfoSize equ *
|
|||
|
endr
|
|||
|
|
|||
|
IF 0 THEN ; <57>
|
|||
|
KCHRInstalledRec record 0 ; ptr stored in KCHRInstalledPtr
|
|||
|
KCHRhandle ds.l 1
|
|||
|
KCHRid ds.w 1 ; needed for sorting of KCHR <33>
|
|||
|
KCHRscript ds.w 1
|
|||
|
KCHRname ds.b 256 ; needed for sorting of KCHR <33>
|
|||
|
KCHRInstalledRecSz equ *
|
|||
|
ELSE ; <57>
|
|||
|
ItemInstalledRec record 0 ; ptr stored in KCHRInstalledPtr
|
|||
|
itemHandle ds.l 1 ; resource handle for KCHR/ name handle for IM <57>
|
|||
|
itemResID ds.w 1 ; needed for sorting of KCHR <33>
|
|||
|
itemScript ds.w 1
|
|||
|
itemInfo ds.l 1 ; auxilliary info - use as desired <57>
|
|||
|
itemInpuType ds.b 1 ; 0 = KCHR, 1 = new IM, 2 = old IM <58>
|
|||
|
unused ds.b 1 ; for future:use me <58>
|
|||
|
itemName ds.b 256 ; needed for sorting of KCHR <33>
|
|||
|
ItemInstalledRecSz equ *
|
|||
|
ENDIF ; <57>
|
|||
|
endr
|
|||
|
; ------------------------------------------
|
|||
|
; ------------------------------------------
|
|||
|
; constants for type of keyboard menuitem <58>
|
|||
|
|
|||
|
KCHRitem equ 0
|
|||
|
TSMIMitem equ 1 ; TextServicesMgr Input Method (new style)
|
|||
|
oldIMitem equ 2 ; old style Input Method
|
|||
|
; ------------------------------------------
|
|||
|
; ------------------------------------------
|
|||
|
; bits for CJKcount byte field in menuFrame in ScriptMgrKbdMenu.a <58>
|
|||
|
; if the bit = 1 then this means there are input methods for this script,
|
|||
|
; otherwise, if the bit = 0 then there are none for this script.
|
|||
|
; maps to OCCJK where high means there's an 6.x compatible Japanese IM, the next bit
|
|||
|
; is simplified Chinese, next is Traditional Chinese, then Japanese, and lowest is Korean.
|
|||
|
|
|||
|
HaveOldJapanIMbit equ 4 ; <61>
|
|||
|
HaveSimpChineseIMbit equ 3
|
|||
|
HaveTradChineseIMbit equ 2
|
|||
|
HaveJapaneseIMbit equ 1
|
|||
|
HaveKoreanIMbit equ 0
|
|||
|
|
|||
|
; ------------------------------------------
|
|||
|
; ------------------------------------------
|
|||
|
; Used for the componentFlags field of the component record. Needed to count IMs <58>
|
|||
|
; for these scripts for the keyboard menu. These flags include the script code
|
|||
|
; (bits 8-14) and the bit (bit 23) set that indicates that the text service
|
|||
|
; (input method, in this case) will take an active key event.
|
|||
|
|
|||
|
SimpChineseFlags equ $00009900 ; $19 is script code, takes active key event
|
|||
|
TradChineseFlags equ $00008200 ; $02 is script code, takes active key event
|
|||
|
JapaneseFlags equ $00008100 ; $01 is script code, takes active key event
|
|||
|
KoreanFlags equ $00008300 ; $03 is script code, takes active key event
|
|||
|
|
|||
|
ScriptMask equ $00007F00 ; only care about the script code of the componentFlags field
|
|||
|
ScriptActiveEventMask equ $0000FF00 ; script code and takes active events mask
|
|||
|
AllFlags equ $0000FFFF ; all flags can be set <72>
|
|||
|
ActiveEventMask equ $00008000 ; only care if active event flag is set <72>
|
|||
|
; ------------------------------------------
|
|||
|
; ------------------------------------------
|
|||
|
; To be used with the secret script flag for KanjiTalk: <58>
|
|||
|
UsingOldStyleIM equ $FFFFFFFF
|
|||
|
NotUsingOldStyleIM equ 00000000
|
|||
|
|
|||
|
; ------------------------------------------
|
|||
|
; ------------------------------------------
|
|||
|
|
|||
|
; Records needed for adding old-style (pre-TSM) input methods to the keyboard <58>
|
|||
|
; menu. Adding ScriptSystemGlobals record and intfRecord for access outside
|
|||
|
; of an input method. Moved here from Kanji IM file ScriptInterface.equ.
|
|||
|
|
|||
|
; ------------------------------------------------------------------------------
|
|||
|
; ScriptSystemGlobals - a pointer to these values is stored in the Kanji smgrEntry
|
|||
|
; array of the script manager core. The standard scriptRecord must be defined
|
|||
|
; at the top of the ScriptSystemGlobals.
|
|||
|
; ------------------------------------------------------------------------------
|
|||
|
|
|||
|
; ------------------------------------------------------------------------------
|
|||
|
; NewScriptSystemGlobals - all new globals should be added here. This record is
|
|||
|
; added to the end of the ScriptSystemGlobals structure. Update the file
|
|||
|
; ScriptInterface.h if you change or add any fields.
|
|||
|
; ------------------------------------------------------------------------------
|
|||
|
|
|||
|
NewScriptSystemGlobals Record 0
|
|||
|
fSavedStdTextBottleNeck ds.l 1 ; used in LaserPrinterStdText.c
|
|||
|
fInputMethodWorkSpaceHandle ds.l 1 ; handle used as a place holder for input methods to work in
|
|||
|
kNewScriptSystemGlobalsSize equ * ; size of record
|
|||
|
EndR
|
|||
|
|
|||
|
ScriptSystemGlobals Record 0
|
|||
|
ds.b ScriptRecord.scriptSize ; regular script globals.
|
|||
|
|
|||
|
FISError ds.w 1 ; result of last call to a FIS vector.
|
|||
|
utilVector ds.l 1 ; utility routines dispatch.
|
|||
|
fontVector ds.l 1 ; font routines dispatch.
|
|||
|
intfVector ds.l 1 ; user interface routines dispatch.
|
|||
|
|
|||
|
utilErrors ds.l 1 ; hdl to string list of util errors
|
|||
|
fontErrors ds.l 1 ; hdl to string list of font errors.
|
|||
|
intfErrors ds.l 1 ; hdl to string list of interface errors.
|
|||
|
|
|||
|
fbitArray ds.l 1 ; table of fonts.
|
|||
|
fdefArray ds.l 1 ; table of font definition procedures.
|
|||
|
intfArray ds.l 1 ; table of input methods.
|
|||
|
|
|||
|
inQD ds.b 1 ; st -> don't allow entry to FIS StdTxMeas
|
|||
|
normalEvents ds.b 1 ; st -> normal event processing in GOSEvent
|
|||
|
debugging ds.b 1 ; st -> do debugging breaks
|
|||
|
FISEvent ds.b 1 ; st -> OSEventAvail returned FIS.
|
|||
|
|
|||
|
teKeyBytes ds.w 1 ; two characters used for TextEdit buffering.
|
|||
|
lastFbit ds.l 1 ; last fbit font used in SwapFIS.
|
|||
|
lastFont ds.l 1 ; last Mac font used by SwapFIS.
|
|||
|
grafWorld ds.l 1 ; valid GrafGlobals pointer.
|
|||
|
FISPort ds.l 1 ; valid GrafPtr to default port.
|
|||
|
charExtra ds.l 1 ; extra space for non-space characters.
|
|||
|
spacePercent ds.l 1 ; percentage of slop in spaces vs chars.
|
|||
|
errorAlrt ds.l 1 ; ptr to error alert rsrc.
|
|||
|
errorDitl ds.l 1 ; ptr to error alert item list.
|
|||
|
|
|||
|
jSwapFIS ds.l 1 ; vector to SwapFIS routine.
|
|||
|
jFindBlock ds.l 1 ; vector to FindBlock routine.
|
|||
|
jLaserSize ds.l 1 ; vector to LaserSize routine.
|
|||
|
|
|||
|
imMethod ds.w 1 ; input method ID number.
|
|||
|
imReEntry ds.b 1 ; input method reentrancy flag.
|
|||
|
imUnused ds.b 1 ; unused byte.
|
|||
|
imA5 ds.l 1 ; input method saved globals pointer.
|
|||
|
imRTS ds.l 1 ; input method saved return address.
|
|||
|
imHook ds.l 1 ; input method saved DeskHook.
|
|||
|
imNotify ds.l 1 ; input method saved EjectNotify.
|
|||
|
imTEbytes ds.w 1 ; saved TextEdit buffer bytes.
|
|||
|
|
|||
|
DJPrPort ds.l 1 ; printerPort when DrawJust PicComment sent for BackGround printing.
|
|||
|
DJSextra ds.l 1 ; space extra when DrawJust PicComment sent for BackGround printing.
|
|||
|
DJCextra ds.l 1 ; char extra when DrawJust PicComment sent for BackGround printing.
|
|||
|
DJinPrint ds.b 1 ; true when DrawJust PicComment sent for BackGround printing.
|
|||
|
DJUnused ds.b 1 ; unused byte.
|
|||
|
|
|||
|
scriptConfiguration equ * ; configuration variables.
|
|||
|
bootMethod ds.w 1 ; boot input method ID number.
|
|||
|
searchEject ds.b 1 ; st => eject diskette while looking.
|
|||
|
useMicroFont ds.b 1 ; st => draw missing chars w/hex code.
|
|||
|
newCharLoc ds.b 1 ; st => sequential placement of new.
|
|||
|
fastEntry ds.b 1 ; st => fast entry of FIS is default.
|
|||
|
|
|||
|
;<7/20/88drs> added commonFont flag and cache flags, reduced reserved by 2
|
|||
|
|
|||
|
commonFont ds.b 1 ; st => map small FIS to common font
|
|||
|
cacheOn ds.b 1 ; st => FIS cache is on
|
|||
|
cacheSize ds.b 2 ; size of FIS cache in KBytes
|
|||
|
|
|||
|
FractFlag ds.b 1 ; Fract enable on switch
|
|||
|
PSGaijiFlag ds.b 1 ; PostScript UserDefine character on
|
|||
|
UnderLineFlag ds.b 1 ; UnderLine on
|
|||
|
StyleTextFlag ds.b 1 ; StyleText checkbox.
|
|||
|
|
|||
|
ds.l 2 ; Array [1..2] Of LongInt;
|
|||
|
|
|||
|
cachePtr ds.l 1 ; global cache pointer to system heap
|
|||
|
|
|||
|
inJust ds.b 1 ; st -> Doing DrawJust call.
|
|||
|
hasLaunch ds.b 1 ; st -> if launch has been called before.
|
|||
|
|
|||
|
fSavedInputMethodZone ds.l 1 ; current zone saved across IntfDispatch calls
|
|||
|
ds.b 1 ; reserved - don't use
|
|||
|
ds.b 1 ; reserved - don't use
|
|||
|
SFOpenTrp ds.l 1 ; SingleFinder Trap Address
|
|||
|
fMultiFinderOpenTrap ds.l 1
|
|||
|
|
|||
|
origHFSDispatch ds.l 1 ; saved HFSDispatch Trap aaddress
|
|||
|
|
|||
|
imGrafGlobals ds.l 1 ; input method saved current GrafGlobals.
|
|||
|
|
|||
|
;<7/20/88drs> repaired screwed up reserved length
|
|||
|
|
|||
|
ds.l 5 ; reserved.
|
|||
|
|
|||
|
;<3> Added storage fields for the scriptFileName and scriptName core globals
|
|||
|
|
|||
|
scriptFileNameStorage ds.b 32
|
|||
|
scriptNameStorage ds.b 32
|
|||
|
|
|||
|
fNewScriptGlobals ds.b NewScriptSystemGlobals.kNewScriptSystemGlobalsSize
|
|||
|
kScriptSystemGlobalsSize equ * ; size of script globals.
|
|||
|
|
|||
|
EndR
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Record for the table of user interface routines.
|
|||
|
; Note that the intfID field must come first (required by GetIDEntry call)
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
intfRecord Record 0 ;
|
|||
|
intfID ds.w 1 ; user interface ID number.
|
|||
|
intfEntry ds.l 1 ; user interface routine pointer.
|
|||
|
intfA5 ds.l 1 ; user interface globals.
|
|||
|
intfFlags ds.w 1 ; interface flags.
|
|||
|
ds.l 2 ; reserved.
|
|||
|
intfName ds.b 64 ; interface name string.
|
|||
|
intfFile ds.b 64 ; name of interface file.
|
|||
|
intfVol ds.w 1 ; volume for interface file.
|
|||
|
intfSize equ * ; Record size.
|
|||
|
EndR ;
|
|||
|
|
|||
|
intfFReady equ 15 ; ready flag.
|
|||
|
intfFActive equ 14 ; active flag.
|
|||
|
;------------------------------------------------------------------------------
|
|||
|
; Selectors for Activating and Deactivating old input methods
|
|||
|
;------------------------------------------------------------------------------
|
|||
|
selActivate equ $00060006 ; activate event.
|
|||
|
selDeactivate equ $00060008 ; deactivate event.
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Utility routine errors.
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
euError equ $0400 ; utility errors. (id=1024)
|
|||
|
|
|||
|
euNoErr equ 0 ; No error.
|
|||
|
euBadCode equ euError+1 ; Bad value passed for JIS-SJIS-index.
|
|||
|
euBadIndex equ euBadCode+1 ; Index out of range.
|
|||
|
euBadID equ euBadIndex+1 ; ID not found in table.
|
|||
|
euMemory equ euBadID+1 ; memory manager error.
|
|||
|
euExtJIS equ euMemory+1 ; JIS code in extended range.
|
|||
|
euBadOffset equ euExtJIS+1 ; bad offset passed to routine.
|
|||
|
euHighOffset equ euBadOffset+1 ; no char info; offset => high byte.
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Secret verb which is used for checking on input method type. <2>
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
kUsingOldInputMethodVerb equ -1000
|
|||
|
|
|||
|
; ----------------------------------------------------------------------------- <58>
|
|||
|
; Routine IntfActivate(volRef: Integer; fileName: Str255);
|
|||
|
; Input sp.w Refnum of current system folder volume.
|
|||
|
; sp.l Ptr to name of input method file.
|
|||
|
; Output
|
|||
|
; Function Tell the user interface to allocate any heap storage it might
|
|||
|
; need and/or read in resources from its file. After this call
|
|||
|
; the input method must be ready to accept all interface calls
|
|||
|
; to it; this implies it's ready to handle conversion.
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
Macro
|
|||
|
IntfActivate
|
|||
|
With ScriptSystemGlobals,SMgrRecord
|
|||
|
|
|||
|
move.l #selActivate,-(sp)
|
|||
|
GetSmgrCore a0 ; load script manager core.
|
|||
|
move.l smgrEntry+(smJapanese*4)(a0),a0 ; load doubleTalkRecord for Japanese.
|
|||
|
move.l intfVector(a0),a0
|
|||
|
jsr (a0)
|
|||
|
|
|||
|
EndWith
|
|||
|
endMacro
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Routine IntfDeactivate(volRef: Integer; fileName: Str255);
|
|||
|
; Input sp.w Refnum of system folder volume that was passed at
|
|||
|
; activate time.
|
|||
|
; sp.l Ptr to name of input method file.
|
|||
|
; Output
|
|||
|
; Function Tell the user interface to free any heap storage it might have
|
|||
|
; and/or release any resources that came from its file. After
|
|||
|
; this call the input method should not receive any calls except
|
|||
|
; for ShutDown, Ready and Activate.
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
Macro
|
|||
|
IntfDeactivate
|
|||
|
With ScriptSystemGlobals,SMgrRecord
|
|||
|
move.l #selDeactivate,-(sp)
|
|||
|
GetSmgrCore a0 ; load script manager core.
|
|||
|
move.l smgrEntry+(smJapanese*4)(a0),a0 ; load doubleTalkRecord for Japanese.
|
|||
|
move.l intfVector(a0),a0
|
|||
|
jsr (a0)
|
|||
|
|
|||
|
EndWith
|
|||
|
endMacro
|
|||
|
|
|||
|
; ----------------------------------------------------------------------------- <58>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Record for each entry in new-format itl handle cache. <18>
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
NewItlCacheRec record 0
|
|||
|
script ds.w 1 ; script code for this entry
|
|||
|
itl2Id ds.w 1 ; ID of itl2 whose handle is cached
|
|||
|
itl2Handle ds.l 1 ; itl2 handle
|
|||
|
itl4Id ds.w 1 ; ID of itl4 whose handle is cached
|
|||
|
itl4Handle ds.l 1 ; itl4 handle
|
|||
|
newItlCacheRecSize equ * ; size of record
|
|||
|
endr
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Record for application-specific ScriptMgr globals. <31>
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
SMgrAppRecord record 0
|
|||
|
; space used by one-byte extension <62>
|
|||
|
fSavedPort ds.l 1 ; GrafPtr, for saved port
|
|||
|
fKashidaSlop ds.l 1 ; Fixed, kashida slop passed from drawjust/piccomment
|
|||
|
fScaleFactor ds.l 1 ; long, for kashida scaling
|
|||
|
fGeneralFlags ds.l 1 ; long
|
|||
|
ds.l 4 ; reserved
|
|||
|
; space for other things
|
|||
|
smgrAppDisableKybds ds.b 1 ; T=>disable keybds not in Sys/Roman script/1=>disable all kbds <63>
|
|||
|
ds.b 3 ; reserved
|
|||
|
ds.l 3 ; reserved
|
|||
|
smgrAppRsvdSize equ * ; size excluding cache part
|
|||
|
; itl2/itl4 handle cache
|
|||
|
smgrAppCacheCount ds.w 1 ; number of records in cache (# of enabled scripts)
|
|||
|
smgrAppCacheStart equ * ; cache: one or more records of type NewItlCacheRec
|
|||
|
endr
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; Record for 'itlm' resource header. <18><29>
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
ItlmHeaderRec record 0
|
|||
|
version ds.w 1 ; resource version number
|
|||
|
format ds.w 1 ; format code
|
|||
|
numTables ds.w 1 ; number of tables
|
|||
|
scriptDataOffset ds.l 1 ; offset from beginning to scriptData table
|
|||
|
scriptDataLength ds.l 1 ; length of scriptData table
|
|||
|
langDataOffset ds.l 1 ; offset from beginning to langData table
|
|||
|
langDataLength ds.l 1 ; length of langData table
|
|||
|
regionDataOffset ds.l 1 ; offset from beginning to regionData table
|
|||
|
regionDataLength ds.l 1 ; length of regionData table
|
|||
|
endr
|
|||
|
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
; The following were commented out in 6.0.3 version; where else are they defined?
|
|||
|
; -----------------------------------------------------------------------------
|
|||
|
|
|||
|
; private equates for ADB
|
|||
|
keyCacheMin equ 2048 ; minimum size for key Cache
|
|||
|
keyCacheSlop equ 512 ; extra room over and above KCHR 0 size
|
|||
|
kybdADBAddr equ 2 ; universal keyboard
|
|||
|
dbDataAreaAddr equ 6 ; data area in keyboard
|
|||
|
|
|||
|
KybdDriverData record 0
|
|||
|
KMAPPtr ds.l 1 ; pointer to KMAP
|
|||
|
KeyBits ds.b 128/8 ; 128 bits correspond to keyboard map
|
|||
|
KCHRPtr ds.l 1 ; pointer to KCHR
|
|||
|
DeadKey ds.l 1 ; dead key state - long! <3.5>
|
|||
|
endR
|
|||
|
|
|||
|
;******
|
|||
|
|
|||
|
ENDIF ; ...already included
|