imported 9.0.299 Beta.01
[ckermit.git] / ckucon.c
index bd866fe..776682d 100644 (file)
--- a/ckucon.c
+++ b/ckucon.c
@@ -1,13 +1,13 @@
 #include "ckcsym.h"
 
-char *connv = "CONNECT Command for UNIX:fork(), 8.0.114, 29 Nov 2002";
+char *connv = "CONNECT Command for UNIX:fork(), 9.0.116, 1 Mar 2010";
 
 /*  C K U C O N  --  Terminal connection to remote system, for UNIX  */
 /*
   Author: Frank da Cruz <fdc@columbia.edu>,
   Columbia University Academic Information Systems, New York City.
 
-  Copyright (C) 1985, 2004,
+  Copyright (C) 1985, 2010,
     Trustees of Columbia University in the City of New York.
     All rights reserved.  See the C-Kermit COPYING.TXT file or the
     copyright text in the ckcmai.c module for disclaimer and permissions.
@@ -106,7 +106,8 @@ extern struct ck_p ptab[];
 
 extern int local, escape, duplex, parity, flow, seslog, sessft, debses,
  mdmtyp, ttnproto, cmask, cmdmsk, network, nettype, deblog, sosi, tnlm,
- xitsta, what, ttyfd, ttpipe, quiet, backgrd, pflag, tt_crd, tn_nlm, ttfdflg,
+ xitsta, what, ttyfd, ttpipe, quiet, backgrd, pflag, tt_crd, tt_lfd,
+ tn_nlm, ttfdflg,
  tt_escape, justone, carrier, hwparity;
 
 extern long speed;
@@ -234,10 +235,9 @@ static PID_T pid = (PID_T) 0;      /* Process ID of child */
 
 static int unicode = 0;
 
-static int
-  escseq = 0,                          /* 1 = Recognizer is active */
-  inesc = 0,                           /* State of sequence recognizer */
-  oldesc = -1;                         /* Previous state of recognizer */
+static int escseq = 0;                 /* 1 = Recognizer is active */
+int inesc = 0;                         /* State of sequence recognizer */
+int oldesc = -1;                       /* Previous state of recognizer */
 
 #define OUTXBUFSIZ 15
 static CHAR inxbuf[OUTXBUFSIZ+1];      /* Host-to-screen expansion buffer */
@@ -1450,6 +1450,10 @@ concld (
                              logchar((char)c);
                            c = LF;     /* and insert a linefeed */
                        }
+                       if (c == LF && tt_lfd) { /* SET TERM CR-DISPLA CRLF? */
+                           ckcputc(CR); /* Yes, output CR */
+                           if (seslog && !sessft) logchar((char)CR);
+                       }
                        ckcputc(c);     /* Write character to screen */
                    }
                    if (seslog && !sessft) /* Handle session log */