File CKUKER.UPD, Update history for C-Kermit. -*- text -*- Author: F. da Cruz, Columbia University Center for Computing Activities 4F(095) Thu Aug 31 20:04:59 1989 Fix a bug which has been in ckucmd.c forever -- can't believe nobody ever noticed it before! If cmnum() is called as the last field in a command, and it is supplied a default value, and the user types carriage return instead of a number, then the default was not supplied. The fix was in cmfld(), to copy the default into the atom buffer, rather than just pointing to it. This fixes the problem with the transmit command not waiting for the echoed linefeed when the user types "transmit foo.bar" and does not supply the final field, the turnaround character, which was supposed to be linefeed (10) by default. Also, fix transmit so it echoes right on both full and half duplex connections. Addition of support for a variety of AT&T modems in ckudia.c, from Eric F. Jones at AT&T, including the 2212C, 2224B, 2224CEO, and 2296A (should also work with 2224G and 2248A, but not tested). Also the AT&T Digital Terminal Data Module (DTDM) found in the telephones connected to the AT&T System 85 digital PBX. In ckutio.c: (a) for AT&T-based systems, modify tthang() to not wait for carrier when reopening the device, (b) don't attempt to use the TIOCSINUSE ioctl() unless TIOCSINUSE is a defined symbol. Several minor cosmetic changes for the benefit of VMS. 4F(094) Sat Aug 19 18:29:14 1989 C-Kermit fails to write out one or more output file buffers on the AT&T 3B2/300, but works ok on all other systems tested, including other AT&T systems. Added bullet-proofing and debugging to zmchout() in ckufio.c, and in ckcpro.w, checked decode()'s return code and cancelled the protocol transaction upon decode() failure. Also, commented out a trailing token after an #endif in ckuusr.c. (Later, turns out that the mere act of assigning the value returned by zmchout() to a variable caused the macro to be evaluated correctly). 4F(093) Wed Aug 16 22:22:05 1989 Many places ckudia.c, ckucon.c, ckuscr.c, and ckutio.c -- change the type of functions that are passed as arguments to signal() to SIGTYP rather than no type at all (i.e. int). This should prevent many compiler warnings and maybe even some runtime problems? In ckcfns.c, fix the file counting (ffc++) so that correct file sizes are reported by 'statistics'. 4F(092) Fri Aug 11 15:06:39 1989 Add code for converting file time to seconds since Jan 1, 1970 GMT. Not used yet, but will be used in setting Unix file date from incoming file attributes. From David MacKenzie and Michael Haertel. (This code is enclosed in #ifdef NOY_YET brackets, because it causes numerous compile & link time errors on certain systems). Rename memcpy() replacement in ckudia.c to xcpy(), to eliminate core dumps that the memcpy replacement caused on the ATT7300 and perhaps other systems. Peter Mauzey, AT&T. makefile addition for ATT6300, Peter Mauzey, AT&T. makefile addition for Convex, Peter Mossel, Columbia Univ Health Sciences. 4F(091) Sat Aug 5 14:29:41 1989 Fix send-packet size recalculation to not respond to spurious errors like timout-retransmission of initial S-packet. Reorganize code that responds to MAIL and REMOTE PRINT commands so that it's in the system-dependent module, ckufio.c. This will require adding zmail() and zprint() functions to all other ck*fio.c modules. Make a couple small changes to ckotio.c for OS/2, and in ckuusr.c also include signal.h and setjmp.h for OS/2 (Rob Kedoin, blessed by Chris Adie). 4F(090) Wed Aug 2 19:24:01 1989 Fixes from Bob Larson: Remove duplicate call to sysinit() from ckcmai.c. Don't call strlen() on a constant in a loop (tilde_expand(), ckufio.c). A couple OS-9 specific changes. Put definition of memcpy() function into ckudia.c, because it is not available to certain C compilers (used in Microcom modem support). Attempt to make the Apollo SR10-BSD version compile correctly: Change all "#ifdef apollo" back to "#ifdef aegis", and remove -Uapollo from the sr10-bsd makefile entry. This way, "apollo" is still defined, which apparently it needs to be when #include'ing , otherwise there are horrible compiler errors regarding _bufsiz, etc. 4F(089) Thu Jul 20 19:59:25 1989 OS-9/68K support from Bob Larson, USC. The main difference between OS-9 and Unix (from Kermit's point of view) is that the OS-9 file system uses CR as a line terminator, rather than LF. The OS-9 specific modules are ck9con.c, ck9fio.c, and ck9tio.c Other modules had "#ifdef OSK"..."#endif" conditionals added: ckuus*.*, ckcmai.c, ckcdeb.h, ckucmd.c, mainly having to do with \r, \n differences between OS-9 and Unix. Bob also found and corrected a lot of mistakes in the command parser -- extraneous dereferencing of pointers, misgrouped parentheses in numerous calls to cmcfm(), etc. Bob also replaced Jim Knutson's Microcom modem support in ckudia.c with a different style of support for this modem. As Bob says, "the two versions make very different assumptions on how the modem will be configured and used. Mine assumes the modem is configured for reasonable interactive use, and will try the autobaud sequence if the modem doens't respond to a return. The other one forces the configuration into modes that may be slightly easier for a computer to understand, but make it hard to use interactively." Note, Bob makes extensive use of memcpy(). I hope that all the systems that use ckudia.c support this function! If not, it can be replaced by strncpy(). Also, in ckudia.c, add support for additional responses from Hayes-like modems: NO DIALTONE, BUSY, NO ANSWER, RING, ERROR. From Bo Kullmar, Kista, Sweden. Also, in ckudia.c, add a couple sleep(1)'s for Rolm CBX dialing. This made it work, finally. In ckutio.c, function tthang(), remove the closing and reopening of the tty for BSD42. It doesn't seem to be necessary. In ckufio.c, add a little bullet-proofing to zsout() and zopeno(), to prevent the case where you could crash the program by typing the command "log debug" twice in a row. Fix the TRANSMIT command to be interruptible by Ctrl-C, by getting rid of longjmp, which apparently leaves you executing on the wrong stack. Live & learn... Put all references to signal handling in the TRANSMIT command (ckuusr.c) within #ifndef OS2...#endif conditionals. Make the "size" message on incoming files in local mode less space consuming, and put a space between it and the "A". From Bo Kullmar in Sweden, fix ckucon.c not to give "Can't get character" message if myread() returned its special error 9999. 4F(088) Wed Jul 19 20:54:06 1989 These releases are flying thick and fast! This one has fixed-up support for Masscomp/Concurrent RTU, plus a couple minor cosmetic improvements from Farrel Woods, ftw@westford.ccur.com (Concurrent, formerly Masscomp): The first is to get around a bug/inconsistancy in RTU signal handling in the Berkeley environment. It turns out that if a user handles a signal (SIGTSTP), then any pending system call will return with EINTR when the program is resumed. This caused Kermit to exit after being resumed, since our library (e.g., getchar) will not re-try the system call. Subsequent reads (and, getchars) will work alright. The fix is set a flag before sending SIGSTOP to ourselves, and upon resumption, do an extra getchar if the flag was set. (yuck). Masscomp/Concurrent was added to the herald. The flag for the first bug was located in ckutio.c. It seemed to be the place to put those kind of globals... RTU as of version 4 uses Honey Dan Ber (sic?) uucp. The lock files live in /usr/spool/locks. Upon resuming after being suspended, call prompt() if not in background mode so that you know Kermit is paying attention to you again. The Makefile was changed to build Kermit in the ucb universe, with the BSD42 flag turned on. 4F(087) Wed Jul 19 11:35:09 1989 Hmmm.... A month ago, I merged in all of Chris Adie's OS/2 conditionals, and now all of that has disappeared! I can't explain it. Maybe there was a disk crash and the previous copies of the files were restored on top of the new ones? Sigh... Anyway, I did it again. New copies of: ckcmai.c, ckucmd.c, ckudia.c, ckuscr.c, ckuusr.c, ckuus2.c, and ckuus3.c. 4F(086) Tue Jul 18 11:52:16 1989 Add missing #ifdef OS2's to ckcdeb.h and ckuusr.h. Forgot these before, oops. Change definition of tlog() and debug() when not defined to be the null string, instead of {}, to prevent problems with semicolons in if-else constructs (Steve Walton, Cal State Northridge). In ckutio.c, function ttopen(), also put local line in no-echo mode for ATT Sys III/V, as is done for BSD (David MacKenzie, Environmental Defense Fund, Rockefeller Univ). Major problems compiling on Apollo SR10 involving use of getchar() in ckucmd.c with "make sr10-bsd", reported & not yet fixed. 4F(085) Fri Jul 14 13:19:00 1989 ckcfns.c: In opena(), save global file mode (i.e. transfer syntax, variable "binary") in variable "bsave". Check incoming file type attribute ("), if any. If text (A), set transfer syntax to binary for this file only. If binary (B), set to binary for this file only. In clsof(), restore global file mode from bsave. This allows the sender to tell the C-Kermit receiver whether the file is being transferred in text or file mode, so that you don't have to type a "set file type { text, binary }" command on the C-Kermit receiver. This code has no effect if the sender does not send the file-type attribute, or if the C-Kermit receiver has "set attributes off". 4F(084) Mon Jul 10 20:47:51 1989 Get rid of index() function in tilde_expand(), ckufio.c. Some systems don't have it (like Xenix). Fix directory command to allow ~name, and ~name/, as well as ~name/file. Install missing help message for "set incomplete" and "set terminal". 4F(083) Wed Jul 5 12:09:50 1989 Add support for RT PC AIX 2.2 to ckutio (mostly lockfile stuff) and makefile, from Ge van Geldorp, Netherlands). Minor fixes to Zilog Zeus support from John R. Evans, IRS, Kansas City. 4F(082) Mon Jul 3 15:19:22 1989 Don't try to output to debug log in cmdini() in ckuusr.c, because it's not open yet (Martin Maclaren, Bath Univ, UK). Allow cd/cwd to also accept "~" notation in directory. Required the addition of a new parsing function, cmdir(), to ckucmd.c. Hacked it in as quickly as possible, mostly by killing stuff from a copy of cmifi(). Seems to work for SUNOS and Ultrix. Hope it doesn't break all the other versions... Add tilde expansion to cwd() function in ckcfns.c, so that server can also expand tildes in 'remote cwd' commands. Also add tilde expansion in sinit() when C-Kermit server executes the 'get' command. Also in rcvfil() so it can receive files into directories specified in tilde-notation. Add tilde expansion to System-V based versions too. Code for ckucmd.c from Dave MacKenzie at Rockefeller U. Those who have experience with other kinds of systems (V7, Sys III, etc) should look at this code. Should be simple to get it working for any Unix variant. See #ifdef DTILDE. Move tilde-expansion code from ckucmd.c to ckufio.c. Tilde-expansion code is compiled based on existence of TILDE symbol, which is defined in ckcdeb.h. Enable sending file timestamps from System V. Code for ckufio.c from Dave MacKenzie. See #ifdef TIMESTAMP. Clear up some packet-length confusion in pwp's new sdahead() encode-ahead function, in ckcfns.c. Previously, C-Kermit was sending slightly-longer- than-negotiated packets. Fix pwp's modification to zopeni() in ckufio.c. File input buffer was not being reset in all cases, resulting in leftover text from a previous transfer being prepended to the next transfer. Add "make next" to makefile, Mic Kaczmarczik, UT Austin Computation Center 4F(081) Thu Jun 22 12:26:04 1989 Add makefile entry for Berkely Unix 4.x with HoneyDanBer UUCP and clean up lock-file selection conditionals and code in ckutio.c (Paul Placeway),. From David MacKenzie, a couple small patches to make ckutio.c compile correctly on recent versions of UNOS. 4F(080) Mon Jun 19 20:51:41 1989 Merge in changes from Chris Adie, Edinburgh University, Scotland, for OS/2 support: - New OS/2-specific modules: ckocon.c (terminal emulation), ckofio.c, ckutio.c. - Minor changes to the following files under #ifdef OS2 conditionals: ckcdeb.h, ckucmd.h, ckuusr.h, ckcmai.c, ckucmd.c, ckudia.c, ckuscr.c, ckuusr.c, ckuus2.c, ckuus3.c. - Add new material to Chris's ckofio.c OS/2 file-system support module: Limited file attribute support. Paul Placeway's buffered file input and output. Chris Adie's work was based on an older C-Kermit, and so this two-way merge was unavoidable. The result is entirely untested and may not work at all, so those with OS/2 development systems are urged to debug it and send back the necessary fixes. Change the interactive command parser, for BSD4.x only, to expand tildes in filenames in SEND, RECEIVE, DIRECTORY, LOG, and similar commands. This code is all in ckucmd.c, under #ifdef BSD4 conditionals, in the cmifi() and cmofi() functions. AT&T UNIX users are invited to adapt it to System III, System V, etc. Add file creation date to attributes sent by C-Kermit (BSD 4.x only). Change input() function in ckcfn2.c to avoid getting into retransmission loops when it receives an ACK for the previous packet or a NAK for the next packet. Restore lost comment delimiter in ckcpro.w, on "I" line, which prevented type-2 or -3 block checks from being selected by the client. Remove something that was added in 4F(077), i.e. using file descriptor for the terminal in packet mode. It turns out that this prevented Kermit from sending/receiving files to/from standard input. Changes for 4.1 BSD from Frank Prindle: Make setegid() and seteuid() calls in ckuusr.c and ckufio.c conditional upon BSD42, rather than BSD4, because 4.1 BSD doesn't support them. In file ckutio.c, tthang() shouldn't close and open the ttyfd, and ttpkt() should choose the "old" line discipline. Add special BSD41 entry in makefile. Another one from Frank Prindle: When assigning an external line for local-mode operation, turn off ECHO bit in sg_flags. This eliminates the problem of bizzare delayed echoing when connecting back to a remote system after a file transfer, which first appeared in 4E(072). For the benefit of those still running versions between then and now, the fix is to find the following lines in function ttopen() in the file ckutio.c: #ifndef UXIII gtty(ttyfd,&ttold); /* Get sgtty info */ and add the following line immediately after them: if (xlocal) ttold.sg_flags &= ~ECHO; /* Turn off echo on local line */ In ckucmd.c, change the name of the function digits() to rdigits(), because digits is now apparently a reserved word on some systems, like NEC Astra XL 3.4 (Gary Holbrook). Try to fix the hangup code. In ckutio.c, function tthang(), where we close and reopen the line, if the reopen fails, kill the lock file. Add message, "[hanging up]". In ckucon.c, fix ^\h escape (hangup) in connect mode to wait until tty port reader fork terminates. Add ^\q escape (hangup and quit from Kermit). All this from Patrick Wolfe, Kuck & Associates, Inc, pat@kai.com. "mail" has been changed to "Mail" to ensure that the Berkeley version will be used, which accepts a "-s" switch on the command line for subject. Add support for Microcom ax9624 modem from Jim Knutson in ckudia.c. Remove #include for Apollo aegis in ckutio.c (Martin Maclaren). 4F(079) Add 'transmit' command for raw uploading. For now, there's no way to interrupt it. 4F(078) Changes by Paul Placeway, Ohio State University, to speed up decoding of Kermit packets and writing out to files. Also code from Paul to dynamically size outbound packets based on the frequency of retransmissions - the noisier the line, the shorter the packets, the cleaner the line, the longer the packets (up to the maximum negotiated length). C-KERMIT FOR UNIX, CHANGES FROM VERSION 4E(072) TO 4F(077), 1 Apr 89 A somewhat major new release, in beta-test form (but if it tests ok, it can become a real release without requiring any further changes). ATTRIBUTE PACKETS. Minimal support for attribute packets added: ckcpro.w, ckcdeb.h, ckcfn2.c, ckufio.c, ckuus*.c. C-Kermit can send Attribute packets containing system ID, file sizes (K and bytes), and encoding method (text or binary), and will honor positive and negative responses. It will also receive Attribute packets (see below). In the ckuus* modules, the command 'set attributes {on, off}' was added, to allow Attribute packet processing to be disabled in case of misunderstandings; it is enabled by default. IMPORTANT: ckcpro.w calls a new function, sattr(), which is defined in ckcfn2.c. The sattr() function, in turn, calls zsattr(), which MUST BE DEFINED in in each and every ck?fio.c module. So far, it has only been defined in ckufio.c, for Unix. Macintosh and VMS Kermit developers -- be sure to add this function to your system-dependent code. In the future, a similar function will have to be added to ck?fio.c to modify an incoming file's attributes. C-Kermit receives and processes attribute packets, and fills in an attribute structure. So far, C-Kermit does nothing with these attributes except for "Disposition" (Attribute "+"). If the disposition is M, then the file is mailed to the designated address(es). If the disposition is P, then the file is printed with the specified options. These operations are currently done in the crudest possible way (via "system()"), and only for UNIX. EFFICIENCY: Modifications from Paul Placeway at Ohio Statue University that dramatically speed up C-Kermit when sending. Changes as follows: ckcker.h - define a file input macro similar to getc(), and a buffer size. ckufio.c - function zinfill() added to fill input buffer, zchin() modified to use buffered input. NOTE: zinfill() will have to be added to all the other ck?fio.c modules (Macintosh, VMS, etc etc). ckcfns.c - getpkt() totally rewritten and demodularized. It used to be pretty, but now it's fast. getchx() and encode() copied inline. The SET SERVER TIMEOUT command was added to control the rate at which the C-Kermit server issues NAKs during command wait, 0 = no NAKs at all. Changes to ckuus*.c, ckuusr.h, ckcfns.c, ckcmai.c. The server's periodic NAKs can interfere with originate/answer devices like digital PBXs or autodial modems, putting them in originate mode when the user wanted the device to be in answer mode. SET SERVER TIMEOUT 0 can now be used in such situations. MAKE C-KERMIT SEND NAKs: ckcpro.w, ckcfns.c, ckcfn2.c, ckcmai.c. Up till now, C-Kermit has always responded to a corrupted packet or a timeout by resending its previous packet. It turns out that when talking to a more generalized Kermit program -- i.e. one that provides for sliding-window packet transfer, in which a window size of 1 is just a special case -- that it is better for C-Kermit to send NAK packets in response to corrupted packets or timeouts, which a sliding-windows Kermit will act upon immediately. This is done by adding a flag variable, nakstate, in ckcmai.c. This variable is set to 1 in ckcpro.w before rdata state is entered. In the input() function (ckcfn2.c), a NAK is sent in response to a timeout or corrupted packet if nakstate != 0, otherwise the previous packet is resent, as before. In function tinit() (module ckcfns.c) nakstate is reset to zero at the beginning of each transaction. ckcpro.w: Cure a longstanding bug. When in Y state, if there's another file to send, the transition is to state ssfile, not ssdata! The problem was that if C-Kermit was sending a file whose name began with X or Z, and the other Kermit echoed back the filename in the data field of the ACK packet (as C-Kermit itself does), the improper immediate transition into ssdata state caused the ACK data field to be checked for X or Z, which is the signal for file interruption. The fix prevents the data packet protocol from looking in the ACK to the file header. The reason it escaped notice for so long is that it could only happen when sending a wildcard group of files with names starting with X or Z and with SET FILE NAMES LITERAL (which forced the normally lowercase X's or Z's to be uppercase) from one C-Kermit to another C-Kermit (actually, could also have happened a lot with Mac Kermit too). ckcpro.w: Reformat and comment. No longer try to preserve the illusion that Kermit is such a simple protocol it can fit on 2 pages... ckcfns.c: In tinit(), set spktl = 0, so that a 'server' command given after some other command will transmit a NAK(0), rather than whatever the last packet happened to be (this bug had been there forever). In sinit(), make sure that C-Kermit sends an error packet if a 'get' command to the C-Kermit server results in too many filenames. ckwart.c: Change data type of state transition array from short to CHAR. Save several more K. VMS support: Add changes from Mark Buda & Barry Archer to ckuusr.c within "#ifdef vms" conditionals -- VMS-specific way to find init file, and special handling of DIRECTORY command. ckuusr.c: Add some debugging info to trap(). ckuus2.c: In rdebu(), change reference to rdatap (which could sometimes be uninitialized) to data+1, which always works. This one could cause core dumps with 'set debug on' at beginning of file transfer. ckuus3.c: In screen(), always issue error or warning messages (even if in quiet or no-display mode). ckutio.c: Many changes, mainly to prevent opening of terminal in O_NDELAY mode, skip the exclusive access baloney, hanging up, etc etc, when terminal is job's controlling tty. Also, if terminal is job's controlling tty, use file descriptor 0 (stdin) rather than obtaining a new file descriptor on it. This allows UNIX "idle line monitors" to properly detect Kermit activity and not log out Kermit users in the middle of 40-megabyte file transfers because the tty line appears to be idle. ckufio.c and ckutio.c: Add UNOS support from David MacKenzie, edf@rocky2.rockefeller.edu. Add function zinfill() for buffered file input, from Paul Placeway. ckudia.c: Slightly better support for Hayes modems -- try to catch the case where user dials out at 2400 but gets connected at 1200. C-KERMIT FOR UNIX, CHANGES FROM VERSION 4E(070) TO 4E(072), 24 Jan 89 Maintenance release. Fixes some major bugs, makes a few minor changes in functionality. 1. In ckcfn2.c, function spack(), change the test for long packets from "if (j > 95)" to "if (j+2 > MAXPACK)". When long packets were being sent by C-Kermit, and the final packet was 93-95 characters long, the packet would be erroneously sent as a short packet, with garbage would go into the LEN field. Thanks to Mike Brown, Purdue Univ Computing Center. 2. In ckcfns.c, function rpar(), set data[1] (MAXL, maximum normal packet length) to 94 when using long packets, rather than inserting garbage into this field based on the requested long packet length. Properly parenthesize the operations in setting data[10] (CAPAS). Thanks to Chuck Hedrick at Rutgers and Joe Doupnik at Utah State University for this fix. This fix should also allow C-Kermit to correctly process incoming initialization strings that have a second or subsequent CAPAS byte. 3. In ckcfn2.c, function rdata(), initialize rdatap to null so a debug() call from rpack doesn't crash the program. Thanks to Andy Tanenbaum at THE in the Netherlands for reporting these crashes. 4. In ckutio.c, function ttopen(), change "if (*lcl == -1)" to "if (*lcl != 0)" because some compilers set this number (the result of a logical comparison) to some nonzero number other than -1. This should allow the local/remote status to be sensed more accurately on some systems, like 4.3bsd. Thanks to Ray Moody at Purdue for this one. 5. Fix declarations ckcmai.c. Four of them had semicolons where there should have been commas. Luckily all were ints. Thanks to Anton Rang for this. 6. In ckuusr.c, in 'case XXSHE:', add a missing semicolon at the end of the line "while (((wstat = wait((int *)0)) != pid) && (wstat != -1))", to ensure that the following statement, "signal(SIGINT,istat);", gets executed at least once. Otherwise, there can be foreground/background confusion. Thanks to Robert Andersson in Norway. 7. Also from Robert Andersson: "In ckutio.c in the function ttpkt(). If UXIII was set, ttraw.c_cc[4] was set to 200 and ttraw.c_cc[5] was set to 1. The idea here probably was to increase performance by reading chunks of 200 characters in one read(). However, the end result was that absolutely all reads took at least 1/10 of a second (due to cc[5] being 1). The effect of this is a performance typically 1/3 of the 4D version. I changed c_cc[4] to 1 and c_cc[5] to 0 and everything was fine. Note that since the actual read() is done with a 256 character buffer it will return as many characters as it can, even with c_cc[4] and [5] set like this!!" 8. Remove a couple of spurious "\" escapes from strings in ckuus2.c and ckwart.c, that were noticed by Gnu CC. The latter may have prevented compilation of ckcpro.c by some C compilers. John Gilmore at Berkeley. 9. In ckutio.c, module ttlock(), replace ATT3BX code that writes the pid into the lockfile with a safer version. Reportedly, the old way would cause core dumps if the dial command were executed many times. John Zeeff, Ann Arbor, MI. 10. Fix eighth-bit-prefixing negotiation so that it works for more than one SEND command. Add "rqf = -1;" to tinit() in ckcfn2.c. Gordon Scott, Micro Focus, Newbury, UK. The symptom here was that files sent with the second and subsequent SEND command when parity was other than NONE could be corrupted (usually if they contained &'s). 11. Attempt to fix ATT7300 UNIX PC support. Code contributed by Joe Doupnik, Utah State Univ, Feb 88. Large changes to ckutio.c and ckudia.c. 12. When sending ACK for F-packet, encode the filename rather than sending it bare. Change to ckcpro.w, entry "F". Doesn't jibe with MS-Kermit 2.32, but that is fixed in 2.32/A. 13. Add support for IBM/Siemens/Rolm CBX dialing in ckudia.c. Might not actually work, since the CBX is not really a modem and its modem signals do not behave like a real modem's. 14. Have command parser (ckucmd.c) treat Ctrl-I as an ESC, rather than a space, in line with current C-Shell, K-Shell, GNU EMACS, etc, practice. Also in same module, strip parity bit from any input characters. 15. Change wart to use short, rather than int, as the datatype for the state transition array. Saves several K. Those who use wart to build programs with more than 127 actions should rebuild wart and define TBL_TYPE to be "int". Or edit wart's output, changing "short" to "int". 16. Replace clever CRC algorithm with a more mundane table-driven version, which works about 30% faster: function chk3(), module ckcfn2.c. (This doesn't mean that file transfers go 30% faster, because other things are going on too. But they are faster, especially on systems with slow CPUs.) 17. Add "hangup" command (ckuusr.c, ckuus2.c, ckuusr.h). Tested in Ultrix, works there at least. "Hangup" simply calls tthang() in ckutio.c, which is a confusing mess, especially for System-V-based systems. Be sure to wear your special #ifdef glasses... The new hangup command seems to clear up problems that previously caused C-Kermit to hang or give up with i/o errors upon connecting to an external line that had been previously escaped back from. 18. Let users set speed to 19200, at their own risk. ckutio.c: ttsspd(); ckuus2.c: ('help set speed'); ckuus3.c: chkspd(). Tested in Ultrix, works there. 19. Add 2.10 BSD entry to makefile (ckuker.mak), and to ckutio.c (Stan Barber, s0b%bcm.tmc.edu@tmc.edu). Also Microport Sys V entry (Bernie Eiben, DEC). 20. Fix up SCO Xenix entries in makefile (John Owens, john%jetson.uucp@uunet). 21. Fix mtime() in ckutio.c to also work on 16-bit 2.10 BSD systems (just make sure we're using long arithmetic). Jack Nelson, U of Pittsburgh. 22. Avoid creation of zombie processes (e.g. under 4.3BSD) by not trying to kill processes that have already exited. ckufio.c: zclosf(). Ray Moody, Purdue Univ. 23. Allow for situation in which C-Kermit sends I-packet (packet 0), times out, resends I(0), gets ACK(0), sends R(0), gets another copy of the ACK to I(0) when it's expecting S(0) and exits with "unexpected packet type". Normally, the input() function would catch this kind of thing, but in this case sequence number 0 is being reused (3 times!). Thanks to Ted Medin for catching this one. Fix is to add a state "Y" in ckcpro.w. 23. Some Ultrix-specific code added under "#if(n)def ultrix" for opening and closing tty line vs modem control, etc, in ckutio.c. From Paul Vixie at DEC. 24. Turns out SUNOS 4.0 and later use the Sys V R3 convention of declaring signal() to be void rather than int. Change ckcdeb.h to take care of this, and add a corresponding entry to the makefile, "make sunos4". 25. Add program heralds to ckutio.c and ckufio.c for SUNOS 4.x and VAX/Ultrix. 26. Make ttoc() time out after 2 seconds if it can't write a character to the port. This function is only used in connect mode for sending typed characters out the port, and in scripts and dial commands. 27. In ckucon.c, if 'connect' gets an i/o error when reading from the port, make it try 3 times before giving up. On each retry, have it execute the hangup function, tthang() from ckutio.c. 28. In ckutio.c, tthang(), make BSD systems not only drop and raise DTR, but also close and open the line. Without the close/open sequence, subsequent 'connect' commands would hang. 29. Make 'cd' a synonym for 'cwd'. C-KERMIT FOR UNIX, CHANGES FROM VERSION 4E(069) TO 4E(070), 29 Jan 88 ckuusr.c Put reference to SIGSTOP in #ifdef SIGTSTP conditionals. ckcmai.c Update version number and date. C-KERMIT FOR UNIX, CHANGES FROM VERSION 4E(068) TO 4E(069), 27 Jan 88 ckcfn2.c: In input(), set the rdatap pointer to the timeout message. ckucmd.c: Change name of getwd() to gtword(), to avoid conflict with BSD getwd() function. ckufio.c: Change to conditionalize zgtdir() function, calling getwd() for BSD, getcwd() for System V, and returning a constant string for others. ckutio.c: Change foreground/background test in conint() for Berkeley to be based on something that really works, namely testing the process group against the controlling terminal's process group. There is apparently no way to do this in Sys V... This fixes the disappearing prompt problem, at least on BSD-based systems. (Thanks to Fuat Baran of CUCCA for this.) C-KERMIT FOR UNIX, CHANGES FROM VERSION 4E(067) TO 4E(068), 24 Jan 88 Make this the standard released version, rename all files to ck* from xk*. Change version number and date in ckcmai.c. Makefile: Add entries for sco286 and sco86 to Makefile (D.W. Bettinger, DEAN@SUVM) Make ckudia.c depend on ckucmd.h (G. Uddeborg, uddeborg@chalmers.se) ckwart.c: Change ungetc(c) to ungetc(c,fp) in case '/' in gettoken(). ckcfns.c: In function cwd(), after changing directory, ask system for new directory name by calling new function zgtdir(). ckuusr.c: Add stptrap() function to allow job to be suspended by Ctrl-Z. Change call to dial() to ckdial(). ckudia.c: Change name of dial() to ckdial() to avoid name conflict. Add support for ATT 7300 modem from R.E. Hill (untested). ckutio.c: Add corrections to conint() from Bob Brown (brown@carrara.marble.com) to make Ctrl-Z job suspension work right. Add support for ATT 7300 modem from R.E. Hill (untested). ck?fio.c: Add new function zgtdir() to ck[uvdmi]fio.c, to return name of current working directory. Call it from ckcfns.c. C-KERMIT FOR UNIX, CHANGES FROM VERSION 4E(066) TO 4E(067), 5 Aug 87 This version makes the minor corrections to 4E(066) that proved necessary after the beta test of that release. - ckcfns.c - In spar(), fix long packet negotiation to allow "set send packet-length" override to work. Rename maxsize parameter of getpkt to bufmax to avoid confusion with global maxsize. - ckcfn2.c - In rpack(), allow 3 tries to get a packet. This allows for hosts (like IBM mainframes) that echo the CR that terminates C-Kermit's packets with a CRLF. Misc "lint" cleanups. - ckcmai.c - Update program version number and date, give credit to more people. - ckucon.c - Change wait(0) to wait((int *)0). - ckudia.c - Add Concord Condor CDS 220 2400b modem support from Jim Guyton. Misc "lint" cleanups. - ckufio.c - Change wait(0) to wait((int *)0). Don't #include for Xenix (this might be dangerous?). In zxcmd, set effective group & user IDs for BSD to override security checks of csh. - ckuker.mak (Makefile) - Added make options for cleaning out intermediate & object files and for lint. Added make option for CDC VX/VE systems. Added some comments for improved clarity. - ckutio.c - Break a line that was longer than 80 chars. Add missing return in conditionals at end of ttpkt(), so program can run on Pyramid and similar systems. Add support for CDC VX/VE Sys V Unix from S.O. Lidie, Lehigh U. Don't #include for Xenix. - ckuusr.h - Move definition of KERMRC here from ckuusr.c. - ckuusr.c - Fix parsing of "show paramaters" (now you can edit it). Change wait(0) to wait((int *)0). Remove some debug() statements. Move definition of KERMRC from here to ckuusr.h, so "show" command can find it. Set default prompt before reading init file instead of after, so "set prompt" in init file will work. Set effective group & user IDs for shell command execution. - ckuus2.c - Fix help message for "set send/receive packet-length". - ckuus3.c - Attempt to fix parsing of "remote cwd" command from take file. Fix typo in "Extended-length packets requested" message. - ckvfio.c - Define PWDCMD so that "cwd" can work (hopefully). - ckvtio.c - Add missing syscleanup() function (just returns 0). C-KERMIT FOR UNIX, CHANGES FROM VERSION 4D(061) TO 4E(066), 5 Aug 87 This version is being released as a test version, because it has not been tested at all on the Mac, Amiga, VMS, or Data General, or on many of the common Unix systems (SUN, etc), and has not been tested in local mode at all except under Ultrix 2.0 on a VAX 750, and under 2.9BSD on a Pro-380. MAJOR CHANGES: Added support for long packets. Performance improvements: less copying of received data, more efficient i/o. C-Kermit now takes its init file always, even if invoked with command-line action arguments. Easy escape from packet mode (^C^C at any time). Added file bytesize mask to 'set file type {text, binary} {7, 8}' so that Kermit can be used to strip 8th data bit during file transfer (e.g. of Wordstar files), independent of parity setting. Default 8. Added 'set terminal bytesize {7, 8}'. Default 7. Added 'set retry' command to adjust packet retransmission limit. Included changes to support Data General, Apollo, Amiga, Mac with Megamax C. New 'make' options for sys5r3, CIE Regulus, HP-UX, IBM IX/370, zilog. Better statistics reporting. Fix a few major bugs: . Loss of trailing control characters at end of file when sending. . 2-character checksum now works with 8-bit binary files. . Background/take-file interaction fixed, maybe. . Insertion of spurious CRLF at position 4096 when doing 'kermit -k'. . Parsing of multine 'get' command (again). Tested against: Tested under: MS-Kermit VM/CMS DEC-20 VMS Prime Ultrix PDP11 . Ultrix 1.2 on VAX 8650 x . Ultrix 1.1 on VAX 750 x . Ultrix 2.0 on VAX 750 x x x x x x x . Ultrix 2.0 on VAX 8700 x . System V on 3B20 x x x . 2.9BSD on Pro-380 x x THINGS NOT DONE: Sliding windows. Cleaning up the horrible #ifdef mess, especially in CKU[TF]IO.C (at least, not very much). Improving the command parser. One obvious improvement would be to replace the relatively limited CKUCMD command-parsing package with the newer, more general and powerful CCMD package. This was not done because (a) CCMD is bigger, and (b) CCMD has not yet been ported to all the systems that C-Kermit can be built for (VMS, Data General, etc etc). Anyway, CKUCMD does the job. Command macros. A consistent, sensible treatment of program return codes, to allow C-Kermit to be run from scripts or DCL procedures, etc, so that they can tell whether Kermit "succeeded" or "failed". But what does failure or success mean? What if it transfers 29 out of 30 files? What should the return code be? Improving modem support. There are ioctl's in BSD & Ultrix (TIOC(N)MODEM, TIOC(N)CAR, TIOCWONLINE) for ignoring/heeding modem signals, but it's not clear (to me) which versions of BSD they apply to. If somebody wants to straighten this out in ckutio.c, be my guest. Dealing in any way with lock files or bidirectional terminal lines, esp. the acucntrl business in 4.3BSD, the uugetty business in Sys V, making the program run suid, etc. Got many, many hints about this, but it's so touchy I'll leave this to somebody who knows what she's doing and can test the results on a variety of systems. The main problem is that this area is the least consistent among all the Unix variants. Lock files and directories, their names, the permissions thereon, and the contents thereof differ from system to system, from one version of a system to the next, and within the same version of the same system, from site to site. REMOTE KERMIT command support in the C-Kermit server. Attribute packets. Dialing code for ATT7300 from Richard E. Hill. "Demon dialer" code from Jon Zeeff. Code for automatically choosing a dialout line from Frank Wortner. Support for Tandy 6000 and Alcyon Regulus from Frank Wortner. etc etc CHANGES, MODULE BY MODULE: - ckcdeb.h - remove #ifdef LONG_DEF ... #endif because LONG_DEF wasn't used anywhere. remove old commented-out Amiga junk (Phil Julian). define FREAD and FWRITE for Fortune, which doesn't have sys/file.h (David Sizeland). Put conditional comments around vax11c #includes if not vax11c (Ron Heiby). Add typedef SIGTYP for signal(), it's void under Sys V R3, int elsewhere (Ron Heiby). - ckcfn2.c - Insert #include ckcsym.h before other includes for benefit of Megamax C, so that symbol MAC can be defined (Jim Noble) Remove extraneous * from "*pkt++" in for-statement in chk2() (Jim Noble). change all "screen(SCR_PT,'Q',(long)n,recpkt);" to "screen(SCR_PT,'Q',(long)(*n),recpkt);" (3 places) (Jim Noble). Fix type-2 block checks for binary files (make everything unsigned) (David Wilson). Change name of unchar() macro to xunchar(), to remove conflict with unchar typedef for unsigned character on ATT3Bx SVR3 systems (Ron Heiby). Add support for long packets, mostly in rpack() and spack(). In input(), recognize a valid Error packet even if it has the wrong sequence number. Make chk2() only return the low order 12 bits of the checksum, to ward off sign extension problems. Remove extra level of copying by eliminating call to inlin() in rpack(). Instead, call ttinl() directly. Replace rpack() and spack() with "book-Kermit" versions, to allow receiving and sending of long packets, and removing many extraneous and time-consuming validity checks. Change packet logging functions to start at the ^A when there are leading nulls (e.g. padding) that would otherwise act as string terminators. Recode dopar() to do a simple table lookup, rather than calculate parity, to improve packet construction speed. Fix resend() to resend a packet even if it has leading null pad characters. - ckcfns.c - Zillions of "#ifdef datageneral...#endif" sections added, mostly having to do with wildcard expansion, yuck (the ckc* files weren't s'posed to have system dependencies). Changed extern long tsecs to extern int tsecs. Fixed getpkt() to remember final leftovers, so that trailing control characters are not ommitted during send (Gordon Scott). Fixed sdebu() to display seol rather than eol (Scott Ribe). Add rdebu() to display rpar() results. Change name of unchar() macro to xunchar() to avoid S5r3 name conflict. Cast tsecs to (long) in call to tlog in tstats() (Dan Murphy). Replace rpar() and spar() with "book-Kermit" versions. Remove extraneous variable chklen. Add resetc() function to reset some statistics counters. Move fstats(), tstats(), sdebu(), and rdebu() from here to ckuus2.c, because ckcfns.c had grown too large for some systems (like PDP-11s). Must keep text size of each module below 8K! - ckcker.h - Change name of unchar() macro to xunchar(). - ckcmai.c - Process init file before reading command line args. SAS version had some code to support the REMOTE KERMIT command via a temp file kludge, which was omitted (do it right, use CCMD, maybe next release). Shortened hlptxt again, sigh (for Xenix). #include "ckcsym.h" for Mac. #ifdef datageneral for longer filenames. #ifdef for Apollo which wants to use main() for something else. New server REMOTE HELP message for Mac. Remove extraneous variable chklen. - ckcpro.w - Change calling convention for rpar(), which now returns a string pointer. Reset the tty after returning from packet protocol. Remove extraneous variable 'image', which caused problems for some compilers. Issue "Escape back" messages when given 'send' or 'receive' command in remote mode. Terminate with message when error packet received and running in background (Les Mikesell). Only reset statistics counters when files are actually being transferred. - ckucmd.c - Many conditionals added to support Apollo and Data General. - ckufio.c - make zchout return -1 or 0, rather than just passing along ferror's return code. change NULL arg to execl to (char *)NULL in zxcmd(). Various conditionals for Apollo Aegis. Updated support for Fortune (now FT18), from David Sizeland, London University Medical School. #include before other includes (Les M). - ckutio.c - Many Apollo Aegis conditionals. Minor Fortune changes. In conint(), always perform background check, so that backgrd flag can be set correctly. This allows errors in TAKE files to be fatal once again (as they were in 4C). (Gordon Scott) Also in conint(), enable SIGTERM and SIGHUP signals so lock files can be cleaned up (Les M). Rearrange the whole conint() function until it seems to make sense, and try to make connoi() symmetrical with it, i.e. put back the same interrupts that conint() set traps for. Remove trailing text from #endif's. In ttpkt(), the call to fcntl should OR the FNDELAY bit into the flags, not AND it! (2 places) (Howard Chu, umich) For BSD, replace this call with an ioctl() to set and unset FIONBIO (blocking/nonblocking i/o). (Later, don't do any of this for BSD. Measurements showed BSD does better with blocking reads and buffer checks.) Make some changes to myread() so that it actually works under 4.xBSD. Change some of the System III/V code as well, so that myread() can actually return -1 when no data is available (inspection of the previous code showed that this could never happen before). (Later, BSD doesn't use myread() any more.) Add parity to list of args for ttpkt(), so that it can be saved for use by other tt functions, particularly ttinl(). Saves another copy step. Add parity arg to calls from ckcpro.w and ckudia.c. *** WARNING -- This required corresponding changes in ck[idvm...]tio.c, which could not be tested! *** Allow user to type ^C^C anytime during packet protocol to exit from the program and restore terminal modes, by checking for this in ttinl(), and adding a new -2 return code. *** Need to change ck[vd...]tio.c too! *** Add support for HP-UX dialout modems from Bill Coalson of McDonnell Douglas. Add syscleanup() function, currently empty. Rearrange myread() a little bit for doing myunread() (Les M). Totally rewrite ttinl() for efficiency & cleanliness. No #ifdef's! - ckuusr.h - Add symbol for 'set terminal'. - ckuusr.c - Return(0) from parser when we exit from command file. change dcl of istat & qstat from int to SIGTYP. in cmdlin(), make sure to set quiet = 1 if 'k' option was elected. This fixes the infamous 4K CRLF bug (the 'conoll("")' in ckcmai.c was inserting an unbuffered CRLF into the buffered data after the first 4K buffer). Add 'set retry'. Add call to syscleanup() from doexit(). Change some GOOD_EXITs to BAD_EXITs. Fix parsing of the last line of multiline 'get' to allow editing. Fix reading multiline 'get' commands from 'take' file. Move functions shopar(), dolog(), debopn() to ckuus2 because ckuusr.c was getting too big to compile on some systems (PDP-11s, etc). Also, move statistics display to new function dostat() in ckuus2.c. - ckuus2.c - Some new messages for Data General. Add '-e' (extended packet length) to usage() message, but remove -h so whole message still fits on screen. Fix hmsg() to allow editing of 'help' commands. Previously, operations like 'help send<^W>' would fracture the command line. Move functions shopar(), dolog(), debopn() here from ckuusr.c. Add dostat(). In shopar(), display limits on send & receive packet lengths, file and terminal byte sizes. Move fstats(), tstats(), sdebu(), and rdebu() here from ckcfns.c. - ckuus3.c - Conditionals for Data General. Add 'set retry'. Add support for long packets in 'set send/receive packet-length'. Add trailing argument to 'set file type {binary, text} {7, 8}'. Add 'set terminal bytesize {7, 8}'. Remove extraneous variable 'image', which caused problems for some compilers. Increase debug and transaction log string buffer lengths, and do length checking before sprintf()'s to avoid core dumps. - ckucon.c - Before forking, do signal(SIGUSR1,SIG_SIGN) to avoid killing parent if connecting to a line with no carrier. Without this, the child's signal would arrive before the parent's handler was set up (Les M). - ckudia.c - Change declarations of savAlrm and savInt from int to SIGTYP (Ron Heiby). Change Hayes dialing string from AT DT to AT D. Change Ventel modem dial string from "" to "" (Jim Knutson). - ckuscr.c - Change declaration of savAlrm from int to SIGTYP (Ron Heiby). Don't output gratuitous messages when in quiet mode. Increase script buffer size (SBUFL) from 300 to 512 (Les M). Remove 7-char restriction on "expect" strings (Les M). Then remove this change after core dumps. Log script execution to session log. Requires addition of new flushi() function. - ckwart.c - Several minor fixes from Jim Noble, mostly regarding format of output file. - Makefile (ckuker.mak) - New Fortune support under "make ft18" (David Sizeland). New make option for "sys5r3" (Ron Heiby). New make option for "cie" (David Lawyer). New make option for "hpux" (Bill Coalson). New make option for "ix370" (Wayne Van Pelt). New make option for "zilog" (Dave Woolley). Add Xenix hints (Dan Murphy). C-KERMIT FOR UNIX, CHANGES FROM 4D(060) TO 4D(061), 9 SEP 86: Changes from Jack Rouse and Phil Julian of SAS Institute: . Commodore Amiga support replaced, all-new CKI*.* files. . Revert CKUCMD.[CH] and CKUUS?.[CH] to their old selves (mostly). . Fix multiline GET parsing. . Supply a missing printf() parameter in CKWART.C. Other changes: . Fix top-level parse loop in CKUUSR.C to reset any erroneous start state. . Make sysinit() in CK[UVMI]IO.C return -1 if it fails, 0 if it succeeds. . Have CKCMAI.C check sysinit() return code. . Change refs in CKUFIO.C to _file member of FILE structure to fileno(). . In CKUFIO.C, have zclosf() kill fork before wait(). . In CKUTIO.C, fix typos in Sys-V speed setting code. . In CKCFN2.C fix errpkt() to close open files. . Add 4.3BSD acu control code to CKUTIO.C, under NEWUUCP conditional. Compiled and tested under Ultrix 1.1 (= 4.2BSD), Ultrix 1.2 (whatever that may be a hybrid of), 2.9BSD on a DEC Pro/380, and true 4.3BSD on a VAX 11/750 (4.3BSD includes an earlier version of C-Kermit -- 4C(057) -- on its distribution tape). C-KERMIT FOR UNIX, CHANGES FROM 4C(058) TO 4D(060), 29 APR 86: . Add support for Commodore Amiga (Lattice C) from Davide Cervone of Rochester University in modules CKI*.*, with minor changes to CKCMAI.C, CKUUS?.C, CKUCMD.C, CKCDEB.H. No effect on UNIX Kermit. . Fix several minor bugs in UNIX version: - Multiline GET command failure when executed from TAKE file (CKUUSR.C). - File collision renaming bugs fixed, algorithm improved (CKUFIO.C). - CONNECT command now reports fork creation failure (CKUCON.C). C-KERMIT FOR UNIX, CHANGES FROM 4C(057) TO 4C(058), 19 MAR 86: makefile: . Add special entry "rtu" for Masscomp. . Fix up "bsd29" entry. ckcdeb.h: . Added defs for CHAR and LONG for 2.9 BSD. ckcfns.c: . Make reof() return a value, like it's supposed to. . Make spar() set the right packet terminator (seol, not eol). . Change tinit() to put a NAK packet in retransmit buffer, but don't send it. . Reset cxseen in reof(), so it isn't sticky for the next file. ckcfn2.c: . Fix input() to treat NAK for packet n+1 as ACK for packet n. . Defend against writing 0 past end of buffer in rpack(). ckcpro.w: . Don't send NAK automatically at beginning of receive. . In rule, call sfile with argument xflg, like sfile expects. . Sleep a couple secs before returning to give last packet some time to escape. ckucon.c: . Remove ^S from among escape character arguments. ckufio.c: . Change execl() calls to have NULL as 5th arg, rather than (char *)0. . Fix up 2.9 BSD stuff, make it use opendir() for directory stepping. ckutio.c: . Fix nontimed read in ttinl() to work. . Change msleep() to return immediately if argument is 0 (for dial pause). . Skip setting console modes in con...() functions if not a real tty. . Give system error message in ttopen() if line can't be opened. . Remove erroneous references to DIRSIZ. . Fix up 2.9BSD stuff. ckuusr.c: . Change execl() calls to have NULL as 5th arg, rather than 0, or (char *)0. ckvfio.c (VAX/VMS support): . Fix system() to allow spawning interactive shell if '!' command given. . Fix zopeni() to not spuriously reject certain calls, so REMOTE commands work. . Fix msleep(m) to return immediately if m==0. C-KERMIT FOR UNIX, CHANGES FROM 4C(056) TO 4C(057), 31 JUL 85: general (many modules affected): . Change "set send packet-length" to override Send-Init value. . Change still more global character variables from int or char to CHAR. . Fix 4.1BSD and C/70 support (Charles Brooks), 2.9 support (Herm Fischer). ckcfns.c: . Server always executes generic (but not host) commands in text mode. . Change calling convention for getchx() to allow better reporting of eof. Some earlier changes had apparently broken PDP-11 support for binary files because of sign extension... . Again, several hours after initial announcement of 4C(057) found that above change had busted things for 68000s (again) because of still more int/char conversion problems. Changed 'next' from int to char and moved its file begin/end function to a new flag variable, 'first'. Hopefully, not too many copies got out; those that did are dated 29 July; the version with this fix is dated 31 July. Sigh... ckuusr.c: . Fix timing statistics to work for 16-bit machines too (Dan). . Change calls to execl() to terminate with "(char *)0", not "0". ckufio.c: . Fix bug that sometimes prevented sending files with 14-char long names. ckutio.c: . Herm fixed it up so all the changes in previous edits that broke his modem control code are now more compatible with it. Also, myread() -- the nonblocking equivalent of read() -- was fixed to report errors better. ckudia.c: . Many changes from Herm & Dan, mostly relating to modem control and resetting alarms to get the dialing-with-no-carrier-to-connected-with-carrier transition working again. C-KERMIT FOR UNIX, CHANGES FROM 4C(055) TO 4C(056), 11 JUL 85: ckcpro.w: . Make new ssfile state, to allow for display of data in ack to file header. . If data comes in ack to file header, log to transaction file. . Put local filename in data field of ack to F packet. . Add calls to new rtimer(), gtimer() to allow transactions to be timed. . When sending, include D in EOF packet in all cases when interrupted. Previously, only "czseen" would do it, but not cxseen. . Upon receipt of Z packet, send Ack AFTER closing file rather than before. If file can't be closed, send Error packet instead of Ack. . Upon receipt of error packet while receiving file, discard file. . Upon receipt of unexpected packet type, send Error, not Nak. ckcfns.c: . Change clsof() to accept an argument specifying whether to discard. . Change clsof() to keep incomplete file regardless of arg if keep != 0. . Change clsof() to return -1 if output file could not be closed. . Change name of getch() to getchx() to avoid conflict with libraries. . Fix Yet Another Problem with 8th-bit Quoting Negotation. The bug was that if other side said 'N' we would treat 'N' as quoting prefix rather than "NO" (but only if parity was set to other than none). . Remove input buffer flush from sfile() (why was it ever there???). . Change seof() to accept an argument to put in the Z-packet data field. . Add transaction timing statistics to reof(),reot() for transaction log. . Combine sfile() and sxpack() into one function. ckcfn2.c: . Improve performance of rpack by reducing scan for soh to number of chars read rather than whole buffer (required changing inlin()'s return code). . Allow rpack to skip over "blank lines" without failing; this was preventing file transfer with some systems that always sent CRLF before transmitting anything (e.g. UCLA's MVS/TSO VTAM). . Don't flush input buffer at end of rpack(), because if the packet that we just read is a repeat or an echo, the one we want might be queued up after it. Instead, flush in input() only after the desired packet arrives. . Allow user to type ^A^C^C to interrupt rpack and exit cleanly from program. ckuusr.c: . Add "incomplete" to "set" parse table and display incomplete in "show". . Add "%" command for comment lines. . Add elapsed time and effective baud rate display to "statistics" command. . Fix "show parameters", had send/receive end-of-packet reversed. . Make modem-type lookup in "show" a little cleaner. . Fix "echo" to interpret \ooo escapes in its argument. ckuus2.c: . Add "help set incomplete". . Fix help message for "set line". ckuus3.c: . Add "set incomplete" support. . Allow "set prompt" argument in doublequotes and strip quotes if used, to allow specification of prompt with leading &/or trailing blanks. . Fix "set send/receive padding/pad-character" -- they had variables reversed. ckufio.c: . For Pro/Venix V1, make MAXWILD and SSPACE even smaller, so malloc() still has some space left to allocate... . Change zclose() to return -1 if file could not be closed. ckutio.c: . Use Sys III/V nonblocking read() technique also for 4.xBSD -- improves performance noticably! . Add rtimer() and gtimer() functions for resetting/getting elapsed time. . Don't return failure from tthang() if line wasn't open. . Print warning message if tthang() or ttunlk() fail. . In ttclos(), relinquish exclusive access. . Change some #ifdefs so they depend on features, like FIONREAD, rather than system, like BSD4. This allows collapsing a lot of redundant code. ckucon.c: . Add hangup (h) option to escape character arguments. ckuscr.c: . Change static timeInt() to global scrtime() to avoid problems on code mapped systems. C-KERMIT FOR UNIX, CHANGES FROM 4C(054) TO 4C(055), 28 JUNE 85: ckudia.c (all changes by Dan Schullman, DEC): . Add support for US Robotics modem (untested) from Joe Orost at Berkeley. . Reorganize MDMINF data structure to accommodate US Robotics (some char fields had to become strings). . Allow interrupts (SIGINT, e.g. ^C) to cancel dialing in progress. . Ring bell when connection made successfully. . Close line on failures. . Allow stored numbers with DF100 and 200 modems. ckudia.c now supports the following modems: . Cermetek Info-Mate 212 A . DEC DF03-AC . DEC DF100 Series . DEC DF200 Series . General Data Comm 212A/ED . Hayes Smartmodem 1200 & compatibles . Penril . Racal Vadic . US Robotics 212A . Ventel Plus "unknown" modems and direct (modemless) connections. C-KERMIT FOR UNIX, CHANGES FROM 4C(053) TO 4C(054), 25 JUNE 85: ckuker.mak (makefile): . Add "make ft17" for Fortune 16:32 For:Pro 1.7. . Add "make uts24" for Amdahl UTS 2.4 . Add "make valid" for Valid Scaldstar CAD system . Add "make c70" for BBN C/70 IOS 2.4 ckcmai.c: . Add call to sysinit() ck[uvm]tio.c: . Add sysinit() function. For VMS, open console. For others, null for now. ckutio.c, ckufio.c: . Add support for Fortune 16:32, mostly like 4.1bsd. . Ditto for Amdahl UTS 2.4, mostly like V7. ckuus2.c: . Expand a couple tabs in hlp1 (-h help message) so things line up right. C-KERMIT FOR UNIX, CHANGES FROM 4C(052) TO 4C(053), 21 JUNE 85: ckcfn2.c: . Change dopar() to be of type CHAR. . Fix dopar() to calculate odd parity correctly. ckucon.c, ckuscr.c: . Add "extern CHAR dopar();" declarations. C-KERMIT FOR UNIX, CHANGES FROM 4C(050) TO 4C(052), 18 JUNE 85: ckcfns.c: . Repair rpar() and spar() handling of 8th bit prefix negotiation. . In sinit(), when sending from stdin, allow "-a name" to work. . In rcvfil(), guard against receiving a null F packet. ckcmai.c: . Change hlptxt[] to contain less than 256 characters (for Xenix) ckcpro.c: . In proto() call ttopen() with a temp, x, rather than "local", then only set local if x was set. ckucmd.c: . In cmifi(), make y long rather than int. This was making some 16-bit machines erroneously report that files longer than 32K could not be found. ckuker.mak (makefile): . Change symbol 3BX to ATT3BX (has to start with letter) . Remove line continuations in the middle of strings . Add entry for sys3nid (System III/V on PDP-11 with no I&D space) ckufio.c: . Add appropriate #ifdef for TOWER1 in zkself() . Add 2.9bsd identification string ckutio.c: . Move definition of CTTNAM from here to ckcdeb.h, so it can be shared. . In initrawq() (for V7 only) read the proc table again after fork(). . Change symbol 3BX to ATT3BX. . Get rid of the (void) casts in strxxx() invocations -- the proliferation of conditionals was getting ridiculous, and it was only to please lint. . In conbin() for Sys III/V, open terminal in 7-bit, parity-enabled mode rather than 8-bit, no-parity mode (some sites actually use parity). . In conint(), trap and ignore QUIT signal, trap SIGHUP and handle like SIGINT. This prevents lock files from being left behind after hangup or quit. . In connoi(), turn off traps for SIGQUIT, SIGHUP. . In ttopen(), add Sys III/V code using ctermid() to better determine remote/ local status when stdin redirected. If not Sys III/V and stdin redirected, assume local, rather than remote, so that "set speed" and other local-mode only commands will work. . Add 2.9bsd identification string . Make new ANYBSD symbol to select 4.1, 4.2, and 2.9. In some cases, all 3 work the same, in others, 2.9 and 4.2 are the same, 4.1 special. ckuus*.c: . In command line invocation, base local/remote determination on CTTNAM. . In "set line" only ask ttopen() to set local/remote if not default tty. . Ignore SIGQUIT and SIGINT signals while inferior shell active in XXSHE:. Previously, both Kermit and the inferior shell would catch them. . In XYLINE: call ttopen() with a temp, x, rather than "local", then only set local if x was set. . Change message "status report..." to "status report:" to avoid dot confusion. C-KERMIT FOR UNIX, CHANGES FROM VERSION 4.2(030) TO 4C(050), 30 May 85: All files except ckwart.* have been renamed according to a consistent convention, see ckaaaa.hlp for an explanation. Copyright notices added to every module, so we can't be enjoined from distributing our own program if we give the right to other organizations, like Berkeley, to distribute it. ckwart.c . Move the #define in the txt1 string to not start on a new line. . Fix the comments printed by wart so they can't be construed as comments by the compiler that compiles wart. . Include formfeed among the skipped-over whitespace characters. . Add wart version information. ckcdeb.h (formerly ckdebu.h): Forget about typedefing LONG to be unsigned long -- it causes too many problems for PDP-11 C compilers, etc. Just let LONG be long. If symbols DEBUG and TLOG not defined (e.g. in Makefile), then define null macros to replace calls to the debug() and tlog() functions, to save space and execution time. Program is too big for Macintosh with these functions compiled in. Establish a symbol NLCHAR. If this symbol is defined, then text (ascii) files are stored with a single character (such as lf or cr) terminating each line, and this character is the value of NLCHAR. If not defined, then the system uses CRLF. When NLCHAR is defined, C-Kermit maps between that character and CRLF. ckcfns.c, ckcfn2.c (formerly ckfns.c, ckfns2.c): . change all calls to screen() to new form. . fix bug in sfile() that sometimes prevented literal names from working. . don't translate send-as names in sfile, always use them literally. . change input() to always resend() after getting a NAK. . change getpkt to clear leftovers when starting new file (next = -1), so that filenames in F pkt wouldn't have garbage after previous file was interrupted. . Change call to zchin() to use new calling convention so bytes with hi bit on won't be confused with eof on some systems. . Reset czseen in seof, not in clsif, so that remote ^X while C-Kermit sending will result in correct Z packet with D in data. . In resend(), don't send any packet if packet buffer is empty. . Un-hardwire getch() from Unix newline text file convention. . Fix bug that sometimes resulted in contents of R or X packet having first character doubled. . Fix bug in getpkt that prevented leftovers from being transmitted after end of file. . Have tinit() clear c[xz]seen and filnam to prevent bad things happening after interruption or emergency protocol exit. . Have syscmd() return 0 if called with null string. This allows single process systems like the Macintosh to act as servers, even if they can't do commands like remote directory. . Send out initial nak when doing receive, so that there will be something in the packet buffer to resend. . Check for failure return code from zchout, to catch disk full errors, etc. . When server getting input from a system function, call zopeni() on new ZSYSFN channel, rather than circumventing zopeni() by calling zopen(). . Clean up inlin() a little, use maxt vs MAXTRY consistently. . Change rpack,spack,rpar,spar,etc to use the new, separated send/receive packet parameters (padding,timeout,eol,soh,etc). ckcker.h (formerly ckermi.h): . Removed #include and from ckermi.h. Macintosh does not need all that... (thanks, Bill) . Remove include of ckdebu.h (now ckcdeb.h). . Add defs for LF and NUL. . Add def for new ZSYSFN file i/o channel. ckcpro.w (formerly ckprot.w) Protocol Module: . Add "a" state to cancel any transaction. . Remove entries for input='N', since this is now handled by input(). . Fix "a" state to not cause "OK" message when files closed. ckucmd.c (formerly ckcmd.c) Unix Command Package: . Set global cmerrp (error prefix) to be same as prompt, but with '>' stripped. . Allow interactive command continuation using trailing '\'. . Change "*bp++ == NUL;" in getwd() to simply "bp++;". . Test for CR as well as NL for line termination (for Apollo Aegis). . In ckucmd.h, #define getchar specially for VMS and Aegis. . In cmfld, return(0) from filling out default when ESC typed; this prevents "log trans transact.log transact.log transact.log ..." . In cmtxt, preserve pointers & counts across calls in case of reparse. . In getwd, return -1, NOT -2, if ^U (line kill) is typed. ckucon.c (formerly ckconu.c) Connect module: . When writing to session log, make some minimal attempt to recover from disk full or other i/o errors (just turn off logging flag). . Add baud and parity info to status display. ckudia.c (formerly ckdial.c) Dial command: . Support added for Racal-Vadic, Cermetek, Penril, General Datacomm. . Use msleep() for higher precision timing. ckufio.c (formerly ckzunx.c, and before that ckzbsd.c): Started from Charles Brooks's 4.2 ckzunx.c, which is the original C-Kermit release 4.2 version, to which he added 4.1bsd support. . Fixed zltor() to only count dots after the last '/'. . Declared malloc as "char *malloc()". . Change fprintf(fp[n],s) to fputs(s, fp[n]) in zsout & zsoutl. . Added zkself() function to log self out, for use by server "bye". . Changed calling convention for zchin() to allow 68000's etc to return EOF. . Make zopeno() chown the file to self, in case program set[ug]id'd. . Changed znewn() to try not to contruct a name that is too long. . Merge in Gregg Wonderly's v7 support. . Make various changes to v7 support to fit proc table stuff to other systems. . (023) Changed zopeni(), when called with new ZSYSFN channel number, to invoke zxcmd() to start a fork and get its fd; also changed zclose() and chkfn() accordingly. . (024) In zchki(), allowed 0 as well as S_IFREG as S_IFMT value for ordinary file; Sys V stat() can return either of these values for an ordinary file. Also, insert missing #else in zkself(). . (025) declare zchki() to be of type 'long', so that it can return valid file sizes for big files. Also fix internal variables that hold size to also be long. (Same change to ckvfio.c.) Also, change ckcfns.c and ckucmd.c to declare 'long zchki();'. ckutio.c (formerly ckxunx.c and ckxbsd.c): Started from Charles Brooks's 4.2 ckxunx.c, which is the original C-Kermit release 4.2 version, to which he added 4.1bsd support. . Added the following for Pro/Venix Version 1: - Filled in msleep() using alarm(-clockticks). - Filled in conchk() and ttchk() using TIOCQCNT. - Changed default tty name (dftty) to be "/dev/com1.dout". - Added line locking via /usr/spool/uucp/LCK..devname and TIOCEXCL. . Changed local variable c from int to CHAR in ttinl(). . Let CEB's code to hangup line upon close in 4.1bsd also work for 4.2bsd. . Removed flock() from ttopen(), call ttlock() before trying to open tty. . Corrected some places where alarms & signals were not turned off. . Changed calling convention for ttopen() to allow it to set the "local" variable, since ttopen can call the system to figure out whether a given device is the job's controlling tty. Also had to change all modules that call ttopen() to pass this variable by reference instead of by value. . In ttopen, copy ttname string into a static ttnmsv string global to ckutio module, rather than just copying the pointer (which is pointing at a moving target). Should fix PC/IX tthang() problem. . Add support for AT&T 3B-series under 3BX conditional; initially, it just follows UXIII conditional, but uses special uucp lock file name. ckuusr.c, ckuus2.c, ckuus3.c (formerly ckuser.c, ckusr2.c, ckusr3.c): . all occurrences of printf(s) replaced by printf("%s",s) or puts(s). . shortening of remaining long strings. . continuation lines now allowed in commands if line ends with "\". . make "dir" command arg default to ".", not "*", to prevent recursive listing. . make "!" command with no args do system("$SHELL"). . removed redundant definitions of ncmd, nrmt, nprm. . totally redefined and rewrote screen() function. . Change send-as to use cmtxt, not cmfld; remove cmcfm. . Fix send command to wait for confirmation after wild filespec (this was broken by send-as change above, few people saw it). . Put 'log debug' command in #ifdef DEBUG . Put 'log transaction' command in #ifdef TLOG . Use 'transact.log' as default name for transaction log, rather than 'transaction.log', which is too long for all but 4.2bsd Unixes. . Use symbols for exit() & doexit() return codes, not hardwired 0 and 1. . Use symbol for name of init file. . Put Unix-specific messages in #ifdef's . In 'set line', put speed back to -1 if not local. . Change "*xargv++;" in cmdlin() to simply "xargv++;". . Change all "if (x = (cmcfm()) < 0)" to "if ((x = cmcfm()) < 0)". . In ckuus3, change "turnch == y" to "turnch = y"; this bug prevented "set handshake" from working. . Add code in shopar() to look up and display modem type correctly. . Change "set line" code to have ttopen() figure out local/remote mode. . Fix "set line" not to erroneously set ttname if it ttopen fails. . In remote cwd parsing, accept CR as well as NL as password terminator. . In local directory command, use DIRCMD rather than "ls -l ". . In screen() function SCR_QE, print long argument with %ld so the ^A status report doesn't show all 0's on systems where ints and longs are different length (%ld was already used in the other screen functions). . Fix multiline 'get' parsing to allow editing (required fixes to ckucmd.c). . Add conditionals for init file name for various systems. . Phase out the following set commands: set end-of-packet, set start-of-packet, set timeout, set padding & pad-ch. Replace by set send (each of these) and set receive (each of these), to allow inbound & outbound packet parameters to be set separately. . Put new set send/receive params in show command display. . Add version info for ckudia and ckuscr to 'sho ver'. . Add init file name to 'sho param'. . Replace system("pwd") in XXCWD code with system(PWDCMD), defined in ckufio.