File CKCKER.UPD, Update history for C-Kermit. -*- text -*- Author: Frank da Cruz Address: Watson Laboratory, Columbia University Center for Computing Activities 612 West 115th Street, New York, NY 10025, USA, Earth Phone: (212) 854-5126 Fax: (212) 662-6442 E-Mail: fdc@watsun.cc.columbia.edu (Internet), FDCCU@CUVMA (BITNET/EARN) Copyright (C) 1985, 1992, Trustees of Columbia University in the City of New York. Permission is granted to any individual or institution to use this software as long as it is not sold for profit. This copyright notice must be retained. This software may not be included in commercial products without written permission of Columbia University. Most recent update: Mon Nov 23 12:03:39 1992 NOTE: This file renamed to CKCKER.UPD from CKUKER.UPD, 4 July 1992. This file is intended for C-Kermit developers. To reduce its size, older material has been moved to separate files: CKCV4E.UPD -- Version 4E and earlier (through January 1989) CKCV4F.UPD -- Version 4F (which was never formally released) CKC178.UPD -- Version 5A prior to the first Beta release, edit 179 (567K!). CKC188.UPD -- Version 5A from edit 179 until final release. This file. CKCKER.UPD -- Version 5A, changes since final release. CKCKER.2DO -- Things to Do, moved from this file in edit 183. Instructions for reading any of these files. For each edit there is a narrative of what was done. Each of these narratives is added at the top, just below the UPDATE HISTORY heading, and reads top-to-bottom. So to find out what has happened since you last looked at C-Kermit, find the entry for the version/edit that you have, such as 5A(180), scan upwards for the next version/edit, read downwards, then repeat: { scan upwards twice; read downwards once; } until you get back here. UPDATE HISTORY: ============== ------------------------------ 5A(188) Mon Nov 23 11:59:55 1992 Removed BETA from program herald and released version 5A. These are the components of the final 5A(188) release: FILE LAST EDIT VERSION COMMENTS ckcasc.h 19 May 92 ASCII character symbol definitions ckcdeb.h 6 Nov 92 Definitions used by all modules ckcker.h 23 Nov 92 Kermit-specific definitions ckcsym.h 19 May 92 C preprocessor symbol definitions ckcxla.h 4 Aug 92 Common character-set translation definitions ckuver.h 18 Nov 92 Version header definitions ckcmai.c 23 Nov 92 5A(188) Main program ckcpro.w 23 Nov 92 5A(052) Protocol state switcher, "wart" language ckwart.c 14 Jan 92 2A(009) wart preprocessor for ckcpro.w ckcpro.c 23 Nov 92 5A(052) C-language protocol state switcher ckcfns.c 24 Nov 92 5A(080) System-independent protocol functions ckcfn2.c 23 Nov 92 ...continued ckcfn3.c 12 Oct 92 ...continued ckcnet.h 13 Oct 92 Common network support definitions ckcnet.c 23 Nov 92 5A(015) Network support ckcmdb.c 10 Nov 92 - malloc()-debugging package ckucmd.h 21 Nov 92 Interactive command parser symbols ckucmd.c 22 Nov 92 5A(053) Interactive command parser functions ckuusr.h 26 Oct 92 User interface symbols ckuusr.c 23 Nov 92 5A(092) Interactive command parser ckuus2.c 23 Nov 92 ...continued ckuus3.c 21 Nov 92 ...continued ckuus4.c 22 Nov 92 ...continued ckuus5.c 23 Nov 92 ...continued ckuus6.c 23 Nov 92 ...continued ckuus7.c 23 Nov 92 ...continued ckuusx.c 23 Nov 92 User interface common routines ckuusy.c 18 Nov 92 Command-line option parser ckudia.c 2 Nov 92 5A(046) DIAL command ckuscr.c 2 Nov 92 5A(015) SCRIPT command ck9con.c 12 Oct 92 5A(06) OS-9 CONNECT command ck9fio.c 10 Jul 92 5A(07) OS-9 file system interface ck9tio.c 12 Oct 92 5A(08) OS-9 communications i/o ckdcon.c 10 Oct 92 5A(44) AOS/VS CONNECT command ckdfio.c 10 Oct 92 5A(064) AOS/VS file system support ckdtio.c 10 Oct 92 5A(096) AOS/VS communications i/o ckicon.c 1 Sep 92 1.3 Amiga CONNECT command ckifio.c 1 Sep 92 1.6 Amiga file system support ckistu.c 1 Sep 92 1.5 Amiga stub routines ckitio.c 1 Sep 92 1.7 Amiga communications i/o ckiutl.c 1 Sep 92 1.7 Amiga utility functions ckocon.c 25 Oct 92 - OS/2 CONNECT command ckodir.h 20 Jan 92 OS/2 file system definitions ckoker.h 6 Nov 92 OS/2 compilation definitions ckolat.h 11 Jul 92 OS/2 LAT support definitions ckonet.c 8 Aug 92 5A(008) OS/2 network support ckotio.c 16 Nov 92 - OS/2 communications i/o ckscon.c 20 Jul 92 5A(031) Atari ST CONNECT command cksfio.c 20 Jul 92 5A(059) Atari ST file system interface ckstio.c 20 Jul 92 5A(086) Atari ST file communications i/o ckucon.c 23 Nov 92 5A(047) CONNECT command for UNIX ckufio.c 23 Nov 92 5A(067) File system interface for UNIX and OS/2 ckutio.c 23 Nov 92 5A(102) Communications i/o for UNIX ckuxla.h 27 Jun 92 Character-set symbols for UNIX & others ckuxla.c 21 Nov 92 5A(018) Character-set translation for UNIX & others ckustr.c 11 Sep 92 - String extraction module for 2.xBSD cku2tm.c 11 Sep 92 - ctimed support for 2.10 BSD ckvvms.h 7 Oct 92 VMS- and OpenVMS-specific definitions ckvcon.c 26 Oct 92 5.0-028 CONNECT command for VMS and OpenVMS ckvfio.c 5 Nov 92 2.0-095 File system support for VMS and OpenVMS ckvtio.c 23 Nov 92 2.0-050 Communications i/o for VMS and OpenVMS ckvioc.h 19 Oct 92 - VMS ioctl() simulation symbol definitions ckvioc.c 19 Oct 92 - VMS ioctl() simulation ckvcvt.c 6 Sep 92 T1.0-05 VMS labeled-file decoder ------------------------------ 5A(187) Mon Nov 23 03:22:34 1992 Fixes from Kai Uwe Rommel for OS/2 popen() for IBM C. ckotio.c, ckufio.c. (Reports from Michael Godfrey say it doesn't work.) Changed the behavior of the protocol module if it gets an error packet when running in (what Kermit thinks is) the background. Previously it always exited unless it was in server mode. Now it exits only if (a) not in server mode, (b) at command top-level. This way, if Kermit is executing a TAKE file or macro, the TAKE file or macro can decide what action to take if a file transfer command fails. ckcpro.w. Added an alternative makefile entry for Interactive 386/IX from Steen Hammerum , "make is5r3net2". Added a few more items to the SHOW FEATURES display. Made the size of trmbuf[] (the termcap buffer) be selectable at compile time by defining TRMBUFL to be the desired length. It defaults to 1024, its previous value. Tom Kloos . ckuus5.c. Fixed the following interactive command-parsing bug reported by Tom Kloos: If you complete a field with ESC, and the following field has a default value, and you type leading spaces in that field, the default is supplied and C-Kermit goes on to the next field without notifying the user. Example: SET DIAL DISplay ON At this point, C-Kermit is trying to confirm the command. Fixed by having the command-parsing static "inword" variable managed in different places, with its setting determined by whether the requested keyword or filename completion was performed successfully. ckucmd.c. Fixed parsing of "help help". Previously, the Copyright line was printed when the user typed ESC or SP in the middle of the second "help". ckuus2.c. Added previously missing command confirmation to the CD command. ckuus5.c. While exercising the interactive command parser, found another long-standing bug, namely that under certain conditions, trailing whitespace could cause cmcfm() to fail erroneously. This was due to overzealous backing up of too many pointers while trimming trailing whitespace in gtword(). Fixed in ckucmd.c. Removed -DNOJC from "mips" makefile entry for MIPS Computer Systems. Reportedly, job control works now. Put back -DNOJC if job control causes trouble. Installed OS/2 patches from Kai Uwe Rommel. These include another attempt to make his homegrown popen() and pclose() routines for IBM C; something about "hot handles"; and preliminary hooks for remote operation. Many modules, but mostly ckotio.c. Updated UTEK makefile entries to specify a larger (2K) TRMBUFL. Tom Kloos. Fixed SET DELAY to not allow negative numbers, and to allow positive numbers up to 999 (previously the limit was 94). Ditto for SET RETRY. ckuus3.c. Changed UNIX version of SPACE command to allow tilde notation in the (optional) directory name (by calling cmdir() instead of cmtxt()). Changed VMS communication-device-reading routine, txbufr(), to read no more than 512 bytes at a time, so as to minimize the chance of exceeding small BYTLM quotas, a workaround suggested by Terry Kennedy. ckvtio.c. Mike Freeman pointed out that wildcard sends didn't work from the command line on VMS, e.g. "kermit -s *.log". Fixed in ckuusy.c. This fix should also apply to all the other non-UNIX OS's too. Changed the fatal() routine to give a VMS-style error message in the VMS version. ckuusx.c. Make MS an invisible abbreviation for MSEND. ckuusr.c Change the message "Escape back to your local Kermit and give a SEND/RECEIVE command" to "Return to your local Kermit and..." because some Kermit programs, like Mac Kermit, do not require you to escape back. ckcpro.w. Added CHECK DYNAMIC-MEMORY to check whether Kermit was built with dynamic memory allocation (i.e. wheter SET BUFFERS is available). Also fixed order of CHECK keywords. ckuus3.c. Added O/o-diaeresis Latin1-to-ASCII translations for Icelandic. ckuxla.c. Fixed bug with \fexec(). If recursive calls nested too deeply it would try to free memory that had not been malloc'd and dump core. Also changed definition of recursion depth limit, CMDDEP, to allow it to be overridden by a CFLAGS value, e.g. -DCMDDEP=100. Changed SHOW FEATURES to display CMDDEP value. ckucmd.c, ckucmd.h, ckuus5.c. Add \v(system) entry for Atari ST = "Atari_ST". ckuus4.c. Removed some unneeded casts of 3rd debug() argument to (int) in ckucmd.c, which (justifiably) caused compilation warnings from 16-bit-int compilers. ckucmd.c. Fixed arraynam() to catch too-long array references and give an intelligent error message rather than something confusing about not finding the closing bracket. ckuus5.c. C-Kermit now also issues a message when you give it a GET, REMOTE, BYE, or FINISH command when it's in remote mode, top-level, etc, just like it does when you give it a SEND, RECEIVE, or SERVER command. It's about time -- people get very confused when they say BYE, expecting to exit from the program, and instead it sits there for 5 seconds, then prints some squiggles on the screen... ckcpro.w. Allowed EXTPROC as a synonym for COMMENT in the non-OS/2 versions too, in case somebody wants to run an OS/2 C-Kermit self-running command file from a different version of C-Kermit. ckuusr.c. Changed SHOW STATUS to not change STATUS. ckuus5.c. Changed local-mode file transfer interrupt message for POSIX to be like the one for System V, i.e. you have to type the CONNECT-mode escape character first. ckuusx.c. Added casts to some function calls in ckuus5.c, ckuusx.c, ckufio.c, ckucon.c, and ckcnet.c for ANSI C compilation. Warnings reported by William Bader. Fixed bug reported by Christian Hemsing in the new packet timeout calculation; sense of comparison was backwards. Also, we were using the wrong receive packet-length for comparison. Also, we weren't checking it in the right places. chktimo() in ckcfn2.c, plus calls to chktimo() added or changed in ckcpro.w, ckcfns.c, ckuus7.c, and prototype changed in ckcker.h. New OS/2 definitions and makefile to include DDE4.MSG error messages when built with IBM C, from Kai Uwe Rommel. 386BSD fix for running setuid uucp from Warren Jones . In sysinit(), call congm() *after* priv_ini(); otherwise 386BSD doesn't let C-Kermit open /dev/tty (even though it is world-read-writable) to get its modes. ckutio.c. Add -DUSLEEP to Linux makefile entries. Add a new "make linuxgcc2net" entry to add TCP/IP support. Rick Sladkey . Replaced sprintf() calls in dbchr() with ordinary character assignments. Makes a big difference, reportedly, on small systems when debug is on. Suggested by Andy Fyfe. ------------------------------ 5A(186) Tue Nov 10 09:50:10 1992 (Open)VMS CHANGES: From Terry Kennedy at Saint Peters College, , fixes to the subprocess / mailbox problems encountered during server execution of REMOTE commands as well as interruption of locally-spawned commands. Terry's comments: Every way I found I could hang C-K would also hang Bliss Kermit-32. Go fire it up and send it a "REMOTE HOST STOP/ID=0". I rewrote the whole thing from scratch for ckvfio. A number of things have been definitely fixed: 1) ^C now works properly from the local-mode spawn/push/!/@ commands, regardless of whether a command was given. 2) If the user issues a spawn/push/! with no command text, they get a DCL prompt (as before), but also get instructions on how to get back to Kermit. 3) An explicit check for PRCLM is done and it tells the user to see their system manager to have the UAF PRCLM increased if it's too small. 4) zsyscmd/zshcmd no longer call zxcmd - they're self-contained. 5) zxcmd was completely rewritten to remove the command mailbox and to clean up the code and add lots more error reporting. Also, newer VMS features (V4.0 and higher) were used to streamline the code. 6) All of the stuff that went with zxcmd (get_subr_line, etc.) was cleaned up and error logging was added. 7) Efficiency was improved in the mailbox handling code. 8) If SUPERSAFE is defined (it is, by default [hardcoded in ckvfio.c]) then the subprocess will be checked before each read to the mailbox. If the subprocess is no longer present, then things will exit gracefully. 9) If a subprocess requests input, it receives EOFs until it exits. 10) A subprocess that runs forever (generating output) can be terminated. A few comments - #8 above adds a bit of overhead - but it's probably worth it. There's enough debugging stuff in there now that I should be able to fix any hangs/loops with a debug log. The only hole I know of is programs which generate no output and issue no input requests. These will hang the server. I could put a timeout in there for no activity for "X" seconds, but that would be too long for impatient folks and too short for folks who issued a major command on a loaded system. This needs to wait for a change to the terminal I/O to make it asynchronous. This problem also affects Bliss Kermit-32, BTW. From Hirofumi Fujii : Fixed CKVKER.COM to redefine VAXC$INCLUDE in the WIN/TCP case to also include SYS$LIBRARY, as CKVKER.MAK and CKVKER.MMS already do. From me: Rewrote zkermini() routine in VMS version to allow the user's "-y" command line selection of initialization file to take precedence. The non-operation of -y was reported by Rob Chalmers . ckvfio.c. Fixed OPEN !READ in VMS version, by adding allowance for both ZIFILE and ZRFILE (rather than only ZIFILE) to zxcmd(), zclose(), and zclosf(). I don't think this ever worked before. Now it works fine. OPEN !WRITE, however, still does not work -- there is no code to support it. ckvfio.c. Fixed VMS PING command for DEC TCP/IP to (a) not stomp over prompt, and (b) only send one ping instead of 10. ckuusr.c. UNIX CHANGES changed UNIX SPACE command to allow an argument, like "space /". ckuusr.c. Dozens of bureaucratic edits to many modules to defeat warning messages from SCO ODT 2.0 compiler concerning argument promotion rules, int vs long, etc. These might also take care of certain core dumps that were recently reported. Thanks to William Bader. Removed "#include commonC.h" from ckcdeb.h for DIAB -- Bo Kullmar said this was necessary. Added notes to makefile about SunOS compile/link problems. Added makefile entries for HP-UX 8.0 with curses support. Suggested by Steve Fosdick . New makefile entry for SCO UNIX 3.2 V4.0 with TCP/IP, for Extended Acer File System (EAFS), curses, ANSI C compilation: "make sco32v4netc". William Bader. New makefile entry for Charles River Data Systems UNOS, "make crds", from David Harrison, Kingston Warren Corp, Newfields, NH. OS/2 CHANGES Changed SPACE command, and OS/2 C-Kermit server's response to REMOTE SPACE command, to use 'dir | find "bytes free"' rather than CHKDSK, which was a bad idea (takes forever, can get hung on console, etc). ckcpro.w, ckuusr.c. But we still need a better way to do this -- presumably a system call to DosQFSInfo(). Later, replaced the above with improved code for SPACE and REMOTE SPACE for OS/2 from Kai Uwe Rommel. Many modules. Also changed OS/2 SPACE command to take an argument, like "space a:". ckuusr.c. OS-9 CHANGES DIAL command fixes for OS-9, related to signal handling, plus a minor change in OS-9 signal-related definitions in ckcdeb.h from Christian Hemsing . Also, a new binary was provided. GENERAL CHANGES Removed unexpected file transfer display when local-mode server gets a FINISH command and SERVER DISPLAY is OFF. ckcpro.w. Changed the command parser to perform completion when ESC or TAB is typed at the end of a special abbreviation (CM_ABR) for a command, e.g. "c" for "connect"; "s" for "send"; "g" or "ge" for "get"; "sp" or "spa" for "space". ckucmd.c. Changed the command parser quesion-mark-help giver to list the keyword, even if it is invisible (CM_INV), if it is the only one that matches what was typed so far AND if it is not a prefix of any other command (e.g. as ASK is for ASKQ). For example "spaw?" now displays "spawn" instead of nothing, but "ask?" displays both "ask" and "askq". Also "!?" displays "!" instead of nothing, etc. ckucmd.c. Changed keyword tables to use CM_INV and CM_ABR consistently, so the above two changes should work right everywhere. ckuusr.c. Changed SET PROMPT to no longer allow text to be enclosed in doublequotes -- braces should be used, as they are for all the other text-oriented commands, to keep leading and/or trailing spaces. ckuus3.c. Changed SET DIAL commands that take character strings to allow enclosing braces for including leading and/or trailing braces, like most other text-oriented commands (e.g. ECHO, ASK, etc). The inconsistency was pointed out by Peter Kabal . ckuus7.c. Changed dial directory lookup to give precedence to an exact match, and accept an abbreviation only when there is not an exact match. ckuus6.c. Fixed SHOW DIAL to show DIAL INIT-STRING and DIAL-COMMAND correctly for V32-TELEBIT, V42-TELEBIT, etc. ckudia.c. Changed Telebit dialing code not to force PEP mode when KERMIT-SPOOF ON, because this prevents fallback when other modem doesn't support PEP. Bob Larson . ckudia.c. Fixed SET ATTRIBUTES ALL { ON, OFF } to do what it was supposed to all along -- turn all the attributes on or off, *without* affecting whether the attribute mechanism itself was on or off. Changed REMOTE SET ATTRIBUTES ALL { ON, OFF } to fail always, since there is no mechanism in the protocol for this. ckuus7.c. Fixed TRANSMIT to strip high bits from echoed characters if PARITY not NONE or COMMAND BYTESIZE not 8. ckuus4.c. Fixed SCRIPT command to echo, even if from a macro or take file, if SCRIPT ECHO is ON and MACRO (or TAKE) ECHO is also ON. ckuscr.c. Fixed a minor bug in parsing of SET SERVER DISPLAY. ckuus7.c. Fixed help message for SET QUIET. ckuus2.c. Straightened out confusion with SET { RECEIVE, SEND } TIMEOUT. It did not work as advertised. SET RECEIVE TIMEOUT tells the other Kermit what timeout interval to use; it just puts the value in the negotiation string. SET SEND TIMEOUT overrides whatever the other Kermit says our timeout should be. Like it says in the Kermit book, etc. Also fixed the parsing of SET RECEIVE TIMEOUT to supply the correct defaults, and SET SEND TIMEOUT to be issued with no value to cancel a previous SET SEND TIMEOUT. When a SET SEND TIMEOUT override is in effect, SHOW PROTOCOL marks it with an asterisk. Also, added the negotiated -- and possibly adjusted -- value to the SHOW PROTOCOL display as "(used=xx)". Also (suggested by Christian Hemsing), changed the timeout adjustment routines to add 10 percent slop (min 2 secs), rather than a constant 2 seconds, to allow for round-trip delay. ckcmai.c, ckcfns.c, ckcfn2.c, ckcpro.w, ckuus4.c, ckuus7.c. Fixed stdout / stderr confusion in SET LINE error messages, and ASK and ASKQ help messages, reported by Fuat Baran. ckuus7.c. Fixed fnparse(), the routine that parses a list of filenames sent in a GET command to the C-Kermit server, to strip trailing whitespace to prevent space at the end of a filename from being mistaken for another (null) filename. Problem pointed out by Terry Kennedy, noticed when MS-DOS Kermit sent a GET command to the VMS C-Kermit server, with the filespec containing trailing spaces. ckuusx.c. Changed GET command to allow { braces } to include leading and/or trailing spaces in the filespec sent to a server. ckuusr.c, ckuus6.c. Fixed SET { SEND, RECEIVE } PACKET-LENGTH to disallow negative lengths! ckuus7.c. Added some bulletproofing to the TAKE file reader. Until now, it would go into an infinite loop if it got a malloc() failure or tried to read from a file that contained NUL characters. Also, now we supply a terminator in case the last line of a TAKE file lacks one. ckuus5.c. OS/2 16-bit version got too big. Changed -Gt16 to -Gt8 to make some room in the stack. ckoker.mak. ------------------------------ 5A(185) Tue Oct 27 18:14:49 1992 Thu Oct 15 - Minor correction to getok() to allow for Digitel CCITT modem "VAL" response. ckudia.c. Correction to conres() for Sony NEWS, to restore Kanji mode correctly, from Hirofumi Fujii. ckutio.c. Added fflush(stdout) to UNIX CONNECT command, to make sure entire CONNECT message is displayed before connection begins. From Michael Pins. ckucon.c. Mon Oct 19 - Corrected the dnix5r3ansi makefile entry, plus a minor change to ckcdeb.h to go along with it. Bo Kullmar. Some changes to CKVIOC.C and .H, suggested by Lee Tibbert, mostly compiler-related. The only functional change is to avoid asking the system for an event flag number, but always using EFN 0. Lee says this is safe, and it speeds execution significantly. Tue Oct 20 - Corrected one more bug in the OS/2 C-Kermit VT102 emulator. Darrel Hankerson sent in a simple demonstration of how EVE screens could still become messed up after insert-line operations followed by cursor-ups. Diagnosis: ESC M (reverse index) caused scrolling whenever the cursor was *at or below* the top margin (i.e. the top line of the current scrolling region). Cure: It should scroll only when the cursor is *on* the top margin line. I also corrected a similar mistake for ESC D (Index). Fri 23 Oct - From Bob Larson -- UUCP lockfile fix for RS/6000 AIX 3.2 (ckutio.c), plus new makefile entry for same with curses support. Added SET DIAL PREFIX. This lets us insert PBX outside-line codes, etc, independent of the phone number, so we don't have to include them in dialing directory entries, and that way the same dialing directory entry can be used from different locations. Sun Oct 25 - Found another bug related to retries of packet 0. When reconstructing the ACK to an S or I packet, and the block check type was not 1, the packet was malformed (the block-check TYPE was being saved and restored, but not the block-check LENGTH). Fixed in resend() in ckcfn2.c. Found and fixed the problem with the first packet received by VMS C-Kermit after escaping back from a DEC TCP/IP (UCX) connection: the final read that was posted during CONNECT mode was not being canceled properly. cancio() needed to use a channel number rather than a file descriptor in the UCX case. Fixed in ckvtio.c. Built and tested with UCX and MultiNet. OS/2 fixes: . Make session logging work in the 16-bit version by using regular buffered writes, and by making logchar() a macro rather than a function. . Make session log "binary" so carriage returns are not doubled. . Hand-code sprintf() in-line to prevent a procedure calls in terminal emulation functions that were too deeply nested: ESC [ 6 n -- cursor position report. ESC [ ? 6 n -- ditto ESC [ Pn x -- request terminal parameters . Recoded handling of host-directed printing directives. But it didn't help, we still crash with a stack overflow. So disabled host-directed printing in the 16-bit version for now. 16-bit version passes chkesc test for the first time, even with session logging on. pcprint is now harmless. Mon Oct 26 - Fixed VMS version to display an appropriate herald, calculated at runtime, saying whether it is VAX or AXP (Alpha), and OpenVMS (5.5 or later) vs plain-old VMS (5.4 and earlier). Adapted from code by Lee Tibbert. CKVTIO.C. More banging at OS/2 C-Kermit in hopes of getting printing to work on 16-bit version (but no, it still crashes with stack overflow, so I ifdef'd it out again). Also, tried to prevent transparent print from printing the ESC [ 5 i "printer on" sequence (but I can't test it). ckocon.c. Expanded OS/2 SET LINE (= SET PORT) table to include COM1-COM8. ckuus7.c. Another fix for SunLink X.25 from Stefaan Eeckels in Luxembourg. This one is said to cure the first-file-transfer-fails problem, and entirely removes the big, ugly x25inl() routine. ckutio.c, ckcnet.c. Attempted to fix problem reported by Peter Mauzey for TELNET connection made from C-Kermit under SunOS 4.1.2, which is more System-V-like that 4.1.1, in which C-Kermit pops back to its prompt immediately upon the first CONNECT command. The fix is to have coninc() recover from interrupted system calls (EINTR during a read) by retrying the read, as it already does in System V. ckutio.c. Later, Peter reported that this fixes the problem. Tue Oct 27 - Removed the artificial limit of 1920 on packet size for VMS C-Kermit. Now the maximum packet length is 9024 and the default buffer size is 9065, just like other -DDYNAMIC versions. 9000-byte packets, 2 windows, tested OK on VAX 3100/85 with UCX in both remote and local mode. ckcker.h. Added "OS/2 16-bit" and "OS/2 32-bit" to SHOW FEATURES for OS/2 version. ckuus5.c. Changed "Est. Time Remaining" to "Estimated Time Left" in fullscreen file transfer display. Looks better. ckuusx.c. Fixed bug with display of "Elapsed Time" in fullscreen file transfer display on 16-bit architectures, reported by Peter Mauzey. ckuusx.c. Fixed a bug with display of Elapsed Time and Time Left for very large files. Bo Kullmar reported that this happens on a Sun when the file size is 28,565,504. Percent done is calculated as (chars-so-far * 100) / file-size. When the numerator exceeds 2^31 it goes negative. Fixed by rearranging the expression (in such a way as to avoid divide overflows). Tested by transferring a 35-megabyte file Sun to Sun. Worked OK. ckuusx.c. In testing with the 35MB file, I noticed a similar problem with the "Time Left" display. Previously it was calculated as: ((file_size - chars_so_far) * secs_so_far) / chars_so_far but this too could overflow in the numerator for huge files. The new calculation avoids file sizes and byte counts, which can be arbitrarily long, and uses only the seconds and the percent done, previously calculated, which are smaller by orders of magnitude: (seconds_so_far * percent_left) / percent_done. Tested with files of various sizes, 0 bytes to 35MB. ckuusx.c. Noticed during the huge file transfers that keyboard interruption does not seem to work when sending a huge file. But it seems to work consistently when sending normal-size files. Momemtum? Or could be related to yesterday's fix to the "double connect" problem? (I don't think so -- Kermit is still reading the interruption characters OK, but the protocol is not working.) Installed a fix from Andy Fyfe for the problem reported by Peter Mauzey where certain System V versions (3B2/300, 6300 PLUS) built with CK_NEWTERM core dump after the first use of the fullscreen file transfer display. ckuusx.c New makefile for 3B2/300 with curses: att3bxc, from Peter Mauzey. Changed ATT 6300 makefile entry to not use CK_NEWTERM any more. Peter Mauzey. Fix for PING command for VMS WIN/TCP from James Sturdevant. ckuusr.c. Put back code from edit 183 for SunOS RTS/CTS flow control, but only for SunOS 4.0, and then only if it is not being compiled with gcc. For SunOS 4.1 and later, we keep the current code (POSIX calls). This change was made because the POSIX calls are not supported in SunOS 4.0. Problem noticed by Andy Fyfe, who wanted to start Kermit file transfer from pcomm via: kermit -Y -l 0 -r where file descriptor 0 is assigned by pcomm to its dialout communication device. When started in this fashion, Kermit would drop DTR on the dialout device because, according to Andy, "the ioctl call in concb to set the console to CBREAK uses fd 0 which is also the modem tty line, and since the speed 0, DTR is dropped." So I added a check in concb() to not do anything if the communications device file descriptor was passed as an argument to C-Kermit (ttfdflg != 0) AND the file descriptor is 0, 1, or 2. ckutio.c. More last-minute fixing of huge-file displays after feedback from Bo Kullmar. ckuusx.c. Wed Oct 28 - Fixes to Digitel modem support from Fernando Cabral. ckudia.c. Fix to concb() in UNIX version -- don't try to change console terminal modes if we don't know what they are yet. (Further work on the pcomm problem from Andy Fyfe.) ckutio.c. Added -DDYNAMIC to MIPS makefile entry. Tested on MIPS, problem previously reported (^C^C out of packet mode leaves tty modes messed up) seem to have been fixed. Later, Peter Jones says it isn't fixed for him -- but the same program image on the same computer works fine for me. Added -DKANJI to IBM RS/6000 makefile entries. Determined that the SunLink X.25 version will also run OK on a Sun that doesn't have X.25 installed. Attempts to open an X.25 connection result in a good message, "Protocol not supported". A few last-minute cleanups to SHOW NETWORK display (esp. for VMS). ckuus4.c. Thu Oct 29 Last-minute change to VMS version to fix labeled file transfer, from Terry Kennedy. ckvfio.c. Received independent confirmation from Chris Green in England that Stefaan Eeckels's X.25 fixes work. ------------------------------ 5A(184) Sat Oct 10 19:53:00 1992 Installed new, edit 183-level, Atari ST sources and binaries from Bruce J. Moore. Also a new Commodore Amiga binary from Steve Walton (no source changes necessary). Two problems were reported with SET FLOW RTS/CTS on SUN computers. First, the code would not compile with GCC, and second, it didn't work if the modem was not asserting CD. Replaced the original code in tthflow() by a new version sent in by Lon Willett at the University of Utah, , that gets around the first problem by using POSIX calls rather than ioctl's, which should work with both cc and gcc. The second problem is caused by the fact that SunOS will not output characters to a device that has CRTSCTS set unless both CD and DSR are asserted by the device. The new code, therefore, skips setting CRTSCTS if CD is not present. Compiles OK with both cc and gcc, but not tested since I have no way to test it. ckutio.c. James Spath discovered that if you type \, then Ctrl-H, then newline (CR or LF) at the prompt, the command parser goes into an infinite loop, spewing out beeps. Similar things happen when other control characters are entered this way -- Ctrl-U, Ctrl-W, etc. Fixed, but not perfectly. The infinite loops are eliminated, but the prompt does not reappear automatically. Still, it's an improvement. ckucmd.c. A more obvious change: The command parser was modified at the lowest level to try to keep the command line looking right when the user enters quoted control characters, question mark, space, or DEL -- the backslash is erased and replaced by the quoted character. If the quoted character is a control character, it is written as "^". If the quoted character is a printable character other than space or question mark, the backslash is not removed. This way, editing (DEL, BS, Ctrl-W, Ctrl-U) work as expected after entering quoted special characters into the command line -- no more eating into the prompt, wrong characters appearing/disappearing, etc. Against my better judgement, but seems to work OK. Won't be pretty on hardcopy terminals though, and the "^" business might surprise some people, but not more than the current behavior surprises most others. ckucmd.c. Fixed the DIAL command to perform dial-directory lookups correctly, again, in response to problems reported by Jay Rouman and Peter Kabal. ckuus6.c. Fixed yet another multiline GET command parser bug: if there was an error in the local file specification, an error message was issued, but the old prompt was never restored. Reported by Nick Sayer . ckuus6.c. Changed UNIX version to allow opening /dev/null as an output file. zchko() and zchki() in ckufio.c, rcvfil() in ckcfns.c. Added support for Solaris 2.0 on SUN, adapted from code sent in by Paul Eggert, Twin Sun Inc, . makefile, ckuver.h, ckuus5.c, ckcnet.c, ckufio.c Changed sunos41gcc makefile entry to properly define "CC2= gcc", to forego gmake, and to include curses support. Suggested by Joe Smith at U of PA, . A couple minor fixes for BSDI/386 from Michael Schmidt . ckufio.c, ckutio.c. Minor changes to ckcnet.c and ckutio.c to eliminate compiler warnings in 4.3 BSD from Michael Pins . Reduced CONNECT command input buffer length (IBUFL) from 4K to 1.5K for PDP-11 compilations. Steven M Schultz . ckucon.c. Changed order of library search for "make sco3r22netc" to eliminate linker complaint about "Symbol memset ... multiply defined". From Fulvio Marino . makefile. Sunday --- Found that making KEEP the default for flow control is what busted file transfer for VMS. Fixed by (a) putting Xon/Xoff back as the default type of flow control, and (b) changing the semantics of SET FLOW KEEP to restore the flow-related characteristics of the device as they were found when the device was first opened. CKVTIO.C. Did the same for UNIX in ckutio.c. However, it's not quite perfect, since SET FLOW KEEP only knows about Xon/Xoff, not hardware flow control. So if you SET FLOW KEEP *after* having opened the device with SET FLOW RTS/CTS in effect, SET FLOW KEEP won't restore the original RTS/CTS flow control setting. The same is true of SET FLOW NONE -- it doesn't know how to turn off hardware flow control (it never did). Installed patches to VMS C-Kermit file handling: Don't treat a file named "." as an init file; fix improperly set FFB when receiving labeled file that did not have the FFB on a record boundary; minor fgen() improvement. From Bill Hoelzer, Chuck McMichael, Bernd Onasch, via Terry Kennedy. CKVFIO.C. Added architecture-related #ifdefs to CKVCON.C from Lee Tibbert at DEC, for OpenVMS and Alpha. New command: SET DIAL DIAL-COMMAND [ ], lets users override the default modem-specific dial command, or actions taken by the initialization string, etc. For example, the default dial command for Hayes-like modems is "ATD%s\13"; the user can force it to include a T for Tone dialing by giving the command "SET DIAL DIAL-COMMAND ATDT%s\13". Suggested by Kai Uwe Rommel and others. ckuusr.h, ckuus7.c, ckuus4.c, ckudia.c, ckuus2.c, ckuker.nr. Added +Obb584 to hpux70lfn makefile entries to give optimizer enough room to work. From Bo Kullmar. Attempted to fix Telebit support: Added new code to determine Telebit model more precisely (to differentiate among the many incompatible models that report themselves as "965"). Leave S51 (speed) alone. Don't change modem's handling of CD and DTR. Don't touch the speaker. Don't touch its error-correction fallback method. Also, remove extraneous echoes from getok() when DIAL DISPLAY is OFF. Works OK on TrailBlazer and T3000 -- sent message off to other Telebit aficionados so they can test it on other models. ckudia.c. Changed SET TRANSMIT LINEFEED default back to OFF (how did it ever get changed?). ckuusr.c. Various patches to OS/2 version from Kai Uwe Rommel: . fix key mapping bugs . reduce disappearing-cursor syndrome . add 14400 bps for V.32bis modems . fix failure to open transaction log and similar files . fix \n vs \r\n problems for help screen . cleanups for upcoming emx/gcc 32-bit version Sunday -- New ckustr.c for 2.11BSD version from Steven Schultz. Another new command: SET DIAL MODEM-HANGUP { ON, OFF } to enable/disable the "mdmhup" feature (hangup via ATH0, etc). It has effect only on dialed serial connections (i.e. local mode with specific modem type set). This feature is enabled by default unless NOMDMHUP was defined at compilation time. If OFF, serial-line hangups are done only by dropping DTR. If ON, the modem-specific escape sequence (e.g. +++) is sent to put the modem into command mode, then the modem-specific hangup command (e.g. ATH0) is sent, the result code is parsed, and if it fails, the DTR method is tried. If the modem-specific escape sequence and hangup command don't exist (as for the ROLM CBX) or are not known (as for most of the non-Hayes-style modems), the DTR method is used. We're not supposed to be adding new commands at this late stage, but Tom Kloos convinced me it's needed. ckuusr.h, ckudia.c, ckuus2.c, ckuus7.c, ck[cvo]con.c. Corrections to Telebit support based on info from Tom Kloos. Init string starts with Ctrl-Q followed by several A's, based on Telebit's recommendation. WorldBlazer *does* support PEP. X1 raised to X2 for T1600, T3000, and WorldBlazer. Fallback modes made consistent for MNP and V.42 on older modems -- in both cases, fallback all the way to "direct" is now allowed, rather than direct for one and disconnect for the other. Also, various adjustments to eliminate most warnings from gcc -Wall ("'bleh' may be clobbered by longjmp", etc). ckudia.c. Extensive documentation on Telebit support added to ckcker.bwr. Monday -- CLEAR command expanded to allow user to specify whether to clear the INPUT command buffer, the communication device input buffer, or both: CLEAR [ { BOTH, DEVICE-BUFFER, INPUT-BUFFER } ] We've needed this one for a long time, and it was so easy. The default is BOTH, for compatibility with previous edits. ckuusr.c. Fix from Kai Uwe Rommel for OS/2 CONNECT command, which could hang when TERMINAL LOCKING-SHIFT was ON. Involved separating input shift state from output shift state (a good idea), plus exiting from the critical section before continuing the big loop. ckocon.c Changed UNIX version to also separate input and output shift states. ckucon.c. Ditto for VMS. ckvcon.c. More Telebit fixes, based on advice from Greg Andrews at Telebit: . Use S54=3 rather than S54=2; the latter is not supported on some modems. . Add support for T1500. . Further refinement of which-modem-has-which-feature, esp. the Qblazer. . Allow more falling back. . Add support for various Telebit OEM versions. Also fixed a bug in mdmhup() that prevented it from working with V32-TELEBIT or V42-TELEBIT or PEP-TELEBIT or SLOW-TELEBIT. ckudia.c. Tuesday -- Fixed minor bug in parsing of SET TERMINAL LOCKING-SHIFT and NEWLINE-MODE commands. ckuus7.c Reworked the Telebit code again, with debugging help from Fernando Cabral in Brasilia, who discovered that some numeric result codes were not being handled (now that X2 is used on new-model Telebits), and further advice from Greg Andrews at Telebit about many matters. ckudia.c. Thursday -- Changed hangup string for Hayes-like modems from ATH0 to ATQ0H0, since getok() depends on getting an OK or 0 response for this, and it won't come if result codes are disabled. ckudia.c. Fixed SPAWN command in VMS version to handle Ctrl-C properly; problem reported by Hunter Goatley, fixed by Terry Kennedy. CKVFIO.C. Fixed malloc() in VMS version of zmail() -- old one wasn't mallocing enough space and so the ensuing sprintf() was writing over who-knows-what. James Sturdevant. CKVFIO.C. Finally fixed getok() (DIAL command's modem-command response reader) to work right. The problem was that nulls were getting into the response buffer, preventing didweget() from finding anything after them, since it treats the response-buffer string as null-terminated. ckudia.c. Monday -- Changed the PING command to say "multinet ping /num=1" on VMS with TGV MultiNet. Suggested by Regis McEwen , confirmed by Ken Adelman at TGV. Should work for all releases of MultiNet. ckuusr.c. Wednesday -- Fixed a problem recently introduced into UNIX ttpkt() -- if FLOW was set to any of the hardware options, I skipped setting raw mode (in Berkeley-based UNIX implementations only). Thanks to Tom Kloos for noticing it. ckutio.c. Thursday -- Added support for Motorola Delta UNIX System V/88 R40 to makefile, from Ron Heiby . Friday -- Added a new compile-time flag, SYSUTIMEH, meaning to #include . Apparently systems that follow the Motorola 88000 standard ("88Open") use the structure specified there for setting file date/time, and if you don't include this header file (and use the structure accordingly), files are created with the "zero" date/time (generally Jan 1, 1970). Needed, at least, for the Motorola Delta UNIX System V/88 R32. Suggested by Ron Heiby. makefile, ckufio.c, ckuins.doc, ckccfg.doc. If UNIX C-Kermit was suspended during local-mode file transfer, and then backgrounded, the file transfer would continue, and the file transfer display would turn itself off. But then if it was foregrounded again, the display would not resume, and the interruption characters (A, X, Z, etc) would not work. All fixed now, at least for the SERIAL and CRT display types. However, switching between fore- and background still doesn't work well with the FULLSCREEN (curses) display -- I think it's because curses is doing things behind Kermit's back. ckuusx.c. Saturday -- Added MINIDIAL compilation option. Removes support for all types of modems except CCITT, HAYES, UNKNOWN, and NONE (DIRECT). Cuts size of ckudia.o by about half, and also reduces size of C-Kermit executable. Mainly for benefit of the PDP-11 (2.11 BSD) version. ckudia.c, ckuus[35].c. New CONNECT module for AOS/VS from Eugenia Harris. Adds miscellaneous new features from UNIX and VMS versions, plus bug fixes and buffering improvements. ckdcon.c. SHOW NETWORK, SET NETWORK, HELP SET NETWORK fixed for OS/2. Sunday -- Improved support for CCITT V.25bis modems, based on information from Fernando Cabral and further study of the standard. Also, reformatted the dialing messages, and increased consistency in deciding when they come out. ckudia.c. And fixed up the DIAL-related HELP messages. ckuus2.c. Fixed Help message for Mac version. Changed Mac 0.99(xxx) version number to agree with C-Kermit version number, so now it's 0.99(184). ckcmai.c, ckuus2.c, ckmkr2.r. In testing this edit on HP-UX, I discovered that Friday's fix for the local-mode file transfer display when fg'ing and bg'ing C-Kermit during transfer... (take a breath) broke local-mode file transfer for HP-UX. This was because the conbgt() -- the process that checks to see if we're in the background, uses a test that is not valid during file transfer, namely whether SIGINT == SIG_IGN. This problem didn't show up on other System-V based systems (SVR4, Aviion, RS/6000), but on HP-UX, the getpgrp() call always seems to return -1, as if it had been called in error, so the process-group test always fails, which makes us fall back to the signal test. This was somewhat (not very) reliable before, but now that we are calling conbgt() during file transfer, SIGINT will often be set to SIG_IGN, so now it's *really* unreliable. Since conbgt() is used only in UNIX C-Kermit, the cure was fairly simple -- add a new flag as an argument to conbgt(). If the flag is 1, skip the signal test; if 0, do it as before. Internal (pre-existing) calls to conbgt(), which occurred from conint() and sysinit() in ckutio.c, now call conbgt(0). The new call that was added to the screen() function in ckuusx.c is now conbgt(1). Also, screen() was changed to not to call conbgt at all unless C-Kermit was in local mode. Got a new ckubs2.mak from Steven Schultz, many changes. Now that ckudia.c has started blowing up the compiler, it is compiled separately without optimization. Added -DMINIDIAL to ckubs2.mak and restored -O for ckudia.c. Still blows up the optimizer (it didn't make ckudia.c any less complicated, only smaller), so I put back the separate compilation for ckudia.c without -O. Note: the local RS/6000 also chokes on ckudia.c, but it is not clear whether the compiler itself is choking, or the system is low on some kind of resource like swap space (the message is just "out of space"). However, compiling ckudia.c by hand without -O worked ok. There's no obvious way to change the makefile to do this automatically. Even with MINIDIAL, edit 184 got too big (again) for 2.11 BSD, probably because of additions to ckutio.c. Swapped modules among segments, and reduced and/or malloc'd the size of some of the static buffers in ckcfn3.c. Still too big. Went thru all the modules remaining in the root segment and tried to squeeze out bits of space. Still too big. Finally ... ftp'd the whole mess again, started over ... It works. Phew! ckubs2.mak, cku[tf]io.c, ckcfn[s3].c. Monday -- Fixed a bug with command editing when echoing is off, as in the ASKQ command. Previously, editing would delete back into the prompt. No more. ckucmd.c (but "?" doesn't work in ASKQ any more...) (It didn't before, either) Wed -- Problems observed during DIAL on VMS. The hangup operation renders the serial device useless until after it is closed and reopened. At the suggestion of Lee Tibbert at DEC, added a sleep() to tthang(), which partially cured the problem: it made the HANGUP command work OK, but DIAL still didn't work unless DIAL HANGUP was OFF. Added a few more minor flow-control related fixes to ttbin(), but they made no difference. Then I realized that tthang() was being called by ckudia.c before ttkpt(), so I rearranged the startup code in ckudia.c to be in sensible order: open the device, call ttpkt() on it, then try to hangup, then try to dial. But it made no difference. Another bad problem, as yet unresolved: After a DIAL failure, the next attempt to call ttbin() to put the device in binary mode always hangs in the sys$qiow() call. Wed -- Raised VMS C-Kermit's sleep in tthang() from 1 to 3 seconds, based on experiments and observations of modem lights. It's ugly, but it fixes the problems noted above, at least locally. ckvtio.c Changed UNIX ttpkt() to access the global flow variable rather than rely on its argument for setting flow control, as in VMS. ckutio.c. Changed "Time Remaining" in fullscreen file transfer display to "Est. Time Remaining". ckuusx.c. Changed protocol module to emit a CRLF after receiving a short-form reply to a REMOTE command (such as REMODE CD). Attempted to cure several minor instances of prompt-stomping reported by Christian Hemsing. ckcpro.w, ckuusx.c. Friday -- Thanks to reports from Kenneth W Cochran , discovered that \F...() function calls often failed to work when spaces were used to separate their arguments. Fixed in fneval() in ckuus4.c. Now leading and trailing spaces are stripped from all function arguments -- EXCEPT the first argument of \Frepeat(string,number) -- before evaluation. The exception allows \Frepeat to emit a given number of spaces, e.g. "\Frepeat( ,20)". Also, correct a problem with \Frepeat() -- it didn't explicitly terminate its result with a NUL. ckuusr.c. Added code from Stefaan Eeckels , Eurostate (CEC), Luxembourg, to the lowest-level communications input reader, myfillbuf(), to work for SunLink X.25 connections. It is called only if C-Kermit is built for SunLink X.25, and only if an X.25 connection is active. This should allow INPUT, SCRIPT, and similar commands to work on X.25 connections. ckutio.c. Monday Sept 28 -- Added support for Interactive UNIX System V/386 R3.2 from Richard C Gration , which allows for job control. Includes a new compile-time option, SVR3JC, for use on any System-V R3 based-system that supports job control. ckutio.c, ckuus5.c, ckuver.h, makefile, ckuins.doc, ckccfg.doc. Found that blank-stripping of function arguments could cause core dump. Reported by Kenneth Cochran. Cause: pointers returned by malloc() were being modified, so subsequent free() operations failed. Cure: strip arguments before pointing malloc'd pointers at them. ckuus4.c. Thu, Oct 8 -- From Lee Tibbert at DEC: . Don't #define DYNAMIC for VMS in ckcdeb.h if it is already defined. . Several variables unconditionally declared external in ckuus4.c were used only in UNIX. Put their declarations in #ifdef UNIX. . Fixed a small "strictness" problem in ckwart.c. . New ckvtio.c, ckvfio.c. . Completely new and rewritten CKVKER.COM, supporting Alpha, OpenVMS, and DEC TCP/IP (aka UCX). From Hunter Goatley -- added code to allocate the communication device in ckvtio.c. This is so people with SHARE privilege can't interfere with someone else already using the device. From Peter Jones -- added a makefile entry for HP-UX 8.0. In UNIX version: Removed SIGHUP trap in conint() in ckutio.c. Let system clean up after Kermit if the line hangs up. Thanks to Phil Beck of DEC for reporting the problem. In UNIX version: Initialize process groups to 0 in conbgt(), because apparently the ioctl(1, TIOCGPGRP, &foo) call only writes into the lower 16 bits of the word, so if the word is not init'd to 0, the upper half will be garbage, and comparisons will fail. This happens in SCO UNIX 3.2.2. Thanks to Walter Mecky in Germany. Also, added -DPID_T=pid_t to some SCO entries in the makefile that lacked this definition. In function inibufs() in ckcfn3.c, when allocating send-buffer info structures, initialize the packet address pointers to NULL to prevent core dumps when referring to unallocated packets, e.g. when debugging turned on and entering server mode. Reported by Christian Hemsing. Added fullscreen file transfer display support for OS-9, using MYCURSES path. From Christian Hemsing. Many ck9*.* files changed, plus minor changes to ckuus7.c and ckuusx.c. Another one from Christian Hemsing: C-Kermit was improperly attempting to decode incoming data packets when reception of a file had been interrupted before the new file was opened, and then call zmchout() to write the data to the not-yet opened file, but zmchout's buffer pointer is initialized by the file-opening routine, so we got bus errors, core dumps, etc. Fixed by having decode() return if one of the interruption flags is set *and* its output function is putfil. ckcfns.c. The following bit in ckudia.c: c2 = ttinc(0); /* Read a character, blocking */ if (c2 < 1) /* Ignore NULs and errors */ continue; /* (Timeout will handle errors) */ would have unintended consequences when ttinc() returned an 8-bit character; the sign would be extended, and the "continue;" would be executed. Changed to: c2 = ttinc(0); /* Read a character, blocking */ if (c2 == 0 || c2 == -1) /* Ignore NULs and errors */ continue; /* (Timeout will handle errors) */ Thanks to Fernando Cabral in Brazil. Sat Oct 10 -- New Data General AOS/VS files from Eugenia Harris at DG, plus a change to ckcfn2.c that allows AOS/VS C-Kermit to use the long-form ttinl() call. Fernando Cabral's CCITT modem is so different from a real CCITT modem that I added a new modem type for it: Digitel DT-22 ("set modem digitel"), and restored CCITT modem type ("set modem ccitt") to V.25bis purity. ckudia.c. Changed TRANSMIT to apply fmask (SET FILE BYTESIZE) mask to file characters before processing them. Sun Oct 11 -- More allowances for using DIAL with a TELNET modem server: Don't execute the speed-changing code if we have a network connection to the modem, and don't use "modem hangup" either (attempting to send the hangup string to a network modem after the network connection was broken was a bad idea -- unfortunately, there's no good way to tell if the connection is open). Also, added code to handle TELNET negotiation options during the DIAL process. Changed CONNECT command not to call mdmhup() after it got an i/o error when reading from the communication device. Also, changed CONNECT to be less confused about modem-type vs network-type when calling ttopen(). Makes a difference after a network-modem-server connection is broken and a new CONNECT command is given. ckucon.c, ckvcon.c, ckocon.c. Reversed the meaning of SET DIAL SPEED-MATCHING, at the reasonable urging of Fernando Cabral, who thought that ON should mean that Kermit attempts to match the speed reported by the modem. ckudia.c, ckuus2.c, ckuus7.c. Hunted down the OS/2 C-Kermit VT102 emulator bug in which the "vi" "p" (open for insert) command did not work right, which was also visible in in the VMS EVE editor. The problem was that ESC 8 (DECRC) was coded to "unsave" the saved cursor position and attributes as well as restore them, whereas a real VT102 lets the saved items be restored more than once. Seems OK -- vi session log plays OK now, EVE seems to work OK, and we still pass "vttest". ckocon.c. Fixed a bug reported by Tom De Bellis: If OS/2 C-Kermit is connected to a modem that is turned off, and you SET CARRIER OFF, then HANGUP (or H during CONNECT) hangs the program. Diagnosis: C-Kermit gets stuck in the mdmhup() routine. SET DIAL MODEM-HANGUP makes the problem go away. Workaround: change mdmhup() -- for OS/2 only -- to fail if carrier is not present. ckudia.c. Real cure (I don't know how) -- set the modes in the serial device driver to make it ignore all modem signals (including DSR and CTS) when CARRIER is set to OFF, if that is possible. New binaries based on today's version for various UNIXes, plus (from Bruce J Moore) the Atari ST. Locally, built ok on Sun, VAX/VMS, NeXT, OS/2, RS/6000. Monday Oct 12 -- Removed a lot of superfluous, test-oriented sunos41xx entries from the makefile. Discovered that I broke the TRANSMIT command a couple days ago by applying the file bytesize mask before checking for the eof return code. Fixed in ckuus4.c. A couple more updates for OS-9 from Christian Hemsing. Changed SET LINE command for OS/2 to accept 1..4 and synonyms for COM1..COM4, rather than treating them as file handles. Preserved the file handle business by allowing "_" (underscore) as a prefix, e.g. "SET LINE _4" -- in which case C-Kermit simply strips the prefix (however, this last bit doesn't seem to work -- "set port _4" just says "doesn't match keyword"). ckuus7.c. New makefile entry for SunOS 5.1 == Solaris 2.1 (Alpha 3.2) from Patrick Wolfe . Tuesday -- Fixes to OS/2 CONNECT-mode hangup procedure from Kai Uwe Rommel. ckocon.c. Installed DEC TCP/IP support in the VMS version, mostly from Lee Tibbert at DEC. This was based on edit 181, and required some rather careful reconciliation with the current edit. Cleaned up some of the conditional compilation -- now all the items that DEC, Wollongong, and TGV have in common are lumped together under VMSTCPIP. Also another updated version of CKVKER.COM, the build procedure, from Lee. Also a new CKVKER.MAK from James Sturdevant, that follows CKVKER.COM. I updated all of these to include a new header file, CKVIOC.H, and a new module, CKVIOC.C -- ioctl() similation for DEC TCP/IP only. Lee, as well as Bill Patterson (who was also working on this), complained that the first file transfer initiated from VMS C-Kermit after it had made a TCP/IP connection over UCX didn't work. I also received a similar complaint from Chris Green in England about SunLink X.25 connections. In the VMS case, this was traced to VMS C-Kermit invariably losing the first few characters of the first ACK to its S or I packet. This most likely has something to do with netflui() and/or nettchk(). The DEC TCP/IP version of nettchk() always returned 0, which was wrong -- I fixed it to return the number of characters in the internal buffer (ttibn). But that didn't do it. However, this revealed a flaw in the input() routine in system-independent protocol code: the Kermit on the other end, having sent its ACK for packet 0, is now awaiting packet 1. It doesn't come, so it sends a NAK for packet 1. Until now, C-Kermit improperly treated this as equivalent to an ACK for packet 0. But S and I packets are a special case, because their data fields contain crucial negotiation information. So I (a) fixed a stupid bug in input() in which it calculated the previous packet number incorrectly, and (b) made it treat missing ACKs to S or I packets specially -- retransmitting the S or I packet, rather than going ahead and transmitting the next packet without knowing what parameters had been agreed to. This works around the problem by handling the missing ACK correctly, but it's not the real cure -- why are the characters chopped off in the first place? nettchk() and netflui() still need some work. ckcfn2.c. A strange discovery: When Kermit is built with DEC TCP/IP, it works on a system that has TGV MultiNet TCP/IP! Terminal connection and file transfer both work... (Later, Terry says that MultiNet has a UCX-emulation mode.) Wed Oct 14 -- Rewrote CKVKER.COM again, to allow a consistent way of selecting (or disabling) network support. CKVKER.COM, CKVKER.UPD. Fiddled with DEC TCP/IP nettchk() in CKCNET.C. Enabled the use of the FIONREAD ioctl, which seems to work just fine. However, the FIONBIO ioctl doesn't seem to work all the time, but -- as far as I can tell -- it's not needed for DEC TCP/IP. It was used in nettchk() only so the MultiNet code could tell if a connection dropped, but apparently the DEC code can, so that part of nettchk() is #ifdef'd out for DEC TCP/IP. Now that nettchk() works, CONNECT goes fast, and file transfer seems to be OK (it's hard to tell because the network is badly clogged today). Goes fast with localhost. But we still have the problem in which the first incoming packet is sometimes beheaded. Changed sipkt() in ckcfn2.c to skip the ttflui() call if ttchk() says no characters are waiting, since this seemed to be the sticking point before, but is not a total cure. ------------------------------ 5A(183) Sun Aug 23 16:04:02 1992 OS/2 A new version of C-Kermit for OS/2, based on edit 182, from Kai Uwe Rommel at the Technical University of Munich, Germany. His notes: - "curses" support for OS/2, uses the MYCURSES VMS code. This is far fast enough for OS/2, which has a very fast ANSI interpreter. - signal() return value fixed. - Different 8.3 and HPFS file name (esp. backup file name) handling with detection/translation of invalid FAT (8.3) names and transparent names on HPFS. - Preliminary changes for 32-bit compilers (not working yet, but pretty close, I think). I will finish that next. - Additional file transfer progress display. "Poor man's" curses display, i.e. only one line of incremented counters. Enabled by "SET FILE DISPLAY SIMPLE". Uses only CR and overwriting. - Network support for DECnet LAT for OS/2. New module ckonet.c where other networks support can go into too (TCP/IP). New header ckolat.h. - Hooks for LAN Manager named pipe network support (has to be added yet). - Fixed terminal-emulator/command-mode console mode switching (ttres() calls) and interrupt handling (SIGINT, SIGBREAK). - Added ESC sequence detection and protection from character set translation for OS/2 CONNECT mode. - Priority adjustments for communication threads (should make transfer in background more reliable and reduce lost characters). - New ckoker.mak with already added targets for 32-bit compiles (not working yet). - More correct settings for predefined system-dependent variables (e.g. \v(host) etc.). - Made command line option handling (open file descriptors) conforming to Unix version. - Fixed maximum dial timeout (see my comment in ckudia.c). - Added two fields for raw througput for STATISTICS display. - Made default tty CON, although that makes no sense for OS/2, but specifying any of the COMx ports causes error messages for some people who have their mouse on that port. - Added dummy "EXTPROC" command. This allows selfrunning Kermit-scripts, just like #!kermit under Unix by specifying "EXTPROC CKERMIT" as the first line in a .CMD batch file. - Added a few missing prototypes for recent additions. - Added More? prompting for OS/2. - Prototype for OS/2 zchdsk again changed to int argument instead char (some compilers warn in this case). - Fixed a few int/long mismatches. - Control-Space could not be distinguished from normal Space. This annoys remote Emacs users. This does now work as expected. - The +-*/ and ENTER keys on the PC numeric keypad could also not be distinguished from their normal counterparts. Also fixed. - No key could be set to send the NUL character (for Emacs users). My current solution is somewhat ugly but I have no other idea. Planned features: - 32-bit gcc version. - LAN Manager named pipe network support. - TCP/IP (I don't have access to TCP/IP yet). Far away. - Auto parity detection. - Keyboard timeout emulation. - Kanji support (?). Far away. - Enhance terminal emulation (full VT-102, VT-320 ?). - Tektronix emulation (?). Far away. Over the weekend, we sent changes and files back and forth like mad, so now the OS/2 version is totally up to date with edit 183. Later, I installed OS/2 on my PC as well as Microsoft C 6.00 SDK. Fixed various bugs in ckocon.c, made some cosmetic changes, added Kanji file transfer support, added Alt-key command equivalents for many of the Ctrl-]* CONNECT-mode escapes, and then added SET TERMINAL { ARROW-KEYS, KEYPAD-MODE, TYPE, WRAP } for OS/2. Also discovered that there was no code at all to make numeric keypad mode work, so I added it. ckuus[457].c, ckuusr.h, ckocon.c. Still later, Kai Uwe took my changes back and added more of his own: - Some debugging support in ckcdeb.h for IBM C (helped me find the maclvl bug). - Changed prototype and added defines for OS/2 in ckcdeb.h. - Changed text to tell the difference between modem and DTR hangup in ckudia.c. - Fixed home directory in ckufio.c, for OS/2, it depends on sysinit() in ckotio.c. - Added (untested) support for 76800 and 115200 baud for OS/2 2.0. I can't test it since none of my COM drivers supports it. Perhaps it is only supported on IBM's Model 90/95 with their DMAing COM ports. However, it is documented and should work. - Fixed SET KEY bug with single characters (caused \-1) in ckuus3.c. - Fixed maclvl bug in ckuus5.c in xwords(). - Fixed off-by-one error in MYCURSES code for fullscreen file transfer display. - Changed stack size and data allocation in makefile for MS C. - Changed some IBM C options in makefile and added debug target for it. - Fixed (thanks to Michael Godfrey) some bugs for CONNECT mode and IBM C. - Increased scrollback buffer to 240 lines. Added support for linewise scrolling with Ctrl-PageUp/Down and "goto top" with Home. Note: 240 is the upper limit for the 16-bit version, because that requires nearly a 64k buffer. Increasing it further would require large changes. For the 32-bit version, it could simply be increased further. - Fixed XON/XOFF handshaking. It was really buggy and seems to work fine now with my V.32/V.42bis modem at 19200 DTE speed. - Added RTS/CTS handshaking. I have learned a lot about this in OS/2 while implementing it! BTW, when it is turned off, RTS is still kept on, in case some modem requires it. - The handshaking support is (from my point of view) now clean and working. - Added CARRIER detection (i.e. implementiation for SET CARRIER). Requires SET CARRIER OFF, of course, when the SCRIPT or CONNECT commands are used to talk to the modem before dialing and establishing a connection. - To make that useful, keyboard timeout was implemented, so CONNECT closes automatically when carrier is lost (and SET CARRIER is not OFF). - Minor changes to some status line texts. - Minor adjustment to cursor on/off optimization. - Added some messages for reason of closing CONNECT. - Fixed screen blinking problem for fullscreen usage and some bright colors. - Fixed some return values from conect(). - Made DECnet network support compilable with 32-bit IBM C. Completely untested, don't have that at home. I will be able to test this in about two weeks only. (However, continues to work as ever with MS C, i.e. 16-bit version). - Fixed DTR hangup. - Added Codepage recognition for FILE CHARACTER-SET default. - Added "home" directory, where C-Kermit was loaded from. - Fixed keyboard interupts, i.e. added SIGBREAK too. - Fixed ttpkt() and ttvt(). - Fixed BREAK sending functions according to OS/2 docs. - Added separate \127 scan code for backspace key and \639 for Control-Backspace. Keypad keys (including Enter) also have separate scan codes (as before already). - Added alarm() implementation for IBM C and rewrote the MS C version for efficiency. Required for DIAL timeout, SCRIPT timeout and the mentioned keyboard timeout. - Added popen() and pclose() for IBM C, but still untested. Bugs remaining on my list: - Some other keys in CONNECT mode, Help/Hangup etc. - Any kind of printing??? PrintScreen?? Print commands? - Tabulators? - READ / OPEN don't work. - Auto parity detection not implemented. I don't think that this is really important. Difficult. - Network support for TCP/IP and named pipes could be added. - VT-102: some bugs? Later, changed sysinit() in ckotio.c to add terminator to startup directory so \v(home) would work right, e.g. \v(home)ckermit.ini. Still later, fixed two more bugs: (1) the READ command did not work right (fixed by opening the READ file in "rb" mode in ckufio.c), and (2) handling of tabs by the terminal emulator was badly messed up (fixed in ckocon.c). MACINTOSH From Paul Placeway : I recently got a high speed modem (a Digicom Scout Plus v.32bis/v.42bis; inexpensive and works well), which motivated me to look just a bit harder at the screen drawing code, speed things up a bit, and fix a few bugs. This version: Fixes the problem that caused Kermit to bomb while drawing to a window while the user tries to scroll back. Fixes a couple of long-standing bugs in the insert and delete multiple characters code. Fixes a few problems with the jump-scroll logic and code. Implements double-width characters the right way internally, including correct behavior for copy and paste. Can keep up catting /etc/termcap, running on a Mac IIcx with a mono full-page display, running a 67 line window in Courier 12pt, connecting through a v.32bis/v.42bis modem connection with the terminal set at 56 kpbs. Does file transfers to the Mac a bit faster by doing background file cache flushes every couple of Ks, which keeps the Mac from saving it all up and doing it all at once. Fixes the transfer thermometer when sending from the Mac, and makes this code less incestuous with the ckc* file management code. When built with the final edit 183 sources, the file transfer display was messed up again: no filename, no as-name, no file size, no percent done, no thermometer. The display is OK when receiving files. The code is in ckmscr.c -- I took a look at it, but couldn't see anything obviously wrong. So I put back the earlier version of ckmscr.c (from edit 182) and everything is fine (the only reason Paul changed ckmscr.c was to work around bugs in the mainline code, bugs which I had alread fixed behind his back). UNIX Added support for 4.4BSD-Alpha, whose terminal driver is a wonder to behold: a mixture of System V, POSIX, and 4.3BSD. Compiles cleanly and runs OK on a 68040 machine, but I had no way to test if SET LINE or DIAL work. Remote-mode file transfer is OK, TELNET works fine. Includes (untested) SET FLOW RTS/CTS. Mostly ckutio.c. The alleged controllability of RTS/CTS via ioctl() in System V R4/386 appears to be a hoax. Tested on Dell UNIX, found to do nothing, and verified with Dell engineers -- that's how it comes from USL, so probably all SVR4/386 implementations lack this capability, despite the existence of and the related system calls. Reshuffled overlays for 2.11BSD after the DIAL command got too big. Still works! And we still have about 2K left in the last overlay. On the AT&T 6300 and 3B1, it was found that using the curses display made console i/o slow and jerky thereafter. Turns out that curses (at least on these systems) makes stdout block-buffered. Andy Fyfe discovered this and sent in code that can be included (on System V systems) by defining CK_NEWTERM, which substitutes newterm() for initscr(), and gives a duplicated file descriptor to curses, so when we come back from curses, it hasn't messed with stdout. Andy suggests that CK_NEWTERM might be a good default for all System-V based implementations. Added a makefile entry for AT&T 6300 UNIX PC with curses and shared library, called sys3upcshcc. Peter Mauzey. The SUN version, during CONNECT mode on a serial line, was no longer popping back to the prompt when the remote hung up. It seems the new buffered CONNECT code was not checking the return code from ttxin(). It also seems ttxin() was not returning a failure code in the myread() case. Both of these problems were corrected, but we still don't pop back. Aha, discovered that edit 182, in commenting out all the directory-related stuff from ckutio.c, I ruined the creation of the symbol BSD42, which in turn is based on MAXNAMLEN, which comes from a directory-related header file, and this, in turn, caused MYREAD to not be defined. Uncommented these includes. ckutio.c. The close(open()) business in ttopen() neglected to set O_NDELAY (as it does in tthang()), causing Kermit to hang on the open call (on some systems). Diagnosis and cure by Dave Johnson, Gradient Technologies . Made some changes in ttoc() to try to eliminate the core dumps that were occuring on some systems (which I can't reproduce), particularly during network connections. Also added debug() calls everywhere in ckutio.c that calls alarm() or signal(SIGALRM,xxx). ckutio.c. Fixed up the sunos41gcc entry in the makefile. The resulting wermit executable is 42K smaller than with SUN cc. It doesn't seem to work if curses is added, several routines from the termcap library can't be found (this is apparently size-related). In UNIX C-Kermit, I now enable hardware flow control during CONNECT (ttvt) as well as file transfer (ttpkt). No reason not to, right? I moved all hardware-flow-control-related code into a new internal routine, tthflow(), in ckutio.c. Also, enabled RTS/CTS for SunOS 4.1 (normal BSD make) by doing a System V call (in tthflow), and defining CK_RTSCTS for SunOS 4.1 in ckcdeb.h. Also, merged the UTEK hardflow() routine into tthflow(), and fixed the UTEK code to use DTR/CTS handshaking once again (I think I must have broken it a few edits ago). Removed the horrible hack by which SET FLOW RTS/CTS was implemented on the NeXT because it only worked if the SET FLOW command was given *before* the SET LINE command. ckuus7.c, ckcdeb.h. Added a bunch of #undef's to the SunOS System V make to get rid of the "duplicate definition" errors caused by several Sun header files defining the same symbols (e.g. termio.h and ioctl.h). ckutio.c. Added a makefile entry for Motorola MVME147 System V/68 R3 V5.1 from Eigil Krogh Sorensen . New makefile entry and support for 386BSD (Jolix) from Hellmuth Michaelis , Hanseatischer Computerservice GmbH, Hamburg. New makefile entry for ICL DRS6000 DRS/NX from Phil Race at ICL. VAX/VMS Fix for fencepost error in CKVFIO.C: when uploading a text file to VMS, and a line break occurs exactly at the end of the 32K output buffer, a carriage return is lost. From James Harvey at Indiana/Purdue University. Defined IFDEBUG for VMS. Adds less than 5K to the .EXE file, and speeds up file transfer by anywhere from 6% to 31% (according to my measurements). Also, this seems to have fixed the UCX problem (in which it wasn't possible to send packets longer than 76 to C-K/VMS if you were accessing the VAX via TELNET and it was running UCX or CMU/Tek TCP/IP). Later, it turns out that it fixed the UCX problem only for people coming in over relatively low-speed WAN connections, but not for high-speed LAN connections. Fundamental changes are needed. ckvker.mak, ckvker.mms, ckvker.com. VMS Makefile now reads C compiler options from logical name LOCALOPTS, so now you don't have to edit the makefile to alter the compilation options. Terry Kennedy. Made KANJI support the default for VMS C-Kermit. Only adds a few K and doesn't hurt anything. Without this, Japanese sites that don't have C compilers would have no way to configure Kanji support. ckvker.{mak,com,mms}. Removed current directory from VMS init-file search list. DATA GENERAL AOS/VS For the first time in the C-Kermit 5A development cycle, we have a Data General AOS/VS version, thanks to Eugenia Harris of Data General, complete with TCP/IP support. OTHER UPDATED VERSIONS Atari ST, from Bruce J Moore. Now supports tilde notation in filenames, but only for "self", not other users. Environment variable HOME must be present. SET FILE COLLISION UPDATE bugs fixed. Amiga... ??? OS-9: Another new ck9fio.c from Christian Hemsing. Chris's notes: When a remote server command created more than one child process and the command was cancelled prematurely, zclosf() only killed the forked process even though a whole process tree might have been created in the meantime by the remote command. Then several processes were simply left over (under OS-9). They didn't do any harm except using memory, but would have to be killed by hand eventually. Now Kermit cleans up all processes. Also, a fix to the OS-9 CONNECT command, relating to flow control upon escaping back to prompt. Plus new versions of the build files, ck9ker.mak and ck9ker.gcc. FILE TRANSFER DISPLAY Adapted Kai Uwe's "simple" display to take up a bit less screen space (and memory) and renamed it to "crt", since it works on any CRT, and the word "simple" might upset some people. Made a lot of adjustments to handle odd cases like zero-length files, unknown-length files, files whose sizes change when you transfer them (e.g. text files between VMS and UNIX), etc etc, to prevent bizarre-looking transfer rates and percents (like 125% and still going, or 37% and complete). Later, even more refinements from Kai Uwe. ckuusx.c. Changed the serial display to print a dot for every K transferred, rather than for every 4 packets. This involved only slightly more arithmetic, and it gives a much better indication of how the transfer is progressing. The number of dots shown for a particular file is now always the same, no matter what the packet size. ckuusx.c. Simplified and consolidated the "crt" and "serial" display code, so now hopefully it's easier to understand and modify. ckuusx.c. Fulvio Marino noticed that during multifile transfers, the "remaining time" shown in the fullscreen display was pretty strange for files after the first one. Diagnosis: the elapsed time returned by gtimer() was based on the entire file group, not the current file. Cure: keep track of when the current file started. ckcfns.c, ckuusx.c. Moved "Time remaining" in fullscreen display to its own field for increased legibility. Made the time remaining, percent done, and several other fields update themselves less frequently. At end of transfer, show total elapsed time. Various other bits of tuning to the fullscreen display. (At least) one tiny problem remains: System V curses endwin() always seems to put the cursor at the bottom of the screen, no matter where Kermit leaves it, so when the prompt is issued after a file transfer, the display scrolls up one line -- a minor annoyance. With the BSD curses library, the display stays put. ckuusx.c. Fixed the "double error screen" problem, in which an E packet caused the curses screen to be closed, and then reopened, usually so fast you couldn't see the error message. Also, improved the output-file opening code to show the actual system error string in the error message, but only for BSD4 and ATTSV, since I don't know which other versions support errno and sys_errlist[]. Several modules. Added code from Andy Fyfe to show seconds remaining instead of CPS in CRT display, but did not activate it. It's within #ifdefs that aren't turned on. DIALING AND COMMUNICATIONS Added a new flow-control option, KEEP, and made it the default. KEEP means don't touch or change flow control. This lets users set flow control on the login terminal or SET LINE device outside of Kermit, and lets Kermit use it, whatever it is. Previously, Kermit would always try to accomplish the current FLOW-CONTROL setting (default Xon/Xoff) whenever you CONNECTed or entered packet mode. ckcdeb.h, ckuus3.c, ckuus4.c, ck[uvwo]tio.c. Added support for CCITT V.25bis modem dialing: SET MODEM CCITT, based on information from Fernando Cabral in Brasilia who sent in some code for it based on C-Kermit 4C. Adapted the code to 5A dialing conventions and augmented it from my copy of V.25bis in the CCITT Blue Book. Totally untested, but it doesn't seem to break the other modem types. ckudia.c. Later, got confirmation from Brazil (after sending the entire new C-Kermit source code by e-mail!) that the CCITT support works. Still later, got a few corrections to it from Fernando. Added support for Telebit T1600 and T3000, based on T3000 modem and manual. What a nightmare. These modems are grossly imcompatible with the original Trailblazer in terms of the commands they accept. I'm assuming that the T1600 is the same as the T3000, based on info from Fernando Cabral. Unfortunately, I have little idea about the T1000 or T2500 or other models. Rather than add a whole raft of new commands, I ask the modem its model number with ATI. Trailblazer reports "962", T3000, T1600, and WorldBlazer report "965", T2500 reportedly reports "972". For now, if the modem responds with anything else (or doesn't respond at all), I skip the model-dependent commands. ckudia.c, ckcker.bwr. In the process of adding the new Telebit support, I also fixed a problem reported by Charlie Finan : if an AT-command-set modem was in No-Echo (E0) Non-Verbal (V0) mode, its responses were not read correctly. Fixed in getok(), ckudia.c. All 4 combinations -- E1V1, E1V0, E0V1, E0V0 -- should now work. New Telebit / Hayes / timing-out code tested with original Trailblazer, T3000, original Hayes 1200, Rolm 244PC (Hayeslike), and Rolm DCM. Changed SET DIAL TIMEOUT to accept a default of 0, meaning "auto". ckuus7.c. Removed restriction on DIAL command that it can only be done on a serial connection. It should now be possible to (for example) SET HOST to a reverse terminal server to get a dialout modem, and then dial it, provided you give the commands in this order: SET HOST SET MODEM HAYES (or whatever) DIAL Suggested by Bill Davidson at Cray Research. Completely untested. The way this is presently accomplished is not great. The same variable is used for modem type and network type -- if it's positive, it's the modem type, if it's negative, it's a network type. Separating the two quantities into separate variables is not feasible right now, since it would mean rewriting and testing the system-dependent code for all eight C-Kermit implementations. The way it is now, if you SET HOST after SET MODEM, it writes over the modem setting. Changed SET DIAL DIRECTORY to open the file and keep it open, rather than just checking its existence and recording the name. The DIAL command now uses the open file descriptor, rewinding the file, rather than trying to open it by name, which would fail if the user had CD'd to another directory since giving the SET DIAL DIR command without an absolute pathname. SET DIAL DIR with no filename closes the file, as does EXIT. ckudia.c, ckuusr.h, ckuus[67].c. NOTE: There is still no command to display the directory, other than TYPE. Another approach would be to read the directory into a structure in memory. Then we could have various commands to deal with the structure: list the whole directory, display certain entries, and even put the entry names into a keyword table so "DIAL ?" would list them. But that would be yet another potentially memory-hungry addition to an already overly memory-consumptive program. Of course, it would only use lots of memory if the user had a huge dialing directory. A large-enough directory could cause malloc() to fail, whereas the file-rewinding approach can handle directories of any size at all. Fixed dialing directory lookup to work with abbreviations of directory entries. Fixed oversights in the dialing directory code, noticed by Kai Uwe Rommel: tabs were not recognized as field separators, and line terminators were not stripped. Later, fixed a bug in the routine that breaks the dialing directory entry into separate words, also noticed by Kai Uwe. ckuus5.c. Jay Rouman reported bizarre behavior on a SUN dialing out with a Hayes modem when the remote hung up. Traced to new mdmhup() routine. It neglected to put the device back into "DIALING" mode, i.e. to make it ignore carrier, before trying to output characters (like +++ATH0) to the modem dialer, resulting in i/o errors, which in turn made CONNECT send beeps to the screen. Fix installed, but I don't have the configuration to test it here. Later, Jay confirmed it works OK. Also changed CKUCON.C to call mdmhup only if the user explicitly requested hangup via H. If the other side disconnected, there's no need for mdmhup. ckucon.c. Added mdmhup() feature to VMS CONNECT command. ckvtio.c. There was one case in getok() (the modem command response reader) in ckudia.c that returned without turning off the timeout alarm. Found by Dave Wexelblat. The symptom was a core dump when he did ^\H (hangup in connect mode). The problem was there all along, but was never noticed till now, because ^\H calls mdmhup(), which uses getok() to read the modem's response to ATH0 or whatever. Added support for SET DIAL KERMIT-SPOOF to Microcom modem type. Untested. Left in COMMENT section. Not only do I not know if it works, but it might work on some Microcom models, but upset other models. ckudia.c. Added S7 carrier-wait support for Courier HST. Not tested. ckudia.c. Added new response messages for Rolm CBX software release 9005. ckudia.c. In the process of testing the new Telebit support, found that the timeouts were really screwed up. Sometimes the dial timeout would never occur. Tidied this up in several ways -- made sure that ttoc() saved and restored the current alarm and alarm handler, and ditto for ttinc(), when called with a timeout interval. Removed a bunch of unnecessary alarms() and signal()'s from ckudia.c, and tried not to have a SIGALRM handler active unless it was needed. Changed sysinit() in ckutio.c to include "signal(SIGALRM,SIG_IGN)" so that when we save and restore alarms, we start out with something sensible. Also changed ttinc() and ttoc() to save and restore the previous alarm value. ckutio.c. FIXES Oops, missed one of the unquoted #includes in ckcmai.c. Peter Mauzey. Discovered a truly horrible bug. If you started C-Kermit without an initialization file, the CD command (when given with no argument) crashes the program. Fixed in ckuus5.c. And another: the \Feval() function would core dump if you used it to divide by zero. Now it returns -1. ckuus5.c. And another: the negotiated sliding window size was only effective for the first file of multifile transfer. After the first file, the window size would drop back to 1 and stay there. Fixed in ckcpro.w. And fixed a related bug, reproduced as follows: SET WINDOW 4 on both ends, then transfer files using 4 window slots, then SET WINDOW 1 on both ends, then send a file from C-Kermit. It uses 4 window slots even though the other Kermit asked for 1. Fixed by initializing wslotn (the negotiated window size) to 1 in tinit(). Also made sure that C-Kermit sent "!" (= 1) in the S-packet under these conditions (previously it sent a blank). ckcfns.c. Fixed a lingering protocol problem. C-Kermit gets an S-packet (containing protocol parameters), ACKs it, and then releases the send-buffer, so the ACK is gone. Then the S-packet comes again, e.g. because the other Kermit didn't get the ACK. The old ACK is no longer there to be retransmitted, so C-Kermit sent an empty ACK packet which would, of course, screw up everything that comes after because the two sides have different ideas about which parameters were negotiated. So now C-Kermit saves a copy of its init string so if it has to retransmit the ACK to an S or I packet, the ACK contains the right data. (I thought I had fixed this in an earlier edit by adding code to rpar() and resend() -- which I did -- but the resend() routine was not being called at the place in the input() routine where the problem occurred.) ckcfn2.c. Fixed SET FILE BYTESIZE to work when sending files. ckcfns.c. Fixed SHOW CHARACTER-SETS and SHOW TERMINAL. The shotcs() routine was looking in the wrong table for the terminal character set name. Also changed it to skip synonyms and show the primary name (e.g. "macintosh-latin" rather than "apple-quickdraw"). ckuus5.c. Chris Hemsing discovered why the file size in the file transfer display is sometimes clobbered when sending files (apparently it is *always* clobbered in some implementations, like OS-9, and definitely on the Mac). fsize was getting set to -1 in resetc(), after fsize was set earlier when we got the info about the file. (Kai Uwe noticed this too in the OS/2 version.) This fixes the file transfer thermometer on the Mac. ckcfns.c. The following kind of construction never worked right: IF blah command ELSE IF bleh command ELSE command You couldn't have more than one ELSE because if "blah" was true, the first ELSE was skipped, which means the 2nd IF is also skipped, which means the 2nd ELSE is diagnosed as not following an IF, causing an error. Fixed by allowing ELSEs to also follow ELSEs. ELSE not following an IF or an ELSE still causes an error (as it should), but a dangling ELSE (e.g. and IF followed by 2 ELSEs) does not -- but it does no harm either (it's treated like a comment). So now you can make big long chains of IF-ELSEs, like: define foo if not def \%1 error,- else if not numeric \%1 error {"\%1" - Not a number},- else if = \%1 0 echo zero,- else if = \%1 1 echo one,- else if = \%1 2 echo two,- else if = \%1 3 echo three,- else if = \%1 4 echo four,- else if = \%1 5 echo five,- else if = \%1 6 echo six,- else if = \%1 7 echo seven,- else if = \%1 8 echo eight,- else if = \%1 9 echo nine,- else echo I dunno From James Sturdevant, fixes to INPUT and REINPUT that prevented them from finding "abababc" in "ababababc". ckuus4.c. Andy Fyfe discovered that if you define a new macro whose name is an unambiguous prefix of an existing macro, the existing macro is deleted. Fixed in ckuus5.c. Rearranged SET SPEED keyword table to be alphabetical again, after addition of several new line speeds. ckuus3.c. OTHER CHANGES Added MSLEEP / MPAUSE command. Like PAUSE / SLEEP, except milliseconds instead of seconds. ckuusr.[ch], ckuus6.c. Added WRITE ERROR command. Just like WRITE SCREEN, except it writes to stderr. ckuusr.h, ckuusr.c. Added SET TERMINAL CR-DISPLAY { CRLF, NORMAL } to control the display of incoming carriage returns on the screen. Like SET TERMINAL NEWLINE, but in the opposite direction. Done at the request of various people who use C-Kermit to connect to devices (lab instruments) that only send CRs at line end. ckuusr.h, ckuus[257].c, ckucon.c, ckvcon.c, ckocon.c, ckdcon.c. Added SET TELNET NEWLINE-MODE { ON, OFF }. Just like SET TERMINAL NEWLINE, but applies only to TELNET connections. Default is ON, i.e. Kermit sends CRLF when you type CR. When OFF, Kermit sends CR and NUL, as required by the TELNET specification, RFC854. ckuusr.h, ckuus[234].c, ckucon.c, ckvcon.c. Didn't do ckdcon.c -- it appears to be way behind, needs a lot of work. Also made the TELNET NEWLINE-MODE apply to file transfer packets. If C-Kermit has a TELNET connection, and the packet terminator is CR, a LF or a NUL is sent after the CR, according to the TELNET NEWLINE-MODE setting. ckcfn2.c. Added SET INPUT SILENCE . The longest interval of silence that will be tolerated by the INPUT command. Can be used to cause INPUT to fail before the specified timeout on the search string. ckuusr.[ch], ckuus[457].c. Changed INPUT command to accept a null search string, in which case it waits for any character at all. ckuus4.c. Added a new variable, \v(inchar), which holds the last character that was read by the INPUT command (whether it succeeded or not). ckuusr.h, ckuus4.c. Changed INPUT to ignore NUL characters coming from communication device. They aren't stored in the INPUT buffer, and they don't figure into string comparisons. However, an arriving NUL still counts as a character if the search string itself is null. This change allows string operations to work on the \v(input) variable. Added SET FILE INCOMPLETE as a synonym for SET INCOMPLETE. ckcker.h, ckuus7.c. Fixed IF DEFINED to not report that certain quantities (such as "\a") were defined. ckuus6.c. Changed xxstring() to recursively evaluate the contents of the parentheses in \$(xxx), \v(xxx), and \m(xxx) constructions. This allows, for example, variables to hold environment variable, builtin variable, or macro names, and their use in constructions such as "if defined \m(\%a)". ckuus4.c. Disabled handling of "mail" disposition for incoming files for AOS/VS, OS/2, Mac, etc. So now C-Kermit will refuse incoming mail right away, rather than receiving the file and then complaining afterwards that it couldn't mail it. ckcfn3.c. Changed the method for parsing macros. Previously, if a top-level keyword parse failed, we stuffed "DO " into the beginning of the command buffer and forced a reparse. This worked, but resulted in much confusion when the user edited the command, allowing (for example) deletion into the prompt. Now we take care of this in a different place, and instead of stuffing "DO ", we simply pretend the user typed the DO command and go try to process it. If the first word in the buffer is not a macro name, cmkey says "?No keywords match". Changed DO command in a very small way: IF the DO command fails, it sets the FAILURE flag (as before), but if it succeeds, it does not touch the FAILURE flag. This lets us write macros that begin with IF SUCCESS or IF FAILURE, and use them to test the preceding command, for example: DEFINE CHKERR IF FAIL STOP 1 \%1 ckuusr.c. In the few cases where it was possible, I made the default FILE CHARACTER-SET be the normal character set for: NeXT, DG AOS/VS, Macintosh, A/UX. ckuxla.c, ckmxla.c. Defining NODEBUG no longer removes session-debugging capability; SET DEBUG SESSION now works even if C-Kermit was built with NODEBUG. Suggested by Peter Mauzey. ckuusr.c, ckuus3.c. Added help text for SET DEBUG. ckuus2.c. At the suggestion of Bo Kullmar, C-Kermit now prints "Type X or E to cancel" (or the System-V equivalent) when the user gives any REMOTE command that might generate a prolonged reply, such as REMOTE DIR, REMOTE TYPE, REMOTE HOST. ckuus7.c Changed the keyword help-giver to show all the (visible) commands that start with the characters typed so far, even when the characters typed so far identify a complete keyword. Previously, if you typed (for example) "c?", it would only show you "c", which is a synonym for CONNECT. Now it shows you all the commands that start with C. ckucmd.c. Discovered that the new built-in ERROR macro (edit 182) did not work as intended. The END 1 in its definition applied to the ERROR macro itself, not to any macro or TAKE file that happened to be calling it! ckuus5.c. Changed the STOP and END commands to allow an optional text string after the numeric return code. If given, it is printed. Now STOP and END do what the FATAL and ERROR macros were supposed to do, and they do it faster. FATAL is still available and still works. ckuusr.c. Updated malloc() debugging package, ckcmdb.c, from Howie Kaye at Columbia. Use with "mermit" makefile entry to build a version of C-Kermit that traps malloc() errors. Untested. Made '-s' command-line option call zchki() on each file for all implementations, not just UNIX, so "kermit -s xxx" would fail immediately when xxx doesn't exist or is not readable. ckuusy.c. Changed the TRANSMIT command, when FILE TYPE is BINARY and TRANSMIT ECHO is ON and TERMINAL ECHO is REMOTE, to use ttchk() to decide whether to read and echo characters, rather than doing an unconditional 1-second timed read, which slows TRANSMITs down tremendously if the remote end is not echoing and the user didn't know to SET TRANSMIT ECHO OFF or TERMINAL ECHO LOCAL. ckuus4.c. Moved a big chunk of code from opena() to gattr() -- the code that sets text or binary mode based on the incoming Attribute packet when receiving files. This allows the file mode to be displayed correctly when rpack() gets the first data packet. ckcfn3.c Replaced CP850/Latin-1 and CP437/Latin-1 translation tables with new versions that leave the C0 controls alone. Never actually tried to use the vanilla IBM CDRA tables before, but it's not pretty when you're stuck with them, as in OS/2 C-Kermit -- Ctrl-T, Ctrl-U, etc, don't work. ckuxla.c. Changed CONNECT module to send TELNET AYT and IP in a single write, rather than each character singly. ckucon.c. Removed unneeded "extern int parflg" from ckcfns.c. There was a conflict between the stupid DIALING and CONNECT symbols, which were used to overload the flow-control paramater to ttpkt(), and symbols that were defined for certain obscure types of hardware flow control. I got rid of the the DIALING and CONNECTED symbols entirely, and defined new FLO_xxxx symbols (with unique values) to take their place. ckcdeb.h, ckudia.c, ckutio.c. Removed #undef CK_RTSCTS etc from ckcdeb.h so they can be defined in CFLAGS (not that defining these flow control symbols will necessarily result in anything useful). Improved formatting of SHOW MACROS to separate each definition with a blank line, to indent continued lines, and to indicate continued with dashes. At Andy Fyfe's suggestion. ckuus5.c. Fixed Ctrl-C at prompt level to give prompt on new line. This was broken by fullscreen file transfer display changes. ckuusx.c. At the suggestion of Alan Robiette and Peter Higgenbotham at Oxford University in the UK, changed the server startup message to account for the fact that some people are not using local Kermit programs that need to be escaped back to (e.g. Mac Kermit). Hopefully the new wording won't break too many scripts, because in the new scheme of things, arbitrary text can precede the "KERMIT READY TO xxx..." message. Added prototypes for Kanji-related functions to ckcker.h. ------------------------------ 5A(182) Sat Jul 4 23:50:26 1992 NEW FEATURES Added CHECK command to check whether a feature is configured. This command is available in all interactive versions, regardless of what features might have been left out: CHECK If the feature is available, the command succeeds, otherwise it fails. If the CHECK command was issued from top level, a message is printed telling whether the feature is available. If it is issued from a command file or macro and the feature is not available, it fails. If you have the script programming language configured, you can use IF FAILURE to check the results. If not, you can use SET TAKE ERROR ON to quit the command file immediately. The feature-names are: Feature-name: Feature and/or commands: DEBUG LOG DEBUG CHARACTER-SETS SET { FILE, XFER } CHARACTER-SET, TRANSLATE, etc CYRILLIC Cyrillic character-set translation DIAL DIAL, SET DIAL, and SET MODEM commands FULLSCREEN-DISPLAY SET FILE DISPLAY FULLSCREEN HELP Built-in help IF Script programming language (IF, GOTO, etc etc) JOB-CONTROL SUSPEND, Z, handling of suspend signal KANJI Kanji character-set translation LATIN1 Latin-1 character-set translation LATIN2 Latin-2 character-set translation NETWORK SET HOST command PUSH PUSH, RUN, !, @ commands, shell escapes, etc. SCRIPT SCRIPT command SERVER SERVER, SET SERVER commands SHOW SHOW command TRANSMIT TRANSMIT command This commands lets us check availability of features without having to depend on the IF command or other script programming language features, and therefore allows a standard initialization file for all interactive versions, even minimally configured ones. For example, an initialization file that defines a bunch of macros could do this just before the macro definitions section: SET TAKE ERROR ON CHECK IF SET TAKE ERROR OFF If the script programming language (including macros) is not configured in Kermit, the TAKE file terminates immediately, otherwise it keeps going. Afterwards, once we know we have a script language (including an IF command), we can check for other features this way: CHECK FULLSCREEN IF SUCCESS SET FILE DISPLAY FULLSCREEN ckuusr.h, ckuusr.c, ckuus3.c. Added a dialing directory, compatible with MS-DOS Kermit 3.11. The only new command is SET DIAL DIRECTORY . Many modules. Directory is a plain text file, one line per entry. Entries look like this: name number speed parity comments If you have specified a dialing directory file, the DIAL command reads it and tries to match the dial-string with a name in the file. When there is a match, the associated number is substituted and the speed and parity, if specified in the entry, are changed. The dial-string is used as given if it is not found in the directory. The dialing directory fields are separated by one or more spaces or tabs. A field can include spaces if it is surrounded by curly braces. The speed and/or parity fields can be omitted, in which case the current speed and parity settings are not changed. You can also put an "=" sign in the speed or parity field to leave it unchanged. Example: digital 1-800-2341998 2400 none The DIGITAL Store rolm 93,7654321 2400 none The Rolm CBX telenet 93,9876543 2400 mark SprintNet nospeed 8765432 = even Leave speed alone but set parity noparity 9876543 2400 = Leave parity alone but set speed {my sun} {93,854 1824} 2400 none With word grouping For Hayes and Telebit dialing, changed C-Kermit to set modem register S7 according to the calculated (or user-specified) dial timeout. ckudia.c. Changed Hayes's "wake-string" from "AT" to "ATQ0" to make sure result codes are displayed. ckudia.c. Added four new elements to the modem-info structure: escape sequence (e.g. Hayes "+++"), escape sequence guard time, hangup sequence, and pointer to function to read modem response string to non-dialing commands (e.g. Hayes "OK"). This is to let commands like HANGUP not only drop DTR, but also escape back to the modem and give it its particular hangup command. Added mdmhup() routine to ckudia.c to do modem-specific hangup. These elements were filled in for Hayes, US Robotics, and Telebit modem types (the ones that have AT command sets), as well as the Racal-Vadic VA4492E (info from manual). People who know about the other types should fill in this info for their modems too. This involves the four new structure members, plus writing a routine to parse modem responses, if this is done differently from Hayes (see the getok() routine for Hayes). The new mdmhup() routine is used in the following ways: 1. During dialing, if DIAL HANGUP is ON, we call mdmhup() first, and then we call tthang() only if mdmhup() failed to get a positive response from the modem, including the case where no hangup string is defined for the modem. 2. During CONNECT, same deal for H. ckucon.c. 3. Same deal for HANGUP command. ckuusr.c. Hopefully this will clear up a lot of the problems we have been having with tthang() by simply not calling it in many cases. If it causes problems, you can easily revert to the old way by including -DNOMDMHUP in your CFLAGS. Tested with Hayes 1200, Telebit Trailblazer, and Rolm 244PC, as well as on several modem types for which the new procedure was not defined. Not tested on the Racal-Vadic modem. Terry Kennedy implemented modem-signal sensing for the VMS version. Now SHOW MODEM and WAIT work. ckvtio.c. Terry Kennedy substituted a couple short, simple routines for the curses library on VMS. Now the fullscreen display works repeatedly, and consumes far less memory and CPU. This should be done in the UNIX version too, maybe in the next edit. Ideally, we wouldn't use any libraries at all, to eliminate the multiple-makefile entry problem. Instead, just grab the few needed escape sequences from (where???). There doesn't seem to be any good way to do this. Deferred till next time. Terry Kennedy also wrote a VMSINSTAL kit for C-Kermit: CKVKIT.COM and CKVMSI.COM. Changed the built-in FATAL macro to hangup if Kermit is in local mode. ckuus5.c. Changed name of ERROR command (which sends an E-packet) to E-PACKET. ckuusr.c. Added a built-in ERROR macro, which prints error message, then does END 1. ckuus5.c. Online documentation files reorganized: CKCCFG.DOC - C-Kermit configuration info for all versions CKUINS.DOC - UNIX installation instructions CKVINS.DOC - VMS installation instructions CKCKER.BWR - General "beware" file CKUKER.BWR - UNIX-specific beware file CKVKER.BWR - VMS-specific beware file etc. FIXES TELNET CONNECT fix. It often happened that when opening a TELNET connection to a remote host, the login: prompt did not appear. The problem was that the screen output buffer wasn't getting dumped if a TELNET negotiation option arrived at just the wrong time. Now the CONNECT code dumps the screen output buffer before it handles any TELNET negotiation. ckucon.c (UNIX), ckvcon.c (VMS). Fixed divide-by-zero in "Estimated time remaining" calculation in fullscreen display. Bug noticed and fix provided by Fulvio Marino. ckuusx.c. Fixed FOR, WHILE, and XIF macros, broken in edit 181. From Fulvio Marino. ckuus5.c. Fixed LOG blah file APPEND to return SUCCESS when it succeeds, rather than always returning FAILURE. Fulvio Marino. ckufio.c. Fixed HANGUP on network connection to return SUCCESS when it succeeds, rather than always returning FAILURE. Fulvio Marino. ckutio.c. Several other dereferences of null pointers found and fixed. Various modules. SET TAKE ERROR ON never worked if Kermit was built without the script programming language option (i.e. if it was built with -DNOSPL). Fixed. ckuus5.c. Fixes to VMS file i/o from Terry Kennedy. Edit 181 broke the sending of binary files (all fixed-format files were erroneously considered text), with the most obvious fault being the inability to send VMS .EXE files correctly. zopeni() in ckufio.c. Also, the automatic sensing of binary vs text files was busted -- who knows for how long! Code (re-?) added to sattr() in ckcfn3.c to handle it. Changes from William Bader so CKVTIO.C will compile under VMS 4.4. Changes from James Sturdevant to allow WIN/TCP code to compile on systems that objected to the WINTCP #include syntax (unquoted filenames) in edit 181. ckcdeb.h, ckcnet.[ch], ckudio.c, ckuscr.c, ckuus[4x].c, plus new versions of CKVKER.COM and CKVKER.MAK. The idea is to define VAXC$INCLUDE to search the TWG include files first, and then change "#include foo" to "#include " in all the source modules so other compilers won't complain. New CKVKER.MMS from Piet Plomp to include WIN/TCP. Modified locally to incorporate James's changes. Includes curses. Fixed curses display for VAX/VMS version, based on suggestions from James Sturdevant and William Bader -- basically, never call endwin() (seems risky, but also seems to work OK). The real fix is to replace curses calls with SMG$ (VMS screen manager) calls. ckuusx.c. Later, eliminated CURSES library altogether from VMS version. Terry Kennedy pointed out that VMS only supports VT52 and VT100 and later CRT terminals, so we do the VMS fullscreen display using simple built-in routines, eliminating a lot of overhead and memory consumption. ckvtio.c, ckuusx.c, ckuus7.c, ckvker.mak. Also, William Bader sent in an SMG$ (VMS Screen Manager) version. Still later... It turned out that the do-it-yourself VMS curses replacement spent too much time updating the screen (because there was no optimization). This, in turn, caused VMS to lose characters from incoming packets when the buffer size was small (e.g. when using the typeahead buffer, whose size, by default, is 78 chars) because its back was turned too often. So I put in William's SMG$ code, leaving the other two methods also intact. Any one of the three can be activated by the appropriate #define in the "screenc" section of ckuusx.c (but if you want to go back to using VAXCCURSE, you'll have to change the build procedures to link with the VAXCCURSE library). Using SMG$ does indeed solve the problem with file transfers because it optimizes screen writes very nicely. Changed Amiga source code to use the full-blown UNIX character-set stuff, so the next time it is compiled, it will include it. Fixed multiline GET *again*, to compile correctly if NOSPL is defined. Steven M. Schultz. ckuus6.c. Changed packet-length display in SHOW PROTOCOL to be less confusing, suggested by Mike Normile of DG: the send-packet size is now shown to be the negotiated length. Ditto in the STATISTICS command. ckuus4.c. Fixed yet another X.25 glitch (a symbol in ckuusr.h was defined wrong). Improved some of the HELP commands. Bob Babcock reported that CRs were echoed as LFs, rather than CRLF on Convex/OS 9.1. This was traced to the turning off of IEXTEN ^O/^V processing, which is apparently misimplemented on the Convex. Added a new CFLAGS symbol NOIEXTEN to make Kermit leave it alone, and put it in the Convex makefile entry. makefile, ckutio.c, ckuver.h, ckuus5.c. Changed OUTPUT to behave like CONNECT on a TELNET connection, i.e. to send CRLF when asked to send CR. Ditto when TERMINAL NEWLINE-MODE is ON. ckuus5.c. Removed all the directory-related #includes from ckutio.c. I have no idea why they were ever there in the first place. Fixed ttpkt() to turn off t_eofc and t_brkc characters in tchars structure. This was interfering with file transfer on NeXT OS 2.0. Thanks to Joe Bearly, jst@ccnext.ucsf.edu. I hope this doesn't destroy compilations anywhere. It seems there is no cure for System A that is not also poison for Systems B, C, and D... If these structure members come up as undefined during compilation, add -DNOBRKC to your CFLAGS and let me know. ckutio.c. 2.11BSD version didn't work any because one of the overlays got too big (by 128 bytes). Adjusted the overlays, also changed the makefile to pass the name of the extracted-string file to ckustr.c via a symbol, rather than making the user edit the ckustr.c file. It runs very slow and jerky. Tried adding -DNOSETBUF to the CFLAGS, but it didn't make any difference. Still more SCO UNIX (ODT) fixes. It seems that the data type for pid is not always "short" in ODT 2.0. Changed the relevant makefile entries to say -DPID_T=pid_t, rather than -DPID_T=short, since pid_t should be available as a typedef on all these systems. Added more -DNOxxx CFLAGS to the coherentmi entry in one last attempt to make an interactive version that fits in 64K. makefile. ------------------------------ 5A(181) Sat Jun 20 16:53:20 1992 Added INTRODUCTION command. ckuus[hr2].c. Fixes to fixes to concb(), conbin(), ttvt(), ttpkt() for System V from David Wexelblat, AT&T Bell Labs . The DGUX 4.30 fixes introduced in edit 180 broke Kermit for most System-V based systems. ckutio.c. Tested OK on SUN (make sunos41s5, which failed in edit 180), ... Fixed typo in ckuus3.c: "tmpbuf[1] - '\0';" in line 582, minus should be equals. Spotted by Bo Kullmar. Added SET LANGUAGE FRENCH OE-digraph support for DGI, Apple, and NeXT character sets. ckuxla.c. Fixes and tuneups to curses display. ckuusx.c. Changed the word "curses" to "fullscreen", but left "curses" as an invisible synonym. #ifdef'd FILE DISPLAY table for Mac. ckuus[2457].c. Changed "set file display fullscreen" to call tgetent() to check whether terminal type is known before letting them use fullscreen display. If it isn't, initscr() exits back to the operating system, killing Kermit and leaving the terminal modes messed up. So now we check first by making a direct call to a termcap routine, tgetent(), before initializing curses. This might be tricky because it is only simulated in System V. Tested OK on SUNOS, NeXT, Dell SVR4, RS/6000. ckuus7.c. Enabled lockf() code for all SVR4+HDBUUCP systems, blessed by AT&T and Dell. Governing symbol is LOCKF. You can also add -DLOCKF to your CFLAGS if you want it on any other system. ckutio.c. Minor changes to ckcnet.c for OSF/1 and POSIX (in SO_OOBINLINE section) from Michael Pins . A couple #endif trailers were not comments, noticed by Michael Pins and others. ckcnet.c, ckutio.c. Fixed a couple typos in ckuus3.c in the flow-control keyword table, flotab[], and removed the special stuff for UTEK (Tom Kloos). Some tiny tweaks to the protocol in ckcfn2.c to see if we can clear up some "resend error" and "can't allocate receive buffer" messages. Numerous tiny fixes to messages and statistics counters, etc. Added new messages at start of remote-mode packet operations: KERMIT READY TO xxx... where "xxx" is SERVE, SEND, or RECEIVE. These are the new "standard" Kermit messages, and have also been added to the new release of IBM mainframe Kermit, 4.2.4. They should also be added to all other Kermit programs that can function in remote mode. This way, script writers will always know what to look for and will not have to depend on idiosyncratic messages. The old messages are still there, preceding the new ones. Added support for Wollongong WIN/TCP for VAX/VMS from Ray Hunter and Steve Smail at Wollongong. Instructions for building are in ckuins.doc. Ray made a proper version of contti() for use with WIN/TCP -- no polling loop. This code also works with Multinet, and it makes CONNECT mode *much* faster, and as an added benefit, does not drive the VAX crazy. Unfortunately, file transfer on Multinet connections is still very, very, VERY slow. I don't know how fast it is on WIN/TCP connections. Rewrote ttinl() for VMS again. Added the "Doomsday Kermit" business to the network portion of it. But I could not allow a printable SOP for the serial line case because VMS is doing input based on the termination character. But in any case, the network version will now read packets based on their length field. But file transfer over a VMS Multinet (and presumably WIN/TCP) connection was just as slow as ever. Hours of staring at ttinl() and the various routines in ckcnet.c (netinc, ttbufr, and nettchk) finally produced the answer: netflui() was the culprit -- it was trying to read too many bytes from the network, and so sat there forever, or until the other Kermit timed out and retransmitted. And then netflui would eat parts of the new packet. Hence the 10-20 second interval between each packet. The totally simple and obvious solution was to have netflui() clear the internal before *before* calling ttchk(), rather than after! Now file transfer goes at a respectable speed. ckcnet.c. The Wollongong changes broke CONNECT mode for serial lines. Fixed by setting the mask for sys$wflor() correctly before calling it. contti() in ckvtio.c. We still get the %SYSTEM-W-DATAOVERUN errors during file transfer (especially when C-Kermit is receiving) and also during CONNECT when screenfulls of text are being blasted at C-Kermit. Also, C-Kermit/VMS fails to react properly when a serial connection is hung up -- it prints an error message, but doesn't return to the prompt. Fixed bugs in VMS Kermit CONNECT-mode escapes: "break;" was missing in the switch statement after the new options A and I. A "break;" was also missing in ckucon.c, so if you send a Telnet "Are you there?" you also sent a Long BREAK. Also fixed horribly messed-up CONNECT-mode escape help message. CKVCON.C. Changes to CKVTIO.C from Terry Kennedy to enable 8-bit communication in CONNECT mode. Apparently this was broken in edit 179 (CKVTIO.C 034). Change to CKVFIO.C from William Bader via Terry Kennedy to allow for fixed-length files that have record attributes. Added SET TAKE ON/OFF as an invisible synonym for SET TAKE ECHO ON/OFF, for compatibility with MS-DOS Kermit. ckuus3.c. Fixed multiline GET, again. This time to make sure it expands variables in the second and third line when reading from a TAKE file or macro definition. Problem noticed by James Sturdevant. Required decomposing and modularizing a *lot* of code in ckuus5.c, and then changing doget() in ckuus6.c to use the new routines: getncm() (get next command from macro) and getnct() (get next command from takefile). Now, not only can multiline GET be used in TAKE files and macros, and not only can the 2nd and 3rd lines contain variables, but all the other rules are observed too, e.g. line continuation, trailing comments, leading and trailing whitespace, etc. Fixes to several modules to allow successful building with -DNOSPL. Compiled OK on SUN, Dell SVR4, RS/6000 AIX 3.1, NeXT... Changed makefile to let user specify the make program to be used on the make command line, e.g. make irix40 "MAKE=smake" or: make sunos41 "MAKE=make -P" Fixed a bug in window-size renegotiation, noticed by Christian Hemsing. ckcpro.w, ckuus3.c. Changed conchk() in ckutio.c (for UNIX) to return 0 if the backgrd flag is set. Doing the input-buffer-checking ioctl's while Kermit is not in the foreground apparently causes serious problems on some systems, such as Olivetti X/OS, where it suspends Kermit. Fulvio Marino, Olivetti. *** This change should also be added to the VMS version as part of fixing its rendition of conint() *** Permanently disabled BYE for the Data General AOS/VS server, since it can't log out its own job. ckcmai.c, ckuusr.c, ckuus6.c. Some more minor Data General changes from Eugenia Harris. ckcxla.h, ckuusx.c. Added two include files for VAX/VMS WIN/TCP: domain.h and protosw.h, from James Sturdevant. Also from James, ckvker.com was updated to also build the WIN/TCP version automatically, as it already did for MultiNet. Also from James, ckvker.mak updated for WIN/TCP. Added ttsndlb() (send Long BREAK) to VMS version. ckvtio.c, ckcdeb.h, ckucon.c, ckvcon.c, ckuus5.c, ckaplm.doc. Fixed handling of carriage returns at the keyboard on TELNET connections for UNIX (ckucon.c) and VMS (ckvcon.c). Now you can have a normal TELNET session to a VMS CMU/TEK or UCX system (previously CRs would sometimes not be noticed by the VMS host). So the rule is: *always* send keyboard CR as CRLF on TELNET connections, regardless of which side is echoing (previous edits of C-Kermit sent CRLF only if it was echoing locally). Totally rewrote the communications input routines for VMS C-Kermit: ttinc, ttinl, ttxin, ttchk, and ttflui, to be fully buffered, using an underlying buffer-filling routine, txbufr(), for serial devices similar to what is used by the network code. Later, Terry Kennedy went over this work and cleaned it up, and made it work in a couple cases where it didn't: fixed parity (again), fixed "getty babble" problem, friendlier error handling and messages, automatic popping back to prompt on serial connection if remote hangs up, and added code to properly hang up a LAT connection. Still to be done: . Fix contti() to allow keyboard to interrupt sustained input from port when lots of port chars are buffered. . Integrate network buffers with ttxbuf[] and make ttinc() into a macro. . Get rid of ttinl. Move ttinl() code to rpack(). . Get rid of ttxin. Don't need it any more. Or else change it do do a memcpy or whatever. . Clean up ckvcon.c. . Add UCX support (Terry). Fixed (via kludge) a problem in VMS C-Kermit: if you DISABLE CD, it wouldn't let you GET any files at all even if they were in your current directory. Added zchkdir() to ckvfio.c and called it from openi() in the VMS case only. Added definitions for CK_LBRK (can send Long BREAK) to ckcdeb.h for all versions except OS-9. Corrected miscellaneous typos noticed by Tim Theisen . Added "AOS/VS" to the list of strings returned by \v(system). ckuus4.c. Added \v(day) variable: day of week "Sun", "Mon", etc. If underlying C library version of asctime() (or whatever) returns non-English day names as the first 3 characters of the string (see ztime() in ck?tio.c), then the non-English day names are returned. Also added \v(nday): day of week. 0=Sunday, 1=Monday, etc, but this one depends on underlying English day names. ckuus4.c, ckuusr.h. Added \v(local) == 1 if C-Kermit is in local mode, 0 if in remote mode. ckuus4.c, ckuusr.h. Added \v(cmdsource), command source: "prompt", "macro", or "file". Also \v(cmdfile) = name of current command file, if any, else null string. Also \v(macro) = name of current macro, if any, else null string. Also \v(exitstatus) = current exit status value. ckuus4.c, ckuusr.h. Changed SHOW VARIABLES to use "more?" prompting, since we have more than a screenful of them now. ckuus5.c. Ensured that \fcharacter(n) works only for 0 <= n <= 255. ckuus4.c. Fixed a bug that prevented the failure flag from being set when a GET command was interrupted. ckcfns.c, ckcpro.w. Added SET TELNET ECHO { REMOTE, LOCAL } to set initial TELNET echoing state, which is LOCAL by default, according to the NVT specification. This is to get around problems caused by echo-mode switching upon initial connection. And SET TELNET TERMINAL-TYPE [ ] to let the user specify a terminal type to be sent to the remote telnet server during terminal-type negotiation, to override the normal behavior of sending the value of the TERM environment variable. ckcnet.c, ckuusr.h, ckuusr.c, ckuus3.c. Changed SET TERMINAL ECHO to accept LOCAL and REMOTE as synonyms for ON and OFF, and made ON and OFF invisible keywords for compatibility with MS-DOS Kermit. Changed SHOW TERMINAL to report ECHO as "local" or "remote" rather than "on" or "off". ckuus7.c, ckuus5.c. Made G a special abbreviation for GET, and made SET FILE DISPLAY QUIET a synonym for SET FILE DISPLAY NONE (for compatibility with MS-DOS Kermit). ckuusr.c, ckuus7.c. Uncommented the ERROR command. It seems to work OK now. ckuusr.c. Added LATIN2 transfer character set for Albanian, Czech, Hungarian, Polish, Romanian, Serbian, Croation, Slovak, Slovene. New transfer character-set: LATIN2. New file character-sets: CP852 and LATIN2. Works nicely with a PC that has DOS 5.0 with the new Eastern Europe code page. It is still possible in C-Kermit to translate any-to-any. Latin-2 support is included unless you put -DNOLATIN2 on the cc command line. Adds about 3-4K. ck[cu]xla.h, ckuxla.c, ckuus4.c, ckucon.c, ckuins.doc. In the process of doing this, I took out all the nested #ifdef's. Now we have constant numbers assigned to each character set, no matter which groups (CYRILLIC, KANJI, etc) are selected at compile time. This makes it a lot easier to add new character sets, like Hebrew and Arabic, which probably come next. Added SHOW CHARACTER SETS. ckuusr.h, ckuusr.c, ckuus4.c, ckuus5.c. Allow SET TRANSFER LOCKING-SHIFT to be operational, even if built with -DNOCSETS. ckuusr.c. Chopped off the end of this file because it was getting too big to edit. Old material placed in cku179.upd. Fixes for SCO UNIX 3.2.4 and ODT 2.0 for the stupid "I think I'm in the background" problem from Warren Tucker. The problem was that SCO changed pids from ints to shorts, and the call to the ioctl() that takes the address of a terminal process group was malformed. makefile, ckucon.c, ckutio.c. Split SHOW VERSION into two commands: SHOW VERSION and SHOW FEATURES. ckuusr.h, ckuusr.c, ckuus5.c, ckuus6.c. New ck9fio.c module from Christian Hemsing. Commands using (simulated) popen() now display their error messages as well as standard output. DIRECTORY command now shows file size and attributes. ------------------------------ 5A(180) Fri Jun 5 13:34:42 1992 SHOW KEY's "Press key:" prompt also needed an fflush()... Added SET TERMINAL ECHO { ON, OFF } as a synonym for SET DUPLEX, SET LOCAL-ECHO, ... ckuus7.c, ckuusr.h. Added nicer messages for CONNECT, SHOW TERMINAL, SET ESCAPE. They now show the ASCII name of the CONNECT-mode escape character. ckuusx.c, ckuus3.c, ckuus5.c, ckucon.c. Added modem signal display to CONNECT-mode status message, ckucon.c. Moved shomdm() from ckuus4.c to ckuusx.c so it could be called from the command-line only version. Added SPEED and CARRIER settings to SHOW DIAL. ckuus5.c. Cleaned up SET FLOW table to only allow keywords that are valid on the given system. Added symbols to ckcdeb.h for this. Changed setlin() to substitute appropriate NeXT device name if RTS/CTS flow control selected. ckuus7.c Rearranged the STATISTICS display. ckuus4.c. Added a new state-input combination to ckcpro.w: N. If the server gets a NAK while in command-wait state, it probably means the client gave a RECEIVE command instead of GET. So now the server sends back an error packet saying "Did you say RECEIVE instead of GET?". Previously the message said "Unimplemented server function". Added a default question, " Yes or no? ", for GETOK. ckuus6.c. Added SET FLOW RTS/CTS for Commodore Amiga. ckcdeb.h + new ckitio.c from Steve Walton. Changed argument declarations in cmkey(), cmkey2(), and cmsavp() to use pointers rather than arrays, to make MetaWare High C R2.3x on NCR MiniTower happy. Checked with GNU C -Wall, seems OK. Discovered that the INPUT and REINPUT commands fail (and always have failed) to match strings in certain contexts, for example to find "abc" in "ababc". That's because when it rewound its search string in the middle of a partial match, it failed to check the source string again. Fixed in doinput(), doreinput(). ckuus4.c. It was bugging me that long macro definitions could not be commented, so I found a way to remove the restriction, at least for command files. For example: define ibm set parity mark,- ; Parity for IBM mainframe set duplex half,- ; Use local echoing set flow none,- ; No full-duplex flow control set handshake xon ; XON line turnaround handshake Now the rule is: A trailing comment begins with a semicolon or number sign preceded by at least one space or tab. If a trailing comment is encountered, it is removed, and trailing blanks are trimmed. If the final character of the result is '-', the line is to be continued. Thus, the continuation character comes BEFORE the comment, not after it. ckuus5.c. Also, fixed gtword() to trim trailing blanks before deciding whether a word ended in the continuation character. Only affects continued lines typed at the prompt. ckucmd.c Installed SunLink X.25 fixes from Gary Mills, U of Manitoba. ckuus7.c, ckucon.c, ckutio.c. Narrowed down the cause of the Sys V Telnet bug in which the first character you type after CONNECT is misinterpreted as the CONNECT-mode escape character. When the WILL ECHO telnet message is received from the remote, the lower CONNECT fork signals the upper one to change its echoing status, using SIGUSR2. In System V, this interrupts the pending read() in the lower fork, making it return -1 with errno set to EINTR, which means "a signal was caught during the read system call". coninc() thinks this means that the user typed the escape character. But that should only be happening during the local-mode file transfer display. Finally realized: a System V read() will fail with EINTR if *any* signal is caught while the read() is pending. This happens, naturally, when the lower CONNECT fork signals the upper one about the echoing mode change. Wrote a new version of coninc() to check for this and retry the read() when it happens. Seems to work ok. ckutio.c. Added IF FOREGROUND (== IF NOT BACKGROUND). ckuus6.c. Added OS/2 changes from Kai Uwe Rommel: bug fixes, new SET TERMINAL CURSOR { UNDERLINE, HALF, FULL } command. ckocon.c, ckotio.c, ckufio.c, ckuus7.c, ckuusr.h. Added \Fright(text,length), is replaced by rightmost "length" characters of "text". ckuusr.h, ckuus4.c. Changed ECHO and WRITE SCREEN commands to be like OUTPUT, ASK, etc -- To allow enclosing braces, which are stripped, but which prevent normal stripping of leading and trailing spaces. ckuusr.c. Changed server message not to say "close the connection". ckcmai.c. Fixed SET COUNT to fail and print an error message if given a non-numeric argument. ckuus3.c. ....ckb.... Fixed caseless string comparisons. xxstrcmp() had a stupid bug. ckuus6.c. Fixed bug in GOTO in macros. It would go to the first label that matched the target label, even if the target label was only a substring of the GOTO label. For example, if there were labels XX and XXX, GOTO XX would go to label XXX if it came before XX. Ditto for GOTO in TAKE files. ckuus6.c. The following kind of command did not work: asg \%9 \fexec(lookup \%1) because the variable name buffer and pointer were global, rather than automatic variables, and the LOOKUP macro defined some other variables, thus overwriting the name from the ASG command. When \fexec() finally returned, its value was assigned to some random variable. Fixed by making vnambuf[] an automatic variable in doincr() and dodef(). ckuus6.c. Also made vnambuf[] automatic in cmdini(), just in case. ckuus5.c. Nested FOR loops did not work. The problem was that FOR and WHILE loops are macros that work by defining themselves and then executing themselves. When loops are nested, the inner loop saves the outer loop's definition, replaces it, defines a new one, executes it, then restores the old one. So far so good, but now the restored version of the outer loop is very likely at a different location in memory than the original, so the "macp" pointer is referencing random garbage. Solution: (1) Define a new built-in variable, \v(cmdlevel), and define FOR and while loops using its name, e.g. _FOR0, _FOR1, etc. (2) Create two new commands for internal use only: _ASSIGN and _DEFINE. They are just like ASSIGN and DEFINE except that they evaluate the name of the macro to be defined before defining it, for example: _ASSIGN _for\v(cmdlevel) blah blah blah If the command level is 1, this makes a macro called "_for1". Now nested FOR loops work. Same fix for WHILE and XIF commands. Next problem (this has been with us all along): RETURN from within a FOR, WHILE, or XIF had no effect. That's because its return value was not passed along through the enclosing macros. Unfortunately, this one is not so easily fixed. These commands can pass along their return values easily enough (RETURN \V(RETURN)), but that's not good enough. If a RETURN command is given in one of these macros, the final _PUTARGS command won't be executed and the \%0..9 variables could be screwed up, and anyway, the return value is for the _FORx macro, not for the macro that contains the FOR loop. So for now, it still seems the best course is to avoid RETURN commands inside FOR, WHILE, and XIF command lists. Added makefile entry for Linux from Bengt Andersson of ABC-Klubben in Sweden , via Bo Kullmar. Apparently, needs more work. Changed sco3r2lai makefile entry to include -Di386 because /usr/include/sys/netinet/in.h requires this definition to declare htons() correctly for endian order. Xenix cc does not provide this (but SCO UNIX cc does). From rdb@rand.mel.cocam.oz.au (Rodney Brown). Added support for Sperry/UNISYS 5000 UTS V 5.2 (Sys V R2) by forcing redefinition of S_ISREG and S_ISDIR macros in ckufio.c, like for Olivetti X/OS and Amdahl UTSV. Also added a makefile entry, "unisys5r2". Correction to Finnish / Latin-1 table from Vesa Gynther in Finland. ckuxla.c. Added PING command. Just runs PING in a fork. If ping is not in user's path, or is protected, the command won't work. Which is as it should be. ckuusr.[ch], ckuus2.c. Doesn't work too well on VAX using MultiNet PING, which, by default, pings repeatedly. Ctrl-C doesn't make it stop (even though VMS gets the Ctrl-C and prints "Cancel" in reverse video), Ctrl-Y kills not only PING, but Kermit itself. Changed OUTPUT command to allow \B and \L for BREAK and Long BREAK, rather than requiring two backslashes, for compatibility with MS-DOS Kermit. Two backslashes still work. Also fixed dooutput() NOT to send BREAK if it sees \\b after the command has been processed, which should mean to send a backslash followed by a b. ckuusr.c, ckuus5.c. Added \fcode() function. Returns the null string if its argument is null, otherwise the numeric character code of (the first character of) its argument. This is the opposite of fchar(), which returns the character corresponding to its numeric argument, 0-255 (works only for single-byte chars). ckuusr.h, ckuus4.c. Done at the request of a guy who needed to calculate checksums in scripts for talking to some kind of fancy online beeper dialer that needs checksums in its commands. Added a new CONNECT-mode escape command: A. It is available only on network-configured versions, and works only on TELNET connections. It sends a TELNET "Are You There?" command. When the remote TELNET server gets one of these, it is supposed to send back "[Yes]". Suggested by John Klensin. ckucon.c. Added I to send TELNET Interrupt Process on TELNET connections. It was already there for X.25 connections. ckucon.c. Updated CONNECT-mode help message for the A and I. ckucon.c. changed HELP CONNECT to show the current escape character. ckuus2.c. Rewrote the CONNECT command, again. Previously, it did not do buffered, multicharacter port reads and screen writes on TELNET connections, or if session debugging was on, or if SO/SI was being done, which made for very poor performance especially on TELNET connections, which are supposed to be fast. Created ckcgetc() and ckcputc() functions, and moved all the buffering to inside them. This eliminates tons of confusing, redundant code. But why use functions? Because of TELNET... When we see a TELNET IAC arrive, we call tn_doop(), and tn_doop() reads the subsequent characters, whose number is not known in advance. Previously, tn_doop() read them directly from the communication channel, which is why single-character reads were required for TELNET connections. Now, we pass a pointer to the character-input function as an argument to tn_doop(). So when tn_doop() is called from CONNECT mode, this is ckcgetc(). From elsewhere (e.g. from the SCRIPT and INPUT commands), it is ttinc(). ckucon.c (CONNECT), ckuscr.c (SCRIPT), ckuus4.c (INPUT), ckcnet.c (tn_doop()), ckcnet.h and ckcker.h (function prototypes), ckutio.c (remove the call to nettchk(), which never did anything for UNIX, and let ttchk() check the input buffer). Compiled and tested on SUN, NeXT, Dell Sys V R4, and DEC MIPS/RISC box with Ultrix 4.2. Speedup is approximately 750% on the NeXT (in a 'terminal' window). Adapted VAX/VMS CONNECT module to new scheme. There is a very noticable improvement in CONNECT performance, especially on MultiNet. It's still a bit jerky, but the jerks are fewer and farther between. We're still using contti(), with its polling loop that drives the poor VAX crazy and eats up tons of CPU, but we're using it less. We really need something like select() to do this right. File transfer is still agonizingly slow on MultiNet connections, but nothing has changed there. It's not too bad on serial connections, though, but that hasn't changed either. ckvcon.c Changed all routines in ckcnet.c to send TELNET negotations as strings with a single write() call, rather than in one write() per byte. Not only does this speed things up a bit, but also seems to clear up some TELNET protocol problems that occurred when the negotiations did not arrive in a single TCP packet. Suggested by Eugenia Harris at DG. ckcnet.c. Later reports indicate this cleared up a problem with talking to a VCP-200 reverse terminal server. Changed TELNET subnegotiation reader in tn_doop() to break out of reading a subnegotiation if an IAC comes followed by anything but SE or another IAC. This prevents C-Kermit from hanging if the terminating IAC SE never comes, for example because the telnet server is broken or there is a network glitch. As part of this, IAC IAC within subnegotiation data is now recognized as a quoted IAC, as specified in RFC 855. The unexpected TELNET command is lost, but at least now we don't hang forever waiting for the IAC SE. ckcnet.c. DG/UX uses mailx and lp rather than mail and lpr. Eugenia Harris. ckufio.c. Fixed ttinl() prototype for OS-9. Christian Hemsing. ckcdeb.h. Prevented ASKMORE double definition. Christian Hemsing. ckuusx.c. Added code to opent() to change transfer mode to text. This was preventing REMOTE commands from working right when client had SET FILE TYPE BINARY and it had nonstandard line terminators, as OS-9 does. Problem noted by Christian Hemsing and this fix tested OK by him also. ckcfn3.c. Changed getpkt() and all calls to it to make sure that C-Kermit never constructs a packet whose *total length* is greater than the receive packet-length given by the receiver. Previously, the receive packet-length was taken to mean the biggest "length field". Now we take it to mean the total packet length, to avoid overrunning the receiver's input buffer. This is especially important for use with Kermit-370 in "Doomsday" mode. ckcfns.c. Changed fnparse() to put a null element at the end of file filespec list. This should fix the problem of spurious files being sent in response to GET commands. ckuusx.c. Added a new Kermit designator for the Japanese EUC transfer character set: I14/87/13. C-Kermit accepts this as an alternate form when receiving a file, but continues to send the old form, I14/87E. Later, the I14/87E designator will be demoted to an alternate form, and eventually retired. The rationale for this is to have meaningful character-set designators. The new form means Japanese Roman (ISO 14) is designated to G0, JIS X 0208 (ISO 87) to G1, and Katakana (ISO 13) to G2 (and therefore invoked by SS2). ckuxla.c. (Later that day...) By agreement among all parties (Hiro, John, Joe, me), exchanged the two Japanese EUC designators, simultaneously with MS-DOS Kermit 3.12 and Kermit-370 4.2.3, so now all three will send I14/87/13, but will accept both forms. ckuxla.c. Added a new block-check type: SET BLOCK BLANK-FREE-2. Also used by MS-DOS Kermit 3.12 and Kermit-370 4.2.3. Just like type 2 block-check, but with 1 added to each byte so the block check will not contain any blanks. Part of the "Doomsday Kermit" protocol, used (e.g.) when a 3270 protocol converter strips trailing blanks from packets. ckuus3.c, ckcfns.c, ckcfn2.c, ckcfn3.c, ckuus4.c. Tested with MS-DOS Kermit 3.12. Needs more testing. Moved the logic for ignoring echoed packets from input() to rpack(). This allows echoed packets to be ignored even if they are corrupted and their checksum is wrong, so we don't wind up sending NAKs for crunched echoes, which can result in a hideous slowdown. Another feature of Doomsday Kermit. ckcfn2.c. More Doomsday Kermit work... (1) Treat incoming ACKs and NAKs as echoed packets if we are the file receiver (this handles the case where the 3270 protocol converter echoes packets in a different order than Kermit sent them -- it happens!). (2) Don't resend() the first ACK if we don't still have a copy of it -- it will be missing the Send-Init data, and the resent version might easily have the wrong kind of block check. (3) Accept E packets with Type 1 block checks always. ckcfn2.c. Numerous changes to resend() to make it work better, etc etc. ckcfn[s2].c. See comments in resend(). Tested all of this against Kermit-370 4.2.3 on VM/CMS through two types of nontransparent 3270 protocol converters and it works great. Slow, but solid. The slowness is because, among other things, each packet sent to the mainframe gets echoed not once, but twice. Changed ttinl() to call parchk() only once per protocol operation, not on every packet. Previously, parchk() was called on every packet if Kermit's parity was set to was NONE and the packets contained no parity bits. This improvement was accomplished by setting a global (to ckutio.c) flag in ttpkt(), which is called at the beginning of each protocol operation. ckutio.c. Changed UNIX version of zrtol() to strip leading and trailing blanks and controls from incoming filename to compensate for a bug in Norsk Data SINTRAN Kermit. ckufio.c Added support for IEXTEN (^O/^V) processing in a general way, based on the existence of the symbol IEXTEN, but for the specific benefit of BSDI/386. Changes to tthang() for BSDI (and POSIX in general). New makefile entry for BSDI. John T. Kohl, . Changes to tthang() for the IBM RT PC and RS/6000. Previously, after hanging up a modem line, it was impossible to use it again, e.g. to dial another number. Thanks to Jamie Watson for extensive research into this problem, and its solution. ckutio.c. Added support for advisory locks (lockf()) for SET LINE device for Dell System V R4 only, in ttlock() and ttunlck(), from Donn Baumgartner, Dell. ckutio.c. Added support for nap() via syscall(3112,...) on SVR4 Intel-based systems if -DNAPHACK is included in CFLAGS. David Wexelblat . Many prototype fixups from Tim Theisen -- mostly arrays that were referred to as pointers in the prototypes. Many header files and modules. Compiled OK with gcc -Wall. Dynix PTX uses memcpy, doesn't have memmove. ckcnet.c. Added makefile entry for HP-UX 5.21 with WIN/TCP from John Dunlap. Added support for Mark Williams Coherent 386, from Manfred Prange. Minor Olivetti X/OS changes from Fulvio Marino. Received new OS-9 ck9*.c modules from Christian Hemsing. Discovered that ttflui() (flush communications input buffer) was a no-op for TCP/IP network connections, at least on UNIX. It called netflui(), which did nothing. Tried using regular ttflui() on a net connection, but the ioctl's didn't work (at least not on my SUN). So I filled in netflui() to call ttchk to see if any chars were waiting to be read, and then to read that many. Also added code to do this to ttflui() itself in the case where no system call is available to flush the buffer. ckutio.c, ckcnet.c. Fixed code for reading multiline GET commands from TAKE files. Previously it failed to trim leading and trailing spaces and control characters. ckuus6.c. Added SET LANGUAGE FRENCH. When translating from DEC MCS to ASCII or Latin-1, this enables translation of OE digraph to O and E (both upper and lower case). ckuxla.c. Minor changes to ckcdeb.h, cdcfn3.c, ckcmai.c, ckcnet.c, ckuusr.c, and ckuusx.c to support Data General AOS/VS, from Eugenia Harris at DG. System-dependent modules for AOS/VS still to come. Updated the Macintosh / Latin-1 translations in ckuxla.c and ckmxla.c to put Icelandic Thorn and Eth in the same positions as used in the Macintosh Icelandic character set. New makefile entry for DEC OSF/1 on (MIPS) DECstation, plus one minor required change to ckutio.c, from Bill Whitney at DEC. Also added special herald to ckuver.h, SHOW VERSION info to ckuus5.c. Added a curses-style file transfer display for local-mode transfers, adapted from a minimal bare-bones version sent in by Christopher Pratt, APV Baker, UK. Rewrote it to produce a complete MS-DOS-Kermit-like file transfer display on a 24x80 screen. Mostly in ckuusx.c, new routine screenc(). Also changed SET FILE DISPLAY command to include a "curses" option, and SHOW FILE to show the display mode, and words about it to HELP SET FILE. This is elected only if CK_CURSES is defined, which, in turn, is possible only if UNIX is defined. Compiled and tested OK on SUN-4, Dell SVR4, NeXT, RS/6000, Ultrix 4.2, Encore, and even VAX/VMS (but on VMS it works only once). The curses and termcap libraries add a lot of K to the core image: 491K vs 467K on SUN-4. The display is cute, even quite useful. But on a fast connection (like TCP/IP), it can slow the transfer down by as much as 100%. On a serial connection, it doesn't hurt at all. Added (nonworking) support for DGUX 4.30 to makefile, ckutio.c, from Chris Sylvain . Also added herald to ckuver.h, etc. ------------------------------ 5A(179) Mon Feb 17 12:46:36 1992 Edit 179 is the first BETA release. After it was released to the private C-Kermit Developers and Testers group on Feb 8, a few bugs were fixed and a few system-dependent changes made. These are listed in this section. The main version number and release date were not changed because of the massive number of documentation and other files that refer to edit 179, but individual module version numbers were updated for sanity. Some minor changes were added within #ifdef GEMDOS (Atari ST) and #ifdef OS2 (OS/2). The edit number and date have not been changed. Also found one place in rcvfil() in ckcfns.c where we were storing into a literal pointed to by cmarg2, which caused the Convex (POSIX) version to core dump, and probably many other versions too (but naturally, none of the ones I tested...) Fixing this uncovered a place in the RECEIVE command parsing code in ckuusr.c where we were actually strcpy'ing into cmarg2, which was usually pointing to "". Fixed that one too. Bumped the edit number of ckcfns.c from 71 to 72 and ckuusr.c from 81 to 82, so we can tell the difference. This change in edit 177 was removed: Relaxed the restriction on sliding windows that required the user to SET WINDOW n on both Kermits. Now the receiver can determine the window size, just like with packet length. ckcmai.c, ckcfns.c. It turns out that this prevents C-Kermit from working with other Kermit software that implements sliding windows incorrectly. For example, a certain commercial package always asks for 14 window slots, but then chokes if you actually try to use them. Furthermore, it doesn't give its users any way to change the window size. Therefore C-Kermit must allow its own SET WINDOW command to take precedence over the other Kermit's bid. The #ifdef COMMENT and corresponding #endif directives were commented out in ckcfns.c and its edit number was increased to 73. Increased ttoc()'s timeout interval from 2 to 15 seconds. For some reason that I can't figure out, when a timeout actually occurs, AND Kermit is running under cron under SUNOS, Kermit dumps core (this doesn't happen when it's running interactively in the foreground, so it's not a bad system call). Also, made sure the beeps try to come out only when Kermit is in the foreground (since conoc() was mentioned in the adb $r register dump). It seems the addition of the -C command-line switch broke the "application file" feature, when the application file included a definition for a macro and then executed the macro. In fact, the -C feature didn't work quite right either, e.g.: kermit -C "echo hi there, define xx echo hello from xx, do xx, echo bye" The symptom was that when the macro was finished executing, Kermit would wait for input from the keyboard instead of continuing with the application file, command-line, or whatever. Fixed by making a couple tiny changes to ckuus5.c. Some Olivetti OXOS changes from Fulvio Marino at Olivetti in Italy, all within #ifdef OXOS..#endif. ckufio.c, ckutio.c. Rearranged #ifdef's in conres() in ckutio.c for sony_news. Its return statement, which restored the console Kanji mode, was not being reached. Also, several minor changes to the makefile. Added "make pyramid" (Graham Jenkins, Australia), "make sco3r2lai" for SCO Xenix 2.3.3 with Lachman Associates Inc TCP/IP (Bob Hain, bob@ht2.me.umn.edu), "make ptx13" for Sequent DYNIX/PTX 1.3 (Mark Vasoll, OK State U), corrected "make install" to use man page directory for the man page (Scott Kramer, SRI). New 179-level executable for Amiga from Steve Walton. Fix for whoami() in ckutio.c, in which Kermit could core dump if the user who was running it did not have an entry in the passwd file (i.e. getwpnam returned a null pointer). Removed duplicate declaration of SUB from ckcasc.h. Another new executable + cksfio.c for Atari ST. Compiled and tested on SUN, NeXT, Aviion, PC with Sys V/386 R4, VAX/VMS, HP-UX 7.05, Encore 510 UMAX 4.3, Convex C210 OS 9.1 / POSIX, Macintosh, ... Made new hex files for VMS, Mac. Interactive Systems Corp fixes from Howard Weiss, Sparta Inc, Columbia, Md. Released to the general public for testing 18 Feb 1992. ------------------------------ 5A(179) Sat Feb 8 20:01:45 1992 Brainstorm: now that Kermit can read packets without terminators, it should also be able to read packets with printable start-of-packet characters. Tried it, it works! Kermit file transfer with NO CONTROL CHARACTERS AT ALL. This bodes well for the 3708... ckuus7.c (all I had to change was the SET { SEND, RECEIVE } START-OF-PACKET command to accept characters in the printable ASCII range.) Changed sr10-bsd make entry from -DBSD4 to -DBSD43. Added a missing (char *) cast in ckcpro.w. Moved unhex() prototype in ckucmd.c to top of file, so it takes effect even if -DNOICP. Michael Pins . Changed ckcdeb.h to define UNIX if COHERENT or MINIX are defined, if UNIX is not defined already. Removed many unneeded and/or redundant extern declarations from ckuus4.c. This lets the COHERENT compiler get a lot farther. But not far enough... Added some missing HELP commands. ckuus2.c. Fixed handling of input lines from command files that are too long for the command buffer: 1. Interactive: error message, back to prompt. 2. TAKE file: error message, back to prompt. 3. Redirected standard input: error message + "error in background..." 4. Init file: error message, straight to prompt (or exit). ckucmd.c, ckuus5.c. Jay Rouman reported that edit 178 TELNET didn't work right with the MTS (Michigan Terminal System) telnet server. Changed Kermit to start out like a real, vanilla half-duplex NVT. Also discovered that MTS sends IAC GA, a two-byte command, but tn_doop() always reads three bytes. Hence the screwed-up echo. Fixed tn_doop() to read a third byte only if the command is DO, DONT, WILL, WONT, or SB. Result works fine on all systems previously tested, as well as on MTS. ckcnet.c (and msntnd.c -- same code, slightly adapted, runs in MS-DOS Kermit). Fixed askmore() to fflush() the "more?" prompt. This appears to have been the only casualty so far of -DNOSETBUF (see edit 177). ckuusx.c. Made it possible to pass an open file descriptor for a network connection on the Kermit command line, just like for an open terminal device: -l name = terminal device name, e.g. /dev/ttyh8 or ttx3: -l number = file descriptor for an open terminal device -j name = IP network host name or (dotted numeric) address [:service] -j number = file descriptor for an open TELNET connection -X number = an X.25 address -Z number = file descriptor for an open X.25 connection The -X and -Z are necessary to force the difference between an X.25 address, which might be totally numeric, and an open file descriptor. Also, in doing this, discovered that "-l " resulted in the line getting set to a random speed. Fixed this. ckuusy.c, ckuus2,c and ttopen() in ckutio.c. Discovered that a second remote disconnect during CONNECT on a pure Sys-V system crashed the program because SIGUSR1 was armed but wasn't being caught any more. (How come this never showed up before?) Changed conn_int() to disarm the signal after it is caught. It is re-armed when CONNECT mode is entered again. ckucon.c. Joe Doupnik reported that when locking shifts are in effect, filenames can become garbled. Fixed in ckcfns.c. Found a case where Kermit was not freeing a discarded packet-receive buffer, namely when it detects it has read the echo of the packet it just sent (one -- maybe the only? -- source of the onerous "Receive window full" message). Also found that sent packets can be echoed more than once, e.g. by a 3270 protocol converter: once in place, then once again in the echo area. Both fixed in ckcfn2.c. Now C-Kermit can transfer files with (a newly modified test version) of IBM mainframe Kermit through a 3270 protocol converter that is *not* in transparent mode! Noticed that when C-Kermit is in packet mode, AND parity is not NONE, AND it's a BSD-based implementation (not System V, etc): (a) ^C^C out of packet mode does not work, and (b) ^Z suspends Kermit, but leaves the terminal modes messed up. Diagnosis: When parity is not NONE on BSD versions, ttpkt() puts the terminal in CBREAK/NOECHO mode rather than RAW mode. But it was forgetting to disable the handling of the interrupt and quit characters. Cure: Added this code to ttpkt() in ckutio.c (just copied it from the now-defunct LPASS8 section). Added -S command-line argument. Means "Stay" in Kermit after executing command-line action arguments, i.e. enter the interactive command parser (if any), similar to MS-DOS Kermit's STAY command. ckcmai.c, ckuusy.c. Added -C command-line argument. Takes a quoted string which is one or more interactive commands. The commands are defined as a macro called cl_commands and are executed when Kermit starts up, after the init file, after the other command-line arguments, before any "application file", and before entering interactive mode. The cl_commands macro remains defined for subsequent use if desired. Only #ifndef NOICP and NOSPL. -C does not count as an "action command", even if it contains interactive versions of action commands (CONNECT, SEND, etc), so if no other action commands were given on the command line, the interactive command parser is entered after these commands are executed. To defeat this behavior, include EXIT in the list of commands. ckuusy.c, ckcmai.c. Fixed bug in GET command noticed by Max Evarts. In the multiline version of GET, if a local filespec was given, it was erroneously converted to "bland form" (e.g. lowercased) instead of being used literally. Actually, that was only one symptom. In many cases, the "as-name" did not work at all during file reception. ckcfns.c. Added support for Motorola CPU type symbols m68k and m88k for \v(cpu) from Ron Heiby, Motorola. ckuver.h, ckuus5.c. temp buffer was being written into before it was allocated in ckucon.c. Now fixed. Noticed by Bruce J Moore. genbrk() call in ckutio.c was lacking an argument (used by V7 only). Also noticed by Bruce J Moore. Got new ckiker.boo for Amiga (for edit 178) from Steve Walton. Got C-Kermit 5A(178) for the Atari ST from Bruce J Moore . New cksfio.c, ckstio.c, ckscon.c, plus minor changes to the ckc*.* and cku*.* files, all within #ifdef GEMDOS..#endif. Added makefile entries for Motorola Delta 68K and 88K systems from Ron Heiby at Motorola. Added makefile entry for Silicon Graphics Iris Indigo IRIX 4.0 from Nelson Beebe at U of Utah. Finally, against my better judgement, added a -DNOSHOW build option to remove the SHOW command and all supporting code in a last-ditch attempt to get ckuus4.c to compile for Coherent. If that works, then maybe MINIX will work too. Added "coherentmi" (minimum interactive) entry to makefile that deselects just everything possible, including SHOW. ckuus[r245].c, makefile. ------------------------------ NOTE: The history of all version 5A edits prior to the Beta edit, 179, have been moved to the (big) file CKU178.UPD. ------------------------------ END OF CKCKER.UPD