home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
tandem
/
tandem.dif
< prev
next >
Wrap
Text File
|
1997-11-12
|
9KB
|
341 lines
*** tandem.tal Tue Aug 16 22:04:44 1988
--- tandem.src Thu Nov 13 15:49:52 1997
***************
*** 1,4 ****
--- 1,5 ----
?NOCODE
+ ?symbols
?INSPECT
DEFINE VERSTRING = "Tandem KERMIT server - Version 1.0"#;
!*****************************************************************************!
***************
*** 184,190 ****
STRING EIGHT^BIT;
STRING CHECK^TYPE;
STRING REPEAT^CHAR;
! STRING RESERVED[0:1];
END;
DEFINE CHAR(X) = ((X) + " ")#,
--- 185,192 ----
STRING EIGHT^BIT;
STRING CHECK^TYPE;
STRING REPEAT^CHAR;
! !STRING RESERVED[0:1];
! STRING RESERVED[0:3];
END;
DEFINE CHAR(X) = ((X) + " ")#,
***************
*** 236,242 ****
CTL(0), !PAD CHARACTER!
CHAR(CR), !END OF LINE CHARACTER!
"#", !CONTROL QUOTE!
! "N", !8 BIT QUOTE!
"1", !CHKSUM TYPE!
"~", !REPEAT QUOTER!
" "]; !RESERVED!
--- 238,245 ----
CTL(0), !PAD CHARACTER!
CHAR(CR), !END OF LINE CHARACTER!
"#", !CONTROL QUOTE!
! !"N", !!8 BIT QUOTE!
! "Y", !8 BIT QUOTE!
"1", !CHKSUM TYPE!
"~", !REPEAT QUOTER!
" "]; !RESERVED!
***************
*** 444,449 ****
--- 447,455 ----
IF ERROR = 0 THEN
BEGIN
FILE^OPEN^FLAG := TRUE;
+
+ ! 4/3/95 - do not trim for binary files
+ CALL SET^FILE(FILE^FCB,SET^READ^TRIM,0);
RETURN TRUE;
END;
CALL ERROR^PACKET(ERROR);
***************
*** 461,472 ****
--- 467,483 ----
ELSE FLAGS := FLAGS + MUSTBENEW;
CALL SET^FILE(FILE^FCB,ASSIGN^OPENACCESS, WRITE^ACCESS);
+ CALL SET^FILE(FILE^FCB,ASSIGN^FILECODE,0);
ERROR := OPEN^FILE(COMMON^FCB,FILE^FCB,FILE^BUF,OUT^BLKLEN,
FLAGS,
ABORT^OPENERR+ABORT^XFERERR+AUTO^CREATE+PURGE^DATA+MUSTBENEW);
IF ERROR = 0 THEN
BEGIN
FILE^OPEN^FLAG := TRUE;
+ CALL SET^FILE(FILE^FCB,SET^WRITE^PAD,0);
+
+ ! 4/3/95 - do not trim for binary files
+ CALL SET^FILE(FILE^FCB,SET^WRITE^TRIM,0);
RETURN TRUE;
END;
CALL ERROR^PACKET(ERROR);
***************
*** 774,780 ****
IF HIS^PARAMS.EIGHT^BIT <> "Y" THEN
BEGIN
OUT^PARAMS.EIGHT^BIT := "Y";
! OUT^PARAMS.EIGHT^BIT := "N"; !REMOVE IF YOUR KERMIT WORKS!
END
ELSE
BEGIN
--- 785,791 ----
IF HIS^PARAMS.EIGHT^BIT <> "Y" THEN
BEGIN
OUT^PARAMS.EIGHT^BIT := "Y";
! !OUT^PARAMS.EIGHT^BIT := "N"; !!REMOVE IF YOUR KERMIT WORKS!
END
ELSE
BEGIN
***************
*** 787,793 ****
IF HIS^PARAMS.BUFSIZ <> " " THEN
MAX^DATA^CHARS := UNCHAR(HIS^PARAMS.BUFSIZ) - 3;
! LENGTH := $LEN(PARAMS) + 5;
OUT^PACKET[1] := CHAR(LENGTH - 2);
OUT^PACKET^LENGTH := CHECKSUMMER(OUT^PACKET,LENGTH);
RETURN;
--- 798,823 ----
IF HIS^PARAMS.BUFSIZ <> " " THEN
MAX^DATA^CHARS := UNCHAR(HIS^PARAMS.BUFSIZ) - 3;
! ! 12/16/94 - trun off 'a' packet capability
! ! didn't seem to have any qffect on procomm - still got a packet
! ! accept 'A' packets
! !OUT^PARAMS.RESERVED[0] := %h28 ;
!
! ! no capabilities
! OUT^PARAMS.RESERVED[0] := %h20 ;
!
! ! sliding windows size
! OUT^PARAMS.RESERVED[1] := %h20 ;
!
! ! extended packet size
! OUT^PARAMS.RESERVED[2] := %h20 ;
! OUT^PARAMS.RESERVED[3] := %h20 ;
!
! !LENGTH := $LEN(PARAMS) + 5;
! !LENGTH := $LEN(PARAMS) + 4;
!
! ! try 1 byte capabilities mask only
! LENGTH := $LEN(PARAMS) + 5 - 3 ;
OUT^PACKET[1] := CHAR(LENGTH - 2);
OUT^PACKET^LENGTH := CHECKSUMMER(OUT^PACKET,LENGTH);
RETURN;
***************
*** 798,804 ****
NOT^IMPL^D;
RETURN;
END;
! PROC GENERIC^PROC;
BEGIN
IF IN^BUF^S = "L" THEN
BEGIN
--- 828,834 ----
NOT^IMPL^D;
RETURN;
END;
! INT PROC GENERIC^PROC;
BEGIN
IF IN^BUF^S = "L" THEN
BEGIN
***************
*** 807,814 ****
CALL GET^PACKET;
CALL GIVE^IT^UP(TRUE);
END;
NOT^IMPL^D;
! RETURN;
END;
?PAGE "PROC RECEIVE PROC"
INT PROC RECEIVE^PROC;
--- 837,851 ----
CALL GET^PACKET;
CALL GIVE^IT^UP(TRUE);
END;
+
+ ! swallow change directory command
+ IF IN^BUF^S = "C" THEN
+ BEGIN
+ CALL FORMAT^ACK;
+ RETURN -1;
+ END;
NOT^IMPL^D;
! RETURN 0;
END;
?PAGE "PROC RECEIVE PROC"
INT PROC RECEIVE^PROC;
***************
*** 939,966 ****
CALL GET^NEXT^CHAR;
! IF CHRSAV = LF AND LF^WAIT THEN
! BEGIN
! LF^WAIT := FALSE;
! REPEAT^COUNT := REPEAT^COUNT - 1;
! WRITE^IT^OUT := TRUE;
! END;
! IF LF^WAIT AND CHRSAV <> LF THEN
! BEGIN
! SBUF[OUT^COUNT] := CR;
! OUT^COUNT := OUT^COUNT + 1;
! LF^WAIT := FALSE;
! END;
! IF CHRSAV = CR THEN
! BEGIN
! REPEAT^COUNT := REPEAT^COUNT - 1;
! LF^WAIT := TRUE;
! END;
! IF CHRSAV = TAB AND TABS^FLAG THEN
! BEGIN
! REPEAT^COUNT := 8 * REPEAT^COUNT - (OUT^COUNT LAND 7);
! CHRSAV := " ";
! END;
END; !NEW CHARACTER, REPEAT COUNT = 0!
END; !LOOP!
--- 976,1004 ----
CALL GET^NEXT^CHAR;
! ! 12/15/94 - only for text files
! ! IF CHRSAV = LF AND LF^WAIT THEN
! ! BEGIN
! ! LF^WAIT := FALSE;
! ! REPEAT^COUNT := REPEAT^COUNT - 1;
! ! WRITE^IT^OUT := TRUE;
! ! END;
! ! IF LF^WAIT AND CHRSAV <> LF THEN
! ! BEGIN
! ! SBUF[OUT^COUNT] := CR;
! ! OUT^COUNT := OUT^COUNT + 1;
! ! LF^WAIT := FALSE;
! ! END;
! ! IF CHRSAV = CR THEN
! ! BEGIN
! ! REPEAT^COUNT := REPEAT^COUNT - 1;
! ! LF^WAIT := TRUE;
! ! END;
! ! IF CHRSAV = TAB AND TABS^FLAG THEN
! ! BEGIN
! ! REPEAT^COUNT := 8 * REPEAT^COUNT - (OUT^COUNT LAND 7);
! ! CHRSAV := " ";
! ! END;
END; !NEW CHARACTER, REPEAT COUNT = 0!
END; !LOOP!
***************
*** 970,976 ****
SUBPROC RECEIVE^FILE^HEADER;
BEGIN
! LEGAL^PACKETS^D("SZBF");
WHILE 1 DO
BEGIN
CHECK^LEGAL^D;
--- 1008,1015 ----
SUBPROC RECEIVE^FILE^HEADER;
BEGIN
! ! LEGAL^PACKETS^D("SZBF");
! LEGAL^PACKETS^D("SZBFA");
WHILE 1 DO
BEGIN
CHECK^LEGAL^D;
***************
*** 995,1000 ****
--- 1034,1044 ----
RETURN;
END;
+ !4! BEGIN !FILE ATTRIBUTES|
+ CALL FORMAT^ACK;
+ CALL GET^PACKET;
+ END;
+
OTHERWISE BAD^PACKET^D;
END; !CASE!
***************
*** 1004,1010 ****
SUBPROC RECEIVE^DATA;
BEGIN
! LEGAL^PACKETS^D("FZD");
WHILE 1 DO
BEGIN
CHECK^LEGAL^D;
--- 1048,1054 ----
SUBPROC RECEIVE^DATA;
BEGIN
! LEGAL^PACKETS^D("FZDA");
WHILE 1 DO
BEGIN
CHECK^LEGAL^D;
***************
*** 1033,1038 ****
--- 1077,1087 ----
RETURN;
END;
+ !3! BEGIN !FILE ATTRIBUTES!
+ CALL FORMAT^ACK;
+ CALL GET^PACKET;
+ END;
+
OTHERWISE BAD^PACKET^D;
END; !CASE!
***************
*** 1292,1299 ****
IF ERROR = 0 THEN @IN^POINTER := @IN^BUF^S;
OUT^OF^INPUT := FALSE;
! SBUF[COUNT^READ] ':=' [CR,LF];
! COUNT^READ := COUNT^READ + 2;
IN^COUNT := 0;
END;
--- 1341,1349 ----
IF ERROR = 0 THEN @IN^POINTER := @IN^BUF^S;
OUT^OF^INPUT := FALSE;
! ! only for text files
! !SBUF[COUNT^READ] ':=' [CR,LF];
! !COUNT^READ := COUNT^READ + 2;
IN^COUNT := 0;
END;
***************
*** 1346,1352 ****
DONT^NAK := TRUE;
END;
!R! CALL SEND^PROC;
! !G! CALL GENERIC^PROC;
!C! CALL COMMAND^PROC;
!NAK! ;
!ACK! ;
--- 1396,1402 ----
DONT^NAK := TRUE;
END;
!R! CALL SEND^PROC;
! !G! DONT^NAK := GENERIC^PROC;
!C! CALL COMMAND^PROC;
!NAK! ;
!ACK! ;
***************
*** 1357,1359 ****
--- 1407,1410 ----
CLOSE^FILE^D(FILE^FCB);
END; !FOREVER LOOP!
END;!MAIN!