mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2025-01-03 09:31:04 +00:00
4325cdcc78
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.
443 lines
10 KiB
Plaintext
443 lines
10 KiB
Plaintext
;
|
|
; File: FileTransferMgrGlue.a
|
|
;
|
|
; Contains: xxx put contents here xxx
|
|
;
|
|
; Written by: xxx put writers here xxx
|
|
;
|
|
; Copyright: © 1990 by Apple Computer, Inc., all rights reserved.
|
|
;
|
|
; Change History (most recent first):
|
|
;
|
|
; <1> 3/14/90 BBH first checked in
|
|
;
|
|
; To Do:
|
|
;
|
|
|
|
; ~@~Projector~@~ Copyright © 1987, 1988, 1989 Apple Computer, Inc. All rights reserved.
|
|
; ~@~Projector~@~ File: ftgrglue.a,26+ (3/27/89 9:41:39 AM)
|
|
; File : FTGRGlue.a
|
|
;--------------------------------
|
|
;
|
|
; Glue for File Transfer Manager
|
|
;
|
|
; Written by Carol Lee June 1988,1989
|
|
;
|
|
; (c) 1988 by Apple Computer, Inc. All rights reserved.
|
|
;
|
|
;
|
|
; MODIFICATION HISTORY :
|
|
;
|
|
; 4/7/89 JNG Changed FTGetName to FTGetToolName
|
|
; 4/11/89 JNG Changed FTGetRefCon, FTSetRefCon, FTGetUserData, FTSetUserData,
|
|
; FTGetVersion to trap into the CTBCore version of the call.
|
|
; 4/12/89 JNG Changed FTGetToolName to trap into CTBCore
|
|
; 4/17/89 JNG Changed FTValidate and FTDefault to trap into CTBCore
|
|
; 4/20/89 BBH Changed FTSetupXXXXX into core
|
|
; Changed FTGetProcID, FTSetConfig, FTGetConfig, FTValidate into core
|
|
; Changed FTDefault into core
|
|
; FTGetVersion now passes mgrsel into core
|
|
; Ooops - SetConfig was passing wrong selector (passed one for getconfig)
|
|
; 4/24/89 JNG Moved FTResume FTEvent FTMenu FTAbort to ctbcore
|
|
; 4/24/89 BBH Modified FTNew and file transfer record to add environsProc
|
|
; 4/25/89 BBH Fix FTNew glue. screwed up # local storage
|
|
; 4/28/89 BBH Added FTActivate glue
|
|
; Changed FTNew to add theFlags
|
|
; 5/31/89 JNG New Glue/Entry scheme.
|
|
; 6/2/89 JNG Finished Glue
|
|
; 6/26/89 BBH Added FTPChoose routine
|
|
;
|
|
;1 BRA @InitFT
|
|
;2 BRA @FTSetRefCon
|
|
;3 BRA @FTGetRefCon
|
|
;4 BRA @FTSetUserData
|
|
;5 BRA @FTGetUserData
|
|
;6 BRA @FTGetToolName
|
|
;7 BRA @FTGetProcID
|
|
;8 BRA @FTNew
|
|
;9 BRA @FTDispose
|
|
;A BRA @FTExec
|
|
;B BRA @FTStart
|
|
;C BRA @FTCleanup
|
|
;D BRA @FTAbort
|
|
;E BRA @FTResume
|
|
;F BRA @FTValidate
|
|
;10 BRA @FTDefault
|
|
;11 BRA @FTSetupPreflight
|
|
;12 BRA @FTSetupSetup
|
|
;13 BRA @FTSetupFilter
|
|
;14 BRA @FTSetupItem
|
|
;15 BRA @FTSetupCleanup
|
|
;16 BRA @FTGetConfig
|
|
;17 BRA @FTSetConfig
|
|
;18 BRA @FTIntlToEnglish
|
|
;19 BRA @FTEnglishToIntl
|
|
;1A BRA @FTGetVersion
|
|
;1B BRA @FTGetFTVersion
|
|
;1C BRA @FTChoose
|
|
;1D BRA @FTEvent
|
|
;1E BRA @FTSetupPostflight
|
|
;1F BRA @FTMenu
|
|
;20 BRA @FTActivate
|
|
;21 BRA @FTPChoose
|
|
;22 BRA @FTSetupXCleanup
|
|
|
|
|
|
INCLUDE 'Traps.a'
|
|
INCLUDE 'CommToolboxPriv.a'
|
|
|
|
; FUNCTION InitFT: FTErr
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 1;
|
|
;
|
|
InitFT FUNC EXPORT
|
|
_CTBTrap #$201 ; major selector = 2, minor selector = 1
|
|
EndCTBTrap #$2,W
|
|
ENDFUNC
|
|
|
|
|
|
; PROCEDURE FTSetRefCon(hFT : FTHandle; rC : LONGINT);
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 2;
|
|
;
|
|
FTSetRefCon PROC EXPORT
|
|
_CTBTrap #$202
|
|
EndCTBTrap #$A
|
|
ENDPROC
|
|
|
|
|
|
; FUNCTION FTGetRefCon(hFT : FTHandle) : LONGINT;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 3;
|
|
;
|
|
FTGetRefCon FUNC EXPORT
|
|
_CTBTrap #$203
|
|
EndCTBTrap #$6,L
|
|
ENDFUNC
|
|
|
|
|
|
; PROCEDURE FTSetUserData(hFT : FTHandle; uD : LONGINT);
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 4;
|
|
;
|
|
FTSetUserData PROC EXPORT
|
|
_CTBTrap #$204
|
|
EndCTBTrap #$A
|
|
ENDPROC
|
|
|
|
|
|
; FUNCTION FTGetUserData(hFT : FTHandle) : LONGINT;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 5;
|
|
;
|
|
FTGetUserData FUNC EXPORT
|
|
_CTBTrap #$205
|
|
EndCTBTrap #$6,L
|
|
ENDFUNC
|
|
|
|
|
|
; PROCEDURE FTGetToolName(procID : INTEGER; VAR name : STR255);
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 6;
|
|
;
|
|
FTGetToolName PROC EXPORT
|
|
_CTBTrap #$206
|
|
EndCTBTrap #$8
|
|
ENDPROC
|
|
|
|
|
|
; FUNCTION FTGetProcID(name : STR255) : INTEGER;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 7;
|
|
;
|
|
FTGetProcID FUNC EXPORT
|
|
_CTBTrap #$207
|
|
EndCTBTrap #$6,W
|
|
ENDFUNC
|
|
|
|
|
|
; FUNCTION FTNew(ProcID : INTEGER; theFlags: LONGINT;
|
|
; theSendProc : ProcPtr; theRecvProc : ProcPtr;
|
|
; theReadProc : ProcPtr; theWriteProc : ProcPtr; theEnvironsProc: ProcPtr;
|
|
; owner : WindowPtr; theRefCon : LONGINT; theUserData : LONGINT) : FTHandle;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 8;
|
|
FTNew FUNC EXPORT
|
|
|
|
_CTBTrap #$208 ; major selector = 2, minor selector = 8
|
|
EndCTBTrap #$28,L
|
|
ENDFUNC
|
|
|
|
|
|
; PROCEDURE FTDispose(hFT : FTHandle);
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 9;
|
|
;
|
|
FTDispose PROC EXPORT
|
|
_CTBTrap #$209 ; major selector = 2, minor selector = 9
|
|
EndCTBTrap #$6
|
|
ENDPROC
|
|
|
|
|
|
; PROCEDURE FTExec(hFT : FTHandle);
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 0xA;
|
|
FTExec PROC EXPORT
|
|
_CTBTrap #$20A ; major selector = 2, minor selector = 10
|
|
EndCTBTrap #$6
|
|
ENDPROC
|
|
|
|
|
|
; FUNCTION FTStart(hFT : FTHandle,what : short, fileInfo : ReplyPtr) : FTErr;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 0xB;
|
|
;
|
|
FTStart FUNC EXPORT
|
|
_CTBTrap #$20B ; major selector = 2, minor selector = 11
|
|
EndCTBTrap #$C,W
|
|
ENDFUNC
|
|
|
|
|
|
; FUNCTION FTCleanup(hFT : FTHandle; now : BOOLEAN) : FTErr;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 0xC;
|
|
;
|
|
FTCleanup FUNC EXPORT
|
|
_CTBTrap #$20C ; major selector = 2, minor selector = 12
|
|
EndCTBTrap #$8,W
|
|
ENDFUNC
|
|
|
|
; FUNCTION FTAbort(hFT : FTHandle) : FTErr;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 0xD;
|
|
;
|
|
FTAbort FUNC EXPORT
|
|
_CTBTrap #$20D
|
|
EndCTBTrap #$6,W
|
|
ENDFUNC
|
|
|
|
; PROCEDURE FTResume(hFT : FTHandle; res : BOOLEAN);
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> E;
|
|
;
|
|
FTResume PROC EXPORT
|
|
_CTBTrap #$20E
|
|
EndCTBTrap #$8
|
|
ENDPROC
|
|
|
|
; FUNCTION FTValidate(hFT : FTHandle) : BOOLEAN;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> f;
|
|
FTValidate FUNC EXPORT
|
|
_CTBTrap #$20F
|
|
EndCTBTrap #$6,B
|
|
ENDFUNC
|
|
|
|
|
|
; PROCEDURE FTDefault(ConfPtr : Ptr; procID : INTEGER; allocate : BOOLEAN);
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 10;
|
|
;
|
|
FTDefault PROC EXPORT
|
|
_CTBTrap #$210
|
|
EndCTBTrap #$A
|
|
ENDPROC
|
|
|
|
; FUNCTION FTSetupPreflight(procID:INTEGER; VAR magicCookie:LONGINT) : Handle;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 11;
|
|
;
|
|
FTSetupPreflight FUNC EXPORT
|
|
_CTBTrap #$211
|
|
EndCTBTrap #$8,L
|
|
ENDFUNC
|
|
|
|
|
|
|
|
; PROCEDURE FTSetupSetup(procID:INTEGER; theConfig:Ptr; count:INTEGER;
|
|
; theDialog:DialogPtr; VAR magicCookie:LONGINT);
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 12;
|
|
;
|
|
FTSetupSetup FUNC EXPORT
|
|
_CTBTrap #$212
|
|
EndCTBTrap #$12
|
|
ENDFUNC
|
|
|
|
|
|
; FUNCTION FTSetupFilter(procID:INTEGER; theConfig:Ptr; count:INTEGER; theDialog:DialogPtr;
|
|
; VAR theEvent:EventRecord; VAR theItem:INTEGER; VAR magicCookie:LONGINT) : BOOLEAN;
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 13;
|
|
FTSetupFilter FUNC EXPORT
|
|
_CTBTrap #$213
|
|
EndCTBTrap #$1A,B
|
|
ENDFUNC
|
|
|
|
|
|
; PROCEDURE FTSetupItem(procID : INTEGER; theConfig : Ptr; count : INTEGER; theDialog : DialogPtr;
|
|
; VAR theItem : INTEGER; VAR magicCookie:LONGINT);
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 14;
|
|
;
|
|
FTSetupItem PROC EXPORT
|
|
_CTBTrap #$214
|
|
EndCTBTrap #$16
|
|
ENDPROC
|
|
|
|
|
|
; PROCEDURE FTSetupCleanup(procID : INTEGER; theConfig : Ptr; count : INTEGER; theDialog : DialogPtr;
|
|
; VAR magicCookie:LONGINT);
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 15;
|
|
FTSetupCleanup PROC EXPORT
|
|
_CTBTrap #$215
|
|
EndCTBTrap #$12
|
|
ENDPROC
|
|
|
|
; PROCEDURE FTSetupXCleanup(procID : INTEGER; theConfig : Ptr; count : INTEGER;
|
|
; theDialog : DialogPtr; OKed: BOOLEAN;
|
|
; VAR magicCookie:LONGINT);
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 22;
|
|
FTSetupXCleanup PROC EXPORT
|
|
_CTBTrap #$222
|
|
EndCTBTrap #$14
|
|
ENDPROC
|
|
|
|
|
|
; FUNCTION FTGetConfig(hFT : FTHandle) : Ptr;
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 16;
|
|
;
|
|
FTGetConfig FUNC EXPORT
|
|
_CTBTrap #$216
|
|
EndCTBTrap #$6,L
|
|
ENDFUNC
|
|
|
|
|
|
; FUNCTION FTSetConfig(hFT : FTHandle; thePtr : Ptr) : INTEGER;
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 17;
|
|
;
|
|
FTSetConfig FUNC EXPORT
|
|
_CTBTrap #$217
|
|
EndCTBTrap #$A,W
|
|
ENDFUNC
|
|
|
|
|
|
; FUNCTION FTIntlToEnglish(hFT : FTHandle; inputPtr : Ptr; outputPtr : Ptr;
|
|
; language : INTEGER) : INTEGER;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 18;
|
|
;
|
|
FTIntlToEnglish FUNC EXPORT
|
|
_CTBTrap #$218
|
|
EndCTBTrap #$10,W
|
|
ENDFUNC
|
|
|
|
|
|
; FUNCTION FTEnglishToIntl(hFT : FTHandle; inputPtr : Ptr; outputPtr : Ptr;
|
|
; language : INTEGER) : INTEGER;
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 19;
|
|
;
|
|
FTEnglishToIntl FUNC EXPORT
|
|
_CTBTrap #$219
|
|
EndCTBTrap #$A,W
|
|
ENDFUNC
|
|
|
|
|
|
; FUNCTION FTGetVersion( hFT : FTHandle ) : Handle;
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 1ahex;
|
|
;
|
|
FTGetVersion FUNC EXPORT
|
|
_CTBTrap #$21A
|
|
EndCTBTrap #$6,L
|
|
ENDFUNC
|
|
|
|
; FUNCTION FTGetFTVersion : INTEGER;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 1B hex;
|
|
;
|
|
FTGetFTVersion FUNC EXPORT
|
|
_CTBTrap #$21B ; major selector 2, minor 1B hex
|
|
EndCTBTrap #$2,W
|
|
ENDFUNC
|
|
|
|
|
|
|
|
; Function FTChoose( VAR hFT : FTHandle; where: Point; idleProc:ProcPtr) : INTEGER;
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 1C hex;
|
|
;
|
|
FTChoose FUNC EXPORT
|
|
_CTBTrap #$21C
|
|
EndCTBTrap #$E,W
|
|
ENDFUNC
|
|
|
|
; Function FTPChoose( VAR hFT : FTHandle; where: Point; VAR cRec: ChooseRec) : INTEGER;
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 21 hex;
|
|
;
|
|
FTPChoose FUNC EXPORT
|
|
_CTBTrap #$221
|
|
EndCTBTrap #$E,W
|
|
ENDFUNC
|
|
|
|
; PROCEDURE FTEvent(hFT : FTHandle, theEvent : EventRecord);
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 1D
|
|
;
|
|
FTEvent PROC EXPORT ; this procedure should be eliminated soon!
|
|
_CTBTrap #$21D
|
|
EndCTBTrap #$A
|
|
ENDPROC
|
|
|
|
|
|
; Procedure FTSetupPostflight( procID: INTEGER );
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 1E;
|
|
;
|
|
FTSetupPostflight PROC EXPORT
|
|
_CTBTrap #$21E
|
|
EndCTBTrap #$4
|
|
ENDPROC
|
|
|
|
|
|
; Function FTMenu( hFT : FTHandle; menuID : integer; item : integer ) : Boolean;
|
|
;
|
|
; Major Selector -> 2;
|
|
; Minor Selector -> 1F;
|
|
;
|
|
FTMenu PROC EXPORT
|
|
_CTBTrap #$21F
|
|
EndCTBTrap #$A,B
|
|
ENDPROC
|
|
|
|
; Procedure FTActivate( hFT : FTHandle; activate : Boolean );
|
|
;
|
|
; Major Selector -> 3;
|
|
; Minor Selector -> 7;
|
|
;
|
|
FTActivate PROC EXPORT
|
|
_CTBTrap #$220
|
|
EndCTBTrap #$8
|
|
ENDPROC
|
|
|
|
|
|
|
|
END |