home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / tandem / tandem.dif < prev    next >
Text File  |  1997-11-12  |  9KB  |  341 lines

  1. *** tandem.tal    Tue Aug 16 22:04:44 1988
  2. --- tandem.src    Thu Nov 13 15:49:52 1997
  3. ***************
  4. *** 1,4 ****
  5. --- 1,5 ----
  6.   ?NOCODE
  7. + ?symbols
  8.   ?INSPECT
  9.   DEFINE VERSTRING = "Tandem KERMIT server - Version 1.0"#;
  10.   !*****************************************************************************!
  11. ***************
  12. *** 184,190 ****
  13.       STRING EIGHT^BIT;
  14.       STRING CHECK^TYPE;
  15.       STRING REPEAT^CHAR;
  16. !     STRING RESERVED[0:1];
  17.       END;
  18.   
  19.   DEFINE CHAR(X) = ((X) + " ")#,
  20. --- 185,192 ----
  21.       STRING EIGHT^BIT;
  22.       STRING CHECK^TYPE;
  23.       STRING REPEAT^CHAR;
  24. !    !STRING RESERVED[0:1];
  25. !     STRING RESERVED[0:3];
  26.       END;
  27.   
  28.   DEFINE CHAR(X) = ((X) + " ")#,
  29. ***************
  30. *** 236,242 ****
  31.                                          CTL(0),   !PAD CHARACTER!
  32.                                          CHAR(CR), !END OF LINE CHARACTER!
  33.                                          "#",      !CONTROL QUOTE!
  34. !                                        "N",      !8 BIT QUOTE!
  35.                                          "1",      !CHKSUM TYPE!
  36.                                          "~",      !REPEAT QUOTER!
  37.                                          "  "];    !RESERVED!
  38. --- 238,245 ----
  39.                                          CTL(0),   !PAD CHARACTER!
  40.                                          CHAR(CR), !END OF LINE CHARACTER!
  41.                                          "#",      !CONTROL QUOTE!
  42. !                                       !"N",     !!8 BIT QUOTE!
  43. !                                        "Y",      !8 BIT QUOTE!
  44.                                          "1",      !CHKSUM TYPE!
  45.                                          "~",      !REPEAT QUOTER!
  46.                                          "    "];  !RESERVED!
  47. ***************
  48. *** 444,449 ****
  49. --- 447,455 ----
  50.   IF ERROR = 0 THEN
  51.       BEGIN
  52.       FILE^OPEN^FLAG := TRUE;
  53. +     ! 4/3/95 - do not trim for binary files
  54. +     CALL SET^FILE(FILE^FCB,SET^READ^TRIM,0);
  55.       RETURN TRUE;
  56.       END;
  57.   CALL ERROR^PACKET(ERROR);
  58. ***************
  59. *** 461,472 ****
  60. --- 467,483 ----
  61.                 ELSE FLAGS := FLAGS + MUSTBENEW;
  62.   
  63.   CALL SET^FILE(FILE^FCB,ASSIGN^OPENACCESS, WRITE^ACCESS);
  64. + CALL SET^FILE(FILE^FCB,ASSIGN^FILECODE,0);
  65.   ERROR := OPEN^FILE(COMMON^FCB,FILE^FCB,FILE^BUF,OUT^BLKLEN,
  66.            FLAGS,
  67.            ABORT^OPENERR+ABORT^XFERERR+AUTO^CREATE+PURGE^DATA+MUSTBENEW);
  68.   IF ERROR = 0 THEN
  69.       BEGIN
  70.       FILE^OPEN^FLAG := TRUE;
  71. +     CALL SET^FILE(FILE^FCB,SET^WRITE^PAD,0);
  72. +     ! 4/3/95 - do not trim for binary files
  73. +     CALL SET^FILE(FILE^FCB,SET^WRITE^TRIM,0);
  74.       RETURN TRUE;
  75.       END;
  76.   CALL ERROR^PACKET(ERROR);
  77. ***************
  78. *** 774,780 ****
  79.   IF HIS^PARAMS.EIGHT^BIT <> "Y" THEN
  80.       BEGIN
  81.       OUT^PARAMS.EIGHT^BIT := "Y";
  82. !     OUT^PARAMS.EIGHT^BIT := "N";    !REMOVE IF YOUR KERMIT WORKS!
  83.       END
  84.   ELSE
  85.       BEGIN
  86. --- 785,791 ----
  87.   IF HIS^PARAMS.EIGHT^BIT <> "Y" THEN
  88.       BEGIN
  89.       OUT^PARAMS.EIGHT^BIT := "Y";
  90. !    !OUT^PARAMS.EIGHT^BIT := "N";   !!REMOVE IF YOUR KERMIT WORKS!
  91.       END
  92.   ELSE
  93.       BEGIN
  94. ***************
  95. *** 787,793 ****
  96.   IF HIS^PARAMS.BUFSIZ <> " " THEN
  97.               MAX^DATA^CHARS := UNCHAR(HIS^PARAMS.BUFSIZ) - 3;
  98.   
  99. ! LENGTH := $LEN(PARAMS) + 5;
  100.   OUT^PACKET[1] := CHAR(LENGTH - 2);
  101.   OUT^PACKET^LENGTH := CHECKSUMMER(OUT^PACKET,LENGTH);
  102.   RETURN;
  103. --- 798,823 ----
  104.   IF HIS^PARAMS.BUFSIZ <> " " THEN
  105.               MAX^DATA^CHARS := UNCHAR(HIS^PARAMS.BUFSIZ) - 3;
  106.   
  107. ! ! 12/16/94 - trun off 'a' packet capability
  108. ! ! didn't seem to have any qffect on procomm - still got a packet
  109. ! ! accept 'A' packets
  110. ! !OUT^PARAMS.RESERVED[0] := %h28 ;
  111. ! ! no capabilities
  112. ! OUT^PARAMS.RESERVED[0] := %h20 ;
  113. ! ! sliding windows size
  114. ! OUT^PARAMS.RESERVED[1] := %h20 ;
  115. ! ! extended packet size
  116. ! OUT^PARAMS.RESERVED[2] := %h20 ;
  117. ! OUT^PARAMS.RESERVED[3] := %h20 ;
  118. ! !LENGTH := $LEN(PARAMS) + 5;
  119. ! !LENGTH := $LEN(PARAMS) + 4;
  120. ! ! try 1 byte capabilities mask only
  121. ! LENGTH := $LEN(PARAMS) + 5 - 3 ;
  122.   OUT^PACKET[1] := CHAR(LENGTH - 2);
  123.   OUT^PACKET^LENGTH := CHECKSUMMER(OUT^PACKET,LENGTH);
  124.   RETURN;
  125. ***************
  126. *** 798,804 ****
  127.   NOT^IMPL^D;
  128.   RETURN;
  129.   END;
  130. ! PROC GENERIC^PROC;
  131.   BEGIN
  132.   IF IN^BUF^S = "L" THEN
  133.       BEGIN
  134. --- 828,834 ----
  135.   NOT^IMPL^D;
  136.   RETURN;
  137.   END;
  138. ! INT PROC GENERIC^PROC;
  139.   BEGIN
  140.   IF IN^BUF^S = "L" THEN
  141.       BEGIN
  142. ***************
  143. *** 807,814 ****
  144.       CALL GET^PACKET;
  145.       CALL GIVE^IT^UP(TRUE);
  146.       END;
  147.   NOT^IMPL^D;
  148. ! RETURN;
  149.   END;
  150.   ?PAGE "PROC RECEIVE PROC"
  151.   INT PROC RECEIVE^PROC;
  152. --- 837,851 ----
  153.       CALL GET^PACKET;
  154.       CALL GIVE^IT^UP(TRUE);
  155.       END;
  156. + ! swallow change directory command
  157. + IF IN^BUF^S = "C" THEN
  158. +     BEGIN
  159. +     CALL FORMAT^ACK;
  160. +     RETURN -1;
  161. +     END;
  162.   NOT^IMPL^D;
  163. ! RETURN 0;
  164.   END;
  165.   ?PAGE "PROC RECEIVE PROC"
  166.   INT PROC RECEIVE^PROC;
  167. ***************
  168. *** 939,966 ****
  169.   
  170.           CALL GET^NEXT^CHAR;
  171.   
  172. !         IF CHRSAV = LF AND LF^WAIT THEN
  173. !             BEGIN
  174. !             LF^WAIT := FALSE;
  175. !             REPEAT^COUNT := REPEAT^COUNT - 1;
  176. !             WRITE^IT^OUT := TRUE;
  177. !             END;
  178. !         IF LF^WAIT AND CHRSAV <> LF THEN
  179. !             BEGIN
  180. !             SBUF[OUT^COUNT] := CR;
  181. !             OUT^COUNT := OUT^COUNT + 1;
  182. !             LF^WAIT := FALSE;
  183. !             END;
  184. !         IF CHRSAV = CR THEN
  185. !             BEGIN
  186. !             REPEAT^COUNT := REPEAT^COUNT - 1;
  187. !             LF^WAIT := TRUE;
  188. !             END;
  189. !         IF CHRSAV = TAB AND TABS^FLAG THEN
  190. !             BEGIN
  191. !             REPEAT^COUNT := 8 * REPEAT^COUNT - (OUT^COUNT LAND 7);
  192. !             CHRSAV := " ";
  193. !             END;
  194.           END; !NEW CHARACTER, REPEAT COUNT = 0!
  195.   
  196.       END; !LOOP!
  197. --- 976,1004 ----
  198.   
  199.           CALL GET^NEXT^CHAR;
  200.   
  201. ! ! 12/15/94 - only for text files
  202. ! !       IF CHRSAV = LF AND LF^WAIT THEN
  203. ! !           BEGIN
  204. ! !           LF^WAIT := FALSE;
  205. ! !           REPEAT^COUNT := REPEAT^COUNT - 1;
  206. ! !           WRITE^IT^OUT := TRUE;
  207. ! !           END;
  208. ! !       IF LF^WAIT AND CHRSAV <> LF THEN
  209. ! !           BEGIN
  210. ! !           SBUF[OUT^COUNT] := CR;
  211. ! !           OUT^COUNT := OUT^COUNT + 1;
  212. ! !           LF^WAIT := FALSE;
  213. ! !           END;
  214. ! !       IF CHRSAV = CR THEN
  215. ! !           BEGIN
  216. ! !           REPEAT^COUNT := REPEAT^COUNT - 1;
  217. ! !           LF^WAIT := TRUE;
  218. ! !           END;
  219. ! !       IF CHRSAV = TAB AND TABS^FLAG THEN
  220. ! !           BEGIN
  221. ! !           REPEAT^COUNT := 8 * REPEAT^COUNT - (OUT^COUNT LAND 7);
  222. ! !           CHRSAV := " ";
  223. ! !           END;
  224.           END; !NEW CHARACTER, REPEAT COUNT = 0!
  225.   
  226.       END; !LOOP!
  227. ***************
  228. *** 970,976 ****
  229.   
  230.   SUBPROC RECEIVE^FILE^HEADER;
  231.   BEGIN
  232. ! LEGAL^PACKETS^D("SZBF");
  233.   WHILE 1 DO
  234.       BEGIN
  235.       CHECK^LEGAL^D;
  236. --- 1008,1015 ----
  237.   
  238.   SUBPROC RECEIVE^FILE^HEADER;
  239.   BEGIN
  240. ! ! LEGAL^PACKETS^D("SZBF");
  241. ! LEGAL^PACKETS^D("SZBFA");
  242.   WHILE 1 DO
  243.       BEGIN
  244.       CHECK^LEGAL^D;
  245. ***************
  246. *** 995,1000 ****
  247. --- 1034,1044 ----
  248.           RETURN;
  249.           END;
  250.   
  251. + !4!     BEGIN  !FILE ATTRIBUTES|
  252. +         CALL FORMAT^ACK;
  253. +         CALL GET^PACKET;
  254. +         END;
  255.           OTHERWISE BAD^PACKET^D;
  256.   
  257.           END; !CASE!
  258. ***************
  259. *** 1004,1010 ****
  260.   
  261.   SUBPROC RECEIVE^DATA;
  262.   BEGIN
  263. ! LEGAL^PACKETS^D("FZD");
  264.   WHILE 1 DO
  265.       BEGIN
  266.       CHECK^LEGAL^D;
  267. --- 1048,1054 ----
  268.   
  269.   SUBPROC RECEIVE^DATA;
  270.   BEGIN
  271. ! LEGAL^PACKETS^D("FZDA");
  272.   WHILE 1 DO
  273.       BEGIN
  274.       CHECK^LEGAL^D;
  275. ***************
  276. *** 1033,1038 ****
  277. --- 1077,1087 ----
  278.           RETURN;
  279.           END;
  280.   
  281. + !3!     BEGIN  !FILE ATTRIBUTES!
  282. +         CALL FORMAT^ACK;
  283. +         CALL GET^PACKET;
  284. +         END;
  285.           OTHERWISE BAD^PACKET^D;
  286.   
  287.           END; !CASE!
  288. ***************
  289. *** 1292,1299 ****
  290.           IF ERROR = 0 THEN @IN^POINTER := @IN^BUF^S;
  291.   
  292.           OUT^OF^INPUT := FALSE;
  293. !         SBUF[COUNT^READ] ':=' [CR,LF];
  294. !         COUNT^READ := COUNT^READ + 2;
  295.           IN^COUNT := 0;
  296.       END;
  297.   
  298. --- 1341,1349 ----
  299.           IF ERROR = 0 THEN @IN^POINTER := @IN^BUF^S;
  300.   
  301.           OUT^OF^INPUT := FALSE;
  302. !         ! only for text files
  303. !        !SBUF[COUNT^READ] ':=' [CR,LF];
  304. !        !COUNT^READ := COUNT^READ + 2;
  305.           IN^COUNT := 0;
  306.       END;
  307.   
  308. ***************
  309. *** 1346,1352 ****
  310.               DONT^NAK := TRUE;
  311.           END;
  312.   !R!     CALL SEND^PROC;
  313. ! !G!     CALL GENERIC^PROC;
  314.   !C!     CALL COMMAND^PROC;
  315.   !NAK!   ;
  316.   !ACK!   ;
  317. --- 1396,1402 ----
  318.               DONT^NAK := TRUE;
  319.           END;
  320.   !R!     CALL SEND^PROC;
  321. ! !G!     DONT^NAK := GENERIC^PROC;
  322.   !C!     CALL COMMAND^PROC;
  323.   !NAK!   ;
  324.   !ACK!   ;
  325. ***************
  326. *** 1357,1359 ****
  327. --- 1407,1410 ----
  328.           CLOSE^FILE^D(FILE^FCB);
  329.       END; !FOREVER LOOP!
  330.   END;!MAIN!
  331.