source: FOIAVistA/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XTKERMIT.m@ 1354

Last change on this file since 1354 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1XTKERMIT ;SF-ISC/RWF - Kermit protocol controler ;9/14/94 08:38
2 ;;7.3;TOOLKIT;;Apr 25, 1995
3 ;To call from outside on KERMIT
4 ;set XTKDIC = fileman type global root, DWLC = last current data node
5 ;Return DWLC = last data node, XTKDIC is killed.
6 ;For Send: XTKFILE = The file name for target.
7 ;Optional
8 ;set XTKMODE = 0 to send/receive in Image mode (no conversion)
9 ; 1 to send/receive in DATA mode (just convert control char.).
10 ; 2 to send/receive as TEXT (Mac) (FM word-processing).
11 ; 3 to send/receive as TEXT (PC).
12 ;Text mode sends a CR after each global node
13 ; make a new global node for each CR received.
14S ;MENU ENTRY POINT ONLY.
15 D SFILE^XTKERM4,SEND K DWLC,XTKDIC,XTKMODE Q
16SEND ;Send data from host.
17 D INIT^XTKERM4 G ABORT:XTKERR D READY^XTKERM4,^XTKERM1,DONE
18 Q
19R ;MENU ENTRY POINT ONLY.
20 D RFILE^XTKERM4,RECEIVE K DWLC,XTKDIC,XTKMODE Q
21RECEIVE ;Load a file into the host.
22 D INIT^XTKERM4 G ABORT:XTKERR D READY^XTKERM4,^XTKERM2,DONE
23 Q
24 ;Close up shop
25ABORT W !!,$C(7),$S($L(XTKERR)>1:XTKERR,1:"Aborting File Transfer!")
26DONE D RESTORE^XTKERM4 S Y=$S(XTKERR:-1,1:1) Q
27 ;Modes 0 = Image or binary, 1 = Data, 2 = Text
28MODE U IO(0) S DIR(0)="8980,3",DIR("B")=$S('$D(XTKMODE):"TEXT",1:$P("IMAGE^DATA^TEXT (Mac)^TEXT (PC)",U,XTKMODE+1)) D ^DIR K DIR Q:$D(DIRUT) S XTKMODE=+Y
29 U IO
30 Q
31SR S DIR(0)="S^S:SEND;R:RECEIVE",DIR("A")="Send from the Host, Receive to the Host"
32 D ^DIR K DIR
33 Q
34CLEAN K XTKERR,XTMODE,XTKDIC Q
35TEST K ^TMP("XTKERM",$J),XTKDIC S XTKDEBUG=0 D SR Q:$D(DIRUT) D @Y
36 Q
37KERM ;Entry from Mailman Talkman
38 U IO(0) K ^TMP("XTKERM",$J),XTKDIC D SR Q:$D(DIRUT) U IO D @Y
Note: See TracBrowser for help on using the repository browser.