mac-rom/Libs/CommToolboxSrcs/FileXferMgrExtensionsGlue.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

107 lines
2.9 KiB
Plaintext

;
; File: FileTransferMgrExtensionsGlue.a
;
; Contains: Glue to the FileTransferMgr extensions
;
; Written by: Byron Han
;
; Copyright: © 1990 by Apple Computer, Inc., all rights reserved.
;
; This file is used in these builds: BigBang
;
; Change History (most recent first):
;
; <7> 7/10/91 BH remove FakeXXXX garbage to avoid duplicate wierd symbols in
; object file - now use Lib in SysObj.make
; <6> 7/2/91 BH use proper selector for FTReceive (was pushing same selector as
; FTSend) in case where the file transfer manager code for FTSend
; and FTReceive was installed in the system and the gestalt
; selector was turned on
; <5> 7/1/91 BH fix calls to _Gestalt - it is register, not stack, based. also
; added fix to FTGetErrorString to correct bug in
; CommToolboxCore.c to automatically set errMsg to empty string
; <4> 6/26/91 BH added FTSend and FTReceive
; <3> 2/15/91 BH jng,#83194:add an even number of bytes to the stack at
; completion
; <2> 1/14/91 CP Use Gestalt for checking if FTGetErrorString is implemented.
; <BBH>
; <1> 3/14/90 BBH first checked in (renamed from FileTransferMgrExtensionsGlue.a
; which was too long)
;
; To Do:
;
INCLUDE 'Traps.a'
INCLUDE 'CommToolboxPriv.a'
INCLUDE 'GestaltEqu.a'
INCLUDE 'GestaltPrivateEqu.a'
; PROCEDURE FTGetErrorString(hTerm: TermHandle; id: INTEGER; VAR errMsg: Str255);
; Major Selector -> $02;
; Minor Selector -> $23;
;
FTGetErrorString PROC EXPORT
IMPORT __FTGetErrorString
MOVE.L 4(SP),A0 ; to correct for bug in CommToolboxCore.c
CLR.B (A0) ; set errMsg to empty string
MOVE.L #gestaltFXfrMgrAttr,D0
_Gestalt
BEQ.S @gestaltOK
@useGlueCode
BRA __FTGetErrorString
@gestaltOK
MOVE.L A0,D0 ; get selector return value
BTST.L #gestaltFXfrMgrErrorString,D0 ; test
BEQ.S @useGlueCode
_CTBTrap #$0223
EndCTBTrap #$C
ENDPROC
; pascal FTErr __FTSend(FTHandle hFT, short numFiles, FSpecPtr pFSpec,
; FileTransferNotificationProc notifyProc)
; Major Selector -> $02;
; Minor Selector -> $24;
;
FTSend FUNC EXPORT
IMPORT __FTSend
MOVE.L #gestaltFXfrMgrAttr,D0
_Gestalt
BEQ.S @gestaltOK
@useGlueCode
BRA __FTSend
@gestaltOK
MOVE.L A0,D0 ; get selector return value
BTST.L #gestaltFXfrMgrMultiFile,D0 ; test
BEQ.S @useGlueCode
_CTBTrap #$0224
EndCTBTrap #$10,W
ENDFUNC
; pascal FTErr __FTReceive(FTHandle hFT, FSpecPtr pFSpec,
; FileTransferNotificationProc notifyProc)
; Major Selector -> $02;
; Minor Selector -> $25;
;
FTReceive FUNC EXPORT
IMPORT __FTReceive
MOVE.L #gestaltFXfrMgrAttr,D0
_Gestalt
BEQ.S @gestaltOK
@useGlueCode
BRA __FTReceive
@gestaltOK
MOVE.L A0,D0 ; get selector return value
BTST.L #gestaltFXfrMgrMultiFile,D0 ; test
BEQ.S @useGlueCode
_CTBTrap #$0225
EndCTBTrap #$E,W
ENDFUNC
END