mac-rom/Libs/CommToolboxSrcs/TerminalMgrExtensionsGlue.a
Elliot Nunn 4325cdcc78 Bring in CubeE sources
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.

The Tools directory, containing mostly junk, is also excluded.
2017-12-26 09:52:23 +08:00

63 lines
1.7 KiB
Plaintext

;
; File: TerminalMgrExtensionsGlue.a
;
; Contains: Glue for Terminal Manager Extensions
;
; Written by: Byron Han
;
; Copyright: © 1990-1991 by Apple Computer, Inc., all rights reserved.
;
; This file is used in these builds: BigBang
;
; Change History (most recent first):
;
; <6> 7/10/91 BH remove FakeXXXX garbage to avoid duplicate wierd symbols in
; object file - now use Lib in SysObj.make
; <5> 7/1/91 BH fix glue for TMGetErrorString to correct bug in
; CommToolboxCore.c; we always set the errMsg parameter to empty
; string
; <4> 7/1/91 BH oops - fucked up call to _Gestalt by passing parameters on stack
; instead in registers. Discovered that reading the documentation
; really helps as _Gestalt is a register based trap.
; <3> 2/15/91 BH jng,#83195:add an even number of bytes to the stack at
; completion
; <2> 1/14/91 CP Use Gestalt for checking if TMGetErrorString in implemented.
; <BBH>
; <1> 3/14/90 BBH first checked in
;
; To Do:
;
INCLUDE 'Traps.a'
INCLUDE 'CommToolboxPriv.a'
INCLUDE 'GestaltEqu.a'
INCLUDE 'GestaltPrivateEqu.a'
; PROCEDURE TMGetErrorString(hTerm: TermHandle; id: INTEGER; VAR errMsg: Str255);
; Major Selector -> $03;
; Minor Selector -> $35;
;
TMGetErrorString PROC EXPORT
IMPORT __TMGetErrorString
MOVE.L 4(SP),A0 ; to correct for bug in CommToolboxCore.c
CLR.B (A0) ; set errMsg to empty string
MOVE.L #gestaltTermMgrAttr,D0
_Gestalt
BEQ.S @gestaltOK
@useGlueCode
BRA __TMGetErrorString
@gestaltOK
MOVE.L A0,D0 ; get selector return value
BTST.L #gestaltTermMgrErrorString,D0 ; test
BEQ.S @useGlueCode
_CTBTrap #$0335
EndCTBTrap #$C
ENDPROC
END