home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / c-kermit / ckc197.txt < prev    next >
Text File  |  2020-01-01  |  886KB  |  18,209 lines

  1. C-KERMIT 6.1-7.0 CHANGE LOG (Changes since 6.0.192 of 6 September 1996)
  2.  
  3. Tue Feb  8 15:27:58 2000
  4.  
  5. SET TCP UCX-PORT-BUG command added, November 1996.
  6.  
  7. sdata() windowing loop to send packets could go too far if ACKs had
  8. arrived out of order.  Fixed in nxtpkt().  9 Dec 96.
  9.  
  10. SET SEND DOUBLE-CHAR and SET RECEIVE IGNORE-CHAR added, for transferring
  11. files with Honeywell DPS-6, and/or thru an Arpanet TAC.  10 Dec 96.
  12.  
  13. ADD SEND-LIST followed by MOVE did not delete original files.  Fixed in
  14. ckuusr.c, 11 Dec 96.
  15.  
  16. When C-K is in local mode, and sending a file using Kermit protocol, and
  17. sending an auto-upload string in advance, make it pause for 1.5 seconds to
  18. give the remote Kermit time to start up; otherwise, since all the ioctls at
  19. startup time result in clearing the input buffer, the first packet is lost and
  20. we have to wait a long time for the timeout to kick off the transfer.  1.5 sec
  21. vs 8 sec.  On the other hand, if the remote Kermit is already started, this
  22. is a needless delay.  OK, so make it 400 msec.  This doesn't fix the problem
  23. in the default case (unless the remote system is really fast), but at least
  24. now there is a command-level workaround for the user: "set proto kermit
  25. {kermit -YQqr} {kermit -YQqr}", to make the remote Kermit start up faster;
  26. 0.4 sec should be enough time to enter packet mode.  ckcpro.w, 15 Dec 96.
  27.  
  28. Added EDIT, SET EDITOR, SHOW EDITOR.  This required adding a new parsing
  29. function, cmiofi(), to parse either the name of an existing file or the name
  30. of a new file to be created.  SET EDITOR can not be executed by APC unless APC
  31. is UNCHECKED, otherwise "edit foo" might become "delete foo".  If the EDIT
  32. command is given without a filespec, then if a previous filespec had been
  33. given to an EDIT command, it is used; if not, the editor is started without a
  34. file.  If a filespec is given, the editor is started on that file, and the
  35. filespec is remembered for subsequent EDIT commands.  ckuusr.h, ckuus[r235].c,
  36. ckucmd.[ch], 15 Dec 96.
  37.  
  38. Changed \v(filespec) to contain fully qualified filenames rather than relative
  39. ones.  This allows \v(filespec) to actually find the file just downloaded, in
  40. case it went to a download directory, etc.  This makes NETEDIT easy to do.
  41. ckuus[r6].c, 15 Dec 96.
  42.  
  43. New CKVKER.COM and CKVOLD.COM from Lucas Hart fixes errors with GCC builds.
  44. 25 Dec 96.
  45.  
  46. Added -DNONAWS to AT&T 3Bx entries.  16 Jan 97.
  47.  
  48. Added and modified SCO Xenix entries from Fred Smith. 26 Jan 97.
  49.  
  50. Added and modified HP-UX entries from Peter Eichhorn. 26 Jan 97.
  51.  
  52. Added -DNOINADDRX to all DG/UX 5.40 makefile entries.  1 Feb 97.
  53.  
  54. Added an entry for SINIX-Z (Intel) 5.42.  1 Feb 97.
  55.  
  56. Added "generic-high-speed" and Meghertz X-Jack modem types, 5 Feb 97.
  57.  
  58. Fix to VMS isdir() (free() being called prior to using the item that was
  59. freed), causing CD not to work on Alphas with VMS 6.2.  ckvfio.c, 17 Feb 97.
  60.  
  61. Fixed \feval(m%n) not to dump core if n == 0, ckuus5.c, date unk.
  62.  
  63. References to S82 in newer-model Hayes modems causes ERROR.  Removed.
  64. ckudia.c, date.unk.
  65.  
  66. Added STRATUS #ifdefs to ckusig.c, from Kernie Brashier.  7 Mar 97.
  67.  
  68. Added Greek file and terminal charset translation: ISO 8859-7, CP869, and
  69. ELOT 927.  ck[cu]xla.[ch], ckuus[23457].c.  5 Apr 97.
  70.  
  71. Made Stratus getchar/putchar changes to ckcdeb.h, ckudia.c, ckuus[457].c
  72. and uploaded to test area so Kernie B can make new builds.  6 Apr 97.
  73.  
  74. Added IF OPEN ...  ckuusr.h, ckuus[26].c.  6 Apr 97.
  75.  
  76. Added \v(pid), UNIX only for now.  ckcdeb.h, ckuusr.h, ckuus4.c.  6 Apr 97.
  77.  
  78. Jeff's changes to sdata() (after sending each packet) and input() (when we
  79. get a timeout) to detect carrier loss.  ckcfn[s2].c, 7 Apr 97.
  80.  
  81. Added within #ifdef PIPESEND...  CSEND, CRECEIVE, and SET XFER PIPES governing
  82. interpretation of incoming filenames that start with "!", and also
  83. command-line -s "!command", for UNIX.  ckcdeb.h, ckcfn[s3].c, ckcpro.w,
  84. ckucmd.c, ckuusr.h, ckuus[r2345y].c, 9-13 Apr 97.  Jeff also made them work
  85. for Windows 95/NT and OS/2.
  86.  
  87. Removed spurious and redundant code from ckcmai.c to read the application
  88. file a second time (which is never executed because the application file name
  89. was zeroed out), and then removed the code to zero out the name, so the file
  90. can be deleted later if "set startup-file discard".  17 Apr 97.
  91.  
  92. Added code to enforce that pipe transfers can be done only with Kermit
  93. protocol.  ckcfns.c, ckuusr.c, ckuusy.c, 17 Apr 97.  NOTE: Actually, it is
  94. perfectly possible to receive to a pipe using XYZMODEM in K95, but since it is
  95. not possible to send from one (because these protocols use fseek to recover
  96. from errors and you can't fseek into a pipe), we just say "use Kermit".
  97.  
  98. Added SET SEND FILTER and got it working -- needs a LOT of testing.
  99. ckuusr.h, ckuus3.c, etc etc, 17 Apr 97.
  100.  
  101. Added \fcommand() and \frawcommand(); ckuusr.h, ckuus4.c, 18 Apr 97.
  102.  
  103. Added \v(filename) -- current filename while sending and receiving -- and
  104. \v(filenumber) -- the current file number.  19 Apr 97.
  105.  
  106. Overhauled the as-name code to provide for filename templates using
  107. \v(filename), \v(filenumber), etc, as well as \function()s...  19 Apr 97.
  108.  
  109. Added \v(pexitstat) -- exit status of most recent process started by zxcmd,
  110. zshcmd, or ttruncmd().  ckuusr.h, ckuus4.c, ckufio.c, ckutio.c.  20 apr 97.
  111.  
  112. Overhauled process-oriented routines in ckufio.c to give a proper return code
  113. and to set the pexitstat value.  In particular, zclosf() now fails if the
  114. closed process did not return an exit code of 0.  20 apr 97.
  115.  
  116. In working on the previous item, discovered that I could use wait() rather
  117. than waitpid() in ttruncmd(), and since wait() is totally portable, I enabled
  118. REDIRECT for all UNIX implementations as well as OS/2 & Windows.  ckutio.c,
  119. ckcdeb.h.  20 Apr 97.
  120.  
  121. Added tests to the protocol module to see whether closing the input file fails,
  122. which is what happens if we are using a pipe and or filter, and the process's
  123. return code indicates failure.  In this case we set the "cxseen" flag which
  124. forces a failure condition on a per-file basis (in case of wildcard transfers
  125. with send-filter), which is reflected in BOTH Kermits.  ckcpro.w, 20 Apr 97.
  126.  
  127. Added invisible CQ command for all but OS2 & Win32 as an abbreviation for
  128. CONNECT /QUIETLY.  ckuusr.[ch], 20 Apr 97.
  129.  
  130. Changed SET { SEND, RECEIVE } FILTER to use the same syntax as as-names --
  131. \v(filename), string functions, etc, permitted -- rather than "%s".
  132.  ckuus7.c, ckcfns.c, 20 Apr 97.
  133.  
  134. Added \fstripx(), \fstripn(), \flop() string functions.  ckuusr.h, ckuus4.c,
  135. 21 Apr 97.
  136.  
  137. Added file-protection/permission attributes within #ifdef CK_PERM..#endif.
  138. Enabled for UNIX only.  Sender puts system-dependent and system-independent
  139. versions into the A packet.  The system-dependent permission string for UNIX
  140. is a 3-digit octal string, the low-order 12 bits of the st_mode member of the
  141. stat struct; we deliberately chop off the "file format" bits because they are
  142. probably not portable, nor do we convey the setuid/setgid bits, lock bit,
  143. sticky bit, etc; just the permissions.  The file receiver checks to see if the
  144. sender has the same system ID; if so, it tries to decode the system-dependent
  145. permissions, if any; if not, it uses the generic ones and applies them to the
  146. owner field.  The main purpose is to not have to "chmod +x" an executable file
  147. after transfer between two UNIXes.  ckcdeb.h, ckcmai.c, ckufio.c, ckcfn3.c,
  148. and (for SET, REMOTE SET, and SHOW ATTRIBUTES) ckuus5.c, ckuus7.c.  22 Apr 97.
  149.  
  150. Added three more variables:
  151.   \v(p_ctl)   Control prefix char
  152.   \v(p_8bit)  8-bit prefix char (if parity not none)
  153.   \v(p_rpt)   Repeat prefix char (if repeat compression enabled)
  154. ckuusr.h, ckuus4.c.  22 Apr 97.
  155.  
  156. Merged Jeff's changes into ckuusr.h, 24 Apr 97.
  157.  
  158. Merged Jeff's changes into ckcker.h, ckcmai.c, 3 May 97.
  159.  
  160. Merged Jeff's changes into ckuusr.c; noticed that much of the PIPESEND code
  161. was missing from Jeff's version.  3 May 97.
  162.  
  163. Merged Jeff's changes into ckuus*.[ch] and other modules, 3 May 97.
  164.  
  165. Merged Jeff's changes into ckudia.c, except the ones involving makestr(),
  166. which should be entirely unnecessary -- or if they are, then makestr() should
  167. be fixed.  3 May 97.
  168.  
  169. Made sure remaining modules were all in sync.  3 May 97.
  170.  
  171. Added CK_ENVIRONMENT for UNIX/Aegis/Plan9: ckcnet.h, ckutio.c, 4 May 97.
  172.  
  173. Added SET TELNET ENVIRONMENT { OFF, ON }.  This is needed so scripts can
  174. behave predictably, etc.  Made OFF the default for UNIX, ON for OS/2 & friends
  175. so as not to change existing default behavior.  Added this to SHOW NET.  Also
  176. fixed a bug in Telnet NEW-ENVIRON negotiation.  ckuusr.h, ckuus[234].c,
  177. ckcnet.c, 4 May 97.
  178.  
  179. Added TELNET SEND_LOCATION negotiation, since a potential customer needed it
  180. desperately and asked about it just as I was working on the NEW-ENVIRON stuff.
  181. Untested, though, since I can't find a host that uses it.  ckcnet.c, 4 May 97.
  182.  
  183. Added SOLARIS25 symbol and makefile entry for Solaris 2.5.  Added support for
  184. 134.5 and 1800 bps.  Enabled 134.5, 1800, 57600, 76800, 115200, 230400 for
  185. Solaris 2.5.  makefile, ckcdeb.h, ckutio.c, 4 May 97.
  186.  
  187. Added casts to various function args (char vs uchar) to shut up picky
  188. compilers.  ckcfn[s23].c, 4 May 97.
  189.  
  190. Added a fix for ATT 7300 UNIX PC to allow use by root when C-Kermit installed
  191. setuid (e.g. to uucp), since System V R0 does not save original uid, from
  192. Randolph J Herber <rjh@yclept.chi.il.us>.  ckutio.c, 4 May 97.
  193.  
  194. Added a new makefile entry for AT&T UNIX 3.51m, which added hardware flow
  195. control for the AT&T 7300, resulting in a file-transfer performance boost of
  196. about 30%.  Randolph J Herber, ckutio.c, 4 May 97.
  197.  
  198. Added regular POSIX-style high speeds for Linux 1.2 and later, from Ted Ts'o
  199. <tytso@mit.edu>.  This involved reconciling several different and conflicting
  200. patches from the PATCHES file.  Linux C-Kermit now supports serial speeds up
  201. to 460800bps.  ckcdeb.h, ckuus3.c, ckutio.c, 4 May 97.  Also, added a new
  202. makefile entry, "linux", for Linux 1.2 and later.  The old entry was kept
  203. under the name "linux10", 4 May 97.
  204.  
  205. Added support, makefile entry, and designer herald for OpenBSD, from
  206. Todd Miller <Todd.Mill@courtesan.com>, ckuver.h, makefile, 4 May 97.
  207.  
  208. All patches from the PATCHES file are now installed.
  209.  
  210. Fixes from Jeff to my fixes.  ckudia.c, ckcmai.c, ckcker.h, 6 May 97.
  211.  
  212. Redid Telnet Location after a closer reading of RFC779, added SET TELNET
  213. LOCATION, added location to SHOW NET.  ckcnet.c, ckuus3.c, ckuus4.c, ckuusr.h,
  214. 6 May 97.  The "send location" business works like this:
  215.  
  216.  . All code related to this feature is in #ifdef CK_SNDLOC, which is defined
  217.    by default for all platforms (in ckcnet.h).
  218.  
  219.  . When Kermit starts, sysinit() does makestr(tn_loc,getenv("LOCATION")),
  220.    so this needs to be added to all the non-UNIX sysinit()'s, perhaps using
  221.    other more appropriate environment variable names, if any exist.
  222.  
  223.  . If tn_loc is not NULL, then tn_ini() sends WILL SEND-LOCATION.  If the
  224.    server says DO SEND-LOCATION, Kermit sends the string in an SB.
  225.  
  226.  . The C-Kermit user can change the location with SET TELNET LOCATION, and
  227.    can defeat this feature by setting the location to the empty string.
  228.  
  229.  . If sysinit() does not fill in the initial value, the user can still use
  230.    this feature by giving a SET TELNET LOCATION string prior to making the
  231.    connection.
  232.  
  233. Added SHOW TELNET since I keep typing it all the time anyway, and updated help
  234. text, ckuusr.h, ckuus[245].c, 6 May 97.
  235.  
  236. Also made numerous corrections to help text, some of which involved moving
  237. feature-selection features (CK_ENVIRONMENT and CK_SNDLOC) from ckcnet.h to
  238. ckcdeb.h.  6 May 97.
  239.  
  240. Fix typos in yesterday's changes.  ckcdeb.h, ckcnet.c, 7 May 97.
  241.  
  242. Removed date-dependent dial-number hacks for France and Finland, since the
  243. dates are long past.  ckuus6.c, 7 May 97.
  244.  
  245. Finished SET DIAL { LC-PREFIX, LC-SUFFIX }.  Changed this from LOCAL-PREFIX,
  246. LOCAL-SUFFIX because LOCAL is too long to type all the time and we already had
  247. a SET DIAL LOCAL-AREA-CODE (albeit invisible).  The original names are still
  248. there but invisible.  7 May 97.
  249.  
  250. Added SET DIAL LC-AREA-CODES [ <list> ] and display of it in SHOW DIAL.
  251. ckuusr.h, ckuus[234].c, 8 May 97.
  252.  
  253. Filled in callisld() to return codes differentiating among (0) regular local
  254. calls, (1) long-distance calls, and (2) local calls that still must dial the
  255. area code, and changed dncvt() to use these codes for both well-formed
  256. portable phone numbers and free-form portable numbers.  Also added code for
  257. local prefix and suffix for free-form portable numbers.  ckuus6.c, 8 May 97.
  258.  
  259. Add SET DIAL FORCE-LONG-DISTANCE { ON, OFF }.  8 May 97.  ckuusr.h,
  260. ckuus[246].c.
  261.  
  262. Automatically set the above to ON for SET DIAL COUNTRY-CODE 33 (France).
  263. ckuus3.c, 8 May 97.
  264.  
  265. Fixed typo in #ifdef for "set speed 19200".  ckuus3.c, 11 May 97.
  266.  
  267. Added commands for modem speaker control, 11 May 97:
  268.  
  269.   Defined symbols in ckuusr.h.
  270.   Variables defined in ckudia.c:
  271.     int mdmspk       (speaker on off)
  272.     int mdmvol       (modem volume)
  273.     char * dialspon  (speaker on command)
  274.     char * dialspoff (speaker off command)
  275.     char * dialvol1  (volume low command)
  276.     char * dialvol2  (volume medium command)
  277.     char * dialvol3  (volume high command)
  278.   Added keyword parsing to ckuus3.c:
  279.     SET MODEM SPEAKER { ON, OFF }
  280.     SET MODEM VOLUME { HIGH, MEDIUM, LOW }
  281.   Added modem command parsing, ckuus3.c:
  282.     SET MODEM COMMAND { SPEAKER-ON, SPEAKER-OFF } <string>
  283.     SET MODEM COMMAND { VOLUME-HIGH, VOLUME-MEDIUM, VOLUME-LOW } <string>
  284.   Added these fields to all MDMINF structs in ckcker.h and ckudia.c.
  285.   Changed name of dial_str[] keyword table to mdmcmd[] because the original
  286.   was in conflict with a MDMINF struct name, ckuus3.c.
  287.   Filled in SHOW MODEM to show all these values, adjusted pagination, ckuus3.c.
  288.   Filled in HELP SET MODEM, ckuus2.c.
  289.   Added semantics to ckudia.c.
  290.  
  291. Fixed errors in yesterday's work.  ckuus3.c, ckudia.c, 12 May 97.
  292.  
  293. Added GENERIC-HIGH-SPEED to MINIDIAL selection.  Also, USER-DEFINED was
  294. supposed to be there too, but that was only halfway done.  ckudia.c, 12 May 97.
  295.  
  296. Change SET MODEM CAPABILITIES to set or unset SPEED-MATCHING automatically
  297. based on whether SB was included among the capabilities.  ckuus3.c, 12 May 97.
  298.  
  299. Added support for the following new built-in modem types:
  300.  . QuickComm Spirit II
  301.  . Motorola Montana
  302.  . Compaq Data+Fax (e.g. in Presario)
  303.  . Fujitsu Fax/Modem Adapter
  304.  . Megahertz AT&T V.34
  305.  . SupraSonic V288+
  306.  . Best Data
  307. ckudia.c, 12 May 1997.
  308.  
  309. Changed speaker and volume commands to use multiple keywords, not dashes,
  310. like for EC and DC.  ckuusr.h, ckuus3.c, 13 May 97.
  311.  
  312. Added SET TERMINAL KEYBOARD-MODE { NORMAL, EMACS, HEBREW, RUSSIAN }.
  313. ckuusr.h, ckuus[27].c.
  314.  
  315. Fixed HELP text for SET MODEM { SPEAKER, VOLUME }.  ckuus2.c, 13 May 97.
  316.  
  317. Added support for more new modem types:
  318.  . AT&T Secure Data STU-III Model 1900 (untested)
  319.  . AT&T Secure Data STU-III Model 1910 (untested)
  320. These are scrambling modems used at high-security places, which only talk
  321. to each other.  Also, rearranged SET MODEM TYPE keywords that were out of
  322. alphabetical order.  ckudia.c, 13 May 97.
  323.  
  324. Added E1V1 to all Hayes-like modem init strings for OS/2 and Windows, to
  325. make sure we parse word result codes -- this eliminates lots of confusion
  326. caused by incompatible digit result codes.  I didn't do this for UNIX, VMS,
  327. etc, because it is bad to reconfigure shared modems.  ckudia.c, 14 May 97.
  328.  
  329. Added DIA_TAPI (= 34), "TAPI reported failure - reason unknown", to DIAL
  330. failure codes and messages, and changed TAPI dialing failure code to set this
  331. reason.  ckcker.h, ckudia.c, 14 May 97.
  332.  
  333. Added missing cases 15, 16, 17, 19, 25, 45, 107 for USR digit result codes.
  334. ckudia.c, 14 May 97.
  335.  
  336. Fix for SCRIPT command from Gerhard Rueckle <rueckle@dr.fbe.fh-darmstadt.de>
  337. at FH Darmstadt, to filter out NULs from session log (otherwise whole lines
  338. were getting lost due to use of str*() functions).  ckuscr.c, 15 May 97.
  339.  
  340. Discovered that S_I[RWX]OTH stat.h symbols for file permissions could not be
  341. depended upon, and so added more #ifdefs to account for this in zsattr().
  342. Also, realized it's silly to use the "world" permissions field for the
  343. "generic" permission (even though that's what the book says); changed it to
  344. use the "user" (self) field.  ckufio.c, 16 May 97.
  345.  
  346. After spending 2 hours on the phone with a user, revised the AT&T STU III
  347. modem commands by trial and error until they worked.  The manuals and other
  348. info from AT&T were wrong.  ckudia.c, 17 May 97.
  349.  
  350. Added \%* variable, used only in macros, replaced by all the args that the
  351. current macro was called with (1..argc).  ckuus4.c, 18 May 97.
  352.  
  353. Added "IF <=" and "IF >=".  ckuusr.h, ckuus6.c, 18 May 97.
  354.  
  355. Changed DIRECTORY, general case (mostly UNIX), to use cmtxt() rather than
  356. cmdir(), to allow free-form directory commands, inclusion of switches for
  357. system directory command, redirectors, etc.  ckuus6.c, 18 May 97.
  358.  
  359. Added SET FILE EOF { CTRL-Z, LENGTH }.  Applies only to text-mode transfers.
  360. When set to CTRL-Z, this makes the file sender treat the first Ctrl-Z in the
  361. input file as the end of file (EOF) (NOTE: this never worked before), and it
  362. makes the file receiver tack a Ctrl-Z onto the end of the output file if it
  363. does not already end with Ctrl-Z.  This feature is included for any platform
  364. for which CK_CTRLZ is defined during compilation; by default it is defined
  365. only for OS2.  Added to SHOW FILE, reformatted SHOW FILE.  ckcdeb.h, ckcker.h,
  366. ckuus[2347].c, ckcfns.c, ckufio.c, 18 May 97.
  367.  
  368. Changed CALL macro to not SET MODEM TYPE if given type is the same as the
  369. current type, thus avoiding overwriting customizations.  Also, don't SET SPEED
  370. or LINE if given values are the same as current ones.  ckermit.ini, 18 May 97.
  371.  
  372. Examined the problem in which we DIAL a modem, disconnect, then SET HOST or
  373. TELNET, then HANGUP, and Kermit sends +++ATHO.  There is no good way to avoid
  374. this, because this case can't reliably be distinguished from the case in which
  375. the user does SET HOST <terminal-server>, SET MODEM TYPE <name>, DIAL.  In
  376. both cases we have a valid modem type selected and we have a network
  377. connection.  If the user wants to DIAL and then later make a regular network
  378. connection, she will have to SET MODEM TYPE NONE or SET MODEM HANGUP RS232
  379. to avoid this phenomenon.
  380.  
  381. Fixed IF EXIST and IF DIRECTORY to properly strip braces from around their
  382. arguments, so "if directory {C:\Program Files}", etc, would work as expected.
  383. However, this means that if the file or directory name is actually enclosed
  384. in braces, the braces must be doubled.  ckuus6.c, 18 May 97.
  385.  
  386. Fixed problem that occurred if "set host nonexistent-host" followed by certain
  387. commands like SEND; the original modem type was not restored and ttopen()
  388. thought that it still had a network hostname.  ckuus7.c, 18 May 97.
  389.  
  390. Fixed HELP SET RECEIVE PATHNAMES to show default is OFF, not ON.  ckuus2.c,
  391. 18 May 97.
  392.  
  393. Fixed SET EDITOR and SET BROWSER to use PATH in UNIX.  ckuus3.c, 18 May 97.
  394.  
  395. Fixed cmifip() to make its own safe copy of the PATH string, so the caller
  396. does not have do this every time, and simplified calls to cmifip(),
  397. consolidating OS/2 and UNIX calls.  ckucmd.c, ckuus3.c, 18 May 97.
  398.  
  399. Got rid of the old cmdir() function, replaced it by a new one that is just a
  400. wrapper for cmifi() that makes cmifi() parse only directory names and handle
  401. completion and ?-file-lists.  This affects the CD, SET SERVER GET-PATH, SET
  402. TEMP-DIRECTORY, SET FILE DOWNLOAD-DIR, and SPACE commands.  ckucmd.h,
  403. ckucmd.c, 19 May 97.
  404.  
  405. Fix definition of TRMBUFL (termcap buffer length), and use it when allocating
  406. the termcap buffer, trmbuf.  ckcdeb.h, ckuusx.c, 19 May 97.
  407.  
  408. Don't print "Warning: terminal type unknown, Fullscreen file transfer display
  409. disabled" if C-Kermit is in remote mode.  ckuusx.c, 19 May 97.
  410.  
  411. Allow GET and RECEIVE as-names to override RECEIVE PATHNAMES setting.
  412. rcvfil(), ckcfns.c, 19 May 97.
  413.  
  414. The READ command was being overly picky about "last line lacks terminator".
  415. I changed it to allow the last or only line to lack a terminator.  This is a
  416. sneaky way of allowing even binary files to be read into a variable (all at
  417. once) if the READ buffer is set large enough (and the file does not contain
  418. NUL characters).  doask(), ckuus6.c, 19 May 97.
  419.  
  420. The braces problem: Since braces are used in function calls to indicate
  421. grouping, there is no way to pass literal braces to the function itself.
  422. Solution: Define a variable containing the string that has braces.  Example:
  423.  
  424.   define \%a ab{cd
  425.   echo \fsubstring(\%a)
  426.   ab{cd
  427.  
  428. If the string is to start with a leading brace and end with a closing brace,
  429. then double braces must appear around the string (which itself is enclosed in
  430. braces):
  431.  
  432.   define \%a {{{foo}}}
  433.   echo \fsubstring(\%a)
  434.   {foo}
  435.  
  436. This also works for any other kind of string:
  437.  
  438.   define \%a {{ab{cd}}
  439.   echo \fsubstring(\%a)
  440.   ab{cd
  441.  
  442. No changes here -- this is how it has always worked, but was not documented
  443. before.
  444.  
  445. Lots of users try to write scripts for Telnet logins, but use "telnet"
  446. rather than "set host"... eventually they log out or close the connection,
  447. and then when the INPUT command executes, it says "?Can't condition line
  448. for INPUT", which is singularly uninformative.  I made INPUT issue a better
  449. message when it knows the connection is not open (CK_TTYFD is defined and
  450. ttyfd == -1).  doinput(), ckuus4.c, 19 May 97.
  451.  
  452. Added SET INPUT AUTODOWNLOAD { ON, OFF } (to control autodownload during INPUT
  453. separately from during CONNECT) and SHOW INPUT.  ckuusr.h, ckuus[r2457].c,
  454. 19 May 97.
  455.  
  456. Changed CD to use CDPATH, like ksh.  If the CDPATH environment variable is
  457. defined, then it is used: if a CD command is given for a relative directory,
  458. then if it is not found in the current directory, the CD path is searched for
  459. a directory that contains a directory of the given name.  ckucmd.c, ckuus5.c,
  460. 20 May 97.
  461.  
  462. Rearranged #ifdefs in ckcdeb.h so CK_ENVIRONMENT would take effect for UNIX.
  463. 20 May 97.
  464.  
  465. Added CGET command (GET to pipe).  ckuusr.h, ckuusr.c.  21 May 97.
  466.  
  467. Added SET EOF as invisible synonym for SET FILE EOF.  ckuusr.h, ckuus[37].c,
  468. 21 May 97.
  469.  
  470. Fixed UNIX version of CD, when following CDPATH, to treat an empty member as
  471. the current directory, rather than root (by definition of CDPATH).  ckucmd.c,
  472. 22 May 97.
  473.  
  474. Changed netopen() to supply "23" as the default service, rather than "telnet",
  475. to sidestep all the problems we have been having with getservbyname()
  476. returning the service number with its bytes swapped.  ckcnet.c, 23 May 97.
  477.  
  478. Installed patches for CMUIP from Wolfgang Moeller <moeller@decus.decus.de>.
  479. ckutio.c, 23 May 97.
  480.  
  481. Some fixes for Wollongong Pathway from Ray Hunter.  ckcnet.c, ckvtio.c,
  482. 23 May 97.
  483.  
  484. Some new #ifdefs for UCX / DECC from Martin Zinser.  ckcnet.c, 23 May 97.
  485.  
  486. Added CHECK NETWORK before trying to SET NETWORK DIRECTORY.  ckermit.ini,
  487. 23 May 97.
  488.  
  489. Added support for AT&T KeepinTouch modem card.  Moved modem-type definitions
  490. to ckuusr.h.  ckuusr.h, ckudia.c, 27 May 97.
  491.  
  492. Fixed SET EDITOR and SET BROWSER to convert filename to a full pathname
  493. in case it wasn't already.  Removed SET BROWSER from all implementations
  494. except OS/2 and Windows.  ckuusr.c, ckuus3.c, 28 May 97.
  495.  
  496. SET EXIT WARNING didn't work properly when connection was opened with
  497. -l, -j, or -J on command line.  Fixed in ckuusy.c, 29 May 97.
  498.  
  499. Fixed SET EDITOR to use EDITOR environment variable as default.
  500.  
  501. Fixed SET PROTOCOL not to parse external command fields if protocol is Kermit
  502. (it never should have); Kermit isn't an external protocol.  ckuus3.c, 1 Jun 97.
  503.  
  504. Added "autoserver" command, 1 Jun 97:
  505.  . It is not part of ptab[], since is specific to Kermit protocol.
  506.  . Initialize char * srvstring to "kermit -x" in initproto(), ckcmai.c.
  507.  . Added new 3rd field to SET PROTOCOL KERMIT for server string, ckuus3.c.
  508.  . Updated SHOW PROTOCOL to display the server string, ckuus4.c.
  509.  . Added code to send server string when GET or REMOTE are given, ckcpro.w.
  510.  . Updated help message for SET PROTOCOL, ckuus2.c.
  511.  
  512. Added -O command-line option: "be a server, but execute Only One command".
  513. ckuusy.c, 1 Jun 97.
  514.  
  515. Added a new keyword flag, CM_HLP, which (when combined with CM_INV), means
  516. that the keyword, which is normally invisible, becomes visible in a HELP
  517. command.  Adjusted calling conventions and prototypes for various command
  518. parsing functions accordingly.  ckucmd.h, ckucmd.c, 2 Jun 97.
  519.  
  520. Added new keywords to top-level cmdtab[]: FUNCTIONS and KVERBS with CM_HLP
  521. flag, visible only from HELP.  ckuusr.c, 2 Jun 97.
  522.  
  523. Filled in help text for each function (61 of them), and fixed some mistakes in
  524. the function keyword table, fnctab[].  Adds about 8K. ckuus[24].c, 2 Jun 97.
  525.  
  526. Added reference to HELP FUNCTION to SHOW FUNCTION.  ckuus5.c, 2 Jun 97.
  527.  
  528. Added \v(regname), \v(regorg), \v(regnum), invisible variables for
  529. registration info; they just call get_reg_blah() from ckoetc.c.  ckuusr.h,
  530. ckuus4.c, 2 Jun 97.
  531.  
  532. Added \v(xprogram), the specific program name: "K-95", "K/2", or "C-Kermit".
  533. ckuusr.h, ckuus4.c, 3 Jun 97.
  534.  
  535. From Jeff, 5 Jun 97:
  536.  . \v(line) changed to return Kermit form of TAPI device name (no blanks etc).
  537.  . Fix for internal coding error with IF EQUAL s1 s2.
  538.  
  539. Added IF TAPI.  ckuusr.h, ckuus6.c, 5 Jun 97.
  540.  
  541. Seemingly minor problems with cmdir() directory parsing fixed, 5 Jun 97:
  542.  
  543.  1. "cd /" would tend to fail because "too many directories match"; fixed in
  544.     cmdir() by not calling zxpand if we are parsing a directory name and it
  545.     does not contain any wildcard characters.
  546.  
  547.  2. "cd xxx<ESC>" would not supply the trailing directory separator when
  548.     completion was successful.  Fixed in ckucmd.c.
  549.  
  550.  3. "cd xxx?" could produce unbalanced columns, etc.
  551.  
  552.  4. "cd xxx<ESC>" would fail even if only one directory started with "xxx",
  553.     if a regular file also started with "xxx".
  554.  
  555. Problems 3 and 4 resulted from the fact that "x = zxpand(string);" returned
  556. the number of *all* matching files, not just the number of directories that
  557. matched.  But since it's far too late to change the API to add a new function
  558. to return a list of directories, or to add an argument to zxpand(), I used a
  559. horrible hack: cmdir() sets a global variable, dironly, if a list of only
  560. directories is desired.  If dironly == 0, zxpand() behaves as before.  This
  561. was implemented in the UNIX version of zxpand() in ckufio.c, but nowhere else,
  562. although it is easy enough to add (but not to test!) in OS-9, etc.  If dironly
  563. is to be set prior to calling to zxpand(), but MUST be restored immediately
  564. after so as not to disrupt other legitimate callers throughout the code.
  565. Thus, this usage is strictly confined to cmdir() (really cmifi2()) and not
  566. documented in the API.
  567.  
  568.  5. "cd xxx<ESC>" left a space at the end when completion was successful.
  569.  
  570. It has to, in case there is a subsequent field.  Peter Eichhorn asked that it
  571. stop at the "/" in case there are subdirectories, but how would we know (a)
  572. that there *are* subdirectories without descending through the entire
  573. directory tree, which could take hours, and (b) that even if there were
  574. subdirectories, that this was not the directory the user wanted to CD to?
  575. So no action here.  BTW, note that "if directory blah" does not use cmdir();
  576. if it did, and "blah" was not a directory, we'd get a parse error.
  577.  
  578. Added SET BPRINTER (bidirectional printer port) for K95 only; Jeff will fill
  579. in details; ckuusr.[ch], ckuus3.c, 6 Jun 97.  Full syntax is:
  580. SET BPRINTER [ port speed [ parity [ flow ] ] ].
  581.  
  582. Fixed help text for PRINT and SET PRINTER.  Put BPRINTER code in #ifdef
  583. BPRINT.  7 Jun 97.
  584.  
  585. Added options to SET EDITOR and SET BROWSER.  ckuus[r35].c, 8 Jun 97.
  586.  
  587. Added \v(editor), \v(editopts), \v(editfile), \v(browser), \v(browsopts),
  588. \v(browsurl).  ckuusr.h, ckuus4.c, 8 Jun 97.
  589.  
  590. Added BROWSE command for UNIX & K95.  ckcdeb.h, ckuusr.h, ckuusr.c, 8 Jun 97.
  591.  
  592. Changed ^W to delete back to nonalphanum rather than back to space.
  593. ckucmd.c, 8 Jun 97.
  594.  
  595. Updated help text for today's changes.  ckuus2.c, 8 Jun 97.
  596.  
  597. Fix GETOK -- it had garbage for the default prompt.  ckuus6.c, 17 Jun 97.
  598.  
  599. Added STATISTICS /BRIEF for Peter Eichhorn.  ckuusr.[ch], ckuus[24].c,
  600. 18 Jun 97.
  601.  
  602. Fixed Telnet SEND LOCATION negotiation to send WONT, rather than WILL,
  603. if we don't have a location, in response to DO LOCATION.  ckcnet.c, 18 Jun 97.
  604.  
  605. Fixed EDIT and BROWSE to handle %1 (OS/2 & Windows only) and %s in the options
  606. string as a filename placeholder.  ckuusr.c, 18 Jun 97.
  607.  
  608. Added array initializers, e.g. "declare \&a[3] {value1} {value2} {value3}".
  609. Initializers are (a) optional, (b) start with element 1, (c) can only be given
  610. up to the size of the array, (d) must be enclosed in braces if they contain
  611. spaces, (e) are stored literally and not evaluated.  ckuusr.c, 18 Jun 97.
  612.  
  613. Added OS-9 support for incoming TCP/IP connections, from Steve Rance
  614. <stever@ozemail.com.au>.  OS-9 has no select() call, so he made a dummy one.
  615. ckcnet.c, 19 Jun 97.
  616.  
  617. Defined BIGBUFOK for AIX on RISC.  ckcdeb.h, 20 Jun 97.
  618.  
  619. ---1.1.13---
  620.  
  621. Installed MINIX 2.0 changes from Terry McConnel, Math Dept, Syracuse U,
  622. trmcconn@syr.edu, plus a new makefile target.  cku[tf]io.c, ckuus6.c,
  623. ckucmd.c, makefile, 28 Jun 97.
  624.  
  625. Added zfnqfp() (the unspellable function) for AOS/VS.  Also zmkdir() and
  626. isdir(), plus the changes for the new cmdir() support.  ckcdeb.h, ckuus3.c,
  627. ckuus6.c, ckdfio.c, 29 Jun 97.
  628.  
  629. Removed spurious "extern int delay" from ckcfn2.c.  29 Jun 97.
  630.  
  631. Filled in MKDIR and RMDIR commands for AOS/VS.  But rmdir() doesn't work for
  632. some unknown reason; "perror" always says "30 End of File".  The AOS/VS C
  633. programming docs do not list any way to delete a directory.  So I changed it
  634. to system("delete blah"), where blah is the directory name.  It works, but it
  635. doesn't return a status code, and it also removes regular files.  Meanwhile,
  636. AOS/VS stat() sometimes crashes.  There's nothing I can do about it, and no
  637. pattern I can find as to what conditions make it happen.  ckuusr.c, 30 Jun 97.
  638.  
  639. Changed sfile() not to send filename as FILE001, etc, if an as-name is defined
  640. as a variable that has no value.  This was a bug introduced in the template
  641. code.  "send \%1 \%2" would cause this to happen (as in the BSEND macro).
  642. ckcfns.c, ckermit2.upd, 30 Jun 97.
  643.  
  644. Fixed DG isdir() to not call stat(), to prevent crashing -- now it does the
  645. appropriate VS syscall directly.  Also fixed DG iswild() not to return false
  646. positives because of ^, which is like .. in UNIX.  ckdfio.c, 1 Jul 97.
  647.  
  648. Fixed cmdir() for DG to not append : to directory name during completion,
  649. because chdir() does not work if you do that.  ckucmd.c, 1 Jul 97.
  650.  
  651. END from inside SWITCH did not work right -- SWITCH, although implemented
  652. as a macro internally, should not count as a macro level to END.  This was
  653. already handled correctly for FOR, WHILE, and XIF.  Added SWITCH to the list.
  654. ckuusr.c, 3 Jul 97.
  655.  
  656. Added cmswi(), which is just like cmkey(), but for switches (optional keywords
  657. that begin with "/").  If the CM_ARG bit is set in the keyword table, then the
  658. switch takes an argument, separated by ":" or "=", e.g. /PROTOCOL:KERMIT.
  659. Otherwise, it doesn't, e.g. /BINARY.  ckucmd.[ch], with some testing material
  660. (under the TYPE command) in ckuusr.[ch], 4 Jul 97.
  661.  
  662. Added chained parse fields.  New function cmfdb(), takes the address of an FDB
  663. struct (containing parse function code plus inputs for the function -- help
  664. message text, default, etc), as an arg, which may contain a pointer to another
  665. one, and so on, until the "next-FDB" pointer is null.  If user's input is not
  666. parsed successfully by the first, then the second is tried, and so on to the
  667. end of the chain, at which point a parse error is returned.  ESC and ? work.
  668. ckucmd.[ch], 4 Jul 97.  (What does FDB stand for?  I don't remember; that's
  669. what they were called in TOPS-20... Function Descriptor Block?)
  670.  
  671. Removed testing material from the TYPE command.  Added experimental XSEND
  672. command, which is like SEND, but takes all sorts of switches: /BINARY,
  673. /AS-NAME:xxx, etc.  It replaces the old SEND, plus CSEND and PSEND, as well as
  674. MOVE and the BSEND and TSEND macros.  Filled in the actions for all switches.
  675. XSEND is implemented entirely in doxsend().  ckuusr.[ch], 5 Jul 97.
  676.  
  677. Finished testing & debugging XSEND command.  Verified that when given no
  678. switches, it behaves exactly like the SEND command, and so repaced the SEND
  679. command with doxsend(), leaving the old code still there for CSEND, PSEND,
  680. etc, so they can still be used.  The new arrangement allows more and more
  681. variations on SEND to be accomplished without adding top-level commands.  It
  682. also allows combinations that were not possible before, such as /PRINT or
  683. /MAIL with a SEND-LIST, SEND /PRINT /DELETE or SEND /COMMAND /MAIL:address.
  684. Changed MOVE, CSEND, MAIL, and RESEND to use doxsend(), since they have the
  685. same format as SEND.  Left MSEND, MMOVE separate.  Added description of
  686. switches to ckermit2.upd, section 1.5, and new section 4.7 on SEND command.
  687. Changed HELP SEND text.  6 Jul 97.
  688.  
  689. Same treatment for RECEIVE / CRECEIVE; GET / REGET / CGET / RETRIEVE.
  690. ckuus[r6].c, ckermit2.upd, 7 Jul 97.
  691.  
  692. Updated help text for RECEIVE and GET.  ckuus2.c, 8 Jul 97.
  693.  
  694. Updated section 4.2 of ckermit2.upd to show new forms.  8 Jul 97.
  695.  
  696. Added switches to MSEND and MMOVE, combined code into doxsend().
  697. Made many of the stupider command names (CGET, RETRIEVE, etc) invisible;
  698. now top-level ?-help looks a lot better.  ckuusr.c, 8 Jul 97.
  699.  
  700. Corrections and refinements to switch code.  Fix MSEND/MMOVE when used with
  701. ZMODEM, when used with /MAIL, etc.  Eliminate ambiguity about what happens
  702. when a switch that must take an arg is followed by a space.  The rule is:
  703. if a switch name ends in : or =, then if the next character is a space, that
  704. means an empty value has been given, and the next field is parsed.  ckuusr.c,
  705. ckucmd.c, 9 Jul 97.
  706.  
  707. #ifdef adjustments for HP-UX 10.x and Digital UNIX 3.2/4.0 from Jonathan
  708. Kamens <jik@cam.ov.com>.  ckcdeb.h, ckufio.c, ckutio.c, 12 Jul 97.
  709.  
  710. Fixes (or stabs in the dark at fixes) for recently reported VMS problems; see
  711. notes in ckvtio.c for edit 091.  12 Jul 97.
  712.  
  713. Added some missing #ifdefs for protocol switching and pipesend to the recent
  714. switch-parsing code.  ckuus[r6].c, 12 Jul 97.
  715.  
  716. Added some missing prototypes for recently added command-parsing functions.
  717. ckuusr.h, ckucmd.h, 12 Jul 97.
  718.  
  719. --Alpha.01--
  720.  
  721. Added APC check to MOVE/MMOVE -- we don't want APC strings stealing files
  722. from people...  ckuusr.c, 13 Jul 97.
  723.  
  724. Now that we have all the pipesend / receive filter stuff in place, it turned
  725. out to be easy to rearrange the mail-receiving code to pipe the incoming
  726. material directly into the mail program (in UNIX).  This has the advantages of
  727. (a) not requiring a temp file, and (b) allowing a normal subject in place of
  728. the filename.  Temp files were bad not only because they required (a) space,
  729. and (b) writability of the current directory, but also because using them
  730. could result in wiping out an existing file.  So now:
  731.  
  732.   send /mail:whoever@xyz.com /as:{Hi there} oofa.txt
  733.  
  734. when sent to C-K results in whoever@xyz.com receiving oofa.txt as email
  735. with subject "Hi there".  ckcpro.w, ckcfns.c, 13 Jul 97.
  736.  
  737. Added /SUBJECT: as a synonym for /AS-NAME:, and fixed a couple minor glitches
  738. related to mail.  ckuusr.c, 13 Jul 97.
  739.  
  740. Changed reception of print files (from REMOTE PRINT or SEND /PRINT) to use
  741. pipes also.  UNIX only.  ckcpro.w, ckcfns.c, 13 Jul 97.
  742.  
  743. In response to people *still* complaining about exit warning when they swear
  744. the modem is not asserting CD...  In hupok(), ttgmdm() returns an error.  This
  745. can happen if we used to have carrier but now we don't and the device driver
  746. won't let us look at the device any more (e.g. Solaris 2.5).  Previously, we
  747. always set needwarn to 1 here to be safe, but really, if CARRIER-WATCH is OFF,
  748. we already decided not to warn, so CARRIER-WATCH must be ON or AUTO, which
  749. *probably* means that we had CD on this connection before, and so if ttgmdm()
  750. fails now, it means we don't have it any more.  So now let's try NOT warning
  751. when ttgmdm() returns an error.  ckuus3.c, 13 Jul 97.
  752.  
  753. Speaking of modems, in response to increasing requests for an option to ignore
  754. dialtone, added SET DIAL IGNORE-DIALTONE { ON, OFF } and SET MODEM COMMAND
  755. IGNORE-DIALTONE <command>, and a new ignoredt member to struct MDMINF, etc
  756. etc.  Untested, except that SET, SHOW, and HELP work OK.  ckcker.h, ckuusr.h,
  757. ckuus[234].c, ckudia.c, 13 Jul 97.
  758.  
  759. Back to VMS...  Noticed that zxpand() would malloc() its array of filenames
  760. every time it was called, but nobody would ever free them.  Fixed in ckvfio.c,
  761. 14 Jul 97.
  762.  
  763. An off-by-one error in the switch parser caused the placeholder for highest-
  764. numbered switch value (SND_LBL) to go uninitialized, thereby making VMS
  765. C-Kermit send in labeled mode (depending what was in the uninitialized
  766. memory).  Fixed in doxsend(), ckuusr.c, 14 Jul 97.
  767.  
  768. Lots of changes to isdir() and cmdir() for VMS.  The idea is to make directory
  769. parsing work as in UNIX, Windows, AOS/VS, etc, but it's much harder in VMS
  770. because a directory can be represented in many ways: a logical or device name,
  771. or [FOO.BAR], or DEV:[FOO.BAR], or [FOO]BAR.DIR;1, etc.  This was about two
  772. days' work, with some help on isdir() from Mark Berryman.  ckucmd.c, ckvfio.c,
  773. 15 Jul 97.
  774.  
  775. Removed gratuitous message showing new directory from docd().  ckuus5.c,
  776. 15 Jul 97.
  777.  
  778. Fixed UNIX "cd ~name" to work again -- I must have broken it recently.
  779. ckucmd.c, 15 Jul 97.
  780.  
  781. Changed ckindex() to accept -1 as a "starting position" argument, meaning
  782. "length of string 2".  ckcmai.c, 15 Jul 97.  (NOTE: fix \frindex() to take
  783. advantage of this...)
  784.  
  785. Amplified, reorganized, and numbered ckuins.doc.  16 Jul 97.
  786.  
  787. Attempted to add support for 57600, 76899, and 115200 bps for IRIX 6.2 (the
  788. first release of IRIX that supports these speeds).  A previous attempt at
  789. doing this by adding -DPOSIX to the make was a disaster.  This time I tried
  790. defining POSIX for IRIX62 within ckutio.c only around ttsspd() and ttgspd(),
  791. and also defined the BPS_xxx symbols for IRIX62 in ckcdeb.h.  16 Jul 97.
  792.  
  793. Mike Freeman reported that login scripts didn't work in VMS.  Evidently this
  794. was because a new check was added for ttyfd == -1, but VMS doesn't use file
  795. descriptors, and so ttyfd is always -1 there.  Fixed doinput() in ckuus4.c to
  796. skip this test for VMS.  16 Jul 97.
  797.  
  798. Found a few places where the protocol module was not setting the exit status
  799. code; hopefully caught them all.  ckcfn2.c, 16 Jul 97.  Nope, that wasn't it.
  800. The real problem was that the "what" variable was set to W_NOTHING until a
  801. protocol transfer actually had begun.  So if we timed out on the first packet,
  802. ORing "what" into the exit status had no effect.  Fixed in ckcpro.w by
  803. initializing what to 1 rather than W_NOTHING.  16 Jul 97.
  804.  
  805. Changed "CD" (by itself) in VMS to simply chdir("SYS$LOGIN:").  ckvfio.c,
  806. 16 Jul 97.
  807.  
  808. Fixed IF ALARM to make sure both time comparands are left-padded with "0"s
  809. so they compare correctly with strcmp().  ckuus6.c, 18 Jul 97.
  810.  
  811. Previously MGET and GET were synonyms.  But now the new GET syntax prevents
  812. the (little-known) feature in which you could GET a list of files, like "get
  813. oofa.txt *.ps /etc/motd".  So now MGET has become a separate command that does
  814. allow this syntax (but no as-names).  This also fixes a problem with "get xxx
  815. yyy" (i.e. as-name is yyy), resulting in "?Write permission denied - yyy".
  816. It also fixes a bug with "get {xxx yyy zzz}", in which the first "{" was not
  817. removed prior to sending the R packet.  ckuusr.[ch], ckuus[26].c, 19 Jul 97.
  818.  
  819. Added a note to top-level help about macro names.  Changed built-in predefined
  820. names _forx, _whilex, etc, to be invisible so they don't show up in "do ?".
  821. ckuus5.c, 19 Jul 97.
  822.  
  823. Corrections & updates to ckermit2.upd, 19 Jul 97.
  824.  
  825. Fixed ANOTHER off-by-one error in the declarations of switch tables for SEND
  826. and GET (this was a bad one, causing core dumps).  ckuus[r6], 19 Jul 97.
  827.  
  828. ---Alpha.02---
  829.  
  830. James Cameron verifies the VMS problem with closing DECwindow on C-K is fixed.
  831. 20 Jul 97.
  832.  
  833. Added cmdate() to parse a date and/or time.  ckucmd.[ch], 20 Jul 97.
  834.  
  835. Dale Dellutri says problem with hanging after "Communications disconnect" is
  836. fixed, but NO CARRIER message never shows up (as it always did in 5A(190)).
  837. Asked him for a debug log.  21 Jul 97.
  838.  
  839. Added /BEFORE: and /AFTER: switches to SEND, using cmdate().  Also added
  840. /LARGER-THAN: and /SMALLER-THAN:.  ckcfns.c now has a nice fileselect()
  841. routine that decides whether to send the file based on these switches.
  842. ckuusr.c, ckcfns.c, ckuus2.c, ckermit2.upd, 21 Jul 97.
  843.  
  844. Added a crude pattern matcher, ckmatch(pattern,string), supporting only * and
  845. ? as metacharacters.  ckcmai.c, 21 Jul 97.
  846.  
  847. To test it, added IF MATCH <string> <pattern>.  ckuusr.h, ckuus6.c, 21 Jul 97.
  848.  
  849. Added /EXCEPT:<pattern> to SEND.  ckuus[r2].c, ckermit2.upd, 21 Jul 97.
  850.  
  851. Fix #ifdefs so that CK_ENVIRONMENT is not defined unless TCPSOCKET is defined,
  852. to prevent unresolved externals at link time in non-TCP/IP UNIX builds.
  853. ckcdeb.h, 21 Jul 97.
  854.  
  855. Add new updates for wait() argument (is it "int" or is it "union wait"?).
  856. ckutio.c, 21 Jul 97.
  857.  
  858. Rearrange some lines in ckcnet.c so ucx_port_bug does not turn up undefined
  859. if we are using DECC, 21 Jul 97.
  860.  
  861. Built on Digital UNIX 4.0 (where there is a warning about wait() that I can't
  862. seem to shut up) and 3.2 (no problem there).  21 Jul 97.
  863.  
  864. Fixed numerous #ifdef errors regarding feature selection, many modules.
  865. 21 Jul 97.
  866.  
  867. Shuffled some more #ifdefs and variable declarations to allow for NOICP build.
  868. Minor help text cleanups.  Don't allow SEND /STARTING-AT:n for file groups.
  869. Many modules, 22 Jul 97.
  870.  
  871. Fixed another (off-by-one) bug with transfer mode in VMS (it always insisted
  872. on receiving in labeled mode).  ckuus6.c, 22 Jul 97.
  873.  
  874. VMS C-Kermit would crash if given invalid command-line args detected in
  875. prescan() because fatal(), called to print the error message, could not print
  876. it because sysinit() had not yet been called to obtain the console channel.
  877. This mess really needs cleaning up.  Meanwhile, I worked around it by having
  878. all the console i/o routines in VMS check first to make sure they have an open
  879. channel, and also to have main set a global flag "initflg" after return from
  880. sysinit() to indicate that sysinit has been done.  If it hasn't, then fatal
  881. calls sysinit() first before trying to print any messages or exit.  This is
  882. also important elsewhere in case (e.g.) we try to restore some systemish
  883. things that we haven't saved yet, e.g. tty modes or somesuch.  ckcmai.c,
  884. ckuusx.c, ckvtio.c, 22 Jul 97.
  885.  
  886. Fixed cmini() to not assume that buffers had already been malloc'd.
  887. ckucmd.c, 22 Jul 97.
  888.  
  889. Got tired of having to remember to update version numbers, dates, etc, in so
  890. many places, so broke all these strings up into their component parts so that
  891. each one only has to be changed in one place, pretty much, and then added a
  892. routine, makever(), to put the various strings and numbers in the places where
  893. all the other routines expect to find them.  ckcmai.c, 24 Jul 97.
  894.  
  895. Added \v(test) == "0" if this is not a test version of Kermit, or else the
  896. test version, e.g. "Alpha.03".  ckuusr.h, ckuus4.c, 24 Jul 97.
  897.  
  898. Added optional pattern for SHOW VARIABLES, e.g. "show var *ver*".  Also, "show
  899. var x" shows all variables whose names start with x, etc.  ckuus5.c, 24 Jul 97.
  900.  
  901. Fixed a bug in the parsing of the LOCAL command.  ckuus5.c, 24 Jul 97.
  902.  
  903. The test for DELETE success/failure was wrong in the non-K95 case.
  904. Fixed in dodel(), ckuus6.c, 25 Jul 97.
  905.  
  906. Added \fn2hex() and \fn2oct() to convert numbers to hex and octal.  \fhexify()
  907. converts *strings* to hex, which is quite different.  E.g. \fhex(16) = 3130,
  908. whereas \fn2hex(16) = 10.  ckuusr.h, ckuus[24].c, 26 Jul 97.
  909.  
  910. Changed default maximum packet buffer size to 290K if BIGBUFOK and DYNAMIC are
  911. both defined at compile time.  This doesn't change the size of the executable,
  912. and the memory is allocated only if requested.  ckcker.h, 26 Jul 97.
  913.  
  914. Missing file display on RESEND after SEND, and SEND after RESEND behaved like
  915. RESEND.  Fixed misplaced #ifdefs in doxsend.  ckuusr.c, 26 Jul 97.
  916.  
  917. Scenario: my current directory has a file that I can delete, but the directory
  918. itself lacks write permission.  I try to receive a file into this directory
  919. that has the same name as an existing file, with FILE COLLISION set to BACKUP.
  920. The transfer fails, not because I can't overwrite the original file, but
  921. because I can't create the backup file.  But when in local mode, the
  922. appropriate message does not make it to the file-transfer display.  This took
  923. quite a bit of reworking how E packets work and where their messages are
  924. saved, but it seems OK now.  If the user sees the new message ("Can't create
  925. backup file"), she can switch to SET FILE COLLISION OVERWRITE or APPEND,
  926. which work.  ckcpro.w, ckcfn*.c, ckermit.bwr, 26 Jul 97.
  927.  
  928. Things I should have thought of long ago dept, cont'd...  Added a new internal
  929. variable, xferstat, that remembers the status of the most recent file
  930. transfer: -1 = no transfer yet, 1 = failure, 0 = success.  Added this info,
  931. plus the text of the error packet that terminated an unsuccessful transfer,
  932. to the STATISTICS display.  Also added variables for these: \v(xferstat)
  933. and \v(xfermsg).  ckuusr.h, ckuus4.c, ckermit2.upd, 26 Jul 97.
  934.  
  935. Cleaned up a bunch of internal messiness involving file-transfer failures.
  936. For example, clsof and clsif should not do all of their usual stuff if the
  937. file they are trying to close was never opened.  In particular, they should
  938. not call fstats(), which writes messages to the transaction log and
  939. accumulates statistics.  ckcpro.w, ckcfn[s23].c, ckuusx.c, 26 Jul 97.
  940.  
  941. Simplified & corrected parsing of RETURN and added brace-stripping for the
  942. return value.  ckuusr.c, 26 Jul 97.
  943.  
  944. Added a BACK command, which means to "CD to my previous current directory".
  945. Very simple, not a stack -- so successive BACK commands just switch between
  946. two directories.  ckuusr.[ch], ckuus[52].c, ckermit2.upd, 26 Jul 97.
  947.  
  948. Added an optional switch, /RAW-SOCKET, to end of SET HOST / TELNET command.
  949. It can be given only if you first give a host and a port.  When this switch is
  950. given, ttnproto is set to the new value, NP_TCPRAW.  See ckermit2.upd 2.3.5.
  951. ckuus7.c, ckcnet.[ch], 26 Jul 97.
  952.  
  953. Fixes to /raw-socket code from yesterday to make it actually work, and add
  954. display of this to SHOW NET.  ckcnet.[ch], ckutio.c, ckuus4.c, 27 Jul 97.
  955.  
  956. Fixes to epktmsg-related code from yesterday -- in some cases the pointer was
  957. not initialized, causing core dumps, etc.  Many modules, 27 Jul 97.
  958.  
  959. Added zgperm() to ckufio.c, UNIX only for now (protected by CK_PERMS), to get
  960. file modes/permissions.  ckufio.c, ckcplm.doc, 27 Jul 97.
  961.  
  962. Used zgperm() in rcvfil() in the file collision section.  If the incoming file
  963. has the same name as an existing file, and we are going to create a new copy
  964. or overwrite the existing file, we get its permissions first and stuff them
  965. into the attribute structure when initializing it (in initattr()).  If the
  966. sender puts its own (local-format) permissions in the A-packet, these will
  967. override.  But if it doesn't, then the new file inherits the permissions of
  968. the old one.  If there is no A-packet, the new file inherits the old file's
  969. permissions, but the new file gets the current date and time.  If there is
  970. no file collision, there is no inheritance.  ckcfn[s3].c, 27 Jul 97.
  971.  
  972. Adjustments to ckcnet.h for DECC 5.5-002 (remove bzero/bcopy prototypes).
  973. 27 Jul 97.
  974.  
  975. ---Alpha.03---
  976.  
  977. Fixed some bad buffer & pointer declarations in ckcmai.c when DYNAMIC not
  978. defined.  28 Jul 97.
  979.  
  980. Changed SEND /EXCEPT: to allow a list of patterns, rather than just one.
  981. ckuus[r5].c, ckcfns.c, 29 Jul 97.
  982.  
  983. Added SEND /NOT-AFTER: and /NOT-BEFORE: to get the {greater,less}-than-or-equal
  984. effect.  ckuusr.[ch], ckuus2.c, 31 Jul 97.
  985.  
  986. Added SET FLAG { ON, OFF } and IF FLAG.  It's just a user-settable flag that's
  987. easy to test in scripts.  ckuusr.[ch], ckuus[23].c, 1 Aug 97.
  988.  
  989. Added { SEND, RECEIVE, GET, etc } /FILTER.  ckuus[r26].c, 1 Aug 97.
  990.  
  991. Fix from Jeff for reconnecting to a raw TCP socket without having the protocol
  992. switch to Telnet.  ckcnet.c, 2 Aug 97.
  993.  
  994. Changed dial module to echo commands if DIAL DISPLAY is ON but modem is not
  995. echoing them.  ckudia.c, 2 Aug 97.
  996.  
  997. Added a new member to struct MDMINF -- ini2, the last-minute init string, to
  998. be sent just prior to dialing.  For compatibility with TAPI.  ckcker.h,
  999. ckudia.c, 2 Aug 97.
  1000.  
  1001. Added SET MODEM COMMAND PREDIAL-INIT <string> to set the last-minute init
  1002. string.  ckuusr.h, ckuus[23].c, 2 Aug 97.
  1003.  
  1004. Reported problem with PPI seems to be lost chars on output -- commands are OK.
  1005.  
  1006. Added \v(sendlist) = number of entries in send-list.  ckuusr.h, ckuus4.c,
  1007. 2 Aug 97.
  1008.  
  1009. Updated the TAP script to be more robust, etc.  ckepage.ksc, 2 Aug 97.
  1010.  
  1011. Added /PATHNAMES:{ON,OFF} and /FILENAMES:{CONVERTED,LITERAL} to SEND commands.
  1012. SEND /PATHNAMES:ON also temporarily SETs FILE NAMES LITERAL.
  1013.  
  1014. Noticed that more-prompting in the STATISTICS command was messed up.  It
  1015. turned out that the cmd_rows variable got set to 0 after a failed file
  1016. transfer (and who knows what else!).  Why?  When an E packet is received, we
  1017. have some new code to copy the error message to a "failure reason" buffer
  1018. using strncpy.  Well, the target buffer was being accessed thru a string
  1019. pointer that was mistakenly declared as an array (it originally was an array,
  1020. but later was changed to a pointer, and evidently the change didn't propagate
  1021. thru all the modules).  This one was great fun to track down.  ckcfn[s23].c,
  1022. ckuus4.c, 2 Aug 97.
  1023.  
  1024. Some testers of Alpha.03 noticed that REMOTE DIRECTORY didn't work.  It was
  1025. actually worse than that.  I had broken this when adding the code to avoid
  1026. closing a file when it wasn't open.  First, the o_isopen flag was not always
  1027. being set, and second reof() did not give a proper return code.  Now fixed.
  1028. ckcfn[s3].c, 2 Aug 97.
  1029.  
  1030. But sending of remote commands to pipes was also broken in Alpha.03.  This
  1031. required adding a system-independent front-end to zxcmd(), openc(), that sets
  1032. the o_isopen flag.  ckcfn3.c, ckcpro.w, 3 Aug 97.
  1033.  
  1034. Integrated Jeff's changes from the past week.  Many modules, 10 Aug 97.
  1035.  
  1036. Replaced all HP-UX makefile entries with new ones from Peter Eichhorn.
  1037. makefile, 10 Aug 97.
  1038.  
  1039. Added high serial speeds for SCO OSR5.0.2, along with a new symbol,
  1040. POSIX_SPEEDS, used to select POSIX speed setting/getting separately from POSIX
  1041. for everything else, and predefined this for OSR5.0.2 and IRIX 6.2, along with
  1042. POSIX itself and BSD44.  Added new makefile entries for SCO OSR5.0.2.
  1043. ckcdeb.h, ckutio.c, ckuver.h, makefile, 10 Aug 97.  But this doesn't work at
  1044. all -- REVISIT THIS MONDAY...
  1045.  
  1046. Fixed spurious error message issued by VMS C-K when doing a GET command.
  1047. ckuus6.c, 10 Aug 97.
  1048.  
  1049. More futzing with SCO OpenServer R5.0.2.  To get the new high speeds, I have
  1050. to convert completely to POSIX, but this proves to be an adventure because of
  1051. the situation with hardware flow control, which is outside the scope of POSIX.
  1052. Got it, after much header-file shuffling.  This also involved some minor but
  1053. perhaps significant changes to the general POSIX code.  ckcdeb.h, 11 Aug 97.
  1054.  
  1055. Fixed a truly horrible bug, in which the modem types above 55, namely
  1056. SupraSonic, Best Data, ATT 19x0, and ATT KeepInTouch, were indexed
  1057. incorrectly, off by one, because the pointer to SupraSonic was left out of the
  1058. modemp[] array.  This goes back to May, and nobody ever noticed.  ckudia.c,
  1059. 12 Aug 97.
  1060.  
  1061. NOTE: THERE IS STILL MORE CONFUSION LURKING because of 1-based modem numbers
  1062. versus 0-based modemp indexes!
  1063.  
  1064. More fixes for POSIX serial i/o in SCO OSR5.0.2, and presumably elsewhere too.
  1065. ckutio.c, 12 Aug 97.
  1066.  
  1067. Spent the morning determining there was no way to read modem signals in SCO
  1068. OSR5.0.4 (in termio.h, TIOCMGET is defined only if _SVID3 is defined *and*
  1069. _POSIX_SOURCE is *not* defined, but we need _POSIX_SOURCE defined so we can
  1070. get the high serial speeds).  Anyway the underlying ioctl() probably is a just
  1071. no-op.  13 Aug 97.
  1072.  
  1073. Noticed and fixed a typo in the Telebit init string: S61=1 should be S61=0
  1074. (BREAK action should be "do what S63 says" rather than "return to command
  1075. mode").  ckudia.c, 13 Aug 97.
  1076.  
  1077. Fixed hardware flow control in SCO OSR5.0.4 -- more #ifdef juggling.
  1078. makefile, ckcdeb.h, ckutio.c, 13 Aug 97.
  1079.  
  1080. Changed references to modemp[n_TAPI] to modemp[n_TAPI - 1] because the
  1081. modemp[] array is 0 based even though the modem type numbers are 1-based.
  1082. Confusing but true.  ckudia.c, 13 Aug 97.
  1083.  
  1084. Another day spent with SCO 5.0.4.  Evidently the new stuff (high serial speeds
  1085. etc) only works in 5.0.4, even though it might be in the header files for
  1086. 5.0.2, so I changed the symbols, makefile entry names, etc, accordingly.
  1087. Experimentation with flow control revealed:
  1088.  
  1089.  . The <sys/termiox.h> material (RTSXOFF/CTSXON) compiles OK but doesn't work
  1090.    (the ioctls return -1).
  1091.  . The RTSFLOW/CTSFLOW material does not show up in a POSIX compilation.
  1092.  . Forcing RTSFLOW/CTSFLOW definitions (yuk) seems to do the trick.
  1093.  
  1094. But forcing TIOCMGET does not get us working modem signals -- the ioctls just
  1095. say "invalid argument".  But I left it in anyway, because some third-party
  1096. drivers, like Digiboard, might implement it.  ckcdeb.h, ckutio.c, ckuus5.c,
  1097. makefile, ckuins.doc, 14 Aug 97.
  1098.  
  1099. Straightened out the aforementioned mess with the modemp[] array.  Now that
  1100. wasn't so hard, was it?  ckudia.c, ckuus[34].c, ckuusr.h, 14 Aug 97.
  1101.  
  1102. Changed mainline binary variable when switching automatically from text to
  1103. binary mode in VMS C-Kermit -- cosmetic only; should only affect the
  1104. file-transfer display.  ckvfio.c, 14 Aug 97.
  1105.  
  1106. Changed SET EDITOR and SET BROWSER in VMS to parse text strings rather than
  1107. filenames.  It turns out that zshcmd() (in VMS, a front end for LIB$SPAWN())
  1108. can not run programs when given a filespec; it runs DCL commands, period --
  1109. always has -- did I know that?  ckuus3.c, ckermit2.upd, 14 Aug 97.
  1110.  
  1111. Added support for USR XJ1560 X2 56K modem.  ckuusr.h, ckudia.c, 14 Aug 97.
  1112.  
  1113. Changed keyword parser to skip over CM_INV keywords when completing an
  1114. abbreviation.  ckucmd.c, 14 Aug 97.
  1115.  
  1116. Fixed some typos from yesterday's SCO work.  ckutio.c, 15 Aug 97.
  1117.  
  1118. Discovered that "remote host xxx" followed by "get" did not work.  This was
  1119. yet another case of the i_isopen flag not being set (this time in syscmd()).
  1120. I'm wondering now what the original idea was behind these stupid flags -- oh
  1121. yeah, I remember -- calling fstats() would have the side effect of writing a
  1122. misleading transaction log entry if the file had never been opened.  Anyway,
  1123. all fixed now.  ckcfn[s3].c, 16 Aug 97.
  1124.  
  1125. Fix from Jeff for tn_ini() -- make sure *all* Telnet protocol flags are
  1126. reset.  ckcnet.c, 17 Aug 97.
  1127.  
  1128. Miscellaneous minor corrections from compiling on many platforms.
  1129. ckuusr.c, ..., 17 Aug 97.
  1130.  
  1131. ---Alpha.04---
  1132.  
  1133. Changed USR X2 max speed to 115200.  ckudia.c, 18 Aug 97.
  1134.  
  1135. Some tentative changes for Apollo SR10.  ckuusx.c, ckuver.h, 18 Aug 97.
  1136.  
  1137. Some of the cmfld()-parsing SEND (etc) switches were not stripping braces.
  1138. ckuusr.c, ckuus6.c, 19 Aug 97.
  1139.  
  1140. Console modes were not being twiddled in the EDIT and BROWSE commands, which
  1141. affected VMS (some editors would not echo when started).  ckuusr.c, 19 aug 97.
  1142.  
  1143. Fixed a problem in which REMOTE HELP failed, caused by a rearrangement of the
  1144. code in opent() which, if it succeeded, it did not set a return value, so its
  1145. return value was random (i.e. system-dependent).  Now why didn't all those
  1146. strict ANSI compilers notice?  ckcfn3.c, 19 Aug 97.
  1147.  
  1148. The client end of REMOTE RENAME and REMOTE COPY have been broken since 6.0
  1149. came out -- nobody noticed till just now.  The code that was added to parse
  1150. redirectors wiped out the second field.  ckuus7.c, 20 Aug 97.
  1151.  
  1152. Fixed broken RECEIVE XXX for XMODEM transfers and assorted other parsing
  1153. problems in doxget().  ckuus6.c, 23 Aug 97.
  1154.  
  1155. Added CONNECT command switches:
  1156.  
  1157.  /QUIETLY              All but K95    (n/a)
  1158.  /IDLE-LIMIT:int       K95 only       int    tt_idlesnd_tmo;
  1159.  /IDLE-STRING:string   K95 only       char * tt_idlesnd_str;
  1160.  /TIME-LIMIT:int       K95 only       int    tt_timelimit;
  1161.  /TRIGGER:string       K95 only       char * tt_trigger_str;
  1162.  
  1163. Like file-transfer switches, these are local to the specific CONNECT command,
  1164. overriding, but saving and restoring, the global session-limit and other
  1165. corresponding settings.  /QUIETLY was already there, and it's still the only
  1166. one that non-K95 users will see; session limits, etc, are implemented only
  1167. in K95.  ckuusr.[ch], 23 Aug 97.
  1168.  
  1169. Added partial completion of keywords.  ckuusr.h, ckucmd.c, ckcmai.c,
  1170. 23 Aug 97.
  1171.  
  1172. Corrected a couple minor problems with partial completion and CONNECT
  1173. switch parsing.  ckuusr.c, ckucmd.c, 24 Aug 97.
  1174.  
  1175. Discovered that if you typed Esc when entering a field parsed by chained
  1176. fdb's, nothing happened if the field had no default value -- in fact it should
  1177. have beeped.  Fixed in ckucmd.c, 24 Aug 97.
  1178.  
  1179. Changed VMS zhome() to use SYS$LOGIN rather than HOME.  This is to avoid the
  1180. problem that occurred when using getenv(HOME) as a default for CD, and that
  1181. directory was defined as a search path -- e.g. SYS$SYSROOT:[SYSMGR] on a
  1182. cluster, where SYS$SYSROOT: was a list of disks, namely that you can't SET
  1183. DEFAULT to a search list.  Reportedly using SYS$LOGIN: avoids this problem
  1184. and seems to work OK otherwise.  ckuus5.c, 24 Aug 97.
  1185.  
  1186. Spent a few hours trying to get the IRIX 6.2 version to compile with POSIX
  1187. defined (same deal as for SCO 5.0.4), but could not find a way to make it
  1188. execute the definitions & declarations for struct timeval and the select()
  1189. related ones.  I finally gave up when I discovered that the IRIX 6.2 system
  1190. I was using for this didn't have the high serial speeds defined in any of its
  1191. header files anyway.  25 Aug 97.
  1192.  
  1193. Added /TRIGGER:string to UNIX CONNECT module.  ckucon.c, 26 Aug 97.
  1194.  
  1195. Added SET TERMINAL TRIGGER to set global trigger, which can be overridden by
  1196. local switch.  ckuus[s7].c, ckuusr.h, 26 Aug 97.
  1197.  
  1198. Expanded trigger feature to allow up to 8 triggers, using the same notation as
  1199. SEND /EXCEPT.  Changed makexcept() into makelist(), so it can be used to parse
  1200. any {{s1}{s2}...{sn}} string into a list of pointers to s1, s2, ..., sn.
  1201. Moved autoexitchk() to ckuusx.c, since it is portable and can be shared by all
  1202. CONNECT modules.  Added \v(trigger) to give the value of the trigger that was
  1203. selected.  Added SHOW TRIGGER to display current SET TERM TRIGGER values.
  1204. ckcdeb.h, ckuusr.[ch], ckuus[2457x].c, ckucon.c, ckermit2.upd, 27 Aug 97.
  1205.  
  1206. Changed CONNECT to always reset triggerval (i.e. \v(trigger)) before going
  1207. online, so that \v(trigger) refers only to the most recent CONNECT command.
  1208. ckuusr.c, ckermit2.upd, 28 Aug 97.
  1209.  
  1210. Added trigger support to VMS version.  Plus one last attempt at making VMS
  1211. version not lose "NO CARRIER" message.  ckvcon.c, 1 Sep 97.
  1212.  
  1213. Added trigger support to AOS/VS version.  ckdcon.c, 1 Sep 97.
  1214.  
  1215. Renamed warn variable to ckwarn to avoid conflict in BSDI 3.0.  Also added
  1216. support for high serial speeds in BSDI 2.0 and later (including a new makefile
  1217. entry).  Many modules, 1 Sep 97.
  1218.  
  1219. ---Alpha.05---
  1220.  
  1221. Changed VMS zhome() (again), this time from getenv("SYS$LOGIN") to
  1222. simply "SYS$LOGIN:".  ckvfio.c, 2 Sep 97.
  1223.  
  1224. Still doesn't work -- now we try it without the colon (but only as the default
  1225. for "cd", since we need the colon in other contexts).  ckuus5.c, 4 Sep 97.
  1226.  
  1227. Previous, cont'd...  Turns out Alpha VMS 6.2 chdir() doesn't work.  Got code
  1228. from William Bader to use sys$setddir() instead.  Works OK, but (OF COURSE
  1229. there's a BUT) it applies to the whole job and not to just the Kermit process,
  1230. so when Kermit exits, the user's default directory has changed to whatever
  1231. Kermit last CD'd to.
  1232.  
  1233. Rework sending of A-packets so that multiple A-packets can be sent in case all
  1234. the attributes won't fit into a single packet:
  1235.  . Added an initialize flag parameter to sattr().
  1236.  . Changed sattr() to return a positive number if it sent an A packet,
  1237.    0 if it didn't have anything to send, or -1 on error.
  1238.  . Added a new util routine, maxdata(), to return size of data field, shared
  1239.    by sattr() and getpkt().
  1240.  . Recoded sattr() to fill data field with as many attributes as will
  1241.    fit, marking each one as done, and returning when it can't fit any more,
  1242.    or there are no more left, or no more that can fit even by themselves, and
  1243.    to send the "end of attributes" attribute only after all attributes that
  1244.    could possibly have been sent, were sent, provided at least one was sent.
  1245.  . Changed the protocol engine to keep calling sattr() until it says it has
  1246.    nothing left to send.
  1247. ckcker.h, ckcpro.w, ckcfn3.c, 6 Sep 97.
  1248.  
  1249. Changed rpar() to not send I or S packets (or their ACKs) that are longer than
  1250. what the other Kermit asked for, again calling the new maxdata() function to
  1251. find out the length.  The parts that are chopped off from the end have their
  1252. corresponding settings defaulted automatically, overriding whatever the user
  1253. might have asked for.  ckcfns.c, 6 Sep 97.
  1254.  
  1255. What about F packets in this context? -- if a filename is too long, it is
  1256. simply truncated (in both the F/X packet and its ACK); there is no way in the
  1257. protocol to have continued file headers.  We could conceivably strip any
  1258. path info, but that would not always solve the problem, and anyway the user
  1259. can control this with a command.
  1260.  
  1261. Added a new system-dependent routine to ckutio.c: ttspdlist().  It returns a
  1262. list of speeds (as long ints) that are supported on the platform where
  1263. C-Kermit is being compiled.  Then in cmdini() we call this routine and build
  1264. our "set speed" keyword table on the fly when the program starts.  This
  1265. eliminates (just for UNIX at first) the prebuilt speed keyword table with all
  1266. the #ifdefs, and problems keeping the BPS_xxxx symbol definitions in sync with
  1267. the tt[sg]speed() routines in all the ck?tio.c modules.  ckcdeb.h, ckutio.c,
  1268. ckuus3.c, ckuus5.c, ckcplm.doc, ckccfg.doc, 7 Sep 97.
  1269.  
  1270. Added ttspdlist() for VMS.  ckvtio.c, ckcdeb.h, 7 Sep 97.
  1271.  
  1272. Added modem table entries for Rolm 244PC and 600 series.  ckuusr.h, ckudia.c,
  1273. 10 Sep 97.
  1274.  
  1275. Added SET PRINTER PRINT command switches: /BIDIRECTIONAL, /DOS-DEVICE,
  1276. /FLOW-CONTROL, /OUTPUT-ONLY, /PARITY, /SEPARATOR, /SPEED, /TERMINATOR,
  1277. /TIMEOUT, /WINDOWS-QUEUE.  Only for K95 for now.
  1278. ckuusr.h, ckuus3.c, 10 Sep 97.
  1279.  
  1280. Made SHOW PRINTER show all these things.  ckuus5.c, 10 Sep 97.
  1281.  
  1282. Added SET PRINTER /PIPE:xxx.  ckuusr.h, ckuus3.c, 11 Sep 97.
  1283.  
  1284. Updated HELP SET PRINTER, ckuus2.c, 11 Sep 97.
  1285.  
  1286. Made another attempt at straightening out the CD mess in VMS.
  1287. ckv[ft]io.c, 12 Sep 97.
  1288.  
  1289. Added \v(startup) to UNIX and VMS, ckuus4.c, ckufio.c, 12 Sep 97.
  1290.  
  1291. Debugged VMS changes from 12 Sep.  ckvfio.c, 16 Sep 97.
  1292.  
  1293. Added a reference to SET EXIT to HELP EXIT.  ckuus2.c, 16 Sep 97.
  1294.  
  1295. Corrected various #ifdefs for building with various features deselected.
  1296. ckcpro.w, ckuus6.c, etc, 16 Sep 97.
  1297.  
  1298. ---Alpha.06---
  1299.  
  1300. Put SET TERM { AUTOSCROLL, AUTOPAGE } in #ifdef OS2.  ckuus7.c, 17 Sep 97.
  1301.  
  1302. Put checks for and against modem signals, especially versus hardware flow
  1303. control, into the DIAL command, and also turned off hwfc during dialing
  1304. automatically for AT&T 19x0 modems.  ckuus6.c, 18 Sep 97.
  1305.  
  1306. IF condition keyword was completely out of alphabetical order.  ckuus6.c,
  1307. 18 Sep 97.
  1308.  
  1309. "set host" to numeric IP address should not call gethostbyname() on any
  1310. platform; previously it did this except in Windows.  ckcnet.c, 20 Sep 97.
  1311.  
  1312. Fixes from Jeff to my fixes for RTS/CTS vs dialing from 2 days ago, ckcdeb.h,
  1313. ckudia.c, ckuus6.c, 20 Sep 97.  NOTE: The right way to do this is to add a new
  1314. sys-dependent ttdial() routine, to condition the device for dialing, which
  1315. does not overload the flow parameter; we'll do that later since it must
  1316. involve changing all the ck?tio.c modules.
  1317.  
  1318. Fixes from Jeff to NEW SET PRINTER code for when they give a Windows printer
  1319. name as the final word of the command, rather than as a switch value.
  1320. ckuus3.c, 20 Sep 97.
  1321.  
  1322. Save and restore default or user-requested block check around protocol.
  1323. ckcmai.c, ckcpro.w, 20 Sep 97.
  1324.  
  1325. Change SET WINDOW parsing to give error message for X and Ymodem[-g], and
  1326. changed for ZMODEM to require that window size be a maximum of 64K, and not
  1327. a multiple of 64.  ckuus3.c, 20 Sep 97.
  1328.  
  1329. Changed SET RECEIVE PACKET-LENGTH to be usable only for Kermit protocol.
  1330. In XYZMODEM, if you can change them at all, you have to do it to the sender.
  1331. ckuus7.c, 20 Sep 97.
  1332.  
  1333. Supplied missing error message for junk typed after "CONNECT" and then
  1334. completion was attempted (e.g. "connect xxx<ESC>").  Chained FDB parsing can
  1335. be a bit tricky...  ckuusr.c, 20 Sep 97.
  1336.  
  1337. Make SET SPEED 134.5 and SHOW SPEED for 134.5 work right.  ckuus[34].c,
  1338. 20 Sep 97.
  1339.  
  1340. Fixed UNIX ttspdlist[] not to return two copies of "57600" if _B115200 was
  1341. defined, oops (HPUX only).  ckutio.c, 20 Sep 97.
  1342.  
  1343. Updated UNIX, VMS, etc, BWR and UPD files about lots of stuff.  20 Sep 97.
  1344.  
  1345. VMS CMU/IP fixes from John Santos.  ckvtio.c, ckvker.com, 20 Sep 97.
  1346.  
  1347. New makefile entries for all HP-UX versions from Peter Eichhorn.  20 Sep 97.
  1348.  
  1349. Lots of #ifdef adjusting for building on many platforms with & without various
  1350. features, assorted modules.  Builds OK on SunOS with various feature sets,
  1351. HP-UX 10.20, AIX 4.1, SINIX 5.42, Linux, VMS 5.5, and passes basic runtime
  1352. tests.  20 Sep 97.
  1353.  
  1354. A couple corrections to yesterday's work from Jeff.  ckuus[37].c, 21 Sep 97.
  1355.  
  1356. Changed minor version number from 0 to 1: 6.1.193.  ckcmai.c, 21 Sep 97.
  1357.  
  1358. SET TERM AUTODOWNLOAD wasn't working right in UNIX -- the first packet is
  1359. missed, so we had to wait forever for a timeout before it kicked in.  Not sure
  1360. why it stopped working, but to fix it I changed the hokey mechanism that was
  1361. being used (i.e. throw the packet away and send a NAK) to what I should have
  1362. done in the first place -- put the packet in a global buffer, caching it for
  1363. rpack(), and then actually using the one that kstart() recognized.  Of course
  1364. this wasn't easy in UNIX with the forks and all (no matter wht you want to do,
  1365. the *other* fork is always only place to do it)...  But now it works again,
  1366. and it's much faster.  ckuus4.c, ckucon.c, ckcfn2.c, 21 Sep 97.
  1367.  
  1368. Also removed NAK-sending code from autodown() (the INPUT command autodownload
  1369. handler), ckcfn2.c, 21 Sep 97.
  1370.  
  1371. Fixed VMS version to work with this too (just remove code to send NAK).
  1372. ckvtio.c, 21 Sep 97.
  1373.  
  1374. At the end of a protocol transaction, after we ring the bell, flush stdout --
  1375. otherwise the bell can get queued up for quite a while (e.g. if a file was
  1376. autodownloaded, the bell never rings until the next time you escape back).
  1377. This might also address reports we've had about the file transfer display not
  1378. fully updating itself before returning to the prompt.  UNIX only.  ckuusx.c,
  1379. 21 Sep 97.
  1380.  
  1381. Ctrl-C during autodownload killed the UNIX version of C-Kermit.  This has been
  1382. true since 6.0 was first released.  Fixed in ckuus4.c, 21 Sep 97.
  1383.  
  1384. Added /PROTOCOL: for RECEIVE, still requiring an as-name for XMODEM.
  1385. ckuus6.c, 21 Sep 97.
  1386.  
  1387. Made sure that /PROTOCOL was available for both SEND and RECEIVE even if
  1388. CK_XYZ not defined (in which case it is accepted but does nothing -- i.e.
  1389. protocol remains Kermit), ckuus[r6].c,  21 Sep
  1390.  
  1391. The DG is dead (can't load OS from disk, hard error 0000001), RIP.  21 Sep 97.
  1392.  
  1393. Added addtl msgs for when UNIX C-K can't access dialout device or lockfile.
  1394. ckuus7.c, 22 Sep 97.
  1395.  
  1396. Filled in new speed-setting code for Plan 9.  ckutio.c, 22 Sep 97.
  1397.  
  1398. Now that Ctrl-C out of autodownload doesn't blow C-K away any more, I
  1399. discovered that it does prevent subsequent autodownloads.  After a lot of
  1400. heavy staring, I realized it was because the _apc_command macro is still
  1401. defined.  So I changed the Ctrl-C trap() routine to undefine it, and while
  1402. I was at it, I also had it reset a whole bunch of other protocol-related
  1403. settings by calling a new routine, ftreset(), which can also be called from
  1404. anywhere else when protocol settings need to be restored to their defaults
  1405. (e.g. after dynamic local changes that occurred during file transfer, or
  1406. because of an interrupted file-transfer command that was given with switches).
  1407. ckuusr.h, ckuus[5x].c, 22 Sep 97.
  1408.  
  1409. All the above stuff relative to autodownload broke APC execution in the UNIX
  1410. version of C-Kermit.  Ensured that the upper fork reads stuff from the pipe
  1411. in the same order and number that the lower fork puts the stuff there.  What
  1412. a mess, yuk -- it's so much easier without forks...  ckucon.c, 22 Sep 97.
  1413.  
  1414. Put back hpux500wintcp makefile entry (there's still at least one of them
  1415. out there...)  22 Sep 97.
  1416.  
  1417. Discovered that UNIX C-Kermit would crash upon startup if the current
  1418. directory was not readable.  Fixed in zgtdir(), ckufio.c, 23 Sep 97.
  1419.  
  1420. ---Alpha.07---
  1421.  
  1422. (Actually that last item was done after the Alpha.07 binaries were built,
  1423. a few minutes after the announcement went out...)
  1424.  
  1425. Add /-stripping for URLs in netopen() (K95 only -- we should expand this to
  1426. work for all C-Kermits...)  ckcnet.c, 23 Sep 97.
  1427.  
  1428. The new autodownload code was calling parchk incorrectly, the result being
  1429. that parity was set whenever an autodownload took place, thus (at best)
  1430. slowing down the transfer by as much as 50%, or (at worst) making it fail.
  1431. Fixed in ckcfn2.c, 24 Sep 97.
  1432.  
  1433. ---1.1.14---
  1434. ---1.1.15---
  1435.  
  1436. Broke out separate getpkt() and decode() routines, bgetpkt() and bdecode(),
  1437. for the binary-mode no-parity case, to speed up this very common type of
  1438. transfer.  But the local net is so awful there is no way to tell if it does
  1439. any good.  ckcfns.c, 26 Sep 97.
  1440.  
  1441. Added fflush() to UNIX zsout() if file is ZWFILE (i.e. OPEN WRITE file) to
  1442. make it work better with pipes and FIFO files.  ckufio.c, 4 Oct 97.
  1443.  
  1444. Added SHOW LOGS (broke this out from SHOW FILE, which was getting too long).
  1445. ckuus[r45].c, ckuusr.h, 7 Oct 97.
  1446.  
  1447. Changed SET TRANSFER CRC-ACCUMULATION default from ON to OFF to speed up
  1448. transfers, added display of this setting to SHOW PROTOCOL.  ckcfns.c,
  1449. ckuus4.c, 7 Oct 97.
  1450.  
  1451. Tightened up decode() and getpkt() a bit more, as well as the checksum
  1452. routines.  Still no good way to test given heavy loads on systems and network.
  1453. ckcfn[s2].c, 7 Oct 97.
  1454.  
  1455. Changed exit-warning code to not warn under UNIX if running in background.
  1456. ckuus3.c, 8 Oct 97.
  1457.  
  1458. Adapted Jeff's URL-parsing code in netopen() to work for all versions, not
  1459. just K95, so now SET HOST, TELNET, -J, etc, can accept most forms of URL,
  1460. including the nutty ones from Netscape 4.0.  This is #ifdef'd in CK_URL, which
  1461. is now defined for all by default; -DNOURL overrides.  ckcnet.c, 8 Oct 97.
  1462.  
  1463. Generalized SET { SEND, RECEIVE } PATHNAMES at Peter Eichhorn's suggestion.
  1464. Instead of just ON and OFF, now we also allow ABSOLUTE and RELATIVE.  PATH_xxx
  1465. symbols defined in ckcker.h, new keyword table in ckuus7.c, SHOW FILE shows
  1466. new values.  I also undid the crazy "on means off", "1 - x", etc, and now just
  1467. compare against the symbol values.  ON is still accepted as an invisible
  1468. synonym for ABSOLUTE.  When receiving, if we get a (recognizably) absolute
  1469. pathname, we convert it to relative.  ckcmai.c, ckcfns.c, ckuus[r24567x].c,
  1470. 8 Oct 97.
  1471.  
  1472. Fixed previously unused UNIXOROSK definition.  ckcdeb.h, 8 Oct 97.
  1473.  
  1474. Made a new symbol to enable all the new tuning code, CKTUNING, and defined it
  1475. for all but pdp11, where every byte counts.  So when CKTUNING is defined, it's
  1476. OK to duplicate chunks of code, put it inline, etc, to make file-transfer go
  1477. faster.  Added more tuning code to eliminate function calls & loops in various
  1478. spots -- calculate header checksum inline, call b{decode,getpkt} directly
  1479. rather than from inside decode and getpkt, tighten up b{decode,getpkt}
  1480. themselves.  Define NOTUNING to undo all of this and restore earlier well-
  1481. tested code.  Some of these improvements could also be filtered back into the
  1482. original general-purpose routines...  ckcfns.c, 9 Oct 97.
  1483.  
  1484. Microtuning, cont'd -- more of the same, in spack() and rpack().  Also in
  1485. zinfill() and zoutdump().  Guard potential function calls like debug() and
  1486. logpkt() with if-statements in critical sections, etc.  ckufio.c, ckcfns.c,
  1487. 9 Oct 97.
  1488.  
  1489. There's no good way to test this stuff locally since the effect will be
  1490. noticed only on connections that are so fast that CPU is the bottleneck --
  1491. but the local net here is always saturated, so that never happens.  Still,
  1492. in many trials on an average busy day the new code seems about 50% faster
  1493. than the old.  (We also improve by a factor of 2 if we bypass the Telnet
  1494. server...)
  1495.  
  1496. Filled in COPY (alias CP) command for UNIX.  ckcdeb.h, ckuus6.c, ckufio.c,
  1497. 9 Oct 97.
  1498.  
  1499. Added recursive directory traversal.  For the first cut, this works only
  1500. when a filename of "." is given, as in "send ." or "echo \ffiles(.)".  When
  1501. sending files, this works in conjunction with the various new SET SEND
  1502. PATHNAMES options, and so allows replication of directory trees between like
  1503. file systems.
  1504.  
  1505.  . test unix-to-unix because MSK rejects names unnecessarily (ok)
  1506.  . expand to be more flexible, e.g. "SEND /RECURSIVE *.txt". (ok)
  1507.  . What about VMS?  I think this already works: "SEND [...]*.*".
  1508.  
  1509. Also the relative/absolute pathnames need a lot more work -- what about
  1510. VMS, etc?  Need to:
  1511.  
  1512.  . Make /RECURSIVE imply /PATHNAMES:RELATIVE (ok)
  1513.  . Handle pathnames even when FILE NAMES CONVERTED.  In this case, convert
  1514.    to and from UNIX format.
  1515.  . Handle them when LITERAL - send native VMS (etc) *relative* paths.
  1516.  . Ditto for AOS/VS, etc.  Need to add a new zblah() function for this?
  1517.  . Check #ifdefs (CK_MKDIR, NORECURSE, etc.).
  1518.  
  1519. Added directory-creation entry to transaction log.  NOTE: this required a
  1520. (nonlethal) change to zmkdir().  ckcfns.c, 14 Oct 97.
  1521.  
  1522. SET PRINTER /FILE:xxx parsing improved by Jeff to parse an output filename
  1523. and check accessibility.  ckuus3.c, 14 Oct 97.
  1524.  
  1525. SET NET FILE parsing improved to use cmifi, from Jeff.  Also literal string
  1526. key definitions now handled when saving key definitions.  ckuus7.c, 14 Oct 97.
  1527.  
  1528. Removed "." as an alias for "current directory tree" except in UNIX, where it
  1529. can't possibly mean anything else.  Removed "..." altogether, since it has
  1530. opposite meanings in Windows and VMS.  ckufio.c, 15 Oct 97.
  1531.  
  1532. Added /MATCH-DOT-FILES and /NO-MATCH-DOT-FILES to SET WILD KERMIT.
  1533. ckuus[23].c, ckufio.c, ckcmai.c, 15 Oct 97.
  1534.  
  1535. Added \frfiles, \fdir(), \frdir() to list regular files and directory files,
  1536. flatly or recursively.  Changed \ffiles() to only list regular files.  Each of
  1537. these functions sets up \fnextfile() in the same way, but with a different
  1538. list of files.  In UNIX, these functions match or don't match dot-files
  1539. according to the SET WILD KERMIT /xxx setting.  The recursive functions don't
  1540. recurse when WILD is set to SHELL.  ckuusr.h, ckuus4.c, ckufio.c, 15 Oct 97.
  1541.  
  1542.  * Add another \f?files() function to match both files and dirs ??? (no)
  1543.  * Add help text to ckuus2 (ok).
  1544.  
  1545. Changed UNIX zxpand() to treat a directory name as if it ended in "/*" so now
  1546. "send foo" sends all the files in "foo" if "foo" is a directory, and "send
  1547. /recursive foo" does the same, but recursively.  ckufio.c, 15 Oct 97.
  1548.  
  1549. Added a new top-level token that lets us assign values to variables in a
  1550. somewhat more natural way: "." (shades of Bliss-10).
  1551.  
  1552.  .name = value    is equivalent to   DEFINE name value
  1553.  .name := value   is equivalent to   ASSIGN name value
  1554.  .name ::= value  is equivalent to   EVALUATE value then assign result to name
  1555.  
  1556. There can also be space(s) between "." and the name, and the name can be a
  1557. macro name, a \%{digit,letter} variable, or an array element.  ckucmd.[ch],
  1558. ckuus[r56].c, 16 Oct 97.
  1559.  
  1560. New code from Jeff for recursion in K95.  ckufio.c, 21 Oct 97.
  1561.  
  1562. Increased MAXWLD, SSPACE values in ckufio.c by a lot if BIGBUFOK and DYNAMIC
  1563. are defined.  ckufio.c, 21 Oct 97.
  1564.  
  1565. From Jeff: changed chkvar() not to actually evaluate a potential \f...()
  1566. function, since this can have side effects.  The check for a function is now
  1567. simply if the string matches \f*(*), which is less rigorous than checking if
  1568. it is really a function (e.g. parse the name and look it in the table, etc),
  1569. so this can be beefed up later if necessary.  But it probably won't be, since
  1570. we aren't likely to find files or directories with () in their names.
  1571. ckuus6.c, 21 Oct 97.
  1572.  
  1573. Changed \ffiles() and friends to make a copy of the array created by zxpand(),
  1574. except in K95, where Jeff did this in zxpand/znext themselves (to save space,
  1575. since K95 doesn't have to build lists).  Each call to \ffiles() (or \fdir(),
  1576. etc) frees the previous list (if any) and then allocates a new one dynamically
  1577. of the appropriate size.  With this change it is no longer necessary to copy
  1578. the \ffiles() list to an array before use (as on p.398 of the book).
  1579. ckuus4.c, 21 Oct 97.
  1580.  
  1581. Fixed parsing of SEND /PATHNAMES:xx<DEL> to work right.  ckuusr.c, 21 Oct 97.
  1582.  
  1583. Ditto for { RECEIVE, GET } /PATHNAMES, plus fixed the semantics -- it had
  1584. ON/OFF backward.  ckuus6.c, 21 Oct 97.
  1585.  
  1586. Made max(), min(), and mod() return their argument when given only one.
  1587. ckuus4.c, 21 Oct 97.
  1588.  
  1589. Fixes to K95 DIR command from Jeff.  ckuus6.c, 22 Oct 97.
  1590.  
  1591. Binary-mode file-transfer was sending short files sometimes due to a problem
  1592. trying to hand-optimize repeat-count code in bgetpkt() .  Fixed in ckcfns.c,
  1593. 22 Oct 97.
  1594.  
  1595. Added WHERE command to show where most recent file transfer went.  ckuusr.h,
  1596. ckuus[r2].c, ckcfn[s3].c, ckcpro.w, 22 Oct 97.
  1597.  
  1598. Removed OS2 material from ckufio.c.  23 Oct 97.
  1599.  
  1600. Changed REMOTE QUERY KERMIT to evaluate its operand.  Thus:
  1601.  
  1602.   assign \%c xx
  1603.   remote query kermit files(\%c*)
  1604.  
  1605. asks for the number of files whose names match "xx*".  That is, \%c is
  1606. evaluated locally before the function call is passed to the server.  If you
  1607. want an argument to be evaluated remotely, double the leading backslash:
  1608.  
  1609.   remote assign \%c yy
  1610.   remote query kermit files(\\%c*)
  1611.  
  1612. ckuus7.c, 23 Oct 97.
  1613.  
  1614. Added REDO <command>, synonyms RR and token ^.  Required moving a lot of code
  1615. around in ckucmd.c -- in particular, the code that adds a command to history
  1616. buffer from gtword() to cmcfm() (which makes sense).  Added a new keyword flag
  1617. CM_NOR, meaning that this command should not be added to the history buffer.
  1618. This is used for the REDO command, of course, because otherwise REDO by itself
  1619. (which we would want to re-do the most recent command) would REDO itself
  1620. instead in an infinite loop.  ckucmd.[ch], ckuusr.[ch], ckuus5.c, 25 Oct 97.
  1621.  
  1622. Added /MOVE:xxx and /RENAME:xxx switches to SEND (etc).  These are similar to
  1623. /DELETE, specifying what happens to the source file after it is successfully
  1624. sent, except instead of deleting it, they move it to another place, or give it
  1625. a new name, respectively.  ckuusr.[ch], ckcmai.c, ckcpro.w, 25 Oct 97.
  1626.  
  1627. Added { RECEIVE, GET } /CALIBRATE.  This simply avoids opening incoming files
  1628. or writing anything to them, but still does all the rest -- decoding, etc.
  1629. ckuusr.[ch], ckuus6.c, ckcpro.w, 26 Oct 97.
  1630.  
  1631. Added SEND /CALIBRATE[:n], where n is the number of K to send, default = 1024.
  1632. This makes C-K internally generate its own pseudorandom file data, which is
  1633. about 77% uncompressible by gzip; no function calls, no file accesses.  The
  1634. data is processed normally, however, according text/binary settings, etc, so
  1635. the packets are the same as if the same data was read from a file.
  1636. ckuusr.[ch], ckuusx.c, ckcfn[s3].c, ckcpro.w, 26 Oct 97.
  1637.  
  1638. For now /CALIBRATE is an invisible switch.  It does not fool with packet or
  1639. window sizes, etc.  Maybe later.  All calibration code is in #ifdef CALIBRATE,
  1640. which is defined for all but CK_SMALL builds in ckcdeb.h.
  1641.  
  1642. Discovered that if a switch that does not take an argument is given an
  1643. argument anyway, e.g. /BINARY:foo, that the ":" or "=" would be treated as a
  1644. space and the argument would be treated as the first non-switch field.  Fixed
  1645. in ckuus[r6].c, 26 Oct 97.
  1646.  
  1647. Discovered that SEND switch table had some entries out of order, which
  1648. interfered with completion.  Fixed in ckuusr.c, 26 Oct 97.
  1649.  
  1650. If BIGBUFOK is defined, then also define IFDEBUG automatically.  If memory
  1651. is not scarce, then compile in all those if-tests to save thousands of
  1652. function calls when the debug log is not open.  ckcdeb.h, 26 Oct 97.
  1653.  
  1654. Added SEND /LIST:filename.  The named file contains a list of filenames to
  1655. be sent.  ckuusr.[ch], ckcfns.c, 26 Oct 97.
  1656.  
  1657. Whenever the /AS-NAME switch was used, the SEND parsing code could assign a
  1658. variable to point at a malloc'd buffer, which is later freed, but the variable
  1659. would still refer to it, potentially causing all sorts of problems later.
  1660. And some other problems like that.  Fixed in ckuusr.c, 26 Oct 97.
  1661.  
  1662. Looked into adding support for filenames (or other fields) enclosed in
  1663. doublequotes, but it didn't work after a few stabs so I gave up.
  1664.  
  1665. Added peak transfer rate to the STATISTICS display.  ckuus[x4].c, 26 Oct 97.
  1666. It only works when in local mode and FILE DISPLAY is FULL or CRT, otherwise
  1667. the per-packet CPS calculation code is not called.
  1668.  
  1669. A new variable, reliable, is set when (a) we make a connection on a reliable
  1670. network, such as TCP/IP, or (b) we start C-Kermit with the new -I (uppercase)
  1671. switch (mnemonic: I = Internet).  When this variable is set, we add a fudge
  1672. factor to the ttinl() timeout, since it normally should not need to time out.
  1673. ckuusy.c, ckcmai.c, ckcfn2.c, ckuus7.c, 26 Oct 97.
  1674.  
  1675. Made local-mode transfer display completion message a little more standoutish:
  1676. SUCCESS or FAILURE in big letters.  ckuusx.c, 26 Oct 97.
  1677.  
  1678. Fix from Jeff for changes to command recall.  ckucmd.c, 27 Oct 97.
  1679.  
  1680. Various fixes to calibration mode.  Missing thermometer in some cases,
  1681. improvements in random-file-generating code, various stats were not being
  1682. updated, etc, because it wasn't a real file, GET /CAL would say it failed when
  1683. it didn't, { GET, RECEIVE } /CAL filename was lost, SEND /CAL bytecount was
  1684. off, etc.  ckcpro.w, ckcfn3.c, 27 Oct 97.
  1685.  
  1686. Don't accumulate peak transfer rate until after the initial excitement has
  1687. settled down.  When sending, this is after the first windowful of packets has
  1688. gone out.  When receiving, just wait till after the 10th packet to get past
  1689. the slow-start effect.  ckuusx.c, 27 Oct 97.
  1690.  
  1691. Changed default statistics display to /BRIEF, and added a /VERBOSE switch
  1692. for greater detail.  ckuus[r4].c, 27 Oct 97.
  1693.  
  1694. Tightened up bdecode() even further by eliminating additional cases it will
  1695. never see.  ckcfns.c, 27 Oct 97.
  1696.  
  1697. Discovered that screenc() could skip updating the percent done, etc, in some
  1698. (rare) cases at the end of a file, so the file transfer would be complete, but
  1699. the display would show less than 100%.  Fixed in ckuusx.c, ckcfn3.c, 27 Oct 97.
  1700.  
  1701. Increased uncompressibility of /CAL data stream to over 90% and also gave it a
  1702. random seed so it will generate different data streams, but with the same
  1703. uncompressibility.  ckcfns.c, 28 Oct 97.
  1704.  
  1705. Fix from Jeff for SET LINE, which under some circumstances might get clobbered
  1706. when user types CR.  Not sure if this problem appeared in any released
  1707. version or was caused by recent edits.  ckuus7.c, 28 Oct 97.
  1708.  
  1709. Changed zopeno() to set the output file (when receiving a file during file
  1710. transfer) to O_NONBLOCK.  On some systems, including the one we mostly use
  1711. here, disk writes can be very slow -- there is no cache.  The same would be
  1712. true if writing to a slow disk, floppy, etc.  It's not clear to me yet how
  1713. errors are reported back if they occur -- presumably on the next write() call?
  1714. Preliminary measurements seem to show some improvement.
  1715.  
  1716. New command-line option, G, which is like g (GET), but sends result to stdout.
  1717. Use, for example, to suck files up for printing to the remote from the local
  1718. via autoupload:
  1719.  
  1720.   kermit -G oofa.txt | lpr
  1721.  
  1722. ckuusy.c, 29 Oct 97.
  1723.  
  1724. A couple micro-optimizations to ttinl, but it's already just about as
  1725. tight as it can be.  ckutio.c, 29 Oct 97.
  1726.  
  1727. Poked at zoutdump() some more.  Took out the fflush, and made it allow for
  1728. the possibility that write() might write less than asked.  ckufio.c, 29 Oct 97.
  1729.  
  1730. Added CRC to STATISTICS display.  ckuus4.c, 29 Oct 97.
  1731.  
  1732. Changed name of openx() to ckopenx() to avoid conflict in AIX.
  1733. ckcpro.w, ckcfn3.c, ckcker.h, 29 Oct 97.
  1734.  
  1735. More fallout from REDO -- a failing command was no longer entered into the
  1736. scrollback buffer, which is a major pain, because that's one of its major uses.
  1737. Fixed in ckucmd.c, ckuus5.c, 29 Oct 97.
  1738.  
  1739. Fixed the "def \%a 12:00:00, pause \%a" problem.  ckuus6.c, 29 Oct 97.
  1740.  
  1741. Added \v(printer).  ckuusr.h, ckuus4.c, 29 Oct 97.
  1742.  
  1743. Fixed parsing error in SET PRINTER <esc> (non-OS2).  ckuus3.c, 29 Oct 97.
  1744.  
  1745. Added invisible SET FILE OUTPUT { [UN]BUFFERED [ size ], [NON]BLOCKING } and
  1746. filled it in for UNIX.  It's only for experimentation, and users shouldn't be
  1747. told about it unless it can get them out of a jam, and there's no way to
  1748. display the settings, but they do show up in the debug log.  The optional size
  1749. parameter can be given after BUFFERED or UNBUFFERED to control the size of
  1750. C-K's internal file output buffer, zoutbuffer.  This can be any number at all,
  1751. even 1.  ckuusr.h, ckuus7.c, ckufio.c.  29 Oct 97.
  1752.  
  1753. Went public with SET FILE OUTPUT -- made it visible, added HELP and SHOW, made
  1754. it UNIX-only.  ckuus[247].c.  30 Oct 97.
  1755.  
  1756. Some initial work on automatic arrays, not done yet.  Must fill in pusharray(),
  1757. then add poparray().  ckuu5.c, 30 Oct 97.
  1758.  
  1759. Fixes to command parser from Jeff: partial filename completion, and case
  1760. insensitivity of filenames in OS/2.  ckucmd.c, 1 Nov 97.
  1761.  
  1762. Added automatic arrays.  ckuus5.c, 1 Nov 97.
  1763.  
  1764. Added "reliable" display to SHOW COMM.  ckuus4.c, 1 Nov 97.
  1765.  
  1766. Added \v(escape), \frandom(max), \fdirname(filespec).
  1767. ckuusr.h, ckuus4.c, 1 Nov 97.
  1768.  
  1769. Discovered that the UNIX code to make output file unbuffered wasn't working at
  1770. all because fcntl() was being called with a file pointer instead of a file
  1771. descriptor.  Fixed in ckufio.c, 2 Nov 97.
  1772.  
  1773. Moved outbound pathname handling into a new function nzltor(), which is like
  1774. zltor(), but has two more arguments: filename conversion flag (fncnv) and
  1775. send-pathnames value (fnspath).  This is done within #ifdef NZLTOR..#endif.
  1776. NZLTOR is defined for UNIX and VMS.  In the mainline code, we now call this
  1777. routine always, rather than only under certain conditions (if NZLTOR is
  1778. defined; otherwise we keep the old code).  ckcdeb.h, ckcfns.c, ckcplm.doc,
  1779. 2 Nov 97.
  1780.  
  1781. The nzltor() function must handle six cases:
  1782.  
  1783.   SEND PATHNAMES {OFF,RELATIVE,ABSOLUTE} times FILE NAMES {CONVERTED,LITERAL}
  1784.  
  1785. The new prototype is:
  1786.  
  1787.   nzltor(char * name, char * outbuf, int fncnv, int fnspath, int max);
  1788.  
  1789. zltor() was converted to a stub which calls nzltor() with the appropriate
  1790. arguments in case anybody calls it by mistake.
  1791.  
  1792. VMS zltor() calls (static) parse_fname(), which luckily already gets the
  1793. various pieces of the filespec separately (node, device, directory, name,
  1794. extension, and version), and so handles its job by shuffling the new args
  1795. internally and adding a lot of creative string toodling.  A VMS expert could
  1796. no doubt do the same with system calls.  ckvfio.c, 2 Nov 97.
  1797.  
  1798. UNIX zltor was also made into a stub; nzltor simply adds the appropriate calls
  1799. to zstrip, zfnfqp, etc, to handle the pathnames, and then goes on to do what
  1800. it used to do.  ckufio.c, 2 Nov 97.
  1801.  
  1802. This was tested in UNIX by cd'ing to ~/tmp and giving "send blah/oofa.txt"
  1803. commands with all combinations of SET FILENAMES and SET SEND PATHNAMES, and
  1804. similarly in VMS with "set default [fdc], send [.blah]oofa.txt].  Results:
  1805.  
  1806. FILENAMES   SEND PATHNAMES  UNIX Result               VMS Result
  1807.  CONVERTED   OFF             OOFA.TXT                  OOFA.TXT
  1808.  CONVERTED   RELATIVE        BLAH/OOFA.TXT             BLAH/OOFA.TXT
  1809.  CONVERTED   ABSOLUTE        /W/FDC/TMP/BLAH/OOFA.TXT  /FDC/BLAH/OOFA.TXT
  1810.  LITERAL     OFF             oofa.txt                  OOFA.TXT
  1811.  LITERAL     RELATIVE        blah/oofa.txt             [.BLAH]OOFA.TXT
  1812.  LITERAL     ABSOLUTE        /w/fdc/tmp/blah/oofa.txt  [FDC.BLAH]OOFA.TXT
  1813.  
  1814. All of this works very nicely with existing features like "who am i"
  1815. (automatic switching to literal filenames between like systems, etc).
  1816.  
  1817. NOTES: In VMS, we always strip the node::, device:, and ;version, even when
  1818. file names are literal.
  1819.  
  1820. STILL TO DO: The other direction, nzrtol().  Its calling conventions will be
  1821. extended by the same kind of integer args: name conversion on/off, receive
  1822. pathname setting, and max length for result.
  1823.  
  1824. From Jeff: clear network buffers before starting an Rlogin session.  ckcnet.c,
  1825. 3 Nov 97.
  1826.  
  1827. Lots of changes relating to detection of connection loss before or
  1828. during file transfer.  Many modules, 3 Nov 97.
  1829.  
  1830. K95 prompt now shows forward slashes in directory name, from Jeff, ckuus5.c,
  1831. 4 Nov 97.
  1832.  
  1833. Save and restore many more variables around file transfer -- packet length,
  1834. etc, from Jeff, and then fixes to same.  ckuus[r6x].c, 4 Nov 97.
  1835.  
  1836. Change name of BeBox terminal from BeOS-ANSI to BeTerm, but leave old name
  1837. there invisibly.  ckuus7.c, 4 Nov 97.
  1838.  
  1839. Fix autodownload Kermit packet detector to ignore parity.  ckcfn2.c, 4 Nov 97.
  1840.  
  1841. Added SET OUTPUT SPECIAL-ESCAPES { ON, OFF } to turn on/off special processing
  1842. of \N, \B, and \L.  Added this to HELP and SHOW SCRIPTS, plus a new SHOW
  1843. OUTPUT command.  ckuusr.h, ckuus[r235].c, 4 Nov 97.
  1844.  
  1845. Jeff found a place in the protocol module where the input file is not closed
  1846. (if sdata() returns an error indicating the connection dropped).  ckcpro.w,
  1847. 4 Nov 97.
  1848.  
  1849. Fixes to OS/2 from Jeff for previously unhandled socket errors.  ckcnet.c,
  1850. 4 Nov 97.
  1851.  
  1852. Added SET { SEND, RECEIVE } NEGOTIATION-STRING-MAX-LENGTH <number> as a last
  1853. resort for making C-K talk with buggy Kermit implementations on the other
  1854. side that don't expect the init string to be longer than a certain length, or
  1855. that don't handle parameters after a certain length correctly.  It's invisible
  1856. and undocumented, for use only by help desk when confronted with desperate
  1857. callers who absolutely have to exchange files with a buggy BBS, etc.
  1858. ckuus7.c, ckcfns.c, 4 Nov 97.
  1859.  
  1860. Changed ttinl(), when in local mode, to check for console interruptions and
  1861. return -1 if there is something waiting in the console buffer (Jeff's idea),
  1862. to make for snappier response to file-transfer interruption characters.
  1863. ckutio.c, 4 Nov 97.  But then commented this out, since it's at least an extra
  1864. function call and system call per packet, and the response to keyboard
  1865. interruptions on fast connections is pretty fast anyway.  Can revisit this
  1866. later after further experimentation.
  1867.  
  1868. Changed ttchk() to always check first if we have an open connection and if
  1869. not, to return -2.  ckutio.c, 4 Nov 97.
  1870.  
  1871. Changed doconect() to use ttchk() to check if the connection is open.
  1872. ckuus4.c, 4 Nov 97.
  1873.  
  1874. Changed ttinl() and ttol() to return -3 when they detect a broken connection.
  1875.  
  1876. Went through all of the ckcfn*.c and ckcpro.w modules and made sure that every
  1877. call to rpack() and spack() had its return code checked and then did the
  1878. appropriate thing when it was < 0 (and, in particular, when < -1).  Tested by
  1879. making a Telnet connection, starting uploads and downloads, and then killing
  1880. the job on the far end during the transfer.  Now, for the first time, this
  1881. makes the file transfer either quit right away, or else within one timeout
  1882. interval, and the appropriate message is printed on the display, and the
  1883. transfer fails.  Once the failure was propagated up to the protocol state
  1884. machine, two more actions were needed to distinguish the cases where the
  1885. connection dropped when a file was open, versus when no file was open.
  1886. ckcfn[s23.c], ckcpro.w, 4 Nov 97.
  1887.  
  1888. Evidently there are places where we call command parsing routines with
  1889. constant strings as defaults, and then later attempt to write into those
  1890. strings (e.g. to strip braces, trim blanks, etc).  This was addressed by
  1891. making an internal copy of the default string and using that instead.
  1892. ckucmd.c, 4 Nov 97.
  1893.  
  1894. Fixed command-file reader to be tolerant of lines that end with bizarre
  1895. strings of control characters like ^M^M^J.  ckuus5.c, 4 Nov 97.
  1896.  
  1897. Added nrztol() for UNIX, moving lots of inappropriate code from rcvfil() to
  1898. it (with #ifdef NZLTOR..#endif).  ckcfns.c, ckufio.c, 5 Nov 97.
  1899.  
  1900. Added nrztol() for VMS.  ckvfio.c, 5 Nov 97.
  1901.  
  1902. Results for VMS receiving files, current directory is [FDC.TMP]:
  1903.  
  1904. Receive     File
  1905. Pathnames   Names      Incoming Name       Saved as
  1906.  OFF         CONVERTED  OOFA.TXT            [FDC.TMP]OOFA.TXT
  1907.  OFF         CONVERTED  oofa.txt            [FDC.TMP]OOFA.TXT
  1908.  OFF         CONVERTED  /foo/bar/oofa.txt   [FDC.TMP]OOFA.TXT
  1909.  OFF         CONVERTED  [foo.bar]oofa.txt   [FDC.TMP]OOFA.TXT
  1910.  RELATIVE    CONVERTED  OOFA.TXT            [FDC.TMP]OOFA.TXT
  1911.  RELATIVE    CONVERTED  bar/oofa.txt        [FDC.TMP.BAR]OOFA.TXT     (*)
  1912.  RELATIVE    CONVERTED  [.bar]oofa.txt      [FDC.TMP.BAR]OOFA.TXT     (*)
  1913.  RELATIVE    CONVERTED  /foo/bar/oofa.txt   [FDC.TMP.FOO.BAR]OOFA.TXT (*)
  1914.  ABSOLUTE    CONVERTED  /foo/bar/oofa.txt   [FOO.BAR]OOFA.TXT         (*)
  1915.  ABSOLUTE    CONVERTED  [foo.bar]oofa.txt   [FOO.BAR]OOFA.TXT         (*)
  1916.  
  1917. (*) The indicated directory or subdirectory, one or more levels,
  1918.     is automatically created if allowed, otherwise the transfer fails.
  1919.  
  1920. Note: It turns out to be easy to recognize the directory format in incoming
  1921. packets, and so the FILE NAMES { CONVERTED, LITERAL } setting is not actually
  1922. so important, except if we care about case conversion.  We only need to detect
  1923. the native and UNIX pathname formats -- see VMS nzrtol() in ckvfio.c.
  1924.  
  1925.   This must still be done for OS/2.  After OS/2 part is done, a chunk
  1926.   of #ifdef OS/2 can be removed from the "not NZLTOR" part of rcvfil.
  1927.  
  1928. Fixed isabsolute() for VMS.  ckcmai.c, 5 Nov 97.
  1929.  
  1930. Added IF ABSOLUTE to test if a filename is absolute or relative.  The file
  1931. need not exist.  ckuusr.h, ckuus6.c, 5 Nov 97.
  1932.  
  1933. After all this:
  1934.  
  1935.  . I can transfer a directory tree UNIX-to-UNIX by telling the sender to
  1936.    "send /pathnames:relative /recursive *" and the receiver to
  1937.    "receive /pathnames:relative".  The entire directory tree is transferred
  1938.    quickly and quietly, and replicated on the other side.
  1939.  
  1940.  . Ditto from UNIX to VMS!
  1941.  
  1942.  . VMS to UNIX works too, but it's still a bit flaky.  In VMS you have to say:
  1943.    send /pathnames:rel /filenames:converted [...]*.*".
  1944.  
  1945. So hurray, transferring directory trees between unlike platforms.
  1946.  
  1947. From Jeff: peakcps should only be reset once per transaction; cps/peakcps
  1948. should be calculated and saved when File Display is None or CRT; thermometer
  1949. pct should not be set to 100% if we are discarding the file.  ckuusx.c,
  1950. 6 Nov 97.
  1951.  
  1952. Made /RECURSIVE un-invisible for VMS and AOS/VS, since their native
  1953. recursive wildcards work fine.  In these cases, /RECURSIVE is only informative
  1954. and really translates to /PATHNAMES:RELATIVE.  (But I didn't actually migrate
  1955. any of the pathnames-handling code to AOS/VS yet, did I?)  ckuusr.c, 6 Nov 97.
  1956.  
  1957. Figured out why VMS-to-UNIX recursive transfers didn't seem to be working
  1958. right: SEND (and RECEIVE) /PATHNAMES:<not-OFF> was setting FILE NAMES to
  1959. LITERAL, which as needed before we made the new nz[rl]to[lr]() routines; fixed
  1960. by #ifdefing.  ckuus[r6].c, 6 Nov 97.
  1961.  
  1962. Various fixes to VMS nz[rl]to[lr](), including some long-standing problems
  1963. such as the inability to accept files whose names contain multiple periods.
  1964. Now it all works pretty well.  nrztol() now changes spaces and tildes into
  1965. underscore, other nonprintables into dollar signs -- much more readable in VMS
  1966. than changing everything to X, and as for dots:
  1967.  
  1968.  a.b.c.1 becomes a_b.c;1 (when only digits follow the last dot)
  1969.  a.b.c.d becomes a_b_c.d (otherwise)
  1970.  
  1971. and VMS is happy.  ckvfio.c, 6 Nov 97.
  1972.  
  1973. Added /SINCE as an invisible synonym for /AFTER since I type it all the time.
  1974. ckuusr.c, 6 Nov 97.
  1975.  
  1976. Changed -L switch to also SET SEND PATHNAMES RELATIVE.  ckuusy.c, 6 Nov 97.
  1977.  
  1978. Filled in MKDIR for VMS, and made MDKDIR and RMDIR for other platforms
  1979. print appropriate error messages when they fail.  ckuusr.c, 6 Nov 97.
  1980.  
  1981. Made blind stabs at implementing RMDIR in VMS.  Finally I gave up on doing
  1982. it using any APIs, since I haven't a clue, and just used system() commands.
  1983. Crude but effective.  Note: in VMS, we have to change the directory name
  1984. [a.b.c] into a filename [a.b]c.dir;1, change its protection to allow deletion,
  1985. and then delete it, which only works if it's empty.  If it can't be deleted,
  1986. all sorts of error messages spew out.  Needs to be replaced by somebody who
  1987. knows the actual VMS API for deleting a directory.  ckvfio.c, 6 Nov 97.
  1988.  
  1989. Added zrmdir() for UNIX.  #defined ZRMDIR symbol in ckcdeb.h for all platforms
  1990. that have a zrmdir() function (UNIX and VMS so far).  Changed RMDIR command
  1991. to use it.  ckufio.c, ckcdeb.h, ckuusr.c, 6 Nov 97.
  1992.  
  1993. zmkdir() was already there for UNIX, VMS, etc.  I fixed it so it could be
  1994. called to create directories, as you might expect.  Its previous use expected
  1995. a complete filespec, including a filename.  But this was not required for VMS,
  1996. and in UNIX the way to not require it is to make sure the string that is
  1997. passed to it ends with a directory separator.  Changed the MKDIR command to
  1998. do this.  ckuusr.c, 6 Nov 97.  Slightly reworded the zmkdir description in
  1999. ckcplm.doc.
  2000.  
  2001.   (This is all groundwork for adding REMOTE MKDIR and REMOTE RMDIR, but
  2002.   that's not done yet.)
  2003.  
  2004. "msend <nonexistent-file><SP>" caused a parsing foulup.  Fixed in ckucmd.c,
  2005. 7 Nov 97.
  2006.  
  2007. Added all the new switches to the MSEND table.  ckuusr.c, 7 Nov 97.
  2008.  
  2009. Changed ?-help to add a directory separator at the end of a filename (except
  2010. in VMS) if the file is a directory, so you can tell by looking at the list
  2011. what's what.  ckucmd.c, 7 Nov 97.
  2012.  
  2013. Fix from Jeff to catch disk-write errors during file reception, bdecode()
  2014. (I left out an automatic variable declaration so a global variable of the same
  2015. name, but different type, was being used).  ckcfns.c, 7 Nov 97.
  2016.  
  2017. Added a 3rd arg to ckmatch() to say whether to ignore case in string
  2018. comparisons, and then in places where we are using it to match filenames, to
  2019. be case-sensitive or not depending on the underlying file system (like in SEND
  2020. /EXCEPT in UNIX vs DOS), and to ignore case in other pattern-matching
  2021. applications (e.g. REDO, SHOW VARIABLES *FOO*), regardless of the file system.
  2022. ckcker.h, ckcmai.c, ckucmd.c, ckcfns.c, ckuus[56].c, 7 Nov 97.
  2023.  
  2024. Added automatic per-file text/binary mode switching based on filename
  2025. pattern recognition, all within #ifdef PATTERNS..#endif.  7 Nov 97.
  2026.  
  2027. Commands:
  2028.  . SET FILE PATTERNS { ON, OFF }
  2029.  . SET FILE { BINARY-PATTERN, TEXT-PATTERN } [ <pattern>  [ <pattern> ... ] ]
  2030.  
  2031. Files:
  2032.  . ckcker.h - symbol defs & max number of patterns (64)
  2033.  . ckuusr.h - change name of shoparf to shofil (it was annoying me)
  2034.  . setfil, ckuus7.c - parse the command, set up the pattern lists
  2035.  . shofil, ckuus4.c - show the lists
  2036.  . gnfile, ckcfns.c - declare use the lists (via calls to ckmatch())
  2037.  . ckuus2.c - "help set file" text
  2038.  . ckermit2.upd - docs, mainly section 4.3, others updated too.
  2039.  
  2040. NOTE: Needed for VMS: permissions.
  2041.  
  2042. A couple fixes to yesterday's stuff from Jeff: ckuus2.c, ckucmd.c, 8 Nov 97.
  2043.  
  2044. Added { ADD, REMOVE } { BINARY-PATTERNS, TEXT-PATTERNS }.  Redid the lists to
  2045. be more dynamic and free()-safe.  Added SHOW PATTERNS, with a nice display,
  2046. and redid SHOW FILE to refer to SHOW PATTERNS.  (I also added { ADD, REMOVE }
  2047. SEND-LIST, but didn't fill it in.)  Added lots more patterns to default lists.
  2048. Made SET FILE TYPE LABELED override filename pattern-matching.  ckcmai.c,
  2049. ckcfns.c, ckuus[457].c, ckermit2.upd, 8 Nov 97.
  2050.  
  2051. "delete dir/file" didn't work for some reason in UNIX.  Changed dodel() to be
  2052. a little less confusing with its use of line[] and tmpbuf[].  Then I changed
  2053. the UNIX version to use Jeff's loop.  But all the messages were annoying so I
  2054. added /VERBOSE and /QUIET switches, making the latter the default for UNIX,
  2055. and cleaned up the output when /VERBOSE is set.  ckuus6.c, 8 Nov 97.
  2056.  
  2057. Started to add code to prevent client from sending a BYE or FINISH when it
  2058. had already done so on the same connection, but the risk outweighs the
  2059. benefit.  Maybe some other time.  8 Nov 97.
  2060.  
  2061. Fixed a bug I introduced in VMS zrtol() at the last minute on Nov 6, which had
  2062. extra filename dots being converted to underscores even after we had scanned
  2063. backwards into the directory name.  ckvfio.c, 8 Nov 97.
  2064.  
  2065. Added a second arg to gfmode() (get file mode) to tell it to return its result
  2066. in upper or lower case, adjusted the prototype and all references, removed
  2067. various chunks of redundant code.  ckuusr.h, ckuus[r56].c, 8 Nov 97.
  2068.  
  2069. Added client end of REMOTE MKDIR and REMOTE RMDIR.  ckuusr.[ch], ckuus7.c,
  2070. 8 Nov 97.
  2071.  
  2072. Increased number of patterns to 256 if BIGBUFOK.  ckcker.h, 9 Nov 97.
  2073.  
  2074. Made "remo" an acceptable abbreviation for "remote".  ckuusrc., 9 Nov 97.
  2075.  
  2076. Fixes from Jeff to yesterday's code: ckucmd.c, ckuus5.c, 9 Nov 97.
  2077.  
  2078. From Jeff: don't check text patterns if already in text mode; ditto for binary,
  2079. ckcfns.c, 9 Nov 97.
  2080.  
  2081. Don't bother trying to send FINISH or BYE command when in local mode and
  2082. there is no connection.  ckcpro.w, 9 Nov 97.
  2083.  
  2084. Made sure that RESUME and SERVER macros in protocol module set all counters,
  2085. packet numbers, etc, back to 0.  ckcpro.w, 9 Nov 97.
  2086.  
  2087. Disabled automatic file type switching during RESEND.  ckcfns.c, 9 Nov 97.
  2088.  
  2089. Updated ckuker.bwr and ckermit.bwr.  9 Nov 97.
  2090.  
  2091. Discovered that when the C-Kermit server got a REMOTE DELETE command for
  2092. a directory (rather than a file), it did terrible things.  Added a check
  2093. against this in ckcpro.w, 9 Nov 97.
  2094.  
  2095. Moved some prototype declarations around in ckcpro.w to alleviate possible
  2096. problems with "declarations out of scope" noticed by some picky ANSI compilers.
  2097. ckcpro.w, 9 Nov 97.
  2098.  
  2099. Moved code out of MKDIR command in ckuusr.c to a new function, ckmkdir(), that
  2100. can be called from the command parser or during protocol, and similarly for
  2101. RMDIR.  ckcker.h (prototypes), ckuusr.c, ckcfn3.c, 9 Nov 97.
  2102.  
  2103. Added EN_MKD and EN_RMD symbols in ckuusr.h, and corresponding en_mkd and
  2104. en_rmd variables.  ckuusr.h, ckcmai.c, 9 Nov 97.
  2105.  
  2106. Added server end of REMOTE MKDIR & RMDIR.  ckcpro.w, ckcfn3.c, 9 Nov 97.
  2107. Added ENABLE/DISABLE MKDIR/RMDIR commands.  ckuus[56].c, 9 Nov 97.
  2108. Added help for above.  ckuus2.c, 9 Nov 97.
  2109. Added info for above to SHOW SERVER.  ckuus5.c, 9 Nov 97.
  2110.  
  2111. Should make server-side CD accept UNIX-style pathnames too (at least in
  2112. VMS).
  2113.  
  2114. There are still a few problems with REMOTE DIRECTORY, etc.  For example,
  2115. if pathnames are off, "remote directory foo/*" strips the "foo/".  But
  2116. that's what it should do.  But it seems to do it also when pathnames are on.
  2117.  
  2118. VMS difficulty with SEND /MAIL using:
  2119. system("$ mail %s %s/subj=\"Enclosed file %s\"")
  2120.  
  2121. Juggled things a bit in the got-E-packet section of the protocol module to try
  2122. (again) to ensure that file-transfer display does not say "100%" if a transfer
  2123. is canceled by an E-packet.  ckcpro.w, ckuusx.c, 10 Nov 97.
  2124.  
  2125. Added yet another level of file-type saving and restoring to allow gnfile() to
  2126. use prevailing transfer mode (as set by user, or as overridden by "whoami"
  2127. negotiation) for files it fails to identify by name pattern.  So now we have
  2128. three levels to save and restore: what the user said ("set file type"), the
  2129. "whoami" type (which persists throughout a transaction), and a per-file type
  2130. based on automatic file type recognition.  gnf_binary, ckcfns.c, 10 Nov 97.
  2131.  
  2132. Added /SUBDIRECTORIES as an invisible synonym for /RECURSIVE.  ckuus[r6].c,
  2133. 10 Nov 97.
  2134.  
  2135. I just sent an E-packet.  I'm in local mode, I was receiving a file, I'm not a
  2136. server, and sliding windows are in use.  Therefore, there are likely to be a
  2137. bunch of packets already "in the pipe" on their way to me by the time the
  2138. remote sender gets the E-packet.  So the next time I CONNECT or try to start
  2139. another protocol operation, I am likely to become terribly confused by
  2140. torrents of incoming material.  To prevent this, a loop was added to errpkt()
  2141. to soak up packets from the connection until there is an error or timeout.
  2142. ckcfn2.c, 10 Nov 97.
  2143.  
  2144. Another try at getting better error screens when an E-packet is received.
  2145. ckcfn[s23].c, 10 Nov 97.
  2146.  
  2147. Make { ADD, REMOVE } patterns be case independent/sensitive according to
  2148. the underlying file system.  ckuusr.c, ckermit2.upd, 10 Nov 97.
  2149.  
  2150. Made K95 default patterns lowercase rather than upper.  ckcmai.c, 10 Nov 97.
  2151.  
  2152. ---Alpha.08---
  2153.  
  2154. Streaming prototype & proof of concept, 12 Nov 97 (to be described later)
  2155. (if you stumble on it, don't try to use it).
  2156.  
  2157. Fixed VMS ttchk() to detect connection loss the same way the UNIX and OS/2
  2158. versions do.  ckvtio.c, 13 Nov 97.
  2159.  
  2160. Added missing prototype for cmaddnext().  ckucmd.h, 13 Nov 97.
  2161.  
  2162. Protected a couple unguarded references to no_recall by #ifdef CK_RECALL.
  2163. ckucmd.c, 13 Nov 97.
  2164.  
  2165. Removed unguarded references to binpatterns[] and txtpatterns[] from
  2166. doadd().  ckuusr.c, 13 Nov 97.
  2167.  
  2168. Added missing VOID to VMS declaration of nzrtol().  ckvfio.c, 13 Nov 97.
  2169.  
  2170. Removed spurious "(-1)" from VMS nzltor() return.  ckvfio.c, 13 Nov 97.
  2171.  
  2172. Supplied missing printf() argument in ADD command.  ckuusr.c, 13 Nov 97.
  2173.  
  2174. Added instructions for defining new network types to ckcplm.doc.  13 Nov 97.
  2175.  
  2176. Support for IRIX 6.2 from Ric Anderson.  Many modules, 13 Nov 97.
  2177.  
  2178. Got rid of call to time(0) in ckcmai.c as a random number seed, to avoid
  2179. yet another avalanche of #ifdefs, and called gtimer() instead, which is
  2180. already well-defined in ck?tio.c.  ckcmai.c, 13 Nov 97.
  2181.  
  2182. Changed UNIX version to strip off leading "./" or "../" from outbound
  2183. pathnames, no matter what the SEND PATHNAMES setting is.  ckufio.c, 13 Nov 97.
  2184.  
  2185. Fixed SHOW VERSIONS to state version numbers and dates consistently.
  2186. Many modules, 13 Nov 97.
  2187.  
  2188. Corrected some typos in ckermit2.upd, 13 Nov 97.
  2189.  
  2190. ---Alpha.09---
  2191.  
  2192. Revived my DG mini.  Of course its compiler found several glitches that none
  2193. of the others revealed: extern declarations for variables that were never
  2194. defined anywhere, prototypes for static functions in header files, a reference
  2195. to zzstring in a cmtxt call instead of xxstring, and a backwards #ifdef NZLTOR
  2196. construction.  After fixing these, I successfully built the AOS/VS version.
  2197. ckuus[r35].c, ckcfn3.c, 14 Nov 97.
  2198.  
  2199. Based on logs from Carl Friedberg and Mike Freeman, found the spot where
  2200. file transfers on outbound VMS LAT connections were being inhibited and fixed
  2201. it (always remember: ttyfd is valid in VMS only on TCP/IP connections).
  2202. cncfn2.c, 17 Nov 97.
  2203.  
  2204. From Jeff over the weekend, installed 17 Nov 97:
  2205.  . Fixes to parens in peakcps calculation, ckuusx.c.
  2206.  . Changed communications input buffer from 4K to 32K if BIGBUFOK
  2207.    defined, so that TCP reads will have a chance of being big enough to open
  2208.    the TCP receive window.  ckutio.c.
  2209.  . Rearranged file input buffer size definitions.  ckcker.h.
  2210.  . Make -j/J command-line options set the reliable flag.  ckuusy.c.
  2211.  . Beginnings of Telnet client authorization and encryption code.  ckcnet.[ch].
  2212.  
  2213. Added missing AIX defines for TCP_NODELAY, TCP_KEEPALIVE, and TCP_MAXSEG.
  2214. ckcnet.h, 17 Nov 97.
  2215.  
  2216. Built for 16-bit QNX for the first time since before 6.0 was released, no
  2217. problems. 17 Nov 97.
  2218.  
  2219. Rec'd verification that VMS LAT calls now work again.  18 Nov 97.
  2220.  
  2221. Numerous tiny syntactic changes for the benefit of gcc -Wall, a couple of
  2222. which might actually make a difference (e.g. 2 or 3 spots where variables
  2223. could possibly be used before set).  Many modules, 18 Nov 97.
  2224.  
  2225. Fixed a problem with SEND /MAIL:<address> <filename> on VMS.  While working on
  2226. this, also improved some VMS error messages.  Tested to make sure that VMS
  2227. C-Kermit can SEND /MAIL and also receive files as mail and deliver them.
  2228. ckuusr.c, ckvfio.c, 18 Nov 97.
  2229.  
  2230. Using bgcc, William Bader found two places where an out-of-bounds array
  2231. reference might occur.  One was just a debug() call, so I commented it out.
  2232. The other was in the loop that strips junk from the end of a modem call-result
  2233. message; the tests were reversed.  Fixed in ckutio.c, ckudia.c, 18 Nov 97.
  2234.  
  2235. Added -V command-line option = SET FILE PATTERNS OFF / SET XFER MODE MANUAL.
  2236. ckuusy.c, 18 Nov 97.
  2237.  
  2238. Fixed SHOW MACRO <name>.  Not sure when it broke...  ckuus5.c, 18 Nov 97.
  2239.  
  2240. Added GET /RECURSIVE.  This is like telling the server to SEND /RECURSIVE.
  2241. Also GET /RECURSIVE /DELETE.  Client and server ends of both.
  2242. ckuus6.c, ckcpro.w, ckcfn2.c, 18 Nov 97.
  2243.  
  2244. Note: GET /DELETE /RECURSIVE deletes files but not directories.
  2245.  
  2246. Still have to add help text for this, etc.
  2247.  
  2248. See ~/new/Wall.txt again.
  2249.  
  2250. Cleaned up server end of new GET forms.  Got rid of en_ret, merged with
  2251. en_del.  Save & restore recursive & fnspath around each server transaction.
  2252. ckcpro.w, ckuus6.c, 19 Nov 97.
  2253.  
  2254. ttflui() should not be called by input() when streaming.  ckcfn2.c, 19 Nov 97.
  2255.  
  2256. Added SET STREAMING AUTO and SHOW STREAMING.  All of this is still invisible.
  2257. ckuusr.[ch], ckuus[356].c, 19 Nov 97.
  2258.  
  2259. Fixed input() in the streaming case to actually send an Error packet if it
  2260. received a bad packet, rather than just pretend that it got an Error packet.
  2261. ckcfn2.c, 20 Nov 97.
  2262.  
  2263. Simplified the syntax of shotab[], ckuusr.c, 20 Nov 97.
  2264.  
  2265. SET LINE / SET HOST / SET PORT commands were not getting into the recall
  2266. buffer.  Fixed in ckuus7.c, 20 Nov 97.
  2267.  
  2268. Ditto for SET DIAL DIRECTORY, SET MODEM CAPABILITIES, SET CONTROL PREFIX,
  2269. WAIT, and many other commands.  These are commands that accept a variable
  2270. number of args, and terminate when the command parsing routine returns -3.
  2271. The solution is, when this happens, to make sure that cmcfm() is called
  2272. anyway; otherwise lots of stuff doesn't happen that should happen.  Note: when
  2273. cmcfm() is called *after* the user typed CR, it knows this and does not make
  2274. them type another one.  ckuus*.c, 20 Nov 97.
  2275.  
  2276. Fixed REMOTE LOGIN not to succeed when it was not given enough parameters.
  2277. ckuus7.c, 20 Nov 97.
  2278.  
  2279. From Jeff: Make SET TITLE take effect immediately.  ckuus7.c, 20 Nov 97.
  2280.  
  2281. Added SET TRANSFER DISPLAY BRIEF.  Thus just writes a one-line report on
  2282. each file, similar to FTP:
  2283.  
  2284.   filename (transfer-mode) (size-if-known): status (and cps if status OK)
  2285.  
  2286. ckcker.h, ckuus[7x].c, 20 Nov 97.
  2287.  
  2288. Discovered that filename pattern matching was happening too early, and could
  2289. be undone by things that happened later.  Moved the matching code out of
  2290. gnfile() and into sfile() to make sure it was executed AFTER the S/I-packet
  2291. exchange rather than before, so it would not be undone by the WHO/WHATAMI
  2292. mechanism.  ckcfns.c, 20 Nov 97.
  2293.  
  2294. Allowed UNIX C-Kermit to accept /dev/null as an incoming filename and use
  2295. it literally.  ckufio.c, 20 Nov 97.
  2296.  
  2297. Changed \v(cps) to treat 0 elapsed seconds as 1 in calculating the transfer
  2298. rate (previously it just returned "0 cps", so now it returns the filesize).
  2299. ckuus4.c, 21 Nov 97.
  2300.  
  2301. Eliminated unnecessary screen() procedure calls in rpack() and spack()
  2302. when XFER DISPLAY is BRIEF.  ckcfn2.c, 22 Nov 97.
  2303.  
  2304. From Jeff: corrections to Telnet initializations when telnetting to non-23
  2305. ports more than once, plus unhiding some debugging routines.  ckcnet.c,
  2306. 22 Nov 97.
  2307.  
  2308. Corrections to WHATAMI negotiation; some of the bits were wrong.  ckcfn2.c,
  2309. 22 Nov 97.
  2310.  
  2311. More fixes to command history -- macro invocations were being skipped, and
  2312. commands that were canceled by the parser for syntax errors before entry were
  2313. being entered when they shouldn't have been.  ckuus[r5].c, 22 Nov 97.
  2314.  
  2315. Added SET FILE DESTINATION NOWHERE (alias CALIBRATE), invisible, a sticky
  2316. version of /CALIBRATE for receiving files, but it doesn't work -- come back
  2317. and fix it...
  2318.  
  2319. Changed all calls to screen() to go through a new macro, xxscreen(), which
  2320. does not make the call if Kermit is in remote mode.  This can eliminate a lot
  2321. of function-call overhead during file transfer, on one end anyway.  ckcpro.w,
  2322. ckcfn*.c, ckuusx.c, 24 Nov 97.
  2323.  
  2324. Changed sdata() to skip "sbufnum" countdown when streaming, and nxtpkt()
  2325. to skip out-of-window check.  ckcfn[s2].c, 24 Nov 97.
  2326.  
  2327. Changed brief file transfer display to use the same cps calculation that the
  2328. other displays use, and added elapsed seconds to the display.  ckuusx.c,
  2329. 24 Nov 97.
  2330.  
  2331. Looked into making communication-device writes be nonblocking, so Kermit can
  2332. be forming its next packet while the write() is actually occurring.  But as
  2333. far as I can tell, at least in the UNIX version, ttyfd is already opened in
  2334. nonblocking mode, since that's how myread() works, and we use the same fd for
  2335. both reading and writing.  Still, I added a test for EWOULDBLOCK after the
  2336. write, so make sure it is not treated as an error.  ckutio.c, 25 Nov 97.
  2337.  
  2338. Fixed up the changes to sdata() from yesterday.  ckcfns.c, 25 Nov 97.
  2339.  
  2340. Added CLOSE [ CONNECTION ] command, since the current method for closing a
  2341. connection is quite mysterious ("set line" and/or "set host" without a device
  2342. or hostname), and added a new function, clsconnx(), to do it, consolidating a
  2343. bunch of confusing code that was in setlin().  ckuus[r7].c, 25 Nov 97.
  2344.  
  2345. Fixed STREAMING message on fullscreen file-transfer display.  ckuusx.c,
  2346. 25 Nov 97.
  2347.  
  2348. Fixed STATISTICS to show the packet length that was actually used when sending
  2349. the last file, rather than the default that would be used in absence of
  2350. instructions from the receiver.  ckcfns.c, ckuus4.c, 25 Nov 97.
  2351.  
  2352. Turned slow-start off for transfers in which streaming is negotiated.
  2353. ckcpro.w, ckuusx.c, 25 Nov 97.
  2354.  
  2355. Fixed a bug in which bgetpkt() was repeat-counting a run of two characters,
  2356. when the minimum should be three, thus turning 2 into 3 and adding needless
  2357. overhead to the packet.  ckcfns.c, 26 Nov 97.
  2358.  
  2359. Made NUL (0) unprefixable:
  2360.  . Changed SET CONTROL UNPREFIX command to allow it.
  2361.  . Changed logpkt() to log packets correctly when they contain NULs.
  2362.  . Now C-Kermit sends packets containing NULs correctly.
  2363.  . Make [b]gecode() be length-driven, rather than stopping at NUL.
  2364.  . Make [b]getpkt() handling of leftovers be length-driven.
  2365.  . Make all chk[123]() routines be length driven rather than stopping at NUL.
  2366.  . Make all calls to chk[123]() routines pass length.
  2367.  . Update prototypes for chk[123]() routines.
  2368. ckcfn2.c, ckuus3.c, ckuus4.c, 26 Nov 97.
  2369.  
  2370. Not done:
  2371.  . Anything about recording packets the debug log.
  2372.  . Including zero in "set control unprefix all" or "set prefixing none".
  2373.  . Docs, help, etc.
  2374.  . Enough testing.
  2375.  
  2376. After these changes (reducing the unneeded repeat count for doublets and
  2377. allowing NUL to be unprefixed), the packet overhead went down by about 10%
  2378. when transferring the SunOS C-Kermit binary:
  2379.  
  2380.   size:         1026152
  2381.   packet chars: 1166088 (before)
  2382.   packet chars: 1062181 (after)
  2383.  
  2384. As a quick check, I built it on AIX and sent some files to it.  I was able to
  2385. consistently get 766Kcps sending the same 4MB binary file that never went
  2386. faster than about 600Kcps before.
  2387.  
  2388. Changed SET PREFIXING command to account for unprefixing 0, and also made
  2389. SET PREFIXING MINIMAL take flow-control setting into account when deciding
  2390. whether to prefix 17,19,145,147.  ckcmai.c, 26 Nov 97.
  2391.  
  2392. Fixed length in chk1() call from chkspkt(), which affected autodownloads,
  2393. from Jeff.  ckcfn2.c, 27 Nov 97.
  2394.  
  2395. Why on earth did chk3() take parity as an arg?  The CRC is applied to outbound
  2396. packets before adding parity, and is checked on arriving packets after
  2397. stripping parity.  Removed this in hopes of tightening up one more critical
  2398. loop.  ckcfn2.c, ckuus4.c, 27 Nov 97.
  2399.  
  2400. Added new low-level routines to the UNIX version: rftimer() and gftimer().
  2401. These time things using floating point seconds.  Within #ifdef GFTIMER, which
  2402. is, at present, defined only for UNIX.  ckcdeb.h, ckutio.c, ckcplm.doc,
  2403. 27 Nov 97.
  2404.  
  2405. Added #ifdef GFTIMER sections throughout ckcpro.w, ckcfn*.c, ckuus4.c, and
  2406. ckuusx.c to take advantage of [rg]ftimer() when calculating elapsed time, time
  2407. left, and cps.  Now we no longer have the 1-second granularity in
  2408. file-transfer speed measurements, and therefore get accurate elapsed time and
  2409. CPS figures at the end of a transfer regardless of the file size (within
  2410. reason).  10BaseT socket-to-socket transfers from SunOS to AIX now routinely
  2411. register over 800Kcps.  27 Nov 97.
  2412.  
  2413. To add these routines to non-UNIX platforms:
  2414.  
  2415.  (VOID) rftimer() gets and saves the current time in whatever subsecond
  2416.    precision (millisecond, microsecond) is available.
  2417.  (float) gftimer() returns the number of seconds that have passed since
  2418.    rftimer() was last called as a fractional floating-point number.
  2419.  In ckcdeb.h, #define GFTIMER for your platform.
  2420.  
  2421. Converted getmsec() to gftimer(), so now we can get packet-read/write
  2422. millisecond times in the debug log for any platform where GFTIMER is defined
  2423. ("grep msec debug.log").  ckcfn2.c, ckutio.c, 27 Nov 97.
  2424.  
  2425. Checked GFTIMER on SunoOS, HP-UX 10.20, AIX 4.1, Solaris 2.5,
  2426.  
  2427. Defined and added new WM_CLEAR flag to WHATAMI negotiation field.  This gives
  2428. the opposite Kermit permission to send any and all control characters
  2429. unprefixed in data packets.  ckcker.h, ckcfns.c, ckcmai.c, 27 Nov 97.
  2430.  
  2431. Added SET CLEARCHANNEL { ON, OFF, AUTO }, AUTO is the default, and lets
  2432. C-Kermit tell the other Kermit whether it has a clear channel based on whether
  2433. it has opened a TCP socket connection.  ON and OFF have the expected meanings.
  2434. The CLEARCHANNEL setting, for now, is shown by SHOW STREAMING.  Now if (and
  2435. only if) I SET HOST directly to a Kermit server that is waiting on a TCP
  2436. socket, I get minimal prefixing automatically.  For example, from SunOS to
  2437. AIX, with W=30, P=9000, I get > 800Kcps just about every time.  ckuusr.[ch],
  2438. ckuus3.c, etc, 27 Nov 97.
  2439.  
  2440. Added SET TRANSACTION-LOG { VERBOSE, BRIEF [ separator ] }.  If BRIEF is
  2441. chosen, one line is written per file, with a timestamp, action (SEND or RECV),
  2442. filename, size, mode (text or binary), status (OK or FAILED), and additional
  2443. info depending on the status.  The default separator is comma, but any other
  2444. nonalphanumeric character can be specified.  This format is suitable for
  2445. direct importation into Informix, Oracle, Sybase, etc.  ckcdeb.h, ckuusr.h,
  2446. ckuusx.c, ckcfn[s3].c, ckcpro.w, 27 Nov 97.
  2447.  
  2448. Built on SunOS, Solaris, HP-UX, AIX, and Unixware as a last-minute check.  No
  2449. complaints.
  2450.  
  2451. Fixed CPS display in brief display to be file chars / elapsed time, rather
  2452. than most recent CPS calculation.  ckuusx.c, 28 Nov 97.
  2453.  
  2454. Various other minor corrections to yesterday's work, mainly correcting
  2455. backwards #idefs for GFTIMER.  28 Nov 97.
  2456.  
  2457. Refinement of brief transaction log: always write 8 fields, enclose any
  2458. field in quotes if it contains the separator.  ckuusx.c, 28 Nov 97.
  2459.  
  2460. Added docs for new transaction log format to ckermit2.upd.  28 Nov 97.
  2461.  
  2462. Assorted minor corrections from Jeff to the last few days' work, ckcnet.c,
  2463. ckcdeb.h, ckutio.c, ckuus[4x].c, ckcfn2.c, 1 Dec 97.
  2464.  
  2465. Addition of hex dump debug tool, from Jeff, ckuusx.c, 1 Dec 97.
  2466.  
  2467. Fixed IF NUMERIC to work correctly for variables whose definitions contain
  2468. multiple words.  ckuus6.c, 1 Dec 97.
  2469.  
  2470. Made a lot of fixes that should improve the situation with command recall.
  2471. Until now, the command functions module, ckucmd.c, was ignorant about where
  2472. command were coming from.  Which is silly.  So now there is a function in the
  2473. command parser, cmdsrc(), that can be called from ckucmd.c (or anywhere else)
  2474. to determine the command source (keyboard, macro, TAKE file, etc), which makes
  2475. decisions about the command recall buffer, and many other things, perfectly
  2476. straightforward.  Also, throughout the ckuus*.c modules, I replaced all the
  2477. #ifdef'd tests of cmdlvl vs tlevel with calls to the new cmdsrc() function.
  2478. So now we have the command recall buffer working pretty much as it did before
  2479. I added the REDO command -- commands issued from macros don't go in; the SEND
  2480. command doesn't always go in; macro invocations do go in, etc.  Many modules,
  2481. 1 Dec 97.
  2482.  
  2483. Replaced hardwired server-mode help text (sent in response to REMOTE HELP)
  2484. with dynamic version that actually tells which commands are available,
  2485. enabled, etc.  Will pretty it up later.  ckcmai.c, ckcfns.c, ckcpro.w,
  2486. 1 Dec 97.
  2487.  
  2488. Replaced all checks for ttyfd < 0 to see if connection broken with calls to
  2489. ttchk(), which must be coded to fill this role.  This removes the risk of
  2490. checking ttyfd on systems where it's not supported or, worse, on systems where
  2491. it is used for one kind of connection but not others.  Examples: in VMS, where
  2492. it is used for TCP/IP but not serial; in AIX, where it is used for serial and
  2493. TCP/IP, but not X.25, etc.  ckcmai.c, ckcfn2.c, ckuus[434].c, 2 Dec 97.
  2494.  
  2495. Added some extra checks to ttgmdm() and ttchk() for local vs remote mode to
  2496. make sure they behave as advertised.  ckutio.c, 2 Dec 97.
  2497.  
  2498. SET DESTINATION NOWHERE (aka CALIBRATE) seems to have fixed itself.  Added
  2499. help and show text for it.  ckuus[24].c, 2 Dec 97.
  2500.  
  2501. Fixed READY TO SERVE... message for socket-based server.  ckcpro.w, 2 Dec 97.
  2502.  
  2503. Defined BIGBUFOK for Linux.  ckcdeb.h, 2 Dec 97.
  2504.  
  2505. Ripped out tons of stupid, confusing, and contradictory code for calculating
  2506. the elapsed time and CPS of file transfer.  Now this is done automatically in
  2507. the protocol module at the end of each file transfer, and again at the end of
  2508. a transaction, and the results are stored in global variables available for
  2509. use by the various display routines (file transfer display, STATISTICS
  2510. command, \v(cps) variable, etc).  Furthermore, the contradiction between file
  2511. time/cps and transaction time/cps when only one file was transferred was
  2512. eliminated simply by defining the latter to be the former in the 1-file case.
  2513.  
  2514. Routines:
  2515.   fcps(), called when an input or output file is closed, sets:
  2516.     xfsecs   = elapsed time this file, whole number of seconds.
  2517.     fpxfsecs = elapsed time this file, floating-point seconds.
  2518.     ffc      = number of characters, this file.
  2519.   tstats(), called when a B packet is sent or received, sets:
  2520.     tfsecs   = elapsed time whole transaction, whole number of seconds.
  2521.     fptsecs  = elapsed time whole transaction, floating-point seconds.
  2522.     tfc      = number of characters, all files.
  2523.  
  2524. Many modules, 2 Dec 97.
  2525.  
  2526. Fixed a bug in which a server could be given a REMOTE SET WINDOW and
  2527. REMOTE SET RECEIVE PACKET-LENGTH combination larger than its buffer size,
  2528. and it would accept them and try to use them.  Reported by David Fiander.
  2529. ckcfns.c, 2 Dec 97.
  2530.  
  2531. Fixed SET MODEM COMMAND VOLUME HIGH; previously it was assigning the given
  2532. command to VOLUME LOW.  Reported by Dragan Milicic.  ckuus3.c, 2 Dec 97.
  2533.  
  2534. Changed SHOW MACRO to use chained FDBs, so "show mac ?" works, and yet
  2535. "show mac x" also works when x is ambiguous, etc.  ckuus5.c, 2 Dec 97.
  2536.  
  2537. Changed askmore() to not ask when the batch or background flags are set.
  2538. ckuus5.c, 2 Dec 97.
  2539.  
  2540. Removed "kludge to fix redefinitions in <linux/wait.h>" since (a) this
  2541. interferes with the new glibc and headers, and (b) it isn't needed any more
  2542. anyway since we simplified how REDIRECT works.  ckutio.c, 2 Dec 97.
  2543.  
  2544. Another attempt at preventing "Transfer OK" messages when transfer wasn't
  2545. OK.  ckcpro.w, 3 Dec 97.
  2546.  
  2547. Started adding a "filestatus" variable to protocol modules, to clean up the
  2548. mess and confusion of all the separate flags: cxseen, czseen, discard,
  2549. epktrcvd, etc etc.  Not set or tested yet, to be continued later, maybe...
  2550. ckcker.h, ckc*.c, 3 Dec 97.
  2551.  
  2552. Removed the kludge by which we forced macro invocations into the command
  2553. recall buffer, since Monday's fixes removed the need for it.  ckuusr.c,
  2554. 3 Dec 97.
  2555.  
  2556. Changed SHOW COMM to always show SET CARRIER-WATCH setting.  Updated the
  2557. HELP SET CARRIER-WATCH text.  ckuus[42].c, 3 Dec 97.
  2558.  
  2559. New HP-UX makefile entries from Peter Eichhorn.  3 Dec 97.
  2560.  
  2561. Enabled RLOGIN code for HP-UX 10.00 (it was already enabled for HP-UX 9.00)
  2562. and Digital UNIX 4.0.  ckcnet.h, 3 Dec 97.
  2563.  
  2564. Added a hint message for RLOGIN failures.  ckuusr.c, 3 Dec 97.
  2565.  
  2566. Changed STATISTICS to omit the transmission speed if it's a network connection
  2567. or if C-Kermit is not in local mode.  ckuus4.c, 3 Dec 97.
  2568.  
  2569. Fixed "cd .<ESC>" and "cd ..<ESC>" to behave as expected in UNIX and OS-9.
  2570. (Fixing this for "?" would be much harder, since "." and ".." do not get into
  2571. the directory list).  ckucmd.c, 3 Dec 97.
  2572.  
  2573. The following for VMS from Lucas Hart:
  2574.  
  2575. (1)  Add a NOVMSSHARE "feature", since that condition is contrary to
  2576.      default VMS linking,  and a __CRTL_VER (that is what DEC C calls
  2577.      it, though DECC_RTL would be more precise for their usage) to CKUUS5.C
  2578. (2)  Update OLD_VMS conditionals for VMS 4.7 (before they were only to
  2579.      V4.4), in CKVOLD.C, CKVFIO.C, CKVTIO.C
  2580. (3)  Change the CKVKER.COM link logic slightly to always define either
  2581.      NOVMSSHARE, or VMSSHARE, and to make the VAX NOVMSSHARE also define
  2582.      (and link) /NOSYSSHARE, as initially intended.
  2583. (4)  Comment out more of the debugging output in CKVKER.COM
  2584. (5)  Similar changes to CKVOLD.COM (and incorporate CKVKER 1.17 edits)
  2585.  
  2586. Contributed 5 Oct 97; I finally got around to them on 3 Dec 97.
  2587.  
  2588. Removed perror() calls from keepalive(), and replaced with debug() calls.
  2589. No point scaring people to death...  ckcnet.c, 3 Dec 97.
  2590.  
  2591. Assorted #ifdef adjustments for building on many systems.  Various modules,
  2592. 3 Dec 97.
  2593.  
  2594. Fixed Data General AOS/VS version to allow recently defined file numbers,
  2595. chkfn(); ditto for OS-9.  ck[d9]fio.c, 4 Dec 97.
  2596.  
  2597. RETURN from inside SWITCH did not work right; same problem as END (fixed on
  2598. July 3).  doreturn(), ckuus6.c, 4 Dec 97.
  2599.  
  2600. DIAL and ANSWER should not automatically CONNECT, no matter what the DIAL
  2601. CONNECT setting is, if C-Kermit is running in batch or in the background.
  2602. ckuusr.c, 4 Dec 97.
  2603.  
  2604. Documented CLOSE command.  ckermit2.upd, 4 Dec 97.
  2605.  
  2606. Added lots of code to VMS ttopen() to see what I could find out about modem
  2607. signals, in an effort to get SET CARRIER-WATCH working in VMS, where it never
  2608. has been implemented.  Need more info before I can make further progress.
  2609. However, it looks like the VMS SET TERM /MODEM vs /NOMODEM setting might be
  2610. critical here, and this has never been examined or set in VMS C-K before.
  2611. ckvtio.c, 4 Dec 97.
  2612.  
  2613. Changed CKVKER.COM to not give /NOSYSSHARE to linker when NOSHARE chosen,
  2614. since some of the nonsharable libraries are unusable (UCX, some versions of
  2615. SMG, etc).  Now I no longer get LIB$FIND_IMAGE_SYMBOL when building.
  2616. ckvker.com, 4 Dec 97.
  2617.  
  2618. From Lucas Hart, a fix for the annoying warning from DECC in Digital UNIX 4.0
  2619. about "union wait".  ttruncmd(), ckutio.c, 4 Dec 97.
  2620.  
  2621. Fixed some problems with parsing the DELETE command when it was given the
  2622. name of a file that doesn't exist.  ckuus6.c, 4 Dec 97.
  2623.  
  2624. Finally tracked down the reason why sometimes the file-transfer bar zooms
  2625. out to 100% when a file transfer is interrupted; the screen() routines were
  2626. resetting percent done when the Z packet comes, at the end of the transfer,
  2627. rather than when the F or X packet comes, at the beginning of the transfer.
  2628. This was OK except when a second copy of the Z packet came -- then suddenly
  2629. the percent done was 100 instead of whatever it was the first time.  No more.
  2630. screenc(), ckuusx.c, 5 Dec 97.
  2631.  
  2632. Still, it seems rather common for the file sender to send two Z packets when
  2633. streaming.  Why?  Because once interrupted, the receiver sends an ACK(X) for
  2634. every packet from now on.  The sender gets the first one and sends Z(D).  But
  2635. more arrive, so it sends another Z(D).  Cure: the receiver should only send
  2636. ONE ACK(X) or ACK(Z) when streaming.  Cure applied in ckcpro.w, 5 Dec 97.
  2637.  
  2638. When draining incoming packets after sending an E-packet and using the
  2639. fullscreen file-transfer display, put up a message that we are draining -- it
  2640. can take a while -- then another when finished.  errpkt(), ckcfn2.c, 5 Dec 97.
  2641.  
  2642. Eliminated another per-packet function call, getrtt(), in the streaming case.
  2643. ckcfn2.c, 5 Dec 97.
  2644.  
  2645. Ditto for calling gtimer() every time we send or receive a packet if we are
  2646. not timing out (as when streaming).  ckcfn2.c, 5 Dec 97.
  2647.  
  2648. Tightened up "drain loop" in error-packet sender by calculating timeouts on
  2649. the fly rather than using an overconservative value, even when streaming and
  2650. the timeout was 0.  errpkt(), ckcfn2.c, 5 Dec 97.
  2651.  
  2652. Cleaned up much errpkt()/ermsg()/screen()/clsif()/clsof() redundancy.  Made
  2653. errpkt() close files, call screen(), make debug and transaction log entries,
  2654. etc, which was previously done piecemeal all over the place.  Also made
  2655. errpkt() set czseen, since of course an E packet cancels the current batch of
  2656. files.  This prevents still more spurious "100%"'s, completion messages
  2657. stomping over each other, etc.  Now it all seems pretty tight.  ckcpro.w,
  2658. ckcfn2.c, 5 Dec 97.
  2659.  
  2660. Added some debugging code to netopen() to catch possible problems when
  2661. non-Telnet port is requested.  Plus merged in Jeff's recent changes.  ckcnet.c,
  2662. 6 Dec 97.
  2663.  
  2664. UNIX C-Kermit beware file updated with various items.  ckuker.bwr, 6 Dec 97.
  2665.  
  2666. Elapsed time was always showing up as zero when receiving files.  Fixed in
  2667. fstats(), ckcfn2.c, 6 Dec 97.
  2668.  
  2669. Lots of changes to ckcnet.c from both me and Jeff regarding set socket options;
  2670. mine removed perrors (again) and replaced them with a consistent format of
  2671. debug log entry; Jeff's were substantive.  6 Dec 97.
  2672.  
  2673. Discovered it was too easy to introduce interoperability between non-zero-
  2674. prefixing and zero-prefixing Kermits by including 0 in SET PREFIXING MINIMAL.
  2675. Changed this to not unprefix zero after all, and changed SET PREFIXING NONE
  2676. to unprefix everything but CR, IAC, and SOP, and had the clear-channel code
  2677. do SET PREFIXING NONE, rather than MINIMAL.  ckcmai.c, ckcfns.c, ckuus5.c,
  2678. 6 Dec 97.
  2679.  
  2680. Joe D persistently complained that streaming could not be interrupted in
  2681. Unixware.  Reason: ttchk() was not doing its job; it has to be relied on to
  2682. tell us how many characters are waiting unread.  But this was not happening in
  2683. UNIX versions that support select() or rdchk(), etc, but that do not support
  2684. FIONREAD.  select() would tell us *that* characters were waiting, but not how
  2685. many.  So the test in sdata() for (ttchk() > some-number) would never succeed,
  2686. and so the reverse channel would never be sampled.
  2687.  
  2688. Well, it seems FIONREAD is being picked up on most systems from ioctl.h,
  2689. term.h, etc, but not on Solaris or Unixware, so we need to include it from
  2690. <filio.h> or wherever else it might be found.  ckutio.c, 6 Dec 97.
  2691.  
  2692. It turns out the non-FIONREAD-yet-MYREAD versions were just not working very
  2693. well at all transferring files with window sizes > 1 (or streaming).  In this
  2694. case I made ttchk() return the number of bytes in the myread buffer, if
  2695. nonzero; we'll get the next bunch of characters next time around.  When the
  2696. internal buffer is empty, then we go to select() and friends, and if select()
  2697. tells us data is ready to read, we call the myfillbuff() function to get as
  2698. many as are there, rather than returning 1 as before; this allows the
  2699. ACK-checking logic in the sdata() loop to detect an ACK much more quickly, in
  2700. theory at least.  ttchk(), ckutio.c, 6 Dec 97.
  2701.  
  2702. Meanwhile, I cleared up the old problem -- at least in MYREAD versions of UNIX
  2703. C-Kermit -- in which we read a packet by its length field and then leave any
  2704. trailing junk (like EOP) to still be read, which makes ttchk() always find at
  2705. least one character waiting, which can slow us down when we go to read a
  2706. packet but there isn't one there.  ttinl(), ckutio.c, 6 Dec 97.
  2707.  
  2708. Fixed SHOW STREAMING to show the actual cps of the last transfer.  ckuus5.c,
  2709. 6 Dec 97.
  2710.  
  2711. Isolated SCO as a platform where there is no OS-assisted buffer peeking, and
  2712. so our new ttchk() select-then-read method must be used.  Tested streaming
  2713. there, including interruption of the SCO version from a receiver on the other
  2714. end -- it works fine.  The connection from here to there is Internet, but it
  2715. goes through a V.34 modem.  Streaming is anywhere from 50% to 1000% faster on
  2716. this connection.  Sometimes nonstreaming fails badly due to unpredictable
  2717. timing, whereas streaming has no timeout worries.  7 Dec 97.
  2718.  
  2719. Made sure streaming is turned on only during data phase, to prevent
  2720. "Transmission error on reliable link" from stopping the transmission before
  2721. it started, in case the user didn't escape back fast enough.  ckcpro.w,
  2722. ckcmai.c, ckcfn2.c, 7 Dec 97.
  2723.  
  2724. Joe D's persistent report about C-K in Unixware starting out at the slow-start
  2725. packet size and never going up turned out to be true.  The reason I couldn't
  2726. reproduce it is that all the versions I tested on had BIGBUFOK, but Unixware
  2727. didn't, aha.  Fixed in spar(), ckcfns.c, 7 Dec 97.
  2728.  
  2729. Discovered (after hours of trial and error) that you can't send the following
  2730. characters unprefixed to VMS: 1 3 13 14 15 17 19 24 25 141 145 147.  Several
  2731. of these (14,15,24,25) are a surprise.  Once I made sure these were prefixed,
  2732. streaming worked fine, as well as non-streaming with W=30, P=8000.  I added
  2733. the missing ones to the SET PREFIXING CAUTIOUS list, and also set them when
  2734. the WHOAREYOU mechanism lets us know we have VMS on the other end.
  2735.  
  2736.                FIONREAD                          SO_ERROR
  2737. SunOS          <sys/filio.h>      Works OK       <sys/socket.h>
  2738. Solaris        <sys/filio.h>      Works OK       <sys/socket.h>
  2739. Unixware       <sys/filio.h>      Works OK       <sys/socket.h>
  2740. AIX 4.1        <sys/ioctl.h>      Works OK       <sys/socket.h>
  2741. HP-UX 10.20    <sys/ioctl.h>      Works OK       <sys/socket.h>
  2742. SCO 5.0.4      <sys/socket.h>     Doesn't work   <sys/socket.h>
  2743. NeXT           <bsd/sys/ioctl.h>  Works OK       <bsd/sys/socket.h>
  2744. IRIX 6.2       <sys/socket.h>(*)  Works OK       <sys/socket.h>
  2745.  
  2746. (*) also in <sys/filio.h>
  2747.  
  2748. On a Telnet connection to an IRIX 6.2 system at the U of Oregon, discovered
  2749. that the IRIX version could not send a packet longer than 4096 bytes.  Its
  2750. logs show it constructing the packet right, but logs on the other side show
  2751. the packet being truncated at 4096 and then concatenated with other pieces of
  2752. itself.  Why?
  2753.  
  2754.  . Does it happen without streaming?                        Yes
  2755.  . Does it happen wit streaming?                            Yes
  2756.  . Does it happen with older Kermit on IRIX?                Yes
  2757.  . Does it happen with older Kermit on SunOS?               Yes
  2758.  . Does "set receive packet-length 4000" make it go away?   Yes
  2759.  . Does it happen if local is not SunOS?                    Yes
  2760.  . Does it happen with "set host *"?                        No <--
  2761.  . Does it happen with SET HOST connections?                No <--
  2762.  
  2763. So the IRIX 6.2 Telnet server is the culprit.  Streaming / 9K packets works
  2764. fine as long as the IRIX Telnet server is not in the picture.
  2765.  
  2766. The IRIX incident revealed that there were still some places where
  2767. transmission errors (crunched packets, timeouts, NAKs, out-of-sequence
  2768. packets, etc) were not treated as fatal during streaming.  Fixed in input(),
  2769. ckcfn2.c, 8 Dec 97.
  2770.  
  2771. I realized that streaming should be turned on the instant it is negotiated,
  2772. and turned off only at the end of the transaction.  There is absolutely no
  2773. need to switch it off within a transaction.  This simplifies matters greatly
  2774. and avoids errors when we get retransmissions of between-file packets (for
  2775. which there is absolutely no need).  ckcpro.w, ckcfn2.c, 8 Dec 97.
  2776.  
  2777. Tightened up UNIX ttinl() just a wee bit by checking the packet length field
  2778. only when (!havelen) (Jeff noticed this).  ckutio.c, 8 Dec 97.
  2779.  
  2780. Changed debug format F011 (never before used) to write counted strings
  2781. possibly containing NULs into the debug log:
  2782.  
  2783.   debug(F011,label-string,counted-string,count);
  2784.  
  2785. Used for entering a packet, or the beginning of one, into the debug log in a
  2786. relatively legible way, even if it contains NULs, LFs, etc.  ckuusx.c,
  2787. ckcfn2.c, ckutio.c, 8 Dec 97.
  2788.  
  2789. Back to VMS unprefixing -- it seems that SO/SI and ^C/^X/^Y don't need
  2790. prefixing when sending into an Alpha with Multinet.  But that doesn't prove
  2791. anything -- I've had transfers freeze with many VMS's, not just KERVAX, so
  2792. for now I'm leaving the extra prefixing in.
  2793.  
  2794. Changed "clear-channel" unprefixing to be sticky instead of saving and
  2795. restoring the user's prefixing selection around protocol actions.  Otherwise
  2796. the user would never be able to find out what happened (e.g. why a transfer
  2797. failed).  ckcfn2.c, 8 Dec 97.
  2798.  
  2799. Made "te" be a sufficient abbreviation for TELNET (conflicted with TELOPT),
  2800. and "ta" sufficient for TAKE (conflicted with TAPI).  ckuusr.c, 8 Dec 97.
  2801.  
  2802. Added BIGBUFOK for Unixware 2.0 and higher.  makefile, 9 Dec 97.
  2803.  
  2804. Change chktimo() to return(0) if streaming.  ckcfn2.c, 9 Dec 97.
  2805.  
  2806. The old bug of the server sending responses to REMOTE commands back in binary
  2807. mode came back again, so I fixed it again.  ckcpro.w, ckcfn2.c, 9 Dec 97.
  2808.  
  2809. Verified that IRIX 4K bug also exists on IRIX 5.3.  ckuker.bwr, 9 Dec 97.
  2810.  
  2811. Resync'd sources with Jeff's, ckuusr.h, ckuus[57x].c, ckcnet.c, 9 Dec 97.
  2812.  
  2813. Changed VMS version to not test controller type in ttgmdm() if it is running
  2814. on an Alpha.  I have no way of testing this.  ckvtio.c, 9 Dec 97.
  2815.  
  2816. Changed SET CARRIER and HELP SET CARRIER in VMS to print appropriate messages
  2817. about why it can't be done.  ckuus[23].c, 9 Dec 97.
  2818.  
  2819. Reorganized and augmented CKVKER.BWR.  9 Dec 97.
  2820.  
  2821. Started adding a section on how to invoke C-Kermit from Web browsers.
  2822. I couldn't find any way to do this in Lynx...  ckermit2.upd, 9 Dec 97.
  2823.  
  2824. Built quickly on SunOS, Solaris, HPUX, Unixware.  9 Dec 97.
  2825.  
  2826. In VMS C-K, incoming filetype attribute was overriding SET FILE TYPE IMAGE.
  2827. Fixed in ckcfn3.c, 10 Dec 97.
  2828.  
  2829. Peter Eichhorn says that in HP-UX, when C-Kermit is in CONNECT mode and pops
  2830. back to the prompt automatically, that the lower CONNECT fork is not killed,
  2831. so subsequent CONNECTs make more and more forks, which compete for i/o on
  2832. the device.  I can't reproduce it:
  2833.  
  2834. Popping back because connection dropped:
  2835.  . Does it happen in SunOS with a Telnet connection?   No
  2836.  . Does it happen in HP-UX with a Telnet connection?   No
  2837.  . Does it happen in HP-UX with a serial connection?   ???
  2838.  
  2839. Popping back because of an APC:
  2840.  . Does it happen in HP-UX with a Telnet connection?   No
  2841.  . Does it happen in HP-UX with a serial connection?   No
  2842.  
  2843. But there's another problem: HP-UX C-Kermit doesn't pop back to the prompt
  2844. anyway when carrier is lost.  As far as I can tell, it never did.
  2845.  
  2846. Streaming on serial connection:
  2847.  . V.34 ZIP-file Uploads: about 3400cps.
  2848.  . V.34 ZIP-file Downloads: about 2800cps.
  2849.  . C-X interrupt when uploading seems to hang, but works OK downloading.
  2850.    (Or else the modem just cut out -- it does that a lot).
  2851.  
  2852. Added addt'l debug stmts to UNIX CONNECT module to help catch a situation
  2853. reported in HP-UX in which "garbage" on the connection results in C-Kermit
  2854. popping back to command mode without killing the lower CONNECT fork, so that
  2855. subsequent CONNECTs make extra new forks that compete with each other for
  2856. input.  I also made sure that the pid variable was initialized to -1, and
  2857. reset to 0 whenever the fork was killed, so we can check it upon reentry to
  2858. the CONNECT module.  And then I decided, since the pid is kept in a static
  2859. variable anyway, to check it upon (re)entry to the CONNECT module, and if it's
  2860. not 0, to print a big message and then try to kill it -- a failsafe mechanism.
  2861. Also changed all debug() entries from the CONNECT module to start with
  2862. "CONNECT" to make them easily greppable.  ckucon.c, 11 Dec 97.
  2863.  
  2864. The new fullscreen cps-display procedure was taking up way too much time on
  2865. fast (e.g. local-net) connections, and tended to be too busy to read, so I
  2866. changed it to operate no more frequently than once per second.  The estimated
  2867. time left field received the same treatment.  ckuusx.c, 11 Dec 97.
  2868.  
  2869. Rearranged the code in VMS buffered-read routine, txbufr(), to recognize the
  2870. purported fact that some new data can be returned by sys$qiouw() even when it
  2871. also returns a status of SS$_HANGUP, in an effort to prevent loss of dying
  2872. gasps like NO CARRIER.  ckvtio.c, 11 Dec 97.
  2873.  
  2874. Changed SET TRANSFER MODE MANUAL to also SET FILE PATTERNS OFF, since those
  2875. who read about TRANSFER MODE MANUAL in the book expect it to do what the book
  2876. says.  ckuus3.c, 11 Dec 97.
  2877.  
  2878. The VMS version was not returning directory names when in server mode and
  2879. given the REMOTE DIRECTORY command.  Fixed in ckcfns.c, ckvfio.c, 12 Dec 97.
  2880.  
  2881. Changed fullscreen display to put the STREAMING message in the Window Slots
  2882. field, since window slots are irrelevant when streaming, and also not to put
  2883. false numbers in the RTT/Timeout field, and fixed various other fields to not
  2884. update unnecessarily, and consolidated various other code in the fullscreen
  2885. display routines.  ckuusx.c, 12 Dec 97.
  2886.  
  2887. Discovered I had broken sliding windows a few days ago by commenting out a
  2888. section of code I thought was redundant.  It wasn't.  ckcpro.w, 12 Dec 97.
  2889.  
  2890. Added comments to gattr() regarding the possibility of retaining the current
  2891. FILE COLLISION option when receiving a file with the Recover attribute that
  2892. does not need to be recovered.  The upshot is that it could be done, but it
  2893. would not be easy (so I didn't).  ckcfn3.c, 12 Dec 97.
  2894.  
  2895. Results back from VMS testers on CKVTIO.C changes:
  2896.  . Mike Freeman: It doesn't break LAT dialouts.
  2897.  
  2898. Changed SET CLEAR-CHANNEL AUTO to also announce a clear channel if RELIABLE
  2899. is ON.  ckcfns.c, 17 Dec 97.
  2900.  
  2901. External protocols were not propagating the exit status to the success
  2902. variable (which is the basis of IF SUCCESS / FAILURE as well as \v(status)).
  2903. Fixed in ckcpro.w, 18 Dec 97.
  2904.  
  2905. More work on VMS txbufr() to allow for more and more possibilities regarding
  2906. how or whether VMS reports hangup of serial connection.  ckvtio.c, 19 Dec 97.
  2907.  
  2908. Minor change in Microlink modem description text.  ckudia.c, 19 Dec 97.
  2909.  
  2910. Checked on HP-UX automatically popping back when carrier was dropped -- it
  2911. never did.  Aside from that, serial dialouts are good; RTS/CTS works
  2912. perfectly, streaming works (since it's an error-corrected connection and the
  2913. connection between the modem and the HP is solid).  A non-compressed binary
  2914. file uploads at about 5400cps (on a 31200bps connection), whereas SEND /CAL
  2915. (the dynamically generated 90+ uncompressible data) uploads at about 3600cps.
  2916.  
  2917. Last-minute checks of streaming transfers between SunOS and AIX over local
  2918. 10BaseT are fine -- they go at 600-730Kcps streaming, 540-660Kcps
  2919. nonstreaming.
  2920.  
  2921. Numerous #ifdef, prototype, declaration, and other syntactic adjustments to
  2922. allow compilation everywhere.  Many modules, 19 Dec 97.
  2923.  
  2924. Restored TELOPT_SGA handling to the way it was in Alpha.09 to prevent double
  2925. echoing when telnetting to AOS/VS.  ckcnet.c, 20 Dec 97.
  2926.  
  2927. More syntactic adjustments for VMS & DEC C, plus a fix for the new VMS handing
  2928. of SET [ MODEM ] CARRIER-WATCH.  ckuus3.c, various header files, 20 Dec 97.
  2929.  
  2930. "make du32"...  while compiling ckuusx.c, the compiler dumps core.  I did the
  2931. trick with compiling this module separately without the optimizer.  makefile,
  2932. 20 Dec 97.
  2933.  
  2934. ckuus2.c (the help-text module) grew too big for the QNX 16-bit build, so
  2935. NOHELP added to makefile.  Also clearok() seems to be missing from its curses
  2936. library, so the reference to it in screenc() was #ifdef'd out.  makefile,
  2937. ckuver.h, ckuusx.c, 21 Dec 97.
  2938.  
  2939. ---Alpha.10---
  2940.  
  2941. Changes from Jeff to ckcnet.c, 21 Dec 97.
  2942.  
  2943. The VMS version was warning that connection was still open after it closed.
  2944. That's because ttclos() was setting network to 0, so then a subsequent call to
  2945. ttchk() was taking the serial path.  Fixed in ckvtio.c, 22 Dec 97.
  2946.  
  2947. Added GFTIMER to VMS version using sys$gettim() and lib$sub_times(), with help
  2948. from James Puzzo <jamesp@dgii.com>.  Compiles and runs without complaint on
  2949. VMS 5.5, so should be OK on 5.0 and above, but maybe #ifndef OLD_VMS might be
  2950. needed.  ckcdeb.h, ckvtio.c, 22 Dec 97.
  2951.  
  2952. Added "*.exe" to UNIX list of binary filename patterns.  ckcmai.c, 22 Dec 97.
  2953.  
  2954. Changed \frand(n) to return a random integer between 0 and n, as advertised,
  2955. even if n <= 0.  ckuus4.c, 22 Dec 97.
  2956.  
  2957. Changed "Default file-transfer mode" message to say AUTOMATIC in the more
  2958. modern cases.  ckuus5.c, 22 Dec 97.
  2959.  
  2960. Changed a recently-added memcpy() in tn_sb() to strncpy(); memcpy is not
  2961. portable.  ckcnet.c, 22 Dec 97.
  2962.  
  2963. Changed #ifndef to #ifdef to avoid making a debug log entry for every single
  2964. character than comes in, in netinc(), ckcnet.c, 22 Dec 97.
  2965.  
  2966. Updated bgcc (bounds-checking gcc) makefile entry from William Bader,
  2967. 23 Dec 97.
  2968.  
  2969. Fix from Jeff to netflui() for TCPLIB case.  ckcnet.c, 23 Dec 97.
  2970.  
  2971. Replaced the strncpy() that replaced the memcpy() with a loop so as not to
  2972. terminate at NUL.  tn_sb() in ckcnet.c, 23 Dec 97.
  2973.  
  2974. Changes from Jeff to SHOW TELNET.  ckuus4.c, 23 Dec 97.
  2975.  
  2976. Fixed clsconnx() in the remote-mode VMS case to call ttclos(), otherwise it's
  2977. not possible to SET LINE TTA0:, then SET LINE, the SET LINE TTA0: again (we
  2978. should check this in K95, etc, too).  ckuus7.c, 23 Dec 97.
  2979.  
  2980. Changed "float" to CKFLOAT everywhere, and defined CKFLOAT to be double in
  2981. ckcdeb.h (a little reading shows that double is more portable than float).
  2982. This was needed (at least) because in SCO, conversion from float to long dumps
  2983. core (on purpose!) if the real number is too long for a long (clearly, then,
  2984. this is not the right fix).  The default CKFLOAT definition can be overridden
  2985. by -DCKFLOAT=float (or whatever) on the command line.  Many modules, 24 Dec
  2986. 97.
  2987.  
  2988. Fixed SHOW PATTERNS to not make some lines too long; it was miscounting the
  2989. length.  shopat(), ckuus5.c, 24 Dec 97.
  2990.  
  2991. Fix from Jeff for handling receive filters: evaluate \v(filename) after
  2992. converting the incoming name, rather than before.  rcvfil(), ckcfns.c,
  2993. 29 Dec 97.
  2994.  
  2995. Disabled filename pattern-match based transfer mode switching when sending
  2996. from pipe or filter (Jeff's suggestion).  sfile(), ckcfns.c, 29 Dec 97.
  2997.  
  2998. Change from Jeff to not log incoming NUL after CR when executing INPUT
  2999. commands on Telnet connections.  ckuus4.c, 29 Dec 97.
  3000.  
  3001. Fixed a "== should be =" typo in the SET HOST code and supplied some missing
  3002. TCPSOCKET ifdefs (from David Lane).  ckuus7.c, 29 Dec 97.
  3003.  
  3004. Added entry for zrmdir() to ckcplm.doc.  29 Dec 97.
  3005.  
  3006. Updated IRIX makefile entries from Ric Anderson.  29 Dec 97.
  3007.  
  3008. Fixed an unguarded reference to zfnqfp().  ckcfn3.c, 30 Dec 97.
  3009.  
  3010. Fixed UNIX ttinl() to terminate on turn argument, if given, rather than
  3011. eol argument.  ckutio.c, 30 Dec 97.
  3012.  
  3013. Improvements on the new F011 debug.log format (so far used only by the UNIX
  3014. version of ttinl()).  ckuusx.c, 30 Dec 97.
  3015.  
  3016. Various changes to debug logging.  cku[tf]io.c, 30 Dec 97.
  3017.  
  3018. Found the problem that William Bader was reporting in the SCO version.  The
  3019. new code that I added to ttchk() in Alpha.10 for the non-FIONREAD case, that
  3020. would force a nonblocking read when all else failed, set the initial myread
  3021. buffer index to 0 when it should have been -1 (since, unlike mygetbuf(), it
  3022. was not returning a character).  ckutio.c, 30 Dec 97.
  3023.  
  3024. Made kermit -X and -Z (X.25 connections) set the reliable flag.  ckuusy.c,
  3025. 30 Dec 97.
  3026.  
  3027. Added switches to SET LINE / SET HOST.
  3028.  
  3029.  /CONNECT means CONNECT automatically if connection is successful.
  3030.  /SERVER means go into server mode automatically if connection is successful.
  3031.  /SHARE (VMS SET LINE only) means allow SET LINE device to be shared.
  3032.  
  3033. /SHARE is to get around a problem in DECIntact, where the only way to use the
  3034. controlling terminal is if you have SHARE privilege.  When /CONNECT or /SERVER
  3035. is given on a serial connection, we wait up to 1 sec for CD to appear if
  3036. CARRIER-WATCH is not OFF, since instantaneous connecting tends to work because
  3037. it can take some time for CD to react to DTR.  Also, made the trailing /TELNET
  3038. and /RLOGIN switches invisible, since it doesn't make a lot of sense to say
  3039. "telnet blah /rlogin" or v.v.; left the "/raw-socket" switch visible.  Tested
  3040. on SunOS with TCP/IP, SunOS with serial ports, and Solaris X.25 connections.
  3041. The switch parsing code was not added for network types other than TCP/IP and
  3042. X.25.  ckuusr.h, ckuus[27].c, ckvtio.c, ckermit2.upd, 30 Dec 97.
  3043.  
  3044. The SET LINE (SET PORT) switch parsing for OS/2 is in place but not tested.
  3045. setlin(), ckuus7.c, 30 Dec 97.
  3046.  
  3047. C-Kermit's SWITCH command would erroneously execute the first case if the
  3048. switch variable did not have a matching label and there was no ":default"
  3049. label.  Fixed by adding a :default label to the SWITCH macro definition, which
  3050. is ignored if the user provides a :default label in the SWITCH statement.
  3051. ckuus5.c, 30 Dec 97.
  3052.  
  3053. Changed copyright dates to 1998.  All ck[cuv]*.[ch] modules.  30 Dec 1997.
  3054.  
  3055. Some fixes from Jeff to yesterday's changes.  ckuus[27].c, 31 Dec 97.
  3056.  
  3057. Allow remote filename to be shown in serial and/or CRT display, from Jeff.
  3058. ckcpro.w, ckuusx.c, 31 Dec 97.
  3059.  
  3060. Fixed protocol module to propagate failure into exit-status variable.
  3061. proto(), ckcpro.w, 31 Dec 97.
  3062.  
  3063. Changed SET LINE /SHARE (VMS) to not only not drop SHARE privilege but also
  3064. to try to enable it.  ckermit2.upd, ckvtio.c, 31 Dec 97.
  3065.  
  3066. Added SET LINE /NOSHARE (VMS), the opposite of /SHARE, since VMS people like
  3067. their switches in pairs.  ckuusr.h, ckuus[27].c, 31 Dec 97.
  3068.  
  3069. Changed all the VMS code that tests for SS$_HANGUP to do so only when
  3070. CARRIER-WATCH is not OFF.  txbufr(), contti(), ckvtio.c, 31 Dec 97.
  3071.  
  3072. Removed text from HELP SET CARRIER-WATCH saying that it didn't work in VMS.
  3073. ckuus2.c, 31 Dec 97.
  3074.  
  3075. Removed VMS warning text from SET CARRIER-WATCH.  ckuus3.c, 31 Dec 97.
  3076.  
  3077. Changed /CONNECT to undo any previous /SERVER and vice versa; the two are
  3078. contradictory and mutually exclusive, so if more than one are given, the last
  3079. one sticks.  ckuus7.c, 31 Dec 97.
  3080.  
  3081. Added carrier check at VMS CONNECT entry, just like in UNIX, to enforce
  3082. CARRIER-WATCH setting.  ckvcon.c, 31 Dec 97.
  3083.  
  3084. Improved the "Carrier required but not detected" message in the UNIX CONNECT
  3085. module (making it the same as the VMS one).  ckucon.c, 31 Dec 97.
  3086.  
  3087. Removed scary message from VMS CONNECT module if CD drops but CARRIER-WATCH
  3088. is OFF.  ckvcon.c, 31 Dec 97.
  3089.  
  3090. Commented out three gratuitous "blah connected on port blah" messages from
  3091. ckcnet.c which started popping up yesterday.  With only very few exceptions,
  3092. the upper-level code should take care of printing information messages.
  3093. ckcnet.c, 31 Dec 97.
  3094.  
  3095. Discovered that elapsed-time (and therefore also CPS) calculations were
  3096. complete nonsense in VMS on the Alpha, even though they were OK on the VAX.
  3097. Changed definition of CKFLOAT from "double" to "float" on the Alpha only.
  3098. which seems to have fixed it.  ckcdeb.h, 31 Dec 97.
  3099.  
  3100. This bodes ill for other operating systems on the Alpha (like Digital UNIX),
  3101. especially if they use DEC C, but I tried it on DU4.0 as "double".  It did
  3102. the calculations correctly, but eventually died with a "floating point
  3103. exception", so I made CKFLOAT "float" here too.  ckcdeb.h, 31 Dec 97.
  3104.  
  3105. More fooling with Digital UNIX 4.0.  Regular file transfer works OK, but
  3106. streaming halts (hangs) almost immediately.  Debug log shows FIONREAD is
  3107. returning ridiculous numbers, like 4393751543808...  And so then we get
  3108. awfully confused trying to read that many bytes.  "man 7 tty" in DU4.0 says
  3109. the FIONREAD ioctl arg is int *, but I was using long *.  Changed it to int *,
  3110. and now get reasonable results from it -- numbers like 252 or less.  But it
  3111. still hangs when trying to stream.  Aha, it's only the stupid Xon/Xoff
  3112. business.  I wonder why it doesn't happen when not streaming?  Probably
  3113. because streaming is so much faster...  Anyway, the change to ckutio.c was a
  3114. good one, and long overdue -- I wonder how the code ever worked before...
  3115. 31 Dec 97.
  3116.  
  3117. (I wonder what happens with Linux on the Alpha...)
  3118.  
  3119. Back to VMS...  If I Telnet from VMS C-K to somewhere else, then close the
  3120. connection (to return to remote mode), then type "receive", it goes back the
  3121. prompt immediately.  This is fallout from the December 22 change regarding
  3122. ttclos() setting network to 0.  Well now nobody was.  Fixed by making ttopen()
  3123. set network to 0 when it opens a serial connection.  ckvtio.c, 31 Dec 97.
  3124.  
  3125. Updated ckuker.bwr.  31 Dec 97 (sic transit anno 1997).
  3126.  
  3127. In the UNIX version, initialize all 12 file pointers to NULL, not just the
  3128. first 8.  ckufio.c, 1 Jan 98.
  3129.  
  3130. Documented modem signal treatment in VMS.  ckvker.bwr, section 3.1.4,
  3131. 1 Jan 98.
  3132.  
  3133. Don't print hangup error message in VMS C-Kermit during CONNECT if
  3134. CARRIER-WATCH is OFF.  ckvtio.c, 1 Jan 98.
  3135.  
  3136. When doing a labeled-mode transfer, if an as-name was given in the RECEIVE or
  3137. GET command, it should override the file's internal name, but until now it
  3138. didn't, which was very confusing.  This is now done by doing an implicit "set
  3139. file label name off" in rcvfil(), and then restoring the "set file label name"
  3140. setting to its previous value after the transfer.  Tested, works.  ckcfns.c,
  3141. ckuus[6x].c, 1 Jan 98.
  3142.  
  3143. Added cross-references to other relevant SHOW commands from SHOW FILE.
  3144. ckuus4.c, 1 Jan 98.
  3145.  
  3146. Minor cosmetic improvements to SHOW SCRIPTS.  ckuus5.c, 1 Jan 98.
  3147.  
  3148. Added Streaming and CKFLOAT type (float or double) to SHOW FEATURES.
  3149. ckuus5.c, 1 Jan 98.
  3150.  
  3151. Defined CK_PERMS for VMS to see what would happen.  Nothing.  ckcdeb.h,
  3152. 1 Jan 98.
  3153.  
  3154. There's already code from Terry in ckvfio.c to fill in this stuff, but it has
  3155. never been exercised.  Does it send generic protection?  No, because the code
  3156. was putting binary data into the A packet.  Fixed it to convert to strings
  3157. (hex for 16-bit system-dependent, tochar() for generic).  VMS sys-dependent
  3158. protection is hex representation of WGOS fields (World,Group,Owner,System)
  3159. in that order; in each field Bit 0 = Read, 1 = Write, 2 = Execute, 3 = Delete.
  3160. A bit value of 0 means permission is granted, 1 means permission is denied.
  3161. ckvfio.c, 1 Jan 98.
  3162.  
  3163. VMS generic protection was being sent for "world" (by the book), but we're
  3164. doing it for "owner" instead these days, which makes more sense, so I made
  3165. this change.  So now VMS C-Kermit sends both permission fields correctly:
  3166.  
  3167.   r-01-00-^A/!FWERMIT.EXE'"
  3168.   s-01-00-^AE!Y/amd/watsun/w/fdc/new/wermit.exe.DV
  3169.   r-02-01-^A]"A."D7""B8#119980101 18:14:05!#8531&872960,$A20B-!7(#512@ #.Y
  3170.   s-02-01-^A%"Y.5!                                     ^^^^^^^^^
  3171.  
  3172. The system-dependent protection "A20B" corresponds to (E,RWED,RED,RE) (but
  3173. note the order of fields is reversed and the bit sense is reversed).  The
  3174. generic protection "7" = 23 + 32; 23 = 16+4+2+1 = Read, Write, Execute,
  3175. Delete, which is indeed the owner permission.  ckvfio.c, 1 Jan 98.
  3176.  
  3177. This was somewhat difficult and time-consuming without manuals, man pages, or
  3178. header files, requiring much trial and error...  Then came the even more
  3179. mysterious task of setting received-file protection from the incoming
  3180. Attribute packet.  Two cases:
  3181.  
  3182.  1. Local protection (for VMS-VMS transfers; needs "set transfer mode manual"
  3183.     or else we get labeled transfer, which bypasses all of this).  I've got
  3184.     this working to the point of converting the incoming bit (like ",$E20B")
  3185.     to internal format.  (Once this works, we can easily extend it to cover
  3186.     RSX, etc, provided PDP-11 Kermit uses the same format, which it probably
  3187.     doesn't.)
  3188.  
  3189.  2. Generic protection.  I've got this working to the point of converting
  3190.     the generic format to VMS internal format, but only for the one field.
  3191.     What do I set the other fields to?
  3192.  
  3193. And then, in both cases, I wind up at the bottom of zstime() with
  3194. xabpro_ofile.xab$w_pro filled in with a plausible value, but then nobody ever
  3195. uses it for anything so the incoming file's protection is never actually set.
  3196. That last part needs a VMS expert:
  3197.  
  3198.  1. How do I get the default protection for the file we're creating so I
  3199.     can set the non-owner fields to reasonable values?  For example, if it's
  3200.     a new version of an existing file, it should (and normally does) inherit
  3201.     its protection, but that happens transparently to Kermit.  But now we want
  3202.     to get the protection that *would* be set and change the owner field
  3203.     according to the attribute.
  3204.  
  3205.  2. What do I do with xabpro_ofile.xab$w_pro once it's filled in?  zstime()
  3206.     sets the file date simply by copying it to xabdat_ofile.xab$q_cdt, and
  3207.     then this is picked up later by zopeno(), so why isn't the protection
  3208.     also picked up?  I couldn't quite follow all the RABs and FABs...
  3209.  
  3210. The upshot is, protection/permissions work when sending from VMS to UNIX, but
  3211. not in the other direction.  So, for example, if you send an EXE file from VMS
  3212. to UNIX, it keeps its execute permission.  If we can get this working in the
  3213. other direction, then when you send it back from UNIX to VMS, it will still
  3214. have its execute permission.
  3215.  
  3216. Changed UNIX C-Kermit to set Delete bit in Generic permissions if file has
  3217. Owner Write permission (since UNIX has no separate Delete permission), and to
  3218. treat Delete bit in incoming Generic permission equivalent to Write bit.
  3219. ckutio.c, 1 Jan 98.
  3220.  
  3221. Tried not defining NOLISTEN for VMS to see what would happen.  It worked OK on
  3222. UCX 2.0.  It failed horribly on MultiNet; I twiddled some stuff here and there
  3223. and seem to have got it working.  Went back to UCX to make sure I didn't break
  3224. it there...  Hmmm, still seems to work.  ckcnet.[ch], ckermit2.upd, 1 Jan 98.
  3225.  
  3226. VMS: turn off broadcasts on the *console* channel as well as on the
  3227. communications channel.  conbin(), ckvtio.c, 2 Jan 98.
  3228.  
  3229. Changed the UNIX version when it is about to set a received file's owner
  3230. permissions from the incoming generic protection attribute, to use the umask
  3231. for the group and world permissions.  zstime(), ckufio.c, 2 Jan 98.
  3232.  
  3233. Updated File Permissions section of ckermit2.upd, 2 Jan 98.
  3234.  
  3235. Updated ckermit.bwr, and added a new section on "echoplex" scripts.  2 Jan 98.
  3236.  
  3237. Moved usage() routine and hlp1[] strings from ckuus2.c to ckuusy.c.  2 Jan 98.
  3238.  
  3239. Added little help blurbs for each command-line argument.  ckuusy.c, 2 Jan 98.
  3240.  
  3241. Added HELP OPTIONS [ { <opt>, ALL } ].  If <opt> given, it prints the short
  3242. HELP text for the option.  If ALL given, it prints them for all options, with
  3243. more-prompting, etc.  HELP OPTIONS by itself explains command-line options.
  3244. ckuusr.h, ckuus[2y].c, 2 Jan 98.
  3245.  
  3246. VMS protections, cont'd...  John Santos showed me how to link the protection
  3247. field into that rat's nest of FABs, RABs, and XABs, so now we are actually
  3248. setting the VMS file protection from the incoming A packet.  And it works for
  3249. both system-dependent (VMS 16-bit) and generic Kermit protections, hurray.
  3250. Except when using the generic protection, the non-Owner fields are set to 0,
  3251. e.g. (,RWED,,); I'll do something about that tomorrow.  ckvfio.c, 2 Jan 98.
  3252.  
  3253. Added \v(pid) for VMS.  ckcdeb.h, ckvfio.c, 3 Jan 98.
  3254.  
  3255. Added code to VMS version to set its process name to "C-Kermit_6.1".
  3256. If that's a duplicate name, then "C-Kermit_6.1_1", C-Kermit_6.1_2", etc.
  3257. sysinit(), ckvtio.c, 3 Jan 98.
  3258.  
  3259. Added code to VMS zstime() to get the user's default file protection with
  3260. sys$setdfprot(), and then used it to set the S, G, and W fields when setting O
  3261. field from generic protection (but using the O field as a mask for the other
  3262. fields).  ckvfio.c, ckcplm.doc, ckermit2.upd, 3 Jan 98.
  3263.  
  3264. Merged some changes from Jeff.  ckcmai.c, ckcnet.c, ckuus[xy].c, ckuusr.h,
  3265. 3 Jan 98.
  3266.  
  3267. Minor cosmetic cleanups to HELP OPTIONS.  ckuus[2y].c, 3 Jan 98.
  3268.  
  3269. Increased Olimit for SINIX to 2100.  makefile, 3 Jan 98.  (But now ckcpro.c
  3270. takes a loooooong time to compile...)
  3271.  
  3272. Numerous last-minute #ifdef & declaration adjustments.  Many modules.
  3273. 3 Jan 98.
  3274.  
  3275. At the last moment, found that what should have been "xitsta |= what;" had
  3276. been typed as "xitsta != what;" (watcom caught it - "meaningless expression").
  3277. So it's corrected in the code, but wrong in all the Alpha.11 binaries.
  3278. ckcpro.w, 3 Jan 98.
  3279.  
  3280. ---Alpha.11---
  3281.  
  3282. (See last entry for Alpha.11.)
  3283.  
  3284. Some fixes to usage() message.  ckuus[2y].c, 4 Jan 98.
  3285.  
  3286. Minor fixes from David Lane to a debug() statement in ckcnet.c and to
  3287. VOS-related #ifdefs in ckcdeb.h, 4 Jan 98.
  3288.  
  3289. Added display of sizeof(xxx) to SHOW FEATURES, for xxx == int, char, long, etc.
  3290. ckuus5.c, 6 Jan 98.
  3291.  
  3292. Merged Jeff's recent changes, many modules.  13 Jan 98.
  3293.  
  3294. Merged David Lane's changes for Stratus VOS, adding support for recursive
  3295. directory traversal, fully-qualified filenames, etc.  ckcdeb.h, ckuusx.c,
  3296. plus all-new ckl*.* modules, 13 Jan 98.
  3297.  
  3298. We were still getting floating-point exceptions and related difficulties (up
  3299. to and including system halts) in Alpha.11 apparently due to constructions
  3300. like the following:
  3301.  
  3302.     if (fpxfsecs <= 0.0)
  3303.       fptsecs = (CKFLOAT) 0.000001;
  3304.     filcps = (long)((CKFLOAT) ffc / fpxfsecs);
  3305.  
  3306. The division by a tiny number created a quotient that might not fit in a long.
  3307. I replaced all references to "0.000001" by GFMINTIME, which is now defined in
  3308. ckcdeb.h to be 0.005.  This doesn't totally fix the problem, but makes it a
  3309. lot less likely.  E.g. suppose we have network so fast that we can transfer a
  3310. 1MB file in less time than can be measured, so fpxfsecs is 0.0.  When we set
  3311. the time to 0.00001:
  3312.  
  3313.   1,000,000 / 0.00001 = 1,000,000,000,000
  3314.  
  3315. but 2^32 (the longest long) is 4,294,967,296, too small for this number,
  3316. hence the trap.  But if we set the time to 0.005:
  3317.  
  3318.   1,000,000 / 0.005 = 200,000,000
  3319.  
  3320. which fits.  The new symbol GFMINTIME is defined to this value, and we use
  3321. the symbol everywhere rather than the hardwired value.
  3322.  
  3323. But this still doesn't fix the problem; if the file were (say) 3MB, it would
  3324. still happen.  So we also have to check whether the result of a division would
  3325. exceed the capacity of a long (or int) to hold it, and in that case take
  3326. special action to avoid the trap.  ckcdeb.h, ckcfn2.c, ckutio.c, 13 Jan 98.
  3327.  
  3328. Recoded the memcpy() replacement loop in ckcnet.c to not use an uninitialized
  3329. variable.  Then replaced the loop altogether with a call to a new routine,
  3330. ckmemcpy(), which is a system-independent version of memcpy() that can be
  3331. called safely from anywhere in C-Kermit.  Presently it's defined in ckcmai.c,
  3332. but eventually all of these utility routines should be moved out to a new
  3333. ckcuti.c module.  13 Jan 98.
  3334.  
  3335. Fixed an out-of-bounds array reference in the new debug(F011,...) handler.
  3336. From William Bader.  ckuusx.c, 13 Jan 98.
  3337.  
  3338. Raised MAXWLD for VMS from 4K to 1024K and made mtchs[] array dynamic.
  3339. ckvfio.c, 14 Jan 98.
  3340.  
  3341. Raised MAXWLD for UNIX in the non-BIGBUFOK case from 1K to 4K.  ckufio.c,
  3342. 14 Jan 98.
  3343.  
  3344. Moved MAXWLD definition from ck[uvdl]fio.c to ckcdeb.h, so we can access
  3345. it from other modules.  Added MAXWLD display to SHOW FEATURES.  ckuus5.c,
  3346. 14 Jan 98.
  3347.  
  3348. Defined BIGBUFOK for HP-UX 9.x.  ckcdeb.h, 14 Jan 98.
  3349.  
  3350. Added makefile entries and banner for HP-UX 11.00: "make hpux1100", etc.
  3351. makefile, ckuver.h, 14 Jan 98.
  3352.  
  3353. UNIX C-Kermit CONNECT command was not checking the return code of ttchk() for
  3354. a negative value, and so was not popping back to the prompt automatically.
  3355. Seems to do so now, at least on HP-UX, as long as CARRIER-WATCH is not OFF.
  3356. ckucon.c, 14 Jan 98.
  3357.  
  3358. By chance, I noticed something very strange in UNIX:
  3359.  
  3360.   C-Kermit> send /b foo
  3361.  
  3362. Sent the "foo" file over and over again.  Diagnosis: "/b" is not treated as a
  3363. switch because it does not uniquely match any switch (it is ambiguous between
  3364. /binary and /before).  So since it does not match a switch, we look to see if
  3365. it matches a file.  It so happens, there was a "b" directory under root.  Now
  3366. with the new recursive file sending feature, the SEND command, when given a
  3367. directory name, sends the files from the directory.  In other words, "/b"
  3368. is treated as "/b/*".  But the b directory contained no files, so zxpand()
  3369. came up with 0.  In that case, UNIX zxpand would call zltor() on the filespec
  3370. and try again.  Bad idea!  This caused the pathname to be stripped, leaving
  3371. only "*".  So "send /b foo" sent all the files from the current directory
  3372. with an as-name of "foo".  Cure: (1) remove the fallback -- if the filespec
  3373. doesn't match anything, that's that.  And (2) Make "/b" an acceptable
  3374. (nonunique) abbreviation for "/binary".  ckufio.c, ckuusr.c, 14 Jan 98.
  3375.  
  3376. Added missing return(0) to dohopts().  ckuus2.c, 14 Jan 98.
  3377.  
  3378. In SGI IRIX and in NeXTSTEP, there is no API for hardware flow control, but it
  3379. can still be used by selecting a device with a particular name, like /dev/cufa
  3380. instead of /dev/cua.  But in this case SET FLOW AUTO would wind up setting the
  3381. flow control to Xon/Xoff instead of leaving it alone.  Added #ifdefs for IRIX
  3382. and NeXT to prevent this.  Also defined a new IRIX symbol for all IRIX
  3383. versions 4.0 and later.  ckcdeb.h, ckuus3.c, 14 Jan 98.
  3384.  
  3385. How does VMS C-Kermit know if it's running under batch.  Currently:
  3386.  
  3387.  . When run interactively, batch == 0.
  3388.  . If started from a COM file, batch == 1.
  3389.  . If started in batch, batch == 1 and congm sys$qiow = SYSTEM-F-ILLIOFUNC
  3390.  . In batch, SHOW LOG SYS$INPUT says "_NLA0:".
  3391.  
  3392. Tried adding a sys$getjpiw() call, once I figured out how to set it up.
  3393. If asked for JPI$_MODE, it returns the mode of the job: batch, interactive,
  3394. etc: perfect.  Builds and runs fine on VMS 5.5-2, so should be OK elsewhere.
  3395. ckvtio.c, 14 Jan 98.
  3396.  
  3397. Fixed the new xxscreen() macro to not call screen() if batch (VMS) or backgrd
  3398. (elsewhere) was set.  ckcker.h.  This also required adding extern declarations
  3399. for batch & backgrd to ckcfn[s23].c, ckcpro.w, and ckuusx.c.  14 Jan 98.
  3400.  
  3401.  . Fullscreen display in interactive sessions: Yes
  3402.  . Fullscreen display in @blah.com sessions:   ??
  3403.  . Fullscreen display in submit blah sessions: No <-- so this is fixed now.
  3404.  
  3405. Not sure what the deal is with when running C-Kermit with @blah.com, where
  3406. blah.com contains image data...  But batch jobs now work nicely, don't put any
  3407. junk in the batch log.
  3408.  
  3409. Added SET BATCH { ON, OFF } in VMS to let user have the final word.  ckuusr.c,
  3410. 14 Jan 98.
  3411.  
  3412. Minor fixes to "help options" text.  ckuus2.c, 14 Jan 98.
  3413.  
  3414. VMS C-Kermit reported a "fatal error" when executing an INPUT command on a
  3415. modem when it hung up, even though CARRIER-WATCH was OFF.  Tracked this down
  3416. with help of a debug log from Dale Dellutri.  Fixed in txbufr(), ckvtio.c,
  3417. 15 Jan 98.
  3418.  
  3419. Dale D. also reported that an extraneous character could show up on the
  3420. CONNECT screen when the remote hung up.  No explanation jumps out from the
  3421. code, but I changed VMS ttinc() to not deduct 1 from the buffer count until
  3422. first checking that it's > 0.  ckvtio.c, 15 Jan 98.
  3423.  
  3424. Checked the VMS version on a system where I can dial out -- I don't seem to
  3425. have broken anything, and I don't see any of the symptoms any more that I
  3426. tried to fix, so maybe that's progress.
  3427.  
  3428. Built on the NeXT, dialed out, logged in somewhere, logged out, and for the
  3429. first time ever, C-Kermit popped back to its prompt automatically.  And if
  3430. CARRIER-WATCH is OFF it doesn't, and you can see the NO CARRIER message and
  3431. type more AT commands.
  3432.  
  3433. Evidently the HP workstation Reset key sends some kind of ueber-SIGINT that
  3434. can not be SIG_IGNored.  When the user hits it (usually because it's where PC
  3435. users expect Esc to be), suddenly we're in the Ctrl-C handler, longjmping back
  3436. to the prompt, which leaves the lower CONNECT spinning away merrily.  What's
  3437. odd about this is that it is the *previous* SIGINT handler, not the current
  3438. one, which is SIG_IGN.  I sent off a query to HP about how to handle this, but
  3439. in the meantime, in addition to the stale-fork-killing code I added to
  3440. ckucon.c a while back, I made the Ctrl-C trap simply return
  3441. "if (what == W_CONNECT)".  ckuusx.c, 15 Jan 98.
  3442.  
  3443. Peter Eichhorn verifies this fixes leftover fork problem on HP-UX; Reset is
  3444. now properly ignored during CONNECT and causes SIGINT at the command prompt,
  3445. which is handled properly.  16 Jan 98.
  3446.  
  3447. To subtract from, or maybe add to, the confusion about text and binary mode,
  3448. I made sure that if the user says SEND (MSEND, etc) /BINARY, that binary mode
  3449. is really used, i.e. not superseded by filename pattern-matching, or by
  3450. TRANSFER MODE AUTO.  Ditto for SEND /TEXT of course.  ckuus[r6x].c, 16 Jan 98.
  3451.  
  3452. Unfortunately, matters are not quite so simple with GET because WHOAMI takes
  3453. precedence over WHATAMI, as the manual states.  WHOAMI is controlled by SET
  3454. TRANSFER MODE, so if I tell the client to SET TRANSFER MODE MANUAL, then "get
  3455. /text x.zip", it should work.  But it doesn't because the server still has
  3456. FILE PATTERNS ON and ".zip" is a binary pattern.
  3457.  
  3458. While looking into this, I also discovered that REMOTE SET FILE TYPE was
  3459. broken.  Why?  Because as soon as we changed the mode, it was restored to its
  3460. previous value because it didn't also change g_binary (the global, prevailing
  3461. mode).
  3462.  
  3463. OK, fine, that's fixed.  But now if TRANSFER MODE is MANUAL, WHATAMI still
  3464. doesn't work.  Why?  Again because of the patterns.  gnfile() was resetting
  3465. its file type to whatever it was when protocol started between each file, so
  3466. as to get the global file mode right when pattern-switching.  So this undid
  3467. WHATAMI.  Fixed in gnfile(), ckcfns.c, 16 Jan 98.
  3468.  
  3469. So now if I tell the server to SET TRANSFER MODE MANUAL before putting it in
  3470. server mode, everything works right.  But there is no way for the client to do
  3471. this after the server is started.  So I added REMOTE SET TRANSFER MODE.  The
  3472. new code is 410, the values are 0 for AUTO, 1 for MANUAL.  Client side in
  3473. ckuus3.c, server sever side in remset() in ckcfns.c, documentation in
  3474. ckermit2.upd, 16 Jan 97.  Also sent a note to JRD so he can add it to MSK.
  3475.  
  3476. Added REMOTE SET XFER as a synonym for REMOTE SET TRANSFER and fixed both of
  3477. these to have a private keyword list rather than using the non-REMOTE one.
  3478. ckuus7.c, 17 Jan 98.
  3479.  
  3480. Additions/corrections to text and binary patterns lists.  ckcmai.c, 17 Jan 98.
  3481.  
  3482. Added \v(intime) to tell the number of milliseconds it took for INPUT to
  3483. find its match.  ckuusr.h, ckuus4.c, ckermit2.upd, 17 Jan 98.
  3484.  
  3485. Added display of modem's dial result message to "Call complete" if DIAL
  3486. DISPLAY not ON (and not quiet, etc).  ckudia.c, ckermit2.upd, 17 Jan 98.
  3487.  
  3488. Added \fword(s1,n1,s2) to return word number n1 from string s1, with optional
  3489. break set s2.  ckuusr.h, ckuus[24].c, ckermit2.upd, 17 Jan 98.
  3490.  
  3491. Fixed cmfdb() to print an error message if it gets through all the chained
  3492. fdb's without finding anything and the return code from the last parsing
  3493. function is -9.  Previously it just moved the cursor backwards silently
  3494. over the offending field.  ckucmd.c, 18 Jan 98.
  3495.  
  3496. If a command has a switch that takes an argument followed by a switch that
  3497. does not, e.g.:
  3498.  
  3499.   send /as:oofa.txt /text foo.bar
  3500.  
  3501. and then this command is recalled, there is a parse error.  Fixed in gtword(),
  3502. ckucmd.c, 18 Jan 98.
  3503.  
  3504. Added help text for KERMIT command.  ckuus2.c, 18 Jan 98.
  3505.  
  3506. Added optional message to EXIT/QUIT, like END and STOP.  ckuusr.c, 18 Jan 98.
  3507.  
  3508. Merged Jeff's recent changes, ckcdeb.h, ckuus7.c, ckcnet.c.  19 Jan 98.
  3509.  
  3510. Adjusted the constants for float->long overflow detection in fstats() and
  3511. tstats() (thanks to gcc -Wall).  ckcfn2.c, 19 Jan 98.
  3512.  
  3513. Ran a bunch of feature-test builds on SunOS; each one involved some --
  3514. sometimes lots of -- #ifdef adjustments and declaration juggling, especially
  3515. the ones marked with (*).  ckuus5.c, in particular, has been massively
  3516. rearranged:
  3517.  
  3518.  . (full)           ok (1097K)
  3519.  . -UDYNAMIC        ok (1081K)
  3520.  . CK_SMALL         ok (1073K)
  3521.  . MINIDIAL         ok (1064K) (*)
  3522.  . NOBIGBUF         ok (1081K)
  3523.  . NOBROWSER        ok (1081K)
  3524.  . NOCAL            ok (1089K)
  3525.  . NOCKSPEED        ok (1089K)
  3526.  . NOCKTIMERS       ok (1089K) (*)
  3527.  . NOCMDL           ok (1073K)
  3528.  . NOCKXYZ          ok (1089K)
  3529.  . NOCSETS          ok (1024K)
  3530.  . NODEBUG          ok ( 991K)
  3531.  . NODIAL           ok ( 958K)
  3532.  . NOFRILLS         ok (1056K)
  3533.  . NOGFTIMER        ok (1089K)
  3534.  . HOHELP           ok ( 974K)
  3535.  . NOICP            ok ( 393K) (*)
  3536.  . NOJC             ok (1089K)
  3537.  . NOKERBEROS       ok (1089K)
  3538.  . NOLOCAL          ok ( 770K) (*)
  3539.  . NOMKDIR          ok (1089K) (*)
  3540.  . NONET            ok (1015K)
  3541.  . NOPARSEN         ok (1089K)
  3542.  . NOPATTERNS       ok (1081K)
  3543.  . NOPERMS          ok (1089K)
  3544.  . NOPIPESEND       ok (1089K)
  3545.  . NOPUSH           ok (1073K) (*)
  3546.  . NORECURSIVE      ok (1097K)
  3547.  . NOREDIRECT       ok (1089K)
  3548.  . NORENAME         ok (1089K)
  3549.  . NORESEND         ok (1089K)
  3550.  . NOSETKEY         ok (1089K)
  3551.  . NOSERVER         ok (1064K)
  3552.  . NOSHOW           ok (1040K) (*)
  3553.  . NOSPL            ok ( 925K) (*)
  3554.  . NOTRIGGER        ok (1089K)
  3555.  . NOTUNING         ok (1089K)
  3556.  . NOUNPREFIXZERO   ok (1097K)
  3557.  . NOSPL+NOLOCAL    ok ( 614K)
  3558.  . sunos42mi        ok ( 294K) ("minimum interactive")
  3559.  . sunos41m         ok ( 180K) ("minimum" - cmd line only)
  3560.  
  3561. After getting all these to build, I went through the list a second time to
  3562. make sure that the accumulated fixes didn't break earlier builds.  Then I
  3563. spot-checked various builds to make sure they transferred files OK, etc.
  3564. 19 Jan 98.
  3565.  
  3566. Fixed "kermit -Q" to work no matter what the compile-time buffer lengths are.
  3567. ckuusy.c, 20 Jan 98.
  3568.  
  3569. Still more #ifdef adjustments for feature selection.  20 Jan 98.
  3570.  
  3571. Added an "include list" for \fword() (an exception list to the break set).
  3572. ckuus4.c, ckermit2.upd, 20 Jan 98.
  3573.  
  3574. Fixed cmdate() to not accept times that were so large they would wrap around
  3575. and become negative.  ckuus4.c, 20 Jan 98.
  3576.  
  3577. Discovered that filename completion was broken on VMS.  Fixed in ckucmd.c,
  3578. 20 Jan 98.
  3579.  
  3580. Updated some of the UNIX makefile production rules to include ckcnet.h.
  3581. makefile, 20 Jan 98.
  3582.  
  3583. Discovered that TELOPT_AUTHENTICATION is erroneously defined as 45 on Ultrix,
  3584. OSF/1, Digital Unix, and IRIX (all versions of each).  It should be 37.  This
  3585. introduces conflicting definitions in the preprocessor, which I #ifdef'd out.
  3586. ckcnet.h, 20 Jan 98.
  3587.  
  3588. ---Alpha.12---
  3589.  
  3590. Merged Jeff's changes since last week.  ckuus7.c, ckcnet.c, ckucmd.c,
  3591. 26 Jan 98.
  3592.  
  3593. Added \fsplit(string,&array,break,include).  ckuusr.h, ckuus4.c, ckuus2.c,
  3594. ckermit2.upd, 26 Jan 98.
  3595.  
  3596. Made SHOW NETWORK available in all versions; if no network support is
  3597. included, it says so.  ckuus[r5].c, 26 Jan 98.
  3598.  
  3599. Integrated Jeff's changes since yesterday.  ckuus7.c, ckcnet.[ch], ckuusr.h,
  3600. 27 Jan 98.
  3601.  
  3602. Added SET TCP REVERSE-DNS-LOOKUP { ON, OFF }.  Sets tcp_rdns; code needs to
  3603. be added to use it.  ckuusr.[ch], ckuus[234].c, ckcnet.c, 27 Jan 98.
  3604.  
  3605. Added -DNOGFTIMER to HP-UX 5.00 makefile entry, since the high precision
  3606. timers give off-the-wall results there.  makefile, 27 Jan 98.
  3607.  
  3608. Changed predefined FAST macro to "set prefixing cautious" instead of "minimal".
  3609. ckuus5.c, 27 Jan 98.
  3610.  
  3611. Discovered that command-line syntax error messages were never printed.
  3612. Fixed in fatal(), ckuusx.c, 27 Jan 98.
  3613.  
  3614. Merged Jeff's changes.  ckuus[r37].c, ckcnet.[ch], 28 Jan 98.
  3615.  
  3616. Moved +DA1.0 from the hpux100o entries to the basic one, since it applies to
  3617. both compilers.  makefile, 28 Jan 98.
  3618.  
  3619. Added -pipe to linux entry so it won't make temp files, allowing builds on
  3620. systems where /tmp is too full.  makefile, 28 Jan 98.
  3621.  
  3622. In VMS, make zshcmd() (RUN command) return proper status, ditto for zxcmd(),
  3623. and make both set pexitstat.  ckcdeb.h, ckuus4.c, ckvfio.c, 29 Jan 98.
  3624.  
  3625. Enabled ck_errstr() for VMS, but errno is always 0.  Tried it again based on
  3626. vaxc$errno, same result.  So then I went thru ckvfio.c and ckvtio.c and
  3627. assigned the return of every sys$blah() and lib$blah() call to a global
  3628. variable, vms_lasterr.  Works.  ckv[ft]io.c, ckuusx.c, 29 Jan 98.
  3629.  
  3630. Added \ferrstring(n), returns error message for code n.  In <sys/errno.h>
  3631. environments (like UNIX), this requires knowing the maximum index of the
  3632. sys_errlist[] array, normally sys_nerr.  We'll soon find out how portable
  3633. that is...  UNIX and VMS only for now.  ckuusr.h, ckuus4.c, 29 Jan 98.
  3634.  
  3635. Added SET FUNCTION DIAGNOSTICS { ON, OFF }.  When ON, this makes variables
  3636. and functions return an error-message string as their values.  ckuusr.h,
  3637. ckuus[34].c.  30 Jan 98.
  3638.  
  3639. Discovered that array initializers were off by one (i.e. not skipping over
  3640. the "=" sign); numerous other problems with array bounds, malloc'ing and
  3641. freeing, etc, when processing initializers.  ckuusr.c, 30 Jan 98.
  3642.  
  3643. Added makefile entrys aix41, aix42, aix43.  These are all the same, but
  3644. set a different program herald.  ckuver.h, makefile, 31 Jan 98.
  3645.  
  3646. Kerberos V authentication added to Linux version, using Cygnus libs.
  3647. Encryption does not work yet due to fork structure of ckucon.c.  makefile,
  3648. ckcmai.c, ckuus5.c, ckutio.c, ckcnet.[ch] + new non-public krbtel.[ch] module,
  3649. documented in kerberos.txt.  1 Feb 98.
  3650.  
  3651. Fixed the size of the command buffer to be at least as big as the function
  3652. result buffer.  This means, for BIGBUFOK builds, 10K rather than 4K.
  3653. ckucmd.h, 1 Feb 98.
  3654.  
  3655. Added SET FUNCTION ERROR { ON, OFF }.  When ON, this makes any command that
  3656. contains a bad function call or built-in variable reference fail.
  3657. ckermit2.upd, ckuus[2345].c.  1 Feb 98.
  3658.  
  3659. Uncoupled display of dialing-directory related info during dialing from
  3660. SET DIAL DISPLAY ON, which should only affect whether dialog with modem is
  3661. shown.  ckuus6.c, 1 Feb 98.
  3662.  
  3663. Fixed some prompt-stomping in VMS DIAL command when DIAL DISPLAY is ON.
  3664. ckudia.c, 1 Feb 98.
  3665.  
  3666. Added "k95" as a command to K95, an alias to "kermit".  ckuusr.c, 1 Feb 98.
  3667.  
  3668. Fixed minor problem with completion of "intro" command.  ckuusr.c, 1 Feb 98.
  3669.  
  3670. Discovered that isabsolute() for UNIX, OSK, Amiga, and K95 returned 1 instead
  3671. of 0 if the filename started with ".", which is completely wrong.  One symptom
  3672. was that an incoming file whose name started with "." when RECEIVE PATHNAMES
  3673. were RELATIVE would have a second dot added to the front of its name.  I can't
  3674. imagine why this was done in the first place, and hope I haven't broken
  3675. anything that depended on this -- but if I did, it shouldn't have...
  3676. ckcmai.c, 1 Feb 96.
  3677.  
  3678. When a file group is being transferred, CPS rates were not being calculated
  3679. after the first file.  Must have happened during the GFTIMER work...  Fixed
  3680. in ckuusx.c, 1 Feb 96.
  3681.  
  3682. In VMS, on a serial connection with CARRIER-WATCH off, and the remote hangs up
  3683. while C-Kermit is in CONNECT mode, contti() gets a completion from sys$qiow()
  3684. indicating SS$_HANGUP, but no character; however, Kermit was returning a
  3685. character anyway, whatever happened to be left in the variable from last time.
  3686. Fixed by having contti() set the read up to be queued again next time and then
  3687. returning a special status, -2.  ckcgetc(), looks for the -2 and then calls
  3688. contti() again, up to 10 times.  Experimentation shows that the second call
  3689. always succeeds -- SS$_HANGUP is returned only once; after that, reads work
  3690. normally again.  ckvtio.c, ckvcon.c, 1 Feb 98.
  3691.  
  3692. Quick check-builds on SunOS, Linux, HP-UX, VMS, and Unixware all compile OK...
  3693.  
  3694. Added test & message for no-such-macro to \fexec().  Added tests for bad array
  3695. references to \fwords().  Added tests for numeric arguments that were not
  3696. there yet, supplied defaults where they were not previously being supplied in
  3697. cases where it made sense, etc.  ckuus4.c, 2 Feb 98.
  3698.  
  3699. Added RTS/CTS for IRIX 6.2 and higher, since an API for it seems to have
  3700. appeared in termios.h; the "POSIX" style is used (tcsettar()), but the field
  3701. name is unique (CNEW_RTSCTC).  ckcdeb.h, 2 Feb 98.
  3702.  
  3703. Upon receipt of newer information, fixed RTS/CTS support for SGI to go back
  3704. to IRIX 5.2.  ckcdeb.h, ckuver.h, makefile, 3 Feb 98.
  3705.  
  3706. Added "set send packet 4000" to definition of FAST macro for IRIX.  ckuus5.c,
  3707. 3 Feb 98.
  3708.  
  3709. Removed a lot of junk from ckermit.ini that isn't needed any more -- EDIT
  3710. macro, BSEND and friends, etc.  3 Feb 98.
  3711.  
  3712. Numerous declaration and #ifdef fixups, many modules, 4 Feb 98.
  3713.  
  3714. ---Alpha.13---
  3715.  
  3716. Merged Jeff's changes: Telnet X-display-location, logout options, etc.
  3717. ckcnet.[ch], ckuus[27].c, ckcdeb.h, 5 Feb 98.
  3718.  
  3719. Changed \%* to hold the entire argument line for the macro, so now it can
  3720. be used to reference arguments past \%9.  ckuus[45].c, 5 Feb 98.
  3721.  
  3722. Changed SET LOGIN { USER, PASSWORD, PROMPT } <text> to allow braces around
  3723. <text> so text can end with "{" without swallowing the rest of the script.
  3724. ckuus3.c, 6 Feb 98.
  3725.  
  3726. After several false starts, figured out how to let the \&_[] array, which
  3727. contains pointers to the argument of the current macro, have more than 10
  3728. elements.  So now, for the first time, users can pass as many arguments as
  3729. they like to a macro in a straightforward way, and have a straightforward way
  3730. to reference them.  This works with nesting, FOR-loops, and everything else.
  3731. \v(argc) now includes any extra arguments.  ckuusr.h, ckuus[56].c, 9 Feb 98.
  3732.  
  3733. Added a new function, \fdimension(&a), which tells the declared size of the
  3734. given array.  ckuusr.h, ckuus4.c, 9 Feb 98.
  3735.  
  3736. Filled in \&_[0] element with name of macro.  ckuus5.c, 10 Feb 98.
  3737.  
  3738. New HP-UX 7.x entries from Peter Eichhorn.  makefile, 10 Feb 98.
  3739.  
  3740. Shuffled CK_AUTODL and CK_APC #ifdefs a bit to allow successful compilation
  3741. on OS-9.  ckcfn2.c, ckcker.h, ckucon.c, 10 Feb 98.
  3742.  
  3743. Removed -DNETCONN from Plan 9 makefile.  ckpker.mk, 10 Feb 98.
  3744.  
  3745. Guarded reference to EWOULDBLOCK error code by #ifdef EWOULDBLOCK, for Plan 9
  3746. and possibly also ISC 4.1.  ckutio.c, 10 Feb 98.
  3747.  
  3748. Removed redundant definition of OUT_PAC from ckuusr.h, 10 Feb 98.
  3749.  
  3750. Added CLOSE TRANSACTIONS as a synonym for CLOSE TRANSACTION-LOG, because the
  3751. book mentions CLOSE TRANSACTIONS.  ckuusr.c, 10 Feb 98.
  3752.  
  3753. Changed command-line option '#' to require a numeric argument, startflags.
  3754. ckuus[4y].c, 10 Feb 98.
  3755.  
  3756. Changed SET PRINTER #ifdefs to allow pipes for OS-9.  ckuus3.c, 10 Feb 98.
  3757.  
  3758. Commented out the "?Retry limit must be greater than window size" check
  3759. in SET RETRY, a relic from bygone days.  ckuus3.c, 10 Feb 98.
  3760.  
  3761. Fixed the DIAL command not to send modem commands if they were empty
  3762. strings (in this case, the behavior is different for null pointers and
  3763. empty strings).  ckudia.c, 10 Feb 98.
  3764.  
  3765. Fixed compilation of main program to not crash gcc on SCO OSR5.04.
  3766. ckcmai.c, 10 Feb 98.
  3767.  
  3768. Ditto for ckwart.c, 10 Feb 98.
  3769.  
  3770. rmdir() is not available in OS-9; guarded reference to it in ckmkdir()
  3771. by appropriate #ifdefs.  ckcfn3.c, 11 Feb 98.
  3772.  
  3773. rand() and srand() not available in OS-9, added NORANDOM to OS-9 makefile.
  3774. ck9ker.mak, 11 Feb 98.
  3775.  
  3776. Added another check to clsif() to make sure it does not put up a "Transfer
  3777. OK" screen when sending is incomplete (in this case because there was an i/o
  3778. error when sending), the check being for the number of file characters sent
  3779. less than the number of characters in the file, taking resends into account.
  3780. ckcfn3.c, 11 Feb 98.
  3781.  
  3782. Lots of fooling with ckutio.c (ttvt(), ttinc(), mygetbuf(), etc) and ckcgetc()
  3783. in ckucon.c to try to catch the case where C-Kermit is in CONNECT mode, stuck
  3784. in a blocking single-byte read(), and the modem is switched off, e.g. on HP-UX.
  3785. Even though CLOCAL is explicitly unset, the read() does not return when this
  3786. happens.  There doesn't seem to be anything I can do about it.  ckuker.bwr,
  3787. 11 Feb 98.
  3788.  
  3789. In "get /as-name:foo bar", the as-name was ignored; I wonder why nobody
  3790. noticed this before.  Fixed in doxget().  ckuus6.c, 11 Feb 98.
  3791.  
  3792. Added SET INPUT CANCELLATION { ON, OFF } to enable / disable keyboard
  3793. cancellation of INPUT command in progress.  ckuusr.h ckuus[r2457].c, 12 Feb 98.
  3794.  
  3795. Added SET TRANSMIT TIMEOUT <sec>.  ckuus[r2457].c, 12 Feb 98.
  3796.  
  3797. Toned down disconnection error messages in doinput() (Jeff).  ckuus4.c,
  3798. 14 Feb 98.
  3799.  
  3800. Changed [M]SEND /MOVE: to /MOVE-TO:.  Ditto for /RENAME:.  ckuusr.c, 14 Feb 98.
  3801.  
  3802. Fixed GET /COMMAND -- it was totally broken by my change on 11 Feb 98.
  3803. ckuus6.c, 15 Feb 98.
  3804.  
  3805. Added perfunctory help text for Kerberos-related commands; detailed help would
  3806. just be way too much.  Referred them to the kerberos.txt file instead.
  3807. ckuus2.c, 15 Feb 98.
  3808.  
  3809. Fix from Jeff for a memory leak in ckuus4.c, 20 Feb 98.
  3810.  
  3811. Reverse DNS lookup ON/OFF/AUTO + send DO LOGOUT, Jeff.  ckcnet.c, 20 Feb 98.
  3812.  
  3813. Fix for problem with ECHO and SET FUNCTION ERROR, Jeff.  ckuusr.c, 20 Feb 98.
  3814.  
  3815. Merged other changes from Jeff, ckuus[35x].c, ckucmd.c, ckcpro.w, 20 Feb 98.
  3816.  
  3817. Fixed another memory leak in initmac().  ckuus5.c, 20 Feb 98.
  3818.  
  3819. Fix from Jeff for SET { BROWSER, EDITOR }.  ckuus3.c, 21 Feb 98.
  3820.  
  3821. Added SET FTP-CLIENT / SHOW FTP.  ckuusr.[hc], ckuus[235].c, 21 Feb 98.
  3822.  
  3823. Added SET SLEEP (or PAUSE) CANCELLATION { ON, OFF }.  ckuusr.h, ckuus[r236].c,
  3824. 21 Feb 98.
  3825.  
  3826. Added SET COMMAND INTERRUPTION { ON, OFF } to enable/disable the Ctrl-C trap.
  3827. ckuusr.h, ckuus[35].c, 21 Feb 98.
  3828.  
  3829. Fixed WAIT to work as advertised with SET WAIT (SLEEP) CANCELLATION OFF, and
  3830. Updated HELP WAIT and HELP SLEEP.  ckuus[r2].c, 22 Feb 98.
  3831.  
  3832. DISABLE CD prevented GET from working when a GET-PATH was set.  Fixed in
  3833. gnfile() and openi(), ckcfn3.c, 22 Feb 98.
  3834.  
  3835. The error message from C-Kermit when it could not open a file to be sent was
  3836. always "Can't open file", which was singularly uninformative.  Now it sends
  3837. "Access denied" if sending was prevented by DISABLE CD or other restriction,
  3838. otherwise it is the system error message from the open() failure, such as
  3839. "Read access denied".  ckcfn3.c, ckcpro.w, 22 Feb 98.
  3840.  
  3841. Similarly for sending files to C-Kermit.  opena(), ckcfn3.c, 22 Feb 98.
  3842.  
  3843. Discovered that UNIX C-Kermit server was no longer handling tilde notation
  3844. in GET command filespecs.  Fixed in sgetinit(), ckcpro.w, 22 Feb 98.
  3845.  
  3846. Ditto for MGET.  Fixed in gnfile(), ckcfns.c, 22 Feb 98.
  3847.  
  3848. Added SET DIAL PACING <msec>.  ckuusr.h, ckuus[34].c, ckudia.c, 22 Feb 98.
  3849.  
  3850. Added S14=0 to USR init string so +++ will not hang up the call.  ckudia.c,
  3851. 22 Feb 98.
  3852.  
  3853. SHOW DIAL was too long; askmore()'d it.  ckuus4.c, 22 Feb 98.
  3854.  
  3855. Assorted last-minute fixes for declarations & ifdefs.  ckcnet.c, ckuus4.c,
  3856. 22 Feb 98.
  3857.  
  3858. ---Beta.01---
  3859.  
  3860. Fix for repeat counts when sending in text mode on CRLF-based systems, from
  3861. Jeff.  ckcfns.c, 22 Feb 98.
  3862.  
  3863. Added a definition for CK_UTSNAME for SunOS, HP-UX, POSIX (per POSIX.1), AIX,
  3864. and SVR4 (per SVID).  Will check on others later.  When this symbol is
  3865. defined, we #include <sys/utsname.h>, and then we can get the machine type, OS
  3866. name, OS version, etc, at runtime by calling uname() in sysinit().
  3867. ckcdeb.h, ckutio.c, 25 Feb 98.
  3868.  
  3869. In ckutio.c, CK_UTSNAME means it's OK to include <sys/utsname.h> and to call
  3870. uname(), but outside ckutio.c, it simply means that the strings listed below
  3871. may be referenced (which implies that they are defined in the corresponding
  3872. ck?tio.c module, and filled in by any appropriate means).
  3873.  
  3874. Added string variables to ckutio.c to hold these items:
  3875.  
  3876.   unm_mch[]  Machine name (e.g. "9000/715")
  3877.   unm_nam[]  OS name (e.g. "HP-UX")
  3878.   unm_ver[]  Name of major OS release (e.g. "A")
  3879.   unm_rel[]  Name of specific OS release (e.g. "A.10.20")
  3880.  
  3881. And logged them in the debug log.  Just type "log debug", "close debug" and
  3882. look at the top of debug.log to see them.  ckuus4.c, 25 Feb 96.
  3883.  
  3884. Changed \v(cpu) to evaluate to unm_mch[] in preference to "unknown" if
  3885. CK_UTSNAME is defined.  ckuus4.c, 25 Feb 96.
  3886.  
  3887. Added \v(osname) and \v(osversion).  For systems where CK_UTSNAME is defined,
  3888. these are the sysname and release members of the utsname struct, respectively.
  3889. Thus, these describe the system where C-Kermit is actually running.  We never
  3890. had this information before.  ckuusr.h, ckuus4.c, 25 Feb 96.
  3891.  
  3892. From now on \v(platform) should be thought of as describing the system for
  3893. which C-Kermit was built, which is not necessarily the same as the one it's
  3894. running on.
  3895.  
  3896. In HP-UX 9.0 and later, sysinit() sets the variable hpis800 if the machine is
  3897. an 800-series, otherwise unsets it, using the HP-blessed method of looking at
  3898. utsname.machine[5].  ckutio.c, 25 Feb 98.
  3899.  
  3900. Defined a new symbol HPUX9PLUS meaning "HP-UX 9.00 or higher".  Changed
  3901. ttlock() and ttunlock() to use this symbol instead of HPUX10.  But since the
  3902. format of device names in HP-UX 9.x is different from 10.00 on Series 700
  3903. hardware than on Series 800, I used the hpis800 variable to construct the
  3904. appropriate format for the lockfile name in ttlock().  At this point, the
  3905. lockfile behavior of HP-UX 9.xx and 10.xx and 11.xx should be identical.
  3906. ckutio.c, 25 Feb 98.
  3907.  
  3908. Changes to make 6.1 build under Sunsoft Interactive UNIX 4.1 from Kenneth
  3909. Cochran (#include <sys/time.h>, link with libinet).  ckutio.c, makefile,
  3910. 26 Feb 98.
  3911.  
  3912. Added code to let server handle a GET command for a filename that contains
  3913. spaces.  This works if the client sends the name enclosed in either braces
  3914. or doublequotes.  ckcpro.w, ckermit2.upd, 26 Feb 98.
  3915.  
  3916. Fixed compilation errors HP-UX 9.xx lockfile code.  In HP-UX 10.00 and above
  3917. we also do SVR4 advisory locks, but these are not available in 9.xx, so more
  3918. #ifdefs were needed.  ckutio.c, 27 Feb 98.
  3919.  
  3920. Another change for HP-UX 9.xx lockfiles (it was using the HP-UX 10.00 lockfile
  3921. directory, /var/spool/locks, rather than /usr/spool/uucp).  ckutio.c, 2 Mar 98.
  3922.  
  3923. Adapted recent HP-UX lockfile code to all HP-UX versions.  Added additional
  3924. names to the list of names to check for lockfiles: "cuad" and "culd".  Built
  3925. and tested on HP-UX 10.20, 9.05, 8.00, 5.21.  ckutio.c, ckuker.bwr, 3 Mar 98.
  3926.  
  3927. Fixed \v(cpu) to return uname() hardware type if known, in preference to
  3928. "unknown".  I thought I did this before, but I missed an #ifdef in ckuver.h.
  3929. Now we can see all those exotic cpu types (tested on an HP-9000/550, where
  3930. \v(cpu) now says "9050X" rather than "unknown").  ckuver.h, 3 Mar 98.
  3931.  
  3932. Discovered that UNIX \v(xxx) variables that returned directory names did so
  3933. inconsistently -- some ended with /, some didn't, some ended with two /'s.
  3934. Fixed all of them to send with one and only one /.  ckuus4.c, ckutio.c,
  3935. 3 Mar 98.
  3936.  
  3937. Merged Jeff's recent changes.  ckuus[r347x].c, ckcdeb.h, cknet.h, 3 Mar 98.
  3938.  
  3939. Discovered that \v(inidir) returned a filename rather than a directory name
  3940. if the initialization file didn't exist.  It should have returned an empty
  3941. string in this case.  Fixed in doinit(), ckuus5.c, 3 Mar 98.
  3942.  
  3943. Added designer banner for BSDI 3.0.  ckuver.h, makefile, 3 Mar 98.
  3944.  
  3945. Added uname() info, if we have it, to SHOW VERSION.  ckuus5.c, 3 Mar 98.
  3946.  
  3947. VMS #ifdefs for getsockname() to suppress compilation warnings in
  3948. getlocalipaddr(), from Lucas Hart.  ckcnet.c, 3 Mar 98.
  3949.  
  3950. Changes from Lucas Hart to VMS file module, ckvfio.c, 3 Mar 98:
  3951.  a. Issue an informative message upon failure to SPAWN.
  3952.  b. Support transfer of odd-record-length files.
  3953.  c. Improvements to isdir().
  3954.  
  3955. In more detail:
  3956.  
  3957. (a) add a diagnostic message when SPAWN fails because the default directory is
  3958. a remote node.  (4263)
  3959.  
  3960. (b) when sending a file in C-Kermit BINARY mode, change from RMS BLOCK to RMS
  3961. RECORD mode if the file format is fixed record length and the record length is
  3962. odd.  Implementing that turned out to be simple (after the fact.)  Maybe that
  3963. will do the job for whoever wants to retain the Kermit-32 behaviour.  I've
  3964. done some minimal testing - transfer to a du40 system of a short odd record
  3965. length file; in that case IMAGE vs BINARY had the intended effect of
  3966. including/excluding the pad byte.  (918)
  3967.  
  3968. (c) an extension of Mark Berryman's isdir(), to use $SEARCH rather than
  3969. depending on $PARSE to return the directory status.  By trial-and-error, I
  3970. concluded that PARSE only tests a directory specification for the existence of
  3971. a corresponding file with ".DIR;1"; it does not test if that file is a
  3972. directory file.  Also, PARSE is documented to not test for the existence of
  3973. the directory on a remote node.  As far as I can tell, isdir now correctly
  3974. reports whether a file is recognized by RMS as a directory and whether the
  3975. name was a passed as a directory specification or a directory name.  (715)
  3976.  
  3977. Disabled GFTIMER for VMS versions prior to 5.0 (William Bader & Lucas Hart --
  3978. actually Lucas sent in code to enable this, but it involves changing the
  3979. mechanism used on later versions also, a risk that would seem to outweigh the
  3980. benefit).  ckcdeb.h, 3 Mar 98.
  3981.  
  3982. Discovered that REMOTE SET <various things> didn't work any more because
  3983. the things that were SET were then restored to their saved values upon exit
  3984. from protocol mode.  Affected things were BLOCK-CHECK, RECEIVE TIMEOUT, and
  3985. FILE NAMES.  ckcpro.w, ckcfns.c, 4 Mar 98.
  3986.  
  3987. A user reported bizarre problems when using the MKDIR command in a macro.
  3988. Problem: incorrect assumption that msgflg was 0 when in protocol mode, nonzero
  3989. otherwise (found by Jeff).  Solution: add another argument to ckmkdir().
  3990. ckcker.h, ckcpro.w, ckuusr.c, 4 Mar 98.
  3991.  
  3992. Merged Jeff's changes.  ckuus7.c, ckuusy.c, ckucmd.c, 4 Mar 98.
  3993.  
  3994. VMS zrmdir() is a horrible hack, calling system() to set the permission of the
  3995. directory file and calling system() again to delete it -- if anyone knows a
  3996. better way, be my guest.  Improved this slightly by setting the owner
  3997. permission to RWED rather than just D, so if the delete command fails, at
  3998. least the directory can still be accessed (e.g. to delete its files, so the
  3999. directory can be deleted after all).  ckvfio.c, 4 Mar 98.
  4000.  
  4001. Discovered that VMS C-Kermit could not receive a file whose name contained
  4002. a segment that was more than 39 characters long.  The file-creation API does
  4003. not truncate extra characters from name segments, so I added code to VMS
  4004. nzltor() to do this.  ckvfio.c, 4 Mar 98.
  4005.  
  4006. Discovered that whenever an .OBJ file is sent from VMS C-Kermit, it says
  4007. "transfer interrupted", even though the file is sent OK.  This is because of a
  4008. check I added to clsif() recently to see if the number of file bytes sent was
  4009. not less than the size of the file.  Turns out this is not a reliable test for
  4010. VMS, so I dummied out the test for VMS.  Ditto for VOS.  ckcfn3.c, 4 Mar 98.
  4011.  
  4012. The same thing would happen if K95 was sending a text file with EOF CTRLZ,
  4013. so I added another test to allow for that too.  ckcfn3.c, 4 Mar 98.
  4014.  
  4015. Discovered that VMS C-Kermit on my local VAX with UCX doesn't know the name of
  4016. the TCP host it's connected to.  Evidently the new reverse DNS lookup doesn't
  4017. work in UCX (or at least not in UCX 2.0).  Changed the default for this in UCX.
  4018. ckcnet.c, 4 Mar 98.
  4019.  
  4020. Discovered that VMS C-Kermit under TGV Multinet doesn't have a SET TCP
  4021. command.  This is because all the tables are #ifdef SOL_SOCKET, which is
  4022. evidently not defined in Multinet.  But TCP ADDRESS, TCP REVERSE-DNS-LOOKUP,
  4023. etc, don't depend on this, so I removed the #ifdefs.  ckuus[3c].c, 4 Mar 98.
  4024.  
  4025. A bug was reported in VMS C-Kermit's fullscreen file transfer display that
  4026. happens during GET commands, but not SEND commands -- the left and right sides
  4027. of the display are skewed by one line.  I can't reproduce on VAX or Alpha.
  4028.  
  4029. Parsing of SET MODEM command was pretty awful if the user tried to edit, etc,
  4030. because of the horrible hack used to accept SET MODEM <modem-type> for
  4031. backwards compatibility.  Removed the hack and replaced with chained FDBs for
  4032. the two keyword tables.  ckuus3.c, 4 Mar 98.
  4033.  
  4034. More changes to HP-UX lockfile recognition -- now we recognize any string of 1
  4035. or more digits, or any string of one or more digits followed by a "p" followed
  4036. by one or more digits, as a unit number for purposes of identifying a standard
  4037. HP-UX serial device, regardless of the HP-UX version or the hardware model.
  4038. ckutio.c, 4 Mar 98.
  4039.  
  4040. Fixes to the yesterday's HP-UX lockfile work.  ckutio.c, 5 Mar 98.
  4041.  
  4042. Added more text and binary filename patterns for UNIX.  ckcmai.c, 5 Mar 98.
  4043.  
  4044. Added an error message if ttvt() call in OUTPUT command fails.  Made INPUT
  4045. messages consistent with OUTPUT.  ckuus[45].c, 5 Mar 98.
  4046.  
  4047. Conversion of UNIX CONNECT module to select()...  Previous copy of ckucon.c is
  4048. safe with Beta.01.  I butchered my working copy to:
  4049.  
  4050.  . Remove all hints of forks, pipes, pids, and signals.
  4051.  . Remove all X.25 support.
  4052.  . Use select() to wait for next event.
  4053.  
  4054. This cuts it down from 2400 lines to 1400 lines.
  4055.  
  4056. All the existing i/o and buffering mechanisms were kept.  Works fine on SunOS:
  4057.  
  4058.  . As a Telnet client (negotiations all ok).
  4059.  . As an Rlogin client (as root, of course).
  4060.  . On a serial port too.
  4061.  
  4062. Very fast too.  Ditto on HP-UX 10.20 and Solaris 2.5.  And Linux, yay.
  4063. But details need fixing:
  4064.  
  4065.  . Autodownload doesn't work.
  4066.  . The key-macro code was stripped out -- must put it back in.
  4067.  . Prompt-stomping & missing messages upon return from CONNECT mode.
  4068.  . #ifdefs for syntax of FD_blah, select(), etc, on many systems.
  4069.  . Test transferring files through this Kermit in the middle.
  4070.  
  4071. To do:
  4072.  
  4073.  . Fix above details.
  4074.  . Test test test, find and fix other details.
  4075.  . Add Kerberos support for Linux.
  4076.  . Find out which UNIXes can use select() for both serial & net connections.
  4077.  . Figure out a way to make a single source support both fork() and select().
  4078.  
  4079. The last one is probably too much.  But we can have separate modules easily
  4080. enough, since there are separate production rules in the makefile for regular
  4081. and Kerberized builds; this allows CONNECT modules with different names.
  4082. All the above: ckocon.c, 5 Mar 98.
  4083.  
  4084. Added back key mapping to new ckucon.c.  7 Mar 98.
  4085.  
  4086. Discovered SET KEY, when given in its multiline format, did not allow the
  4087. definition to be edited.  Fixed in ckuus3.c, 7 Mar 98.
  4088.  
  4089. Fixed APC, autodownload, prompt-stomping and missing messages.  Tested
  4090. triggers, character-set translation, Telnet to NeXT, all OK.  ckucon.c,
  4091. 7 Mar 98.
  4092.  
  4093. Now try to get Kerberos encryption going on Linux.  Short story: it works but
  4094. it's slow.  Longer story: The normal ckucon.c strategy of using a blocking
  4095. ttinc() followed by n = ttchk() and then ttxin(n,buf) won't work with Kerberos
  4096. because ttxin() decrypts or does not decrypt the entire buffer that it reads
  4097. based on the current encryption state.  But the encryption state can change
  4098. midstream based on Telnet negotiations that might be in the middle of the
  4099. buffer.  Since Telnet negotiations are handled only at the highest level (by
  4100. the client of the client of the ttblah() functions), we must do
  4101. single-character reads only, using ttinc(), if there is a possibility of
  4102. encryption.  So far so good...
  4103.  
  4104. BUT... ttinc() also buffers stuff up internally, and this conflicts with the
  4105. our new select()-driven structure; a deadlock can occur when select() waits on
  4106. the net, but the net has already sent everything it intends to and all this
  4107. material is already sitting in ttinc()'s internal buffer.  ttchk() to the
  4108. rescue?  No, because ttchk() looks not only at the internal buffer, but also
  4109. at the TCP buffers.
  4110.  
  4111. So... since it's all in the family (UNIX), I added a new UNIX-only function,
  4112. ttpeek(), which tells how many bytes are waiting in ttinc()'s internal buffer
  4113. (i.e. the MYREAD buffer).  This tells us whether to tell select() to block on
  4114. the net.  The result works fine, but slowly, since we have several layers of
  4115. function calls for each character we read: ckcgetc() -> ttinc() -> read().
  4116. And of course, now also the Kerberos decryption function.  There is no other
  4117. way to do this given the current layering.
  4118.  
  4119. I'll see if I can find any way to speed up the code, but in any case, it needs
  4120. variables it can test to see if encryption is a possibility.  For example, if
  4121. we know at runtime this is not a kerberized connection, we don't need the
  4122. byte loop.  I used "me_auth" for now.
  4123.  
  4124. File transfer works, but slooooowly, and streaming doesn't work at all because
  4125. there is always a CRC error on the first packet.  After a streaming transfer
  4126. failure and re-CONNECT, it just hangs -- nothing on the far end, can't escape
  4127. back either -- encryption sync is evidently lost.
  4128.  
  4129. After analyzing logs, I realized: if a packet is ever resent, then we are
  4130. encrypting a packet that was already encrypted, since ck_krb_encrypt() works
  4131. in place.  So I made ttol() copy the clear-text packet to its own private
  4132. buffer, then encrypt the buffer, then write it.  This cures the problems in
  4133. one direction (encrypting local Kermit is receiving -- autodownload works ok),
  4134. but not in the other -- it hangs for a while at the beginning, and then again
  4135. (forever) at the end of the transfer.
  4136.  
  4137. Made it safe to use memcpy() by defining a memcpy() macro to use ckmemcpy()
  4138. if USE_MEMCPY not defined, and then defining USE_MEMCPY for systems where I
  4139. know it's available (K95 + most modern UNIXes).  ckcdeb.h, 8 Mar 98.
  4140.  
  4141. Added a "SECURE" indication to SHOW COMM, the CONNECT message, and the Network
  4142. Type field of the fullscreen file-transfer display.  ckucon.c, ckuusx.c,
  4143. 8 Mar 98.
  4144.  
  4145. Ran encrypted transfers again via K5 localhost connection, client/server:
  4146.  
  4147.  . SEND worked fine, no errors.  But later another SEND took a long time
  4148.    to start and hung at the end.
  4149.  
  4150.  . GET worked fine, no errors, but was excruciatingly slow (83 cps).
  4151.    Both sides reported zero errors.  But after "fin" and connecting back,
  4152.    I saw a fragment of garbage on the screen, indicating some kind of
  4153.    encryption screwup.
  4154.  
  4155.  . Streaming transfers still fail immediately.
  4156.  
  4157. Speculation: mode-changing by ttpkt(), ttvt(), ttres(), etc, result in data
  4158. loss and therefore in loss of encryption sync.  No, they don't actually do
  4159. anything except turn Nagle on and off.
  4160.  
  4161. Added Nagle restoration code to ttres().  ckutio.c, 8 Mar 98.  (This made
  4162. no difference.)
  4163.  
  4164. Looking at the (huge) debug logs, now I see that there were lots of NAKs
  4165. after all, but they did not show up in the file-transfer display or statistics
  4166. (why?)  Sometimes the delay between packets was as much as 70 seconds.
  4167.  
  4168. OK, now I see the problem.  ttinl() reads the first data packet.  It is
  4169. decrypted correctly.  ttinl() recognizes the beginning, the length field, and
  4170. the end.  Then it gets to its CR-removal stage and says: "ttinl removed=13"
  4171. (good), "ttinl removed=0" (good), "ttinl removed=1" <-- uh oh, the SOH of the
  4172. next packet.  And then proceeds to discard the entire next packet.  Problem:
  4173. the lookahead test for the packet-start character was performed by peeking
  4174. into the encrypted buffer.  Solution: decrypt each character first, then test
  4175. it.  But oops, now we've already read it.  So resurrect the old myunrd()
  4176. function to push it back.  But oops, that doesn't work either, because when
  4177. we go to read it again, we decrypt it again.  So instead we add a special
  4178. variable for saving and restoring a pushed-back ttinl() character, to know
  4179. not to decrypt it again when fetching it.  ttinl(), ckutio.c, 8 Mar 98.
  4180.  
  4181. So now we have my favorite situation: file transfers work perfectly in both
  4182. directions when the debug log is on, and fail miserably when it's off.  So
  4183. let's turn on streaming, which always fails, to catch an error in the log.
  4184. Nope, streaming works now too.  But when debugging is off sending to a server
  4185. still takes a long time to start and then hangs forever after sending the B
  4186. packet.
  4187.  
  4188. So I checked all calls to ck_krb_encrypt() in ckutio.c.  It is only called in
  4189. two places, ttol() and ttoc().  In neither place can it possibly encrypt
  4190. something that was already encrypted.  So the culprit must be ck_krb_decrypt().
  4191. But all calls to that look right too.
  4192.  
  4193. Since the problems occur most frequently at the beginning or end of a file
  4194. transfer, ttflui() is the next suspect.  And dummying out ttflui() does,
  4195. indeed, make the problems completely disappear.  OK, but why?  Aha, an
  4196. off-by-one error in the clever reference to the mybuf address (the buffer
  4197. index is pre-, not post-incremented).  Fixed in ttflux(), ckutio.c, 8 Mar 98.
  4198.  
  4199. So now it all works.  Some tests:
  4200.  
  4201.  . Client/server works fine -- send/get, etc.
  4202.  . Streaming works fine.
  4203.  . Ditto for both when transferring a gzip'd file no prefixing, provided
  4204.    we SET FLOW NONE on the far end (!) (I need to address this in any case...)
  4205.  . Autodownload, APC work fine.
  4206.  . Scripts work, including the CLEAR command.
  4207.  . Encrypted transfers go at about 55Kcps on localhost connection,
  4208.    versus unencrypted transfers at about 106Kcps.
  4209.  . CONNECT mode is noticeably slower on long scrolling displays:
  4210.    ripple test is 24 seconds encrypted vs about 9 sec unencrypted.
  4211.    This is due to the combination of decryption overhead and character-
  4212.    at-a-time i/o.
  4213.  
  4214. However, attempts to make a new connection occasionally fail -- authentication
  4215. works, CONNECT works, etc, but encryption is evidently starting out wrong
  4216. because we just get a blank screen and frozen keyboard -- can't even escape
  4217. back.  Speculation: the encryption state is carried across sessions?  So if
  4218. something winds up not being encrypted or decrypted at the end of session <n>,
  4219. then session <n>+1 will never get off the ground.  I tried calling ttflui()
  4220. from ttclos() -- and not sending Telnet DO LOGOUT -- if it's an encrypted
  4221. connection.  This seems to alleviate the problem in most cases; now I can
  4222. reproduce only it by starting a server on the remote end and sending it a BYE.
  4223. All seems normal -- the client gets the ACK to the BYE, the server side logs
  4224. out, but the next encrypted connection attempt always fails.  I tried putting
  4225. an msleep(500) in the server code after sending the ACK() to the BYE and
  4226. before calling ttres() or zkself(), but it didn't change anything.  There
  4227. probably needs to be some kind of Kerberos call when C-Kermit exits or when
  4228. it logs itself out, to reset Kerberos to some known state.
  4229.  
  4230. Hmmm -- here's another way to make it always happen: use "set host" and
  4231. "connect" instead of "telnet".  The debug log shows that everything is working
  4232. correctly -- all the Telnet negotiations are correct -- authentication,
  4233. encryption, etc.  Then the host sends us its banner and greeting and we sit in
  4234. myfillbuf() stuck in a read() waiting for the prompt, but it never comes...
  4235.  
  4236. Ha, got it.  Yesterday I decided to use "me_auth" as the variable to decide
  4237. whether encryption was possible.  If me_auth was set, then the CONNECT module
  4238. did all reads by calling ttinc(), otherwise it was free to call ttxin().  But
  4239. this was not a good choice -- the log shows we called ttxin() before me_auth
  4240. was set, but ttxin() read too much.  So backing off that choice (a) makes
  4241. everything work, but (b) means that there is no way to use the faster code on
  4242. non-Kerberized connections.  I also backed off the changes to netclos();
  4243. everything works fine now without them.  ckcget(), ckucon.c, 8 Mar 98.
  4244.  
  4245. Removed some verbose debugging statements from file-transfer buffer management
  4246. code, since this code has been stable for six years.  ckcfn3.c, 8 Mar 98.
  4247.  
  4248. Improved F000 debug format to allow omission of s2.  ckuusx.c, 8 Mar 98.
  4249.  
  4250. Renamed the new ckucon.c to ckucns.c (UNIX CONNECT with select()) and changed
  4251. the makefile to reference it only for Kerberos builds.  Restored the original
  4252. ckucon.c for non-Kerberos builds.  It would have been better to combine them,
  4253. but the structures are radically different.  So this task is tabled until and
  4254. unless it becomes an issue with real users.  ckucon.c, ckucns.c, makefile,
  4255. 8 Mar 98.
  4256.  
  4257. Noticed the maximum number of macros was only 256.  Increased this to 4K for
  4258. BIGBUFOK builds.  ckuusr.h, 8 Mar 98.
  4259.  
  4260. A user reported that "remote who > file" did not work.  The actual problem was
  4261. that redirection was never implemented for short-form REMOTE command replies.
  4262. Note: this was a bit tricky because a line terminator needed to be added to
  4263. the end -- it's too hard to explain, but it required adding a new character
  4264. output function zputfil(), that does exactly what putfil() does, but that has
  4265. a different name.  To see why, look for references to "putfil" in decode().
  4266. Fixed in ckcpro.w, ckcker.h, ckcfns.c, 10 Mar 98.
  4267.  
  4268. Merged Jeff's changes for "set net type { command, dll, ssh }" - K95 only for
  4269. now.  Note: I had to make a change to krbtel.c to indicate that Kerberos 4 was
  4270. *not* available in UNIX.  11 Mar 98.
  4271.  
  4272. Fixed up status messages in netopen().  ckcnet.c, 12 Mar 98.
  4273.  
  4274. Added code to allow the Kerberized version of C-Kermit to use block i/o on a
  4275. non-authenticated connection, so that the 99% of people who are not using
  4276. authentication or encryption won't be penalized because it is supported in the
  4277. binary.  ckutio.c, ckucns.c, 12 Mar 98.
  4278.  
  4279. Started to try to separate input and output communications file descriptors.
  4280. Eventually I gave up -- I don't think there's a prayer of doing this, at least
  4281. not in UNIX, when you look at all the manipulations we do on them -- hundreds
  4282. and hundreds of ioctl's (fcntl's, tcsattr's, etc) to change modes, duplicate
  4283. them, close/open them, etc etc.  Doing all this to *two* file descriptors in
  4284. lockstep without having to worry about which operations are legal on input vs
  4285. output descriptors in which releases of which OS's, not to mention opening up
  4286. timing windows or tickling peculiarities in underlying drivers or kernels,
  4287. is too much to expect.  12 Mar 98.
  4288.  
  4289. Added support for net i/o from lower fork thru pipes within #ifdef NETCMD:
  4290.  
  4291.  . ttopen() starts the command & opens the pipes, sets ttpipe flag.
  4292.  . ttclos() kills fork if active, closes pipes if open, unsets flag.
  4293.  . tthang() calls ttclos() if flag set.
  4294.  
  4295.  . ttvt/ttpkt/ttres: does nothing if flag is set.
  4296.  . ttsetflow(), tthflow() - ditto
  4297.  . ttsspd(), ttgspd() - ditto.
  4298.  . ttsnd[l]b() -- send a NUL if flag set.
  4299.  . ttgmdm() -- returns -1 if flag set.
  4300.  
  4301.  . myfillbuf(), ttxin(), ttinl(), ttinc() -- read from pipe if flag set.
  4302.  . ttol(), ttoc() -- write to pipe if flag set.
  4303.  . ttchk() - checks pipe if flag set.
  4304.  
  4305.  . ttlock() & friends are never called.
  4306.  . ttpeek, ttpushback, ttflux... - unaffected.
  4307.  
  4308. ckutio.c, ckucon.c, ckucns.c, ckuus5.c, 13 Mar 98.
  4309.  
  4310. Builds and works OK with NETCMD not defined.
  4311. Compiles OK (on SunOS) with NETCMD defined.
  4312. Works OK on normal connections.
  4313. Works OK on pipe connections:
  4314.  . Makes the connection.
  4315.  . CONNECT mode works right, no buffering delays, and it's fast.
  4316.  . File transfer works too, but rather slowly in the sending direction.
  4317.  . ttchk() always returns 0 on SunOS -- evidently FIONREAD doesn't work
  4318.    on pipes.  Slows down sliding-window sends.  I'll need to do something
  4319.    about this later.
  4320.  
  4321. Disabled if NOPUSH defined or nopush set.  ckcdeb.h, ckuus3.c, 13 Mar 98.
  4322.  
  4323. Added a brief preliminary section (2.7) on this to ckermit2.upd, but it needs
  4324. a lot of fleshing out with examples of ssh, ssl, etc.
  4325.  
  4326. Still need to make the command structure nicer.  SET NETWORK TYPE COMMAND
  4327. followed by SET HOST <command> is OK, but afterwards the network type is still
  4328. set to COMMAND, and so subsequent SET HOST commands probably won't work as
  4329. most people expect them to.  So I think it might be better to collapse this
  4330. into a PIPE command that combines the two, but does not affect the global
  4331. network type.  PIPE would be the general case, SSH could be a specific case
  4332. (with accompanying SET SSH command for configuration, etc).  None of this
  4333. is done yet.
  4334.  
  4335. Also, note that this feature has nothing to do with networks, yet it's only
  4336. available #ifdef NETCONN.  So this should be changed too.  Next week...
  4337.  
  4338. Got tired of wraparound during "make sunos.." so moved the common symbol
  4339. definitions from the makefile to ckcdeb.h.  13 Mar 98.
  4340.  
  4341. Got rid of the duplicate SET NETWORK keyword tables so now we only need to
  4342. add new network-type keywords in one place rather than two.  ckuus[r3].c,
  4343. 13 Mar 98.
  4344.  
  4345. Jeff discovered that binary-mode transfers with space parity didn't work any
  4346. more.  Fixed by making receipt of a request to do 8th bit prefixing when
  4347. parity is none *and* no parity has been detected cause the parity to be
  4348. switched to space.  ckcfn[s2].c, 16 Mar 98.
  4349.  
  4350. Various changes for BeBox, SRP, etc, and other updates from Jeff, including
  4351. a fix for "wait 0 <signal>" not bothering to test for signal.  Many modules,
  4352. 18 Mar 98.
  4353.  
  4354. Discovered that SET HOST did not parse switches for certain network types,
  4355. e.g. COMMAND.  Rearranged setlin() again so switches would be always be parsed
  4356. for SET HOST and SET PORT (LINE), removing about 200 lines of code in the
  4357. process.  Needs lots of testing.  ckuus7.c, 18 Mar 98.
  4358.  
  4359. Added SET HOST /COMMAND.  This takes the place of SET NETWORK TYPE COMMAND
  4360. followed by SET HOST <name-of-command>, but in this case the network type is
  4361. not sticky (normal behavior for switches).  Thus, for example, you can:
  4362.  
  4363.   set host /command rlogin hosta
  4364.  
  4365. and then later "set host hostb", and it will work, using the previous global
  4366. network type (usually TCP/IP).  ckuusr.h, ckuus7.c, 18 Mar 98.
  4367.  
  4368. Added the PIPE command, equivalent to SET HOST /COMMAND /CONNECT.  ckuusr.h,
  4369. ckuusr.c, 18 Mar 98.
  4370.  
  4371. Changed cmfdb() to return -9 and print a message if it was about to return -6,
  4372. which should be internal to cmfdb().  ckucmd.c, 19 Mar 98.
  4373.  
  4374. Changed cmkey() to return -3 as it should if the user types CR and no other
  4375. characters were given and there was no default.  ckucmd.c, 19 Mar 98.
  4376.  
  4377. Fix from Jeff to SET TERM KEY <type> <CR>.  ckuus7.c, 19 Mar 98.
  4378.  
  4379. Added REMOTE SET FILE INCOMPLETE.  Previously this was available only as
  4380. REMOTE SET INCOMPLETE, now demoted to invisibility.  ckuus[37].c, 19 Mar 98.
  4381.  
  4382. Added -DNOCOTFMC to Linux makefile entries at the suggestion of Paul Kimoto.
  4383. Details in the Linux section of ckuker.bwr.  makefile, 19 Mar 98.
  4384.  
  4385. Added NOCOTFMC display to SHOW FEATURES.  ckuus5.c, 19 Mar 98.
  4386.  
  4387. Big revisions/updates to ckuker.bwr for Linux & elsewhere.  19 Mar 98.
  4388.  
  4389. Fixes from Jeff to parsing of Telnet authentication/etc negotiations.
  4390. ckcnet.c, 19 Mar 98.
  4391.  
  4392. In UNIX, "send /recursive foo" (foo not wild) did not work; it only sent the
  4393. foo file from the current directory, but then did not recurse.  Furthermore,
  4394. if no foo file was in the current directory, nothing was transferred, even if
  4395. one or more foo's were in subdirectories,   Fixed in traverse(), ckufio.c,
  4396. 19 Mar 98.  (Needs more testing, though...)
  4397.  
  4398. Minor changes from Jeff to ckcnet.c.  20 Mar 98.
  4399.  
  4400. Added missing mention of /RECURSIVE in HELP GET.  ckuus2.c, 21 Mar 98.
  4401.  
  4402. Discovered that not defining USE_MEMCPY on platforms where we pick up
  4403. prototypes for memcpy() from the header files (like string.h on the NeXT)
  4404. causes ANSI compilations to bomb.  Added USE_MEMCPY for NeXT, OSF/1, VMS,
  4405. AOS/VS.  ckcdeb.h, 21-22 Mar 98.
  4406.  
  4407. Moved the -Dblah CFLAGS that were common to all the Solaris makefile entries
  4408. to ckcdeb.h, similar to what was done for SunOS a few days ago.  ckcdeb.h,
  4409. 21 Mar 98.
  4410.  
  4411. Added new "xermit" target to UNIX makefile.  It's just like "wermit", but
  4412. uses ckucns (select() version of CONNECT module) rather than ckucon (fork()
  4413. version).  Changed sunos41 entry to use xermit target, tested it on serial,
  4414. TCP/IP, and pipe connections, works fine.  Tried it in several other places:
  4415.  
  4416.  Entry      Telnet   Serial    Pipe
  4417.   sunos41     OK       OK       OK
  4418.   hpux100     OK       OK       OK
  4419.   linux       OK       ??       OK
  4420.   solaris25   OK       ??       OK (but rlogin prints scary messages)
  4421.  
  4422. Left xermit in for SunOS, left the others as is.  makefile, 21 Mar 98.
  4423.  
  4424. Fixed a problem in ttinc(), timed MYREAD case, when it gets a NUL character
  4425. (as it would during rlogin initial connection) -- test for error was off by 1.
  4426. Diagnosed by Jeff.  21 Mar 98.
  4427.  
  4428. Discovered that \v(errstring) evaluation in nvlook() was returning a pointer
  4429. to an automatic array, oops.  Made it static.  ckuus4.c, 22 Mar 98.
  4430.  
  4431. Added \v(osrelease).  ckuusr.h, ckuus4.c, 22 Mar 98.
  4432.  
  4433. Changed \v(osname) to return the same as \v(platform) if CK_UTSNAME not
  4434. defined.  ckuus4.c, 22 Mar 98.
  4435.  
  4436. Changed sinix542 makefile target to not optimize ckcpro.c, since this was
  4437. taking several hours before I interrupted it...  makefile, 22 Mar 98.
  4438.  
  4439. --- Beta.02 ---
  4440.  
  4441. successful "xermit" tests:
  4442.  
  4443.   sunos 4.1
  4444.   unixware 1.1.2
  4445.   hpux 10.20
  4446.  
  4447. Minor changes to prototypes, etc.  ckuus[7x].c, ckcnet.h, ckcdeb.h,
  4448. 24 Mar 98.
  4449.  
  4450. Added SET HOST /PASSWORD:.  ckuusr.h, ckuus[r37x].c, 24 Mar 98.
  4451.  
  4452. Authentication material from Jeff. ckuus[347].c, ckutio.c, ckcnet.c, 25 Mar 98.
  4453.  
  4454. Added better ?-help message for SET TELNET ENCRYPTION.  ckuus3.c, 25 Mar 98.
  4455.  
  4456. Folded lines > 79 and removed trailing blanks from ckuath.c.  25 Mar 98.
  4457.  
  4458. Changed definitions of CX_xxx encryption types to use the ENCTYPE_xxx_xxx
  4459. ones if they are defined.  However, there is no ENCTYPE_blah for NONE, and we
  4460. can't use negative numbers for keyword values, so I chose 999.  ckcnet.h,
  4461. 25 Mar 98.
  4462.  
  4463. Removed various unportable constructions from ck_crp.c.  25 Mar 98.
  4464.  
  4465. Changed SET TELNET ENCRYPTION TYPE to get its keyword table dynamically.
  4466. ckuus3.c, 25 Mar 98.
  4467.  
  4468. ....
  4469.  
  4470. Added checking of LINES and COLUMNS to ttgwsiz() if ioctl() fails.  ckutio.c,
  4471. 25 Mar 98.
  4472.  
  4473. Added dgux54411i entry to makefile.  3 Apr 98.
  4474.  
  4475. Merged Jeff's changes, mostly a&e, plus: some updated help text, crypto
  4476. material in SHOW TELNET; moved "Server done" message until after all files are
  4477. closed to prevent overwriting of messages.  Also, fix one more "Transfer OK"
  4478. test in clsif() that could result in spurious OK result when not OK.  Many
  4479. modules, 3 Apr 98.
  4480.  
  4481. Removed the hidden TEST command so people can define macros called TEST as
  4482. shown in various docs.  ckuusr.c, 3 Apr 98.
  4483.  
  4484. Changed SET TELNET ENVIRONMENT DISP to DISPLAY (spelled out) to agree with
  4485. docs.  ckuus3.c, 3 Apr 98.
  4486.  
  4487. SHOW NET display was too long.  Gave it the askmore() treatment.  This was a
  4488. big job, since it calls a lot of subfunctions.  This askmore() business really
  4489. needs to be reworked.  We need a *portable* printf() replacement that takes
  4490. screen dimensions into account.  Either that, or one that pipes its output
  4491. into an external program (like "more") (but that would not be portable) (but
  4492. UNIX users would still like it -- plus then you could redirect output of any
  4493. command to a file, etc).  ckuus[45].c, 4 Apr 98.
  4494.  
  4495. Changed ttopen() to not print "DNS lookup..." if it is not doing a DNS lookup.
  4496. ckcnet.c, 4 Apr 98.  But it almost always does, so this makes little
  4497. difference.
  4498.  
  4499. Added TERMINAL as a synonym for SET TERMINAL TYPE.  Familiar to UNIX users,
  4500. etc.  ckuusr.[ch], ckuus7.c, 4 Apr 98.
  4501.  
  4502. Added STATUS as a synonym for SHOW STATUS.  ckuusr.[ch], 4 Apr 98.
  4503.  
  4504. Added a second "personality" to the C-Kermit command line.  If C-Kermit is
  4505. stored as telnet (or telnet.exe), it parses a Telnet command line:
  4506.  
  4507.   telnet [ host [ port ] ]
  4508.  
  4509. I didn't bother with rlogin.  This works with the C-Kermit networks directory.
  4510. ckcmai.c, ckuus[4y].c, ckermit.ini, 4 Apr 98.
  4511.  
  4512. Added \v(name), the name with which the program was invoked.  Used this to
  4513. bypass non-Telnet material in the initialization file for faster startup
  4514. (since we don't have options on the Telnet command line, e.g. to bypass the
  4515. initialization file).  ckuusr.h, ckuus4.c, ckermit.ini, 4 Apr 98.
  4516.  
  4517. Noticed that "telnet watsun 13" (i.e. to the "daytime" socket) has started to
  4518. misbehave again.  First, ttopen() is called two or three times for some
  4519. reason.  Second, ttvt() fails because the other side has already closed itself
  4520. before we can get around to reading the daytime string.  I thought I fixed
  4521. this a long time ago.  It needed more fixing.  In ckucon.c, the section that
  4522. handles ttvt() failures by hanging, closing, and reopening the connection
  4523. makes no sense at all for network connections, so now it is used only if
  4524. (!network).  Second, a loop-exit test was missing in the new CONNECT module.
  4525. ckucon.c, ckucns.c, 4 Apr 98.  NOTE: K95 has the same problem, needs checking.
  4526.  
  4527. Added ON and OFF as invisible synonyms for DISABLED and ENABLED in nabltab[],
  4528. since the book has some examples like this that wouldn't work otherwise.
  4529. ckuus7.c, 4 Apr 98.
  4530.  
  4531. Added command-line switch -0, meaning "be 100% transparent in CONNECT mode".
  4532. This is equivalent to a bunch of other commands, like eightbit, set flow none,
  4533. set term escape disabled, set term char transparent, set term autodownload
  4534. off, set term apc off, etc.  It probably could use some work.  Setting the
  4535. flow control to none might be a bit extreme, but currently there is no way to
  4536. say "don't allow software flow control, but do allow any kind of hardware
  4537. flow control."  ckuusy.c, 4 Apr 98.  Note: I did not add an interactive
  4538. command to do the same thing since that would beg the question of how to undo
  4539. it, which would not necessarily be easy.
  4540.  
  4541. Noticed that a quoted hyphen or opening brace at the end of a line was still
  4542. taken as a continuation character, which shouldn't happen; \- should mean
  4543. to take the dash literally.  Fixed in getnct() and in gtword().  Ran all the
  4544. demo & hostmode scripts to make sure this didn't break anything.  ckcuus5.c,
  4545. ckucmd.c, 4 Apr 98.
  4546.  
  4547. Noticed that "echo foo - ; comment", when given at the prompt, did not treat
  4548. the "-" as a continuation character.  Fixed in gtword(), ckucmd.c, 4 Apr 98.
  4549.  
  4550. Got rid of SET HOST /PASSWORD: since it can't work.  ckuus7.c, 4 Apr 98.
  4551.  
  4552. PIPE connections worked only once; subsequent ones would not work.  Nor
  4553. would (say) CONNECT to a closed pipe connection.  Fixed in ttclos(), ckutio.c,
  4554. 4 Apr 98 (Don't set ttpipe to 0 -- leave it alone).
  4555.  
  4556. Added utsname info for VMS, obtained by assorted $GETSYI() calls.  Also added
  4557. a new variable, \v(model), which returns the CPU model.  Works only for VMS,
  4558. returns null string elsewhere.  Note: K95 will need to define a unm_mod[]
  4559. buffer for this, and either fill it in or set it to the null string.
  4560. ckuusr.h, ckuus4.c, ck[uv]tio.c, 5 Apr 98.
  4561.  
  4562. Added utsname info to SHOW FEATURES.  ckuus5.c, 5 Apr 98.
  4563.  
  4564. Added Stanford copyright to main copyright notice shown by VERSION command
  4565. if SRP included.  ckcmai.c, 5 Apr 98.
  4566.  
  4567. In Beta.02, routine tn_sb() broke the HP-UX 7.0 optimizer.  Changed all HP-UX
  4568. 7.0 entries to not optimize ckcnet.c.  makefile, 5 Apr 98.
  4569.  
  4570. I had a report that \v(filename) did not work when sending, but I don't see
  4571. a problem, in either remote or local mode.
  4572.  
  4573. C-Kermit or K95 server failed to send any files when sent "GET *" -- oops.  It
  4574. looks like something I broke when adding /CALIBRATE back in October; I wonder
  4575. why nobody noticed until Jeff did a couple days ago.  Good thing we actually
  4576. use this software ourselves...  Fixed in fnlist(), ckcfns.c, 5 Apr 98.
  4577.  
  4578. If C-Kermit was sending a file and the transfer was interrupted with Ctrl-C,
  4579. then a subsequent SEND or RESEND would fail to update the Estimated Time Left
  4580. and Transfer Rate fields of the fullscreen file transfer display because the
  4581. time variables were not reset by the Ctrl-C handler.  Fixed in ftreset(),
  4582. ckuusx.c, 5 Apr 98.
  4583.  
  4584. Changed -I switch to also "set flow none" (except on VMS), since not doing so
  4585. makes for Xoff deadlocks.  This is a bit risky, but I think it's less risky
  4586. than not doing it.  ckuusy.c, 5 Apr 98.
  4587.  
  4588. Added 877 and 866 to list of toll-free area codes for the NANP.  877 goes live
  4589. today; 866 is next, probably within a year or two.  ckuus3.c, 5 Apr 98.
  4590.  
  4591. If the connection is lost during file transfer, the file-transfer display
  4592. message "FAILED: Connection lost" is properly displayed, but then immediately
  4593. overwritten by "Transfer interrupted", a less specific reason.  This was
  4594. because we never sent an Error packet, since there was no longer a connection
  4595. to send it on.  Fixed by pretending to send an E packet by setting epktsent=1
  4596. in spack() when it prints the "FAILED: Connection lost" message, to prevent
  4597. clsif() from printing any subsequent messages, and copying the "Connection
  4598. lost" message to the file-transfer error message buffer so it could be
  4599. accessed afterwards by \v(xfermsg).  ckcfn[23].c, 5 Apr 98.
  4600.  
  4601. Remove OLD_VMS #includes for GFTIMER; they didn't work, and we're not using
  4602. GFTIMER in OLD_VMS anyway.  From Lucas Hart.  ckvtio.c, 5 Apr 98.
  4603.  
  4604. Various last-minute adjustments to copyright notices, etc.  ckcmai.c,
  4605. ckuus5.c, 6 Apr 98.
  4606.  
  4607. Addition of SRP-related makefile entries for Linux.  makefile, 6 Apr 98.
  4608.  
  4609. Add ".hex" and ".hqx" as text file types.  ckcmai.c, 6 Apr 98.
  4610.  
  4611. ---1.1.16--- (8 Apr 98)
  4612.  
  4613. Add -DKANJI for Linux ifndef NOCSETS.  ckcdeb.h, 10 Apr 98.
  4614.  
  4615. Fixed "Closing..." message (and call to ttclos()) in doexit() to make the
  4616. ttyfd != -1 test only #ifdef OS2 (not OS2ORUNIX).  Otherwise this path is
  4617. always taken in UNIX.  ckuusx.c, 10 Apr 98.
  4618.  
  4619. Suppose C-Kermit is sitting at its prompt and receives the command "kermit -x".
  4620. This almost certainly is the "autoserver" string from K95, or another copy of
  4621. C-Kermit.  The user has given a GET or REMOTE command without first putting
  4622. C-Kermit in server mode.  So far so good; the "kermit -x" command does the
  4623. trick.  But then after the transaction is finished, C-Kermit stays in server
  4624. mode, so when the user CONNECTs back, s/he gets "a blue screen".  Solution:
  4625. any protocol actions resulting from "kermit" commands at the prompt set the
  4626. justone flag, which tells the protocol to exit after just one transaction.
  4627. This way they get the command prompt back, as expected.  ckuusr.c, 10 Apr 98.
  4628.  
  4629. Put doftp() and doping() in #ifndef NOPUSH..#endif.  ckuusr.c, 10 Apr 98.
  4630.  
  4631. Allow for longer debug messages for tracking authentication problems.
  4632. ckuusx.c, 11 Apr 98.
  4633.  
  4634. Updated sv68r3v6 and sv88r40 makefile entries from Gerry Belanger at
  4635. Cognitronics, since GFTIMER broke both of them, and REDIRECT broke the
  4636. former.  makefile, 11 Apr 98.
  4637.  
  4638. Merged in Jeff's recent changes, mainly (1) addition of XMODEM-CRC as a
  4639. protocol type, and (2) make sure INPUT sets \v(instatus) correctly upon
  4640. failure due to lost connection.  Also, remove auto-upload strings for XMODEM
  4641. and YMODEM because their echoes cause confusion about the checksum type, etc,
  4642. e.g. if the filename contains an uppercase C.  Many modules, 17 Apr 98.
  4643.  
  4644. Merged IBM AIX X.25 support from Stephen Riehm, pc-plus, in Germany.  Most
  4645. modules.  18 Apr 98.  This still needs to be tested to ensure it didn't break
  4646. anything, especially Sun X.25, and to document it.
  4647.  
  4648. Added support for ttylock()/ttylocked()/ttyunlock() via #ifdef USETTYLOCK,
  4649. which is defined in ckcdeb.h for IBM AIX 3.1 and later.  This is supposed to
  4650. prevent confusion about the name, location, contents, and format of the UUCP
  4651. lockfile.  ckcdeb.h, ckutio.c, ckuus5.c, 19 Apr 98.
  4652.  
  4653. Built on an AIX 4.1 system; it compiles and links without complaint, but I
  4654. can't test it because that system has no serial devices.  20 Apr 98.
  4655.  
  4656. SET HOST commands weren't making it into the command recall buffer.  Fixed
  4657. (I think -- at least I can't make it happen any more) in setlin(), ckuus7.c,
  4658. 20 Apr 98.
  4659.  
  4660. Changed ttopen() to always call perror() to print error message when open()
  4661. fails.  Also added perror() calls to ttunlck() to give informative messages
  4662. upon failure to delete lockfiles.  ckutio.c, 21 Apr 98.
  4663.  
  4664. "help ?" incorrectly said "Or the name of a macro..." at the end of the
  4665. keyword list.  Fixed in ckucmd.c, 21 Apr 98.
  4666.  
  4667. Changed ttrpid() to not depend on hardwired definition for format of lockfile,
  4668. but rather to check its size and then treat it as binary if 4 bytes or less,
  4669. and as a string if longer than 4 bytes.  Tested successfully with string pids.
  4670. ckutio.c, 21 Apr 98.
  4671.  
  4672. Changed ttunlck() to not try to remove the lockfile if the pid it contains is
  4673. not ours, e.g. in case some other process has seized control of the device.
  4674. ckutio.c, 21 Apr 98.
  4675.  
  4676. Added a couple checks against dereferencing NULL data pointer, which can
  4677. evidently happen if C-Kermit is started with the -J command-line option and
  4678. then Ctrl-C'd at a certain critical point.  ckcfns.c, 21 Apr 98.
  4679.  
  4680. Added code to make INPUT 0 xxx behave as advertised: it should check the
  4681. only the characters that have arrived but have not yet been read for the
  4682. search string, and succeed or fail immediately depending on whether a match
  4683. was found.  ckuus4.c, 21 Apr 98.
  4684.  
  4685. Added 877 and 866 to default list of toll-free area codes for country code 1
  4686. (again -- I did this before, but in the wrong place).  ckudia.c, 22 Apr 98.
  4687.  
  4688. Discovered that an optimization I added to ckucns.c to avoid unnecessary calls
  4689. to chkaes() was bad -- symptom: as soon as the first escape sequence was
  4690. received, C-Kermit would send an ESC to the terminal before each character
  4691. from then on.  Removed the optimizations, went back to calling chkaes() for
  4692. every incoming character.  ckucns.c, 23 Apr 98.
  4693.  
  4694. Got rid of some confusing and dangerous ifdefs in VMS sysinit(); now we get
  4695. the hardware & OS version consistently on VAX and Alpha.  ckvtio.c, 23 Apr 98.
  4696.  
  4697. Fixed various bad declarations.  ckuus5.c, ...
  4698.  
  4699. Added OSF/1 and SCO 3.2v5.04 to the systems where CK_UTSNAME can be safely
  4700. defined.  ckcdeb.h, 23 Apr 98.  (Also tried NeXT, but it's not allowed.)
  4701.  
  4702. ---Beta.03---
  4703.  
  4704. Removed an unreachable return() statement from the end of tn_doop().
  4705. Jeff, ckcnet.c,1 May 98.
  4706.  
  4707. Fixed \fsplit() return value -- it was counting too many words.
  4708. Jeff, ckuus4.c, 1 May 98.
  4709.  
  4710. Fixed broken SET TERMINAL ESCAPE option synonyms.  Jeff, ckuus7.c, 1 May 98.
  4711.  
  4712. Added -DNOGFTIMER to hpux90mot (HP-UX 9.0 on Motorola 680x0), since this
  4713. evidently doesn't work.  If somebody wants to try fixing it, be my guest.
  4714. makefile, 2 May 98.
  4715.  
  4716. Changed Elapsed Time display in STATISTICS command to show hh:mm:ss as well
  4717. as the total number of seconds.  ckuus4.c, 2 May 98.
  4718.  
  4719. Added \v(model) for HP-UX, works by running the HP-UX "model" command and
  4720. capturing its output into a cache (there is no API for this); subsequent
  4721. references read from the cache.  ckuus4.c, 2 May 98.
  4722.  
  4723. Moved the NEEDSELECTDEFS section from ckcnet.h to ckcdeb.h to allow non-TCP
  4724. builds to get these definitions, e.g. when needed for the new select()-based
  4725. CONNECT module.  This was necessary at least for HP-UX 6.5.  Added hpux65x
  4726. target for HP-UX 6.5 that specifies the xermit target and includes
  4727. -DNEEDSELECTDEFS.  ckcnet.h, ckcdeb.h, makefile, 2 May 98.
  4728.  
  4729. Peter E reported that Beta.03 no longer removed its lockfiles in HP-UX.  Since
  4730. my HP workstation drowned in the recent flood, I could not check this myself;
  4731. it doesn't happen on non-HP platforms, but they use different code.  I went
  4732. through the code, consolidated the HP and non-HP parts as much as possible,
  4733. added debugging statements, corrected some errors, and satisfied myself that
  4734. it works fine on non-HP platforms:
  4735.  
  4736.  . If the device is not in use, the appropriate lockfile is created and
  4737.    then destroyed when it is closed.
  4738.  
  4739.  . If the device is in use by an active process (Kermit or cu), Kermit refuses
  4740.    to open it, and displays the pid of the owning process.
  4741.  
  4742.  . If there is a lockfile for the device, but it contains a pid that does
  4743.    not correspond to an active process, C-Kermit removes the stale lockfile
  4744.    (printing a message) and opens the device.
  4745.  
  4746. Later I found an HP-UX 10.20 workstation that had an unprotected serial port
  4747. and lockfile directory -- all the above tests worked fine, except that cu was
  4748. not installed so I could only verify that Kermit interlocked with itself, and
  4749. that 4-byte integer pids were written and read OK.  ckutio.c, 2 May 98.
  4750.  
  4751. Made "x" a legal abbreviation for "xmodem" in "set protocol" (because of
  4752. "xmodem-crc".  ckuus3.c, 2 May 98.
  4753.  
  4754. Discovered that the code to check that RECEIVE was given an as-name for
  4755. XMODEM protocol was not in the right place.  Moved it.  ckuus6.c, 2 May 98.
  4756.  
  4757. The following sequence did not work with XMODEM:
  4758.  
  4759.   define \%a foo
  4760.   set protocol xmodem
  4761.   receive \%a
  4762.  
  4763. Fixed in doxget(), ckuus6.c, 2 May 98.
  4764.  
  4765. I broke SunLink X.25 compilation in Beta.03.  Fixed in ckuus4.c, 2 May 98.
  4766.  
  4767. PIPE command didn't allow its argument to be braced.  Fixed in setlin(),
  4768. ckuus7.c, 3 May 98.
  4769.  
  4770. Plugged a couple of out-of-bounds array references noticed by DEC C 5.7 and
  4771. reported by John Santos.  ckv[tf]io.c, 3 May 98.
  4772.  
  4773. Added #ifdefs to [rg]ftimer() for System V/88 on Motorola 88000 from Gerry
  4774. Belanger at Cognitronics.  ckutio.c, 3 May 98.
  4775.  
  4776. ---Beta.04---
  4777.  
  4778. Ric Anderson reported a place where ttchkpid() could exit without returning
  4779. a value.  Fixed in ckutio.c, 4 May 98.
  4780.  
  4781. Finally discovered the cause of persistent reports that uucp lockfiles were
  4782. not being removed: a test of ttchk()'s return value in doclean() would fail if
  4783. the line had never been used, and so ttclos() would not be called, which was
  4784. just plain wrong: "set line /dev/xxx, exit" would leave the lockfile behind.
  4785. (Thanks to Peter Eichhorn for narrowing down how to reproduce it.)
  4786. ckuusx.c, 4 May 98.
  4787.  
  4788. In tracking down the previous problem, I discovered the following: in HP-UX,
  4789. if the "set line" device name starts with "cu", we also create a lockfile for
  4790. the corresponding "ttyd" device, even if that device does not exist.  This is
  4791. normally OK, since both lockiles are removed by ttunlck().  However, when a
  4792. stale "cu"... lockfile is found (and removed), C-Kermit did not remove the
  4793. corresponding "ttyd"... lockfile if the ttyd device did not exist.  So I
  4794. changed ttlock() to create the ttyd lockfile only if the ttyd device exists.
  4795. ckutio.c, 4 May 98.
  4796.  
  4797. Fixed a reference to an uninitialized variable in ttopen(), detected by DECC
  4798. 5.8.  ckutio.c, 4 May 98.
  4799.  
  4800. Filled in \v(model) for Digital UNIX on advice from DEC, and added a symbol,
  4801. OSF50, and a designer banner for Digital UNIX 5.0, which will be released
  4802. soon.  ckcdeb.h, ckuver.h, ckuus4.c, makefile, 4 May 98.
  4803.  
  4804. Fixed \v(model) to return value of unm_mch[] in preference to nothing at all.
  4805. ckuus4.c, 4 May 98.
  4806.  
  4807. Removed -DNOGFTIMER from hpux90mot entry, since reportedly Beta.04 works fine
  4808. there.  makefile, 4 May 98.
  4809.  
  4810. Omitted listing of unm_mod at beginning of debug log if not filled in, which
  4811. it won't be except in VMS or if \v(model) has previously been referenced.
  4812. ckuus4.c, 4 May 98.
  4813.  
  4814. Updated AOS/VS text & binary filetype list.  ckcmai.c, 4 May 98.
  4815.  
  4816. Put an unguarded reference to "nopush" within #ifdef NOPUSH..#endif.
  4817. setlin(), ckuus7.c, 4 May 98.
  4818.  
  4819. Moved zxcmd() and zclosf() inside of #ifdef NOPUSH..#endif
  4820.  
  4821. syscmd() was not properly #ifdef'd for NOPUSH.  Fixed in ckcfns.c, 4 May 98.
  4822.  
  4823. Ditto for zshcmd().  ckufio.c, 4 May 98.
  4824.  
  4825. References to doftp() and doping() were not ifdef'd for NOPUSH.  Fixed in
  4826. ckuusr.c, 4 May 98.
  4827.  
  4828. Added a new compile-time option, NOTIMESTAMP, to disable all code related
  4829. to file timestamps, and employed it accordingly in ckufio.c.  4 May 98.
  4830.  
  4831. Added a banner for the AS/400 to ckuver.h.  You never know...  4 May 98.
  4832.  
  4833. Fix for hpux90mot makefile entry from Peter E.  makefile, 5 May 98.
  4834.  
  4835. Commented out "Alias => xxx" display.  ttopen(), ckcnet.c, 5 May 98.
  4836.  
  4837. Various #ifdef fiddling for AT&T 3Bx's.  cku[tf]io.c, ckcdeb.h, 5 May 98.
  4838.  
  4839. Final corrected makefile entries for AT&T 7300 that work, with help from
  4840. Peter Mauzey at Bell Labs.  makefile, 6 May 98.
  4841.  
  4842. Added banners for Ultrix 4.3, 4.4, 4.5.  ckuver.h, 6 May 98.
  4843.  
  4844. Made new SET MODEM TYPE keywords for USR and Megahertz that more obviously
  4845. correspond with the actual models, via synonyms, invisible abbreviations, etc,
  4846. without invalidating previous names.  ckudia.c, 7 May 98.
  4847.  
  4848. Made SET / SHOW { STREAMING, RELIABLE, CLEARCHANNEL } visible keywords.
  4849. ckuusr.c, 7 May 98.
  4850.  
  4851. Improved HELP SET [ TERMINAL ] ESCAPE messages.  ckuus2.c, 7 May 98.
  4852.  
  4853. VMS fixes from Lucas Hart, 7 May 98:
  4854.  
  4855.  . More allowances for <xxx> directory-name format: ckcfn3.c.
  4856.  . Improvements in hardware-name getting: ckvtio.c.
  4857.  . Enabling reverse DNS lookup for UCX (but not old UCX): ckcnet.c.
  4858.  . Improved isdir(), relative directories for labeled transfers,
  4859.    Fortran CC handling fixed to handle 0-length records and overprinting,
  4860.    etc: ckvfio.c.
  4861.  
  4862. Made MKDIR print a message (but still succeed) if it is told to create a
  4863. directory that already exists.  ckuusr.c, 7 May 98.
  4864.  
  4865. Added cross-references to SHOW PROTOCOL.  ckuus4.c, 7 May 98.
  4866.  
  4867. Added missing switches to HELP SEND text, plus cross-refs, and fixed text
  4868. for SEND /PATHNAMES:xxx.  ckuus2.c, 7 May 98.
  4869.  
  4870. UNIX nzltor() was correctly stripping ./ or ../ from the beginning of a local
  4871. filename before sending it to the remote, but only the first occurrence.
  4872. Fixed it to strip all occurrences from the beginning of the pathname.
  4873. ckufio.c, 7 May 98.
  4874.  
  4875. ---Beta.05---
  4876.  
  4877. Added some minor source-code corrections to ckucon.c and ckcnet.c affecting
  4878. only IBM AIXLink/X.25 builds, from Stephen Riehm.  15 May 98.
  4879.  
  4880. From Jeff:
  4881.  
  4882.  . Don't always set success for REMOTE commands that get a short form reply.
  4883.  . Increase atom buffer length.
  4884.  . Minor correction to UNIX ttol() when encrypting.
  4885.  . Prevent spurious parse errors from cmnum() within cmfdb().
  4886.  . Added zgetfs() to get a file's size (regardless of accessibility).
  4887.  . Make \v(return) show END <n> value.
  4888.  . Fix \fsplit() not to skip final word.
  4889.  . Fix mixup with RESEND/REGET versus filename patterns.
  4890.  . Corrections to (REMOTE) DIRECTORY command using zgetfs().
  4891.  . Fixes to LOOKUP, DIAL, and PDIAL.
  4892.  . Various networking fixes regarding blocking/select/etc vs streaming.
  4893.  . New SHOW TERM command for K95.
  4894.  
  4895. Added \fcvtdate(date) to convert free-format date and/or time to standard
  4896. format.  This required pulling conversion code out of cmdate() into a separate
  4897. routine.  ckuusr.h, ckuus4.c, ckucmd.c, 11 Jun 98.
  4898.  
  4899. Added zjdate() for UNIX, returns julian date yyyyddd.  ckufio.c, 11 Jun 98.
  4900. Needs to be added for K95, VMS, AOS/VS, ...  In UNIX we get it simply by
  4901. calling localtime().  ZJDATE is defined in ckcdeb.h for each platform that
  4902. has this feature (so far just UNIX).  (Note: we could also do this in a system
  4903. independent way, algorithmically -- maybe later.)
  4904.  
  4905. Added \fjdate(date), prints Julian date from given free-format date, or for
  4906. today if no arg.  Within #ifdef ZJDATE.  ckuusr.h, ckuus4.c, ckucmd.c,
  4907. 11 Jun 98.
  4908.  
  4909. Added ckdate() to return the current date/time in standard yyyymmdd_hh:mm:ss
  4910. format.  This now supplies the defaults for the new date functions (when
  4911. called with no arg) and for the DATE command (next item).  ckuus4.c, 12 Jun 98.
  4912.  
  4913. Changed DATE command to take an optional free-format date/time argument, and
  4914. then convert it to standard format and print it.  This provides a quick
  4915. pre-check on date formats.  ckuusr.c, ckucmd.c, 12 Jun 98.
  4916.  
  4917. Added help text for the new functions and DATE command.  ckuus2.c, 12 Jun 98.
  4918.  
  4919. Removed extraneous \n from end of all hmsg() calls, which were causing
  4920. unnecessary double blank lines.  ckuus2.c, 12 Jun 98.
  4921.  
  4922. Fixed att3bxc makefile entry to spell NONAWS right.  makefile, 12 Jun 98.
  4923.  
  4924. Added brace-stripping to SET TERM IDLE-SEND.  ckuus7.c, 12 Jun 98.
  4925.  
  4926. Changed STATISTICS to round hh:mm:ss to nearest second when floating point
  4927. is used.  ckuus4.c, 12 Jun 98.
  4928.  
  4929. Same deal for Elapsed time in the file transfer display.  ckuusx.c, 12 Jun 98.
  4930.  
  4931. Added "*.doc" to binary patterns -- Microsoft wins.  It's better to transfer
  4932. a plain-text doc file in binary mode than to transfer a Word document in text
  4933. mode (except with IBM mainframes!).  Users can, of course, always change this.
  4934. ckcmai.c, 12 Jun 98.
  4935.  
  4936. Suppose "oof*" matches one filename, which happens to be a directory (say,
  4937. "oofa").  Then "cd oof*" would fail, but would print "oofa - not a directory",
  4938. even though "oofa" is a directory.  Fixed in cmifi2() by making a last-minute
  4939. check for directoryness after calling zxpand.  ckucmd.c, 12 Jun 98.
  4940.  
  4941. A subtle problem, reported by Morten Knudsen in Norway:
  4942.  
  4943.   set count 4
  4944.   :back
  4945.   echo Jo!     ; (Norsk for Yo)
  4946.   input 1 OK
  4947.   xif fail { xif count { goto back } }
  4948.  
  4949. would keep going forever because COUNT was not being decremented.  Diagnosis:
  4950. since XIF is really a macro, it has its own COUNT variable on the stack.  When
  4951. the XIF was finished, the stack would be restored and the old COUNT would come
  4952. back -- thus it would never change.  Cure: Although XIF, FOR, WHILE, and SWITCH
  4953. are implemented as macros, this is supposed to be invisible to the user.  The
  4954. _GETARGS and _PUTARGS routines are used to fix up the stack before and after
  4955. use.  _PUTARGS, however, failed to restore the "stackable" variables: COUNT,
  4956. INPUT TIMEOUT, INPUT CASE, TAKE ERROR, and MACRO ERROR.  Fixed in dogta(),
  4957. ckuus6.c, 12 Jun 98.
  4958.  
  4959. So this fix takes care of:
  4960.  
  4961.   set count 6
  4962.   for \%i 1 3 1 { if count echo \v(count) }
  4963.   echo count = \v(count)
  4964.  
  4965. Previously it would say "count = 6" after exiting the loop; now it says
  4966. "count = 3".  However, it still does not fix Morten's script.  A further fault
  4967. was in GOTO, which takes an abnormal exit from XIF (and FOR, WHILE, and
  4968. SWITCH), thus bypassing their normal exit sequence (including the call to the
  4969. now-fixed dogta()).  So I added code to dogoto() to do the right thing when
  4970. called from within XIF, FOR, WHILE, or SWITCH.  ckuus6.c, 12 Jun 98.
  4971.  
  4972. Added three trivial commands useful in debugging scripts:
  4973.  
  4974.   ASSERT <condition> - Sets SUCCESS / FAILURE according to <condition>.
  4975.   FAIL               - Always fails (same as "assert false").
  4976.   SUCCEED            - Always succeeds (same as "assert true").
  4977.  
  4978. ckuusr.h, ckuusr.c, ckuus2.c, 12 Jun 98.
  4979.  
  4980. By popular demand, put a SIGHUP handler into the UNIX version, which simply
  4981. sets backgrd = 1, makes a debug log entry (if the debug log was open) and then
  4982. calls doexit(), which in turn flushes and closes all logs and other files
  4983. (shouldn't be necessary) and resets terminal modes, etc, and _exits.  Tested
  4984. by sending kill -1, works, seems harmless enough.  ckutio.c, 12 Jun 98.
  4985.  
  4986. When \f(r)index() was given a non-numeric start position, it printed the wrong
  4987. error message.  Fixed in ckuus4.c, 14 Jun 98.
  4988.  
  4989. Changed the LOOKUP command to accept phone numbers as well as directory entry
  4990. names.  If given a literal-format phone number, it gives it right back.  If
  4991. given a portable-format phone number, it converts it for dialing from the
  4992. current location and prints the result.  ckuus6.c, 14 Jun 98.
  4993.  
  4994. Added \fdialvalue(xxx) which returns the dial string that would actually be
  4995. used when given the phone number xxx.  ckuusr.h, ckuus4.c, 14 Jun 98.
  4996.  
  4997. Added \v(pdialsuffix) and \v(dialtype).  Didn't have time to test very much.
  4998. ckuusr.h, ckuus[46].c, 14 Jun 98.
  4999.  
  5000. Changed \v(pdialsuffix) to \v(dialsuffix) -- might as well set it for every
  5001. phone call.  Makes testing easier too.  ckuus4.c, 15 Jun 98.
  5002.  
  5003. Changed \fdialvalue() to \fdialconvert().  ckuus4.c, 15 Jun 98.
  5004.  
  5005. Cleaned up HELP FUNC messages for recent functions.  ckuus2.c, 15 Jun 98.
  5006.  
  5007. Renamed all text files to *.txt to fit Microsoft associations:
  5008.  
  5009.   ckermit2.upd => ckermit2.txt
  5010.   ckaaaa.hlp   => ckaaaa.txt
  5011.   ckc193.upd   => ckc193.txt
  5012.   ckuins.doc   => ckuins.txt
  5013.   ckvins.doc   => ckvins.txt
  5014.   ckermit.bwr  => ckcbwr.txt
  5015.   ckuker.bwr   => ckubwr.txt
  5016.   ckvker.bwr   => ckvbwr.txt
  5017.   ckcplm.doc   => ckcplm.txt
  5018.   ckccfg.doc   => ckccfg.txt
  5019.  
  5020. etc.  15 Jun 98.
  5021.  
  5022. There is no protocol for REGET /DELETE or REGET /RECURSIVE, yet these commands
  5023. can be given to the client.  Since no protocol is defined, the result is not
  5024. what the user expects.  For now, code has been added to prevent the client
  5025. from accepting these combinations.  Before allowing these combinations, I need
  5026. to do for the protocol what switches did for the command parser -- allow many
  5027. combinations of options, rather than inventing new top-level command words for
  5028. every conceivable combination.  The result will be an XGET (Extended GET)
  5029. packet that has distinct Options and Filespec fields.  doxget(), ckuus6.c,
  5030. 15 Jun 98.
  5031.  
  5032. SEND /RECOVER (RESEND) refused to work if SET FILE TYPE was not BINARY.  But
  5033. this was unreasonable when FILE PATTERNS were ON, since the file to be sent
  5034. might well be recognized as binary when Kermit gets to it later.  So the
  5035. offending check was removed from doxsend().  ckuusr.c, 15 Jun 98.
  5036.  
  5037. REGET (GET /RECOVER) did the same thing.  Normally, the client's transfer mode
  5038. controls the server's.  But if the server is doing per-file text/binary mode
  5039. switching because of filename patterns or record formats, this takes
  5040. precedence, and in that case the command-time check prevents an operation that
  5041. would have worked otherwise.  BUT WE HAVE NO WAY OF KNOWING whether the server
  5042. will do automatic mode switching, do we?  So if our current transfer mode is
  5043. text, we can (a) automatically change it to binary, or (b) leave as text and
  5044. hope that the transfer will switch to binary when the partially transferred
  5045. file is encountered.  (a) is bad since it might allow a broken text-mode
  5046. transfer to be resumed in binary mode, thus corrupting the file.  (b) would be
  5047. bad if no other checks were made, but checks have been added in the protocol
  5048. to prevent recovery in text mode on a per-file basis (Jeff's changes from
  5049. above).  So the parse-time check is now omitted.  doxget(), ckuus6.c,
  5050. 15 Jun 98.
  5051.  
  5052. Tested by having the server download part of a zip file, then telling it to:
  5053.  
  5054.   SET FILE PATTERNS OFF
  5055.   SET XFER MODE MANUAL
  5056.   SET FILE TYPE TEXT
  5057.   SERVER
  5058.  
  5059. and then telling the client to REGET the zip file.  The server says FAILURE:
  5060. Recovery attempted in TEXT mode: xxx, where xxx is the filename.
  5061.  
  5062. Somehow the recursive flag was getting stuck on in K95 when receiving files.
  5063. Changed ftreset() to always set recursive to 0, since this can never be a
  5064. global mode.  By the way, this had *all* sorts of odd effects, affecting the
  5065. DIRECTORY, DELETE, and many other file-oriented commands.  ckuusx.c, 15 Jun 98.
  5066.  
  5067. Changed ckdate() to return the same format as \fdate(), etc -- space between
  5068. date and time, rather than underscore.  ckuus4.c, 16 Jun 98.
  5069.  
  5070. Added .vxd to binary patterns.  ckcmai.c, 16 Jun 98.
  5071.  
  5072. Changed edit number from 193 to 194.  ckcmai.c, 18 Jun 98.
  5073.  
  5074. DIAL would no longer dial if given a phone number rather than a dialing
  5075. directory entry name, due to LOOKUP changes made on 14 June.  Fixed in
  5076. ckuus6.c, 20 Jun 98.
  5077.  
  5078. ---1.1.17---
  5079.  
  5080. Changes from Jeff:
  5081.  . Fix for DATE bug
  5082.  . Various K95-specific bits
  5083.  . Upped edit numbers
  5084.  . IKS changes
  5085.  . ttinc() non-MYREAD Telnet case was returning the wrong character
  5086.  
  5087. Added \v(lockpid), UNIX only.  Contains the PID from the UUCP lockfile from
  5088. the most recent SET LINE command, if (a) the command failed because the line
  5089. was in use by another process, and (b) the PID was obtainable.  Otherwise
  5090. \v(lockpid) has an empty value.  ckuusr.h, ckuus4.c, ckutio.c, 27 Jun 98.
  5091.  
  5092. Also \v(blockcheck), and also make "set block 4" an invisible synonym for
  5093. "set block B" so the \v(block) value could be used in SET BLOCK commands.
  5094. ckuusr.h, ckuus[34].c, 27 Jun 98.
  5095.  
  5096. More changes from Jeff for IKS.  Fixed some confusion in ckcnet.c.  28 Jun 98.
  5097.  
  5098. The VMS RESEND problem...
  5099.  
  5100.  . RESEND X.ZIP complains and fails if SET FILE TYPE not BINARY, even
  5101.    though it will be binary when it opens the file.  Fixed in doxsend(),
  5102.    ckuusr.c, 28 Jun 98.
  5103.  
  5104.  . RESEND /BINARY X.ZIP temporarily sets xfermode to BINARY (rather than AUTO)
  5105.    and this prevents rpar() from including the System ID in the S packet.
  5106.    There is no reason why the System ID should not always be sent.  Fixed in
  5107.    rpar(), ckcfns.c, 28 Jun 98.
  5108.  
  5109.  . VMS server fails to execute REGET unless it's already in binary mode.
  5110.    That's because the last-minute check for binary in sfile() was before
  5111.    the call to openi() rather than after, and in VMS, openi() (zopeni()
  5112.    really) has the final word on the transfer mode.  Fixed in ckcfn2.c,
  5113.    28 Jun 98.
  5114.  
  5115.  . When VMS C-K resends, it always sends the whole file again, except for
  5116.    the first byte.  This was the real problem...
  5117.  
  5118. I checked this with C-Kermit 6.0 to see if the same thing happened before all
  5119. the recent changes for odd-record-length files, etc.  Nope, it didn't.
  5120. Detailed comparison of the 6.0 and 6.1 code only turned up a lot of
  5121. SYS$RAB/FAB stuff I didn't understand.  Added lots of debugging statements to
  5122. see where we go wrong.  Hours later...  I found an "|" that should have been
  5123. an "&" in the code that was added to handled odd-record-length fixed-block
  5124. files.  So now RESEND in VMS is fixed, at least for even-record length files.
  5125. REGET too.  ckvfio.c, 28 Jun 98.
  5126.  
  5127. Added zgetfs() for VMS.  ckvfio.c, 28 Jun 98.
  5128.  
  5129. When (UNIX) C-Kermit got an autodownload and then returned to CONNECT mode
  5130. automatically, the terminal modes were messed up the first time we escape back
  5131. manually.  Fixed in doconect(), ckuus4.c, 28 Jun 98.
  5132.  
  5133. Added some debugging to try to track down a very strange problem in the OS-9
  5134. version, in which the pointer to the outbound packet buffer is NULL by the
  5135. time it reaches bgetpkt().  ckcfn[s3].c, 29 Jun 98.
  5136.  
  5137. Discovered that calling the system to get the Julian date is a LOT more
  5138. trouble than it's worth in most OS's except UNIX, so I moved zjdate() to
  5139. ckuus4.c and had it calculate the Julian date using old-fashioned arithmetic.
  5140. Now all C-Kermits have it.  ZJDATE symbol removed.  ckcdeb.h, ckuusr.h,
  5141. ckuus4.c, ckufio.c, 29 Jun 98.
  5142.  
  5143. Discovered that "blah" would be accepted as a valid date.  Bulletproofing
  5144. added to cmcvtdate().  ckucmd.c, 29 Jun 98.
  5145.  
  5146. Having written an algorithmic date-to-julian-date converter, it wasn't hard to
  5147. add a conversion in the other direction, so \fj2date() converts a Julian date
  5148. to a regular date.  ckuusr.h, ckuus4.c, 30 Jun 98.  (I was tempted to also add
  5149. date/time arithmetic functions, but resisted -- they are on the list for
  5150. later.)
  5151.  
  5152. Got rid of bell sound after successful DIAL if SET QUIET ON.  ckuus6.c,
  5153. 30 Jun 98.
  5154.  
  5155. Supplied missing Microcom-AT "error-correction off" command.  ckudia.c,
  5156. 1 Jul 98.
  5157.  
  5158. Fix from Jeff for partial dialing.  ckuus6.c, 2 Jul 98.
  5159.  
  5160. One call to cmcvtdate() was overlooked in converting to 2-arg format, as
  5161. well as one of the prototypes.  ckucmd.[ch], 2 Jul 98, from Jeff.
  5162.  
  5163. Added information about new dialing rules in Italy and Spain to Section 2.1
  5164. of ckermit2.txt, 3 Jul 98.
  5165.  
  5166. Fixed HANGUP to include an implicit CLEAR DIAL-STATUS.  ckuusr.c, 3 Jul 98.
  5167.  
  5168. Added bulletproofing to encstr() and getpkt() similar to that added to
  5169. bgetpkt(), to catch null "data" pointer.  ckcfns.c, 3 Jul 98.
  5170.  
  5171. Added Telnet negotiation to ttinl() in the UNIX version.  I did not add it to
  5172. ttxin(), since, in the UNIX version, ttxin() is used only by the CONNECT
  5173. module, which handles Telnet negotiations itself (except there is also one
  5174. call to ttxin() from ckudia.c, which is called only for modem type "unknown",
  5175. and then only when dialing failed, an unlikely combination on a Telnet
  5176. connection).  ckutio.c, 3 Jul 98.  Here's the first Internet Kermit Service
  5177. dialog between a C-Kermit client and a C-Kermit server:
  5178.  
  5179.   TELNET SENT WILL TERMINAL-TYPE=24
  5180.   TELNET SENT WILL NEGOTIATE-ABOUT-WINDOW-SIZE=31
  5181.   TELNET SENT WILL NEGOTIATE-ABOUT-KERMIT-SERVER=45
  5182.   TELNET SENT DO NEGOTIATE-ABOUT-KERMIT-SERVER=45
  5183.   TELNET SENT DO SUPPRESS-GO-AHEAD=3
  5184.   TELNET RCVD DONT TERMINAL-TYPE=24
  5185.   TELNET SENT WONT TERMINAL-TYPE=24
  5186.   TELNET RCVD DONT NEGOTIATE-ABOUT-WINDOW-SIZE=31
  5187.   TELNET SENT WONT NEGOTIATE-ABOUT-WINDOW-SIZE=31
  5188.   TELNET RCVD DO NEGOTIATE-ABOUT-KERMIT-SERVER=45
  5189.   TELNET SENT SB NEGOTIATE-ABOUT-KERMIT-SERVER START-SERVER IAC SE=0
  5190.   TELNET RCVD WILL NEGOTIATE-ABOUT-KERMIT-SERVER=45
  5191.   TELNET RCVD WILL SUPPRESS-GO-AHEAD=3
  5192.   TELNET SENT DO SUPPRESS-GO-AHEAD=3
  5193.   TELNET SENT DO LOGOUT=18
  5194.  
  5195. After some research, discovered that yyyyddd is *not* a Julian date, but
  5196. rather a "day of year".  Changed \fjdate() to \fdayofyear() (but left
  5197. \fjdate() as an invisible synonym, since we released K95 1.1.17 with it),
  5198. and \fdoy() as another invisible synonym.  Changed \fj2date() to
  5199. \fdoy2date() (day of year to date).  ckuus4.c, 3 Jul 98.
  5200.  
  5201. Now, a *true* Julian date is the number of days since a fixed date in the
  5202. past, and this is more useful anyway, since normal arithmetic works on it.  By
  5203. definition, the fixed date is 1 Jan 4713 BCE, but that makes for big numbers,
  5204. so the more common form is the Modified Julian Date (MJD), which is the number
  5205. days since 17 November 1858 -- which, coincidentally, is also Day Zero in VMS.
  5206. I added system independent functions to convert from a free-format date to MJD
  5207. (\fmjd()) and vice versa (\fmjd2date()).  So now we have date arithmetic,
  5208. e.g.:
  5209.  
  5210.   .\%x := \fmjd()                  ; Today's MJD
  5211.   .\%x ::= \%x - 7                 ; MJD one week ago
  5212.   send /after:\fmjd2date(\%x) *.*  ; Send all files created in the last week
  5213.  
  5214. or more compactly:
  5215.  
  5216.   send /after:\fmjd2date(\fmjd() - 7) *.*
  5217.  
  5218. ckuusr.h, ckuus4.c, 3 Jul 98.
  5219.  
  5220. Added \fday(date) (day of week) and \fnday(date) (numeric day of week).
  5221. ckuusr.h, ckuus4.c, 4 Jul 98.
  5222.  
  5223. Added help text and docs for new date functions, ckuus2.c, ckermit2.txt,
  5224. 4 Jul 98.
  5225.  
  5226. Added evalx(), which is a silent version of evala() -- does the same thing,
  5227. but does not print any error messages.  ckuus5.c, 5 Jul 98.
  5228.  
  5229. Fixed rdigits() not to succeed when given the null string or an empty string.
  5230. ckucmd.c, 5 Jul 98.
  5231.  
  5232. \fdate() and \fsize() did not fail or print error messages if given bad
  5233. arguments.  Fixed in ckuus4.c, 5 Jul 98.
  5234.  
  5235. Added \ftime(), \fntime(), and \fn2time().  ckuusr.h, ckuus[24].c,
  5236. ckermit2.txt, 5 Jul 98.
  5237.  
  5238. Added \v(tftime) - elapsed time in seconds of most recent file transfer.
  5239. ckuusr.h, ckuus4.c, 5 Jul 98.
  5240.  
  5241. From Kevin Handy: Although it is legal to take the address of a constant in
  5242. VAXC, it is not legal in GCC (and not a good idea either!).  This was done in
  5243. the VMS version of gftimer().  Fixed by assigning the constant to a variable
  5244. and taking the address of the variable.  He can now build C-K 6.1 B.05
  5245. successfully with GCC 2.8.1 on VMS 5.5-2 without network support.  ckvtio.c,
  5246. 5 Jul 98.
  5247.  
  5248. IKS changes from Jeff, many modules, 6 Jul 98.
  5249.  
  5250. Removed the restriction from tod2sec() that hours must be 24 or less.  There
  5251. is no reason why lots of hours can't be specified -- after all, we can still
  5252. convert them to seconds.  ckuus6.c, 6 Jul 98.
  5253.  
  5254. Changed cm/ckcvtdate() to allow hours to be > 24 if given a special argument.
  5255. ckucmd.c, 6 Jul 98.
  5256.  
  5257. Merged tod2sec() and \fntime() -- they have the same purpose, but the latter
  5258. is much more tolerant (see ckermit2.txt).  ckuus4.c, 6 Jul 98.
  5259.  
  5260. Removed 75 lines of crufty code from doalarm() and replaced them by calls to
  5261. the new date/time-handling functions, to fix problems with alarms that span
  5262. midnight.  ckuus3.c, 6 Jul 98.
  5263.  
  5264. Corrections to yesterday's changes -- missing args to ckcvtdate(), etc.
  5265. ckuus3.c, ckuus6.c, 7 Jul 98.
  5266.  
  5267. Added HADDRLIST definition for major Unixes to ckcnet.h, and removed them from
  5268. the makefile.  7 Jul 98.
  5269.  
  5270. Added CLEAR ALARM -- more intuitive than SET ALARM 0 (which still works).
  5271. ckuusr.[ch], ckuus3.c, 7 Jul 98.
  5272.  
  5273. Added CLEAR TEXT-PATTERNS and CLEAR BINARY-PATTERNS; everything that has an
  5274. ADD or REMOVE command should also have a CLEAR command.  ckuusr[ch], 7 Jul 98.
  5275.  
  5276. Updated HELP CLEAR -- it was way out of date.  ckuus2.c, 7 Jul 98.
  5277.  
  5278. Added a section, 7.15, on alarms to ckermit2.txt.  7 Jul 98.
  5279.  
  5280. Changes from Jeff to support server-side Telnet negotiations and remote/local
  5281. echo.  ckuusr.h, ckuus[23457].c, ckcfn2.c, ckucon.c, ckucns.c, ckcnet.c,
  5282. 11 Jul 98.
  5283.  
  5284. Added hooks for SET NETWORK TYPE PTY, but they don't do anything yet.  Symbol
  5285. NETPTY governs inclusion of PTY code, defined for now only for SunOS.
  5286. ckcnet.h, ckuus[r3].c, ckutio.c, 11 Jul 98.
  5287.  
  5288. Added REMOTE EXIT, 12 Jul 98.:
  5289.  . Server side: ckcpro.w, ckcfns.c, ckcmai.c.
  5290.  . Client side: ckuusr.h, ckuus[r7].c.
  5291.  . { ENABLE, DISABLE } EXIT: ckuusr.[ch].
  5292.  . SHOW SERVER.  ckuus[56].c.
  5293.  . HELP REMOTE EXIT.  ckuus2.c.
  5294.  . Documentation.  ckermit2.txt.
  5295.  
  5296. Defined Option and Mode bits for Extended GET.  ckcker.h, 12 Jul 98.
  5297.  
  5298. Added client side of Extended GET, single-packet, single-filespec version
  5299. only, supporting only /DELETE /RECOVER /RECURSIVE options and /BINARY /TEXT
  5300. /LABELED modes:
  5301.  
  5302.  . Defined Option and Mode bits for Extended GET.  ckcker.h,
  5303.  . Set opkt flag in GET cases where needed & get options.  doxget(), ckuus6.c.
  5304.  . Added new start state "o" for Extended GET.  ckuus6.c, ckcpro.w.
  5305.  . Added opkt parameter to srinit(): ckcker.h, ckcpro.w, ckcfn2.c.
  5306.  . Reset O-Packet options after transaction complete. ftreset(), ckuusx.c,
  5307.  . Added code to srinit() to send O-packet.  ckcfn2.c.
  5308.  
  5309. Added server side of Extended GET.  New state for incoming O packet, new
  5310. second arg to sgetinit() indicating O packet, sgetinit() parses the O packet,
  5311. extracts the flags, mode, and filename.  Allows for multiple incoming O
  5312. packets, even though the client doesn't send them yet.  Does not yet allow for
  5313. multiple filespecs.  Does not yet support selectors of any kind (date, size,
  5314. exception list).  Cleaned up various other bits in sgetinit().  ckcpro.w,
  5315. 12 Jul 98.
  5316.  
  5317. Tested all combinations of GET switches on regular files as well as commands;
  5318. it all seems to work nicely, including GET /DELETE /RECOVER /RECURSIVE when
  5319. recursion and recovery actually are involved.  If a new client sends an O
  5320. packet to an old server, the server complains about unknown packet type.  If
  5321. an OLD client sends GET, REGET, RETRIEVE, etc, to a new server it works as
  5322. expected.
  5323.  
  5324. No particular documentation or help messages were needed since it's all under
  5325. the surface -- it makes some GET switch combinations work that didn't work
  5326. before.
  5327.  
  5328. Will add selectors and multiple filenames (mget) later.  Ditto for quoting
  5329. and generic wildcards (but since wildcards already work nobody will notice
  5330. that this part isn't done).
  5331.  
  5332. Changes from Jeff to ckcfn2.c and ckcnet.c, 13 Jul 98.
  5333.  
  5334. Fixed a bug in O-Packet encoding (it neglected to terminate the string).
  5335. ckcfn2.c, 13 Jul 98.
  5336.  
  5337. Added comments to O-packet decoder.  ckcpro.w, 13 Jul 98.
  5338.  
  5339. Changed O-Packet encoder to build a linked list of fields, and O-Packet sender
  5340. to fill one or more packets with one or more fields on a first-fit basis.
  5341. Various errors are now possible (malloc failure, filename too long, missing
  5342. filename, etc), so an appropriate message is set for the E-Packet.  ckcfn2.c,
  5343. 14 Jul 98.
  5344.  
  5345. Changed protocol engine to include a new state for sending and getting ACKs
  5346. to O-Packets, and another new state for sending a sequence of O-Packets.
  5347. ckcpro.w, 14 Jul 98.
  5348.  
  5349. Tested OK with GET /RECURSIVE /RECOVER /DELETE /BIN short-filename (so it
  5350. assembles the O-Packet fields from the linked list OK).  Tested with a very
  5351. long filename and verified that it triggers a second O-Packet.  Tested
  5352. with a null filename and verified it sends the proper error message (which
  5353. should never occur in real life).
  5354.  
  5355. Then came a test where the filename exactly reached the end of the packet,
  5356. leaving no space for the 2-byte EOP tag ("@ ").  This failed for a subtle
  5357. reason in the getpkt() routine, namely that it did not distinguish between
  5358. real data and memory-string data.  Real data (such as file data) could leave
  5359. behind leftovers that would be picked up next time.  But getpkt() is called
  5360. only once on string data -- the encoded argument string is supposed to fit
  5361. into one packet.  But getpkt() was (a) making leftovers, and (b) returning
  5362. success, rather than failing in this case, thus truncating the data.  This bug
  5363. must have other consequences too, but none that have ever been reported.
  5364.  
  5365. Once this was fixed it was possible to test the other cases.  So now the
  5366. protocol part is working -- the client will send as many O-Packets as it takes
  5367. to handle all the O-Packet fields, and the server will read and process
  5368. incoming O-Packets until the final one is received, and then will switch into
  5369. send state, and the client will switch into receive state.
  5370.  
  5371. There is a still one remaining area to handle -- packet loss:
  5372.  . What if the final O-Packet is lost?  No problem, the server NAKs it.
  5373.  . What if the server's S-packet is lost?  Here we have a problem if
  5374.    the client times out and resends its final O-Packet *and* this O-Packet
  5375.    has a nonzero sequence number: the server's transport layer
  5376.    rejects the packet.  I'll handle this tomorrow...
  5377.  
  5378. Still to do (easy now):
  5379.  . Handle multiple filenames
  5380.  . Handle selectors
  5381.  . Redo MGET to use O with multiple filenames (?)
  5382.  
  5383. Merged LOGIN and LOGOUT commands from Jeff.  Made lots of portability changes,
  5384. plus some corrections (cklogin/out routines already existed; various malloc'd
  5385. buffers were not being freed on error return from routines, etc).
  5386. ckcdeb.h, ckuusr.[ch], ckuus7.c, 15 Jul 98.
  5387.  
  5388. With the changes above, C-Kermit would not run properly when chroot'd because
  5389. it could not find "/dev/tty", which it normally opens when entering protocol
  5390. mode.  This could be worked around with "-l 0" on the command line, except
  5391. then Kermit thought it was in local mode.  Fixed by making ttopen(), when
  5392. given a device name of "0", set remote mode rather local.  ckutio.c,
  5393. 16 Jul 98.
  5394.  
  5395. Added "-A" command-line option.  Starts K95 as an Internet server on device
  5396. "0".  ckuusy.c, 16 Jul 98.
  5397.  
  5398. Problem with both the above, at least on SunOS: After return from protocol
  5399. mode, CRs are no longer supplied by the terminal driver after LFs (CRMOD
  5400. function is lost).  Explicitly setting it in concb() doesn't help.  Turns out
  5401. the problem was that UNIX concb() would just return if Kermit was started with
  5402. device "0".  Commented out that code and it works OK, but I wonder why it was
  5403. there to begin with (i.e. I wonder what I just broke).  ckutio.c, 16 Jul 98.
  5404.  
  5405. Changed main program to call ckxlogin(NULL,NULL,NULL) if C-Kermit invoked with
  5406. -A option, so the first thing the user sees is a login prompt.  This happens
  5407. before the initialization file, script, or any command-line action option is
  5408. executed, but after Kerberos initialization, and it works OK,  ckcmai.c,
  5409. 16 Jul 98.   (Presumably ckxlogin() will return 1 if user has already
  5410. authenticated via Kerberos...)
  5411.  
  5412. But when running C-Kermit in this manner, for some reason it gets a SIGHUP
  5413. when receiving a file.  Experimentation shows this happens whenever we use
  5414. "-l 0" and the receive packet length (or the product of packet length and
  5415. window size) is greater than 897, which looks suspiciously close to the TCP
  5416. MSS.  So all the changes made to accommodate file descriptor 0, though perhaps
  5417. useful in other contexts, don't help here.  The real trick is to go back to
  5418. opening /dev/tty, but doing it before the chroot(), while we can still see it.
  5419. Fixed in ckcmai.c, ckuus4.c, ckuusy.c.  16 Jul 98.
  5420.  
  5421. Cleanups from Jeff for login code.  ckuus7.c, 18 Jul 98.
  5422.  
  5423. Tried building a version with:
  5424. "LIBS= -L/usr/local/lib -lpwent -lcurses -ltermcap"
  5425. to see if it would use the local authentication methods, found lots of bugs
  5426. in the code that logs in a real user.  Fixed them, now it works.  ckuus7.c,
  5427. 18 Jul 98.
  5428.  
  5429. Moved user ID and password-checking code to new system-dependent routines,
  5430. zvuser() and zvpass().  ckufio.c, 18 Jul 98.
  5431.  
  5432. Changed ckxlogin() to behave consistently in call cases, always prompting for
  5433. both a user ID and password, and not giving a failure message until after the
  5434. user has given both, and always giving the same message in case of failure:
  5435. "Access denied".  ckuus7.c, 18 Jul 98.
  5436.  
  5437. Verified that when logged in via ckxlogin() that "set line /dev/blah" fails
  5438. properly when lockfile directory is protected against the logged-in user,
  5439. even though the real user is root.
  5440.  
  5441. Built a copy with CK_LOGIN, local libs, and NOLOCAL, since this is the
  5442. configuration that will probably be used in the real world -- allowing an
  5443. Internet Kermit server to dial out or make Telnet connections would make about
  5444. as much sense as allowing an FTP server to do this.  (But with Kermit, it
  5445. would actually work -- but it would also open up enormous security holes...)
  5446. Got this working OK after adjusting some #ifdefs, and the resulting executable
  5447. is about 200K smaller.  NOTE: We can't enclose all of ckcnet.c in #ifndef
  5448. NOLOCAL because now we support server-side Telnet negotiation.  However, I was
  5449. able to #ifdef out a rather large portion of it.  This involved making sure
  5450. that TNCODE was not disabled if NETCONNN or TCPSOCKET were not defined, or
  5451. if NOLOCAL was defined.  So another 25K cut away.  Many modules, 18 Jul 98.
  5452.  
  5453. Rather massive rearrangement of ckcnet.c to allow TELNET routines and
  5454. variables to exist even when NETCONN & TCPSOCKET are not defined and/or
  5455. NOLOCAL is defined.  18 Jul 98.
  5456.  
  5457. Enabled SET/SHOW TELNET when TNCODE defined, even if NETCONN & TCPSOCKET
  5458. not defined or NOLOCAL defined.  ckuus3.c, 18 Jul 98.
  5459.  
  5460. All of the above will obviously need a lot more work, testing, and thought
  5461. (not necessarily in that order).  For example, how does Kermit, when in remote
  5462. mode, know if it should be doing server-side Telnet negotiation?  If it's
  5463. already under a telnetd, then the only time it will see an IAC is if a quoted
  5464. IAC has been unquoted and passed down, but how do we tell the difference?
  5465. There's no way, unless we are told, e.g. by a command-line argument.
  5466.  
  5467. For example, constructions like:
  5468.  
  5469.     if (netconn && (ttnproto == NP_TELNET) && (n == IAC))
  5470.  
  5471. when used to decide whether to call tn_doop(), tn_siks(), etc, are completely
  5472. wrong.  They should be more like:
  5473.  
  5474.     if (n == IAC &&
  5475.     ((local && network && (ttnproto == NP_TELNET)) ||
  5476.     (!local && sstelnet)))
  5477.  
  5478. where sstelnet is nonzero when we should be doing server-side Telnet
  5479. negotiation.  Such changes need be made only in code that can be executed in
  5480. remote mode, e.g. in ttinl(). doinput(), etc.  For now, we set the sstelnet
  5481. flag when the -A command-line option is given (but we might want to make
  5482. separate cases in the future for Telnet and non-Telnet servers that must be
  5483. logged in to -- e.g. Kermit replacing login for incoming serial connections).
  5484.  
  5485. Anyway, I think I caught most of these cases.  Many modules, 18 Jul 98.
  5486.  
  5487. Made a new makefile entry for testing all this: sunos41gccx.  It adds NOLOCAL,
  5488. TNCODE, and IKS_OPTION.  18 Jul 98.
  5489.  
  5490. A debug log from Ron Heiby showed that we are accepting 0x81 as Start of
  5491. Packet (SOP) even though we know parity is none.  This is an artifact of the
  5492. automatic parity detection code -- since we don't know in advance if the first
  5493. packet has parity, we check for SOP using a mask of 0x7f.  But after we know
  5494. there is no parity, we should change the mask to 0xff.  Fixed in ttinl().
  5495. Also, improved the way ttinl() decides whether a parity check is needed by
  5496. (re)setting the flag in ttpkt(), which is always called at the beginning of
  5497. packet operations.  I also rearranged the code a bit to test for interruption,
  5498. SOP, and length in a more sensible (and efficient) order.  ckutio.c, 19 Jul 98.
  5499.  
  5500. Made "set prefixing none" invisible.  ckuus3.c, 19 Jul 98.
  5501.  
  5502. From Jeff, 19 Jul 98:
  5503.  
  5504.  . Moved cmdini() call to higher up in main() just in case anything that
  5505.    happens in prescan() needs the command parser or buffers.  ckcmai.c.
  5506.  . Moved some code from prescan() to main().  ckuus4.c, ckcmai.c.
  5507.  . Change end_login() to zvlogout().  ckufio.c, ckuus7.c.
  5508.  
  5509. Added prototypes for zv{user,pass,logout}() to ckcdeb.h, 19 Jul 98.
  5510.  
  5511. Updated some comments in input().  ckcfn2.c, 19 Jul 98.
  5512.  
  5513. Removed NONE from HELP SET PREFIXING message (Jeff), ckuus2.c, 21 Jul 98.
  5514.  
  5515. Added SET SERVER CD-MESSAGE { ON, OFF }.  When ON, and the user successfully
  5516. CDs to a directory that contains a READ.ME file (name configurable), its
  5517. contents are sent to the client's screen, similar to what wu-ftpd does.  If
  5518. such a file does not exist, or is not readable, the directory name is sent
  5519. back in the ACK, as before.  The default CD Message filename is defined in
  5520. ckcker.h as DFCDMSG.  This can be overridden by defining DDFCDMSG on the CC
  5521. command line to be the quoted filename, e.g.:
  5522.  
  5523.   make xxx "KFLAGS=-DDFCDMSG=\\\"newname\\\""
  5524.  
  5525. (the number of \'s depends on the shell, how deeply nested the makefile entry
  5526. is, etc).  The default for UNIX and OS-9 is "./.readme"; for others it's
  5527. "READ.ME".  The default for SET SERVER CD-MESSAGE is OFF, except when user
  5528. logs in anonymously, in which case it's ON.  ckcmai.c, ckcker.h, ckuusr.h,
  5529. ckuus[23].c, ckcfns.c, ckcpro.w, 21 Jul 98.
  5530.  
  5531. Added SET SERVER CD-MESSAGE FILE <name> to allow the message-file name to be
  5532. specified at runtime.  ckuus3.c, 21 Jul 98.
  5533.  
  5534. Added REMOTE SET SERVER CD-MESSAGE { ON, OFF }, client side and server side,
  5535. Code 420, ckuus3.c, ckcfns.c, 21 Jul 98.
  5536.  
  5537. Added CD Message material to SHOW SERVER.  ckuus5.c, 21 Jul 98.
  5538.  
  5539. Considered adding ENABLE/DISABLE CD-MESSAGE, but I don't see a need for it.
  5540. If you can CD to a directory, you can GET or REMOTE TYPE any file in it that
  5541. you have read access to, so there is no reason to disable the CD message
  5542. feature; the user can turn it on or off as desired, and whoever sets up the
  5543. server can set the initial state.
  5544.  
  5545. Don't set the sstelnet flag if in local mode.  ckuus4.c, 21 Jul 98.
  5546.  
  5547. Made -A imply -z (force foreground), for when we are running under inetd.
  5548. ckcmai.c, 22 Jul 98.
  5549.  
  5550. Changed default CD-message file for non-UNIX to README.TXT.  ckcker.h,
  5551. 22 Jul 98.
  5552.  
  5553. Problem with filename patterns, first noted by Peter Eichhorn:
  5554.  
  5555.  1. Person sending files is running C-Kermit 6.1 on UNIX with SET FILE
  5556.     PATTERNS ON (which is the default) and SET FILE TYPE BINARY.
  5557.  
  5558.  2. The Kermit program on the receiving end does not support Attribute packets.
  5559.  
  5560.  3. The sender switches between text and binary mode per file, but since the
  5561.     receiver does not support A-packets, the sender has no way to tell the
  5562.     receiver about the mode switching.
  5563.  
  5564.  4. Text files are sent with CRLFs.
  5565.  
  5566. Consequences:
  5567.  
  5568.  1. If the receiver is UNIX, this ruins the text files (at least for certain
  5569.     applications).  This is an incompatible change from past behavior, and
  5570.     it is bad.
  5571.  
  5572.  2. If the receiver is on a DOS-like file system, the text files arrive in
  5573.     the proper format.  This, too, is a change from previous behavior in
  5574.     which the text files would have been sent in UNIX format.
  5575.  
  5576. Possible solutions:
  5577.  
  5578.  1. Leave matters as they are.  Not good, since this breaks something that
  5579.     used to work.
  5580.  
  5581.  2. As soon as the transfer starts, C-Kermit knows whether the other Kermit
  5582.     supports A-packets.  If it does not, disable per-file mode switching.
  5583.     This eliminates Bad Consequence 1 above, restoring the earlier (and
  5584.     expected) behavior.  It also eliminates Good Consequence 2 above, but
  5585.     that's OK since it is not a change from previous behavior.
  5586.  
  5587.  3. Solution 2 is satisfactory but less than optimal, since one would expect
  5588.     that in SET FILE PATTERNS ON, "ON" means ON.  It also rules out Good
  5589.     Consequence 2 even in cases where we might want it.  A better solution
  5590.     might be to add SET FILE PATTERNS AUTO and make it the default.  Then
  5591.     ON would mean ON, OFF would mean OFF, and AUTO would mean "ON but only
  5592.     if the other Kermit accepts Attribute packets".
  5593.  
  5594. Option 3 restores the original behavior when the receiver does not support
  5595. A-packets, but allows for mode switching when A-packets can be used, and it
  5596. also allows for Good Consequence 2 when A-packets can't be used if you SET
  5597. FILE PATTERNS ON.  So...
  5598.  
  5599.  . Added AUTO to SET FILE PATTERNS keywords, value 2.  ckuus7.c.
  5600.  . Changed default to AUTO.  ckcmai.c.
  5601.  . Changed SHOW FILE and SHOW PATTERNS to display "auto".  ckuus5.c.
  5602.  . Updated HELP SET FILE message.  ckuus2.c.
  5603.  . Changed spar() to set patterns = 0 if AUTO && A-packets not negotiated.
  5604.    The prevailing setting is restored automatically at the end of protocol.
  5605.    ckcfns.c, ckuusr.c.  22 Jul 98.
  5606.  
  5607. Corrected some filename patterns that were missing "*".  ckcmai.c, 22 Jul 98.
  5608.  
  5609. Server-side telnet changes from Jeff, including recognition of Telnet
  5610. negotiations when at prompt.  23 Jul 98.
  5611.  
  5612. Some minor server-side Telnet corrections:
  5613.  . When packet mode interrupted by ^C^C^C, echo "^C..." to stdout not stderr.
  5614.  . Flush typeahead before username and password prompts.
  5615.  
  5616. Changed UNIX packet reader to print ^X... when interrupted, where ^X is the
  5617. actual transfer cancellation character, rather than always printing "^C...".
  5618. ttinl(), ckutio.c, 23 Jul 98.
  5619.  
  5620. If TCPSOCKET is defined but TNCODE is not, define TNCODE for the benefit of
  5621. any modules that might need it for server-side Telnet protocol, but that don't
  5622. need to include all of ckcnet.h.  ckcdeb.h, 23 Jul 98.
  5623.  
  5624. The previous change still wasn't good enough for ckucmd.c, so I made it
  5625. include ckcnet.h.  23 Jul 98.
  5626.  
  5627. Added SET COMMAND AUTODOWNLOAD { ON, OFF }, independent of SET TERMINAL
  5628. AUTODOWNLOAD { ON, OFF }.  When ON, which is the default, the command parser
  5629. recognizes Kermit packets.  An S packet makes it go into receive mode, an I
  5630. packet makes it go into server mode.  ckuusr.h, ckuus[235].c, 23 Jul 98.
  5631.  
  5632. Implemented SET COMMAND AUTODOWNLOAD in gtword(), ckucmd.c, and
  5633. kstart(), ckcfn2.c, 23 Jul 98.  For now, works only for Kermit protocol.
  5634. Add Zmodem later.
  5635.  
  5636. Changed server end of REMOTE LOGIN as follows:
  5637.  
  5638.  1. If a login attempt fails, send back an Error packet rather than an ACK
  5639.     with an error message, so the client can tell that it failed.
  5640.  
  5641.  2. If started with -A, authenticate the user via ckxlogin() rather than
  5642.     the SET SERVER LOGIN strings.
  5643.  
  5644.  3. If the client tries to log in when already logged in, send an E packet,
  5645.     but leave them logged in.
  5646.  
  5647. The next step is to allow a REMOTE LOGIN packet to be received and processed
  5648. at the Username: prompt.  This almost works -- kstart() recognizes the packet
  5649. OK, but since the command parser has not entered its keyword parsing loop yet,
  5650. the mechanism that is used under normal circumstances (stuff "server" or
  5651. "receive" into the command buffer) is inappropriate here -- it just looks like
  5652. a username.  I'll fix this tomorrow.
  5653.  
  5654. Add server idle-timeout into to SHOW SERVER, from Jeff.  ckuus5.c, 24 Jul 98.
  5655.  
  5656. printf(), putchar(), perror() replacements from Jeff for UNIX, to translate
  5657. "\n" to CRLF when C-Kermit is an Internet server, in which case there is no
  5658. terminal driver to do this.  When run as an Internet server, C-Kermit now
  5659. prints normal-looking output rather than giving the stairstep effect.
  5660. ckutio.c, ckcdeb.h, 24 Jul 98.
  5661.  
  5662. Changed '-A' to include '-Q' (fast protocol settings) and (from Jeff) to
  5663. set "nopush".  Previously, nopush was set only for guest logins; now it is
  5664. set for regular ones too, not for security reasons, but because output from
  5665. inferior processes has bare LFs, since there is no terminal driver to convert
  5666. them to CRLF.  ckcmai.c, ckuusy.c, 24 Jul 98.
  5667.  
  5668. Changed ckwart to not use the printf(), putchar(), perror() replacements,
  5669. since it does not have access to them.  ckwart.c, 24 Jul 98.
  5670.  
  5671. Added numerous casts to shut up picky Sun ANSI cc.  ckcfn[2s].c, ckcpro.w,
  5672. ckuus[r7].c, 24 Jul 98.
  5673.  
  5674. Yesterday's code broke regular logins at the Username: prompt by failing to
  5675. set the "logged in" variable checked by the server whenever a command is given
  5676. that requires the user to be logged in.  Fixed in ckcmai.c, 24 Jul 98.
  5677.  
  5678. Adjusted the method for the command parser to let the upper level code know
  5679. that a Kermit packet had been received, so now it doesn't depend on the
  5680. top-level keyword table.  Instead, it just sets the start-state appropriately.
  5681. This method could be used by the CONNECT command too, since it's a lot simpler
  5682. and does not rely on APC or the script language being configured in, but it
  5683. would also require changing every CONNECT module plus the mainline code that
  5684. calls the CONNECT module.  ckucmd.c, 24 Jul 98.
  5685.  
  5686. Adjusted the main program to call ckxlogin() in a loop in a way that allows
  5687. direct login at the prompt, or via Kermit REMOTE LOGIN packet.  But this fails
  5688. because of the autoupload string "kermit -x" has already been read at the
  5689. Username prompt and taken as the user name.  But then if the password reader
  5690. also checks for autoupload, we undo this and it works quite nicely.  Made sure
  5691. that "kermit -A" exits after three successive unsuccessful attempts to log in,
  5692. no matter whether this is at the prompt or by REMOTE LOGIN.  But this does not
  5693. close the connection to the client, since it is the superior program (such as
  5694. inetd) that has it open, so that program has to be relied upon to close the
  5695. connection when the server program exits.  ckcmai.c, ckuus7.c, 24 Jul 98.
  5696.  
  5697. Added a pause after each unsuccessful login attempt.  ckcmai.c, 24 Jul 98.
  5698.  
  5699. Even assuming the connection is closed by the remote after 3 bad login
  5700. attempts, if the client is sitting at its prompt sending REMOTE LOGIN
  5701. requests, there is no indication to the user that the connection has been
  5702. closed.  Changed the client so if REMOTE LOGIN or any other REMOTE command is
  5703. given when in local mode but ttchk() returns < 0, it prints "?No connection"
  5704. and fails.  ckcpro.w, 24 Jul 98.  (I probably should do this for SEND and
  5705. RECEIVE too...)
  5706.  
  5707. Changed DIRECTORY command, general case, to call domydir() (built-in
  5708. directory-listing generator) if NOPUSH is defined or if nopush is set.
  5709. ckuus6.c, 24 Jul 98.
  5710.  
  5711. Added an easier way to access command-line arguments.  In:
  5712.  
  5713.   kermit -a -b -c ... = word1 word2 word3 ...
  5714.  
  5715. "/path/kermit" is assigned to top-level \%0, word1 is assigned to top-level
  5716. \%1, word2 to \%2, and so on.  If a Kermit script is started on the command
  5717. line, \%0 is set to the pathname of the script rather than the pathname of
  5718. Kermit.  cmdini(), ckuus5.c, 25 Jul 98.
  5719.  
  5720. Made "show args" work for top level.  doshow(), ckuus5.c, 25 Jul 98.
  5721.  
  5722. Made \v(argc) work for top-level.  nvlook(), ckuus4.c, 25 Jul 98.
  5723.  
  5724. Now it's a lot easier to write Kermit scripts for UNIX that have "shbang"
  5725. lines, and pass arguments to them on the command line -- it works just like
  5726. a shell script, except for the "=", which is needed to separate arguments
  5727. for Kermit itself from arguments for the script.
  5728.  
  5729. Beefed up UNIX zfnqfp().  Previously it was susceptible to "/./", "/../",
  5730. "..", "//", and similar tricks.  Now I hope it's bulletproof.  For example,
  5731. "\fpathname(/usr/olaf/tmp/./foo/../../x.y)" now returns "/usr/olaf/x.y"
  5732. rather than "/usr/olaf/tmp/./foo/../../x.y".  The latter wasn't exactly wrong,
  5733. but now we can be more confident if we want to change DISABLE CD in the server
  5734. to restrict the user to a rooted directory *tree* rather than just a single
  5735. directory.  ckufio.c, 25 Jul 98.
  5736.  
  5737. Fleshed out the syslog() and wtmp features of IKS.  I separated the two, and
  5738. enabled only wtmp, since I have no idea what syslog() does or how to test
  5739. whether we're using it right.  So now Kermit makes a wtmp entry when I log
  5740. into the Kermit server, and another one when I log out.  But even after I log
  5741. out, "last" says I'm still logged in.
  5742.  
  5743. But while testing this, the client Kermit started crashing (this is what
  5744. prevented the logout entry from getting into wtmp).  The debug log shows a
  5745. ttinl() timer going off while I'm in the command parser, which indicates that
  5746. it thinks it got a packet from the keyboard (which it did not) (the crash
  5747. occurs because no handler is armed for the SIGALRM).  Furthermore, the log
  5748. shows that the streaming flag gets turned off for some reason (which is why
  5749. the timer is going off in the first place, since ttinl() is untimed when
  5750. streaming).  I disabled the wtmp code in case that caused it, but no
  5751. difference, so I turned it back on.
  5752.  
  5753. OK, one thing at a time.  wtmp...  As near as I can tell from "man last",
  5754. logout and login records are matched by username and "terminal name", which
  5755. should form a unique pair.  When somebody logs in to ftpd, it records the
  5756. terminal name as "ftp" followed by the ASCIIized pid of the ftpd incarnation,
  5757. like "ftp12345".  The "last" program evidently has code in it to strip off the
  5758. numeric part after "ftp", so this never shows up in a listing.  If I do the
  5759. same thing in Kermit, it seems to work -- "last" shows the session as logged
  5760. out, but does not strip off the pid so the listing looks ugly ("kermit92",
  5761. instead of just "kermit").  So I made it "kermit_xxxx", where xxxx is the pid
  5762. in hex.  I hope this doesn't overflow any buffers anywhere, since this is a
  5763. rather long "terminal name".  ckufio.c, 25 Jul 98.
  5764.  
  5765. The hostname did not show up in "last" listing since the Kermit server is
  5766. communicating over stdio and has no idea what the client host is.  But when
  5767. inserver != 0 stdio is really a socket, so we can call getpeername() on it.
  5768. And this works, but of course, only if C-Kermit is built with -DTCPSOCKET
  5769. (i.e. without NOLOCAL).  I added a ckgetpeer() routine to ckcnet.c to return
  5770. the hostname or address of the peer, and call it from the inserver startup
  5771. section in ckcmai.c; seems to work fine.  25 Jul 98.
  5772.  
  5773. As for the crashing...  It seems to be an aftereffect of recognizing a packet
  5774. while in the command parser.  It happens later on, but it never happens if
  5775. I don't exercise that code.  It can happen on either end too, not good.
  5776. (I knew adding this feature was too easy!)
  5777.  
  5778. Rearranged things to allow -x to appear on command line with -A, and if it
  5779. does, to skip the Username: prompt and go straight into server mode.  Testing
  5780. in this mode shows solid operation, no crashes.  So this seems to confirm that
  5781. the crashing problem is caused by the command-mode autoupload feature.
  5782. ckcmai.c, ckuus[4y].c, 26 Jul 98.
  5783.  
  5784. When -A given on command line, enter server mode automatically if me_iks_start
  5785. has been set in the Telnet negotiations.  But this never happens because the
  5786. server does not send START KERMIT until after it enters server mode, which is
  5787. probably a good thing.  ckcmai.c, 26 Jul 98.
  5788.  
  5789. When BYE was sent to the server, it called zkself() immediately, bypassing
  5790. zvlogout(), so the logout record was not being written to wtmp.  Made BYE
  5791. call ckxlogout() instead if zkself() if inserver.  ckcpro.w, 26 Jul 98.
  5792.  
  5793. Moved "Enter Client/Server Mode..." message from ckucon.c to doconect() in
  5794. ckuus4.c, so it doesn't need to be replicated in all CONNECT modules, and
  5795. added REMOTE LOGIN and REMOTE HELP lines.  26 Jul 98.
  5796.  
  5797. Fixed command-mode autodownload code to be active only when C-Kermit is in
  5798. remote mode, since it can't possibly work when in local mode.  ckucmd.c,
  5799. 26 Jul 98.
  5800.  
  5801. Allowed server to execute BYE (if it is not disabled) even if user is not
  5802. logged in (but not FIN since we don't want not-logged-in users getting to
  5803. the prompt).  ckcpro.w, 26 Jul 98.
  5804.  
  5805. Reorganized ckxlogin() to have a common exit to make sure prompt is restored,
  5806. malloc'd items are freed, etc.  ckuus7.c, 26 Jul 98.
  5807.  
  5808. Recent additions to ttinl() to handle Telnet negotiations, etc, failed to
  5809. turn off the alarm() at each return point.  I added them, and this fixes the
  5810. crashing.  ckutio.c, 26 Jul 98.
  5811.  
  5812. Protocol engine was not sending back an error packet in response to
  5813. REMOTE HOST commands when nopush in effect.  Fixed in ckcpro.w, 26 Jul 98.
  5814.  
  5815. Allowed REMOTE HELP when not logged in, and made the message say REMOTE
  5816. LOGIN required in that case.  ckcpro.w, 26 Jul 98.
  5817.  
  5818. Added a help message for the Username prompt, and a herald above it.
  5819. ckcmai.c, ckuus7.c, 26 Jul 98.
  5820.  
  5821. Added code to zvpass(), at the point where the user is logged in, to set
  5822. environment variables HOME, USER, and LOGNAME, and to copy the username into
  5823. uidbuf[] and make homdir point to the login user's home directory, or if it's
  5824. a guest login, to "/".  Now \$() returns the right things for these, and so do
  5825. \v(user) and \v(home).  This also fixes the problem of executing the real
  5826. user's .kermrc, rather than the effective user's.  ckufio.c, 26 Jul 98.
  5827.  
  5828. PWD in the UNIX version at the server's prompt ran the external pwd command.
  5829. Replaced this by a call to zgtdir().  ckcmain.c, 26 Jul 98.
  5830.  
  5831. Verified that:
  5832.  . If you send BYE to the Username: prompt, it logs out the server.
  5833.  . If "kermit -Ax" is used to start server mode (so user must log in with
  5834.    REMOTE LOGIN), and the client does not negotiate IKS and therefore can
  5835.    CONNECT, that ^C^C^C prior to login does not give the user the prompt --
  5836.    instead it makes C-Kermit exit, which is exactly what should happen.
  5837.  . If you start it as "kermit -AxS", then ^C^C^C also exits (I had to put
  5838.    in special code for this).
  5839.  . You can not SEND a file to the Username: prompt, or do REMOTE CD, or
  5840.    anything else that is not allowed prior to login.
  5841.  
  5842. Replaced the following:
  5843.  
  5844.   len = (binary && !parity && !memstr && !funcstr) ?
  5845.     bgetpkt(spsiz) : getpkt(spsiz,1);
  5846.  
  5847. with:
  5848.  
  5849.   if (binary && !parity && !memstr && !funcstr)
  5850.     len = bgetpkt(spsiz);
  5851.   else
  5852.     len = getpkt(spsiz,1);
  5853.  
  5854. in ckcfns.c, since the former caused the OS-9 compiler to generate bad code.
  5855. Confirmed by Gregorie Martin, who also supplied a new OS-9 makefile and a
  5856. new ck9asm.a module, allowing 32-bit builds, which are now necessary since
  5857. data space is more than 64K in some modules.  27 Jul 98.
  5858.  
  5859. Disabled logfile creation by anonymous users.  ckuus4.c, 27 Jul 98.
  5860.  
  5861. From Jeff: Implement NVT and Telnet-Binary handling of CR, CRLF, CR-NUL in the
  5862. command parser for server-side command input.  This fixes the bug with SHOW
  5863. MACROS needing two CRs to confirm.  gtword(), ckucmd.c, 27 Jul 98.
  5864.  
  5865. From Jeff: Recognize Ctrl-D as EOF in the command parser.  This allows users
  5866. to cancel a login at the Username: or Password: prompt.  ckuus7.c, 27 Jul 98.
  5867.  
  5868. Disabled Ctrl-D as EOF except when (inserver && !x_logged), and made Ctrl-C
  5869. act like Ctrl-D.  ckucmd.c, 27 Jul 98.
  5870.  
  5871. From Jeff: Clear all owner permission bits when creating files as guest,
  5872. like wuftpd.  Also, fix an octal mask that missing its leading 0.  ckufio.c,
  5873. 27 Jul 98.  Notes: When storing files in (say) kermit/incoming, they are
  5874. created with ----rw-r--.  This prevents anonymous ftp users from reading
  5875. them or overwriting them.  But wuftp uses ----r----- (how does it know?).
  5876.  
  5877. From Jeff: Disable FTP, PING, and WHO commands if nopush set.  ckuusr.c,
  5878. 27 Jul 98.
  5879.  
  5880. From Jeff: Minor corrections to Telnet negotiations.  Implement server-side
  5881. NAWS.  ckcnet.c, 27 Jul 98.
  5882.  
  5883. NAWS stuff didn't quite work -- even though the negotiations are OK, every
  5884. time thereafter the server goes to check its screen size, it gets its own
  5885. rather than the client's.  That's because ttgwsiz() calls a local ioctl().
  5886. To solve this, I changed Jeff's new code in ckcnet.c to set environment
  5887. variables for LINES and COLUMNS from incoming NAWS subnegotiations, and then
  5888. made ttgwsize() call xttgwsize() (which checks these values) if inserver is
  5889. set (there might be a faster way to do this, but this mechanism was already
  5890. there for other reasons -- come back and improve later if performance is a
  5891. problem).  ckcnet.c, ckutio.c, 27 Jul 98.
  5892.  
  5893. Various interactive-mode features were not working in the Internet Kermit
  5894. server: KERMIT READY TO... messages, askmore(), etc.  Since fd 0 is a
  5895. redirected socket, isatty() was failing, and backgrd was being set.  Fixed in
  5896. conbgt(), ckutio.c.  Similarly, changed is_a_tty() (the isatty() front end) to
  5897. return(1) if inserver.  ckcmai.c, 27 Jul 98.
  5898.  
  5899. I commented out the code that set SIGHUP to SIG_IGN (see 16 Jul 98 notes).
  5900. We don't need it any more.  ckutio.c, 27 Jul 98.
  5901.  
  5902. Three failed REMOTE LOGINs in a row did not make the server drop the
  5903. connection as it should.  Fixed in ckcpro.w, 27 Jul 98.
  5904.  
  5905. Removed "Entering Client/Server..." message from ckucon.c.  27 Jul 98.
  5906.  
  5907. Bugs:
  5908.  . Client and server get into a loop negotiating SGA (the loop is broken
  5909.    automatically after 4, but should not happen in the first place) (not
  5910.    really a bug -- needs to be this way for DG Telnet server).
  5911.  . If you try to SEND a file to the Username: prompt, you get an error "?Login
  5912.    required", as expected, but for some reason the server is still in receive
  5913.    mode, sending NAKs, rather than back at the Username: prompt.
  5914.  . Something is messed up with packet recognition at the Username: prompt
  5915.    again.  The first one is not recognized, but subsequent ones are.
  5916.  
  5917. To do:
  5918.  . Create special pre-login init.
  5919.  . Do what wuftp does about incoming. Consider both anonymous and logged-in
  5920.    users.  This is probably something for the pre-login init.
  5921.  . If user is guest, don't allow OPEN WRITE?
  5922.  . No need to send "kermit -x" if IKS (but no harm either).
  5923.  . Fix built-in DIR command to show permissions in UNIX, VMS, etc.
  5924.  . Make ckxlogin() do if (me_iks) tn_siks(IKS_START) ???  No, this would
  5925.    prevent use of the Username: prompt by those who prefer it.
  5926.  . Change "kermit_xxxx" to "iks_xxxx" because of uname.h length limits.
  5927.  . DISABLE BYE should have no effect when IKS
  5928.  . Add runtime "nolocal" variable, turn it on & enforce it for guest logins.
  5929.  . Set local environment variables from NEW_ENV?
  5930.  
  5931. Added Atlas/Newcom 33600ifxC modem type -- there's evidently a big demand
  5932. for this since they are selling for $9.95.  ckuusr.h, ckudia.c, 28 Jul 98.
  5933.  
  5934. Added TX_9LATIN symbol for ISO 8859-15, Latin Alphabet 9.  ckcxla.h, 29 Jul 98.
  5935.  
  5936. Added FC_9LATIN and FC_CP858 file character-set symbols.  ckuxla.h, 29 Jul 98.
  5937.  
  5938. Changed references to "Latin-15" to "Latin-9".  ckouni.[ch], 29 Jul 98.
  5939.  
  5940. After hours of research found that the proposed (but not final) registration
  5941. number for ISO 8859-15 Latin Alphabet 9 is 203, so now we have a Kermit code
  5942. for it.  Reference: DOCUMENT REGISTER JTC1/SC2, Character sets and information
  5943. coding, N 3099 - N 3000, Item E3086, 1998-05-01.  Filled in functions and
  5944. tables for Latin-9 and CP858.  Seems to work OK, but needs refinement and
  5945. more testing.  Meanwhile, hurray, we're "Euro compliant".  ckuxla.c, 29 Jul 98.
  5946.  
  5947. Integrated recent changes from Jeff, 1 Aug 98:
  5948.  . Conditionalize printf() replacement in UNIX, since it conflicts with
  5949.    Linux curses library.  ckcdeb.h.
  5950.  . Change TELOPT_IKS definition from 45 to 47, since 45 has already been
  5951.    assigned by IANA for something else.
  5952.  . Add some missing #ifdef CK_AUTODL.  ckuus3.c...
  5953.  . Refine conditions under which tn_iks(IKS_STOP) is called at the
  5954.    top of the parse loop.  ckuus5.c.
  5955.  . And when returning from CONNECT mode.  ckuus4.c.
  5956.  . Refine conditions for which "Enter Client/Server Mode" msg.  ckuus4.c.
  5957.  . Make sure we have a Kerberos principal name in AUTH cmd.  ckuus7.c.
  5958.  . Show principal name in AUTH Password: prompt.  ckuus7.c.
  5959.  . Save username to uidbuf[] in ckxlogin().  ckuus7.c.
  5960.  . Various corrections to ckufio.c.
  5961.  . Save peer's IP address even if SET TCP REVERSE not ON.  ckcnet.c.
  5962.  . Add tn_push() and tn_wait() to solve the following problem: traditional
  5963.    Telnet clients are always reading from the socket.  But when C-Kermit is
  5964.    at the prompt, it is not reading from the socket.  When the user says
  5965.    "set host blah", C-Kermit sends some Telnet negotiations, but never reads
  5966.    the responses until the user goes into CONNECT mode or does an INPUT
  5967.    command (or, now, starts Kermit protocol).  The new routines allow
  5968.    negotiations to go back and forth until all commands that require an answer
  5969.    have completed, or a certain amount of time has gone by, whichever comes
  5970.    first, AND also saves any plain text that arrived during this period for
  5971.    subsequent processing by the first command that tries to read regular data
  5972.    from the socket.  This should allow immediate Kerberos or SRP authentication
  5973.    upon initial connection, without swallowing the host's messages or prompts,
  5974.    and it also takes care of hosts (like VMS) that issue the login prompt
  5975.    in the middle of Telnet negotiations.  ckcnet.c.
  5976.  . Various changes to authentication negotiation.  ckcnet.c.
  5977.  
  5978. Changed IKS banner to show its own hostname.  ckcmai.c, 1 Aug 98.
  5979.  
  5980. Added a new entry for ICL DRS6000 (SPARC) with DRS/NX 4.2MP 7MPlus.
  5981. makefile, 6 Aug 98.
  5982.  
  5983. Integrated Jeff's changes, 10 Aug 98:
  5984.  . Add symbols & cmds for Telnet encryption on/off commands: ckuusr.h, ckuus3.c
  5985.  . Allow for non-stdio IKS operation: ckuusy.c.
  5986.  . Allow for command parsing on encrypted connections: ckucmd.c.
  5987.  . Issue warnings or errors for SEND/BYE/FINISH w/TKO but no server: ckuusr.c.
  5988.  . Ditto for GET: ckuus6.c.
  5989.  . Ditto for REMOTE: ckuus7.c.
  5990.  . Make REMOTE LOGIN prompt for missing info.  ckuus7.c
  5991.  . Rearranged assorted TKO/IKS items: ckuus4.c.
  5992.  . Recognize REQ, etc, as REQUESTED (vs REQUIRED): ckuus3.c.
  5993.  . Updated SHOW FEATURES for Authentication/Encryption/etc: ckuus5.c.
  5994.  . Added encryption to console i/o: ckutio.c.
  5995.  . Adjustments to login process & for encryption: ckcmai.c.
  5996.  . Lots of IKS/TKO adjustments: ckcnet.c.
  5997.  
  5998. Fixed up REMOTE LOGIN parsing/prompting code to never exit without restoring
  5999. prompt and freeing malloc'd storage, etc.  ckuus7.c, 10 Aug 98.
  6000.  
  6001. Changes from Gregorie Martin to work around OS-9 C compiler bugs, and added a
  6002. missing clause to snddir() so it would work for OS-9.  ckcfns.c, 11 Aug 98.
  6003.  
  6004. Also from Gregorie Martin, separate text and binary filename pattern lists
  6005. for OS-9.  ckcmai.c, 11 Aug 98.
  6006.  
  6007. Added "set modem data-compression", which was missing from the keyword table;
  6008. ("compression" was there, but "data-compression" is the phrase used in all the
  6009. other commands; left "compression" there but invisible).  ckuus3.c, 11 Aug 98.
  6010.  
  6011. A couple minor corrections & changes from Jeff: ckcmai.c, ckcnet.c, 12 Aug 98.
  6012.  
  6013. A couple minor changes from Jeff: ckcmai.c, ckcnet.c, 13 Aug 98.
  6014.  
  6015. Added a nolocal variable.  When nonzero, setlin() returns an error rather than
  6016. opening a connection.  nolocal is set to 1 automatically by -A.  This is a
  6017. patch in the true sense, and might need some refinement.  ckcmai.c, ckuus7.c,
  6018. 13 Aug 98.
  6019.  
  6020. Added invisible (and irreversible) NOLOCAL command: ckuusr.[ch], 13 Aug 98.
  6021.  
  6022. Added another invisible and irreversible command: DISABLE ENABLE.  This allows
  6023. the sysadmin to disable selected services, and prevent the user from
  6024. re-enabling them even when they can get to the prompt (as in the client-side
  6025. server arrangement of IKS).  ckuusr.h, ckuus[r56].c, 13 Aug 98.
  6026.  
  6027. Fixed server end of REMOTE LOGOUT, which didn't work at all.  Various other
  6028. combinations didn't work either, from among login required / not required;
  6029. logged in already / not logged in; logging in / logging out.  All combinations
  6030. work sensibly now.  Note: Logging out does not break the connection, so a
  6031. subsequent login is allowed on the same connection.  This might change.
  6032. ckcpro.w, 13 Aug 98.
  6033.  
  6034. Added code to prevent guests from using SET FILE COLLISION APPEND or RENAME.
  6035. However, they can still use OVERWRITE and UPDATE -- this might change.
  6036. ckuus7.c, 13 Aug 98.
  6037.  
  6038. Changed wtmp record for IKS to say "iks_xxxx" rather than "kermit_xxxx" to
  6039. stay within 8 chars, which is the limit in SunOS and probably many other
  6040. platforms too.  ckufio.c, 13 Aug 98.
  6041.  
  6042. Added code to zprint() and zmail() to fail immediately if called by guest.
  6043. ckutio.c, 13 Aug 98.
  6044.  
  6045. Ditto at a higher level: after user logs in anonymously, do an implicit
  6046. DISABLE PRINT and DISABLE MAIL.  ckcmai.c, ckcpro.c, 13 Aug 98.
  6047.  
  6048. Don't allow ENABLE MAIL or ENABLE PRINT if user is anonymous.  ckuus6.c,
  6049. 13 Aug 98.
  6050.  
  6051. And as a failsafe, in case they somehow re-enabled them, have the protocol
  6052. module disable them again whenever it is entered.  ckcpro.c, 13 Aug 98.
  6053.  
  6054. Fixed getyesno() (which is called whenever we want to print a question and
  6055. parse a yes/no answer, e.g. "OK to close?") to not put the answer in the
  6056. recall buffer.  ckuus3.c, 13 Aug 98.
  6057.  
  6058. Added XXRxxx symbols for top-level R-commands equivalent to each REMOTE
  6059. command: RCD, RPWD, RDIR, RWHO, etc.  But not RLOGIN because that already
  6060. means something else.  ckuusr.h, 13 Aug 98.
  6061.  
  6062. Made REMOTE { L, LO, LOG } be synonyms for REMOTE LOGIN.  ckuusr.c, 13 Aug 98.
  6063.  
  6064. Moved REMOTE LOGIN parsing code to its own routine, plogin().  ckuus7.c,
  6065. 13 Aug 98.
  6066.  
  6067. The LOGIN command that we added a few weeks ago can not possibly be of any
  6068. use, so I changed it to call plogin().  So LOGIN is now a synonym for REMOTE
  6069. LOGIN.  And I added a LOGOUT command that is a synonym for REMOTE LOGOUT.
  6070. ckuusr.c, 13 Aug 98.
  6071.  
  6072. Added a few R commands: RASG/RASSIGN, RCD/RCWD, RCOPY, RDELETE.  These simply
  6073. chain to the corresponding REMOTE commands.  They work fine.  ckuusr.c,
  6074. 13 Aug 98.
  6075.  
  6076. Added the rest: RDIR, REXIT, RHELP, RHOST, RKERMIT, RPWD, RRENAME, RREMDIR,
  6077. RSET, RSPACE, RTYPE, and RWHO.  ckuusr.c, 13 Aug 98.
  6078.  
  6079. Merged first stage of Jeff's changes to reorganize Telnet protocol support.
  6080. All Telnet symbol & struct definitions moved to new ckctel.h.  All IKS_*
  6081. and *_IKS symbols changed to KERMIT_* and *_KERMIT.  Many modules, 14 Aug 98.
  6082.  
  6083. Added ckctel.h dependencies to UNIX makefile.  14 Aug 98.
  6084.  
  6085. Changed C-Kermit version number from 6.1 to 7.0 and test level from Beta.06
  6086. back to Alpha.01.  makefile, ckcmai.c, 14 Aug 98.
  6087.  
  6088. Fixed command parser to not respond to recall keys when on_recall == 0,
  6089. as it is (e.g.) in getyesno().  ckucmd.c, 14 Aug 98.
  6090.  
  6091. Chasing down "Receive window full" problems...  First, I found a scenario that
  6092. would always create it: start server, go back to client, and tell client to
  6093. "remote login blah" (when login not required), "remote logout", "remote cd
  6094. invalid-directory", "remote cd valid-directory", "remote dir".  Debug logs
  6095. showed some mighty strange paths thru the code...  First discovery: the SERVE
  6096. macro definition contains more than one statement, but did not enclose the
  6097. statements in braces.  Therefore, subsequent constructions like "if (blah)
  6098. xxx; else SERVE;" did not work as intended.  Added braces around definitions
  6099. of SERVE and RESUME.  ckcpro.w, 14 Aug 98.
  6100.  
  6101. But this did not make the problem go away.  Next discovery: sometimes the
  6102. sequence above would result in an error "It's a directory", which is found
  6103. only in the REMOTE DELETE code.  How did we get there???  Well, sending the
  6104. "Receive window full" error packet set the packet type to E, so the next call
  6105. to input() returned 'E'.  But the protocol machine was still in "generic"
  6106. state, and "<generic>E" is REMOTE DELETE.  So I had the errpkt() routine
  6107. reset the protocol state to 0.  So no more "falling" into the REMOTE DELETE
  6108. code.  ckcfn2.c, 14 Aug 98.
  6109.  
  6110. Next...  Server sends a "Receive window full" error packet, but it is not
  6111. displayed by the client.  Why?  Because C-Kermit always ignores E packets that
  6112. arrive in response to an I packet, to allow for the possibility that the server
  6113. does not understand I packets.  We can't do anything about this, but it has
  6114. probably been hiding the "Receive window full" problem enough that we did not
  6115. realize how often it was really happening.
  6116.  
  6117. So why is it happening?  Logs show that we are not always calling tinit()
  6118. (transaction initialization) after sending a short-form reply to a server
  6119. command, or an ACK to an I packet.  I-packet first...  After the code to ACK
  6120. the I packet, I replaced the call to pktinit(), which simply reset winlo and
  6121. pktnum to 0, with tinit(), which resets everything.  Ten minutes of testing
  6122. now shows that (a) this does no harm (and in any case it is proper since the
  6123. I/Y exchange is, by definition, a complete protocol transaction), and (b)
  6124. seems to isolate the problem to whatever transaction follows a successful
  6125. REMOTE CD.  Finally...  the problem with REMOTE CD turned out to be the code I
  6126. added on July 21st to send back the contents of a .readme file, if any -- it
  6127. neglected to handle the case where there was not a .readme.  Fixed in
  6128. ckcpro.w, 14 Aug 98.
  6129.  
  6130. I also fixed a potential problem on the server end of REMOTE PWD, in which
  6131. it would fail to send a response if the directory name was too long.
  6132. ckcpro.w, 14 Aug 98.
  6133.  
  6134. From Jeff:
  6135.  
  6136. Date: Sat, 15 Aug 98 0:33:04 EDT
  6137. From: Jeffrey Altman <jaltman@watsun.cc.columbia.edu>
  6138. To: fdc@watsun.cc.columbia.edu
  6139. Subject: new files
  6140.  
  6141. just about every file has been touched.  The new telnet code is
  6142. operational but the initialization stuff has barely been addressed.
  6143.  
  6144. Basicly what I have done is implemented all of the major changes to
  6145. tn_doop() and its related support functions to use the new model.
  6146. I have replaced all variables such as Me_binary, U_binary, ... with
  6147. calls to the new TELOPT macros.  I did not make these changes to
  6148. VMS specific files such as console and terminal i/o.
  6149.  
  6150. me_binary becomes TELOPT_ME(TELOPT_BINARY)
  6151. u_binary becomes TELOPT_U(TELOPT_BINARY)
  6152.  
  6153. etc.  These macros may be used on both the left and right sides of an
  6154. assignment.  What I have not doone is address any of the issues we
  6155. spoke about regarding initialization of the ME and U modes.  There is
  6156. a new function tn_set_modes() which is called in ckcmai.c that is used
  6157. to set the initial defaults.  tn_ini() needs to be modified to read
  6158. user defaults for client and server modes.  These fileds of the
  6159. structures are not yet defined.
  6160.  
  6161. For compilation purposes the tn_binary, tn_echo, tn_auth,
  6162. ... variables are still declared in ckcnet.c.  These are needed so the
  6163. command parser will compile but the variables are not used at all
  6164. anymore in ckcnet.c.  So don't try to use them to control telnet
  6165. option activation.  They won't work.  I will address these issues
  6166. either tomorrow night or Sunday.
  6167.  
  6168. Something I noticed is that server mode does not exit anymore when
  6169. started by a terminal autodownload "kermit -Iig ..."  This appears to
  6170. be a side effect of the changes you made this afternoon.  However, I
  6171. have not spent any time to try and track it down.
  6172.  
  6173. The changes to ckcnet.c reduced the code by over 400 lines and 100K in
  6174. exe size.
  6175.  
  6176. (end quote)
  6177.  
  6178. IBM added the Euro symbol to a vacant position in CP857; updated the
  6179. corresponding tables in ckouni.c.  15 Aug 98.
  6180.  
  6181. Incorporated the network code changes from Jeff's message above.  Most
  6182. modules, 17 Aug 98.
  6183.  
  6184. Made DISABLE apply not only to REMOTE commands sent to the server, but also,
  6185. when C-Kermit is an Internet Server, to the corresponding commands given at
  6186. the prompt.  For example, if C-Kermit has been told to DISABLE RENAME, then
  6187. it won't execute REMOTE RENAME commands in server mode, nor RENAME commands
  6188. from its prompt.  ckuusr.c, 17 Aug 98.
  6189.  
  6190. Made DISABLE CD when inserver also SET { SEND, RECEIVE } PATHNAMES OFF.
  6191. ckuus6.c, 17 Aug 98.
  6192.  
  6193. Made wtmp entry always use at least 4 digits for the hex pid.  ckufio.c,
  6194. 17 Aug 98.
  6195.  
  6196. Discovered that "set proto kermit {} {} {}" did not undo the "autosever"
  6197. command string.  This uncovered a rat's nest resulting from the fact that this
  6198. string is not part of the regular protocol info struct, so I redefined the
  6199. struct to include it and removed the special case from all modules that knew
  6200. about it.  ckcker.h, ckcmai.c, ckcpro.w, ckuus3.c, 18 Aug 98.
  6201.  
  6202. The check in cmdlin() for command-line options not valid with -A was
  6203. preventing "kermit" commands, when given at the prompt (e.g. the "kermit -r"
  6204. autoupload string from a client), from working.  Fixed in ckuusy.c, 18 Aug 98.
  6205.  
  6206. Don't send auto-blah strings ("kermit -r", "kermit -x", etc) if we know the
  6207. other Kermit is a server.  ckcpro.w, 18 Aug 98.
  6208.  
  6209. Set flow to NONE (except in VMS) for IKS.  ckcmai.c, 18 Aug 98.
  6210.  
  6211. Jeff's changes & fixes: ckcnet.h, ckcpro.w, ckcmai.c, ckutio.c, ckcnet.c,
  6212. 19 Aug 98.
  6213.  
  6214. Make ttol() and conol()/conoll() copy their arg before encrypting (ttol()
  6215. already did) in case they are called with a literal string.  Buffers are
  6216. malloc'd only if/when needed; copy is done only when encrypting.  ckutio.c,
  6217. 19 Aug 98.
  6218.  
  6219. Added partial ttpush() support to ckutio.c within #ifdef TTLEBUF..#endif.
  6220. More pieces added by Jeff.  ckutio.c, ckcnet.c, 19 Aug 98.
  6221.  
  6222. Fixed spurious "?Packet log wasn't open" message when CLOSE command given
  6223. with no operand.  ckuusr.c, 19 Aug 98.
  6224.  
  6225. Changed CLOSE command not to ask "OK to close?".  Obviously the user knows a
  6226. connection was open or she wouldn't be trying to close it.  ckuusr.h,
  6227. ckuus[r7].c, 19 Aug 98.
  6228.  
  6229. REMOTE commands that only result in sending text to the client's screen can
  6230. have no useful effect when issued from a remote-mode client when the result is
  6231. not redirected.  These commands include DIR, TYPE, WHO, etc, but not SET,
  6232. ASSIGN, QUERY, etc.  C-Kermit now refuses to execute REMOTE commands that
  6233. can have no useful effect.  ckuus7.c, 19 Aug 98.
  6234.  
  6235. Due to confusion between console and communications buffers, made the
  6236. following conxxx() functions route to the corresponding ttxxx() functions when
  6237. (inserver && !local): conoc(), conxo(), conol(), conola(), conoll(), conchk(),
  6238. coninc(), congks().  ckutio.c, 20 Aug 98.
  6239.  
  6240. Adapted REMOTE HELP text to IKS.  ckcfns.c, 20 Aug 98.
  6241.  
  6242. When REMOTE LOGIN prompts for user ID & password, don't put them in the
  6243. command recall buffer.  ckuus7.c, 20 Aug 98.
  6244.  
  6245. Got rid of LOGIN command, and made LOGOUT act locally rather than being a
  6246. synonym for REMOTE LOGOUT.  So:  REMOTE LOGIN must be used to log in from a
  6247. client to a server; REMOTE LOGOUT is used to log a client out from a server;
  6248. and LOGOUT is used to log out the server from its prompt.  ckuusr.c, 20 Aug 98.
  6249.  
  6250. Added HELP LOGOUT and updated HELP REMOTE.  ckuus2.c, 20 Aug 98.
  6251.  
  6252. Removed #include "ckucmd.h" from ckcmai.c and ckutio.c.  Added the struct
  6253. keytab definition to ckcdeb.h, so all modules can use it without reference to
  6254. ckucmd.h.  20 Aug 98.
  6255.  
  6256. Got rid of getchar() calls from ckucmd.c, since they were not going thru the
  6257. myread buffering, and therefore were wrecking decryption.  ckucmd.c, 20 Aug 98.
  6258.  
  6259. Fixes from Jeff: ckctel.h, ckucmd.c, ckutio.c, ckcmai.c, ckcnet.c, 21 Aug 98.
  6260.  
  6261. Fixed a typo in tn_ini() that prevented client from sending initial Telnet
  6262. negotiations on port 1649.  ckcnet.c, 21 Aug 98.
  6263.  
  6264. Added an "iksd" personality, which simply sets inserver to 1 automatically
  6265. when the binary is called "iksd".  ckcker.h, ckcmai.c, ckuus4.c, 21 Aug 98.
  6266.  
  6267. Added extended-format command-line args for iksd:
  6268.  
  6269.  --anonymous:{on,off}
  6270.  --syslog:{on,off}
  6271.  --permissions:<octal-value> (like wuftpd -- permissions, not umask)
  6272.  --wtmp:{on,off}
  6273.  
  6274. These are parsed in prescan().  Currently, *all* extended-format options are
  6275. parsed in prescan.  Later we'll need a way to separate those that are done
  6276. in prescan from those that are done after the init file.  Note: {on,off}
  6277. also has synonyms {yes,no} and {true,false}.  ckuusy.c, ckuus4.c, 21 Aug 98.
  6278.  
  6279. From Jeff: fix a char declaration to be unsigned char to prevent sign
  6280. extension, which was wrecking encryption: ckutio.c.  Prevent encryption from
  6281. being negotiated if Telnet authentication failed: ckcnet.c.  Make all
  6282. file i/o routines go through con/tt routines when the file is really the
  6283. terminal, since the con/tt routines now take care of en/decryption, and
  6284. bypassing them destroys the encryption stream: ckufio.c. 22 Aug 98.
  6285.  
  6286. Updated the SunOS IKS makefile entry and renamed it to sunos41giks.
  6287. This entry does not define CK_CURSES or link with the curses library.
  6288. makefile, 22 Aug 98.
  6289.  
  6290. Disable file-transfer display for IKS in such a way that tgetent() is never
  6291. called by IKS, even if it is compiled in and even if the fullscreen file
  6292. transfer display would normally be used.  ckuusx.c, 22 Aug 98.
  6293.  
  6294. Modified Jeff's changes to ckufio.c.  The idea was to catch the case where
  6295. the client was printing stuff on its "screen" coming back from the server in
  6296. response to a REMOTE command.  But in this case, the screen his hidden from
  6297. the user anyway, so there is no point going through all the overhead of
  6298. encrypting, then printing it -- now these routines simply discard the output
  6299. but act as if they had printed it (in terms of return codes, global variables,
  6300. etc).  Left Jeff's code in the source file, commented out. ckufio.c, 22 Aug 98.
  6301.  
  6302. Defined a new keyword flag, CM_PRE, to be used with long-form command-line
  6303. options.  If set, the option is to handled by prescan(), i.e. prior to init
  6304. file processing; otherwise it is handled after the init file along with other
  6305. command-line options.  ckucmd.h, ckuus[4y].c, 22 Aug 98.
  6306.  
  6307. Rules for long-form command-line options are:
  6308.  
  6309.  1. All long-form options must begin with "--" (two hyphens) or "-+".  If the
  6310.     option begins with "--" it is executed before or after the init file,
  6311.     according to its internal keyword flags.  If it begins with "-+", it is
  6312.     executed before the init file, regardless of the flag bits.  There is no
  6313.     way to force an argument to be executed after the init file if it has the
  6314.     CM_PRE bit set.  (The "+" business will not necessarily be advertised...)
  6315.  
  6316.  2. No spaces are allowed in the keyword.
  6317.  
  6318.  3. If an operand contains spaces, it (or the entire option) must be quoted
  6319.     according to the rules of the shell from which Kermit is invoked.
  6320.  
  6321.  4. Case doesn't matter in the option keyword (unlike with regular
  6322.     single-letter options).
  6323.  
  6324.  5. If an operand is required, it must be included.  If no operand is
  6325.     required, no operand must be included.
  6326.  
  6327.  6. The operand follows the keyword, separated by a colon (:) or equal
  6328.     sign (=).  There are no spaces between the separator and the keyword
  6329.     or operand.
  6330.  
  6331.  7. Long-form option names may be abbreviated according to the same rules as
  6332.     interactive keywords.
  6333.  
  6334.  8. On/Off operands can be On, Off, Yes, No, True, or False.
  6335.  
  6336.  9. Long-form options are available only when the interactive command parser
  6337.     is built-in (i.e. not NOICP).
  6338.  
  6339. Added code to actually use the new command-line options:
  6340.  --permissions are applied as given to anonymously uploaded files.
  6341.  --anonymous:off disables anonymous logins.
  6342.  --wtmp:off disables wtmp.
  6343. syslogging still isn't being done, so no effect there.  ckufio.c, 22 Aug 98.
  6344.  
  6345. Discovered that permission-setting code works only if ATTRIBUTES ON, so
  6346. anybody could defeat it by uploading files with SET ATTRIBUTES OFF.
  6347. Rearranged the code to plug this loophole.  ckufio.c, 22 Aug 98.
  6348.  
  6349. After all this, it seems that all sorts of trouble ensues from prescan()
  6350. being called twice; for example, "kermit commandfilename" no longer works.
  6351. I have no idea why prescan() is called twice, so I commented out the second
  6352. call, now all seems well.  ckcmai.c, 22 Aug 98.
  6353.  
  6354. Fleshed out the command-line options some more.  Now they are:
  6355.  
  6356.   --anonymous    on/off      anonymous login allowed
  6357.   -+cdfile       filename    CD message filename
  6358.   -+cdmessage    on/off      CD messages on/off
  6359.   -+cdmsg        on/off      synonym for cdmessage
  6360.   --logsyslog    on/off      syslog logging on/off
  6361.   --logwtmp      on/off      wtmp logging on/off
  6362.   --permissions  octalnum    permissions for files uploaded anonymously
  6363.   --perms        octalnum    synonym for permissions
  6364.   --wtmpfile     filename    pathname of wtmp logfile
  6365.  
  6366. Those shown with "-+" can be given by ordinary users.  The CD message
  6367. items correspond to SET SERVER CD-MESSAGE { ON, OFF, FILE <name> }.
  6368. These all work except for syslog.  ckuusy.c, 22 Aug 98.
  6369.  
  6370. Minor corrections from Jeff to yesterday's changes: ckuusy.c, ckutio.c,
  6371. 23 Aug 98.
  6372.  
  6373. Added the appropriate #ifndef NOICP..#endif's to long-form command-line
  6374. option code.  ckuusy.c, 23 Aug 98.
  6375.  
  6376. Finished the half-done IKS-related #ifdef section in ckcdeb.h, 23 Aug 98.
  6377.  
  6378. Ensured that /pub/ftp/.kermrc is TAKEn as init file when user logs in to
  6379. IKS anonymously.  ckuus5.c, 23 Aug 98.
  6380.  
  6381. Added --initfile:<path> to allow sysadmin to change the default init file
  6382. for anonymous users.  ckuusy.c, ckuus5.c, 23 Aug 98.
  6383.  
  6384. Added MKDIR and RMDIR to list of functions automatically disabled for
  6385. anonymous users (which previously included only MAIL and PRINT), since leaving
  6386. them enabled clashed with wuftpd behavior (e.g. ftpd could not create a
  6387. directory in kermit/incoming, but iksd could).  It is still possible for the
  6388. sysadmin to enable directory creation (and removal too).  ckcmai.c, 23 Aug 98.
  6389.  
  6390. Another loophole: OPEN WRITE / WRITE / CLOSE WRITE bypassed the
  6391. --permission:xxx value.  In fact, there are lots of file creation methods that
  6392. did this: logs (even though we have disabled the LOG command), TRANSLATE, and
  6393. REMOTE BLAH > file.  And who knows what else.  So I moved the chmod() code
  6394. from zstime(), which is called only when receiving files with Kermit protocol,
  6395. to zopeno(), which is called whenever *any* file is to be created.  ckufio.c,
  6396. 23 Aug 98.
  6397.  
  6398. Don't let guests SET FILE COLLISION OVERWRITE or UPDATE (they already could
  6399. not use RENAME or UPDATE).  This prevents guests from overwriting or changing
  6400. or destroying existing files.  ckuus7.c, 23 Aug 98.
  6401.  
  6402. Minor corrections to yesterday's work from Jeff, plus beginning of SSL
  6403. support.  ckuusy.c, ckcnet.c, etc, 24 Aug 98.
  6404.  
  6405. If NOICP defined, then -A implies -x.  ckuusy.c, 24 Aug 98.
  6406.  
  6407. When client sends REMOTE LOGOUT and gets the ACK, it now closes the connection
  6408. (same as it already did with BYE).  ckuus7.c, 24 Aug 98.
  6409.  
  6410. Added openlog() call for IKSD, specifying tag of "iksd" and LOG_PID, and going
  6411. to the regular daemon log.  Now syslogging works for regular logins, but the
  6412. anonymous ones doen't seem to be making it into the log.  To be continued.
  6413. ckufio.c, 24 Aug 98.
  6414.  
  6415. Verified that sending huge strings to the IKS (e.g. to the Username: or
  6416. Password: prompt) does not break it.  26 Aug 98.
  6417.  
  6418. Merged Jeff's recent changes, mostly for SSL / TLS.  Many modules, 28 Aug 98.
  6419.  
  6420. Made \v(line) return ckgetpeer() value in IKS.  ckuus4.c, 28 Aug 98.
  6421.  
  6422. Fixed \v(nday) not to depend on English day names.  ckuus4.c, 28 Aug 98.
  6423.  
  6424. Added --userfile:filename to command line for IKS: filename of forbidden
  6425. user file.  Fixed checkuser() routine, which was not working before.
  6426. ckuusy.c, ckufio.c, 28 Aug 98.
  6427.  
  6428. Added "ok" to list of valid extended option on/off value synonyms.
  6429. ckuusy.c, 28 Aug 98.
  6430.  
  6431. More SSL / TLS changes from Jeff, many modules, 29 Aug 98.
  6432.  
  6433. Changes to extended command-line options:
  6434.  
  6435.   --logwtmp changed to --wtmplog (on/off)
  6436.   --logsyslog:on/off removed.
  6437.   --syslog:<number> added, where <number> = level of logging.
  6438.  
  6439. So far this is parse-only, no action.  ckcdeb.h, ckuusy.c, ckufio.c, 29 Aug 98.
  6440.  
  6441. Added logging for commands (level 4).  At first I logged all commands but that
  6442. was WAY too much.  Now only interactive commands (not TAKE files or macros).
  6443. Also, cleaned up login/logout entries.  ckufio.c, ckucmd.c, ckuusx.c,
  6444. 29 Aug 98.
  6445.  
  6446. Discovered that "implied partial dial", which occurs when you use the DIAL
  6447. command but terminate the phone number with a semicolon, CONNECTs
  6448. automatically when done at top level.  Which is very confusing when you're
  6449. dialing a numeric pager.  Fixed in ckudia.c, 30 Aug 98.
  6450.  
  6451. Automatically DISABLE ENABLE for anonymous users.  ckcmai.c, 30 Aug 98.
  6452.  
  6453. Added missing "extern" to telopt_states[] declaration in ckctel.h, 30 Aug 98.
  6454.  
  6455. Spent many hours trying to figure out why syslogging does not work in iksd
  6456. when user is logged in anonymously.  It turns out that in SunOS, chroot(),
  6457. once called, totally breaks syslog() -- i.e. syslog() will never write another
  6458. entry after chroot() is called.  It makes no difference whether openlog() is
  6459. called before or after chroot(), or not at all.  So is this a SunOS
  6460. peculiarity?  To test, went to build on Solaris (for the first time in months)
  6461. and of course had all sorts of trouble compiling.  Once it compiled, anonymous
  6462. logins did not work because there is no /pub/ftp directory.  So I temporarily
  6463. dummied up a different root for testing, and then all worked OK.  So it seems
  6464. to be a SunOS peculiarity?  There seems to be nothing I can do about it.
  6465. Sent off a query to the sys folks.  30 Aug 98.
  6466.  
  6467. Found that struct utmp member ut_host is not portable, so started building
  6468. a pile of #ifdefs for when to include it.  This will be an ongoing project.
  6469. ckufio.c, 30 Aug 98.
  6470.  
  6471. Added --root:xxx so an alternative root for anonymous users can be supplied
  6472. at runtime.  ckuus[5y].c, ckufio.c, 30 Aug 98.
  6473.  
  6474. Started adding syslog() code for file creation / deletion / modification.
  6475. File creation and appending in zopeno().  File deleting in zdelet().
  6476. File renaming in zrename().  File copying in zcopy().  ckufio.c, 2 Sep 98.
  6477.  
  6478. Fixed mutually reinforcing bugs in ttpeek() (ckutio.c) and the code in
  6479. ckucns.c that calls it, that stopped CONNECT mode dead; ttpeek() wasn't
  6480. taking the new local-echo buffer into account, so CONNECT would think there
  6481. was nothing to read, when in fact some stuff was sitting in the new buffer,
  6482. and so would block on a network read when in fact the network was waiting for
  6483. a reply.  Fixed 3 Sep 98.
  6484.  
  6485. Fixes from Jeff for a Telnet negotiation problem in ckcnet.c and for an "=="
  6486. that should have been an "=" in ckcfns.c (affecting the EOF/Ctrl-Z code).
  6487. Also, revision of the C1 control symbols in ckcasc.h to avoid conflicts with
  6488. new Microsoft symbols.  4 Sep 98.
  6489.  
  6490. Enclosed reference to <asm/termios.h> for Linux-on-Alpha in #ifndef __GLIBC__
  6491. to avoid yet another conflict.  ckutio.c, 4 Sep 98.
  6492.  
  6493. Microsoft added upper- and lowercase Z caron to CP1252.  I added these to the
  6494. CP1252/Unicode translations, and also corrected a typo in the translation of
  6495. the 'oe' character from Unicode to CP1252.  ckuouni.c, 4 Sep 98.
  6496.  
  6497. Changes from Jeff.  Protect SET FILE DISPLAY FULL tgetent() from trapping if
  6498. trmbuf not allocated: ckuus[7x].c; server-side terminal type negotiation:
  6499. ckcnet.c, 5 Sep 98.
  6500.  
  6501. Fixed a bug that limited the LOCAL command to only 10 variables, even though
  6502. the advertised maximum was 64.  dolocal(), ckuus5.c, 5 Sep 98.
  6503.  
  6504. Added a check for sequence number out of range to ttinl().  See comments in
  6505. source code for a detailed explanation.  ckutio.c, 5 Sep 98.
  6506.  
  6507. VMS cdate[] array declaration, used for setting file date,  needed to be 24,
  6508. not 23.  ckvfio.c, 5 Sep 98.
  6509.  
  6510. For DEC C (VMS or Digital UNIX), when _POSIX_C_SOURCE is not defined, #define
  6511. it with a value, such as 1, rather than without one, since its value is used
  6512. in comparisons in DEC C header files like unistd.h.  ckcdeb.h, 5 Sep 98.
  6513.  
  6514. Various mysterious problems with SEND /AS-NAME: were traced to the keywords
  6515. in sndtab[] being out of alphabetical order.  Fixed in ckuusr.c, 5 Sep 98.
  6516.  
  6517. However, some additional problems remained, in which certain switches were not
  6518. parsed successfully if COMMAND QUOTING was OFF and they were entered without
  6519. completion (Tab or Esc).  This was due to failure to set the field length in
  6520. one of the paths through cmkey2().  Fixed in ckucmd.c, 5 Sep 98.
  6521.  
  6522. Changes from Jeff to start supporting an overhauled way of setting/showing
  6523. Telnet options.  Many modules, 8 Sep 98.
  6524.  
  6525. Added "OE compliance" -- Latin-9 conversion for DEC MCS and NeXT, which both
  6526. contain OE characters.  ckuxla.c, 8 Sep 98.  (I could do the same for DG, but
  6527. I doubt anyone would notice.)  (Ditto for Macintosh.)
  6528.  
  6529. Changed protocol machine to take connection loss in response to a BYE command
  6530. (while waiting for the ACK) as success rather than failure. ckcpro.w, 8 Sep 98.
  6531.  
  6532. Preliminary code for dynamic Telnet-wait timer from Jeff.  ckcnet.c, 9 Sep 98.
  6533.  
  6534. Removed "if (srvbuf)" from setlin() routine, since srvbuf is an array, not a
  6535. pointer, and this crashes the ICL compiler.  ckuus7.c, 9 Sep 98.
  6536.  
  6537. Added GETKEYCODE <var> <prompt> for K95.  Lets user get the keycode of any
  6538. key event (F-key, Alt-combination, etc) into a variable.  Also changed GETC
  6539. to put console in raw mode to read the one character, so any character at all
  6540. can be typed, even Ctrl-C, after which we go back to CBREAK mode.  Needs
  6541. testing.  ckuusr.[ch], ckuus6.c, 9 Sep 98.
  6542.  
  6543. Changed the way the MODEM ESCAPE-CHARACTER is specified and used:
  6544.  
  6545.  < 0 means the escape mechanism is disabled.
  6546.  = 0 means to use (restore) the default value from the modem database.
  6547.  > 0 and < 128 is a literal value to be used instead of the default one.
  6548.  > 127 means the escape mechanism is disabled.
  6549.  
  6550. This affects "modem hangup".  When the escape mechanism is disabled, but SET
  6551. MODEM HANGUP-METHOD is MODEM-COMMAND, it sends the hangup command immediately,
  6552. without the <pause>+++<pause> business first.  This is useful (for example)
  6553. when sending lots of numeric pages, a process in which we never go online, and
  6554. so never need to escape back.  Eliminating the unnecessary pauses and escape
  6555. sequence allows a lot more pages to be sent per unit time.  Needs testing.
  6556. ckudia.c, 9 Sep 98.
  6557.  
  6558. In order to test modem, dial, and serial port items, tried building on HP-UX
  6559. 10.20 for the first time in months.  Compiled OK (!) but failed to find
  6560. sete[ug]id() at link time.  Made it use setre[ug]id() instead.  Obviously this
  6561. area will need a lot more attention since we don't want to mess up when
  6562. logging in IKS users...  Needs testing.  ckufio.c, 9 Sep 98.
  6563.  
  6564. Changes from Jeff to show a spinner during telnet negotiation wait, to reorder
  6565. the terminal-type negotiation list, and to check for failure of tn_ini(), e.g.
  6566. when connection rejected by TCP Wrappers.  ckuusr.[ch], ckuus7.c, ckcnet.c,
  6567. 10 Sep 98.
  6568.  
  6569. Some #ifdefs to allow compilation on ICL DRS/NX, plus adjustments to the ICL
  6570. makefile entries.  ckcmai.c, makefile, 10 Sep 98.
  6571.  
  6572. Somehow a DECC Alpha VMS build is picking up both the bzero/bcopy macro
  6573. definitions AND the prototypes for bzero() and bcopy().  Added #ifdefs to
  6574. prevent this.  ckcnet.h, 10 Sep 98.
  6575.  
  6576. Added *.pdf to default binary-patterns list.  ckcmai.c, 11 Sep 98.
  6577.  
  6578. Changed the main Linux build to #define CK_NCURSES, which in turn #include's
  6579. <ncurses.h> rather than <curses.h>, and links with libncurses rather than
  6580. libcurses, since newer Linux systems seem to lack symlinks from curses to
  6581. ncurses, and added a "linuxc" entry that still references curses.  However,
  6582. neither curses.h nor ncurses.h can be found on the Red Hat 5.1 system I have
  6583. access to.  makefile, ckcdeb.h, ckuusx.c, 12 Sep 98.
  6584.  
  6585. Building on Linux 1.2 (some old Red Hat version, not sure of the number),
  6586. complained of a syntax error in <syslog.h>:
  6587.  
  6588.   /usr/include/sys/syslog.h:189: unrecognized format specifier for `'
  6589.  
  6590. Building again with -DNOSYSLOG moves the problem to ncurses.h.  The problem
  6591. is that both of these header files refer to "printf" in macro definitions, but
  6592. (in UNIX) we have defined printf to be a macro that expands to "ckxprintf".
  6593. Thus, before including any headers that refer to printf, we have to #undef
  6594. printf, and then redefine it afterwards.  YUK!!!  ckucmd.c, ckuusx.c,
  6595. ckufio.c, 12 Sep 98.  NOTE: In the future, we should add a new header file,
  6596. which is to be included in each module AFTER ALL OTHER header files, to undo
  6597. whatever the earlier headers might have done, and to define macros that
  6598. substitute homegrown routines for library routines or system calls, so we
  6599. don't have to remember to insert little undef...redef clauses around #includes
  6600. all over the place.
  6601.  
  6602. Back to Linux 2.0.34...  The logwtmp() declaration blew up the compiler,
  6603. needed ANSIfication.  ckufio.c, 12 Sep 98.
  6604.  
  6605. With the fixes above, and using a new "linuxnc" (no-curses) makefile entry,
  6606. we still fail in the link step because the crypt() routine can't be
  6607. found.  Digging through the libraries shows it has moved from libc to
  6608. libcrypt.  Swell, so we need yet another makefile entry, linuxlcnc ("link
  6609. with libcrypt, no curses").  So now it builds on Red Hat 5.1, kernel 2.0.34,
  6610. but without curses support.  makefile, 12 Sep 98.
  6611.  
  6612. Noticed that the code contained various #ifdef LINUX constructions, but
  6613. LINUX was never defined anywhere.  Added a clause to ckcdeb.h to define
  6614. LINUX if it was not defined but __linux__ was defined, and also added
  6615. -DLINUX to all Linux entries.  makefile, ckcdeb.h, 12 Sep 98.
  6616.  
  6617. Defined -DDYNAMIC by default for all UNIX builds, and removed it from all
  6618. makefile entries that included it.  ckcdeb.h, makefile, 12 Sep 98.
  6619.  
  6620. Found that Linux keeps its wtmp file in a different place than other UNIXes.
  6621. Adjusted via #ifdefs.  ckufio.c, 12 Sep 98.
  6622.  
  6623. Found that UNIX ttinl() still had one or two return points where it failed to
  6624. turn off its alarm(), due to recent changes, and of course whenever that
  6625. happened, the alarm would eventually go off, crashing the program.  Fixed in
  6626. ckutio.c, 12 Sep 98.
  6627.  
  6628. Put Telnet-wait "spinner" display code in #ifdef CKSPINNER, and left it
  6629. undef'd, put back the regular dots.  The spinner is not good for speech
  6630. devices, scripts, etc, and is unlike anything else in C-Kermit's user
  6631. interface, and also wouldn't look right when viewed through any terminal or
  6632. emulator using an NRC.  ckcnet.c, 12 Sep 98.
  6633.  
  6634. Defined KANJI by default if NOCSETS not defined and NOKANJI not defined; same
  6635. as for all other character-set families (Latin-1, Latin-2, Greek, Hebrew,
  6636. Cyrillic): ckcxla.h.  Removed all explicit #defines for KANJI from ckcdeb.h
  6637. and makefile.  13 Sep 98.
  6638.  
  6639. Made some adjustments to the ex-spinner code so it doesn't spurt out a burst
  6640. of dots, but only prints one every second (i.e. when there is a timeout), and
  6641. labeled this section "Negotiations:" and put "(OK)" at end, like in the DNS
  6642. section.  Also, made this section disablable via SET QUIET ON, like the other
  6643. sections.  ckcnet.c, 13 Sep 98
  6644.  
  6645. In an effort to handle the /dev/modem problem in Linux, and the
  6646. lockfile-versus-symlink problem in general, added code to ttlock() to see if
  6647. device name is a symlink.  If so, islink is set to nonzero and linkto[] (yet
  6648. another static buffer) contains the name pointed to by the symlink.  Using
  6649. stat() and then S_ISLNK() does not work on some platforms, so instead we
  6650. always just call readlink(), which fails if it is not a link, but returns the
  6651. file's real name if it is.  If device name is a link we create a second
  6652. lockfile, which is a link to the first one, but based on the device's real
  6653. name.  The second lockfile is removed in ttunlk().  This code works everywhere
  6654. but in systems that use ttlock() (currently only AIX) and HP-UX, which has its
  6655. own dual-locking system.  All the symlink/readlink related code is #ifdef
  6656. CKSYMLINK, so it can be disabled on platforms that don't have readlink(), or
  6657. where it doesn't work.  ckutio.c, 13 Sep 98.
  6658.  
  6659. After yet another prolonged discussion of lockfile names for SCO...  The
  6660. consensus of the experts is that the device name should be lowercased for
  6661. creating the lockfile, and this is how it was already.  However, Dmitri
  6662. Zuryanovich reports from Russia that this is not consistent with mgetty.
  6663. Example: "set line /dev/tty1A" creates LCK..tty1a, and while cu and friends
  6664. follow the same convention, mgetty creates and checks for LCK..tty1A.  So,
  6665. piggybacking onto the previous item, if the given device name is not a
  6666. symlink, I pretend that the original name is a symlink.  Then, after
  6667. lowercasing the name, if the result is different from the original, I keep the
  6668. original name as the basis for the second lockfile, otherwise I create only
  6669. one lockfile as before.  If a second lockfile is created, it is deleted
  6670. automatically at the same time the first one is.  The possible pitfall here,
  6671. of course, is that there might actually be a distinct device with
  6672. corresponding lowercase name.  But since that was the name we always used for
  6673. the lockfile anyway, this change can't possibly do any additional harm.
  6674. ttlock(), ckutio.c, 13 Sep 98.
  6675.  
  6676. Changed "show comm" to report any secondary lockfile.  ckuus4.c, 13 Sep 98.
  6677.  
  6678. Discovered that when SET MODEM HANGUP-METHOD is MODEM-COMMAND, that if a
  6679. HANGUP command is given before a DIAL command was given, it doesn't use the
  6680. modem hangup command.  Fixed in mdmhup(), ckudia.c, 13 Sep 98.
  6681.  
  6682. Discovered that MODEM HANGUP-METHOD is not displayed by SHOW MODEM.  Fixed in
  6683. ckuus3.c, 13 Sep 98.
  6684.  
  6685. Verified that SET MODEM SPEED-MATCHING works correctly.  The confusion comes
  6686. when users SET MODEM TYPE HAYES (2400 or 1200) to dial a more modern type of
  6687. modem -- Kermit automatically SETs MODEM SPEED-MATCHING ON, as it must for any
  6688. kind of modem that does not do speed buffering.  Let's keep this in mind when
  6689. explaining how to write alpha pager scripts.
  6690.  
  6691. Increased character spacing for Rolm DCM dialing from 5 msec to 50, since
  6692. some failures had been observed.  Seems to work fine for both Rolm DCM and
  6693. 600-Series AT-dialing.  ckudia.c, 13 Sep 98.
  6694.  
  6695. Found that starting a phone number with "=", which is supposed to indicate
  6696. a literal string to be dialed, was no longer stripping off the "=" before
  6697. dialing the string.  Fixed in dodial(), ckuus6.c, 13 Sep 98.
  6698.  
  6699. From Jeff: Enabled CKSPINNER for K95 and adjusted spinner-vs-dots code.
  6700. ckcdeb.h, ckcnet.c, 14 Sep 98.
  6701.  
  6702. The SET LINE / SET HOST command was printing an annoying blank line.  Fixed in
  6703. gtword() by disabling echo not only if reading from chars already in command
  6704. buf, but also if reading a pushc'd character.  ckucmd.c, 14 Sep 98.
  6705.  
  6706. Fixed a reference to a null pointer in mdmhup(), from Jeff.  ckudia.c,
  6707. 14 Sep 98.
  6708.  
  6709. Fixed dohexdump() prototypes to avoid ANSI complaints.  ckcdeb.h, 14 Sep 98.
  6710.  
  6711. Added assorted casts in tn_doop() to shut up ANSI complaints.  ckcnet.c,
  6712. 14 Sep 98.
  6713.  
  6714. Verified that IKSD writes just fine to syslog() on Solaris 5.1, even after
  6715. chroot().  So the problem with syslog() entries disappearing into the void
  6716. after chroot() is not universal, and perhaps might be peculiar to SunOS.
  6717. We'll see...
  6718.  
  6719. Added --syslog:5 (debugging) support.  Automatically opens debug log and
  6720. writes debug records to syslog.  ckuus[xy].c, 15 Sep 98.
  6721.  
  6722. Added code to turn off syslogging around login/password dialog, so user ID
  6723. and Password are not entered in logs for levels 4 and 5 (commands and debug).
  6724. this change does not affect the secure entry of Authentication info at syslog
  6725. level 1.  ckuus7.c, 15 Sep 98.
  6726.  
  6727. Added a system-independent syslogging routine to UNIX C-Kermit:
  6728. cksyslog(int,char *,char *,char *).  This needs to be added to any other
  6729. ck?fio.c module for builds in which CKSYSLOG is defined.  It allows the system
  6730. independent modules to call the syslogging function without using system
  6731. dependent code, and (at least in the UNIX case) isolates the #ifdef printf
  6732. craziness to one place.  ckcdeb.h, ckuusx.c, ckucmd.c, ckufio.c, 15 Sep 98.
  6733.  
  6734. Added incoming server commands to level 4 syslogging.  ckcpro.w, 15 Sep 98.
  6735.  
  6736. Changed default prompt to say IKSD rather than C-Kermit or K-95 (etc) when
  6737. running as IKSD.  Also changed default UNIX prompt to show current directory
  6738. in parens rather than brackets since brackets don't show up right if an NRC
  6739. is in use.  ckuus5.c, 15 Sep 98.
  6740.  
  6741. Made the syslog messages a bit more consistent:
  6742.  
  6743.   login: user host
  6744.   login: anonymous host password
  6745.   logout: user host
  6746.   command: text             <-- Should these also include user
  6747.   server: text              <-- and host?  (They do include the
  6748.   file[n] name: text        <-- PID, but PIDs can wrap...)
  6749.  
  6750. ckufio.c, 15 Sep 98.
  6751.  
  6752. Logging commands currently has the failing that the result (success or
  6753. failure) is not shown.  Tried moving the logging point from cmcfm() to the
  6754. top of the parse loop, and logging the contents of cmdbuf[] (which should
  6755. contain the previous command) and the success variable (which applies to the
  6756. previous command), but by that time too many things have might have happened
  6757. to the command buffer.  So for now we'll leave it as is.
  6758.  
  6759. Found a double-ended bug in the READ command, potentially affecting all
  6760. versions, but only showing up in the VMS version: the zsinl() function
  6761. properly returned -1 on EOF, but the READ command code (too) cleverly ignored
  6762. the return code if there was also something in the buffer (to allow reading a
  6763. final line that lacked a terminator).  But if the buffer was not cleared
  6764. prior to trying to read, the final line would be read successfully forever.
  6765. Fixed at both ends.  ckufio.c, ckvfio.c, ckuus5.c, 16 Sep 98.
  6766.  
  6767. Added a new level of syslogging: 5 = commands from macros or files.  Debug
  6768. level moved up to 6.  ckcdeb.h, ckuusy.c, 16 Sep 98.
  6769.  
  6770. Added an optional and separate iksd log.  Opened in zvpass() prior to
  6771. chroot(), so works for anonymous logins even on SunOS.  Writes its record in
  6772. zclose().  Format is exactly the same as wu-ftpd, except instead of "ftp" it
  6773. says "iks" in the 11th field.  A couple items still need to be fixed, and
  6774. format of the log needs to be documented.  Also, I need to test if iksd can
  6775. share the actual ftpd.log with wu-ftp.  ckuusy.c, ckufio.c, 16 Sep 98.
  6776.  
  6777. Sequence-number out-of-range check added to ttinl() on 5 Sep 98 was looking
  6778. at the wrong field, spotted by Jeff.  Fixed in ckutio.c, 17 Sep 98.
  6779.  
  6780. Added original file-system root to beginning of fullname[] in iksdlog when
  6781. user is anonymous and therefore chroot'd, so complete filespec is logged.
  6782. Also fixed elapsed-time field, which previously always registered 0.  Also
  6783. fixed the i/o field, which had reverse sense.  ckufio.c, 17 Sep 98.
  6784.  
  6785. Verified that iksd can log to the same file as ftpd.  However, I noticed that
  6786. ftpd does not log transfers by real users, and also that it does not show
  6787. the full filespec.  I commented out the code that adds the chroot path to the
  6788. filespec since ftpd doesn't show the full real path, and the object is to stay
  6789. compatible.  ckufio.c, 17 Sep 98.
  6790.  
  6791. Changes from Jeff mainly for new SET TELOPT command.  ckuus3.c, ckuusr.h,
  6792. etc., 18 Sep 98.
  6793.  
  6794. Supplied missing */ from comment in ckuusr.h.  18 Sep 98.
  6795.  
  6796. Fixed various other preprocessor syntax errors.  ckcfns.c, ckuus6.c, 18 Sep 98.
  6797.  
  6798. Discovered that {get,end}usershell() is not portable.  So #ifdef City has
  6799. another population explosion...  ckcdeb.h, ckufio.c, 18 Sep 98.
  6800.  
  6801. Disabled DELETE command for guests.  ckuus[r67].c, ckufio.c, 18 Sep 98.
  6802.  
  6803. RENAME is the only file collision option that is safe for guests to use.  All
  6804. the others destroy or rename or alter existing files.  Added code to enforce
  6805. this.  FILE COLLISION RENAME is set at anonymous login time and the SET FILE
  6806. COLLISION command is disabled for guests.  Also the server rejects any REMOTE
  6807. SET FILE COLLISION commands.  ckcfns.c, ckuus7.c,  18 Sep 98.
  6808.  
  6809. Fixed DISABLE DELETE to also set FILE COLLISION to RENAME and to disable the
  6810. SET FILE COLLISION command.  ckuus[67].c, 18 Sep 98.
  6811.  
  6812. Fixed COPY command to check if destination file already exists and if so
  6813. to fail if DELETE is DISABLEd or if user is anonymous.  ckuus6.c, 18 Sep 98.
  6814.  
  6815. Made snddir() and snddel() return 0 upon failure to do their jobs (as now),
  6816. or -1 if the given filespec did not match any existing files (new).  ckcnfs.c,
  6817. 18 Sep 98.
  6818.  
  6819. Made protocol module send Error packet if REMOTE DELETE or REMOTE DIRECTORY
  6820. was executed on a filespec that could not be found, thus causing the client
  6821. command to fail rather than succeed, to match the reasonable expectations of
  6822. users.  ckcpro.w, 18 Sep 98.
  6823.  
  6824. Made COPY command enforce one-file restriction; no wildcards.  It already
  6825. did this in K95.  ckuus6.c, 18 Sep 98.
  6826.  
  6827. Don't allow changing of protocol to anything but Kermit in IKSD.  ckuus3.c,
  6828. ckcfn2.c, 18 Sep 98.
  6829.  
  6830. Added provision for NOIKSD at compile time, which defines all the appropriate
  6831. NOblah symbols to disable IKSD-specific code.  If NOIKSD is not defined, IKSD
  6832. is defined automatically (but currently not used for anything).  ckcdeb.h,
  6833. 18 Sep 98.
  6834.  
  6835. Changes to SET TELOPT parsing from Jeff, ckuus3.c, 21 Sep 98.
  6836.  
  6837. Added TYPE /PAGE (and /NOPAGE).  /PAGE forces askmore() prompting.  /NOPAGE
  6838. disables it.  Default (if no switch given) is according to the current COMMAND
  6839. MORE-PROMPTING setting.  Prevailing setting is undisturbed by switches, and
  6840. is restored automatically if the TYPE command is interrupted with SIGINT.
  6841. ckuusr.h, ckuus[r56x].c, 21 Sep 98.
  6842.  
  6843. Added --bannerfile:filename, which tells the herald() routine to print the
  6844. contents of the given file, rather than what it normally prints.  Uses more-
  6845. prompting (i.e. works like TYPE /PAGE).  For use with IKSD, but can also be
  6846. used in regular C-Kermit.  ckuus[56x].c, 21 Sep 98.
  6847.  
  6848. Fixed herald() to put console in cbreak mode before calling askmore().
  6849. ckuus5.c, 22 Sep 98.
  6850.  
  6851. Added --help, which lists the available extended command-line options.
  6852. ckuusy.c, 22 Sep 98.
  6853.  
  6854. Added HELP EXTENDED-OPTIONS, which is like HELP OPTIONS, but for the extended
  6855. ones (and also is like --help, but with more-prompting).  Also added a pointer
  6856. from HELP OPTIONS to HELP EXTENDED.  Also added a very brief HELP IKSD.
  6857. ckuusr.[ch], ckuus2.c, 22 Sep 98.
  6858.  
  6859. Added SHOW EXTENDED-OPTIONS, but left it invisible since it's pretty much only
  6860. for IKSD sysadmins to check their command lines before going into production.
  6861. If an IKSD client user stumbles on it, it won't show them any IKSD-specific
  6862. options, only the innocuous ones.  ckuusr.h, ckuus[r5].c, 22 Sep 98.
  6863.  
  6864. Prevented access to command-line argument vector via \&@[] array to IKSD
  6865. users.  There is no reason they would need to see the command line, and every
  6866. reason why they shouldn't.  cmdini(), ckuus5.c, 22 Sep 98.
  6867.  
  6868. Added brief synopsis of each command to REMOTE HELP text.  ckcfns.c, 23 Sep 98.
  6869.  
  6870. Added a #define for zfnqfp() to strncpy() when ZFNQFP is not defined, so we
  6871. don't have to guard every reference to zfnqfp() with #ifdefs.  ckcdeb.h plus
  6872. many modules, 23 Sep 98.
  6873.  
  6874. Changed all --blah:<filename> options to expand the filename before storing
  6875. it, except --cdfile, which is normally relative.  ckuusy.c, 23 Sep 98.
  6876.  
  6877. Added --helpfile:<filename> to allow a custom file to be substituted for the
  6878. top-level HELP text.  Can be any length, using more-prompting by default.
  6879. Also works for regular non-IKSD Kermit sessions.  ckuusr.h, ckuus[y25].c.,
  6880. 23 Sep 98.
  6881.  
  6882. Added --cdmsg:n, n > 1, to mean CD message should also be displayed when CD
  6883. (but not BACK) command given at prompt.  Set it to 2 automatically when -A
  6884. given on command line.  Uses "type /page".  Works in non-IKSD Kermit sessions.
  6885. ckuus[5y].c, 23 Sep 98.
  6886.  
  6887. Fixed makelist() to allow recyclying of list.  ckuusr.c, 23 Sep 98.
  6888.  
  6889. Changed --cdfile:<name> to also accept a list of filenames in the standard
  6890. C-Kermit format for lists: --cdfile:{{file1}{file2}...{filen}}, up to 8.
  6891. And changed SHOW { SERVER, EXTENDED-OPTIONS } to show CD message-file list.
  6892. ckcmai.c, ckcfns.c, ckcpro.w, ckuus[35y].c, 23 Sep 98.
  6893.  
  6894. Changed default CD message file from a single filename to a list.  ckcker.h,
  6895. ckcmai.c, 23 Sep 98.
  6896.  
  6897. Added SET CD MESSAGE { ON, OFF, FILE <list> }, like SET SERVER CD-MESSAGE, but
  6898. applies to command mode rather than server mode.  Also added SET CD PATH to
  6899. allow the CD PATH to be set from within C-Kermit.  Note that SET SERVER
  6900. CD-MESSAGE FILE and SET CD MESSAGE FILE do exactly the same thing, and one
  6901. does (and undoes) the other.  However, SET CD MESSAGE { ON, OFF } and SET
  6902. SERVER CD-MESSAGE { ON, OFF } are separate.  ckuus3.c, ckuusr.h, 23 Sep 98.
  6903.  
  6904. Added SHOW CD.  Shows current directory, previous dir, cd path, cd message,
  6905. server cd-message, and cd message file.  ckuusr.h, ckuus[r5].c, 23 Sep 98.
  6906.  
  6907. Added HELP SET CD and updated HELP SET SERVER, HELP CD, and HELP TYPE.
  6908. ckuus2.c, 23 Sep 98.
  6909.  
  6910. Added a "-7" command-line option.  This is approximately equivalent to -A,
  6911. except without the login phase, chroot(), etc, so it is for use by ordinary
  6912. users who are already logged in, rather than as a daemon.  It just sets
  6913. sstelnet = 1, thus enabling server-side Telnet negotiation, substitute printf,
  6914. etc.  Works OK if run redirected under another Kermit that accepts the
  6915. incoming connection, but needs additional work to allow:
  6916.  
  6917.   kermit -7 -J * 3000
  6918.  
  6919. to allow a single copy of Kermit to be started in such a way that it accepts
  6920. an incoming Telnet connection and then presents a command prompt to the Telnet
  6921. client.  ckuus[47].c, ckcmai.c, ckutio.c, 23 Sep 98.
  6922.  
  6923. Updated HELP SET CD PATH text to account for platform differences.  ckuus2.c,
  6924. 24 Sep 98.
  6925.  
  6926. Changes from Jeff, mainly for automatically setting default protocol for
  6927. different sockets in SET HOST / TELNET.  ckcnet.[ch], ckuus7.c, 24 Sep 98.
  6928.  
  6929. Changes from Jeff, 1 Oct 98:
  6930.  . Add SET SESSION-LOG for K95: ckcker.h, ckuusr.c. makefile, ckuusx.c
  6931.    Default is binary for K95, text for UNIX, etc.
  6932.  . Added DEBUG session-log type: ckuus3.c.
  6933.  . Some reorganization of SSL selection code: ckuus3.c.
  6934.  . Add SSL support: ckucns.c, ckutio.c.
  6935.  . Add NTVT emulation: ckuusr.h, ckuus7.c.
  6936.  . Add NTVT unknown authorization method: ckctel.h.
  6937.  . Various updates to authentication code: ckcnet.c.
  6938.  . Clarifying comments added about CP1258 -- it's for Viet Nam: ckouni.c.
  6939.  
  6940. Reformatted ckouni.c to not have long lines, 1 Oct 98.
  6941.  
  6942. Changes from Jeff, 19 Oct 98:
  6943.  . SET TERM PRINT
  6944.  . Additional of NTVT and SSL authentication types
  6945.  . Assorted minor corrections
  6946.  
  6947. Some minor corrections from Jeff: ckuus[5x].c, 20 Oct 98.
  6948.  
  6949. Added RESET command; closes all open files and logs.  Probably could do some
  6950. other things too...  ckuusr.h, ckuus[rx].c, ckcker.h, ckcpro.w, 20 Oct 98.
  6951.  
  6952. Moved logchar() from cku{con,cns}.c to ckuusx.c, and added logstr() (but
  6953. it's not called from anywhere).  These might need #ifdefs for K95.
  6954. Prototypes in ckcker.h.  20 Oct 98.
  6955.  
  6956. It has always bugged me that Kermit could not automatically switch to an
  6957. appropriate character set when receiving a file whose transfer character-set
  6958. is announced.  With IKSD, this is no longer just a convenience, but a
  6959. necessity.  So...
  6960.  
  6961.  . Added initcsets() to initialize charset associations.  These are done in
  6962.    a way appropriate to each system with #ifdefs.  initcsets() is called at
  6963.    program startup (after sysinit()).  ckcker.h, ckcmai.c, ckuxla.c, 20 Oct 98.
  6964.  
  6965.  . Added ASSOCIATE XFER/FILE-CHARACTER-SETS command.  ckuusr.[ch], 20 Oct 98.
  6966.  
  6967.  . Added SET { SEND, RECEIVE } CHARACTER-SET-SELECTION { AUTO, MANUAL }.
  6968.    ckuusr.h, ckuus7.c, 20 Oct 98.
  6969.  
  6970.  . Added S/R CHAR setting to SHOW CHARACTER-SETS.  ckuus4.c, 20 Oct 98.
  6971.  
  6972.  . Added SHOW ASSOCIATIONS separately, since there was no good way to put it
  6973.    in SHOW CHARACTER-SETS with more-prompting, since SHO CHAR is split between
  6974.    modules.  (We need a better method of handling more-prompting!)  ckuusr.h,
  6975.    ckuus[45].c, 20 Oct 98.
  6976.  
  6977.  . Changed Attribute-packet handler to automatically switch file character-set
  6978.    according to incoming transfer charset announcer if RECEIVE CHAR AUTO.  The
  6979.    original setting is saved and restored around file transfer and/or keyboard
  6980.    interruption.  ckcfn3.c, ckuusx.c, 20 Oct 98.
  6981.  
  6982.  . SET FILE CHARACTER-SET blah now automatically sets the transfer charset
  6983.    if SEND CHAR is AUTO.  It set it before too, but using 70+ lines of ugly
  6984.    code, now replaced by 2 lines of pretty code.  ckuus7.c, 20 Oct 98.
  6985.  
  6986.  . SET XFER CHARACTER-SET blah now automatically sets the file charset from
  6987.    the associations table if SEND CHAR is AUTO.  ckuus3.c, 20 Oct 98.
  6988.  
  6989.  . Added help text for the new commands.  ckuus2.c, 20 Oct 98.
  6990.  
  6991.  . Fixed a bug that kept the transfer character-set from showing up in
  6992.    transaction log entries for received files.  ckcfn3.c, 20 Oct 98.
  6993.  
  6994.  . Fixed the descriptive names that are common to fcsinfo[] and tcsinfo[]
  6995.    to be in the same format, and also renamed code pages from "IBM Code Page"
  6996.    to "PC Code Page".  ckuxla.c, 20 Oct 98.
  6997.  
  6998. So now a user, when receiving a file in text mode that comes with a charset
  6999. announcer will automatically get a reasonable translation.  And when users who
  7000. are about to send a file give either a SET FILE or SET TRANSFER CHARACTER-SET
  7001. command, the other is set accordingly.  The defaults should be entirely
  7002. appropriate (and of course can be changed with the ASSOCIATE command), so now
  7003. C-Kermit and K95 should almost always "do the right thing" as long as the
  7004. sender properly identifies the file character-set of the source file.  And in
  7005. fact, this happens by default in K95, since it gets the current code page at
  7006. startup and makes this the file character-set value.  Unfortunately there is
  7007. no good (or at least remotely portable) way to do the same in Unix.
  7008.  
  7009. From Jeff: Deployment of logstr() in many modules.  21 Oct 98.
  7010.  
  7011. Added bounds checking to auto charset switch in gattr().  ckcfn3.c, 21 Oct 98.
  7012.  
  7013. Ditto for SET XFER CHARACTER-SET.  ckuus3.c, 21 Oct 98.
  7014.  
  7015. Ditto for SET FILE CHARACTER-SET.  ckuus7.c, 21 Oct 98.
  7016.  
  7017. Fixed ?-help messages for ASSOCIATE command.  ckuusr.c, 21 Oct 98.
  7018.  
  7019. Some changes from Jeff to SSL option setting commands.  ckuus3.c, 22 Oct 98.
  7020.  
  7021. Added { RECEIVE, GET, MGET } /EXCEPT:<list>.  If a file arrives whose name
  7022. matches any name in the exception list, it is rejected using the attribute
  7023. refusal mechanism, reason: name.  This does not use the O-packet exception
  7024. list mechanism; it is done purely on the client side; thus it can work with
  7025. current/older Kermit programs on the other end.  It does, however, require
  7026. A-packets to be negotiated and in use, since this is the only way we have of
  7027. rejecting a file within a group without canceling the entire transfer.  But
  7028. that's true of the collision-based and other refusals too.  ckuus[26].c,
  7029. ckcfn[s2].c, 22 Oct 98.  Later, once C-Kermit 7.0 servers are prevalent, we
  7030. can convert to using the more graceful O-packet method.
  7031.  
  7032. Various minor fixes to transaction log format.  ckcfn[s2].c, 22 Oct 98.
  7033.  
  7034. Inclusion of extended-format command-line options (like --helpfile:blah)
  7035. caused command-line parser to skip the next option, oops.  Fixed in ckuusy.c.
  7036. Also fixed command-line error message to print actual program name, not
  7037. hardwired text.  22 Oct 98.
  7038.  
  7039. Previously the wuftpd-like log, enabled by --iksdlog:1 --iksdfile:name, was
  7040. available only to the iksd.  I rearranged the code to allow regular user-mode
  7041. C-Kermit to use this too, and renamed the options (and corresponding
  7042. variables) to xferlog and xferfile.  UNIX only.  ckuusy.c, ckufio.c,
  7043. 22 Oct 98.
  7044.  
  7045. Added SET TRANSACTION-LOG FTP (it already had BRIEF and VERBOSE options) to
  7046. let the ftpd-like log be selected by command.  UNIX only.  This bypasses the
  7047. regular transaction-log mechanisms, but that's not visible to the user.  It's
  7048. hooked into SHOW LOG via special code.  ckuus[35].c, 22 Oct 98.
  7049.  
  7050. Fixed FTP log format -- two of the fields were switched.  Also put the actual
  7051. username in the username field in the non-IKSD case.  And put the connection
  7052. name (network host or serial device name) in the clienthost field for the
  7053. non-IKSD case.  ckufio.c, 23 Oct 98.
  7054.  
  7055. Made LOG TRANSACTIONS default disposition be APPEND when using the FTP-format
  7056. log, for compatibility with the ftp log.  ckuus4.c, 23 Oct 98.
  7057.  
  7058. Substituted built-in code for zshcmd() in UNIX zcopy(), because the zshcmd()
  7059. version can't be used in IKSD.  It works, but it's not finished -- need to add
  7060. informative error returns (see ckcplm.txt), do all the checks that cp does
  7061. (e.g. source file is a directory, whether it's ok to overwrite existing files,
  7062. etc), and fix up permissions afterwards, e.g. to carry forward the execute
  7063. bit.  Will finish after the weekend.  ckufio.c, 23 Oct 98.
  7064.  
  7065. Discovered that UNIX zxpand() wrote into its argument (e.g. when concatenating
  7066. "/*" to a directory name).  It's been this way forever, and obviously could
  7067. have resulted in countless horrible consequences.  Fixed it to make a safe
  7068. copy first.  ckufio.c, 25 Oct 98.
  7069.  
  7070. Discovered that RENAME did not work when the source file was a directory.
  7071. This was due to a deficiency in cmifi2(), which did not allow for the case in
  7072. which the argument "d" was nonzero (meaning "parse files or directories"), but
  7073. the argument "dirflg" was 0 (meaning "not directories-only").  Fixed in
  7074. ckucmd.c, 25 Oct 98.
  7075.  
  7076. Fixed UNIX zcopy() to:
  7077.  . Check for source file is a directory / is wild / etc.
  7078.  . Check for source file == destination file by comparing their inodes.
  7079.    This works even for symlinks.
  7080.  . Allow destination file to be a directory, in which case the source file
  7081.    is copied into it.
  7082.  . Overwrite existing destination file if its permission allows.
  7083.  . Set new file's permission according to umask but also carry forward
  7084.    the source file's execute permission bits (but this only works if the
  7085.    destination file did not already exist -- this appears to be a property
  7086.    of UNIX open()).
  7087.  . Fail if interrupted by Ctrl-C.
  7088.  . Return standardized error codes (listed in ckcplm.txt).
  7089. ckufio.c, 25 Oct 98.
  7090.  
  7091. Fixed COPY command to:
  7092.  . Not allow a directory as the source file (give a parser error and fail).
  7093.  . Not allow wildcards (ditto).
  7094.  . Print error messages appropriate to zcopy() return code.
  7095. ckuus6.c, 25 Oct 98.
  7096.  
  7097. Made sure server end of REMOTE COPY and REMOTE RENAME work with new code
  7098. (they do), which was the main reason for doing all this.  Added checks within
  7099. zcopy() and zrename() themselves against being called by IKSD guests.
  7100. ckufio.c, 25 Oct 98.
  7101.  
  7102. Problem: REMOTE HOST blah will time out and fail if the "blah" command takes
  7103. too long to finish and/or to produce output.  Ditto for sending from a pipe.
  7104. zinfill() in this case needs a way to time out when reading from a process,
  7105. which can be done (in UNIX) with select().  Since all the hairy
  7106. select()-related #ifdefs, etc, are in ckutio.c, I added a new routine there,
  7107. ttwait(fd,secs), to wait the given number of seconds for data to become
  7108. available on the given file descriptor.  zinfill() calls ttwait() when it
  7109. knows it is reading from a pipe, and it works fine (at least in SunOS).  Now
  7110. the trick will be to interface this mechanism with the file transfer code:
  7111.  
  7112.  . What should the timeout be?  Well, these days we have no idea what the
  7113.    other Kermit's timeout interval is, because it might be dynamic.  For
  7114.    starters, it might be OK to hardwire this to 1 second.  After all, neither
  7115.    Kermit program is doing anything anyway if no output is arriving from the
  7116.    pipe, so why not give them something to do?
  7117.  
  7118.  . How to return timeout condition?  Have zinfill() return a unique negative
  7119.    number (-3 is currently not used), and then make sure everybody else along
  7120.    the way knows what it means.
  7121.  
  7122.  . Who are the clients of zinfill()?  It is called only through the zminchar()
  7123.    macro.  zminchar(), in turn, is called by: kgetf() (Kanji file-transfer),
  7124.    bgetpkt(), getpkt(), transmit(), xlate(), \fcommand(), and dotype().  Of
  7125.    these, [b]getpkt() and \fcommand() might be reading from a pipe, but
  7126.    timeouts are important only during file transfer, so we can ignore
  7127.    everything but [b]getpkt().
  7128.  
  7129. This means that zinfill() should call ttwait() only when Kermit protocol is
  7130. active.  We can test this with a new variable, kactive: ckuusx.c, ckcpro.w,
  7131. ckufio.c, 25 Oct 98.
  7132.  
  7133. zinfill(), upon timeout, returns -3 to [b]getpkt(), which passes -2 up to its
  7134. caller, sdata().  If sdata() gets this, it simply sends an empty data packet
  7135. (for testing, it sends a data packet containing a dot).  ckcfns.c, 25 Oct 98.
  7136.  
  7137. It works, but will need a lot of testing and refinement (for example, a packet
  7138. log shows that after a bunch of timeouts, when the output first appears, a
  7139. NUL is inserted into the data stream).  As far as non-UNIX versions go, this
  7140. is strictly an matter of making their versions of zinfill() return -3 on
  7141. timeout.
  7142.  
  7143. The spurious NUL at the beginning of the data packet was caused by the now
  7144. invalid assumption that getpkt() will always either read a character or get an
  7145. EOF indication.  Since it does at-least-one-character lookahead, it uses the
  7146. "first == 1" as an indicator that there was no previous character, and sets
  7147. first = 0 the first time through.  But if the first time through it gets a
  7148. timeout from zinfill(), the first flag should be left alone.  Now the first
  7149. flag is unset only when zinfill() returns an actual character.  [b]getpkt():
  7150. ckufio.c, 26 Oct 98.
  7151.  
  7152. The second bad assumption was that timeouts would only occur at the beginning;
  7153. in fact, they can happen anywhere, any number of times.  Juggling the code to
  7154. make sure getpkt() returns partial packets upon timeouts reveals that once
  7155. some data is returned by zinfill(), no further timeouts occur.  That's
  7156. because fread() is called with INBUFSIZE, and so it blocks until the buffer
  7157. is filled or EOF is encountered.  But for the new code to work, it has to
  7158. read only what is there, without blocking.  So I made the input file pointer
  7159. for pipes (in zxcmd()) nonblocking, and then adjusted zinfill() and getpkt()
  7160. to behave appropriately.  It's still not perfect, but it's getting close.
  7161. ckufio.c, ckcfns.c, 26 Oct 98.
  7162.  
  7163. Fixed a bug in yesterday's changes that broke the case where timeouts occurred
  7164. before any data had been read.  getpkt(): ckcfns.c, 27 Oct 98.
  7165.  
  7166. Migrated all getpkt() changes to bgetpkt().  ckcfns.c, 27 Oct 98.
  7167.  
  7168. Tested the following successfully:
  7169.  
  7170.  . remote host echo foo
  7171.  . remote host sleep 5;echo foo
  7172.  . remote host sleep 5;echo foo;sleep 5
  7173.  . remote host sleep 5;echo foo;sleep 5;echo bar
  7174.  . remote host echo foo;sleep 5;echo bar;sleep 5
  7175.  . remote host echo foo;sleep 5;echo bar;sleep 5;echo baz
  7176.  . (etc)
  7177.  
  7178. BUG: GET /BIN does not force the server to send in binary mode.  Diagnosis:
  7179. Due to changes to ckcpro.w from 14 Aug 98 (see notes above) tinit() can be
  7180. called *after* spar(), but whatru is set in spar() but zero'd in tinit().
  7181. Hmmm, this also explains why the "who are you" info went missing around the
  7182. same time...  Cure: move initialization of whatru (and whoaru[]) to spar().
  7183. ckcfns.c, 27 Oct 98.
  7184.  
  7185. This seems to take care of everything.  When PATTERNS are OFF on the server,
  7186. GET /BIN always transfers in binary mode and GET /TEXT always transfers in
  7187. text mode.  However, if PATTERNS are ON, they still take precedence, since
  7188. there is presently no way for the server to know *how* the binary bit in the
  7189. client's WHOAMI field was set -- because it happened to be the prevailing
  7190. mode (in which case the server's patterns should have precedence) or because
  7191. the user said GET /BINARY (in which case the client's command should govern).
  7192. Unfortunately there are no spare bits in the WHOAMI field to express the
  7193. difference.  (It can, however, be easily added to the O Packet.)  In the
  7194. meantime, REMOTE SET TRANSFER MODE MANUAL effectively disables PATTERNS in
  7195. the server and allows the GET /BINARY and /TEXT switches to operate in the
  7196. expected way.
  7197.  
  7198. So now the following work too (server has SET TRANSFER PIPES ON):
  7199.  
  7200.   get /bin wermit ; (after "remote set xfer mode manual")
  7201.   get /bin /as:x.x {!(sleep 5;cat wermit)}
  7202.  
  7203. In light of successful experience with GFTIMER, redid UNIX ztime() to call
  7204. gettimeofday() if GFTIMER is defined (since that has been working anyway for
  7205. many months), rather than the bizarre cascade of historical #ifdef'd code.
  7206. The advantage being that gettimeofday() gives us not just date and time to
  7207. the second, but also the fraction of the second in microseconds.
  7208. UNIX ztime() now also set two variables:
  7209.  
  7210.   long ztmsec; Fraction of second in millisec (or -1L if not set)
  7211.   long ztusec; Fraction of second in microsec (or -1L if not set)
  7212.  
  7213. These variables are defined in ckcmai.c, and externs for them are in
  7214. ckcdeb.h, so they can be freely referenced in the code without #ifdefs, but
  7215. customers of these variables should always check to make sure they are not
  7216. -1L before using them.  ckufio.c, 28 Oct 98.
  7217.  
  7218. For time-critical debugging, added SET DEBUG TIMESTAMP { ON, OFF }.  When ON,
  7219. it puts an hh:mm:ss.xxx timestamp at the beginning of each debug log line,
  7220. where .xxx (1000ths of sec) is included if ztmsec is > -1L.  Timestamping
  7221. can be turned off and on at will, even while the debug log is open.
  7222. ckuus[23x].c, 28 Oct 98.
  7223.  
  7224. Made debug() recursion-proof.  If debug() ever called itself, or called a
  7225. routine (such as zstime(), which it now calls for timestamps) which contains
  7226. debug() statements, it would recurse forever and crash when the stack
  7227. overflowed.  dodebug(): ckuusx.c, 28 Oct 98.
  7228.  
  7229. Noticed that all the documentation said SET CLEAR-CHANNEL but the code said
  7230. SET CLEARCHANNEL.  Added alternative keywords & abbreviations to make them
  7231. both right.  ckuusr.c, 28 Oct 98.
  7232.  
  7233. Checked to make sure we still build OK on:
  7234.  
  7235.  . Linux (RH 3.0.3): OK
  7236.  . Solaris 2.5.1 (gcc): OK
  7237.  . SunOS 4.3.1: OK
  7238.  . HP-UX 10.20 (no opt): OK
  7239.  . UnixWare 2.1.3: OK
  7240.  . Sinix 5.42: OK
  7241.  . AIX (no space)
  7242.  . VAX/VMS 5.5: OK
  7243.  
  7244. The first few were OK but Sinix, Unixware, and VMS required a fair amount of
  7245. #ifdef juggling and syntax adjustment.  Problem areas in Unixware and Sinix
  7246. included: no getusershell() (so must add -DNOGETUSERSHELL); no setreuid() etc
  7247. in Sinix, so just use setuid() (man page says it does it all), adding -lcrypt
  7248. to LIBS here & there, etc.  ckuus2.c, ckcfns.c, ckcmai.c, ckcnet.c, ckvfio.c,
  7249. 28 Oct 98.
  7250.  
  7251. Noticed that:
  7252.  
  7253.   rem host sleep 5;echo one;sleep 5;echo two;sleep 5;echo three
  7254.  
  7255. works fine with SunOS server, but stops after "one" with UnixWare, SINIX.
  7256. HP-UX, Linux, and Solaris.  Found and fixed a potential problem with the
  7257. use of fcnctl() to set the pipe nonblocking, but it made no difference.
  7258. Debug log shows:
  7259.  
  7260.   getpkt nleft=0
  7261.   getpkt zminchar 2=110
  7262.   getpkt zminchar 2=101
  7263.   ZINFILL feof
  7264.   getpkt zminchar 2=-1
  7265.   getpkt eof/eot[one]=3
  7266.  
  7267. In other words, feof() is returning true, even though the pipe is not closed.
  7268. I don't know why, but removing the first of two feof() tests from zinfill()
  7269. in this case (reading from pipe) makes the problem go away.  ckufio.c,
  7270. 29 Oct 98.
  7271.  
  7272. Tried building on Sequent DYNIX/ptx(R) V4.4.2:
  7273.  . Warnings about trigraphs in comments, e.g. "/* yyyy-mm-dd */".
  7274.    So what -- these warnings are too stupid to fix.
  7275.  . Typo in _SYS_NML #ifdefs in ckutio.c.
  7276.  . struct timeval not declared because SELECT not defined.
  7277.  . struct timezone does not exist.
  7278.  . gettimeofday() needs to be called with arg #2 = NULL.
  7279.  . set[r]e{u,g}id() do not exist.  Added USE_SETUID to ckufio.c for IKSD.
  7280.    In fact, I'm not sure that there is any reason at all not to always
  7281.    use setuid() and setgid() in IKSD -- but I'm not sure it's safe either.
  7282.  . {get,set}usershell() don't exist.
  7283.  . Most DYNIX/ptx makefile entries were missing the $(KFLAGS) clause.
  7284.  . Fixed these, then updated makefile DYNIX/ptx entries to all have
  7285.    -DNOGETUSERSHELL, and added new dynixptx44 entry that also has
  7286.    -DSELECT and -DBIGBUFOK.
  7287.  . This gets lots of select() warnings, which I fixed with #ifdefs.
  7288.  . It also gets warnings on args of getsockopt(), getsockname(), and accept();
  7289.    all these fixed with #ifdefs in ckcnet.c.
  7290.  . Banner was wrong -- said POSIX instead of DYNIX/ptx, fixed in ckuver.h.
  7291.  
  7292. Now it builds and runs fine.  29 Oct 98.
  7293.  
  7294. Reconciled Jeff's recent changes with mine, many modules, plus an adjustment
  7295. to the getpeername() call for Unixware.  3 Nov 98.
  7296.  
  7297. Changes from Jeff to allow fatal error messages from host to be viewed in
  7298. case of disconnect during tn_ini().  ckcnet.c, ckutio.c, 4 Nov 98.
  7299.  
  7300. Updates for ckvins.txt and ckvbwr.txt, 5 Nov 98.
  7301.  
  7302. Made sure that TIOCGSIZE was a synonym for TIOCGWINSZ in Digital Unix, and
  7303. that ttgwsiz() worked OK.  Added comments.  Made sure it still builds OK on
  7304. DU 3.2 and 4.0B.  ckutio.c, 5 Nov 98.
  7305.  
  7306. Allowed "--" as a synonym for "=" on the command line to separate program
  7307. arguments from script arguments, a`la getopt().  prescan(): ckuus4.c,
  7308. cmdini(): ckuus5.c, doarg(): ckuusy.c, HELP OPTIONS: ckuus2.c, documented in
  7309. ckermit2.txt, 5 Nov 98.
  7310.  
  7311. Noticed that LOCAL variable stack depth was defined as MACLEVEL rather than
  7312. CMDSTKL.  Fixed in ckuus5.c, 5 Nov 98.
  7313.  
  7314. As an experiment, added a few lines of code to the TAKE command parser to
  7315. allow arguments to follow the filename (also some minor adjustments were
  7316. required to xword()).  So now the TAKE command does the same thing as the DO
  7317. command, except it does not push the macro stack.  Thus, if any args are
  7318. given, they overwrite the current macro args, if any, just as if the user had
  7319. given explicit DEFINE or ASSIGN commands for them.  To test, create a file
  7320. (say xxx) that contains the SHOW ARGS command and then tell C-Kermit to "take
  7321. xxx foo bar baz".  Works great, doesn't seem to break anything.
  7322.  
  7323. However, nested TAKEs just keep writing over the same set of arguments, unlike
  7324. nested macros or function calls. which save and restore context.  This is a
  7325. bit ugly to explain, so perhaps a better course would be to tie the argument
  7326. stack to the command level rather than the macro level.  This would be a
  7327. rather massive (but mostly mechanical) change, involving all references to:
  7328.  
  7329.   m_line[level]     stack of macro invocation lines
  7330.   macx[level]       stack of pointers to macro definitions
  7331.   macp[level]       stack of pointers to current position in macro
  7332. + m_arg[level][arg] stack of pointers to args at level 0..MACLEVEL
  7333. + m_xarg[level]     stack of pointers to arg vector array
  7334. + n_xarg[level]     stack of dimensions of arg vector array
  7335. + macargc[level]    stack of argc's
  7336. ? mrval[level]      stack of RETURN values
  7337.   topargc           argc at top level
  7338.   topxarg           argv at top level
  7339.  
  7340. Presumably we could (a) replace all MACLEVEL dimensions for the arrays marked
  7341. "+" (and maybe mrval[] too if we want command files to be able to return
  7342. values) by CMDSTKL; (b) move the argument setting / restoring code from dodo()
  7343. to a common place; (c) call the common routine from both dodo() and dotake();
  7344. (d) index all arrays by cmdlvl rather than maclvl; (e) get rid of the many
  7345. special hacks for top level; (f) preserve compatibility with current behavior
  7346. by having TAKE without args supply current args as default.  This could work,
  7347. but if a subordinate command file changed its arguments, the changes would be
  7348. undone when it returned to its caller, which is counter to current behavior.
  7349. So we can't make this change.
  7350.  
  7351. Discovered that \&_[] does not work at top level.  Commented out two lines of
  7352. code in chkarray() that prevented it from working.  ckuus5.c, 5 Nov 98.
  7353.  
  7354. Worse than that, \&_[] does not work inside FOR, WHILE, SWITCH, XIF.  That's
  7355. because dogta() doesn't handle this array.  Fixed in dogta(): ckuus6.c,
  7356. 5 Nov 98.
  7357.  
  7358. Fixed popclvl() to restore \&_[] array when popping back to top level.
  7359. popclvl(): ckuus5.c, 5 Nov 98.
  7360.  
  7361. So now it is possible for a first-level command file (that is invoked
  7362. without arguments) to access the non-Kermit command line options as follows:
  7363.  
  7364.   for \%i 0 \v(argc)-1 1 { echo \%i. "\&_[\%i]" }
  7365.  
  7366. So, for example, if Kermit was invoked as "kermit -Y -i -- foo bar baz", the
  7367. loop would print:
  7368.  
  7369.   1. "/usr/local/bin/kermit"
  7370.   2. "foo"
  7371.   3. "bar"
  7372.   4. "baz"
  7373.  
  7374. OK, so now back to the problem at hand.  Note that:
  7375.  
  7376.   define mtake take
  7377.   mtake filename arg1 arg2 ...
  7378.  
  7379. allows \%0..9 to be saved and restored.  But it also shifts the arguments
  7380. to the right: once inside the command file, \%1 is the filename, \%2 is
  7381. arg1, etc.  This can be partially corrected by defining MTAKE as follows:
  7382.  
  7383.   define mtake {
  7384.      local \%f \%i
  7385.      assign \%f \fcontents(\%1)
  7386.      for \%i 1 \v(argc)-2 1 {
  7387.        assign \&_[\%i] \&_[\%i+1]
  7388.        if < \%i 10 _assign \\%\%i \&_[\%i]
  7389.      }
  7390.      take \%f
  7391.   }
  7392.  
  7393. This works fine except it does not (can not) adjust \v(argc).  Two solutions
  7394. spring to mind: (a) add a SHIFT command to shift all the args to the left one
  7395. position (and also move \&_[10] to \%9), adjusting \v(argc) (and \%*) in the
  7396. process, or (b) add a built-in MTAKE command.  (a) seems more generally
  7397. useful so let's give it a shot...
  7398.  
  7399. Added SHIFT [ n ] command.  ckuusr.[ch], 5 Nov 98.
  7400.  
  7401. Added doshift(n) routine.  First top-level \&_[] vector.  Then top-level
  7402. globals.  Almost got it working, but ran out of time.  Will try to finish
  7403. tomorrow.  ckuus5.c, 5 Nov 98.
  7404.  
  7405. Fixed doshift(), ckuus5.c, 6 Nov 98.  Now MTAKE can be defined as follows:
  7406.  
  7407.   define mtake {
  7408.      local \%f
  7409.      assign \%f \fcontents(\%1)
  7410.      shift
  7411.      take \%f
  7412.   }
  7413.  
  7414. and it works.  Still need to (a) handle \%* (might not be possible), and
  7415. (b) document all this.  Also think about adding MTAKE as a built-in command.
  7416.  
  7417. Updates to ckubwr.txt based on recent reports.  6 Nov 98.
  7418.  
  7419. Some network-related changes from Jeff, mostly in ckcnet.c.  9 Nov 98.
  7420.  
  7421. Added HELP SHIFT.  ckuus2.c, 9 Nov 98.
  7422.  
  7423. SET CLEARCHANNEL OFF had no effect if the other Kermit wanted to negotiate
  7424. clearchannel.  Fixed in spar(), ckcfns.c, 9 Nov 98.
  7425.  
  7426. Made SET PREFIXING ALL or CAUTIOUS automatically also SET CLEARCHANNEL OFF.
  7427. ckcmai.c, 9 Nov 98.
  7428.  
  7429. Added *.lzh to binary types.  ckcmai.c, 10 Nov 98.
  7430.  
  7431. DIAL and LOOKUP did not recognize internal PBX numbers if PBX-EXCH and PBX-IN
  7432. are set, but PBX-OUT is not set.  No big deal, but confusing.  So now it is
  7433. possible to handle a PBX that does not require an outside prefix (in case
  7434. there is any such thing).  Fixed in dncvt(): ckuus6.c, 10 Nov 98.
  7435.  
  7436. Loading of dial parameters from environment variables at startup had K_PBX_OCP
  7437. and K_PBX_XCH mixed up.  Fixed in ckudia.c, 10 Nov 98.
  7438.  
  7439. SET DIAL PBX-EXCHANGE allowed only one exchange to be specified.  But some
  7440. PBXs have more than one (e.g. 853-xxxx and 854-xxxx).  Changed dialpxx from a
  7441. scalar to an array; changed SET DIAL PBX-EXCHANGE command to load the array,
  7442. and all code that refers to dialpxx to treat it as an array.  Also changed
  7443. startup code to load the array from K_PBX_XCH, which now can be defined as a
  7444. series of numbers.  ckudia.c, ckuus[346].c, 10 Nov 98.
  7445.  
  7446. But there is still only one PBX-INSIDE-PREFIX.  So we need a way of deriving
  7447. the inside prefix dynamically from the exchange that was matched, e.g.:
  7448.  
  7449.  SET DIAL PBX-INSIDE-PREFIX \fsubstr(xxx,3,1)
  7450.  
  7451. where xxx is some new variable to stand for "the PBX exchange that was
  7452. matched", whose evaluation is delayed until dial string processing, similar
  7453. to the \v(filename) variable used in SEND and RECEIVE commands.
  7454.  
  7455. Defined VN_D_PXX for this new variable, and named it \v(d$px).  Changed
  7456. parsing of SET DIAL PBX-INSIDE PREFIX to not evaluate its operand if it is a
  7457. function call (i.e. starts with "\f") or if it *is* the new variable.  Changed
  7458. dial string processing to evaluate the PBX inside prefix at dial time, after
  7459. matching one of the PBX exchanges.  Works great:
  7460.  
  7461.   set dial pbx-out  93,
  7462.   set dial pbx-exch 853 854
  7463.   set dial pbx-in \fright(\v(d$px),1)
  7464.   lookup +1 (212) 854-9876 ; gives 4-9876
  7465.   lookup +1 (212) 853-1234 ; gives 3-1234
  7466.   lookup +1 (212) 765-4321 ; gives 93,765-4321
  7467.   lookup +1 (333) 765-4321 ; gives 93,1333765-4321
  7468.  
  7469. Also checked that SET DIAL LC-PREFIX works right (I had a report that it was
  7470. broken around the end of May -- it applied itself to long-distance, rather
  7471. than local, calls).  It seems to be fine now; I must have fixed it:
  7472.  
  7473.   set dial lc-prefix 8,
  7474.   set dial pbx-out  93,
  7475.   set dial pbx-exch 853 854
  7476.   set dial pbx-in \fright(\v(d$px),1)
  7477.   lookup +1 (212) 854-9876 ; gives 4-9876
  7478.   lookup +1 (212) 853-1234 ; gives 3-1234
  7479.   lookup +1 (212) 765-4321 ; gives 93,8,765-4321
  7480.   lookup +1 (333) 765-4321 ; gives 93,1333765-4321
  7481.  
  7482. ckuus[346].c, 10 Nov 98.
  7483.  
  7484. Change from Jeff for SET LOGIN PASS vs quoting.  ckuus3.c, 11 Nov 98.
  7485.  
  7486. Added "set file character-set cp1252" as a synonym for "set file character-set
  7487. latin1".  As far as Kermit file transfer is concerned, they are the same.
  7488. The same can not be said, however, for the other Windows 12xx code pages.
  7489. ckuxla.c, 11 Nov 98.
  7490.  
  7491. Added CP855 as a file character-set, including invertible tables from
  7492. CP855 to Latin/Cyrillic and back.  Ditto for Windows CP1251. ckuxla.[ch],
  7493. 11 Nov 98.
  7494.  
  7495. Changed "cp856" keyword to "bulgaria-pc".  ckouni.c, 11 Nov 98.
  7496.  
  7497. Added "bulgaria-pc" as a file character set.  The only meaningful (and
  7498. invertible) translations are between it and Latin/Cyrillic.  This is the PC
  7499. code page known in Bulgaria as CP856, but we don't call it that because the
  7500. real CP856 is something totally different (a Hebrew code page).  ckuxla.[ch],
  7501. 11 Nov 98.
  7502.  
  7503. Added CP1250 (Windows Latin 2) as a file character set, with an invertible
  7504. translation to Latin-2 and back.  ckuxla.[ch], 12 Nov 98.
  7505.  
  7506. Added Polish Mazovia PC Code Page as a file character set.  Translation tables
  7507. filled in provisionally, pending confirmation from Poland.  Not invertible.
  7508. ckuxla.[ch], 12 Nov 98.
  7509.  
  7510. Added some #ifdefs to allow building with -DNOLATIN2.  Verified all is OK with
  7511. with -DNOCYRIL &/or -DNOLATIN2.  ckuxla.h, 12 Nov 98.
  7512.  
  7513. Changes from Jeff: CKXPRINTF vs curses in ckuusx.c, some casts added in
  7514. ckcnet.c, 13 Nov 98.
  7515.  
  7516. Added &S0 (DSR on always) to USR init string for SunOS 4.x -- it doesn't work
  7517. without it, due to some strange peculiarity of the driver.  Solaris works
  7518. without it, other modems work without it on SunOS.  Go figure.  (Note: I used
  7519. to have &S0 in ALL init strings that supported it but removed it after
  7520. numerous sysadmins complained that Kermit should not mess with it.)  ckudia.c,
  7521. 13 Nov 98.
  7522.  
  7523. In cmcvtdate(),    "if (dbuf[8] = SP) dbuf[8] = '0';" was supposed to have "=="
  7524. in the if condition.  Fixed in ckucmd.c, 13 Nov 98.
  7525.  
  7526. For IRIX 6.5: added IRIX65 symbol to ckcdeb.h and ckuver.h, plus new makefile
  7527. entry.  13 Nov 98.
  7528.  
  7529. Missing "int" added to assorted extern declarations.  ckuus[6x].c, 13 Nov 98.
  7530.  
  7531. extern int stchr in ttinl() should have been extern CHAR.  ckutio.c, 13 Nov 98.
  7532.  
  7533. Back to mid-September work on UUCP lockfiles versus symlink'd devices, in
  7534. which we create a lockfile for both the symlink name and the real name, e.g.
  7535. /dev/modem and /dev/ttyS0, which works fine.  But what if the symlink points
  7536. to a device of the same name but in a different directory?  Example:
  7537. /dev/ttyd2 => /hw/ttys/ttyd2 (in IRIX 6.5).  Both lockfiles have the same
  7538. name (in this case LCK..ttyd2).  The device is opened OK, but at close time
  7539. when we go to delete the lockfiles, we get an error because deleting the first
  7540. one also makes the second one disappear (since they are the same).  Fixed
  7541. by adding a check for this to ttlock().  ckutio.c, 13 Nov 98.
  7542.  
  7543. Added a rather elaborate set of #ifdefs to account for the facts that: (a)
  7544. utmp.h might or might not define a ut_host[] member; (b) utmpx.h, which does
  7545. define one, might or might not be available; and (c) if utmpx.h is used
  7546. instead of utmp.h, then it has a struct timeval ut_tv member rather than a
  7547. scalar ut_time member.  This allows compilation on Linux and SunOS, in which
  7548. ut_host[] is in utmp.h, as well as on Solaris, IRIX, Unixware, and HP-UX,
  7549. which have utmpx.h, and on platforms that have a utmp.h that does not define
  7550. ut_host[], and no utmpx.h.  ckufio.c, 13 Nov 98.
  7551.  
  7552. Added Mazovia as a terminal character set to K95.  ckouni.[ch], 13 Nov 98.
  7553.  
  7554. Converted ckouni.[ch] for compilation by non-ANSIC compilers and cleaned up
  7555. formatting, long lines, etc.  NOTE: There is some funniness in the
  7556. ucs2_to_utf8() function.  Its ucs2 argument is USHORT, but there is a series
  7557. of comparisons of it with numbers like 0x10000, 0x200000, 0x4000000, which
  7558. will always fail, so why are they there?  Also note that 0xnnnnUL is not
  7559. supported for non-ANSIC compiles, but then I'm not quite sure how to specify
  7560. an unsigned long constant whose high-order bit is 1.  Anyway, the changes to
  7561. ckouni.c are rather massive, so thorough testing is needed.  13 Nov 98.
  7562.  
  7563. this paves the way for moving file-transfer charset translation to the Unicode
  7564. base if we decide to go that route.  However, there will still be some
  7565. wrinkles:
  7566.  
  7567.  . It will involve a three-step process: x -> Unicode -> y, whereas now we
  7568.    generally have only 2 steps (file <=> xfer charset).
  7569.  
  7570.  . ckouni.o is more than 3 times bigger than ckuxla.o, and the functions
  7571.    are a lot more expensive to call, some of them involving long switch
  7572.    statements.
  7573.  
  7574.  . The translations in ckuxla.c have evolved over time to meet users' needs.
  7575.    Some are invertible, some are not (so as to be readable).
  7576.  
  7577.  . ckouni.c does not support language-specific transliterations (such as
  7578.    u-umlaut => ue when converting Latin-1 to ASCII with SET LANGUAGE GERMAN).
  7579.  
  7580. Added support for 153600 and 307200 bps serial speeds, which are supported
  7581. (at least) in Solaris 2.5.1.  ckutio.c, 13 Nov 98.
  7582.  
  7583. From Jeff: make "sh" an abbreviation for SHOW (because of new conflict with
  7584. SHIFT); some TLS refinements.  ckuusr.c, ckcnet.c, 17 Nov 98.
  7585.  
  7586. Made the "Show what?" message a bit more helpful.  ckuus4.c, 17 Nov 98.
  7587.  
  7588. Added new makefile entry for UnixWare 7.0.1 and built it there OK.  makefile,
  7589. ckuver.h, 17 Nov 98.  Makes Telnet connections OK, transfers files over them.
  7590. Other tests from ckuins.txt Section 7 passed OK, except no way to test serial
  7591. comms, modems & dialing.  Also made a unixware7g entry (for gcc) but it fails
  7592. miserably.  I can't tell why, but it appears to have something to do with the
  7593. UNIX macro -- gcc seems to undefine it for some reason, so #ifdef UNIX clauses
  7594. are not executed (e.g. MAXFCSETS is not defined, which I think could only
  7595. happen if an #ifdef UNIX clause was skipped).
  7596.  
  7597. UnixWare builds only support speeds up to 38400.  No Bnnnn symbols are defined
  7598. for them.  Instead, we are supposed to use tcsetspeed(), giving it a long
  7599. representing the desired speed in bps.  But (a) this requires a POSIX build,
  7600. which fails rather badly; (b) there is, at present, no tcsetspeed() code in
  7601. ckutio.c; and (c) how are we supposed to get the list of supported speeds?
  7602.  
  7603. Discovered that "make sco32v504net KFLAGS=-DNOGETUSERSHELL" works OK on
  7604. UnixWare 7.  But it still doesn't give us the high serial speeds.
  7605.  
  7606. So let's try adding -DPOSIX to the unixware7 make.  Lots of complaints about
  7607. tv_sec, timeval, etc, so added #ifdefs for UW7 to #include <sys/time.h>.  But
  7608. this doesn't help because of the fascist clauses to prevent struct timeval
  7609. from being defined in a POSIX build (see earlier notes about SCO OSR5 on the
  7610. same topic).  So now we define the struct ourselves if time.h didn't (luckily
  7611. UW7 also defines a macro to indicate it has defined the struct).  Ditto for
  7612. struct timezone.  Now it compiles OK, but still lacks serial speeds > 38400.
  7613.  
  7614. Meanwhile, the same <sys/time.h> treatment is needed for the network module
  7615. too.  ckcnet.c, 17 Nov 98.
  7616.  
  7617. Added a tcgetspeed() / tcsetspeed() interface to ttgspd() and ttsspd(), and
  7618. then in this case had ttdpdlist() return a hardwired list of all possible
  7619. speeds up to 900K, and let the OS complain at runtime if a speed is not
  7620. supported.  Now we get:
  7621.  
  7622. UX:acomp: ERROR: "ckutio.c", line 5620: undefined symbol: TCS_ALL
  7623. UX:acomp: ERROR: "ckutio.c", line 6045: undefined symbol: TCS_OUT
  7624.  
  7625. These are the function codes for tc[gs]etspeed().  But "cd /usr/include ; grep
  7626. TCS_ *.h sys/*.h" turns up no definitions for these symbols anywhere.  For
  7627. that matter, tcsetspeed() is not defined in POSIX.1, nor can I find any
  7628. reference to it on any other POSIX-based system I have access to, or on the
  7629. web, or anywhere else.  So it must be a UnixWareism.  Fine, let's guess at the
  7630. TCS_* values, say 3 2 1?  Compiles OK, doesn't work.  Try 2 1 0, now it works.
  7631. However, since we can't use the Bnnnn symbols to build a legal-speed list,
  7632. I had to build a hardwired list, containing all the speeds I ever heard of.
  7633. ckutio.c, 17 Nov 98.
  7634.  
  7635. Now that we can run it, trial and error shows the following speeds are
  7636. supported:
  7637.  
  7638.  110     1200    150     19200   2400    300     4800    57600   76800
  7639.  115200  14400   1800    200     28800   38400   50      600     9600
  7640.  
  7641. So I commented the others out of the hardwired list.  ttspdlist(): ckutio.c,
  7642. 17 Nov 98.
  7643.  
  7644. The ttget/setspeed() interface is enabled if USETCSETSPEED is defined, which
  7645. is currently the case only for UW7.  These functions do not exist in earlier
  7646. versions of UnixWare, so there is no point converting them to POSIX.
  7647.  
  7648. Finalized unixware7 makefile target to include -DPOSIX and use the xermit
  7649. target for select-based, rather than fork-based, CONNECT.  Also added a short
  7650. name for it: "make uw7".  makefile, 17 Nov 98.
  7651.  
  7652. After all that work on tcget/setspeed(), it looks like it only APPEARS to
  7653. work, but in fact does nothing at all.  tcsetspeed() says it succeeds, and a
  7654. subsequent tcgetspeed() shows the speed that was just set, but the speed does
  7655. not change.  I verified this by assigning a line (whose nominal speed was 9600
  7656. bps), changing the speed to 57600, and transferring a precompressed file over
  7657. various modem connections: 14400, 24000, ...  In every case, the throughput
  7658. was 900 cps.  So I rebuilt the non-POSIX version, set the serial port speed to
  7659. 38400 (the max for this build) and got 1600 cps throughput.  Thus, the old
  7660. speed-setting API works (but only up to 38400) and tcsetspeed() is a cruel
  7661. hoax.
  7662.  
  7663. Or is it?  Maybe I guessed the TCS_* values wrong.  Let's try a different set;
  7664. TCS_ALL = 0 (the only one we use).  Aha, that does it.  Now I get transfer
  7665. rates of 2700 cps over a 24000 bps connection (same precompressed file).  As
  7666. further confirmation, the initial transfer rate is about 5700 cps while the
  7667. modem buffers stuff up (== the interface speed of 57600) and then decays to
  7668. 2700 once the pipe is full.  So yay, speed setting works.  (As additional
  7669. confirmation, everything falls apart at 115200 bps due to the PC's crummy
  7670. UART.)
  7671.  
  7672. But modem signals, carrier detection, etc, do not work.  Same reason: POSIX
  7673. builds deselect the TIOCMGET definition from <sys/termios.h>.  So we use the
  7674. same trick here as in OSR5 -- define it ourselves.  But that's not enough --
  7675. we also have to define all the TIOCM_xx symbols for each modem signal, since
  7676. those definitions, too, are hidden from POSIX.  ckutio.c, 18 Nov 98.
  7677.  
  7678. Ensured that "make unixware2" still works.
  7679.  
  7680. Added code to allow user to SET SPEED to any number at all, even if it is not
  7681. in the keyword table, if USETCSETSPEED is defined.  As it stands, the user
  7682. gets a parse error message, but the request still goes through and succeeds or
  7683. fails based on whether the OS accepts the speed.  ckuus3.c, 18 Nov 98.
  7684.  
  7685. Built on QNX 4.24.  Needs -DNOGETUSERSHELL, and does not have initgroups().
  7686. wtmp log is /var/adm/wtmp.1.  <utmp.h> has no ut_host[] and there is no
  7687. <utmpx.h>.  32-bit and 16-bit versions OK.  ckufio.c, makefile, 18 Nov 98.
  7688.  
  7689. Now on to IRIX 6.5.1 on the Origin:
  7690.  
  7691.   System: SGI Origin 200, 2xR10000 180MHz
  7692.   OpeSys: SGI IRIX 6.5.1 + Patches
  7693.   Memory: 256 MB
  7694.   DiskSp: 15.8 GB
  7695.  
  7696. Builds and runs fine.  Speeds up to 115200 supported, but there's no way to
  7697. test if they actually work.  Noted that the Indy can run the Origin binary
  7698. and vice versa, good.  No changes needed.
  7699.  
  7700. Fix from Jeff for a problem that causes "set host *" to loop, eating up CPU
  7701. time, till the connection comes in.  Built the result on HP-UX 10.20, since
  7702. that's where the looping problem was reported.  Checked against C-Kermit 6.0,
  7703. which makes the CPU lights come on solid, and rises rapidly to the top of
  7704. "top", consuming 95% of the CPU.  The fixed version does not make the lights
  7705. come on, and after a minute or two "top" says it uses 0% of the CPU.
  7706. ckcnet.c, 18 Nov 98.
  7707.  
  7708. Added a missing #ifndef NOHELP clause in ckuusy.c, 18 Nov 98.
  7709.  
  7710. Added some missing #ifdef TNCODE's in ckuus4.c so it could be built with
  7711. no network support.  18 Nov 98.  (STILL NEEDS FIXING ON VMS)
  7712.  
  7713. Added -DNDSYSERRLIST to OpenBSD makefile target.  19 Nov 98.
  7714.  
  7715. Added a solaris7g makefile entry to build on Solaris 7 with gcc.  It works
  7716. fine, except for some warnings from curses.h about redefinitions of items
  7717. that C-Kermit doesn't use (getwc, putwc, getwchar, putwchar).  This makes a
  7718. 32-bit version (sizeof int = sizeof long = 4), since gcc doesn't know how to
  7719. make a 64-bit one.  It makes Telnet connections OK and transfers files over
  7720. them OK.  When dialed in to a Sun serial port, file transfer is a bit flaky
  7721. when sending files out (but this particular machine is known to have flaky
  7722. serial ports).  Makefile, 19 Nov 98.
  7723.  
  7724. Added a couple more missing #ifdefs to allow linking after compilation without
  7725. network supportk.  ckcmai.c, ckuus4.c, 19 Nov 98.
  7726.  
  7727. Changed password argument to zvpass() and kpass() from "passwd" to "p", since
  7728. passwd conflicts with a struct name, which is fatal in some builds.  ckufio.c,
  7729. 19 Nov 98.
  7730.  
  7731. Added #ifdefs to protect all the new gettimeofday() calls from having 2 args
  7732. in Motorola System V/88 R4.  ckutio.c, 19 Nov 98.
  7733.  
  7734. Built OK on VMS 5.5 with NONET and with UCX 2.0.  19 Nov 98.
  7735.  
  7736. While running thru the ckuins.txt testing instructions, I discovered that
  7737. ?-help doesn't work in a filename after SEND, e.g. "send *?".  This took a
  7738. good bit of sleuthing but eventually I fixed with apparently no ill effects.
  7739. gtword(): ckucmd.c, 19 Nov 98.
  7740.  
  7741. Changed FAST macro definition for IRIX65 to not restrict send packets to
  7742. 4000 bytes, since this version does not have the Telnet server bug noted in
  7743. IRIX 6.2 and earlier.  ckuus5.c, 19 Nov 98.
  7744.  
  7745. Added MAINTYPE symbol, which can be defined on the CC command line to answer
  7746. complaints about "main: return type is not blah".  ckcmai.c, 20 Nov 98.
  7747.  
  7748. Added a note about MAINTYPE to the openbsd makefile entry, pending
  7749. verification.  20 Nov 98.
  7750.  
  7751. From Jeff: Symbols and keywords added for VT220PC and VT320PC terminal types.
  7752. ckuusr.h, ckuus[57].c, 23 Nov 98.
  7753.  
  7754. Changed zvpass(), after authenticating the user, to always use setuid() and
  7755. setgid(), rather than set[r]e{u,g}id().  This eliminates a lot of #ifdefs
  7756. and it's what we want: once we establish ourselves as the authenticated user,
  7757. we do not need or want any possibility of switching back to root.
  7758. ckufio.c, 23 Nov 98.
  7759.  
  7760. Readjusted MAINTYPE to take precedence over all other declarations.
  7761. ckcmai.c, 23 Nov 98.
  7762.  
  7763. Made #ifdefs around main() declaration in wart agree with those in kermit,
  7764. including MAINTYPE.  ckwart.c, 23 Nov 98.
  7765.  
  7766. Added symbol HWPARITY and parsing for "hardware parity" (8 data bits plus
  7767. parity generated by system / driver / hardware outside Kermit).  Defined
  7768. HWPARITY for SVORPOSIX.  Builds OK (e.g. on SunOS) where HWPARITY not defined,
  7769. and also on Solaris, where it is.  ckcdeb.h, ckcmai.c, ckuus[34].c, 23 Nov 98.
  7770. Will fill in the action code tomorrow...
  7771.  
  7772. Fixed some #ifdefs to allow successful compilation and linking with -DNOLOGIN.
  7773. ckuus5,c, cku[ft]io.c, 24 Nov 98.  Builds OK now on Motorola SV88R4.0 and
  7774. SV68R3.6.  Also on Solaris 2.6 Intel.
  7775.  
  7776. Back to hardware parity.  UNIX APIs do not offer any way to set mark or space
  7777. parity.  So... SET PARITY HARDWARE { EVEN, ODD }.  If some other platforms
  7778. have APIs for 8M or 8S we can add them later.  This setting takes effect only
  7779. on SET LINE devices, not on network connections and not in remote mode.
  7780.  
  7781. Added SET STOP-BITS { 1, 2 }, only if HWPARITY is defined.  ckuusr.[ch],
  7782. ckuus[23].c, ckutio.c, 24 Nov 98.
  7783.  
  7784. For convenience and familiarity, added SET SERIAL { 7E1,7E2,...8N1,8E2,... }.
  7785. Any choice with 2 stop bits or 8 data bits + parity is available only if
  7786. HWPARITY is defined.  ckuusr.[ch], ckuus3.c, ckutio.c, 24 Nov 98.
  7787.  
  7788. Updated SHOW COMM to display new parity settings, stop bits, etc.
  7789. ckuus4.c, 24-25 Nov 98.
  7790.  
  7791. Discovered that ckucns.c, unlike ckucon.c, failed to assign the \v(trigger)
  7792. value when a TERM TRIGGER was encountered.  Fixed in ckucns.c, 25 Nov 98.
  7793.  
  7794. Discovered that both ckucns.c and ckucon.c failed to reset the \v(trigger)
  7795. value upon entry to CONNECT, so a subsequent exit could still show a previous
  7796. trigger value.  Fixed in both, 25 Nov 98.
  7797.  
  7798. Changed the LOG command to allow logging to pipes.  Very handy.  See Section
  7799. 1.13 of ckermit2.txt.  ckuus4.c, 25 Nov 98.
  7800.  
  7801. Added transparent printing within #ifdef XPRINT, 25-26 Nov 98:
  7802.  . UNIX only, and then only in the ckucns.c module.
  7803.  . SET TERM PRINT { ON, OFF }: ckuusr.h, ckuus7.c.
  7804.  . Added to SHOW TERM.  ckuus5.c.
  7805.  . Documented in ckermit2.txt Section 3.3.
  7806. Much fancy footwork required to pass all material through transparently,
  7807. but not pass the start-printer or stop-printer sequences to the printer.
  7808.  
  7809. Changed most UNIX makefile targets from wermit to xermit, to use the new
  7810. select()-based CONNECT module, which has much new stuff in it that ckucon.c
  7811. does not have.  In general, I changed every entry that has -DTCPSOCKET to the
  7812. xermit target unless it was really old and I hadn't heard anything about it in
  7813. many years.  makefile, 26 Nov 98.
  7814.  
  7815. Added HELP text for recent commands.  ckuus2.c, 26 Nov 98.
  7816.  
  7817. If DIAL RETRIES was not set explicitly, then at DIAL time use a retry limit
  7818. based on the local country code.  Currently, this is 10 for country code 1
  7819. and 1 for all others.  This can be expanded as I get info about other
  7820. countries.  ckuus[346].c, 26 Nov 98.
  7821.  
  7822. Added SET CLOSE-ON-DISCONNECT { ON, OFF }.  If ON, it means that if we notice
  7823. that a serial connection is disconnected (because CD went off), we close the
  7824. device immediately.  This releases it for use by others (e.g. removing the
  7825. lockfile in UNIX).  OFF by default, for consistency with previous releases.
  7826. Supporting code needs to be added for K95; it goes in ttchk() -- see example
  7827. in ckutio.c (search for "clsondisc").  ckcmai.c, ckuus[r234].c, ck[uv]tio.c,
  7828. 26 Nov 98.
  7829.  
  7830. #ifdef adjustments to allow building with different features deselected:
  7831. many, many modules.  26 Nov 98.  Examples (on SunOS 4.1.3):
  7832.  
  7833.  Full:                1155072
  7834.  -DNOIKSD             1146880
  7835.  -DNOLOGIN:           1138688
  7836.  -DNOPUSH             1122304
  7837.  -DNOSPL               999424
  7838.  -DNOLOCAL:            884736
  7839.  -DNOLOCAL -DNOLOGIN   819200
  7840.  sunos41mi:            335872
  7841.  sunos41m:             212992
  7842.  
  7843. Don't let "close connection" fall through if clsconnx() returns an unexpected
  7844. value.  ckuusr.c, 27 Nov 98.
  7845.  
  7846. Added MANUAL command, which in UNIX runs the "man" command, default topic
  7847. "kermit".  In VMS it runs the "help" command, default topic "kermit".  For K95,
  7848. I wrote code to parse chapter names and then to run SE on:
  7849.  
  7850.   file:///<startupdir>/DOCS/manual/kermit95.htm#<chapter>
  7851.  
  7852. but have no way to compile or test, needs fixing.  ckuusr.[ch], 29 Nov 98.
  7853.  
  7854. Added a reference to the MANUAL command to the main HELP screen.  ckuus2.c,
  7855. 29 Nov 98.
  7856.  
  7857. Changed HANGUP command to also call ttchk().  This way, if the HANGUP command
  7858. forced a serial connection to close (and carrier to drop), this engages the
  7859. SET CLOSE-ON-DISCONNECT code.  ckuusr.c, 29 Nov 98.
  7860.  
  7861. Added support for 75/1200 bps split speed for Unixware 7.  Untested.
  7862. ckutio.c, 29 Nov 98.
  7863.  
  7864. Added missing sections to ckermit2.txt: SET [ SERVER ] CD-MESSAGE, SET FILE
  7865. PATTERNS AUTO, SET COMMAND AUTODOWNLOAD, LATIN-9, TYPE /PAGE, and RESET, plus
  7866. COPY command improvements.  29-30 Nov 98.
  7867.  
  7868. Fixed 75/1200 support after testing revealed it didn't work.  ckutio.c,
  7869. ckuus5.c, 30 Nov 98.
  7870.  
  7871. Built on Red Hat Linux 5.2. Needed -lcrypt added to LIBS.  makefile,
  7872. 30 Nov 98.
  7873.  
  7874. Linux version could not access modem signals.  Got help from Ted Ts'o and
  7875. Gert Doering, now it works.  SHOW COMM shows them, CONNECT mode pops back to
  7876. command prompt automatically when carrier drops, etc.  ckutio.c, 1 Dec 98.
  7877.  
  7878. Built Linux C-Kermit with egcs 1.0.3 on Red Hat 5.2.  Added linuxegcs makefile
  7879. entry.  makefile, 1 Dec 98.
  7880.  
  7881. Also checked linuxs entry (static linking) -- works, makes a 2.2MB executable
  7882. (compared to 914K with dynamic linking).
  7883.  
  7884. Made FAST the default for UNIX and VMS (it already was the default in K95);
  7885. let's see who hollers.  ckcmai.c, ckcker.h, ckuus[5h].c, 1 Dec 98.
  7886.  
  7887. Added SOCKS5 support from Ric Anderson.  ckcdeb.h, ckcnet.[ch], ckuus5.c,
  7888. 1 Dec 98.
  7889.  
  7890. Fixed the MANUAL command to account for NOPUSH/nopush.  ckuus[r2].c, 1 Dec 98.
  7891.  
  7892. Supplied missing RMKDIR command.  ckuusr.c, 1 Dec 98.
  7893.  
  7894. Verified IKSD on Red Hat 5.2 Linux 2.1.125.  All is OK except, like SunOS,
  7895. it has the syslog-vs-chroot bug.  See notes from 30 Aug 98.
  7896.  
  7897. Moved annoying error messages from REDIRECT parsing to after confirmation, so
  7898. we can use command recall.  This should also be done for any other commands
  7899. that issue error messages and fail in mid-parse for non-syntactic reasons.
  7900. ckuusr.c, 1 Dec 98.
  7901.  
  7902. New & improved HP-UX makefile entries from Peter Eichhorn.  2 Dec 98.
  7903.  
  7904. Confirmation from Piet Vloet at Siemens Austria that 8 bits + parity work OK
  7905. on Solaris.  2 Dec 98.
  7906.  
  7907. kermit -y filename was broken, more fallout from the "call prescan() twice"
  7908. business (see notes from 22 Aug), this time because of the argument that was
  7909. added that made it skip some things.  I just put it all back to the way it was
  7910. prior to 19 July and it seems to work OK (the notes don't shed any light, but
  7911. probably the changes were made for some reason specific to K95, so proper
  7912. prescan() operation should be rechecked there).  ckuus4.c, 2 Dec 98.
  7913.  
  7914. Added a bunch of missing commas separating help-text lines.  ckuus2.c,
  7915. 2 Dec 98.
  7916.  
  7917. Removed now-inappropriate #ifdef NETCONN from extern int ttnproto in ckudia.c,
  7918. 2 Dec 98.
  7919.  
  7920. Added -DNOGETUSERSHELL to all HP-UX entries prior to 8.00.  makefile, 2 Dec 98.
  7921.  
  7922. SCO OSR5, and therefore probably all earlier versions, get unresolved
  7923. references to "std_syslog" and "openlog" at link time.  Builds OK only with
  7924. -DNOSYSLOG.  Added -DNOGETUSERSHELL and -DNOSYSLOG to SCO OSR5 entries, and
  7925. -DNOIKSD to all the other SCO entries (except Unixware).  makefile, 2 Dec 98.
  7926.  
  7927. Added appropriate #includes for select() to ckucns.c, needed at least for QNX.
  7928. ckucns.c, 2 Dec 98.
  7929.  
  7930. Built on dozens of platforms, made numerous adjustments to #ifdefs and
  7931. declarations.  2 Dec 98.
  7932.  
  7933. Added -DNOIKSD to HP-UX 5.x entry.  Makefile, 3 Dec 98.
  7934.  
  7935. Fixed a bug in which "run blah\fxxx" (RUN any-string-with-\f-in-it) would
  7936. hang.  The problem turned out to be that the RUN command parser always
  7937. returned -1 if cmtxt failed, rather than returning cmtxt's return code.
  7938. ckuusr.c, 3 Dec 98.
  7939.  
  7940. Fixed a longstanding bug in the BSDI version, in which incoming file dates
  7941. were set in GMT rather than local time.  It seems in 4.4BSD, localtime() does
  7942. not return the local time, but rather Zero Meridian (Zulu) time (GMT), and
  7943. must be adjusted by the tm_gmtoff value.  ckcdeb.h, ckufio.c, 3 Dec 98.
  7944.  
  7945. It turns out the same bug also affected FreeBSD, so I'm assuming it also
  7946. applies to all other 4.4BSD derivatives, and so made the previous change be
  7947. #ifdef BSD44.  Tested OK in FreeBSD 2.2.7 and BSDI 3.1.  ckufio.c, 3 Dec 98.
  7948.  
  7949. After getting "man" to work on SCO 3.2v5.0.5, I discovered that -lsocket is
  7950. required there to make syslog() work.  Added -DSYSLOG to the sco32v5*net*
  7951. entries, which already were linking with libsocket.  Added a separate set of
  7952. entries for SCO 3.2v5.05.  ckcdeb.h, ckuver.h, makefile, 3 Dec 98.
  7953.  
  7954. Noticed that the SCO OSR5 version was sending uppercase filenames.  Started to
  7955. work on tracking it down, but now, just when it gets to the filename, it
  7956. crashes in the malloc() that is called from sfile().  There does not appear to
  7957. be anything wrong with this code, and the same code works fine on dozens of
  7958. other platforms.  malloc() is being passed an integer whose value is 1024.
  7959. Compiling with gcc rather than cc fixes the problem.  Not very satisfying,
  7960. though...  Keeping at it, I found that if I reworked the offending bit of code
  7961. and rebuilt with cc, the problem moved to another unrelated bit.  Finally I
  7962. tracked it down to a non-ANSI prototype for getcwd() in zgtdir().  Commenting
  7963. it out fixed everything.  So what other little time bombs are lurking
  7964. throughout the code?  (Lines that were perfectly harmless for years and years
  7965. can suddenly become fatal...)  ckufio.c, 3 Dec 98.
  7966.  
  7967. The problem with uppercase filenames comes from using "send /bin", and in fact
  7968. happens everywhere, not just on SCO.  It's because "send /bin" sets transfer
  7969. mode to manual and file type to binary, to force a binary transfer no matter
  7970. what.  But manual transfer mode means we don't automatically switch to literal
  7971. filenames when sending UNIX to UNIX.  Phooey.  This was fixed as follows:
  7972. previously, when we compared system types, we did so only if xfermode == auto.
  7973. If they match, we set the transfer mode to binary and file names literal.
  7974. Now we compare system types not only if xfermode == auto, but also if the
  7975. global (saved) g_xfermode == auto.  In this case, we set file names to literal
  7976. if they match, but we set the transfer mode to binary only if xfermode == auto,
  7977. i.e. if the *current* transfer mode is auto.  ckcfns.c, 3 Dec 98.
  7978.  
  7979. When using new C-Kermit on VMS to make a Telnet connection, it says: "tn_push
  7980. has not been defined. data loss!!!!" -- kinda scary...  Copied the le_blah()
  7981. code from UNIX to VMS, and enabled the le_puts() call for VMS in tn_push().
  7982. But it doesn't work very well -- there is a long pause at the beginning of the
  7983. connection, and then 10-20 lines of junk come out (but after that it's normal).
  7984. Apparently this much more difficult than I thought, mainly because in UNIX,
  7985. the same functions (ttinc(), ttxin(), etc) are used for both serial and
  7986. network connections, whereas in VMS, we call netinc(), netxin(), etc, for
  7987. network connections.  Put everything back the way it was.  We get the scary
  7988. message, and have to hit return before seeing a login: prompt, but after that
  7989. all is OK.  To be cont'd...
  7990.  
  7991. (Next day...)  It's worse than I thought.  The telnet local-echo buffer
  7992. business breaks the INPUT command on Telnet connections, even for the UNIX
  7993. version.
  7994.  
  7995. Fixed long lines in ckuath.c, ckuat2.c, and ckusig.c.  4 Dec 98.
  7996.  
  7997. Fixes from Jeff for INPUT vs local-echo buffer, plus a keyword-table size
  7998. error.  ckcnet.c, ckuus7.c, 8 Dec 98.
  7999.  
  8000. Changed hardwired references to uid_t and gid_t in the new authentication code
  8001. to UID_T and GID_T, which are portably defined in ckcdeb.h, to fix ckufio.c
  8002. compilation failure on HP-UX 6.5.  Also needed to add -DNOSYSLOG and -DNOSELECT
  8003. (because ckcdeb.h defines SELECT for all HPUX's, but it's not there prior to
  8004. 7.0 unless TCP/IP is installed).  makefile, ckufio.c, 8 Dec 98.
  8005.  
  8006. Fixed UNIXLOGIN macro to allow for the possibility that a login: prompt might
  8007. not appear.  Fixed NET macro to include "set login user" to disable sending
  8008. of user ID in Telnet negotiations.  ckermit.ini, 8 Dec 98.
  8009.  
  8010. All-day project: Got common source and makefile to build cleanly on both
  8011. Red Hat 5.2 Linux (glibc) and Slackware 3.5.0 (libc).  Of course the results
  8012. are still not binary compatible.  How could they be?  makefile, ckutio.c,
  8013. 8 Dec 98.
  8014.  
  8015. Removed all gratuitous prototypes for getcwd() from zgtdir().  Let's see
  8016. who complains.  ckufio.c, 8 Dec 98.
  8017.  
  8018. Almost everybody, of course.  Started the long, slow process of adding back
  8019. prototypes for those platforms that don't provide them: HP-UX 6.5, Motorola
  8020. SV68, etc.  This was handled in various ways -- including <unistd.h> in builds
  8021. where it wasn't included before, adding a new DCLGETCWD symbol to CFLAGS of
  8022. selected builds, and so on.  zgtdir() now has real _PROTOTYP's for getcwd()
  8023. rather than the non-ANSI hardwired ones, and all are in #ifdef
  8024. DCLGETCWD..#endif.  But since getcwd() prototypes involve size_t's, this too
  8025. needed an escape clause, so I made them all SIZE_T, which is defined by
  8026. default to be size_t in ckcdeb.h, but can be overridden on the command line
  8027. with -DSIZE_T=int or whatever.  makefile, ckufio.c, ckcdeb.h, 9 Dec 98.
  8028.  
  8029. Trying to get tn_push() & friends to work in VMS (cont'd from last week...)
  8030. Moved all the code that I had added to ckvtio.c to ckcnet.c, since, for
  8031. network connections, all of the ckvtio.c routines call their ckcnet.c cousins
  8032. anyway (ttinc() calls netinc(), etc).  The result works ok, except it is stuck
  8033. until the user hits the first key.  Killing a process stuck in this way that
  8034. had its debug log on reveals the hangup to be in contti(), which is back in
  8035. the ckvtio.c module I just moved all this code out of...  Added a(nother)
  8036. special hack to contti() to account for the local-echo buffer.  Arranged
  8037. ckcnet.[ch] so that TTLEBUF selects the external implementation of these
  8038. routines & buffers, and NETLEBUF selects the internal one.  Defined TTLEBUF
  8039. for UNIX and NETLEBUF for VMS.  ckcnet.[ch], ck[vu]tio.c, 9 Dec 98.
  8040.  
  8041. Defined TTLEBUF for AOS/VS and added the code to ckdtio.c (but, like the
  8042. initial VMS try, it still gets stuck at the very beginning).  9 Dec 98.
  8043.  
  8044. Numerous source-level adjustments for AOS/VS.  For example, if a module
  8045. contains "extern int blah;", the link step will fail if blah is not defined
  8046. anywhere, even if it is never used.  Many modules.  9 Dec 98.
  8047.  
  8048. SOCKOPT_T adjustments for AIX 4.2 & 4.3.  ckcnet.c, 9 Dec 98.
  8049.  
  8050. Changes from Jeff for hardware parity & stop bits for K95, plus other minor
  8051. code adjustments.  ckcdeb.h, ckuus[34].c, ckcnet.c, 10 Dec 98.
  8052.  
  8053. From Jeff: When an incoming TCP connection has dropped, don't listen for a
  8054. new one.  ckcnet.c, 10 Dec 98.
  8055.  
  8056. More adjustments for AOS/VS.  ckdcon.c, ckcpro.w, etc.  Now it links without
  8057. multiply defined or undefined symbol errors.  10 Dec 98.
  8058.  
  8059. Fixed the sticking problem in AOS/VS Telnet: there was a vestigial ttflui()
  8060. call in the AOS/VS version of ttpkt().  ckdtio.c, 10 Dec 98.
  8061.  
  8062. Increased compiler memory (-qmaxmem) from 6000 to 8000 for AIX 4.1 builds,
  8063. and to 10000 for AIX 4.2 and 4.3 (but this is still not enough for some
  8064. modules -- no big deal).  makefile, 10 Dec 98.
  8065.  
  8066. Adjusted #ifdefs for GETSOCKNAME_T, etc, to allow clean compilation on AIX
  8067. 4.3 & 4.2, since data types for various sockets library function args changed
  8068. between AIX 4.1 and 4.2.  ckcnet.c, 10 Dec 98.
  8069.  
  8070. Made SET SPEED command not complain because it's a network connection until
  8071. after confirmation (see note on REDIRECT, 1 Dec 98).  ckuus3.c, 10 Dec 98.
  8072.  
  8073. Problem: SET PORT blah, SET MODEM TYPE blah, DIAL blah.  Then SET HOST blah.
  8074. Now that we have a network connection, HANGUP still sends the modem hangup
  8075. sequence.  It *should* send this sequence if SET MODEM TYPE was given *after*
  8076. SET HOST (see p.126), but not if it was given before.  Code looks right --
  8077. setlin() leaves modem type negative upon exit.  Well, further testing reveals
  8078. problems go a lot deeper when we switch back & forth between serial and
  8079. network connections -- sometimes lockfiles were left behind, SET SPEED
  8080. commands would fail, etc.  The primary cause was the failure of (at least the
  8081. UNIX version of) ttopen() to unset the "it's a network connection" variable
  8082. in all cases when it opened a serial connection.  I also made another change,
  8083. namely that mdmhup() should call ttchk() before sending +++ATH0+++ to make
  8084. sure there is still a connection.  If there isn't, don't bother.  ckutio.c,
  8085. ckudia.c, 10 Dec 98.
  8086.  
  8087. Changes from Jeff for Postscript printer support in K95.  ckuusr.h, ckuus3.c,
  8088. 10 Dec 98.
  8089.  
  8090. Added SET DIAL MACRO command.  ckuusr.h, ckuus[36].c, ckudia.c, 11 Dec 98.
  8091.  
  8092. Added LOG CONNECTIONS command definitions, parsing, SHOWing.  Default
  8093. filename is CX.LOG in user's home directory, overridable by -DCXLOFGILE="xxx"
  8094. on cc command line, or, of course, in the LOG CONNECTIONS command itself.
  8095. ckcker.h, ckcdeb.h, ckuus[r456].c.  11 Dec 98.
  8096.  
  8097. Added code for writing to the connection log.  The main idea is to write log
  8098. records as reliably as possible without going into the system-dependent code,
  8099. thus avoiding the necessity to update dozens of modules, many of which can't
  8100. be tested.  When a connection is opened, a preliminary log record is written
  8101. to a buffer by the SET LINE or SET HOST code (this happens always, even if a
  8102. log is not open).  If it was a serial port, then if a DIAL command is given,
  8103. it overwrites the original record, adding the phone number info.  The trick is
  8104. to catch when the connection closes, so we can add the elapsed time to the
  8105. record and write it out to the log (I considered writing separate Open and
  8106. Close records, but people wouldn't like having to match them up).  We do this
  8107. in the following places:
  8108.  
  8109.  . The HANGUP command.
  8110.  . The clsconnx() (close connection) routine.
  8111.  . When the CONNECT command returns.
  8112.  . When INPUT senses connection loss
  8113.  . When the file-transfer protocol senses connection loss.
  8114.  . In the program exit sequence as a catch-all.
  8115.  
  8116. We avoid writing duplicate records by punching out the partial buffer after
  8117. writing a record.
  8118.  
  8119. Each record is a line of text; the format is:
  8120.  
  8121.   yyyymmdd hh:mm:ss username pid p=v [ p=v [ ... ] ]
  8122.  
  8123. where the timestamp shows when the connection was made; p's are parameters,
  8124. and v's are values:
  8125.   T = Connection Type (TCP, SERIAL, DIAL, DECNET, etc).
  8126.   H = Originating Host name.
  8127.   N = Destination Number or Network host name or address.
  8128.   D = Serial connections only: Device name.
  8129.   O = Dialed calls only: Originating country code & area code if known.
  8130.   E = Elapsed time.
  8131. Many modules, 13 Dec 98.
  8132.  
  8133. Fixed dial macro to (a) also apply to nonportable numbers, and (b) not apply
  8134. when user gives number starting with "=".  ckuus6.c, 14 Dec 98.
  8135.  
  8136. Connection logging, cont'd:
  8137.  . Flush connection-log writes to disk.
  8138.  . Added 2 new syslog levels: DIAL, and All Connections.
  8139.  . Added syslogging to dologend() routine.
  8140.  . Added a compile-time symbol to force syslogging of desired level.
  8141.  . Don't let user set syslogging > 5 (file reading).
  8142. Many modules, 14 Dec 98.
  8143.  
  8144. Added SHOW CONNECTION command to display current session (from partial log
  8145. record in memory), including elapsed time.  ckuusr.[ch], 14 Dec 98.
  8146.  
  8147. Added code to force syslogging if built with -DSYSLOGLEVEL=n.  This way
  8148. sysadmins can (e.g.) log all dialout calls by all users in syslog.  Various
  8149. modules.  14 Dec 98.
  8150.  
  8151. Syslogging is documented in iksd.txt and ckuins.txt.  The connection log is
  8152. documented in ckermit2.txt.
  8153.  
  8154. Recent changes to zgtdir() could result in core dumps if called when current
  8155. directory (or "..", etc) is unreadable.  Also went from getcwd() back to
  8156. getwd() in SunOS since getcwd() is implemented there via popen() calling the
  8157. shell to run pwd, which is gross and slow, and also prints unwanted messages
  8158. in the aforementioned case.  But getwd() is "deprecated" and not recognized by
  8159. POSIX so we avoid it elsewhere.  To force its use, add USE_GETWD to CFLAGS.
  8160. ckufio.c, 15 Dec 98.
  8161.  
  8162. Added /COMMAND, /BINARY, and /TEXT switches to TRANSMIT.  ckuus[r24].c,
  8163. ckufio.c, 15 Dec 98.
  8164.  
  8165. Made STATISTICS show streaming in window-slots field, like file-transfer
  8166. display does.  ckuus4.c, 15 Dec 98.
  8167.  
  8168. Bug: the dial interval, once interrupted by "pressing any key" goes to 0 once
  8169. (as it should) but then stays there for all subsequent redials.  Diagnosis:
  8170. conchk() reported the keystroke(), but coninc() was never called to read it.
  8171. Fixed in dodial(), ckuus6.c, 15 Dec 98.
  8172.  
  8173. It seems that on at least one PC somewhere in the world, ATS2=43 causes an
  8174. ERROR response from a Hayes-compatible modem (Dynalink 1456VQH).  But this
  8175. command is hardwired into the code for all AT-command-set modems; there is no
  8176. command to disable it.  Compensated for this by:
  8177.  
  8178.  1. If ATS2=nn gives an error code, we (a) print the message only if DIAL
  8179.     DISPLAY is on (rather than always), and (b) set MODEM HANGUP-METHOD to
  8180.     RS-232, since we do not know that we can make the modem escape back.
  8181.  
  8182.  2. SET MODEM ESCAPE-CHARACTER -1 (or any negative number) now disables the
  8183.     sending of the ATS2=nn command to the modem, and also sets MODEM
  8184.     HANGUP-METHOD to RS-232.
  8185.  
  8186. Note: this is a continuation of related changes from 9 Sep 98.  ckuus6.c,
  8187. ckudia.c, 15 Dec 98.
  8188.  
  8189. Researched high serial speed API in AIX 4.2/4.3.  Forget it, it's hopeless.
  8190. Documented what appears to be the method for "speed mapping" (which can be
  8191. done outside Kermit) in ckubwr.txt, AIX section.  15 Dec 98.
  8192.  
  8193. New MANUAL command for K95 from Jeff.  16 Dec 98.
  8194.  
  8195. Updated help text of LOG, CLOSE, and other commands.  ckuus2.c, 16 Dec 98.
  8196.  
  8197. Updated UNIX man page.  ckuker.cpp, 16 Dec 98.
  8198.  
  8199. Changed streaming to work automatically in the majority of cases, without
  8200. requiring the user to enable it.  RELIABLE has a new setting, AUTO, which is
  8201. the new default.  When RELIABLE is AUTO and the Kermit program that initiated
  8202. the connection requests streaming, which it does by default when STREAMING is
  8203. AUTO (which is also the default) if the connection is reliable (which it
  8204. knows, because it made the connection itself), now the remote Kermit accepts
  8205. without having to be told to SET RELIABLE ON.  It also offers always, which
  8206. should do no harm, since the offer won't be accepted if the local Kermit
  8207. doesn't also offer.  This concept will need some proving in the field!
  8208. ckcmai.c, ckcfn[s2].c, ckuus[23457].c, ckermit2.txt, 16 Dec 98.
  8209.  
  8210. Added missing RQUERY shortcut for REMOTE QUERY.  Also made QUERY a valid
  8211. command -- does what RQUERY does.  There's no need for the "R" since there
  8212. is no local QUERY command, nor any need for one.  ckuusr.c, 16 Dec 98.
  8213.  
  8214. Discovered that when sending a file to QNX whose name contained any segment
  8215. longer than 48 chars, the open() failed with ENAMETOOLONG.  Added code to
  8216. nzrtol() to truncate each path segment longer than MAXNAMLEN (which is defined
  8217. earlier according to time-honored #ifdefs) to MAXNAMLEN bytes.  ckufio.c,
  8218. 16 Dec 98.
  8219.  
  8220. Added variables \v(hwparity) (hardware parity, if any) and \v(serial)
  8221. (8N1, etc).  ckuusr.h, ckuus4.c, 16 Dec 98.
  8222.  
  8223. Made SET SERIAL nxx also SET TERM BYTE to n.  ckuus3.c, 16 Dec 98.
  8224.  
  8225. Changes from Jeff to speed up Telnet negotiations.  ckcnet.c, 17 Dec 98.
  8226.  
  8227. Discovered that DIR command did not expand ~ in UNIX.  That's because it was
  8228. calling system() (which uses sh) rather than zshcmd() (which uses the user's
  8229. preferred shell).  Fixed in ckuus6.c, 17 Dec 98.
  8230.  
  8231. Discovered that IF EXIST did not expand ~ in UNIX.  That's because zchki()
  8232. did not expand tildes.  Fixed in ckufio.c, 17 Dec 98.
  8233.  
  8234. Discovered that \fdate() did not expand ~ in UNIX.  That's because zfcdat()
  8235. did not expand tildes.  Fixed in ckufio.c, 17 Dec 98.
  8236.  
  8237. All this made me realize that any ckufio.c routine that accepts a filename
  8238. as an argument should run tilde_expand() on it, and if I did this, I could
  8239. move all kinds of ugly code out of ckucmd.c.  But that would be a rather major
  8240. last-minute overhaul, so it's deferred for the next release.
  8241.  
  8242. Back to the UNIX DIR command.  If it runs ls, then we can give ls switches,
  8243. etc, but we don't get regular filename parsing or a FAILURE return code if
  8244. no files match.  If we run the built-in DIR command, we don't see permissions,
  8245. owner, group, etc, but we do get filename parsing and an appropriate status
  8246. indication.  So I separated LS and DIR, which formerly were synonyms.  Now LS
  8247. runs ls, and DIR calls the internal DIR command.  ckuusr.[ch], ckuus6.c,
  8248. 17 Dec 98.
  8249.  
  8250. Meanwhile, the internal DIR command had all sorts of problems.  For example
  8251. "dir x" would list all files whose names started with "x".  Also the headings
  8252. and footings were a bit annoying, so I took them out.  domydir(), ckuus6.c,
  8253. 17 Dec 98.
  8254.  
  8255. Yesterday's truncate-filename-segments code forgot to null-terminate its
  8256. buffer, so receiving a file that had a shorter name than a previous one
  8257. resulted in junk at the end of the shorter filename.  Fixed in nzrtol(),
  8258. ckufio.c, 17 Dec 98.
  8259.  
  8260. Updates to SET PRINTER & other help text, more Telnet updates, and misc
  8261. minor corrections from Jeff.  ckcnet.c, ckuus[r2y].c, 17 Dec 98.
  8262.  
  8263. Discovered a bad situation in UNIX fgen(), in which a debug() statement
  8264. would try to print the filename string even when no files were found and
  8265. therefore the state of the string pointer was undefined.  Recent code changes
  8266. made this cause core dumps.  Fixed in fgen(), ckufio.c, 17 Dec 98.
  8267.  
  8268. Added new system-dependent function: ziperm(filename), returns the file's
  8269. permissions in system-dependent symbolic form (unlike zgperm(), which returns
  8270. them in system-dependent numeric form).  Probably will need lots of #ifdefing
  8271. when I go build on many platforms...  ckufio.c, 17 Dec 98.a
  8272.  
  8273. Back to the built-in DIRECTORY command: domydir().  Added /BRIEF and /VERBOSE
  8274. switches; /VERBOSE means to print the heading and summary; /BRIEF means to
  8275. just list filenames as compactly as possible; if neither is included, a
  8276. verbose listing is printed but without heading and summary.  Added askmore()
  8277. for paging, plus /PAGE /NOPAGE switches to control it.  Changed date format to
  8278. ISO standard yyyymmdd hh:mm:ss -- no English month names or screwy American
  8279. month-day-year, and /ENGLISHDATE switch to re-enable English rather than ISO
  8280. dates.  Added display of permissions for UNIX.  Rearranged fields to be more
  8281. familiar and less DOS-like.  ckuus6.c, 17 Dec 98.
  8282.  
  8283. Then I discovered that all the code I had rewritten is duplicated (for OS2
  8284. only) in dodir().  I don't understand the ONETERMUPD business so I left it
  8285. alone, but I *think* that entire mass of code can be yanked out and replaced
  8286. by a call to domydir().
  8287.  
  8288. Added some #ifdefs to new UNIX permissions-printing code for symbols that some
  8289. platforms might not define.  ckufio.c, 18 Dec 98.
  8290.  
  8291. Made zgetfs() return size even if it's not a regular file, since we only use
  8292. it for directory listings.  (NOTE: This change should not be made for K95,
  8293. since DOS users are not accustomed to seeing the size listed for directory
  8294. files).  ckufio.c, 18 Dec 98.
  8295.  
  8296. Added dashes to ISO numeric date in DIRECTORY listing -- too hard to read
  8297. without them.  ckuus6.c, 18 Dec 98.
  8298.  
  8299. Made UNIX DIRECTORY show file size for directories too.  ckuus6.c, 18 Dec 98.
  8300.  
  8301. Made K95 call domydir() instead running special code.  ckuus6.c, 18 Dec 98.
  8302.  
  8303. Made server-side directory listing code compatible with domydir().  nxtdir(),
  8304. ckcfns.c, 18 Dec 98.  (Project for a rainy day: consolidate sndir(), nxtdir(),
  8305. and domydir().)
  8306.  
  8307. From Jeff: it turns out that the parameter passed to the getc() function that
  8308. is given to tn_doop() is not really a dummy after all.  tn_doop() passes a 0
  8309. value to the function because it is expecting a blocking read.  This was not
  8310. happening.  tn_doop() was also not checking the return code of the getc()
  8311. function and was converting it to a char.  So -1 (timeouts) was being treated
  8312. as IAC.  Fixed in ckutio.c, ckcnet.c, 18 Dec 98.
  8313.  
  8314. From Jeff: Mutexes in K95 for local-echo buffer vs connection.  ckcnet.c
  8315. 18 Dec 98.
  8316.  
  8317. Added a new DIRECTORY command switch, /HEADING, to decouple printing of
  8318. headings and summaries from /VERBOSE and /BRIEF.  ckuusr.h, ckuus6.c,
  8319. 18 Dec 98.
  8320.  
  8321. Added a new command to set default options for other commands that take
  8322. switches:  SET OPTIONS <command> <switch> [ <switch> [ ... ] ].  ckuusr.[ch],
  8323. ckuus3.c, 18 Dec 98.
  8324.  
  8325. But this meant that each option requires an opposite, so added /NOHEADING,
  8326. and /ISODATE.  ckuusr.h, ckuus6.c, 18 Dec 98.
  8327.  
  8328. Filled in SET OPTIONS DIRECTORY [ switches ].  ckuus6.c, 18 Dec 98.
  8329.  
  8330. Changed filhelp() to return 1 if it listed all the files, and 0 if the listing
  8331. was terminated prematurely (by the user replying "n" to askmore()), to allow
  8332. DIR /BRIEF /HEADING to work.  ckucmd.c, ckuus6.c, 18 Dec 98.
  8333.  
  8334. Added HELP text for DIRECTORY and SET OPTIONS.  ckuus2.c, 18 Dec 98.
  8335.  
  8336. Cleaned out hundreds of lines of cruft from dodir().  ckuus6.c, 18 Dec 98.
  8337.  
  8338. Fixed streaming glitch introduced on Dec 16.  ckcfns.c, 18 Dec 98.
  8339.  
  8340. Minor changes from Jeff to ckcdeb.h and ckcnet.c, 20 Dec 98.
  8341.  
  8342. Moved sh_sort() to ckcmai.c with other general-purpose utilities and added
  8343. key & reverse parameters.  ckcdeb.h, ckucmd.c, ckcmai.c, 20 Dec 98.
  8344.  
  8345. Added /[NO]RECURSIVE, /NOSORT, /SORT:{NAME,DATE,SIZE}, /ASCENDING,
  8346. /REVERSE (= /DESCENDING) switches to DIRECTORY and SET OPT DIR commands:
  8347. ckuusr.h, ckuus6.c, 20 Dec 98.
  8348.  
  8349. Fixes from Jeff.  ckcnet.c, ckuus6.c, 21 Dec 98.
  8350.  
  8351. Moved SET OPTIONS keyword table to top level since aggregate initialization
  8352. of structs is not portable.  ckuus6.c, 21 Dec 98.
  8353.  
  8354. Filled in zgperm() and ziperm() for VMS.  Made VMS zgetfs() return file size
  8355. even for directories.  Added zrelname() to convert a full pathname to one that
  8356. is relative to the current directory (needed only for VMS).
  8357. ckvfio.c, 21 Dec 98.
  8358.  
  8359. Made filhelp() for VMS return zrelname()-shortened names.  ckucmd.c, 21 Dec 98.
  8360.  
  8361. Made domydir() work for VMS.  ckcdeb.h, ckuus6.c, 21 Dec 98.
  8362.  
  8363. Various directory listing improvements.  Don't give "more?" prompt if last
  8364. line that was shown is the actual last line.  Made more-prompting take
  8365. wrapping of long lines into account, watching out for lines that are exactly
  8366. the column width.  Lots of other checking added, boundary conditions handled,
  8367. etc.  ckuus6.c, 21 Dec 98.
  8368.  
  8369. Added SHOW OPTIONS.  ckuusr.h, ckuus[56].c, 21 Dec 98.
  8370.  
  8371. Updated HELP DIRECTORY text.  ckuus2.c, 22 Dec 98.
  8372.  
  8373. From Jeff: Corrections to \fscrncur[xy](); they do not require arguments.
  8374. ckuus4.c, 23 Dec 98.
  8375.  
  8376. From Jeff: SET TERM SPACING-ATTRIBUTE-CHARACTER (invisible, a debugging tool).
  8377. ckuusr.h ckuus7.c, 23 Dec 98.
  8378.  
  8379. Tried changing SYS$OPEN() to SYS$DISPLAY() in zgperms(), but result was
  8380. error 99684 "invalid internal file identifier".
  8381.  
  8382. Changed xxstrcmp() (caseless string compare) to ckstrcmp() (string compare in
  8383. which case-matters is a parameter), and defined xxstrcmp() to be a macro that
  8384. calls ckstrcmp() with the parameter set to 0, but changed all references to
  8385. xxstrcmp(a,b,c) to ckstrcmp(a,b,c,0) anyway.  ckcker.h, ckcmai.c, 23 Dec 98.
  8386.  
  8387. Replaced all constructions like:
  8388.  
  8389.   x = casematters ? strcmp(a,b,c) : xxstrcmp(a.b.c)
  8390.  
  8391. with ckstrcmp(a,b,c,casematters).  Many modules, 23 Dec 98.
  8392.  
  8393. Added a "case matters in filenames" constant: filecase (1 for UNIX and OS-9,
  8394. 0 elsewhere).  ckcdeb.h, ckcmai.c, 23 Dec 98.
  8395.  
  8396. Added a "case matters" parameter to sh_sort().  ckcker.h, ckcmai.c, 23 Dec 98.
  8397.  
  8398. Changed filename "?" and directory sorts to obey filecase setting by passing
  8399. filecase as an arg to sh_sort().  ckucmd.c, ckuus6.c, 23 Dec 98.
  8400.  
  8401. Added SHOW ARRAY \&x to display the contents of array x.  Previously SHOW
  8402. ARRAY did not take an argument, but simply listed all defined arrays.
  8403. ckuus6.c, 23 Dec 98.
  8404.  
  8405. Added SORT [ { /CASE:{ON,OFF} /KEY:n /REVERSE /SIZE:n } ] <array>.  Testing
  8406. this by reading a file into an array and then sorting it revealed all sorts of
  8407. holes in the recently updated string comparison and sorting routines --
  8408. e.g. when the key is off the end of the string, or when one of the elements to
  8409. be compared is null, etc.  Plugged all of these.  ckuusr.[ch], ckuus[56].c,
  8410. 23 Dec 98.
  8411.  
  8412. From Jeff: Move "<DIR>" to left of size column for sorting purposes.
  8413. Fix SET PRINTER /W.. to accept abbreviations for /WINDOWS-Q that worked
  8414. prior to adding /WIDTH.  ckuus[36].c, 24 Dec 98.
  8415.  
  8416. Discovered that a typo yesterday's changes broke IF EQUAL.  Fixed in doif(),
  8417. ckuus6.c, 24 Dec 98.
  8418.  
  8419. Changed \ffiles() and related functions (\fdir(), etc) to take a second arg,
  8420. an array 'pointer', to make array contain file list, e.g. \ffiles(*.txt,&a).
  8421. Element 0 of the array contains the size of the list, and elements 1..n
  8422. contain the filenames.  NOTE: This does not work in K95 because I didn't see
  8423. any obvious way to access the alternative "znxt" list -- probably we just need
  8424. to remove the #ifdef OS2 from the code in fneval FN_FC that calls znext() in
  8425. a loop to make a copy of the file list.  ckuus4.c, 24 Dec 98.
  8426.  
  8427. Added HELP SORT text.  ckuus2.c, 24 Dec 98.
  8428.  
  8429. From Jeff, 24 Dec 98:
  8430.  . Fixed memory (de)allocation problems in \ffiles(): ckuus4.c.
  8431.  . Add \ffiles() array assignment for K95: ckuus4.c.
  8432.  . Add Wyse160 emulation (=WY60+blockmode): ckuusr.h, ckuus[257].c.
  8433.  
  8434. Fixed Jeff's corrections (don't call makestr() with uninitialized pointers,
  8435. some fencepost errors).  ckuus4.c, 25 Dec 98.
  8436.  
  8437. Updated HELP FUNCTION text for \f[r]files(), \f[r]directories().  ckuus2.c,
  8438. 25 Dec 98.
  8439.  
  8440. Fixed some glitches in SORT command parsing.  ckuusr.c, 25 Dec 98.
  8441.  
  8442. Fixed UNIX CONNECT module to log incoming characters to session log BEFORE
  8443. translation (etc) if session log is binary.  If session log is text, chars
  8444. are logged after translation (etc), as before.  ckucns.c, ckucon.c, 25 Dec 98.
  8445.  
  8446. Added SET OPTIONS TYPE { /PAGE, /NOPAGE } and added TYPE to SHOW OPTIONS,
  8447. just so we don't have only one command we can set options for.  ckuus[r5].c,
  8448. 25 Dec 98.
  8449.  
  8450. A few more fine adjustments to \ffiles() array code.  ckuus4.c, 26 Dec 98.
  8451.  
  8452. Realized that we really need to allow the user to specify both the start and
  8453. end range of elements to be sorted, in case they really do want to use 0-based
  8454. arrays (or they want to sort pieces of arrays for some reason).  Changed
  8455. /SIZE:n to /RANGE:n:m.  Also, moved the SORT command code from ckuusr.c to
  8456. cuus7.c.  26 Dec 98.
  8457.  
  8458. Used the new "parse-a-range technology" to allow SHOW ARRAY a[n:m].  ckuus5.c,
  8459. 26 Dec 98.
  8460.  
  8461. Discovered still more problems in SORT switch parsing, mainly that command
  8462. retry and recall were totally fouled up.  The reason was quite subtle.  The
  8463. object was to parse SORT [ switches ] array-name.  Now, to allow for the
  8464. possibility that the user might type \&a as the array name (i.e. include the
  8465. initial backslash), this required the switch keyword table to have a NULL
  8466. processing function, rather than the customary xxstring, otherwise cmkey()
  8467. would run xxstring on the array name and fail because the result did not match
  8468. a keyword from the table.  The problem was that the path taken through cmkey()
  8469. when the processing function was NULL had never been used before, and
  8470. therefore never debugged: the wordlength variable was improperly set in this
  8471. case, and (more interestingly), upon reparse, gtword() would return the
  8472. switch together with its argument, and therefore the assumption that it had
  8473. broken on the ":" or "=" was violated, and therefore the switch *with* its
  8474. argument was looked up in the keyword table, which naturally failed.  Fixed
  8475. in cmkey2(), ckucmd.c, 26 Dec 98.
  8476.  
  8477. Fixed all array-name parsing functions to allow for the \&@[] array (a
  8478. special case).  ckuus5.c, 26 Dec 98.
  8479.  
  8480. Another minor correction to \ffiles() array management.  ckuus4.c, 27 Dec 98.
  8481.  
  8482. Updated HELP SORT text.  ckuus2.c, 27 Dec 98.
  8483.  
  8484. Updates to Telnet code from Jeff to accommodate sparse Telnet option arrays.
  8485. ckctel.h, ckcnet.c, 27 Dec 98.
  8486.  
  8487. Updated NEWS command.  ckuus2.c, 27 Dec 98.
  8488.  
  8489. NeXTSTEP was missing symbol definitions for most of the permission bits in
  8490. <sys/stat.h>.  Added #ifndefs for them.  ckufio.c, 27 Dec 98.
  8491.  
  8492. Fixed misplaced #ifdef CK_TTGWSZ in domydir(): ckuus6.c, 27 Dec 98.
  8493.  
  8494. Defined UTIMEH for HP-UX 9.0.  ckufio.c, 27 Dec 98.
  8495.  
  8496. Got rid of getuid(), etc, prototypes for HP-UX 9.0.  ckutio.c, 27 Dec 98.
  8497.  
  8498. DECC 5.5 on VMS 7.1 is great at finding stuff the other compilers don't:
  8499.  . Missing prototypes for sopkt() and zrelname().  ckcdeb.h, ckcker.h.
  8500.  . Missing prototype for lower(), and signed vs unsigned char casts
  8501.    for args to various lower(), le_getchar(), etc.  ckcnet.c.
  8502.  . Missing prototype for iks_wait().  ckctel.h.
  8503.  . Missing prototype for cmswi().  ckucmd.h.
  8504.  . sb[] used before declared.  Moved declaration up.  ckcnet.c.
  8505.  . Decomposed the statement "len = (xunchar(*p++) * 95) + xunchar(*p++)",
  8506.    which elicited a rather stern warning.  ckcpro.w.
  8507.  . The prototypes for some of the Kanji translations were in #ifdef KANJI
  8508.    in ckcker.h.  But KANJI was defined in ckcxla.h, which was included *after*
  8509.    ckcker.h.  Moved the errant prototypes from ckcker.h to ckcxla.h, where
  8510.    they belonged.  ckcker.h, ckcxla.h.
  8511.  . Removed obsolete reference to me_binary from ckvcon.c.
  8512.  . Many more like this.
  8513. After all this I get clean builds on VMS 7.1 with DECC.  27 Dec 98.
  8514.  
  8515. Removed curses support from QNX16 version.  See notes in makefile.  27 Dec 98.
  8516.  
  8517. Fixed typos in ckuus3.c and ckucon.c, noticed during X.25 build.  27 Dec 98.
  8518.  
  8519. ---7.0 Beta.02---
  8520.  
  8521. From Jeff, 30 Dec 98:
  8522.  . Define & implement two new responses for Telnet IKS negotiation.
  8523.  . Define & implement several features for Pragma Systems telnet client.
  8524.  . Fixes for K95 VIEW command.
  8525.  
  8526. Changed copyright to 1999.  All modules, 30 Dec 98.
  8527.  
  8528. Added BSDI 4.0 target & banner.  makefile, ckuver.h, 30 Dec 98.
  8529.  
  8530. Increased Olimit for IRIX 6.4 build to stop warnings.  makefile, 30 Dec 98.
  8531.  
  8532. #ifdefs for SCO 3.2v5.0.x perror() prototype vs gcc.  ckcdeb.h, 30 Dec 98.
  8533.  
  8534. #ifdefs for SCO 3.2v5.0.x perror() declaration and contents (void vs int
  8535. return type).  ckuusx.c, 30 Dec 98.
  8536.  
  8537. Added missing #ifdef DEBUG around code in shocps() that referenced deblog.
  8538. ckuusx.c, 30 Dec 98.
  8539.  
  8540. Added code to check if, upon CONNECTing, the Telnet server is actually an
  8541. IKSD in server mode, and in that case to return to the prompt.  ckucns.c,
  8542. ck[uvd]con.c, 30 Dec 98.
  8543.  
  8544. Broke up a complicated printf() that blew up the Motorola SVR3 compiler.
  8545. shotopt(): ckuus4.c, 30 Dec 98.
  8546.  
  8547. Fixed some help-text typos.  ckuus2.c, 30 Dec 98.
  8548.  
  8549. Jeff pointed out that UNIX C-Kermit is dropping Telnet negotiations because
  8550. ttflui() doesn't check for Telnet negotiations.  The big switch statement in
  8551. ttinl(), which checks for IAC and if we're doing Telnet protocol, calls
  8552. tn_doop(), and then handles its return code, has to be duplicated in ttflui().
  8553. So I moved the switch() statement to a new routine, tt_tnopt(), and called it
  8554. from ttinl().  This didn't seem to break anything, so then I placed calls to
  8555. tt_tnopt() into ttflui() and ttflux().  This didn't seem to break anything
  8556. either, but it will need testing in the situations where negotiations were
  8557. being lost before.  ckutio.c, 30 Dec 98.
  8558.  
  8559. Corrections to yesterday's ckutio.c changes plus some other stuff from
  8560. Jeff, various modules, 31 Dec 98.
  8561.  
  8562. Adjustments to makefile & source modules for AT&T 7300 and other entries based
  8563. on SVR3 and earlier -- add:
  8564.  
  8565.   -DNOSYSLOG -DNOSYMLINK -DNOGETUSERSHELL -DNOINITGROUPS -DNOFTRUNCATE
  8566.  
  8567. to CFLAGS, and make sure all the appropriate #ifdefs are in place.  Also,
  8568. add #ifndef NOGFTIMER to an unguarded reference to fpfsecs.  makefile,
  8569. cku[tf]io.c, ckuusx.c, 31 Dec 98.
  8570.  
  8571. Corrected yet another problem in ckindex() when told to search from the right.
  8572. ckuus4.c, ckcmai.c, 31 Dec 98.
  8573.  
  8574. Fixed IF MATCH to actually pass the SET CASE variable to ckmatch(), like it
  8575. was always supposed to.  ckuus6.c, 31 Dec 98.
  8576.  
  8577. Reworked ckmatch() to allow quoting of metacharacters and single-character
  8578. matching by [abc] (list of chars) or [a-z] (range of chars), or any
  8579. combination.  The code is not exactly elegant but I think it covers every
  8580. conceivable combination (which I don't think elegant code can do).  Tested
  8581. extensively with "if match" over a hundred patterns ranging from those that
  8582. might be commonly used to the truly bizarre.  match.ksc, ckcmai.c, 31 Dec 98.
  8583.  
  8584. Changed the match() call in ckufio.c to ckmatch().  Now it is possible to tell
  8585. C-Kermit to "send ck[cuw]*.[cwh]".  Of course, it also affects all other
  8586. commands that parse filenames, as well as ? file lists, e.g. "send ck[cu]?".
  8587. ckufio.c, 31 Dec 98.
  8588.  
  8589. Fixed parsing of SET WILD SHELL when NOPUSH/nopush.  ckuus3.c, 31 Dec 98.
  8590.  
  8591. Verified ckmatch() works with 8-bit data, including 0xff.  However, IF MATCH
  8592. neglected to handle braces correctly so strings or patterns containing spaces
  8593. didn't work right; fixed in ckuus6.c, 1 Jan 99.
  8594.  
  8595. Added a new argument to ckmatch, telling whether to match strings that start
  8596. with ".", to make UNIX filename globbing work as before.  The new arg is the
  8597. "matchdot" variable, set by SET WILD KERMIT /[NO-]MATCH-DOT-FILES, used only
  8598. when calling from within zxpand(), otherwise always 1.  ckcker.h, ckcmai.c,
  8599. ckcfns.c, ckuus[56].c, ckufio.c, 1 Jan 99.
  8600.  
  8601. Added {string1,string2,...} matching to ckmatch(), in which the strings
  8602. themselves can be patterns, recursing to any reasonable level.  ckcmai.c,
  8603. ckermit2.txt, 1 Jan 99.
  8604.  
  8605. Updated UNIX iswild() to know about new metacharacters, and also to know about
  8606. quoting, which it never did before.  ckufio.c, 1 Jan 99.
  8607.  
  8608. Problem: At some point since last May (but before Beta.03) I broke parsing
  8609. of quoted question marks in filenames, e.g.:
  8610.  
  8611.   send cku\?io?
  8612.  
  8613. Instead of listing several files like it should, it went nuts.  Found & fixed
  8614. the problem in gtword(): ckucmd.c, 1 Jan 99.
  8615.  
  8616. Added CKREGEX and NOCKREGEX compile-time symbols.  Use the latter to get rid
  8617. of [] and {} globbing in case it produces undesirable effects.  Otherwise
  8618. CKREGEX is defined for all platforms.  ckcdeb.h, ckcmai.c, ckufio.c, 1 Jan 99.
  8619.  
  8620. Put SHOW PATTERNS in #ifdef PATTERNS so it doesn't show up on VMS, etc..
  8621. ckuusr.c, 1 Jan 99.
  8622.  
  8623. DISABLE DELETE prevented SET FILE COLLISION xxx in the client.  Fixed the code
  8624. so the check is made in the server.  ckcfns.c, ckcpro.w, 1 Jan 99.
  8625.  
  8626. More fixes to ckindex() so the optional 3rd argument is treated uniformly for
  8627. both left and right searches.  ckcmai.c, ckuus[24].c, ckermit2.txt, 1 Jan 99.
  8628.  
  8629. A user reported that an ancient and hacked version of Kermit that is found on
  8630. QNX2 and QNX3 systems, when it sends "&" in its parameter string to indicate
  8631. it wants to do 8th-bit quoting, demands a response of "&" and does not accept
  8632. "Y", which C-Kermit sends.  Added an invisible command: SET Q8FLAG {ON,OFF}.
  8633. When ON, this makes C-Kermit reply with the same 8th-bit quote character that
  8634. the sender sent; when OFF (the default), it responds with "Y" as it always
  8635. did.  ckuusr.h, ckuus[r3].c, ckcfns.c, 1 Jan 99.
  8636.  
  8637. DIRECTORY would print nothing and succeed if it ran out of memory when
  8638. making a sorted listing.  Now it prints "?Too many files match" and fails.
  8639. ckuus6.c, 1 Jan 99.
  8640.  
  8641. Updated gettcs() (which picks the intermediate character set for TRANSLATE,
  8642. TRANSMIT, and non-K95 CONNECT to account for Latin-9, CP858, and CP1252 for
  8643. Euro's sake, just in time!  ckuus4.c, 1 Jan 99.
  8644.  
  8645. Updated SHOW CHARACTER-SETS to account for Latin-9 as an intermediate set:
  8646. shotcs(), ckuus5.c, 1 Jan 99.
  8647.  
  8648. Corrections from Jeff to yesterday's changes.  ckcmai.c, ckuus[23].c. 2 Jan 99.
  8649.  
  8650. Discovered that UNIX coninc(x), where x > 0, returned -1 rather than -2 on
  8651. timeout.  When coninc() calls ttinc() the fix rather hideous -- see the code.
  8652. ckutio.c, 2 Jan 99.
  8653.  
  8654. Added SET ASK-TIMER n (sec), to make ASK and friends time out and fail if user
  8655. doesn't supply an answer within n seconds.  Works with ASK, ASKQ, GETOK, and
  8656. GETC.  ckuusr.h, ckucmd.c, ckuus[r36].c, 2 Jan 99.
  8657.  
  8658. Added IF ASKTIMEOUT to let script writer test whether ASK-class command failed
  8659. because of timeout.  ckuusr.h, ckuus6.c, 2 Jan 99.
  8660.  
  8661. Added --timeout:n for IKSD login.  ckuusr.h, ckuus[25y].c, 2 Jan 99.
  8662.  
  8663. Set a default time limit to log in to IKSD at 300 seconds (5 min).  This works
  8664. in the Username:/Password: dialog via the ASK-TIMER mechanism, and in
  8665. client/server mode via some crude sampling of the system clock (not foolproof;
  8666. if user client never sends anything I don't think the server will time out).
  8667. ckcmai.c, ckuus7.c, 2 Jan 99.
  8668.  
  8669. Updated help text for new commands and reformatted much of the help text for
  8670. more consistent indentation and spacing.  ckuus2.c, 2 Jan 99.
  8671.  
  8672. VOS updates, etc, from David Lane & Jeff.  4 Jan 99.
  8673.  
  8674. VMS updates from John Santos.  ckcnet.c needs saddrlen declared as unsigned.
  8675. DEC C 6.0 header files refer to a data type of u_int but don't define it
  8676. anywhere, so a definition was added to ckcnet.h.  Changed the name of rdata
  8677. state in ckcpro.w to rdpkt, since the name rdata conflicts with a struct
  8678. element defined in nameres.h.  4 Jan 99.
  8679.  
  8680. Got rid of "Negotiations..." and spinner display when in remote mode.
  8681. Only the client should print these.  ckcnet.c, 4 Jan 99.
  8682.  
  8683. Problem (which is not new): "dir /recursive */blah" matches all files in the
  8684. current directory, because this becomes "./*/blah" and the "*" segment matches
  8685. all files in the current directory (see traverse() in ckufio.c).
  8686.  
  8687. Fix 1: At the point where we are adding a file because the search is recursive
  8688. and the file is not a directory, match it with the original pattern.  This
  8689. filters out all the files whose names are different from the desired one, but
  8690. since the current segment has "./" prepended to it, "*/blah" also matches
  8691. "blah" in the current directory because "blah" has become "./blah".  Also
  8692. "dir /recu blah" matches nothing, even if "blah" is in the current directory
  8693. and/or subdirectories.
  8694.  
  8695. Fix 2: Like fix 1, but point past the leading "./" prior to the comparison.
  8696. This makes "dir /recursive */blah" work exactly right, but it prevents "dir
  8697. /recursive blah" from matching blah files in subdirectories because the
  8698. pattern "blah" does not match "xxx/blah".  But this is the right track.  Note
  8699. that * does not match slash in UNIX filename globbing; but in ckmatch() slash
  8700. is just another character.  Therefore, it's the responsibility of the file
  8701. code to pass the right strings to ckmatch().  The trick is to note how many
  8702. directory separators were in the original pattern, and then match strings
  8703. containing that many segments.  For example, if the original pattern is
  8704. "oofa.txt" (1 segment), and we are matching ./aaa/bbb/oofa.txt (4 segments),
  8705. we must strip 4 - 1 = 3 segments from the left before matching.  Similarly, if
  8706. the original pattern is */oofa.txt, we strip 2, and match with bbb/oofa.txt.
  8707.  
  8708. So now suppose we have a directory tree in which oofa.txt files exist at all
  8709. levels.  "dir oofa.txt" shows the one at the current level.  "dir /recursive
  8710. oofa.txt" shows all the ones at all levels.  "dir */oofa.txt" shows the ones
  8711. one level down.  "dir /recursive */oofa.txt" shows the ones one level down
  8712. and lower.  "dir /recursive */*/oofa.txt" shows the ones 2 levels down and
  8713. lower, etc etc.  fgen(), traverse(): ckufio.c, 5 Jan 99.
  8714.  
  8715. More cleaning up & improving HELP text, especially HELP SET HOST.  ckuus2.c,
  8716. 5 Jan 99.
  8717.  
  8718. Jeff broke the Telnet protocol out of ckcnet.c to a separate module, ckctel.c.
  8719. 5 Jan 99.
  8720.  
  8721. Changed UNIX makefile to account for ckctel.c.  5 Jan 99.
  8722.  
  8723. Some changes to IKS server in/out switching from Jeff.  ckcpro.w, 5 Jan 99.
  8724.  
  8725. Jeff made dodir() call domydir() in K95.  ckuus5.c, 5 Jan 99.
  8726.  
  8727. Jeff made TELNET command add an implicit /TELNET at the send of the command.
  8728. ckuus7.c, 5 Jan 99.
  8729.  
  8730. Added HELP WILDCARDS.  ckuusr.[ch], ckuus2.c, 5 Jan 99.
  8731.  
  8732. Added SET F-ACK-BUG { ON, OFF } (invisible).  ckuusr.[ch], ckuus3.c, ckcpro.w,
  8733. 6 Jan 99.
  8734.  
  8735. Added a section on coping with faulty Kermit implementations to ckermit2.txt,
  8736. 6 Jan 99.
  8737.  
  8738. Added messages to refer UNIX users to installation instructions when access
  8739. to lockfile directory and/or dialout device is denied.  ckuus7.c, 6 Jan 99.
  8740.  
  8741. Moved common library routines from ckcmai.c to a separate module, ckclib.[ch],
  8742. and updated the UNIX makefile to know about it.  6 Jan 99.
  8743.  
  8744. Added code to protocol module to catch failure to negotiate Kermit server on
  8745. Telnet connection.  ckcpro.w, 6 Jan 99.
  8746.  
  8747. Updated the VMS build procedure for ckctel and ckclib.  ckvker.com, ckvold.com,
  8748. 6 Jan 99.
  8749.  
  8750. Updated the OS-9 build procedure for ckctel and ckclib.  ck9ker.mak, 6 Jan 99.
  8751.  
  8752. Updated the Plan-9 build procedure for ckctel and ckclib. ckpker.mak, 6 Jan 99.
  8753.  
  8754. Updated the DG build procedure for ckctel and ckclib. ckdsrc.lis, 6 Jan 99.
  8755.  
  8756. Updated the Amiga build procedure for ckclib. ckiker.mak, 6 Jan 99.
  8757.  
  8758. Updated the VOS build procedure for ckctel and ckclib. cklker.mak, 6 Jan 99.
  8759.  
  8760. Fixed various glitches in ckcnet/ckctel split uncovered by building in VMS.
  8761. 6 Jan 99.
  8762.  
  8763. Added \fpermissions(file).  ckuusr.h, ckuus[24].c, 6 Jan 99.
  8764.  
  8765. Added \v(lockdir) for UNIX.  ckuusr.h, ckuus4.c, 6 Jan 99.
  8766.  
  8767. Added IF READABLE and IF WRITEABLE.  Each of these takes either a filename
  8768. or a directory name.  Getting them to work for directories was a hack (global
  8769. variables again).  Probably in K95 they should just always succeed.  ckuusr.h,
  8770. ckuus6.c, ck[uvd]io.c, 6 Jan 99.
  8771.  
  8772.   Note: These last several items are mainly in case we ever want to
  8773.   write an install-myself script.
  8774.  
  8775. Some changes from Jeff to (in)visibility of Telnet-related keywords.
  8776. ckuus3.c, 6 Jan 99.
  8777.  
  8778. telnet.txt from Jeff added to docs.  6 Jan 99.
  8779.  
  8780. Discovered that makelist(), which parses {{xxx}{xxx}...} lists (as in
  8781. SEND /EXCEPT:) chokes on {{{xxx,yyy,zzz}}} -- i.e. when you want to put a
  8782. new-format wildcard as the exception list.  Fixed in ckuusr.c, 6 Jan 99.
  8783.  
  8784. Fixed DIRECTORY /HEADING /RECURSIVE not to list the number of directories,
  8785. since it's always 0 (zxpand() does not include directories in its list when
  8786. called recursively).  ckuus6.c, 6 Jan 99.
  8787.  
  8788. Added DIRECTORY /[NO]DOTFILES for UNIX & OS-9.  ckuusr.h, ckuus6.c, 6 Jan 99.
  8789.  
  8790. Added SET HOST /NETWORK-TYPE:{TCP/IP,COMMAND,...}.  No reason not to, and it
  8791. was easy.  Also made SET HOST /COMMAND invisible, since it is only a special
  8792. case of /NETWORK-TYPE:.  The /NETWORK-TYPE switch does not affect the global
  8793. SET NETWORK TYPE.  ckuusr.h, ckuus7.c, 6 Jan 99.
  8794.  
  8795. Updated Telnet-related HELP text from Jeff.  ckuus2.c, 7 Jan 99.
  8796.  
  8797. The code I put in to prevent "Negotiations...." from coming out of IKSD also
  8798. prevented it from coming out of the client.  Fixed in tn_wait(), ckcnet.c,
  8799. 7 Jan 99.
  8800.  
  8801. Discovered the server end of REMOTE DIRECTORY is broken in UNIX for huge
  8802. directories.  Local directory listings are fine.  A packet log reveals that
  8803. the transfer looks normal, but the data ends early.  Debug log shows "sending
  8804. packet out of window" for every data packet, but that always happens when
  8805. streaming.  Changed spack() not to log this message when streaming.  ckcfn2.c,
  8806. 7 Jan 99.
  8807.  
  8808. The problem turned out to be not the size of the directory, but the fact that
  8809. it contained a file with an 8-bit name, and we were storing the filenames in a
  8810. char array instead of an unsigned char array.  Returning an 8-bit signed char
  8811. from int nxtdir() caused its sign to be extended, and a negative return signals
  8812. EOF.  Fixed in nxtdir(), ckcfns.c, 7 Jan 99.
  8813.  
  8814. Discovered that the VMS C-Kermit Telnet client on UCX makes the connection OK,
  8815. but loses the hostname.  But only if TCP REVERSE-DNS-LOOKUP is ON and only
  8816. with certain hosts.  Discoveries: (1) the fact that gethostbyaddr() returns
  8817. non-NULL does not mean that h_name is set; and (2) netopen() writes into its
  8818. hostname argument -- gak!  Fixed netopen() to handle case (1) by filling in
  8819. the IP address if no name comes back, and also to issue its "blah connected on
  8820. port blah" messages a bit more consistently.  Left (2) alone, sleeping dogs
  8821. department...  ckcnet.c, 7 Jan 99.
  8822.  
  8823. Discovered that VMS tthang(), in the network case, closed and then reopened
  8824. the network connection.  Fixed it to just close it.  ckvtio.c, 7 Jan 99.
  8825.  
  8826. Fixed a place where quiet was not restored before returning from doconect().
  8827. ckuus4.c, 7 Jan 99.
  8828.  
  8829. Added code to UNIX traverse() to make it return directory names during
  8830. recursive traversal, as well as filenames.  This was a bit tricky due to the
  8831. possibility of showing or not showing dot files.  If we are not showing dot
  8832. files in UNIX, then we should not descend into any directory whose name
  8833. starts with a dot.  (In fact, this issue had never been addressed before,
  8834. but now it's fixed.)  ckufio.c, 7 Jan 99.
  8835.  
  8836. Commented out the check against summarizing directories in DIR /HEADING
  8837. /RECURSIVE, since directory files are now shown.  ckuus6.c, 7 Jan 99.
  8838.  
  8839. Checked "send /recursive", and of course it was broken, since gnfile() never
  8840. expected to be fed a directory by znext().  We'd have the same problem in K95.
  8841. Added a check to gnfile() to skip over directory files; recursive sends seem
  8842. to be working again.  ckcfns.c, 7 Jan 99.
  8843.  
  8844. Discovered that "send ." no longer recursed.  Did it ever?  ckermit2.txt
  8845. is contradictory on this, so I fixed it by removing any claims that "send ."
  8846. implied /RECURSIVE.  ckermit2.txt, 7 Jan 99.
  8847.  
  8848. "send /recursive ." now dies with a parse error when the current directory
  8849. happens to contain at least one subdirectory, and the first file returned when
  8850. expanding "." happens to be a directory file.  I patched this in both cmifi()
  8851. and zxpand(); the former by checking the global recursive flag (yuk) and the
  8852. latter by simply translating "." to "*".  This works OK, but "send /recursive
  8853. .." still doesn't work, even though "send .." does.  Well, there's no end to
  8854. this, so the clever thing to do is to have zxpand() call xfnqfp() on its
  8855. argument up front.  This nicely takes care any kind of crazy path (like
  8856. .././../baz/../../foo.bar) that the user could dream up, not to mention
  8857. tildes, etc.  But that would be too easy.
  8858.  
  8859. In fact, "send /recursive .." actually DOES work.  The problem is the same as
  8860. with putting zfnqfp() into zxpand(), or for that matter, specifying a full
  8861. pathname or a pathname starting with tilde in combination with /RECURSIVE,
  8862. namely that splitpath and traverse go through the ENTIRE FILE SYSTEM, file by
  8863. file, which can take hours and in any case grinds the disk to dust.  This is
  8864. independent of today's change to make zxpand() return directory files; the
  8865. same thing would have happened any time since we added SEND /RECURSIVE, and
  8866. indeed it happens with 6.1 Beta.05 from last May: "send /recursive ~/tmp/*"
  8867. does the trick quite nicely in /usr/local/bin/wermit.
  8868.  
  8869. Hacking away at this, I managed to more or less fix it but some glitches
  8870. remain.  First of all, the parsing of "." and ".." etc stopped working again.
  8871. But now I can put back zfnqfp() in zxpand() and all's well, except now we
  8872. always get fully qualified names rather than relative ones, so I had to back
  8873. off on that one for now.  Another problem is that "dir /recursive <dirname>"
  8874. only shows directories, not files, in any directory that is subordinate to the
  8875. one named in the command.  OK, close...  Will finish this tomorrow.
  8876. ckufio.c, 7 Jan 99.
  8877.  
  8878. Fixed lingering problems in UNIX wildcard expansion.  ckufio.c, 8 Jan 99.
  8879.  
  8880. Changed zxpand to append path separator to any directory names it returns.
  8881. ckufio.c.  8 Jan 99.
  8882.  
  8883. Since we don't know whether all implementations of zxpand() will return
  8884. directory names with separator appended, high-level code that does this in
  8885. various places (e.g. filhelp(), cmifi2()) still does it, but only if it was
  8886. not done already.  ckucmd.c, 8 Jan 99.
  8887.  
  8888. Added DIRECTORY /FILES (to show only regular files) /DIRECTORIES (to show only
  8889. directories) and /ALL (default, to show files and directories).  ckuusr.h,
  8890. ckuus6.c, ckermit2.txt.  8 Jan 99.
  8891.  
  8892. Changed SWITCH to evaluate case labels with zzstring() and then use ckmatch()
  8893. on them rather than strcmp().  Now we can have shell-like switch statements
  8894. with variables/functions/patterns as cases.  ckuus6.c, ckermit2.txt, 8 Jan 99.
  8895.  
  8896. Still have lots of details to clean up, will do them next week.
  8897.  
  8898. From Jeff: The Telnet Negotiation delay mechanism has been redesigned once
  8899. again.  The requirement is not that WILL/DO negotiations can't be sent before
  8900. encryption is active, just that none of the subnegotiation data be sent before
  8901. the encryption is in place.  So now there is a method to delay sending
  8902. subnegotiation data until after START_TLS, AUTH, and ENCRYPT are complete.
  8903. This means that we send all WILL/DO messages other than ENCRYPT before waiting
  8904. for the AUTH response.  If AUTH is refused we are done and there should be
  8905. almost no delay when connecting at the expense of more complex code.  And
  8906. since the NAWS is now sent to the telnetd before "login" is started it works
  8907. the first time and the SIGWINCH is not generated in the subprocess which
  8908. interrupts the "Password:" read attempt.  Also, it seems that I never added
  8909. the DO case for TELOPT_SNDLOC.  We would have negotiated SNDLOC but never sent
  8910. the subnegotiation.  So that is now fixed.  (End quote) ckctel.[ch],
  8911. 11 Jan 99.
  8912.  
  8913. Also from Jeff: typo in krbmit entry fixed, makefile, plus some K95-specific
  8914. stuff: ckuus[27].c, 11 Jan 99.
  8915.  
  8916. Updated HP-UX entries from Peter Eichhorn, 11 Jan 99.
  8917.  
  8918. The "Negotiations... (OK)" message was coming out twice, which is annoying
  8919. especially now that Telnet connections are so much quicker.  There did not
  8920. seem to be any easy way to consolidate the two messages, so instead I added
  8921. some code so they would print only upon a negotiation timeout.  So this speeds
  8922. up the connection even more (I didn't touch the spinner code, but it probably
  8923. could use the same treatment).  ckctel.c, 11 Jan 99.
  8924.  
  8925. Made the UNIX DIRECTORY command handle symlinks.  Of course this depends on
  8926. the nonportable lstat() function, so another pile of #ifdefs in ckcdeb.h, and
  8927. then some additional #ifdef'd code in domydir().  Now we get permissions,
  8928. date, size, and name of the symlink, plus a "->" pointer to the linked-to
  8929. file.  To do this as efficiently as possible, I made zgetfs() have some side
  8930. effects: since it's calling (l)stat() anyway, it also gets the link info, and
  8931. also sets a flag saying whether the file is a directory.  But we only take
  8932. advantage of this in the DIRECTORY command where it can't do any harm.
  8933. Of course, Yet Another Global Flag (diractive) had to be used to indicate to
  8934. the low-level routines (zfcdat(), zgperm(), ziperm(), etc) whether to call
  8935. stat() or lstat(), since we only want to call it for DIRECTORY commands, not
  8936. file transfer, etc.  Yuk.  ckcdeb.h, ckufio.c, ckuus6.c, 11 Jan 99.
  8937.  
  8938. As of yesterday, "dir <anypath>/*/filename" didn't work.  Similarly for "dir
  8939. <anypath>/*/*/filename", etc.  Fixed in traverse(), ckufio.c, 12 Jan 99.
  8940.  
  8941. "directory /recursive blah" (where "blah" is a filename, or in fact any
  8942. pattern other than "*") doesn't work -- as far as I can tell, it never did.
  8943. This should list all occurrences of "blah" in the current (or given) directory
  8944. tree, at any and all levels at which it occurs.  After several more hours of
  8945. pounding on traverse() I got this working too.  ckufio.c, 12 Jan 99.
  8946.  
  8947. But now "dir /recursive" shows dotfiles even when it shouldn't.  Fixed that
  8948. too.  But every fix breaks something else.  So now DIR /DIR * doesn't work any
  8949. more.  Fixed that.  But now DIR /RECURSIVE /DIR lists each directory twice.
  8950. Attempts to fix that broke everything else.  I hate this routine.  Finally
  8951. after more fixing, all of the following work:
  8952.  
  8953.   dir
  8954.   dir /files
  8955.   dir /directories
  8956.   dir /recursive
  8957.   dir /recursive /files
  8958.   dir /recursive /directories
  8959.   dir oofa.txt
  8960.   dir /recursive oofa.txt
  8961.   dir /recursive *.txt
  8962.   dir *.txt
  8963.   dir */*.txt
  8964.   dir */*/*.txt
  8965.   dir .*
  8966.   dir /recursive .*
  8967.   dir /dotfiles
  8968.   dir /dotfiles /recursive
  8969.   dir foo (where "foo" is a directory name)
  8970.   dir .
  8971.   dir ..
  8972.  
  8973. Obviously there are many more combinations, but these are the only ones
  8974. that affect which files are shown and which ones aren't.  Also checked:
  8975.  
  8976.   \ffiles(*)
  8977.   \frfiles(*)
  8978.   \fdirectories(*)
  8979.   \frdirectories(*)
  8980.  
  8981. These work too, with both SET WILD KERMIT /MATCH-DOT and /NO-MATCH-DOT.
  8982.  
  8983. But then there was some new trouble matching dotfiles in certain contexts, for
  8984. example "dir {{*,.*}}" or "dir [.abc]".  Made a minor correction to ckmatch()
  8985. for this.  ckclib.c, 12 Jan 99.
  8986.  
  8987. Updated HELP IF text.  ckuus2.c, 12 Jan 99.
  8988.  
  8989. Changed TRANSMIT in the text / prompt 0 / pause 0 / echo off case to send
  8990. 1K buffers rather than lines.  Speeds up transmission by about 35% in this
  8991. case.  Didn't bother with binary mode since nobody uses it anyway, and the
  8992. changes for that are a bit harder.  ckuus4.c, 13 Jan 99.
  8993.  
  8994. Updated HELP DIR, HELP SWITCH, HELP SET FILE, and HELP WILDCARD text.
  8995. ckuus2.c, 13 Jan 99.
  8996.  
  8997. Got tired of hunting for things in the SHOW FEATURES compiler options list,
  8998. so changed SHOW FEATURES to sort them.  Also fixed the paging, which had
  8999. drifted a bit with new additions.  ckuus5.c, 13 Jan 99.
  9000.  
  9001. Added DIR /[NO]XFERMODE.  If /XFERMODE is included, the directory listing
  9002. shows the transfer that would be used for each based on the current patterns.
  9003. If none is shown, then the filename doesn't match any patterns.  This seems
  9004. like a useful addition to a Kermit directory listing.  ckuusr.h, ckuus6.c,
  9005. 13 Jan 99.
  9006.  
  9007. Added DIR /[NO]BACKUP.  If /NOBACKUP is included, backup files (*.~*~) are
  9008. not shown.  ckuusr.h, ckuus6.c, 13 Jan 99.
  9009.  
  9010. Added SEND /NOBACKUP.  If /NOBACKUP is included, backup files are not sent.
  9011. ckuusr.[ch], ckuusx.c, ckcfns.c, 13 Jan 99.
  9012.  
  9013. Added SET SEND BACKUP { ON, OFF } to establish the global setting that SEND
  9014. /NOBACkUP would override (SET RECEIVE BACKUP too, for symmetry, but it does
  9015. nothing - just prints a message).  Added SET SEND BACKUP status to SHOW
  9016. PROTOCOL.  ckuusr.h, ckuus[47].c, 13 Jan 99.
  9017.  
  9018. Updated docs and help text.  ckermit2.txt, ckuus2.c, 13 Jan 99.
  9019.  
  9020. TRANSMIT was not always sending its last buffer in text mode.  I don't think
  9021. it ever did.  Fixed in ckuus4.c, 14 Jan 99.
  9022.  
  9023. Changed nzltor() (local-to-remote filename converter) to (a) replace space by
  9024. underscore rather than X, (b) replace tilde by hyphen rather than X, and (c)
  9025. translate non-ASCII chars to ASCII.  The latter works effectively if the file
  9026. character-set has been properly set; otherwise it's no worse than before (this
  9027. does not address the larger question of proper translation of filenames).
  9028. Converted filenames are now much more readable, especially backup files:
  9029. foo.bar.~3~ becomes FOO_BAR.-3- rather than FOO.BARX3X, and accented letters
  9030. lose their accents rather than coming across (in most cases) as box-drawing
  9031. characters, etc.  ckufio.c, 14 Jan 99.
  9032.  
  9033. Trials show that the time to sort a directory listing is imperceptible, at
  9034. least compared with the time to read the directory, so I made /SORT:NAME the
  9035. default except in VMS, where directory names are returned in alphabetical
  9036. order anyway.  I did not do this for server-generated directory listings --
  9037. that is a much bigger project, deferred til next time.  ckuus6.c, 14 Jan 99.
  9038.  
  9039. Updates to Minix 2.0 support from Terry McConnell, Syracuse U, ckcdeb.h,
  9040. ck[tu]fio.c, makefile, 14 Jan 99.
  9041.  
  9042. Lots of #ifdef adjustments, casts, etc, for building different configurations,
  9043. many modules, 14 Jan 99.
  9044.  
  9045. winchh() and sw_armed were used in ckctel.c but unknown to them.  I thought I
  9046. could move them from ckcnet.c to ckctel.c, but that didn't work, so I left
  9047. them in ckcnet and extern'd them from ckctel.  Builds OK, but NAWS operation
  9048. needs to be checked.
  9049.  
  9050. Somebody did something to utmp.h in Linux recently which makes it impossible
  9051. for any application that includes that file to have variables, functions, or
  9052. macros called local, screen, telnet, rlogin, xterm, rsh, ftp, unknown, or X
  9053. (see "enum utlogin").  Swell.  (This was noticed in mklinux, but not in the
  9054. Intel version -- same kernel number; double swell.)  There was no good way to
  9055. avoid the conflict, so (a) I renamed our screen() routine to ckscreen(), along
  9056. with all references to it.  (b) was harder, since there are about 1000
  9057. occurrences of the string "local" in the C-Kermit source, some of them
  9058. embedded in other strings (e.g.  "localtime()") or in comments or text); I
  9059. wasn't about to change all of them at the last minute.  Adding -Dlocal=cklocal
  9060. doesn't help either; enums are "too powerful".  The obvious solution was to
  9061. build for Linux with -DNOWTMP, but that would eliminate some prominent
  9062. convenience items, not to mention IKSD logging.  Because of the utter
  9063. stupidity of the C language, there was no way to #include <utmp.h> and avoid
  9064. these conflicts, so finally I just hardwired the needed definitions from
  9065. utmp.h and utmpbits.h into ckufio.c.  YUK!!!  14 Jan 99.
  9066.  
  9067. The new TELOPT macros defined in ckctel.h were too complex for some compilers
  9068. (preprocessors) to handle so Jeff added a -DNOTOMACROS switch and accompanying
  9069. code to allow their replacement by compiled functions.  Also, a correction
  9070. from Jeff to logstr().  ckctel.[ch], ckuusx.c, 14 Jan 99.
  9071.  
  9072. Discovered the base Solaris entry had not been converted from ckucon to ckcns.
  9073. Fixed in makefile, 14 Jan 99.
  9074.  
  9075.  hpux500wintcp -- try with xermit.
  9076.  look for prototype for inet_ntoa() in hpux headers.
  9077.  
  9078. aos kermit got a stack dump / traceback because free() was called from
  9079. close() which was called (on the tty) from _exit.  Hmmm -- not Kermit's
  9080. problem.
  9081.  
  9082. --- Beta.03 ---
  9083.  
  9084. Corrections from Jeff to IKS negotiations: ckctel, ckcnet, ckuus4, ckcpro;
  9085. plus some character-set fixes: ckouni, 17 Jan 99.
  9086.  
  9087. Moved extern int nnets outside of #indef NODIAL so -DNODIAL builds would work.
  9088. ckuus7.c, 17 Jan 99.
  9089.  
  9090. Added missing "Solaris 7 implies Solaris 2.6" clause to ckcdeb.h, 17 Jan 99.
  9091.  
  9092. Some shuffling of #ifdefs in an attempt to fix broken compilation on Sinix
  9093. 5.43 and Pyramid.  Generalized the "gettimeofday takes one arg instead of two"
  9094. business, instead of making it specific to Motorola SV88R4.  ckutio.c,
  9095. 17 Jan 99.
  9096.  
  9097. Removed iks_wait() call that was in the middle of REMOTE command parsing.
  9098. No actions should occur until after cmcfm().  This was making "(OK)" messages
  9099. appear in the middle of typing any REMOTE command.  ckuus7.c, 17 Jan 99.
  9100.  
  9101. Some #ifdef juggling for HP-UX 10.01 to eliminate compiler warnings about
  9102. select() and localtime().  ckutio.c, 18 Jan 99.
  9103.  
  9104. From Jeff: Some additional changes for VOS; expanded TELOPT command;
  9105. various modules, 18 Jan 99.
  9106.  
  9107. New TELOPT command options are "ao", "ayt", "break", "cancel", "ec", "el",
  9108. "eof", "eor", "ga", "ip", "dmark", "do", "dont", "nop", "sb", "se", "susp",
  9109. "will", "wont".  This lets us send any Telnet command at all; e.g. as a probe
  9110. to see if the connection is up (e.g. NOP).  (I changed some of the return
  9111. codes; pls check.)  ckuusr.c, 18 Jan 99.
  9112.  
  9113. Tested this a bit, using TELOPT NOP or TELOPT DMARK as a probe.  If I kill
  9114. the remote process, these still succeed, even if I wait a while first.  The
  9115. second one fails.  Seems strange -- how do we document this?  "To see if the
  9116. server is still there, use "telopt nop, telopt nop, if success ..."
  9117.  
  9118. Refined the "Negotiations....(OK)" suppression code a bit.  Much better now,
  9119. but still not perfect.  More later...  ckctel.c, 18 Jan 99.
  9120.  
  9121. Got access to an SCO 3.2V4.2 system and made necessary adjustments to get
  9122. successful builds, mainly #including <sys/time.h> and linking with -lsocket
  9123. so we can use gettimeofday for the high-precision timers, etc.  I'm not sure
  9124. if no-net systems can run a binary that is linked with -lsocket, but let's
  9125. hope so...  Converted these entries to xermit, since we can use select().
  9126. makefile, cku[ft]io.c, ckuver.h, 19 Jan 99.
  9127.  
  9128. Added sco32v4ns entry to build a version that does not use the sockets
  9129. library, select(), or gettimeofday(), just for safety.  Also, this was a good
  9130. verification that -DNOGFTIMER still does its job.  makefile, 19 Jan 99.
  9131.  
  9132. Took all the -DNOSETBUF's out of the makefile and just set it in ckcdeb.h.
  9133. (I thought I had done this before...)  makefile, 19 Jan 99.
  9134.  
  9135. Fixed IKSD not to refuse to send a file just because client does not have
  9136. TERM AUTODOWLOAD ON.  ckcpro.w, 19 Jan 99.
  9137.  
  9138. Some changes from Jeff for K95 keyboard settings.  ckuusr.h, ckuus7.c,
  9139. 19 Jan 99.
  9140.  
  9141. From Jeff, 20 Jan 99:
  9142.  . Fix bug in CLEAR INPUT: ckuusr.c.
  9143.  . Help text for SET TERM DG-UNIX-MODE: ckuus2.c.
  9144.  . Added table of DEC keyboard (terminal) languages + parsing: ckuus7.c.
  9145.  
  9146. Fixed some bad notation in the IRIX 6.4 entry (-OPT:Olimit=3000 should have
  9147. been -Olimit 3000; the former notation is not used until IRIX 6.5, silly me).
  9148. makefile, 20 Jan 99.
  9149.  
  9150. Added "-b elf" to SCO 5.0.4 and .5 non-gcc entries to avoid making COFF
  9151. binaries (which is bad because...?).  makefile, 20 Jan 99.
  9152.  
  9153. Added HPUX6 and HPUX7 symbols to the appropriate makefile entries, since all
  9154. the other HPUX's had their own.  Added custom banners for HPUX 6 and 7.  Added
  9155. code to the network module to include <arpa/inet.h> for all HPUX except 7 to
  9156. pick up the inet_ntoa() prototype (7 is excluded because it does not seem to
  9157. have this header file, even though all the others do).  makefile, ckuver.h,
  9158. ckcnet.c, 20 Jan 99.  (Builds OK with previous warnings gone on HPUX 9 and 10.)
  9159. (Later confirmation received on HPUX 6 and 7.)
  9160.  
  9161. NOSPL builds were failing due to unguarded references to mjd() in the
  9162. connection log writer.  Changed ckcdeb.h to set NOLOGDIAL if NOSPL was set.
  9163. 20 Jan 99.
  9164.  
  9165. Fixed some typos in ckermit2.txt.  20 Jan 99.
  9166.  
  9167. Added code to display READ.ME file from current directory at startup if
  9168. srvcdmsg != 0 (mainly for iksd).  ckuus5.c, 20 Jan 99.
  9169.  
  9170. Should TERM AUTODOWNLOAD be ON by default in C-Kermit (as it is in K-95)?
  9171.  . No, because the book says it isn't.
  9172.  . No, because C-Kermit is very likely to be in middle.
  9173.  
  9174. But then what about when it is a client of IKSD?  In that case it should be
  9175. ON so SEND from the IKSD prompt will always work.  But then if it's in the
  9176. middle, we'll still have trouble if the local Kermit also has it on.
  9177.  
  9178. So what are the choices?
  9179.  . Leave it alone.  But this makes IKSD look bad.
  9180.  . Make it on by default?  Causes confusion when C-Kermit in the middle.
  9181.  . Turn it on automatically when client of IKSD?  (Save & restore)
  9182.  
  9183. Well, yes, obviously we want it on when we're a client of IKSD.  That's not
  9184. the question -- the question is what do we do about the other, more local,
  9185. Kermit that might also have it on?  There's nothing we CAN do, so don't worry
  9186. about it.  Ideally, then, we would change SET TERM AUTODOWNLOAD { ON, OFF }
  9187. to { ON, OFF, AUTO }, with AUTO being the new default, meaning "enable
  9188. autodownload automatically if I make a connection to an IKSD".  And I started
  9189. to do it that way, but ran into conflicts with K95, which has a different and
  9190. conflicting set of keywords, plus it was not obvious where the automatic
  9191. switching should be done, nor where to undo it when the connection is broken
  9192. or some other negotiation would change the rules.  So I simply made the
  9193. default be ON for all C-Kermits as well as K95.  It's a lot easier to explain
  9194. this way, and in fact the book goes into some detail about it in several
  9195. places.  ckcmai.c, 20 Jan 99.
  9196.  
  9197. Changed SET FLOW AUTO to always SET FLOW NONE when making a direct serial
  9198. connection, rather than setting it to RTS/CTS just because we know we can.
  9199. The latter turned out to be a bad idea because a direct connection is very
  9200. likely not to be giving us the CTS signal (or even have a wire for it), so any
  9201. attempt to write will just hang.  setflow(): ckuus3.c, 20 Jan 99.
  9202.  
  9203. Changed "kermit -l" to also call setflow(), so we get consistent behavior
  9204. with command-line and interactive device opening and i/o.  ckuusy.c, 20 Jan 99.
  9205.  
  9206. SINIX 5.43 changed gettimeofday() to have one arg instead of two.  Added
  9207. appropriate #ifdefs to ckutio.c, defines to the makefile entry, and a
  9208. designer herald in ckuver.h.  20 Jan 99.
  9209.  
  9210. Added -DSELECT -DNOGETUSERSHELL to pyrdcosx entry.  makefile, 20 Jan 99.
  9211.  
  9212. Fixed some long lines in ckuus2.c, 20 Jan 99.
  9213.  
  9214. Changed BSDI product name from BSD/386 to BSD/OS, to reflect current usage
  9215. since the 1.1 release.  makefile, ckuver.h, 20 Jan 99.
  9216.  
  9217. Lots of changes from Jeff to get rid of non-CKOUNI possibility in K95.
  9218. Many modules, 20 Jan 99.
  9219.  
  9220. Bug: "xif 1 { input 10 ), echo Thanks: [\v(input)] }" produces garbage because
  9221. the ")" caused the enclosing "\flit()" (which is used internally by XIF and
  9222. friends to prevent premature evaluation of its command blocks) to terminate
  9223. early.  Fixed in litcmd() by quoting any unbalanced right parentheses.  Also
  9224. added a destination length argument to litcmd() to prevent memory leaks.  Also
  9225. removed some really obnoxious debug() calls from litcmd().  ckuusr.h,
  9226. ckuus[56].c, 21 Jan 99.
  9227.  
  9228. Changed ODT 3.0 makefile entry not to contain an underscore, since these don't
  9229. show up when underlined (e.g. in Web links).  makefile, 21 Jan 99.
  9230.  
  9231. Stripped out some obsolete comments from ckuus4.c, 21 Jan 99.
  9232.  
  9233. Added a note about new TELOPT operands and cleaned up some typos in
  9234. ckermit2.txt, 21 Jan 99.
  9235.  
  9236. Fixed the "Negotiations... (OK)" message again.  The idea is: don't print
  9237. "Negotiations" unless we get a timeout from tn_wait().  Once we get a timeout
  9238. and print "Negotiations", then print "." every second till the wait is up,
  9239. then print "(OK)".  Don't print dots or "(OK)" if we didn't print
  9240. "Negotiations".  Don't print "(OK)" twice.  AND... only do this upon initial
  9241. connection, not during the session.  This way, most people will never see
  9242. this message; it will only appear when the connection is taking a long time,
  9243. to let them know Kermit isn't dead.  ckctel.c, 21 Jan 99.
  9244.  
  9245. Moved lower() to ckclib, and renamed it to cklower().  ckucmd.c, ckuus5.c,
  9246. ckclib.[ch], 21 Jan 99.
  9247.  
  9248. Got rid of xindex() and replaced all references to it by references to
  9249. ckstrchr(), which is in ckclib.  ckufio.c, 21 Jan 99.
  9250.  
  9251. New HP-UX makefile entries from Peter Eichhorn; updated "+/-/?" notations in
  9252. comments at the top for C-K 7.0.  makefile, 25 Jan 99.
  9253.  
  9254. Some compilers have started to choke on "too many defines" in ckuusr.h.  Put
  9255. large blocks of K95-specific defines in #ifdef OS2..#endif, Telnet-specific
  9256. defines in #ifdef TNCODE..#endif, etc.  ckuusr.h, ckuus2.c, 25 Jan 99.
  9257.  
  9258. From Jeff: TELNET /PASSWORD:<pswd>, SET HOST /PASSWORD:<pswd>, for SRP enabled
  9259. versions of C-kermit.  To allow scripted operation of SRP connections.  Still
  9260. need to figure out how to allow users to call SET LOGIN PASSWORD <pwd> in K95
  9261. without the <pwd> being provided in an encrypted form.  But for now, SET LOGIN
  9262. PASSWORD will set a flag in K95 indicating that is where the password came
  9263. from so we know whether or not to decrypt it in ckuath.c Also, added support
  9264. for Preauthenticated Kerberos IV Ticket Getting Tickets, AUTH K4 INIT
  9265. /PREAUTH.  This provides an added layer of security by requiring that the
  9266. user's password be used to encrypt the ticket getting ticket request.  By
  9267. configuring the server to require pre-auth ticket requests it becomes nearly
  9268. impossible for an unauthorized user to request a TGT.  Unfortunately, this
  9269. does not work in K95 because Leash does not include the necessary
  9270. functionality.  It does work in C-Kermit.  ckcnet.c, ckcmai.c, ckuus7.c,
  9271. ckuus3.c, ckuath.h, ckuusx.c, ckuusr.c, ckuath.c, 25 Jan 99.
  9272.  
  9273. Looking at recursive transfers in VMS...
  9274.  
  9275.  . SEND /RECURSIVE actually works as it should, as long as it's given the
  9276.    a filespec containing "...".  The code is already there to accept the
  9277.    switch and set SEND PATHNAMES to RELATIVE automatically, and the files
  9278.    are indeed sent with relative pathnames.
  9279.  
  9280.  . GET /RECURSIVE did not set RECEIVE PATHNAMES RELATIVE, so I fixed that.
  9281.    ckuus6.c, 26 Jan 99.
  9282.  
  9283.  . I considered inserting "..." into the filespec, but that would be going
  9284.    overboard, plus how would it work in the middle of a parse, e.g. when "?"
  9285.    was typed in the filename, etc.  Also, not all filespecs lend themselves to
  9286.    this, e.g. in "define foo [somedir], send /recursive foo:*.*" there is no
  9287.    place to put the "..." ("foo:[...]*.*" doesn't work).
  9288.  
  9289. The /RECURSIVE switch for GET was in #ifdef RECURSIVE.  That was wrong -- the
  9290. client should be able to send this request to the server, even if the client
  9291. itself does not support recursive transfers.  The #ifdef was removed.  And for
  9292. symmetry, I added RECEIVE /RECURSIVE, which simply sets RECEIVE PATHNAMES to
  9293. RELATIVE.  ckuus6.c, ckermit2.txt, 26 Jan 99.
  9294.  
  9295. Discovered that when C-Kermit receives a file that has the same name as an
  9296. existing file into a directory that has many thousands of files (and FILE
  9297. COLLISION is BACKUP or RENAME), it can take a loooong time to make the backup
  9298. file name, since Kermit has to read the whole directory to find out which, if
  9299. any, backup files already exist.  The delay might be as long as 10-20 seconds,
  9300. even a full minute.  But C-Kermit 6.0 takes hardly any time at all in the same
  9301. directory.  Is it because of the new pattern matcher (ckmatch() instead of
  9302. match())?  Putting back match() makes it take even longer.  traverse() is the
  9303. culprit: it's now calling isdir() on every single file, which turns out to be
  9304. a surprisingly expensive call.  A little thought revealed it was OK to skip
  9305. the call to isdir() in the nonrecursive case, since higher-level code will
  9306. take care of filtering out unwanted directory files.  ckufio.c, 26 Jan 99.
  9307.  
  9308. Back to VMS...  Compilation of ckuusr.c blows up due to new #ifdefs in
  9309. ckuusr.h; it is now necessary to #include ckcnet.h before ckuusr.h, rather
  9310. than after, so the various TCP-related symbols will be defined before they are
  9311. referenced in #ifdefs in ckuusr.h.  ckuusr.c, 26 Jan 99.
  9312.  
  9313. Next problem:  GET /RECURSIVE, when sent to a VMS server, always results in
  9314. "Receive window full", even though it works fine with a UNIX server.  Why?
  9315. Once again, spurious #ifdef RECURSIVE..#endif around the supporting code.
  9316. #ifdefs removed and the command now works.  ckcpro.w, 26 Jan 99.
  9317.  
  9318. Except that it's sending the pathnames in VMS format rather than standard
  9319. (UNIX) format.  Why?  Because the client said to (K95 has FILE NAMES LITERAL
  9320. by default).  This is a problem because what is a non-VMS client going to do
  9321. with VMS-format directory names?  Unfortunately, the "fncnv" (filename
  9322. conversion) flag is overloaded in this case: we might want to leave the file
  9323. names unconverted but still need to convert the directory path syntax.  This
  9324. doesn't affect UNIX (even though it has the same bug) because its path syntax
  9325. is the same as the standard one.  To work around the problem for VMS only, I
  9326. made an additional check in nzltor(), so now we convert the path syntax if
  9327. FILE NAMES are CONVERTED *or* if the system ID of the other Kermit is not "D7"
  9328. (the VMS system ID).  ckvfio.c, 26 Jan 99.
  9329.  
  9330. Additional SNI stuff from Jeff for K95.  ckuusr.h, ckuus7.c, 26 Jan 99.
  9331.  
  9332. Minor SNI and help-text changes from Jeff.  ckuus[27].c, 28 Jan 99.
  9333.  
  9334. Added horizontal text lines to mark entry to and exit from CONNECT mode (when
  9335. not quiet).  These are done only in the CONNECT modules, not in the mainline
  9336. code, since terminal-emulating versions should not do this.  Also the lines
  9337. are not printed if QUIET is set or during APC transitions.  ckucns.c,
  9338. ck[duv]con.c, 28 Jan 99.
  9339.  
  9340. If XFER DISPLAY is FULLSCREEN but terminal type is not recognized, fall back
  9341. to CRT display, rather than SERIAL.  ckuusx.c, 28 Jan 99.
  9342.  
  9343. Added missing help text for SET SEND BACKUP.  ckuus2.c, 28 Jan 99.
  9344.  
  9345. "send /recursive ." doesn't work any more, even though "send ." does.  "send
  9346. /recursive .." doesn't work any more, even though "send .." does.  "send
  9347. /recursive /full/path/name" has gone back to trying to read the entire file
  9348. system.  Sounds familiar?  This was all fixed on Jan 7th, but then broken
  9349. again some time before Jan 14th.  Fixed again today.  ckufio.c, 28 Jan 99.
  9350.  
  9351. Now all the tests from Jan 12th work except "dir /recursive oofa.txt", which
  9352. fails to recurse.  One more tiny tweak fixes this and now all tests work
  9353. again.  ckufio.c, 28 Jan 99.
  9354.  
  9355. Fixed SET OPTIONS DIRECTORY /NOBACKUP, which wasn't working due to a typo.
  9356. ckuus6.c, 28 Jan 99.
  9357.  
  9358. Changed the server end of REMOTE DIRECTORY to obey SET OPTIONS DIRECTORY
  9359. /[NO]HEADING, /[NO]DOTFILES, and /[NO]BACKUP.  In UNIX only, sorted the
  9360. directory by name (because in UNIX, we have access to the list pointer).
  9361. ckcfns.c, ckermit2.txt, 28 Jan 99.
  9362.  
  9363. Fixed server end of REMOTE DIRECTORY to be compatible with local directory
  9364. listing format -- no more "<DIR>" in UNIX, show symlinks, don't always
  9365. show full pathname (but do show it in headings).  ckcfns.c, 29 Jan 99.
  9366.  
  9367. Changed date-time string shown in directory listings when actual date/time
  9368. can't be obtained from ????-??-?? ??:??:?? to 0000-00-00 00:00:00, so as
  9369. not to put non-digits in numeric fields.  ckcfns.c, ckuus6.c, 29 Jan 99.
  9370.  
  9371. "remote directory | sort -r" was sending "| sort -r" as the filespec
  9372. to the server, oops.  However, "remote directory | sort -r > foo" works as
  9373. expected.  This was a bug in remtxt(), fixed in ckuus7.c, 29 Jan 99.  Now we
  9374. can pipe incoming directory listings through local filters for display on
  9375. the screen, e.g. to sort in reverse chronological order, etc.  Documented
  9376. this in ckermit2.txt Section 5.3.2.
  9377.  
  9378. The C-Kermit server drops a character from the directory listing at the end of
  9379. each packet, as you can easily see by restricting the packet length to (say)
  9380. 30 (it's not quite so obvious when the packet length is 8000).  But it's not
  9381. nxtdir()'s fault, because nxtdir() returns every character from the listing.
  9382. In fact, sdata() is being called with a length that is 1 less than the actual
  9383. number of characters obtained from nxdir().  This problem has nothing to do
  9384. with recent changes to REMOTE DIRECTORY since REMOTE TYPE has the same
  9385. problem, and also REMOTE DELETE, REMOTE HELP, and any other command
  9386. implemented by sndblah()/nxtblah().  In fact, it's been there for quite some
  9387. time.  But it doesn't happen in regular file transfer, so what's the
  9388. difference?  ... Aha, it's in getpkt() -- the manipulation of the "first" flag
  9389. (governing lookahead and EOF) was not totally copied from the input-from-file
  9390. case to the input-from-function and other cases.  Fixed in getpkt(), ckcfns.c,
  9391. 29 Jan 99.
  9392.  
  9393. From Jeff:  Command interface for KLOGIN and EKLOGIN:
  9394. RLOGIN /ENCRYPT /KERBEROS <host> <userid> <protocol>.
  9395. ckuusr.h ckuus5.c ckuus7.c ckcnet.h ckcnet.c, 29 Jan 99.
  9396.  
  9397. Found some places where the connection log was not being written, namely
  9398. in the TELNET and RLOGIN commands.  Fixed in ckuus[3r].c, 29 Jan 99.
  9399.  
  9400. The confusion between CLOSE CONNECTION and CLOSE CONNECTION-LOG was just too
  9401. dangerous, so even though it's ugly, I changed the name of the connection log
  9402. to "CX log": LOG CX, CLOSE CX[-LOG].  ckuus[r2].c, 29 Jan 99.
  9403.  
  9404. From Jeff: Internal Telnet reset function.  ckctel.[ch], ckcnet.c, 30 Jan 99.
  9405.  
  9406. Due to a typo, the key in DIR /SORT:key was sticky.  Fixed in domydir(),
  9407. ckuus6.c, 30 Jan 99.
  9408.  
  9409. Discovered that IKSD could be suspended with SUSPEND or Z command (but not
  9410. with Ctrl-Z).  SUSPEND/Z also worked when nopush was in effect.  Fixed in
  9411. ckuusr.c, 30 Jan 99.
  9412.  
  9413. Discovered that if you gave a DIRECTORY command to IKSD in a directory that
  9414. can't be read, it would say "?Read permission denied - xxx" where xxx was
  9415. a filename.  Changed cmifi() to not show the filename under these conditions.
  9416. ckucmd.c, 30 Jan 99.
  9417.  
  9418. PRINT command given by IKSD guest gave the wrong error message.  ckuusr.c,
  9419. 30 Jan 99.
  9420.  
  9421. RECEIVE, given by IKSD guest in directory to which it does not have write
  9422. access works when it shouldn't.  But then of course it stops when it goes to
  9423. write out the first bufferful -- the file is not actually created.  But now
  9424. there is about 32K of packets in the pipeline, and all sorts of confusion
  9425. ensues, especially when streaming.  Fixed rcvfil() to precheck write
  9426. accessibility before accepting the file.  ckcfns.c, 30 Jan 99.
  9427.  
  9428. MOVE, SEND /MOVE, etc, were allowed by IKSD to guest users; they did indeed
  9429. send the file, but did not delete it.  Still, it should not give the
  9430. impression that it worked, so a check was added.  ckuusr.c, 30 Jan 99.
  9431.  
  9432. Horizontal-line printing was needed to move to left margin first when
  9433. returning from CONNECT mode due to autodownload or APC.  ckucns.c, ck[uv]con.c,
  9434. 30 Jan 99.
  9435.  
  9436. Traverse() test:
  9437.  
  9438.   dir
  9439.   dir /files
  9440.   dir /directories
  9441.   dir /recursive
  9442.   dir /recursive /files
  9443.   dir /recursive /directories
  9444.   dir oofa.txt
  9445.   dir /recursive oofa.txt
  9446.   dir /recursive *.txt
  9447.   dir *.txt
  9448.   dir */*.txt
  9449.   dir */*/*.txt
  9450.   dir .*
  9451.   dir /recursive .*
  9452.   dir /dotfiles
  9453.   dir /dotfiles /recursive
  9454.   dir foo (where "foo" is a relative directory name)
  9455.   dir .
  9456.   dir ..
  9457.   dir /fullpathname (of a directory)
  9458.   dir /fullpathname (of a file)
  9459.   dir /fullpathname (of filename with wildcards)
  9460.   dir /fullpathname (with wildcards in path)
  9461.   dir /files /fullpathname
  9462.   dir /directories /fullpathname
  9463.  
  9464. All the above work.  The following still try to read the entire file
  9465. system.  Will fix in next Beta:
  9466.  
  9467.   dir /recursive /fullpathname (of a directory)
  9468.   dir /recursive /fullpathname (of a file)
  9469.   dir /recursive /fullpathname (of filename with wildcards)
  9470.   dir /recursive /fullpathname (with wildcards in path)
  9471.   dir /recursive /files /fullpathname
  9472.   dir /recursive /directories /fullpathname
  9473.  
  9474. Add -funsigned-char to sunos41gcc and solaris25g makefile entries.  makefile,
  9475. 30 Jan 99.
  9476.  
  9477. Numerous #ifdef, syntax, and declaration adjustments when building on many
  9478. platforms with different options sets.  Many modules, 30-31 Jan 99.
  9479.  
  9480. initopts() was dumping core on some platforms -- char pointers not init'd
  9481. to NULL before calling makestr() on them.  ckuus5.c, 31 Jan 99.
  9482.  
  9483. --- Beta.04 ---
  9484.  
  9485. From Jeff: command interface for RLOGIN /K4 /K5 /ENCRYPT; rlogin (except for
  9486. window size) is working again on Unix; rlogin /k4 (except for window size) is
  9487. now working on Unix (no root required).  ckuusr.h ckuus7.c ckuus5.c ckcnet.c
  9488. ckcnet.h ckctel.c ckctel.h ckuath.h ckuat2.h ckuath.c ck_crp.c, 1 Feb 99.
  9489.  
  9490. Server side remote directory file lister didn't have enough %s's in format
  9491. string for non-perms case.  ckcfns.c, 1 Feb 99.
  9492.  
  9493. Fixed some long lines in ckuus2.c, 1 Feb 99.
  9494.  
  9495. The HP-UX 5.00 Wollongong TCP/IP build suddenly stopped working because
  9496. of complaints about inet_addr(), e.g.
  9497.  
  9498.   "ckcnet.c", line 3411: operands of = have incompatible types
  9499.  
  9500. where line 3411 is:
  9501.  
  9502.   saddr.sin_addr.s_addr = inet_addr(tcp_address);
  9503.  
  9504. inet_addr() can NEVER NEVER NEVER be used without including the #ifdef INADDRX
  9505. code around it.  Evidently a lot of calls to inet_addr() were added since
  9506. Beta.02, which is the last time I built on this system.  This means that
  9507. builds that use INADDRX won't work.  Unfortunately this is the only platform I
  9508. have access to that needs it, and it can be accessed only by special
  9509. arrangement, since it is normally kept turned off, and every compilation takes
  9510. several hours.  Fixed in ckcnet.c, 2 Feb 99.  Fortunately this is not a
  9511. show-stopper for Beta.04, since only very old UNIX versions need this, like
  9512. Integrated Solutions Inc V8S VME 68020 and Motorola Delta System V/68 R3V5.
  9513.  
  9514. Added an hpux500 makefile entry (no net).  2 Feb 99.
  9515.  
  9516. Although ckutio.c does not reference bzero(), somehow it is being referenced
  9517. from the generated object file (nm ckutio.o | grep bzero) in HPUX 5.00.
  9518. So I added a bzero stub to ckutio.c only for HPUX 5.00, only for the no-net
  9519. build.  2 Feb 99.  (Later it turned out that a macro defines memcpy or memset
  9520. as bzero somewhere...)
  9521.  
  9522. Removed references to INADDRX for DG/UX from makefile and ckcnet.h.  2 Feb 99.
  9523.  
  9524. More from Jeff on Kerberized Rlogin.  ckcnet.[ch], ckuus[47], etc, 2 Feb 99.
  9525.  
  9526. From Jeff: Fix a bug in which return value of ckgetpeer() was not checked for
  9527. NULL when writing wtmp record, causing IKSD to crash when accessed by a host
  9528. that could not be found in DNS.  And fix ckgetpeer() itself to return the
  9529. peer's IP address if it can't get the name.  ckufio.c, ckcnet.c, 4 Feb 99.
  9530.  
  9531. Fix from Jeff for draining problem.  ckcfn2.c, ckctel.c, 6 Feb 99.
  9532.  
  9533. For some weeks now there has been a problem with the VMS UCX version: when
  9534. sending files on a TCP/IP connection with streaming, the transfer gets stuck
  9535. after sending the EOF (Z) packet; the Z packet is sent OK, but C-Kermit never
  9536. reads the ACK.  Ctrl-C'ing out and CONNECTing back reveals the ACK still
  9537. sitting there waiting to be read.  And yet: (a) This does not happen in
  9538. non-UCX VMS versions or in UNIX versions; (b) it does not happen in the UCX
  9539. version when the debug log is turned on.  The problem was traced to netinc();
  9540. it seemed that once select() failed, it would never succeed again.  Jeff
  9541. guessed that a failing select() in UCX (and who knows where else) might alter
  9542. its parameters ("help cc socket_routines select" was uninformative), and that
  9543. moving the select() initialization (FD_ZERO(), FD_SET() into the for-loop
  9544. would fix the problem, and indeed that seems to have done the trick.
  9545. ckcnet.c, 7 Feb 99.
  9546.  
  9547. UNIX C-Kermit was failing to send the first byte of each file (or actually,
  9548. the first byte of each 32K bufferful read from disk) due to a typo in a debug
  9549. statement I added to zinfill() after Beta.04 was released.  Fixed in ckufio.c,
  9550. 7 Feb 99.
  9551.  
  9552. From Lucas Hart: Fixed osf makefile entry to pass CC and CC2 values along,
  9553. and add a du40gcc tarket.  makefile, 7 Feb 99.
  9554.  
  9555. Fixed various minor syntactic warnings from gcc on DU 4.0.  ckcfn2.c,
  9556. ckuus[rx].c, 7 Feb 99.
  9557.  
  9558. Another mysterious problem...  After releasing Beta.04, I finally was able to
  9559. build on AIX 4.1, but discovered that it had suddenly and for no apparent
  9560. reason started exhibiting the "terminal buffering reset after using curses"
  9561. problem, so that characters typed at the prompt would not echo until Return
  9562. was pressed, even though concb() had been been called to put the console back
  9563. in CBREAK mode.  This did not happen on earlier C-Kermit builds on AIX 4.1,
  9564. nor does it happen in the current build on AIX 4.2 or 4.3, nor, as far as I
  9565. can tell, on any other platform either.  The classic remedy to this problem is
  9566. to use newterm() rather than initscr() to initialize curses, accomplished by
  9567. adding -DCK_NEWTERM to the makefile entry.  This seems to have fixed the
  9568. problem.  I wonder if this means the same should be done in later AIX
  9569. versions, even though we presently have no adverse symptoms.  makefile,
  9570. 8 Feb 99.
  9571.  
  9572. Jeff pointed out that the server does not set the success flag internally
  9573. when it executes a command that generates a short-form response.  Fixed in
  9574. ckcpro.w, 8 Feb 99.
  9575.  
  9576. IKSD was improperly calling syscmd() to check disk space (of course, it didn't
  9577. work, but it was acting like it did -- returning an empty report rather than
  9578. an error).  Unfortunately, there is no good way to internalize disk-space
  9579. checking code in UNIX since the methods for doing so are COMPLETELY unportable
  9580. (and unreliable), so I made the server return an appropriate error when given
  9581. a REMOTE SPACE command and nopush is effective.  ckcpro.w, 8 Feb 99.
  9582.  
  9583. There were a few lingering problems with directory-tree recursion.  As noted
  9584. above, "dir /recursive /xxx", where /xxx was any full path (i.e. starting with
  9585. slash), would appear to hang because it was reading the whole file system.
  9586. Also "dir /recursive .." did not work at all.  Also "dir /recursive ." gave
  9587. incomplete results.  These were fixed by slightly altering the decision about
  9588. whether to recurse in UNIX traverse(), without breaking anything else, except
  9589. "dir /recursive blah" (where blah is a filename with no wildcards); this was
  9590. fixed by adding one more condition to the same decision.  Now we seem to pass
  9591. all tests.  ckufio.c, 8 Feb 99.
  9592.  
  9593. Changed sinix543 makefile target to sni543, and added sni544.  SNI says the
  9594. name SINIX was dropped after 5.42 in favor of Reliant UNIX.  makefile,
  9595. ckuver.h, 8 Feb 99.
  9596.  
  9597. Added Ctrl-Z (and ^Z+0x80) to SET PREFIXING CAUTIOUS to accommodate
  9598. connections to UNIX hosts that have old versions of C-Kermit that don't know
  9599. how to disable SIGTSTOP.  ckcmai.c, 8 Feb 99.
  9600.  
  9601. \v(lockdir) lopped off the final character of the directory name on some
  9602. systems (e.g. Linux) but not others.  Fixed in nvlook(), ckuus4.c, 8 Feb 99.
  9603.  
  9604. Fixed ckutio.c (again) to use the right #ifdef around gettimeofday().
  9605. 9 Feb 99.
  9606.  
  9607. Removed -K option from sni54[34] entries, where it is no longer valid.
  9608. makefile, 9 Feb 99.
  9609.  
  9610. Fixed local SPACE command to error out if nopush and an external command or
  9611. program is required.  ckuusr.c, 9 Feb 99.
  9612.  
  9613. Added -DK_NEWTERM to the Linux target, in response to a rash of complaints
  9614. about loss of CBREAK mode on tty after curses display.  Did NOT add this to
  9615. the AIX 4.2 and 4.3 entries, even though it was suddenly necessary for 4.1,
  9616. since trials on 4.2 and 4.3 show that it completely hangs the program.
  9617. makefile, 9 Feb 99.
  9618.  
  9619. From Jeff: Preserve user ID and Password around failed SET HOST, TELNET,
  9620. and RLOGIN parses.  ckuus7.c, 9 Feb 99.
  9621.  
  9622. Another correction for #ifdefs around gettimeofday().  ckutio.c, 10 Feb 99.
  9623.  
  9624. Built for the first time on VMS 7.2, and with UCX 5.0, and with TGV 4.2A, and
  9625. with DECC 6.0, and miraculously no source changes were needed.  10 Feb 99.
  9626.  
  9627. Changes from Jeff for Windows-95-specific SET WIN95 items and help text,
  9628. including new SET WIN95 8.3-FILENAMES { ON, OFF }.  ckuusr.h, ckuus[27].c,
  9629. 10 Feb 99.
  9630.  
  9631. Added some casts to suppress warnings about pointers not assignment compatible
  9632. (signed vs unsigned char).  ckcfn2.c, ckcnet.c, 10 Feb 99.
  9633.  
  9634. Folded long lines in ckuath.c, 10 Feb 99.
  9635.  
  9636. Added a missing #ifndef NOSERVER..#endif clause to some code in ckcfn3.c.
  9637. 10 Feb 99.
  9638.  
  9639. Simplified UNIX traverse() to eliminate some redundant function calls.
  9640. ckufio.c, 10 Feb 99.
  9641.  
  9642. Spent some more time with UNIX traverse() to see why it's skipping some files
  9643. it should pick up in some cases, but made little progress.  To be continued.
  9644. ckufio.c, 10 Feb 99.
  9645.  
  9646. Fixes for DG/UX: add declaration for tv, tz to ckutio.c; add NOGETUSERSHELL
  9647. and CK_NEWTERM to, and remove CK_POLL from, makefile entries.  11 Feb 99.
  9648.  
  9649. Verified that SINIX 5.42 does not need CK_NEWTERM.  11 Feb 99.
  9650.  
  9651. Mark Berryman said that "u_int" errors go away in UCX 5.0 builds if you
  9652. #include <if.h>.  This works great in UCX 5.0, but UCX 2.0 has no <if.h>.
  9653. There is also a warning about the data type of the length argument to
  9654. getpeername.  It needs to be unsigned int in UCX 5.0, but signed in previous
  9655. versions.  We need to (a) find a UCX-5.0-unique symbol in the UCX header
  9656. files, or (b) a logical name or symbol we can pick up in the DCL build
  9657. procedure, or (c) create a new build target or somesuch.  11 Feb 99.
  9658.  
  9659. Back to UNIX traverse.  After yesterday's changes, we now pass all tests with
  9660. the following exceptions:
  9661.  
  9662.  1. "dir /recu <filename>" shows directory names as well names of files
  9663.     that match <filename>, which might or might not be wild.
  9664.  
  9665.  2. "dir /recu /tmp" skips most files and directories in /tmp.
  9666.  
  9667. This last one is quite odd, since the same commands work fine in other
  9668. directories on the testbed system.  What's different about /tmp?
  9669.  
  9670. Added zrewind() to ckufio.c.  Rationale: DIRECTORY calls cmifi(), which
  9671. calls zxpand to expand the file list.  If this succeeds, then DIRECTORY itself
  9672. calls zxpand again.  But as long as the same argument and criteria are used
  9673. each time, the second call should be unnecessary -- all we need to do is
  9674. use the list from the first time, which is still there.  zrewind() resets the
  9675. list pointer to the beginning and returns the count.  Obviously this is for
  9676. UNIX only, since other implementations do not necessarily create an internal
  9677. list.  But when it can be used, it cuts the time in half -- quite noticeable
  9678. in long directories.  ckuus[56].c, ckufio.c, 11 Feb 99.
  9679.  
  9680. And of course it also makes debugging easier since we only have one invocation
  9681. of zxpand to deal with...  OK, so back to traverse....
  9682.  
  9683. Hmmm...  traverse() knows whether a file is a directory when it calls
  9684. addresult() to put it on the list.  But then addresult() calls isdir() again
  9685. to find out if its argument a directory.  Added a second parameter to
  9686. addresult() to let the caller tell it in advance whether it's a directory, or
  9687. if it must be looked up.  This eliminates lots of redundant stat() calls and
  9688. speeds things up even more.  After this, and after cleaning up traverse() line
  9689. by line, it all seems to work except for a couple minor glitches that I can
  9690. clean up tomorrow.  ckufio.c, 11 Feb 99.
  9691.  
  9692. With hints from Mark Berryman, added autodetection of UCX 5.0 to CKVKER.COM;
  9693. if detected, it adds UCX50 to CFLAGS.  The issue here is that <if.h> must be
  9694. included in UCX 5.0 to pick up the definition of u_int (and who knows what
  9695. else), but it does not exist in earlier releases.  Corresponding #ifdefs in
  9696. the code take care of the special considerations in the modules.  Now C-Kermit
  9697. builds without complaint and without any special CKVKER.COM command-line
  9698. invocation on UXC 2.0, 4.0, and 5.0 as well as on TGV 4.0.  ckvker.com,
  9699. ckcnet.[ch], ckuus[45].c, 12 Feb 99.
  9700.  
  9701. Fixed the following problem noticed by Jeff: if protocol is XMODEM, then
  9702. RECEIVE /PROTO:KERMIT gives an error if an as-name was not specified.
  9703. doxget(), ckuus6.c, 12 Feb 99.
  9704.  
  9705. Changed the name of zrewind() to zxrewind() to make it look more like a friend
  9706. of zxpand() and not an analog of rewind(), which resets a file pointer, and
  9707. which we might want to add later for some reason.  Added a symbol that says
  9708. whether we can use it, ZXREWIND, and defined it for K95 and UNIX, since Jeff
  9709. added it for K95.  Changed all calls to zxrewind() to be in #ifdef
  9710. ZXREWIND..#endif.  ckcdeb.h, ckufio.c, ckuus[56].c, ckcplm.txt, 12 Feb 99.
  9711.  
  9712. In several spots in cmifi(), zxpand() was called a second time to rewind the
  9713. file list; replaced these calls with zxrewind().  ckucmd.c, 12 Feb 99.
  9714.  
  9715. Ditto in the spot in fneval() where zxpand() was called to rewind the list
  9716. in K95.  ckuus4.c, 12 Feb 99.
  9717.  
  9718. Corrections from Jeff to yesterday's changes, plus new IF AVAILABLE options
  9719. for encryption, SSL, SRP, NTLM, etc, plus a couple =='s that should should've
  9720. been ='s.  Changed AVAIL_blah to AV_blah since macros must be unique within 8
  9721. chars in some cpp's.  ckcpro.w, ckucmd.c, ckuus[26].c, 13 Feb 99.
  9722.  
  9723. Some debug() statements fixed by Lucas Hart, especially one in a VMS section
  9724. of domydir() that referenced a pointer that had not yet been init'd.  ckuus6.c,
  9725. 13 Feb 99.
  9726.  
  9727. From Lucas Hart: fix for VMS isdir() to recognize a search list as a directory
  9728. so (e.g.) "cd sys$manager" can work.  ckvfio.c, 13 Feb 99.
  9729.  
  9730. Added zxrewind() for VMS.  ckcdeb.h (define ZXREWIND for VMS), ckvfio.c,
  9731. 13 Feb 99.
  9732.  
  9733. Hit upon an idea to make /RECURSIVE work for VMS: in fgen(), before the
  9734. lib$find_file() loop, call zfnqfp() to get the full filespec including
  9735. directory brackets, then insert "..." before the closing bracket IF (a)
  9736. "recursive" was set, (b) the argument filespec did not already contain
  9737. "...", and (c) there actually was a closing directory bracket.  Checked
  9738. first to see if LIB$FIND_FILE() itself had an option for recursive
  9739. searching; it doesn't.  This fully enables SEND /RECURSIVE and DIR
  9740. /RECURSIVE, plus GET /RECURSIVE when send to a VMS C-Kermit server, without
  9741. the user having to include "..."  in filespecs, and eliminates lots of
  9742. "buts" and "excepts" in the documentation.  ckcdeb.h (define RECURSIVE for
  9743. VMS), ckvfio.c, ckermit2.txt, 13 Feb 99.
  9744.  
  9745. "dir blah" in VMS did nothing if BLAH.DIR;1 is a directory.  It should do the
  9746. same as "dir [.blah]".  Cause: failure to reset fcount in zxrewind; fixed in
  9747. ckvfio.c and ckufio.c, 13 Feb 99.
  9748.  
  9749. Lucas said that in VMS, "dir foo.dir" should just list the FOO.DIR file,
  9750. rather than the files in [.FOO], as it currently does.  Whereas (I think) "dir
  9751. foo" and "dir [.foo]" should list the contents of the directory rather than
  9752. the directory file itself, as they do now, and as "dir foo" (where foo is a
  9753. directory name) does in UNIX and K95.  Added code to cmifi() to make this
  9754. distinction.  Now "dir [/recursive] foo.dir" (or *.dir, etc) lists directory
  9755. files; the others list contents.  The FOO.DIR -> [.FOO] conversion is skipped
  9756. only when the DIRECTORY command is active, because we need this conversion
  9757. at other times.  ckucmd.c, ckermit2.txt, 13 Feb 99.
  9758.  
  9759. On a similar note, there is no way in UNIX to obtain the "ls -d" behavior,
  9760. i.e. to list a specified directory file, rather than the files in the
  9761. directory.  We'll return to this later...
  9762.  
  9763. Back to UNIX traverse()...  "dir /recursive oofa.txt" lists not only all
  9764. oofa.txt files in the current directory tree, but also each directory that
  9765. contains an oofa.txt file; example:
  9766.  
  9767.   (/w/fdc/tree/) C-Kermit>dir /rec oofa.txt
  9768.   drwxrwx---       512  1999-01-28 16:53:59  subdir/another/          <--
  9769.   -rw-rw----      6067  1999-01-07 21:21:43  subdir/another/oofa.txt
  9770.   -rw-rw----      3537  1999-01-12 18:07:46  subdir/oofa.txt
  9771.   drwxrwx---       512  1999-01-12 20:18:15  subdir/thisdir/          <--
  9772.   -rw-rw----      6067  1999-01-12 16:00:42  subdir/thisdir/oofa.txt
  9773.   -rw-rw----      2192  1999-01-13 11:03:14  oofa.txt
  9774.   (/w/fdc/tree/) C-Kermit>
  9775.  
  9776. It should only list the files themselves; the entries marked by arrows should
  9777. not appear.  Of course, including the /FILES switch produces the desired
  9778. result.  Also, "dir /rec *.txt" does not show this problem.  So that means
  9779. it only happens when the original filespec was wild.  So don't add a directory
  9780. name to the list when recursing if the original filespec was not wild.
  9781. ckufio.c, 13 Feb 99.
  9782.  
  9783. Next: directories whose names start with "." should not be opened if matchdot
  9784. is 0 and if the "." was not specified in the user's pattern.  Fixed by adding
  9785. another test to traverse().  ckufio.c, 13 Feb 99.
  9786.  
  9787. Next: "dir /recursive */*.txt" lists all files in the current directory, even
  9788. if they don't match "*.txt", but correctly selects only *.txt files in lower
  9789. directories.  Changed a comparison.  ckufio.c, 13 Feb 99.
  9790.  
  9791. Next: "dir .*" doesn't list dotfiles anymore unless /DOTFILES included.  Added
  9792. another test.  ckufio.c, 13 Feb 99.
  9793.  
  9794. Now UNIX C-Kermit passes all "traverse.txt" tests in its local DIR command.
  9795.  
  9796. After yesterday's changes, plain old "dir" in VMS acted recursively due to
  9797. missing parens in a while condition; fixed in cmifi().  ckucmd.c, 14 Feb 99.
  9798. Now the VMS version passes all tests.
  9799.  
  9800. Changed VMS zgetfs() to call stat() to get file size and directory status,
  9801. since it can succeed where RMS fails, e.g. when permissions don't allow
  9802. opening.  This removes lots of nasty -1's from the directory listing.
  9803. However, permissions are still lost when the file can't be opened.  ckvfio.c,
  9804. ckcfns.c, ckuus6.c, 14 Feb 99.
  9805.  
  9806. UNIX C-Kermit server's directory listings sent to client did not handle
  9807. symlinks.  Fixed in nxtdir().  ckucmd.c, 14 Feb 99.
  9808.  
  9809. Minor updates from Nigel Roles for Plan 9.  ckucmd.h, ckufio.c, ckpker.mk,
  9810. 14 Feb 99.
  9811.  
  9812. Jeff renamed os2_setflow() to ttsetflow().  ckudia.c, ckuus6.c, 15 Feb 99.
  9813.  
  9814. Updated HELP SET NETWORK text.  ckuus2.c, 15 Feb 99.
  9815.  
  9816. Faced up to the fact the having a single variable for flow control is an idea
  9817. whose time is past.  Added a connection-type switch for SET FLOW, so now SET
  9818. FLOW can take an optional switch (/REMOTE, /TCPIP, /MODEM, etc) to set the
  9819. default flow control for a particular type of connection without affecting the
  9820. others.  Added a flow control table with appropriate flow values for each type
  9821. of connection.  Added SHOW FLOW to show the table plus the current flow
  9822. control.  Got rid of SET FLOW AUTO, since now it's meaningless (the command is
  9823. still accepted, but does nothing).  Now you can flip around among different
  9824. kinds of connections and get the right kind of flow control without thinking
  9825. about it (usually).  NOTE: At first I thought the best default for remote mode
  9826. would be KEEP, but that doesn't work at all when coming in via Telnet -- it
  9827. totally wrecks file transfer.  So for now, at least, it's NONE.  ckcdeb.h,
  9828. ckuusr.h, ckcmai.c, ckuus*.c, ckermit2.txt, 15 Feb 99.
  9829.  
  9830. Setting SIGINT and SIGQUIT to SIG_IGN was left out of the ckucon-to-ckucns
  9831. transition.  It didn't matter in most cases, since ttvt() puts the console
  9832. into raw mode, but in HP-UX, the HP-9000 <RESET> key still raises SIGINT,
  9833. which under these conditions kills C-Kermit when hit twice.  So the
  9834. appropriate signal() calls were added to conect() after the ttvt() call.
  9835. ckucns.c, 15 Feb 99.
  9836.  
  9837. Added SHOW TRANSFER (XFER) to SHOW all the SET TRANSFER items.  ckuusr.h,
  9838. ckuus4.c, 15 Feb 99.
  9839.  
  9840. Filled in new and missing SET TRANSFER items in HELP SET TRANSFER text.
  9841. ckuus2.c, 15 Feb 99.
  9842.  
  9843. Added missing zxrewind() prototype to ckcdeb.h.  15 Feb 99.
  9844.  
  9845. Noticed that if I give a TYPE command at the IKSD> prompt, and the file
  9846. contains any 0xff bytes, these are sent bare, thus forming a random Telnet
  9847. command for the client Changed the TYPE command to double 0xff characters if
  9848. (sstelnet || inserver).  ckuus6.c, 15 Feb 99.  There are probably other places
  9849. where this could happen...
  9850.  
  9851. Added a tgetent() stub for VOS.  ckuusx.c, 15 Feb 99.
  9852.  
  9853. In VMS, we use zrelname() to reduce a fully qualified filespec to a relative
  9854. one, to save space in the directory listing.  Thus if my current directory is
  9855. D0:[FDC] and I say "dir [fdc.text]oofa.txt", it will print "[.TEXT]OOFA.TXT"
  9856. instead of "DISK0:[FDC.TEXT]OOFA.TXT".  However, if my current directory is
  9857. [FDC.TEXT] and I say "dir [-]login.com", it prints "[.TEXT]LOGIN.COM" instead
  9858. of "[FDC]LOGIN.COM" or "[-]LOGIN.COM".  So zrelname() was fixed to take into
  9859. account the case where the current directory is a subdirectory (one or more
  9860. levels down) of the file's directory, in which case it prints [-] or [--],
  9861. etc, for the file's directory.  ckvfio.c, 15 Feb 99.
  9862.  
  9863. From Jeff: some #ifdef adjustments to prevent undefined auth/crypt symbols:
  9864. ckuus6.c; some auth/crypt changes to ckcnet.c and ckuath.c; debugging
  9865. statements added to ckcfn2.c packet/checksum routines.  16 Feb 99.
  9866.  
  9867. From Jeff: initialize lots of automatic variables in functions all over the
  9868. place.  Many modules, 16 Feb 99.
  9869.  
  9870. Back to zrelname() in VMS.  There were some glitches, plus it did not handle
  9871. the case where the file directory is not a subdirectory of the current
  9872. directory, nor vice versa, but the two shared a common ancestor.  ckvfio.c,
  9873. 16 Feb 99.
  9874.  
  9875. Various (CHAR *) / (char *) casts.  ckcfns.c, ckcnet.c, 17 Feb 99.
  9876.  
  9877. The "dironly" and "fileonly" hacks have become unbearable.  A piece of code
  9878. such as domydir() can set or unset them prior to calling (say) zxpand() or
  9879. cmifi(), but loses control the minute the called routine does the same, or
  9880. calls some other routine that might do the same.  So I added a new API:
  9881. nzxpand(s,flags), which is zxpand() with a second argument: flags == 1 means
  9882. files only; 2 means directories only; anything else (normally 0 or 3) means
  9883. files and directories.  I brutally expunged all references to the dironly and
  9884. fileonly variables from all files, and replaced all zxpand() calls in the
  9885. mainline code with nzxpand() (this won't break weird platforms -- see
  9886. ckcdeb.h).  I think everything will work much better now.  ck[duv]fio.c,
  9887. ckvfio.c, ckucmd.c, ckuus6.c, ckcdeb.h, ckcplm.txt, 17 Feb 99.
  9888.  
  9889. Some corrections from Jeff to yesterday's changes.  ckcdeb.h, ckuusy.c,
  9890. ckufio.c, 18 Feb 99.
  9891.  
  9892. Added zrewind() for AOS/VS.  ckcdeb.h, ckdfio.c, 18 Feb 99.
  9893.  
  9894. Changed nzxpand() to be totally parameter-driven; flags word now contains
  9895. flags for dironly, fileonly, matchdot, recursive, etc.  ckcdeb.h, ckcfns.c,
  9896. ckcpro.w, ck[duv]fio.c, ckucmd.c, ckuus[46y].c, 18 Feb 99.
  9897.  
  9898. Added NOXFER symbol, which, if defined, deselects all file-transfer code
  9899. (Kermit and XYZMODEM) at compile time.  This is for building C-Kermit strictly
  9900. as a scripting and communications engine, when memory is at a premium, e.g. in
  9901. Linux-based embedded systems.  -DNOXFER removes about 300K on Intel, 400K on
  9902. Sparc.  All modules changed with very few exceptions.  Built OK with and
  9903. without -DNOXFER on UNIX and VMS.  Added a "linuxso" target for building a
  9904. < 400K version that includes full scripting and serial communications, but
  9905. no networks, help, character-sets, etc, that would not be used in a typical
  9906. embedded application.  18 Feb 99.
  9907.  
  9908. Added autodetection of <if.h> to CKVKER.COM for picking up u_int in UCX
  9909. versions below 5.0.  19 Feb 99.
  9910.  
  9911. A user noted a limit of 1024 on array size -- this was a totally arbitrary
  9912. and needless restriction, so I removed it.  Now an array can be any size
  9913. at all (until and unless a malloc() fails).  ckuusr.c, 21 Feb 99.
  9914.  
  9915. Changed UNIX version to not set BRKINT -- I have no idea why it ever did.
  9916. This causes big problems with UNIX workstations that have a BREAK key,
  9917. especially if it is badly positioned (as on HP keyboards, where users hit it
  9918. accidentally while trying to type Esc).  ckutio.c, 21 Feb 99.
  9919.  
  9920. UNIX "send ./?" was listing dot files when it shouldn't.  Fixed in traverse().
  9921. ckufio.c, 21 Feb 99.
  9922.  
  9923. Fixed some more CHAR/char complaints.  ckuus6.c, 22 Feb 99.
  9924.  
  9925. CD command makes disk spin if <ESC> typed in the middle of a directory name,
  9926. whereas Beta.04 didn't do this.  This is because traverse now calls isdir() on
  9927. every file.  Fixed this by calling isdir() only when we know we have to.
  9928. traverse(), ckufio.c, 22 Feb 99.
  9929.  
  9930. Discovered that SEND /RECURSIVE *to* C-Kermit no longer works: zchko() says
  9931. access denied.  I'm not sure how or when this happened, but the problem was
  9932. that when we check writability of nonexistent paths, access() fails.  zchko()
  9933. needed to be changed to peel back path segments until we reached one that
  9934. existed before calling access on it.  (If we can create a file in an existing
  9935. directory, then we can also create a directory, and in fact a whole tree.)
  9936. ckufio.c, 22 Feb 99.
  9937.  
  9938. Discovered that the following sequence:
  9939.  
  9940.   cd subdir, dir .., cd .., dir /recu /dir .
  9941.  
  9942. gives a bizarre listing.  It turns out that cmifi() skipped calling nzxpand()
  9943. in this case, and so zxrewind gave us the list from *previous* call, which is
  9944. of course no longer valid in the new context, so zgetfs() and friends all
  9945. fail.  Fixed in cmifi2() by ensuring it ALWAYS calls nzxpand() (at least when
  9946. diractive is nonzero).  ckucmd.c, 22 Feb 99.
  9947.  
  9948. Discovered that "dir /recursive /tmp/fdc/foo" (i.e. a full absolute path
  9949. containing no wildcards) takes forever because traverse reads the whole file
  9950. system.  Of course this was fixed several times before, but then subsequent
  9951. fixes (specifically, for "dir /recursive foo.bar" -- same thing, but path
  9952. NOT absolute) broke it.  Fixed in traverse(), ckufio.c, 22 Feb 99.  The
  9953. /RECURSIVE switch is ignored in this case, which makes C-Kermit do the same
  9954. thing as "ls -lR /tmp/fdc/foo".
  9955.  
  9956. Peter Eichhorn tested yesterday's code in a directory that contained 10,000
  9957. files: "ck abc<ESC>" still took forever and made the disk spin a lot.  It
  9958. turns out the change I made yesterday also needed to be made in another place.
  9959. Now it's fast again.  ckufio.c, 23 Feb 99.
  9960.  
  9961. Added -DNOTTYLOCK to AIX 3.x targets, since ttylock() evidently does not work
  9962. right there (the code compiles OK but says "access to lock denied", even
  9963. though it has all the same perms and owner/group as cu, whereas if built to
  9964. use do-it-yourself lockfile handling, it works OK).  makefile, 23 Feb 99.
  9965.  
  9966. Problem: We have (say) a UNIX-to-UNIX connection with all defaults,
  9967. client/server.  We say "get blah.txt".  The file is sent in text mode because
  9968. of the "*.txt" pattern, but the transfer is interrupted.  So then later we say
  9969. "reget blah.txt".  This is refused because the "*.txt" pattern puts it into
  9970. text mode again and REGET must be in binary mode.  Two problems:
  9971.  
  9972.  1. The file did not have to be sent in text mode in the first place if
  9973.     C-Kermit had recognized that the connection was between "like systems"
  9974.     AND character-set translation was not active.  In this case, we can skip
  9975.     looking thru the patterns and just stick with binary mode.
  9976.  
  9977.  2. [RE]GET /BINARY did not work when the filename matched a text pattern on
  9978.     the server side.  Fixing this required defining a new transfer-mode
  9979.     WHATAMI bit for the initialization string, but since the WHATAMI field was
  9980.     already full, a new WHATAMI2 field was added.  Now GET /BINARY, REGET
  9981.     /BINARY, GET /TEXT, etc, always work exactly as expected.  ckcker.h,
  9982.     ckcpro.w, ckcfns.c, ckuus[r6].c, ckermit2.txt, 24 Feb 99.
  9983.  
  9984. These (and the next two) are rather fundamental changes and need a pretty
  9985. heavy workout.
  9986.  
  9987. Made RESEND and SEND /RECOVER both imply /BINARY since they won't work any
  9988. other way.  ckuusr.c, ckermit2.txt, 24 Feb 99.
  9989.  
  9990. Ditto for REGET and GET /RECOVER.  This, in turn, forces manual transfer mode
  9991. at the server, and now even "reget oofa.txt" will work, at least assuming
  9992. client and server have compatible (i.e. non-length-changing) text-file
  9993. formats.  ckuus6.c, ckermit2.txt, 24 Feb 99.
  9994.  
  9995. Added SEND /[NO]DOTFILES.  ckuusr.h, ckuus[r2].c, ckermit2.txt, 24 Feb 99.
  9996.  
  9997. Discovered SHOW FILE wasn't working right.  Diagnosis: feol was declared as
  9998. extern int rather than extern CHAR.  Fixed in ckuus4.c, 24 Feb 99.
  9999.  
  10000. Added dynixptx216c target to makefile, from Roger Allen.  24 Feb 99.
  10001.  
  10002. Made "cop" be an OK abbreviation for "copy".  ckuusr.c, 24 Feb 99.
  10003.  
  10004. Changes from Jeff for K95G.  ckuus[7x].c, 24 Feb 99.
  10005.  
  10006. Updated sunos41gcc+krb and +srp makefile entries from Jeff.  25 Feb 99.
  10007.  
  10008. The CD Message was fractured in IKSD -- forgot to add a terminating NUL at
  10009. the end of the string when making the IAC-doubled copy.  ckuus6.c, 25 Feb 99.
  10010.  
  10011. Promptly removed the aforementioned code because it really belongs in the
  10012. printf (puts, putc, etc) substitute that we are already using for server-side
  10013. telnet and IKSD.  ckuus6.c, 25 Feb 99.
  10014.  
  10015. From Jeff, 25 Feb 99:
  10016.  
  10017.  . IAC doubling added to ckxprintf() and ckxfprintf().  ckcdeb.h, ckutio.c.
  10018.  
  10019.  . Check for stdout/stderr in ckxfprintf().  ckutio.c.
  10020.  
  10021.  . Removed commented-out IAC doubling from dotype().  ckuus6.c.
  10022.  
  10023.  . Moved allocation of keymap/macro from cmdini() to before sysinit() for
  10024.    the benefit of K95G which starts being delivered keyboard input during
  10025.    sysinit().  ckcmai.c, ckuus5.c.
  10026.  
  10027. Added encryption indication to SHOW CONNECTION.  ckuus3.c, 25 Feb 99.
  10028.  
  10029. Peter E reported that transfers between two Kermit programs failed when there
  10030. was an Rlogin command between them and C-Kermit 7.0 was the file sender, but
  10031. such transfers did not fail in earlier releases.  Diagnosis: C-Kermit 7.0
  10032. unprefixes <LF> by default; if a packet contains "<LF>~." this breaks the
  10033. Rlogin connection.  Packets contain this sequence when a file has a line that
  10034. begins with 14 repeated characters.  Since Kermit has no way of knowing there
  10035. is an Rlogin command in the middle, we have to prefix LF by default.
  10036. ckcmai.c, 25 Feb 99.  (Ditto when 'cu' is in the middle.)
  10037.  
  10038. Peter E also noticed that C-Kermit would crash under certain conditions on
  10039. some versions of HP-UX when its debug log was active during file transfer.  It
  10040. looks like the debug(F011,...) handler did not allocate quite enough memory
  10041. when given a really long string (like 32K).  Fixed in dodebug(), ckuusx.c.
  10042. Also, the "debug(F011,"ZINFILL fread",zinbuffer,zincnt);" call was overkill
  10043. anyway since now we're reading 32K chunks from the disk.  Changed it to just
  10044. show the count; ckufio.c, 25 Feb 99.
  10045.  
  10046. Minor syntactic corrections to yesterday's changes.  ckuus3.c, ckutio.c,
  10047. 26 Feb 99.
  10048.  
  10049. Changed C-Kermit's default file type from text to binary.  ckcmai.c,
  10050. ckermit2.txt (Sections 0, 4, and 4.3), 26 Feb 99.
  10051.  
  10052. Renamed hpux90mot target to hpux90m68ko for consistency.  "-funsigned-char"
  10053. added to CFLAGS of all HP-UX gcc targets.  makefile, 26 Feb 99.
  10054.  
  10055. When making SEND /RECOVER imply /BINARY, I accidentally also made
  10056. SEND /RECURSIVE imply /BINARY.  Fixed in doxsend(), ckuusr.c, 26 Feb 99.
  10057.  
  10058. Back to client/server conveniences...  Client SEND /RECURSIVE does not
  10059. automatically SET RECEIVE PATHNAMES RELATIVE in the server, but GET /RECURSIVE
  10060. does.  Why is this?  Because GET /RECURSIVE uses a special packet type but
  10061. SEND /RECURSIVE does not.  The user should not have to deal with this.  Added
  10062. PATH_AUTO to ckcker.h.  Added SET RECEIVE PATHNAMES AUTO: ckuus7.c.  Made AUTO
  10063. be the RECEIVE PATHNAMES default: ckcmai.c.  Fixed SHOW FILE to display the
  10064. new value: ckuus4.c.  Defined a WMI2_RECU bit for the new WHATAMI2 field:
  10065. ckcker.h.  Set this bit in rpar() if recursive > 0, and set RECEIVE PATHNAMES
  10066. to RELATIVE automatically in spar() if RECEIVE PATHNAMES was AUTO, plus set a
  10067. flag this was done so AUTO would be restored at the end of the transaction or
  10068. upon interruption: ckcfns.c, ckuus[25x].c, ckermit2.txt, 26 Feb 99.
  10069.  
  10070. Fix to cmifi() from Jeff to make sure it calls nzxpand() in K95 even if
  10071. user gives only a disk letter.  ckucmd.c, 26 Feb 99.
  10072.  
  10073. Fixes from Jeff to DIR /ENGLISHDATE and Rlogin problems reported by Lucas
  10074. Hart.  ckuus[67].c, 28 Feb 99.
  10075.  
  10076. Jeff suggested we keep incomplete files only when receiving in binary mode.
  10077. Added [ REMOTE ] SET [ FILE ] INCOMPLETE AUTO, which means KEEP when in binary
  10078. mode, DISCARD otherwise.  ckuus[2346].c, ckcfn[s3].c, ckcmai.c, ckcpro.w,
  10079. ckermit2.txt, 28 Feb 99.
  10080.  
  10081. The change I made on 24 Feb to use binary mode whenever the two Kermits are
  10082. on like platforms and there was no charset translation was broken by setting
  10083. the default file type to binary.  Fixed in sfile(): ckcfns.c, 28 Feb 99.
  10084.  
  10085. Added /MOVE-TO: and /RENAME-TO: switches, which were already available for
  10086. SEND, to GET and RECEIVE.  This rounds out our "atomic file movement"
  10087. repertoire.  ckcmai.c, ckuus[56x].c, ckcfns.c, 28 Feb 99.
  10088.  
  10089. Numerous corrections to internal crossrefs in ckermit2.txt from Peter E.
  10090. 28 Feb 99.
  10091.  
  10092. Got rid of the long and hideous mass of #ifdefs around the tv and tz
  10093. declarations in ckutio.c by adding NOTIMEZONE / HAVE_TZ and NOTIMEVAL /
  10094. HAVE_TV symbols to ckcdeb.h.  1 Mar 99.
  10095.  
  10096. Moved call to fxdinit() (fullscreen file-transfer display initialization) from
  10097. main() to screen(), and ensured we don't call it unless we have to, we don't
  10098. execute it more than once, and we don't print any error messages when in
  10099. background or batch.  This fixes numerous problems; e.g. the screen was a
  10100. total shambles before if the terminal type was unknown, pointless warnings
  10101. about terminal type when the file transfer display would not have been
  10102. fullscreen anyway, etc.  ckcmai.c, ckuusx.c, 1 Mar 99.
  10103.  
  10104. Added -DDCLGETCWD to CFLAGS for is5r3jc.  makefile, 1 Mar 99.
  10105.  
  10106. Fixed arrangement of horizontal lines around file transfer and around
  10107. CONNECT-mode help text.  ckucns.c, ck[duv]con.c, 1 Mar 99.
  10108.  
  10109. Updated SHOW FEATURES list to say "No making connections" if NOLOCAL defined,
  10110. and fixed some typos.  ckuus5.c, 1 Mar 99.
  10111.  
  10112. Fixed an unguarded reference to tcharset in ckcfns.c, 1 Mar 99.
  10113.  
  10114. Updated help text for RECEIVE and GET, plus help text for new K95 Kverbs from
  10115. Jeff.  ckuus2.c, 1 Mar 99.
  10116.  
  10117. "send blah", where blah is a file that lacks read permission, did not produce
  10118. an error message.  Fixed in ckuusr.c, 1 Mar 99.
  10119.  
  10120. Changed {SEND,RECEIVE,GET} {/MOVE-TO:,/RENAME-TO:} to save and restore global
  10121. values snd_move, snd_rename, rcv_move, rcv_rename values.  ckuus[r56x].c,
  10122. 1 Mar 99.
  10123.  
  10124. Added global {SEND,RECEIVE} {/MOVE-TO:,/RENAME-TO:} values to SHOW FILE,
  10125. and finally added askmore() to SHOW FILE, yuk.  ckuus4.c, 1 Mar 99.
  10126.  
  10127. Added SET { SEND, RECEIVE } { MOVE-TO:, RENAME-TO: } to set global values
  10128. for these.  ckuus[27].c, 1 Mar 99.
  10129.  
  10130. Changes to SHOW DIAL for TAPI and SET WIN95 OVERLAPPED-IO from Jeff.
  10131. ckuus[47].c, 1 Mar 99.
  10132.  
  10133. Updated HP-UX 10.30 and 11.00 targets from John Bigg of HP: makefile, 2 Mar 99.
  10134.  
  10135. Yesterday's change broke the SET TRANSFER DISPLAY command.  Fixed in ckcmai.c,
  10136. ckuus[7x].c, ckcker.h, 2 Mar 99.
  10137.  
  10138. Fixed SET TRANSFER DISPLAY SERIAL to wrap dots based on actual terminal width
  10139. rather than assuming 80.  ckuusx.c, 2 Mar 99.
  10140.  
  10141. SEND /NOBACKUP was broken by a missing comment closer.  ckuusr.c, 2 Mar 99.
  10142.  
  10143. Ditto for GET /DELETE.  ckuus6.c, 2 Mar 99.
  10144.  
  10145. "type /?" bad news -- since its FDB had file first and switch second, "/?"
  10146. tried to build a list of all files in the root directory.  Rearranged to have
  10147. switch first, file second, like all the other commands.  ckuusr.c, 2 Mar 99.
  10148.  
  10149. Fixed an unguarded reference to pipesend.  ckcfns.c, 2 Mar 99.
  10150.  
  10151. Started work on PURGE command (to remove all but a given number of backup
  10152. files).  Will finish tomorrow.  ckuusr.[ch], ckuus7.c, 2 Mar 99.
  10153.  
  10154. Added ^D and ^U to default prefixing table, since these act like LF when
  10155. followed by ~ when going through an Rlogin connection.  ckcmai.c, 3 Mar 99.
  10156.  
  10157. Syntax corrections.  ckuus[27x].c, ckvcon.c, 3 Mar 99.
  10158.  
  10159. It seems that streaming transfers are sensitive to "X" interruption if it
  10160. happens in a certain spot -- just at the beginning and/or just at the end.
  10161. Found and fixed a spot in input() that might have been causing this (no,
  10162. it didn't fix it).  ckcfn2.c, 3 Mar 99.
  10163.  
  10164. filhelp() was calling isdir() on every file.  This is no longer necessary,
  10165. since the parsing function that called it has already filtered out file and/or
  10166. directory names by calling nzxpand() with the appropriate flags.  Commented
  10167. out this call to isdir().  ckucmd.c, 3 Mar 99.
  10168.  
  10169. SEND /RECURSIVE ./?<Ctrl-U> left recursive flag stuck on.  Moved the resetting
  10170. of recursive and matchdot to the top of the reparse loop, rather than the top
  10171. of the parse loop.  ckuus5.c, 3 Mar 99.
  10172.  
  10173. Sending to IKSD, logged in as anonymous, was failing with "directory creation
  10174. failure" even when sending a regular file not containing any directory parts
  10175. in its name.  The problem was in zmkdir(), but I can't imagine why we weren't
  10176. seeing the same failures before (and we weren't -- lots of people were
  10177. uploading stuff to incoming thru IKSD).  zmkdir() is always called when
  10178. receiving a file to see if the file contains any directory parts, and if so,
  10179. to try to create them.  zmkdir() unconditionally failed if called by guest.
  10180. Fixed it to fail only when called by guest AND it would have had to create a
  10181. directory.  ckufio.c, 3 Mar 99.
  10182.  
  10183. Meanwhile, zmkdir() actually *would* create directories even when in server
  10184. mode and MKDIR was DISABLEd, oops.  Fixed in zmkdir(), ckufio.c, 3 Mar 99.
  10185.  
  10186. An SSH-related update to ckcnet.c from Jeff.  3 Mar 99.
  10187.  
  10188. Discovered that dialing out from VMS (yes, I can finally do it!) tends not
  10189. to work at all.  Why?  VMS does not support RTS/CTS but the modem's factory
  10190. default is to use RTS/CTS.  The modem init string might have 30-40 characters
  10191. in it, or more (e.g. USR).  VMS gets data overruns on its serial port when
  10192. reading back the echo and then loses the OK, because it has not yet sent the
  10193. command to the modem that tells it to use local Xon/Xoff flow control.  SET
  10194. DIAL PACING 150 does the trick.  Changed the startup value for DIAL PACING to
  10195. be 150 if CK_RTSCTS is not defined, and changed the initial DIAL FLOW value
  10196. to be XON/XOFF for VMS, rather than AUTO (although AUTO actually did result
  10197. in Xon/Xoff, but why bother).  ckudia.c, 5 Mar 99.
  10198.  
  10199. Made default flow control in VMS for all types of connections it supports be
  10200. "Xon/Xoff" (which really translates to TTSYNC/HOSTSYNC, which means "use an
  10201. appropriate method of flow control instead of dropping incoming bytes on the
  10202. floor for no reason").  ckcmai.c, 5 Mar 99.
  10203.  
  10204. With these changes, VMS dialouts work -- a little rocky on the initial init
  10205. string, but once the flow control is set on both ends, the connection is fine;
  10206. downloads go fast, but uploads are faster.  There are no hiccups or glitches,
  10207. even at 38400 or 57600 bps on the Alpha PWS 433/au.
  10208.  
  10209. Fixed some silly dialing messages, like "Will redial in 1 second, press any
  10210. key to redial immediately...".  ckuus6.c, 5 Mar 99.
  10211.  
  10212. Fixed "red" to be an acceptable synonym for REDIAL on VMS.  ckuusr.c, 5 Mar 99.
  10213.  
  10214. Discovered all kinds of problems dialing without flow control -- SET DIAL
  10215. PACING was not being obeyed in many places.  Fixed in ckudia.c, 6 Mar 99.
  10216.  
  10217. When dialing out from VMS and then being hung up on by the remote, VMS system
  10218. services would thenceforth refuse to return the modem signals, and so ttchk()
  10219. returned 0 or -1 (indicating ttgmdm() failure) rather than -2 to indicate the
  10220. connection was lost, and therefore EXIT would give the message "A serial
  10221. connection might be active... OK to exit?".  Fixed by keeping Yet Another
  10222. Global Status Variable.  ckvtio.c, 6 Mar 99.
  10223.  
  10224. The long modem setup sequence was unnecessary and annoying when redialing,
  10225. so now we jump around on the 2nd and subsequent attempts.  ckudia.c, 6 Mar 99.
  10226.  
  10227. Got rid of the separate ATT or ATP command when the user had not given a SET
  10228. MODEM COMMAND { PULSE, DIAL } or a SET MODEL DIAL-COMMAND command, making the
  10229. dial command be ATDT or ATDP instead.  ckudia.c, 6 Mar 99.
  10230.  
  10231. Enabled connection log in VMS.  ckvfio.c, 6 Mar 99.
  10232.  
  10233. VMS was still complaining "terminal type not supported" when given a SET
  10234. TRANSFER DISPLAY FULL command.  Fixed in doxdis(): ckuus7.c, 6 Mar 99.
  10235.  
  10236. Filename shown in VMS file transfer display is much too long.  Changed
  10237. screen() to call zrelname() on it.  ckuusx.c, 6 Mar 99.
  10238.  
  10239. The sequence DISABLE DELETE, SET FILE COLLISION UPDATE would fail because of
  10240. a misplaced security check.  The check was moved into the protocol module
  10241. where it belongs.  ckuus7.c, ckcpro.w, 6 Mar 99.
  10242.  
  10243. Removed about 560 lines of #ifdef OLDTBCODE..#endif junk from ckudia.c.  If
  10244. anybody ever wants it back they can get it from version 6.0.  6 Mar 99.
  10245.  
  10246. The big problem with dialing without hardware flow control is that the first
  10247. thing we send to the modem is a big long init string, like:
  10248.  
  10249.   ATQ0E1V1X4&A3&S0&C1&D2&N0&Y3S14=0
  10250.  
  10251. The modem can take it, but the computer might not be able to absorb the echo
  10252. (or worse, the response), especially at high speeds.  So it's essential to set
  10253. up the flow control first, before sending any long strings to the modem.  But
  10254. this requires that the modem is first set up to produce result codes.  So --
  10255. for AT-command-set modems only -- we now send ATQ0<CR> first, up to four
  10256. times, looking for an "OK" or "0" response, and taking various (increasingly
  10257. drastic measures) if it doesn't come (send BREAK, hangup, etc), and then we
  10258. set the modem's flow control, and THEN we send the init string and the rest.
  10259. This works way better.  ckudia.c, 6 Mar 99.
  10260.  
  10261. Added SET HINTS { ON, OFF }.  ckuusr.[ch], ckuus3.c, 6 Mar 99.
  10262.  
  10263. Since control-char unprefixing is now the default, this is likely to cause
  10264. trouble to some people.  If sending a file fails and PREFIXING is not ALL,
  10265. and the transfer was not deliberately interrupted, we now print a hint (if
  10266. HINTS are ON) to try it again with SET PREFIXING ALL (or PARITY SPACE, or
  10267. ROBUST, ...) -- our first hint.  Made a similar set of hints for failure to
  10268. RECEIVE or GET files.  And a few others.  ckuus[r345].c, 6 Mar 99.
  10269.  
  10270. SET PREFIXING ALL sets prefixing to PX_ALL; now so does SET CONTROL PREFIX ALL.
  10271. ckuus3.c, 6 Mar 99.
  10272.  
  10273.  -- add hints for dial failure.
  10274.  
  10275. Corrections from Michal Jaegermann <michal@ellpspace.math.ualberta.ca>:
  10276.  . One of the sprintf's in nxtdir() did not have enough %s's: ckuus4.c.
  10277.  . An sprintf in \v(nday) referenced a long with %d: ckuus4.c.
  10278.  . Missing parens around 4th xxscreen() arg supplied in ckuusx.c & ckcfn2.c.
  10279.  . Superfluous pointer dereference (*p++;) in arraynam: ckuus5.c.
  10280.  . ckxlogin/out() prototypes moved from ckuusr.h to ckcdeb.h.
  10281.  . ckxlogin() called with one too few args: ckcpro.w.
  10282.  . Various static declarations of unused or nonexistent variables or functions.
  10283.  
  10284. Also, he objected to Kermit sending the user ID ahead on TELNET connections --
  10285. "There is not a shred of guarantee that a login on remote will be the same as
  10286. a local one" -- and suggested the default be not to send it.  This will
  10287. obviously be controversial, but I tend to agree, erring on the side of safety
  10288. and predictability (for scripts).  For now I just made a symbol NOSENDUID that
  10289. can be added to CFLAGS to reverse the default at compile time.  A more
  10290. intelligent default might be to send the ID if we're on the same "network"
  10291. (whatever that is), and not send it otherwise.  Or maybe not.  ckcdeb.h,
  10292. ckctel.c, 7 Mar 99.
  10293.  
  10294. Tightened up dialing procedures some more -- e.g. combined the speaker and
  10295. volume commands.  Found that my abbreviated redialing code from yesterday had
  10296. (more than) a few problems.  The most important lesson is that it's not
  10297. sufficient to just keep sending the ATDTnnnnn command.  First we have make
  10298. sure the modem is still sentient; thus the "send ATQ0" loop must be executed
  10299. before each redial as well as before the original call.  ckudia.c, 7 Mar 99.
  10300.  
  10301. My understanding of the VMS terminal driver is that if the device has the
  10302. TT$M_MODEM characteristic, then:
  10303.  
  10304.  1. When the application opens the device, VMS turns on DTR.
  10305.  2. The CD signal is ignored until it comes up; after that, loss of
  10306.     CD causes the SS$_HANGUP error.
  10307.  
  10308. After 6 hours of experimentation with dialing and redialing on VMS, I made two
  10309. discoveries: (1) attempts to read from a /MODEM device during dialing
  10310. (i.e. before CD has ever been turned on) often result in SS$_HANGUP, and so
  10311. this error must be ignored during dialing; and (2) VMS periodically blinks DTR
  10312. and RTS on the device while it is not presenting the CD signal; Kermit is not
  10313. doing this, VMS is doing it.  This can be observed simply by telling Kermit
  10314. to "set line tta0" and then watching the modem lights for a few minutes.
  10315.  
  10316. This of course causes any normal modem to immediately abandon a call in
  10317. progress.  The remote answers the phone, we hear the negotiation tones going
  10318. and then suddenly "click" and NO CARRIER.  ATI6 (to a USR Courier) says
  10319. "Disconnect reason: DTR dropped".  The modem lights confirm -- VMS turns off
  10320. DTR (and RTS) for 5 seconds right in the middle of the modem-to-modem
  10321. negotiations.  The only reason dialing out ever works at all is that DTR stays
  10322. up for 30 seconds at time.  If a call is placed at just the right instant and
  10323. is answered within 30 seconds, VMS leaves DTR on thereafter.
  10324.  
  10325. Of course we can give the modem the DTR override command (AT&D0), but this
  10326. eliminates the possibility of hanging up the call by dropping DTR, and in fact
  10327. would leave open a rather gaping security hole.
  10328.  
  10329. A workaround was eventually identified: Tell the modem to make DSR track CD.
  10330. Explanation: when a port is opened, as soon as VMS sees DSR with no CD, it
  10331. starts the 30-second-on/5-second-off DTR/RTS blinking cycle.  Therefore if the
  10332. modem does not turn DSR on, and VMS won't blink.  This is less than satisfying,
  10333. though, because it is exactly opposite of (say) SunOS, where you can't dial
  10334. out unless DSR is ON.  There should be a way to tell VMS to leave DTR up solid
  10335. when making a dialout call.  Init strings of all AT-command-set modems changed
  10336. to include "&S1" within #ifdef VMS..#endif.  This is no help at all for modems
  10337. that are do not use the AT command set.  ckudia.c, 7 Mar 99.
  10338.  
  10339. David Sanderson <dws@sgi.net> noticed that window-size-change interrupts
  10340. weren't working any more; cause: <signal.h> was left out of the ckcnet/ckctel
  10341. split.  Fixed in ckctel.c, 7 Mar 99.
  10342.  
  10343. From Jeff, 8 Mar 99:
  10344.  
  10345.  . ckutio.c - ttinc() returning -3 is a special return value that
  10346.    indicates that the "Session Limit" has expired.  SET SESSION-LIMIT.  I
  10347.    do not think that this has been implemented in Unix or VMS yet.  I
  10348.    have changed all references to -3 in ttinc() to -4.
  10349.  
  10350.  . ckuath.c - lots of rlogin stuff.
  10351.  
  10352.  . ckcdeb.h - Some NT Kerberos defines and the new NOSENDUID cannot be
  10353.    defined if CK_AUTHENTICATION is defined since the UID is required for
  10354.    successful completion.
  10355.  
  10356.  . ckcnet.c - k5 rlogin and some other little things.
  10357.  
  10358. Fixed SHOW COMM for VMS to show the actual speed rather than "unknown" and
  10359. also not to write "(closed)" after the device name.  The source of confusion
  10360. was that CK_TTYFD is defined for VMS, but instead of referencing the ttyfd
  10361. variable (which is always -1 in VMS) we have to call the vmsttyfd() function.
  10362. ckuus4.c, 8 Mar 99.
  10363.  
  10364. Verified that it is indeed IMpossible to get the current speed of a serial
  10365. device in VMS.  The IO$_SENSEMODE() call returns the permanent speed, not the
  10366. current, actual one.  Added notes to the code about this so I don't waste
  10367. another half-day on this one.  ckvtio.c, 8 Mar 99.
  10368.  
  10369. Added -DNOREDIRECT to all SCO targets prior to 3.2v4.0.  makefile, 8 Mar 99.
  10370.  
  10371. Made transaction log unbuffered.  ckufio.c, 8 Mar 99.
  10372.  
  10373. Fixed zvpass() in UNIX not to accept guest logins with empty passwords.
  10374. ckufio.c, 8 Mar 99.
  10375.  
  10376. More Kerberos changes from Jeff: ckcdeb.h ckuath.c ckuus3.c ckutio.c ckcnet.c,
  10377. 8 Mar 99.
  10378.  
  10379. Fix from Jeff for IKSD negotiation problem, in which client could send
  10380. RESP_STOP in response to REQ_START even when autodownload was ON.  ckctel.c,
  10381. 8 Mar 99.
  10382.  
  10383. Made switch completion print "=" rather than ":" as the separator in VMS, for
  10384. switches that take args.  ckucmd.c, 8 Mar 99.
  10385.  
  10386. Changes from Jeff to ckcnet, ckutio, and ckuath.c, mainly for Kerberos 5,
  10387. 9 Mar 99.
  10388.  
  10389. Fixed hint for failed RLOGIN commands -- it was in the wrong place.
  10390. ckuus[r7].c, 9 Mar 99.
  10391.  
  10392. Changed VMS zfcdat() to return the file's creation date, not modification
  10393. date, to match VMS customs and usage, not to mention the fact that VMS
  10394. C-Kermit, when receiving a file, sets the *creation* date (not modification
  10395. date) from the A packet.  Suggested by Lucas Hart.  9 Mar 99.
  10396.  
  10397. Straightened up a mess regarding -DNOREDIRECT (it was not checked in enough
  10398. places) and also made sure that NETCMD could not be defined if NOREDIRECT
  10399. was defined.  ckcdeb.h, 9 Mar 99.
  10400.  
  10401. Fixed badly confused #ifdefs around "ping" and "pipe" commands.  ckuusr.c,
  10402. 9 Mar 99.
  10403.  
  10404. More Kerberos-related changes from Jeff to ckcnet, ckutio, etc, plus
  10405. ckuus[45].c, 9 Mar 99.
  10406.  
  10407. Cleaned up the logic of UNIX zgetfs() a bit with respect to symlinks.
  10408. Now "dir /dir" lists symlinks to directories, and "dir /files" lists symlinks
  10409. to files.  This was (I hope) the last remaining problem with the DIRECTORY
  10410. command skipping files it should have listed.  ckufio.c, 9 Mar 99.
  10411.  
  10412. Supplied a missing "\" in the unixware2 makefile target.  9 Mar 99.
  10413.  
  10414. Increased size of \v(filespec) buffer and removed warning about overflow.
  10415. ckuus[rx].c, 9 Mar 99.
  10416.  
  10417. Changes to SCO XENIX 2.3.4 makefile entry to update it to 7.0.  9 Mar 99.
  10418.  
  10419. Put all of ckctel.c within #ifdef TNCODE..#endif, since there is no point in
  10420. compiling it if TNCODE is not defined, and it chokes the SCO 3.2.4 compiler
  10421. with "expression too complex".  Various other minor tweaks to ckutio.c,
  10422. ckucon,c, ckctel.c, and ckuver.h for XENIX.  9 Mar 99.
  10423.  
  10424. Moved #include <signal.h> to above #ifdef SIGWINCH, since <signal.h> is where
  10425. SIGWINCH is defined (David Sanderson).  ckctel.c, 9 Mar 99.
  10426.  
  10427. Fixes from Jeff to prevent IKSD from issuing Login: or Password: prompts when
  10428. it is in server mode, and therefore accepting null passwords for anonymous
  10429. users.  ckcdeb.h, ckcmai.c, ckuus7.c, ckcpro.w, 9 Mar 99.
  10430.  
  10431. Patches for NetBSD from the NetBSD group.  ckcdeb.h, cku[ft]io.c, ckuusx.c,
  10432. 10 Mar 99.
  10433.  
  10434. Minor adjustments to the makefile to build on XENIX 2.3.4 with curses.
  10435. 10 Mar 99.
  10436.  
  10437. More Kerberos changes from Jeff.  ckctel.c, 10 Mar 99.
  10438.  
  10439. Added check for guest to { SEND, GET, RECEIVE } { /MOVE-TO, /RENAME-TO }.
  10440. ckuus[r6].c, 10 Mar 99.
  10441.  
  10442. Updates for DG/UX 5.4R4.11 on m88k.  makefile, ckuver.h, ckuus[r5].c,
  10443. 10 Mar 99.
  10444.  
  10445. Updates for DG/UX 5.4R3.10 on m88k.  makefile, ckutio.c (had to simplify the
  10446. GTODONEARG #ifdefs to unconfuse its cpp), 11 Mar 99.
  10447.  
  10448. Changed message about CONNECT failing because no CD to a hint.  ck[uv]con.c,
  10449. ckucns.c, 11 Mar 99.
  10450.  
  10451. Changes from Jeff to accommodate (nonstandard) SAK Telnet option from IBM:
  10452. ckuusr.h, ckuus[r3].c, ckctel.[ch], 13 Mar 99.
  10453.  
  10454. Moved sw_armed and winchh() from ckcnet.c to ckctel.c, and added some needed
  10455. #ifdefs to allow nonet builds.  13 Mar 99.
  10456.  
  10457. Made rlog_naws() not static because it is called from ckctel.c module.
  10458. ckctel.c, ckcnet.c, 13 Mar 99.
  10459.  
  10460. Added -funsigned-char to SCO OSR5 makefile entries.  makefile, 13 Mar 99.
  10461.  
  10462. Discovered that the DIRECTORY command returned total garbage for perms, size,
  10463. and date on SCO 5.0.5.  It seems that lstat() is available and pretends to
  10464. work (returns 0), but in fact puts junk in the stat buffer.  Added -DNOLSTAT
  10465. to SCO targets.  (The SCO man page also mentions a statlstat() function but it
  10466. works just as poorly as lstat()).  However, even using stat() and testing with
  10467. S_ISLNK() failed to reveal symlinks.  Therefore a forced call to readlink()
  10468. was required in this case.  But even that did not work -- it turns out SCO
  10469. readlink() doesn't like it if a "/" is on the end of a directory name.  So now
  10470. we strip it off before calling readlink().  zgetfs(): ckufio.c, 13 Mar 99.
  10471.  
  10472.   Actually the problem with lstat() seems to be more like this: On some
  10473.   platforms lstat() is to be used ONLY on symlinks; first stat() must be
  10474.   called to see if it is a symlink() and then (only) if it is, then call
  10475.   lstat() on it.  But on other platforms, stat() does not tell you if a
  10476.   file is a symlink; you must call lstat() on all files to find out which
  10477.   ones are symlinks.  Yet on OTHER files, lstat() still doesn't tell you if
  10478.   a file is a symlink -- it either behaves like stat() or else it returns
  10479.   garbage.  In that case you have to call stat() and then readlink() on
  10480.   each file to see if it is a link.
  10481.  
  10482. Another discovery: if DIR /RECURSIVE encounters a symlink to a directory, it
  10483. follows it even if the linked-to directory is in the same directory, in which
  10484. case it descends the same tree again.  This happens on all UNIXes.  So isdir()
  10485. also has to check if it's a link, which fixes this problem.  But breaks CD,
  10486. etc.  Another hornet's nest.  I think I fixed it but it might need more work:
  10487. isdir() says a file is a directory if it is a directory OR if the recursive
  10488. flag is NOT set and it is a link to a directory.  ckufio.c, 13 Mar 99.
  10489.  
  10490. Previous change needed additional work for SCO 5.0.5.  Generalized
  10491. SCO-specific #ifdefs to be usable on any UNIX build: -DNOLINKBITS means that
  10492. neither S_ISLNK() nor _IFLNK test is reliable and readlink() should be called
  10493. instead.  Added this to SCO CFLAGS.  ckufio.c, makefile, 14 Mar 99.
  10494.  
  10495. SCO 3.2v4.2 supports symlinks but C-Kermit doesn't sense them.  Added
  10496. -DNOLSTAT -DNOLINKBITS to the make targets.  XENIX entries are OK since it
  10497. doesn't support symlinks anyway.  makefile, 14 Mar 99.
  10498.  
  10499. Later, this was found in "man NS lstat" on OSR5.0.5:
  10500.  
  10501.   lstat obtains information about the file named by path. In the case of a
  10502.   symbolic link, lstat returns information about the link, and not the file
  10503.   named by the link. It is only used by the NFS automount daemon and should
  10504.   not be utilized by users.
  10505.  
  10506. Send from remote, interrupt with X at local, connect back to remote.  REMOTE
  10507. prints SEND-failure hint ("interrupted" not set).  Fixed in ckcfn[s3].c,
  10508. 14 Mar 99.
  10509.  
  10510. Added -DDCLPOPEN to SCO 3.2v4.2 makefile entries to suppress warnings about
  10511. getcwd() and -DDCLPOPEN for popen().  Also added a new symbol, DCLFDOPEN, to
  10512. force C-Kermit to declare fdopen() to suppress warnings about that one too,
  10513. and added -DDCLFDOPEN to the 3.2v4.2 targets.  Now it builds without
  10514. complaint.  makefile, cku[ft]io.c, 14 Mar 99.
  10515.  
  10516. Updated the install target in the makefile to actually do most of the right
  10517. stuff.  15 Mar 99.
  10518.  
  10519. Added code to look around for the ckermit2.txt file at startup and keep a
  10520. record of where (if anywhere) it was found.  This is used in various messages
  10521. and help text: NEWS, SUPPORT, SHOW FILE, etc.  Also, updated assorted HELP,
  10522. NEWS, INTRO, etc, texts.  ckuins.txt, ckuus[245].c, 15 Mar 99.
  10523.  
  10524. Updates to ckuusr.c and ckctel.c from Jeff.  15 Mar 99.
  10525.  
  10526. Finished PURGE command.  UNIX only.  ckuus[27].c, 15 Mar 99.
  10527.  
  10528. Fixed a few fencepost errors in the PURGE command.  ckuus7.c, 16 Mar 99.
  10529.  
  10530. Fixed znext() (again!) to return a positive number if it returned a file,
  10531. and 0 when no more files left.  ckufio.c, 16 Mar 99.
  10532.  
  10533. From Jeff: integration of the TELOPT command with the Telnet protocol state
  10534. machine.  ckuusr.c ckctel.c ckuath.c ckctel.h ckuus5.c ckuus2.c, 16 Mar 99.
  10535.  
  10536. Added SET OPTIONS PURGE.  ckuusr.h, ckuus[237].c, ckermit2.txt, 16 Mar 99.
  10537.  
  10538. The WHOAREWE mechanism was slightly off kilter: it was not setting FILE NAMES
  10539. LITERAL unless the TRANSFER MODE was AUTOMATIC.  In fact, it should always use
  10540. literal file names when it recognizes a kindred spirit, regardless of the
  10541. transfer mode -- text/binary file transfer is independent of filename
  10542. conversion.  This was causing REGET to fail -- the original file would come
  10543. with a literal filename, the REGotten file would come with a converted one,
  10544. thus appearing to be a different file and thwarting recovery.  whoarewe():
  10545. ckcfns.c, 16 Mar 99.
  10546.  
  10547. Forgot to make the FAST, CAUTIOUS, ROBUST HELP-keywords invisible, so the
  10548. 80x24 top-level "?" screen was overflowing.  ckuusr.c, 16 Mar 99.
  10549.  
  10550. Added -DCK_NEWTERM to Unixware entries -- buffering problem after file
  10551. transfer...  It's beginning to look like I should use newterm() whenever it's
  10552. available.
  10553.  
  10554. Fixed VMS-specific #ifdef foulups in ckudia.c and ckctel.c, 16 Mar 99.
  10555.  
  10556. Updates to makefile from Jeff for KRB & SRP.  16 Mar 99.
  10557.  
  10558. Adjustments for 16-bit QNX build.  Had to remove a couple features (CSETS,
  10559. KVERBS, etc) since ckuus4.o segment got too big.  ckuus3.c, makefile,
  10560. 16 Mar 99.
  10561.  
  10562. Telnet changed to request binary mode in the other direction only if the
  10563. TELOPT setting for that direction is REQUEST.  This fixes stairstep problem
  10564. when Telnetting to the BSDI Telnet server.  From Jeff.  ckctel.c, 17 Mar 99.
  10565.  
  10566. Lots of picky little changes from compiler complaints on many platforms.
  10567. Most modules, 17 Mar 99.
  10568.  
  10569. It looks like AIX 4.2 needs CK_NEWTERM after all.  But AIX 4.3 hangs at the
  10570. end of a file transfer if built with CK_NEWTERM.  So no more sharing makefile
  10571. entries between AIX 4.2 and 4.3.  makefile, 17 Mar 99.
  10572.  
  10573. Had to add -DCK_NEWTERM for IRIX 5.3.  makefile, 17 Mar 99.
  10574.  
  10575. Support for VMS PRN files from Lucas Hart.  ckvfio.c, 17 Mar 99.
  10576.  
  10577. VMS CONNECT was missing a crucial IKSD start/stop negotiation.  ckvcon.c,
  10578. 18 Mar 99.
  10579.  
  10580. UNIX builds without CKSYMLINK could not expand wildcards due to a missing
  10581. #else part in the #ifdef CKSYMLINK..#endif clause in isdir().  ckufio.c,
  10582. 18 Mar 99.
  10583.  
  10584. I thought that UNIX znewn() took MAXNAMLEN into account when creating backup
  10585. names, but I must have dreamed it.  File transfer failed miserably when
  10586. sending files to a 14-char file system when the backup name would be longer
  10587. than 14 chars.  Rewrote znewn() to lop the minimum necessary number of
  10588. characters from the end of the filename before creating the backup name, and
  10589. tested the result on a real 14-char file system with filenames ranging from 10
  10590. to 14 and with backup numbers crossing decade boundaries; all OK now.
  10591. ckufio.c, 18 Mar 99.
  10592.  
  10593. Some weeks ago I noticed that sometimes the DIR command on HP-UX 5.00 would
  10594. produce a phantom entry like:
  10595.  
  10596.   ----------        -1  0000-00-00 00:00:00
  10597.  
  10598. Today I discovered that the phantom entries are deleted files, and there can
  10599. be lots of them.  It turns out that on some platforms, read() from a directory
  10600. (or readdir()) can return deleted files, so the result of each read should be
  10601. checked immediately for existence by looking at the inode.  The code to do
  10602. that was already there, but now in the wrong place due to the many additions
  10603. for recursion, etc.  Fixed in traverse(), ckufio.c, 18 Mar 99.
  10604.  
  10605. From Jeff, 18 Mar 99:
  10606.  . Fix an IKSD deadlock: ckctel.c.
  10607.  . Make TELOPT command wait for responses: ckuusr.c.
  10608.  . Add SET TELNET BUG INFINITE-LOOP-CHECK: ckuus[23].c, ckctel.c.
  10609.  . Some fixes for SAVE KEY: ckuus7.c.
  10610.  
  10611. From Jeff, 19 Mar 99:
  10612.  
  10613.   We received reports from Lucas Hart that the IKSD would not respond to
  10614.   packet requests from VMS C-Kermit 7.0 Beta 5.  It was determined that
  10615.   VMS C-Kermit was not adhering to Telnet Protocol and was sending bare
  10616.   CRs on the wire from spack() when TELOPT_ME(TELOPT_BINARY) was WONT.
  10617.   Why was this happening when the code to properly handle Telnet
  10618.   Protocol was in spack() and worked fine on Unix and K95?  It turns out
  10619.   that TCPSOCKET was not defined in ckcfn2.c because in VMS we define
  10620.   TCPSOCKET conditionally depending on the TCP/IP stack that is being
  10621.   used.
  10622.  
  10623.   I doubled-checked all of the other files that reference TCPSOCKET to
  10624.   determine if they failed to include ckcnet.h or included it in an #ifdef
  10625.   TCPSOCKET.  ckcfns.c failed to include ckcnet.h at all and no other
  10626.   file wrapped ckcnet.h in an ifdef.
  10627.  
  10628.   Tests show VMS C-Kermit now works fine.
  10629.  
  10630. Added ckcnet.h to dependencies for ckcfns.c and ckcfn2.c.  makefile, 19 Mar 99.
  10631.  
  10632. Added prototypes for tn_wait() and tn_push() to ckctel.h.  19 Mar 99.
  10633.  
  10634. The DG/UX 5.4R3.10 version did not have any of the "check if chars waiting at
  10635. the console" methods enabled.  Added -DSELECT to the makefile entries, but
  10636. that made ckutio.c blow up in the preprocessor, which apparently does not like
  10637. #ifdefs inside function call argument lists.  Rearranged the gettimeofday()
  10638. call in msleep().  ckutio.c, 20 Mar 99.
  10639.  
  10640. Assorted minor fixes to the UNIX makefile.  20 Mar 99.
  10641.  
  10642. ---Beta.05---
  10643.  
  10644. From Jeff, 23 Mar 99:
  10645.  . A fix for \fword() and \fsplit().  ckuus4.c.
  10646.  . Telnet details... close in progress ... ckcnet.c, ckctel.c.
  10647.  . Add DONT/WONT Kermit to "-0" command-line actions.  ckuusy.c.
  10648.  . Force K95 to restore the cursor in SET TERM CURSOR.  ckuus7.c.
  10649.  . Authorization/encryption changes.  ckuath.c, ckuat2.h, ckctel.c, makefile.
  10650.  
  10651. If the first command line arg is a filename, do not automatically execute the
  10652. initialization file.  If the script author wants the init file to be executed
  10653. she can include a TAKE command in the script.  Prior to this, there was no
  10654. way to *prevent* init file execution when a script was invoked in this manner.
  10655. prescan(), ckuus4.c, 23 Mar 99.
  10656.  
  10657. Along similar lines: a rather drastic change to promote the use of C-Kermit as
  10658. a scripting tool -- if a filename is given as the first command-line argument,
  10659. the rest of the words on the command line are arguments for the script, NOT
  10660. for Kermit.  So no more "scriptname -x -y = arg1 arg2 arg3 ...".  Now it's
  10661. just "scriptname arg1 arg2 arg3 ...", just like writers of scripts in any
  10662. other language would expect.  If the first command-line arg is NOT a filename,
  10663. the behavior is as before; this required considerable code juggling between
  10664. prescan() and cmdini(), and also required that ckcmai() *always* call cmdini()
  10665. before prescan().  Thus the conditional internal call to cmdini() from within
  10666. prescan() was removed.  Now we can have Kermit scripts that behave exactly
  10667. like shell scripts: no init file execution, no messages, no banner, etc, and
  10668. argument passing is exactly the same.  ckcmai.c, ckuus[45].c, and documented
  10669. in the new section 7.19 of ckermit2.txt, 23 Mar 99.
  10670.  
  10671. At Jeff's suggestion, redid yesterday's work to preserve existing behavior
  10672. mainly so as not to break K95 startup scripts & shortcuts.  New syntax is
  10673. the same, except the "kerbang" line now must end with " +" (a space and a
  10674. plus sign).  ckcmai.c, ckuusr.h, ckuus[45].c, 24 Mar 99.
  10675.  
  10676. From Jeff: Put back the fix to \fword/split() that was lost in yesterday's
  10677. edits.  ckuus4.c, 25 Mar 99.  Later, Mark Sapiro (who reported the problem)
  10678. verified the fix.
  10679.  
  10680. From William Bader: Cleanup of the older SCO makefile targets.  Some of these
  10681. have a limit of 25 -D's in a cc invocation, and so a common block of
  10682. definitions for these targets was moved to ckcdeb.h.  Plus he found a data
  10683. declaration at the entry to a switch() statement (a no-no): ckuus3.c.  Plus a
  10684. place where strcpy() was copying something to itself in doxsend(): ckuusr.c.
  10685. Built from new sources & makefile on SCO OSR5.0.5 (5 different targets) -- all
  10686. OK, but that proves nothing about the others.  25 Mar 99.
  10687.  
  10688. Added BUILDID=yyyymmdd to makefile.  It doesn't do anything; it's just there
  10689. for anybody (like Peter E) who uses shell scripts to do lots of builds from
  10690. intermediate (e.g. inter-Beta) test versions and wants a unique ID.  makefile,
  10691. 25 Mar 99.
  10692.  
  10693. Added brace-stripping to EXIT message.  ckuusr.c, 25 Mar 99.
  10694.  
  10695. Added help for the "+" option.  ckuus2.c, 25 Mar 99.
  10696.  
  10697. Cleaned up the hideous #ifdef mess around #include <sys/time.h> in ckutio.c
  10698. by moving it to ckcdeb.h.  Any make targets that are not covered by the new
  10699. symbol SYSTIMEH, or are improperly covered by it, can add -DSYSTIMEH or
  10700. -DNOSYSTIMEH.  Did quick builds on SunOS, SCO, HP-UX, and AIX to make sure I
  10701. didn't break anything big.  ckcdeb.h, makefile, ckccfg.txt, 25 Mar 99.
  10702.  
  10703. Added vanity banners for Motorola SV/68 and SV/88.  makefile, ckuver.h,
  10704. 25 Mar 99.
  10705.  
  10706. Changed prescan to handle the case where "+" is given with nothing after
  10707. (it just errors out).  ckuus4.c, 25 Mar 99.
  10708.  
  10709. Changed SHOW FILE and SHOW PROTO to add SHOW XFER to their Also See lists.
  10710. ckuus4.c, 25 Mar 99.
  10711.  
  10712. Added a new symbol USE_STRERROR, which should be defined if strerror() is
  10713. available for use.  Added a new FreeBSD 3.x makefile target that defines this.
  10714. plus designer heralds for the three FreeBSD versions.  makefile, ckuusx.c,
  10715. ckcdeb.h, ckuver.h, 25 Mar 99.
  10716.  
  10717. FAST, CAUTIOUS, and ROBUST did not work as top-level commands because I put
  10718. them in the command keyword table but never filled in the action routines.
  10719. Since they were invisible anyway, I just removed them.  Now they are executed
  10720. as macros, just as they were before.  ckuusr.c, 25 Mar 99.
  10721.  
  10722. Minor corrections to yesterday's Motorola SV/68 and /88 fixes from Gerry
  10723. Belanger.  ckcdeb.h, makefile, 26 Mar 99.
  10724.  
  10725. Another updated SCO makefile target from Wm Bader.  26 Mar 99.
  10726.  
  10727. Moved the flonam[] declaration so NOSPL builds would work. ckuus4.c, 26 Mar 99.
  10728.  
  10729. Although statements of the form:
  10730.  
  10731.   if <condition> .\%a = <definition>
  10732.  
  10733. worked correctly, the same construction used for a macro:
  10734.  
  10735.   if <condition> .macroname = <definition>
  10736.  
  10737. was parsed incorrectly, so subsequent "if defined macroname" would fail when
  10738. it should succeed.  Fixed in dodef(): ckuus6.c, 26 Mar 99.
  10739.  
  10740. Added DIR /MESSAGE:text to append the given message to the end of each
  10741. directory listing line.  Handy in scripts.  ckuusr.h, ckuus6.c, ckermit2.txt,
  10742. 26 Mar 99.
  10743.  
  10744. Changed SHOW OPTIONS to call prtopt() to manage word wrap and page pausing,
  10745. rather than just doing printf's, since lines can easily get longer than the
  10746. screen.  ckuus[r567].c, 26 Mar 99.
  10747.  
  10748. Added a "netbsdxx" target, which includes -DNOIKSD.  makefile, 26 Mar 99.
  10749.  
  10750. Updated sys3upcgm target to remove redundant -D's.  makefile, 26 Mar 99.
  10751.  
  10752. Fixed the SET HOST hint about Rlogin being a priv'd port not to appear unless
  10753. they actually were trying to make an Rlogin connection.  ckuus7.c, 26 Mar 99.
  10754.  
  10755. From Jeff: More fixes to auth and encrypt stuff, added /USERID to SET HOST
  10756. command switches: security modules + ckuusr.h, ckuus7.c, 27 Mar 99.
  10757.  
  10758. From Jeff: Allow /USERID switch to take empty value; update SET HOST help
  10759. text; ckuus[27].c, 29 Mar 99.
  10760.  
  10761. One of the more embarrassing and unprofessional aspects of Kermit's script
  10762. language is the IF/XIF distinction.  A simple change allows multiple commands
  10763. on one line if the line is surrounded by braces and commands are separated by
  10764. commas:
  10765.  
  10766.   C-Kermit> { echo one, echo two }
  10767.   one
  10768.   two
  10769.   C-Kermit>
  10770.  
  10771. This, in turn, makes it possible to have constructions like:
  10772.  
  10773.   if <condition> { command, command, ... }
  10774.   else if <condition> { command, command, ... }
  10775.   else if <condition> { command, command, ... }
  10776.   else { command, command, ... }
  10777.  
  10778. Another simple change allows XIF statements to include any statement after the
  10779. "else" token, just as C programmers would expect:
  10780.  
  10781.   xif <condition> {
  10782.      commands
  10783.   } else xif <condition> {  <-- This is new.
  10784.      commands
  10785.   } else while <condition> {
  10786.      commands
  10787.   }
  10788.  
  10789. But the real goal is to consolidate IF and XIF without breaking existing
  10790. scripts; difficult because "XIF <cond> { commands } else { commands }" is one
  10791. command, whereas "IF <cond>" followed by ELSE is two commands.  So I finagled
  10792. the internal rules:
  10793.  
  10794.  a. If an IF command has a THEN-part that starts with "{" then treat it as XIF.
  10795.  b. If an XIF command lacks an ELSE-part, treat it as an IF.
  10796.  
  10797. This seems to allow all combinations, plus others not recognized before.
  10798. Aside from testing each case individually I also changed all XIFs to IFs in
  10799. ckedemo.ksc, and it worked fine.  So bye bye XIF.  ckucmd.h, ckuusr.h,
  10800. ckuus[56].c, ckucmd.c, ckermit2.txt [1.21,7.20], 29 Mar 99.
  10801.  
  10802. More auth stuff from Jeff: ckcnet.c, ckuath.c, ckuus3.c, ckuus5.c, ckuus7.c,
  10803. makefile, 29 Mar 99.
  10804.  
  10805. More auth stuff from Jeff: ckuath.c, ckuus7.c, 30 Mar 99.
  10806.  
  10807. Added #ifdef NOSHOW around the SHOW OPTIONS routines.  ckuus[r7].c, 30 Mar 99.
  10808.  
  10809. Moved IF/WHILE-condition evaluator to a separate routine, boolexp().  Changed
  10810. boolexp() IF/WHILE parser to use chained FDBs rather than only cmkey() so it
  10811. can parse not only regular IF/WHILE conditions, but also numbers and "fields".
  10812. ckuus6.c, 30 Mar 99.
  10813.  
  10814. Added flag for cmfld() as an option to parse items within parentheses instead
  10815. of within braces.  This allows it to parse the parenthetical expression in
  10816. "if (<condition>) <command>" as a field even if it contains spaces. ckucmd.c,
  10817. 30 Mar 99.
  10818.  
  10819. But the idea of parsing a parenthesized expression as a field and then
  10820. reparsing it proved unfruitful so I gave up on that and simply made "(", ")",
  10821. "&&" (and AND), and "||" (and "OR") keywords with the appropriate semantics.
  10822. This has numerous advantages (?-help still works for the condition words, etc)
  10823. but requires space around every token.  The result executes ckedemo.ksc
  10824. without a hiccup and after some debugging, also handles boolean expressions
  10825. of pretty much arbitrary complexity.  ckuus6.c, ckermit2.txt, 30 Mar 99.
  10826.  
  10827. More auth stuff from Jeff: ckuusr.h,ckuus[37].c,ckcnet.c,ckuath.c, 30 Mar 99.
  10828.  
  10829. From William Bader, 31 Mar 99:
  10830.  . Updated SCO targets: makefile.
  10831.  . Move USE_MEMCPY to after all system headers have been included: ckcdeb.h.
  10832.  . Break down complex printfs for Xenix C compiler: ckctel.c, ckuus4.c.
  10833.  . Xenix 2.3.4 cc adjustments to ckufio.c.
  10834.  . Additional #includes for SCO Xenix 2.3.4 TCP/IP: ckcnet.h.
  10835.  
  10836. WHILE command wasn't working after yesterday's changes.  Fixed by putting
  10837. parens around the condition generated for the WHILE macro.  ckuus6.c,
  10838. 31 Mar 99.
  10839.  
  10840. Made XIF invisible.  ckuusr.c, 31 Mar 99.
  10841.  
  10842. If "while true { get x.x }" is given in remote mode, typing lots of ^C's
  10843. caused a core dump every time.  There was a window between when the console
  10844. was restored to its previous modes (the ttres() call in proto()) and the
  10845. interrupt handler was re-armed (in parser()).  I hacked around this by having
  10846. proto() re-arm the interrupt handlers before ttres() is called (which, in
  10847. remote mode, restored the terminal's sensitivity to ^C, etc).  ckcfn2.c, 31
  10848. Mar 99.
  10849.  
  10850. The ^C^C^C pseudointerrupt at server command wait always set success = 0.  In
  10851. fact, it should leave the success variable alone if any file transfers have
  10852. been attempted; should set it to 1 if no file transfers have been attempted
  10853. since server mode was started, and should set to 0 if a transfer was in
  10854. progress.  Fixed in ckcpro.w, 31 Mar 99.
  10855.  
  10856. Reinstated FAST, ROBUST, and CAUTIOUS as top-level keywords (which simply
  10857. run the macros of the same name), so now completion and HELP work for them.
  10858. However, they are still invisible due to limited real-estate on the top-level
  10859. "?" screen.  ckuusr.c, 31 Mar 99.
  10860.  
  10861. Discovered that two top-level keyword symbols had the same value.  Fixed in
  10862. ckuusr.h, 31 Mar 99.
  10863.  
  10864. Assorted improvements to HELP texts.  ckuus2.c, 31 Mar 99.
  10865.  
  10866. Made /LOG and /LIST and /VERBOSE all be synonyms for each other in the PURGE
  10867. and DELETE switch tables.  Ditto for /NOLOG, /NOLIST, and /QUIET. ckuus[67].c,
  10868. 31 Mar 99.
  10869.  
  10870. Changed askmore() not to ask if not at top level.  That's because the terminal
  10871. modes are likely to be messed up and so single-character responses (like space
  10872. bar, "n", etc) can't be processed correctly anyway.  ckuusx.c, 31 Mar 99.
  10873.  
  10874. Added DIRECTORY [ other-switches ] /ARRAY:x [ filespec ].  If the /ARRAY:x
  10875. switch is given (x is the array name, required), the filenames are put in the
  10876. array, rather than listed.  This allows the DIRECTORY file-selection switches
  10877. to be used to build a custom file list easily and quickly.  ckuusr.h,
  10878. ckuus6.c, 31 Mar 99.
  10879.  
  10880. Fixed some long lines in ckuath.c.  1 Apr 99.
  10881.  
  10882. Backed off on yesterday's askmore() change -- apparently it is not needed
  10883. after all.  ckuusx.c, 1 Apr 99.
  10884.  
  10885. Added three simple routines to allow rudimentary screen formatting by scripts:
  10886. ck_cls(), ck_cleol(), and ck_curpos(row,col).  In UNIX, these rely on
  10887. termcap/terminfo; elsewhere they use the built-in stuff (MYCURSES, SMG, etc).
  10888. ckuusr.h, ckuusx.c, 1 Apr 99.
  10889.  
  10890. Added SCREEN { CLEAR, CLEOL, MOVE <row> <col> }.  These all work fine on a
  10891. termcap system (SunOS), on terminfo system (SCO, HP, Solaris), and on VMS with
  10892. SMG, but obviously need wider testing.  The UNIX versions of these commands
  10893. use the tgetent() info (which we were already getting) thru calls to
  10894. tgetstr(), tgoto(), and tputs().  They don't depend on curses at all, and
  10895. curses does not need to be initialized for these commands to be used (but SMG
  10896. does; the new code takes care of that).  (I realize that some of these new
  10897. commands have synonyms in K95; these are indicated in the K95 HELP SCREEN
  10898. text.)  Also ensured that -DNOCURSES builds still work.  ckuusr.[ch],
  10899. ckuus[x2].c, 1 Apr 99.
  10900.  
  10901. Reinstated screen-clearing on Ctrl-L in the parser.  ckucmd.c, 1 Apr 99.
  10902.  
  10903. Made CLS a visible command in all versions, not just K95.  ckuusr.c, 1 Apr 99.
  10904.  
  10905. Auth changes from Jeff: ckuus[37].c, ckuath.c, 2 Apr 99.
  10906.  
  10907. Fixed long lines in ckuath.c, 2 Apr 99.
  10908.  
  10909. Makefile changes for AT&T 7300 and SCO UNIX.  2 Apr 99.
  10910.  
  10911. Discovered that the NOT operator does not always work as intended in compound
  10912. Boolean expressions.  E.g. in "if ( not true || false )" evaluates to true
  10913. rather than false because NOT affects everything that follows.  NOT is a unary
  10914. operator that should bind only to the quantity or expression immediately to
  10915. its right.  To fix:
  10916.  
  10917.  . I added a new math operator, "prefix !", which inverts the truth value
  10918.    of its operand (as distinct from "prefix ~", which flips the bits, and
  10919.    "postfix !", which is the factorial operator).
  10920.  
  10921.  . Used this to implement NOT internally.
  10922.  
  10923. ckuus[56].c, 2 Apr 99.
  10924.  
  10925. More auth changes from Jeff: ckuath.c, ckcnet.c, ckuus3.c, 2 Apr 99.
  10926.  
  10927. From Jeff: Make 2nd [x]makestr() arg const in ANSIC builds.  ckclib.[ch],
  10928. 2 Apr 99.
  10929.  
  10930. Changed GETC to not supply a gratuitous CRLF if given from a script (i.e.
  10931. cmdsrc() != 0).  ckuus6.c, 2 Apr 99.
  10932.  
  10933. Added != to repertoire of logical operators for Boolean assertions, as in
  10934. "if ( != \%c 3 ) ..."  ckuusr.h, ckuus6.c, 2 Apr 99.
  10935.  
  10936. Deduced that termcap/terminfo cursor coordinates are 0-based, not 1-based.
  10937. Adjusted the curses version of ck_curpos() accordingly.  ckuusx.c, 3 Apr 99.
  10938.  
  10939. Discovered a new problem: missing macro parameters were not being replaced
  10940. by an empty value.  For example:
  10941.  
  10942.   def cd { cd \%1 }
  10943.   xx
  10944.  
  10945. would cause an error, rather than defaulting to the current directory as it
  10946. should.  Hmmm, actually, it's an old problem -- it was always there.  Years
  10947. ago, we went to extreme lengths to try to accommodate backslashes in filenames
  10948. in K95: cmifi() prescans the string (using the chkvar() function) to see if it
  10949. contains variables.  So if the user said "cd c:\blah\foo", the scan would not
  10950. turn up any variables, and so we would not pass the string through the
  10951. evaluator, which would have eaten the backslashes (or worse).  But what about
  10952. "cd \%a"?  Is "\%a" a variable or an actual directory?  To solve this dilemma,
  10953. chkvar() would send a copy of "\%a" to the evaluator and see if it had a
  10954. definition.  If it did, chkvar() would say it was a variable.  If it did not,
  10955. chkvar() would say it was not a variable, and so therefore it would not be
  10956. evaluated.  It turns out this has rather disastrous consequences for macro
  10957. arguments that are omitted.  In the "xx" definition above, \%1 does not have a
  10958. definition, even though it is a variable, and therefore it is not evaluated,
  10959. and therefore "\%1" is given literally to the CD command.  The only sensible
  10960. fix for this is to change chkvar() to check the syntax of the variable, but
  10961. not whether it has a value.  That means if any PC users want to refer to a
  10962. file that has the same syntax as a variable, they'll need to double the
  10963. backslash.  chkvar(): ckuus6.c; cmifi2(): ckucmd.c, 3 Apr 99.
  10964.  
  10965. This was (at least) a double-ended problem.  It also turns out the evaluator,
  10966. zzstring(), gave a failure return code if a variable was empty, which is
  10967. wrong -- emptiness is a perfectly valid value for any variable.  zzstring():
  10968. ckuus4.c, 3 Apr 99.
  10969.  
  10970. There's more.  cmifi(), rather than checking the return code from zzstring(),
  10971. checked the length of the result (0 == failure, > 0 == success), which, again,
  10972. prevented substitution of an empty variable value.  cmifi() was changed to
  10973. test the zzstring return value; if negative we return a parse failure; if 0 or
  10974. greater but the result was empty, we substitute the given default.  ckucmd.c,
  10975. 2 Apr 99.
  10976.  
  10977. In fact, the improper-checking-of-zzstring-success syndrome was pervasive
  10978. throughout all the ckucmd routines and similar fixes had to be applied to most
  10979. of them.  ckucmd.c, 3 Apr 99.
  10980.  
  10981. The mess in cmofi() was especially bad.  Instead of calling chkvar(), it had
  10982. its own inline -- but slightly different -- version of chkvar(), which in any
  10983. case did not accomplish its purpose.  For example, "mkdir c:\123" (the classic
  10984. example) created a directory named "{".  But cmifi(), which does use chkvar(),
  10985. could not handle "cd c:\123" or "rmdir c:\123" when \123 referred to "{".  So
  10986. I changed cmofi() to use chkvar() like cmifi() does -- at least now they are
  10987. symmetrical.  For total consistency, I put every reference to chkvar() in
  10988. ckucmd.c in #ifdef OS2..#endif (previously some of them were this way and some
  10989. weren't).  Obviously this will need testing and debugging in K95.  ckucmd.c,
  10990. 3 Apr 99.
  10991.  
  10992. Meanwhile, chkvar() was also called by IF DEFINED.  Since chkvar() no longer
  10993. checks if a variable is defined, the IF DEFINED code had to be changed to
  10994. check this itself.  doif(): ckuus6.c, 3 Apr 99.
  10995.  
  10996. Bulletproofed all cm...() routines against null pointers passed as arguments.
  10997. ckucmd.c, 3 Apr 99.
  10998.  
  10999. In running the big script torture tests I saw a few glitches, and in trying to
  11000. isolate them, was able to produce a core dump consistently.  At some time in
  11001. the past not revealed in my notes, some of the cm...() routines were "fixed"
  11002. to not write into their help-message argument (xhlp), by first copying it to a
  11003. global malloc'd buffer using makestr() (thus freeing the previous one, if
  11004. any), and then changing xhlp to point at the malloc'd buffer.  This seemed
  11005. like a safe bet, and I'm still not sure why it wasn't, but these very makestr()
  11006. calls (the free() in particular) were the location of each crash, which
  11007. usually occurred only after the program had been running for quite a while.
  11008. Changing the global malloc'd buffer to a series of local automatic ones cured
  11009. the problem.  ckucmd.c, 3 Apr 99.
  11010.  
  11011. Or did it?  There were still some infrequent glitches evident in any scripts
  11012. involving arrays, or more to the point, arrays explicitly declared with the
  11013. DECLARE statement that included a list of initial values.  Turns out I was
  11014. malloc'ing BYTES rather than WORDS for the array pointers in the DECLARE
  11015. parser.  This was obviously a serious memory leak and could have had any
  11016. consequences at all.  The bad code has been with us since 18 Jun 1997 (i.e.
  11017. after 6.0 was released, but before K95 1.1.13.  I doubt, however, that this
  11018. has been the cause of any crashes in real life, because who uses array
  11019. initializers?).  Fixed in ckuusr.c, 3 Apr 99.
  11020.  
  11021. After these changes, "send *" wouldn't work.  This one was really scary.
  11022. Something was writing over cmarg2.  I traced it to zfnqfp() in ckufio.c.
  11023. There was a loop that, under certain bizarre conditions, might not terminate
  11024. properly, and when it didn't it could write all over memory -- and it seems
  11025. today was my lucky day at creating bizarre conditions. I put in a better
  11026. termination test and also rearranged some code that didn't make sense.
  11027. ckufio.c, 3 Apr 99.
  11028.  
  11029. Certain debugging statements write memory addresses, PIDs, etc, into the debug
  11030. log, some of them periodically -- e.g. for every command, which makes it very
  11031. difficult to automatically compare long debug logs.  I commented out many of
  11032. the debug statements that do this.  ckutio.c, ckucmd.c, ckuus4.c, 3 Apr 99.
  11033.  
  11034. After all this I ran hundreds of script torture tests and transferred many
  11035. gigabytes of files in both directions with no trouble.  I'm not 100% confident
  11036. that all holes are plugged, but some are.  Progress...
  11037.  
  11038. The next day...
  11039.  
  11040. New simplified makestr() from Jeff -- I just took it without looking at
  11041. it very much.  But I used it all day and it seemed OK.  Script torture tests
  11042. still work, etc.  ckclib.c, 4 Apr 99.
  11043.  
  11044. Putting zfnqfp() back the way it was before yesterday brings back the
  11045. overwriting of cmarg2, so something is still wrong.  Added code to zfnqfp()
  11046. to force a core dump at various places (before and after the code that writes
  11047. over cmarg2), and then got a backtrace with gdb.  In all cases, the stack
  11048. looked just fine.  Built a version with the malloc debugger.  Can still
  11049. replicate the error, but the malloc debugger finds nothing wrong.  Built a
  11050. version on an entirely different platform (PC with SCO 5.0.5, with both gcc
  11051. and with SCO cc) and got exactly the same problem, so it's not architecture or
  11052. compiler dependent.  So this pretty much narrows it down to plain old bad
  11053. code.  But the zfnqfp() code looks just fine.  The problem involves its tmp[]
  11054. buffer, an automatic array.  The 9th and subsequent bytes written into this
  11055. buffer appear as the value of cmarg2 (if I make the buffer static global the
  11056. problem disappears).  Therefore cmarg2 must be pointing at a memory address 8
  11057. bytes to the right of this automatic buffer -- but how could that happen?
  11058. Searching through doxsend() revealed the following mistake:
  11059.  
  11060.   if ((x = cmtxt(m,"",&cmarg2,NULL)) < 0)
  11061.     goto xsendx;
  11062.  
  11063. This dates from about July 1997 so was present in C-Kermit 6.1 and K95 1.1.14
  11064. and later.  The mistake was forgetting that the string pointer returned by any
  11065. cm...() routine points to an ephemeral string (in fact it is the atom buffer);
  11066. whatever string it points to must be copied to a safe place before calling any
  11067. further cm...()'s.  So of course the buffer pointed to by cmarg2 in this case
  11068. had probably been recycled 100 times by the time we finally needed it.  The
  11069. fix is to treat "send foo bar" exactly like "send /as-name:bar foo", using the
  11070. same data structures and buffers, etc, and then setting cmarg2 from them after
  11071. the command has been confirmed.  doxsend(): ckuusr.c, 4 Apr 99.
  11072.  
  11073. Could this have caused a core dump?  I don't think so.  It just meant that
  11074. cmarg2 (the "as-name" pointer) might have been pointing to a random string,
  11075. which would result in either (a) a file being sent with the wrong name, or
  11076. (b) C-Kermit refusing to send a file because an as-name was given when the
  11077. source specification was wild.
  11078.  
  11079. Meanwhile, I removed about 400 useless lines from ckuusr.c that were left
  11080. behind from before all the SEND-class commands (except PSEND) were routed to
  11081. doxsend().  Made a new addsend() routine that consolidates the ADD SEND-LIST
  11082. code which was previously scattered all over.  4 Apr 99.
  11083.  
  11084. Fixed a bug in ADD SEND-LIST: it wasn't putting the full pathname in the send
  11085. list, so if you changed directories, it wouldn't find the files -- or worse,
  11086. it would send the wrong ones.  The code to get the full pathname was there,
  11087. but it wasn't working right.  This goes all the way back to 6.0.  Fixed in
  11088. ckuusr.c, 4 Apr 99.
  11089.  
  11090. Made an improvement to ADD SEND-LIST: the file type (text or binary) is
  11091. defaulted according to our pattern lists, rather than the prevailing file type
  11092. if (a) PATTERNS are ON, and (b) we actually have pattern lists, (c) the
  11093. prevailing file type is not IMAGE or LABELED, and (d) the file matches a
  11094. pattern.  ckuusr.c, 4 Apr 99.
  11095.  
  11096. Fixed a bug I introduced yesterday.  Don't supply default in cm...() functions
  11097. when giving help -- only when the field is actually being entered (via field
  11098. or command termination or by completion).  Otherwise we get incomplete menus
  11099. when the user types "?" -- in fact, the menu only contains one item if a
  11100. default was included in the cm...() call.  ckucmd.c, 4 Apr 99.
  11101.  
  11102. After all these changes, made sure that SEND, MSEND, MAIL, PSEND, ADD, REMOVE
  11103. still work.  Some didn't, but now they do.
  11104.  
  11105. Added IF OPEN CONNECTION (fails if remote, gets ttchk() result if local)
  11106. and IF OPEN CX-LOG.  ckuus6.c, 4 Apr 99.
  11107.  
  11108. The preponderance of "output blah\13" in scripts is (a) ugly, (b) confusing
  11109. to newcomers, and (c) begs for a command to send a "line", so I added LINEOUT,
  11110. which is just like OUTPUT, except it supplies a carriage return at the end
  11111. (following Telnet rules, newline settings, etc).  (I thought of calling it
  11112. OUTLINE but that means something else).  ckuusr.[ch], ckuus5.c, 4 Apr 99.
  11113.  
  11114. Corrections from Jeff to yesterday's code: ckuus5.c, ckucmd.c, ckuusr.h,
  11115. 5 Apr 99.
  11116.  
  11117. Discovered that when sending from a SEND-LIST, the file type given in the
  11118. ADD command was ignored if TRANSFER MODE was AUTO and PATTERNS were ON.
  11119. Fixed sfile() to use the file type from the SEND-LIST.  ckcfns.c, 5 Apr 99.
  11120.  
  11121. ^C^C^C at Kermit in remote RECEIVE mode was giving an annoying hint message.
  11122. Fixed in parser(), ckuus5.c, 5 Apr 99.
  11123.  
  11124. Made CLEAR SCREEN a synonym for SCREEN CLEAR.  (Yes, so now we have *four*
  11125. commands that do the same thing.)  ckuusr.[ch], 5 Apr 99.
  11126.  
  11127. SCREEN { CLEAR, MOVE, CLEOL } doesn't work in IKSD.  I wonder why.  It knows
  11128. the terminal type (and TERM is defined).  Maybe tgetent() fails when called
  11129. from a process that does not have a tty.  Added some diagnostics.  Also made
  11130. the SCREEN command default to using ANSI sequences in UNIX if tgetent() fails.
  11131. If this bothers anybody, I'll add SET commands or something.  Otherwise, it'll
  11132. be like K95 host mode, which uses ANSI sequences no matter what (actually we
  11133. might be able to do better in 1.1.18 -- if it knows the client's terminal type,
  11134. it also knows the clear-screen, cleol, and curpos sequences, right?  So then
  11135. the SCREEN command could "just work" if the ck_blah() routines were filled in
  11136. for the 'sstelnet' case, no matter what the client's terminal type, as long
  11137. as it was recognized & supported by K95).  ckuusx.c, 5 Apr 99.
  11138.  
  11139. Gerry Belanger reported compilation errors with the new tgetstr() and tputs()
  11140. calls.  Problem 1: tgetstr() was called before #include <curses.h>.  The
  11141. obvious solution would have been to move the #include higher up, but it turns
  11142. out it is where it is for a reason, namely that it clobbers numerous other
  11143. symbols that we depend on.  So the actual solution was to extract the tgetstr()
  11144. calls to a separate routine and put the new routine below the #include.  Since
  11145. there was no point in having it return a value, I made it VOID but then it
  11146. wouldn't compile -- eventually I rediscovered that VOID was one of the macros
  11147. that <curses.h> clobbers.  Problem 2: tputs() wants a function pointer as its
  11148. 3rd arg (OK) but the function must be one that takes an int as a parameter, not
  11149. a char.  I was using conoc(), of course, but that takes a char.  So I installed
  11150. a stupid interface routine that takes an int, converts it to a char and *then*
  11151. calls conoc().  Isn't there a better language than C?  ckuusx.c, 5 Apr 99.
  11152.  
  11153. Corrections to new ckuusx.c after trying to compile it on FreeBSD 2.2.7
  11154. myself.  ckuusx.c, 6 Apr 99.
  11155.  
  11156. Removed the old, commented-out doget() routine, about 250 lines.  ckuus6.c,
  11157. 6 Apr 99.
  11158.  
  11159. Changed REMOTE HOST and REMOTE KERMIT to copy the cmtxt buffer to a safe place
  11160. before use; not strictly necessary, but it's poor practice to take advantage
  11161. of this special case.  ckuus7.c, 6 Apr 99.
  11162.  
  11163. New VOS network module from Jeff.  cklnet.c, 6 Apr 99.
  11164.  
  11165. Added support for Motorola Codex modems.  ckuusr.h, ckudia.c, 6 Apr 99.
  11166.  
  11167. Discovered that streaming transfers to C-Kermit on HP-UX 8.00, 9.00, or 10.20
  11168. in remote mode do not work at all -- they lose characters galore; this is
  11169. probably true, therefore, for all HP-UX versions.  In each case, if I turn off
  11170. streaming and reduce the packet-size x window-size to 500, uploads work.  (But
  11171. there's no problem with streaming downloads.)  Further experimentation shows
  11172. the problem goes away if I tell the remote C-Kermit to "set flow xon/xoff"
  11173. prior to transfer.  Evidently the HP-UX Telnet server treats "flow none" as a
  11174. request to drop characters, just like VMS.  Pretty silly!  Changed default
  11175. remote-mode flow-control for HP-UX from NONE to XON/XOFF (also tested KEEP and
  11176. RTS/CTS and neither one works), and updated file-transfer failure hints
  11177. accordingly.  ckcmai.c, ckuus5.c, ckermit2.txt, 6 Apr 99.
  11178.  
  11179. Changed \fsplit() to not require an array argument, in which case it simply
  11180. returns the word count.  Also not to require that the array, if specified, be
  11181. predeclared -- if it is not, it is created dynamically.  Also to allow an
  11182. empty array argument followed by break and/or include arguments.  Also to
  11183. work with no arguments at all, in which case it returns "0".
  11184. ckuus4.c, 6 Apr 99.
  11185.  
  11186. Changed DECLARE with initializers to accept empty subscript brackets in which
  11187. case the array is sized according to the number of initializers (like C) --
  11188. including none at all.  Also changed DECLARE to evaluate the initializers
  11189. rather than copy them literally -- otherwise there would be no way to
  11190. initialize an array element to the value of a variable, rather than its name.
  11191. This way, a literal name can still be given according to normal rules,
  11192. e.g. "dcl \&a[] = \\%a ..."  ckuusr.c, ckermit2.txt.  6 Apr 99.
  11193.  
  11194. Auth stuff & help text from Jeff: ckcmai.c, ckuus2.c, ckuath.c, ckcssl.h,
  11195. 7 Apr 99.
  11196.  
  11197. Added date-time format info to HELP DATE and then added a reference to this
  11198. from all other HELP texts that involve date/times.  ckuus2.c, 7 Apr 99.
  11199.  
  11200. Added [wk]ermit to UNIX binary patterns.  ckcmai.c, 7 Apr 99.
  11201.  
  11202. Increased the command buffer length from 10K to 64K for (BIGBUFOK + not NOSPL)
  11203. builds.  This allows for longer strings, macros, etc.  Tested wermit10k
  11204. against wermit64k running ckedemo.ksd (minus the interactive parts) side by
  11205. side on the same computer under various loads (this is a compute-bound script
  11206. with no i/o).  wermit64k is 10% to 30% slower under various loads.  In 21
  11207. trials, wermit10K was faster than wermit64K 19 times and the same 2 times; on
  11208. average the wermit10k version was 19.7% faster.  Changing the buffer to 32K
  11209. reduces the difference to a fairly constant 10%.  The big hit in all cases
  11210. comes in the evaluation of recursive user-defined functions (because we have
  11211. to replicate the command buffers for every level of recursion).  If we remove
  11212. the recursive function from the script, there is no difference in execution
  11213. time among the three versions.  So... whereas:
  11214.  
  11215.  . There will always be SOME limit on string length;
  11216.  . Most people will never write or use a recursive function;
  11217.  . Other script languages like DCL have a 32K limit;
  11218.  . 64K is (more) likely to cause trouble on segmented architectures;
  11219.  . In SunOS at least the buffer size doesn't affect the executable size;
  11220.  . Kermit is a very high level language so scripts are relatively short;
  11221.  . Nobody has complained about the 10K restriction on script length;
  11222.  . Long macros can always be decomposed anyway;
  11223.  . The only complaint has been about the max length of a variable's value;
  11224.  . It would be a bad idea to add a runtime SET command for this (since it
  11225.    would pull the rug out from under the very command parser that was
  11226.    parsing it)...
  11227.  
  11228. ... I changed the buffer length to (32K - 1).
  11229.  
  11230. Added \v(inwait) = timeout value of most recent INPUT command.  ckuusr.h,
  11231. ckuus4.c, 7 Apr 99.
  11232.  
  11233. Defined a bunch of switches to the DELETE command to make it more consistent
  11234. with DIRECTORY, PURGE, and SEND.  ckuusr.h, ckuus6.c, 7 Apr 99.
  11235.  
  11236. Filled in the DELETE switch definitions:
  11237.   /LIST = /LOG = /VERBOSE    (These were there before but I redid them)
  11238.   /NOLIST = /NOLOG = /QUIET  (ditto)
  11239.   /[NO]HEADINGS
  11240.   /[NO]DOTFILES
  11241.   /[NO]PAGE
  11242.   /EXCEPT:<exception-list>
  11243.   /BEFORE:<date>, /NOT-BEFORE:<date>, /AFTER:<date>, /NOT-AFTER:<date>.
  11244.  
  11245. And added SET OPTIONS DELETE and added DELETE options to SHOW OPTIONS.
  11246. Still needs fine tuning, help text, and maybe a few more switches, etc.
  11247. ckuus[356].c, 7 Apr 99.
  11248.  
  11249. From Jeff, IKSD fixes:
  11250.  
  11251.  . initialize socket for non-blocking I/O and OOB inline
  11252.  
  11253.  . correct handling of CKXPRINTF definitions in ckuusx.c that was
  11254.    resulting in data corruption on encrypted sessions.
  11255.  
  11256.  . Many corrections to data transfer and negotiations for SSL/TLS
  11257.  
  11258.  . Traced further data corruption on encrypted sessions to the
  11259.    output of informational messages to the socket during negotiations.
  11260.    The messages were meant for the end user but when IKSD is being
  11261.    used they should be skipped.  Solves lots of miscellaneous issues.
  11262.  
  11263.  . Discovered that when DES is not available from K95CRYPT.DLL and
  11264.    not exported from the Kerberos DLLs we can't performed Mutual
  11265.    authentication.  I'm not sure whether we care or not at the
  11266.    present time.
  11267.  
  11268.  . Do not initialize Telopt negotiation defaults until after sysinit()
  11269.    so that we can make responsible choices based upon installed
  11270.    libraries.
  11271.  
  11272. Plus: The ckgetpid() prototype should not be #ifdef CKGETPID, corrections for
  11273. Stratus.  ckcmai.c ckuusr.h ckuus6.c ckutio.c ckuath.c ckctel.c ckcnet.c
  11274. cklnet.c ckuusx.c, 8 Apr 99.
  11275.  
  11276. Later...  The Stratus version builds!  (Dat Thuc Nguyen built it with TCP/IP
  11277. and X.25 support on two architectures.)
  11278.  
  11279. Parameterized fileselect() and moved it to ckclib.  ckcfns.c, ckclib.[ch],
  11280. 8 Apr 99.
  11281.  
  11282. Changed DELETE to use fileselect().  ckuus6.c, 8 Apr 99.
  11283.  
  11284. Added cmgkwflags() to get keyword flags after successful cmkey() parse.
  11285. This makes it much easier to check if a switch requires an argument.  Added
  11286. appropriate calls everywhere (or at least most places) switches are parsed.
  11287. ckucmd.[ch], 8 Apr 99.
  11288.  
  11289. Today's project is to make SEND, DIRECTORY, DELETE, and PURGE use the same
  11290. set of file-selection switches, and then use fileselect() based on them:
  11291.  DIRECTORY:
  11292.   /[NOT-]{BEFORE,AFTER},/LARGER,/SMALLER,/EXCEPT.
  11293.  DELETE:
  11294.   /[NOT-]{BEFORE,AFTER},/LARGER,/SMALLER,/EXCEPT.
  11295.  PURGE:
  11296.   /[NOT-]{BEFORE,AFTER},/LARGER,/SMALLER,/EXCEPT,/[NO]DOTFILES,/[NO]HEADING
  11297. Also added /SIMULATE to DELETE and PURGE for testing / previewing.  Also Added
  11298. /ASK to DELETE and PURGE (like "rm -i") because people ASKed for it; this
  11299. required adding a "quit" option to getyesno().  ckcfns.c ckclib.c ckclib.h
  11300. ckcpro.c ckucmd.c ckucmd.h ckuus3.c ckuus5.c ckuus6.c ckuus7.c ckuusr.c
  11301. ckuusr.h ckuusx.c ckermit2.txt.  8 Apr 99.
  11302.  
  11303. From Jeff -- corrections to yesterday's work, plus pseudoimplementation of
  11304. the Telnet LFLOW option.  ckctel.c, ckcnet.c, ckuusr.h, ckuus[r36].c, ckucmd.c,
  11305. 9 Apr 99.
  11306.  
  11307. Added /QUIET /VERBOSE (and their synonyms) to COPY and RENAME, for the benefit
  11308. of script writers who want to provide visual feedback easily.  ckuus6.c,
  11309. 9 Apr 99.
  11310.  
  11311. Added SET DIAL METHOD AUTO and made it the default.  This means that if Kermit
  11312. knows your local country code, and it is on the list of countries in which
  11313. tone dialing is universally available, tone dialing is used automatically.
  11314. The initial list includes North America, the UK, Germany, and Sweden.  There
  11315. is also a list for countries in which pulse dialing is required (initially
  11316. empty).  Also added SET DIAL { TONE-COUNTRIES, PULSE-COUNTRIES } to modify the
  11317. lists, and updated SHOW DIAL to show the lists.  Also allow setting of dial
  11318. method from K_DIAL_METHOD environment variable.  ckuusr.h, ckuus[346].c,
  11319. ckudia.c, ckermit2.txt, 9 Apr 99.
  11320.  
  11321. IKSD login fix for AIX (and probably others) from Jeff.  ckufio.c, 9 Apr 99.
  11322.  
  11323. Added Finland to tone-dialing default list.  ckudia.c, 11 Apr 99.
  11324.  
  11325. Added prototypes for tn_sxdisploc() and tn_sndloc() to ckctel.h, 11 Apr 99.
  11326.  
  11327. Added a default: break; case to a switch statement that has no cases if
  11328. none of {AUTH,CRYPT,IKSD} are defined.  ckctel.c, 11 Apr 99.
  11329.  
  11330. Changed date/time parsing to allow YESTERDAY, TODAY, TOMORROW, + or - <number>
  11331. { DAYS, WEEKS, MONTHS, YEARS }.  This affects all date fields and switches (so
  11332. you can say, for example, "delete /before:today *" or "send /since:yes *"), the
  11333. DATE command, and also the date-related functions, particularly \fcvtdate().
  11334. ckucmd.c, ckermit2.txt, 11 Apr 99.
  11335.  
  11336. Minor corrections to yesterday's date work after more testing.  ckucmd.c,
  11337. 12 Apr 99.
  11338.  
  11339. Added HELP PURGE, HELP DELETE.  Updated HELP DATE text to show new options.
  11340. ckuus2.c, 12 Apr 99.
  11341.  
  11342. Removed trailing blanks & tabs from just about every source file.  12 Apr 99.
  11343.  
  11344. Oops, the trimming was done with the EMACS "trim" command, which has the
  11345. unfortunate side effect of also tabifying the file, even the insides of string
  11346. constants.  Put 'em all back the way they were before, then wrote a trim
  11347. program that trims trailing whitespace from all the files in its arglist
  11348. without messing with tabs.  Checked to make sure HELP and SHOW text is still
  11349. formatted correctly.  All modules, 12 Apr 99.
  11350.  
  11351. Updated HELP text for other changes since Beta.05 that had not yet been
  11352. reflected in the HELP command.  ckuus2.c, 12 Apr 99.
  11353.  
  11354. Fixed date arithmetic to handle years prior to 1000, but only back to 0.
  11355. Negative years (or years after 9999) are not handled due to limitations of the
  11356. fixed yyyymmdd notation.  ckucmd.c, 12 Apr 99.
  11357.  
  11358. Fixed parser foulups when editing back into a /SINCE, /BEFORE (etc), or
  11359. /EXCEPT switch in domydir(), dodel(), and dopurge().  Also Fixed PURGE and
  11360. DELETE /SIMULATE to automatically select /LIST also, since what's the point
  11361. otherwise?  Also added the PURGE and DELETE defaults to the SHOW OPTIONS
  11362. display.  ckuus[67].c, 12 Apr 99.
  11363.  
  11364. Adjustments to make -DNOICP builds work.  ckuus[4y].c, ckucns.c, ckcnet.c,
  11365. 12 Apr 99.
  11366.  
  11367. Fixed another problem in \fsplit(), in which it wasn't dealing correctly with
  11368. the no-array-specified case.  ckuus4.c, 13 Apr 99.
  11369.  
  11370. From Jeff: Kerberos ticket auto-delete/destroy: ckcnet.c ckcnet.h ckuath.h
  11371. ckuus2.c ckuus3.c ckuus7.c ckuusr.h ckuusx.c, 13 Apr 99.
  11372.  
  11373. Fixed messed-up spacing in ckcpro.c because of tabification of ckwart.c that
  11374. was not undone yesterday.  ckwart.c, 13 Apr 99.
  11375.  
  11376. Increased sizes of INPUT buffer, TAKE and DO stacks, and some other stuff for
  11377. BIGBUFOK builds.  ckuusr.h, 13 Apr 99.
  11378.  
  11379. When C-Kermit was in CONNECT mode and the Kermit on the far sent an I packet,
  11380. causing the local Kermit to enter server mode automatically, and then sent a
  11381. FINISH request, the local Kermit would return to its prompt rather than
  11382. resuming CONNECT mode.  Diagnosis: the FINISH handler never set the success
  11383. variable, so the autodownload code thought a transfer had failed and therefore
  11384. deliberately did not resume CONNECT mode so the user could see the error
  11385. message.  Solution: the server should set success = 1 when a FINISH has been
  11386. executed successfully.  ckcpro.w, 13 Apr 99.
  11387.  
  11388. Bug: A command file makes a connection, then if success takes a command file
  11389. and then CONNECTs.  The command file defines a macro that includes an ASK
  11390. command and assigns it to a key.  User presses key, and ASK reads a linefeed
  11391. that was "pushed" by the command parser due to its command state.  Attempted
  11392. to work around by setting a global flag, "askflag", whenever ASK, ASKQ, GETOK,
  11393. etc, are active, to bypass the pushing (and therefore also the popping).
  11394. Can't test in C-Kermit because no Kverbs, but at least it seems to do no harm;
  11395. needs to be tested in K95.  ckucmd.c, ckuus[56].c, 13 Apr 99.
  11396.  
  11397. Eliminated a bunch of unresolved references at link time for NOICP builds
  11398. by shuffling declarations & #ifdefs.  Various modules, 13 Apr 99.
  11399.  
  11400. SSL/TLS changes from Jeff.  ckcnet.c, ckutio.c, ckcssl.h, 14 Apr 99.
  11401.  
  11402. Jeff fixed my fix to the ASK bug.  ckucmd.c, 14 Apr 99.
  11403.  
  11404. Added Netherlands & Belgium to tone-countries list.  ckudia.c, 14 Apr 99.
  11405.  
  11406. Made NOICP imply NODIAL, since there's no way to dial if there is no
  11407. interactive command parser.  This eliminated various unresolved references
  11408. at link time.  Also made NOICP imply NOCKXYZ (no external protocols), since
  11409. there is no way to choose them without an interactive command parser.
  11410. ckcdeb.h, 14 Apr 99.
  11411.  
  11412. Moved declaration of noprinter from ckuus3.c to ckcmai.c for NOICP.  14 Apr 99.
  11413.  
  11414. Now that I can build a NOICP version, I checked command-line option processing.
  11415. As suspected, items handled by prescan() were not being handled in the NOICP
  11416. build.  Rearranged prescan() code and calls to make everything work.  ckcmai.c,
  11417. ckuus4.c, 14 Apr 99.
  11418.  
  11419. The NOICP version did not handle the "command-line personalities" business
  11420. (e.g. act like Telnet if called Telnet).  Fixed by juggling #ifdefs in
  11421. ckcmai.c, 14 Apr 99.
  11422.  
  11423. However, when a NOICP version of Kermit is called Telnet, there is no way for
  11424. it to transfer files: no file-transfer command-line options, no command parser
  11425. to escape back to, and autodownload doesn't work because it depends on having
  11426. a command parser.  For UNIX/NOICP only, I implemented autodownload by having
  11427. the CONNECT module call proto() directly.  ckcker.h, ckucns.c, 14 Apr 99.
  11428.  
  11429. The NOICP telnet client can send files fine (via autoupload/server), but can't
  11430. receive them.  It goes into receive mode but then fails to advance its packet
  11431. number and ACKs packet 1 with ACK(0).  The sequence number in the ACK is
  11432. winlo, which the debug log shows is set to 1 at this point.  Further debugging
  11433. shows that winlo is reset to 0 when rcvfil() calls zfnqfp().  However, adding
  11434. debug() calls within zfnqfp() made the problem go away.  Hours later, the aha
  11435. experience: zfnqfp() itself was not the culprit -- it was the parameters
  11436. passed to it by rcvfil().  Very non-obvious: we were writing into the fspec[]
  11437. buffer using CKMAXPATH as the max length.  However, fspec[] was sized to CMDBL
  11438. if NOMSEND was defined, which happens when NOICP is also defined.  Normally
  11439. CMDBL is (much) longer than CKMAXPATH, but in the NOICP case, CMDBL
  11440. (command-buffer length) is 508, whereas CKMAXPATH (on the platform in
  11441. question, at least) is 1024.  Since we were using strncpy() to write the
  11442. results into the buffer, and since (at least this version of) strncpy()
  11443. right-pads with NULs all the way the end of its destination buffer based on
  11444. the given length, this wrote all over memory.  Fixed by setting a variable,
  11445. fspeclen, to the length of the fspec[] buffer, and using that in all
  11446. references to its length, rather than CKMAXPATH.  I don't think this
  11447. particular problem would ever have occurred before today, but there were many
  11448. other places where fspec[] was the object of a strncpy() (directly, or
  11449. indirectly thru zfnqfp()), and any of these might have been the source of a
  11450. memory leak, since some of them specified CMDBL as the length and others
  11451. CKMAXPATH.  Fixed in ckuus[r46x].c, ckcfn[s3].c, ckcpro.w, 14 Apr 99.
  11452.  
  11453. Why does rcvfil() call zfnqfp() and then <rfile>F also calls it after calling
  11454. rcvfil()?  Changed <rfile>F to use fspec[], which rcvfil() always sets.  This
  11455. eliminates the redundant call to zfnqfp().  ckcpro.w, 14 Apr 99.
  11456.  
  11457. Anyway, after all this, it is possible to build a NOICP version of Kermit
  11458. that can upload and download files (but since it has no user interface, file
  11459. transfer must always be initiated by the remote via autoup/download).
  11460.  
  11461. More SSL changes from Jeff: ckcnet.c, ckutio.c, 14 Apr 99.
  11462.  
  11463. Juggled #ifdefs & declarations to make "sunos41x" build.  ckcfns.c, ckuusx.c,
  11464. ckutio.c, 14 Apr 99.
  11465.  
  11466. Did the same for some other builds on SunOS:
  11467.  
  11468.   sunos41gcc:    1.3MB <-- Full build for SunOS with gcc.
  11469.   ditto+NODEBUG: 1.1MB <-- Full build but no debugging.
  11470.   sunos41m:      229KB <-- Command-line only - no interactive commands.
  11471.   ditto+NOLOCAL: 212KB <-- Ditto, remote only.
  11472.   sunos41mi:     377KB <-- Minimum interactive - no script language.
  11473.   ditto+NOLOCAL: 360KB <-- Ditto, remote only.
  11474.   NOXFER:        917KB <-- Full scripting & comms but no file transfer.
  11475.   NOXFER+NOICP:  229KB <-- Communications only - no scripting or file transfer.
  11476.  
  11477. Many modules affected.  14 Apr 99.
  11478.  
  11479. Some fallout from the April 3rd work regarding application of defaults for
  11480. missing command fields -- Peter E noticed that on HP-UX, "echo" by itself
  11481. would print some garbage.  Sigh, cmtxt() and some of the other functions were
  11482. returning a pointer to an automatic array in this case, which of course is
  11483. likely to be pointing to something else after the function exits.  Fixed in
  11484. ckucmd.c, 15 Apr 99.
  11485.  
  11486. Fix from Jeff for K95 not finding its init file under certain conditions.
  11487. ckuus5.c, 15 Apr 99.
  11488.  
  11489. If VMS C-Kermit received a file whose name contained any parts that were more
  11490. than 39 chars long, the transfer would fail because zmkdir()'s sys$parse()
  11491. call failed with "Bad filename" (RMS$_FNM).  Changed VMS zmkdir() to ignore
  11492. this error.  There is still a potential problem with an illegal name given by
  11493. the user as an as-name, but that's easily overcome by not giving an illegal
  11494. name (we don't run as-names thru nzrtol() on purpose, because we want the user
  11495. to be able to have the final word).  ckvfio.c, 15 Apr 99.
  11496.  
  11497. Implemented PURGE the cheap way for VMS -- as a built-in macro that calls DCL
  11498. PURGE.  ckuus[r257].c, ckermit2.txt, 15 Apr 99.
  11499.  
  11500. Changed \v(model) in HP-UX to not run the "model" command.  This was bad
  11501. because (a) running external programs is a no-no in captive environments like
  11502. IKSD and when nopush is in effect, and (b) because a frequent result of
  11503. running "model" is the string "not found".  Now we treat HP-UX like any other
  11504. UNIX and have \v(model) return the machine name from uname() if the model
  11505. has not been filled in (some uname() implementations fill it in, some don't).
  11506. ckuus4.c, 15 Apr 99.
  11507.  
  11508. Verified that I can send to C-Kermit on HP-UX 8.00 on a Telnet connection with
  11509. streaming (since we now default to Xon/Xoff in HP-UX for remote mode).  This
  11510. is to an HP-9000/385 about 3000 miles from here.  As noted in the beware file,
  11511. this kind of transfer is painfully slow.  Bypassing the Telnet server with
  11512. "set host *" gets 10 times the speed.
  11513.  
  11514. Juggled some more #ifdefs in ckctel.h to make sure we don't have switch
  11515. statements with no non-default cases.  15 Apr 99.
  11516.  
  11517. Peter E reported various other problems with HP-UX 8.00.  First, that Kermit
  11518. thought it was in the background after escaping back from CONNECT.  He says
  11519. this started happening during the Beta.04+ period.  But the code related to
  11520. background testing hasn't changed in a very long time.  Anyway, I was able
  11521. to fix it by observing that the conbgt() "signal test" was finding its old
  11522. SIGINT handler was SIGN_IGN, which it takes to be a sign of backgroundness,
  11523. so I switched the conint() and concb() calls that are done before calling
  11524. conbgt() after returning from CONNECT (but only for HPUX8).  Not very
  11525. satisfying, since it doesn't address the real cause -- whatever it is.
  11526. doconect(): ckuus4.c, 15 Apr 99.
  11527.  
  11528. While I was at it, I went to build an optimized version on HP-UX 8.00 and saw
  11529. (as Peter had reported) that ckuusr.c takes forever to compile, so I went to
  11530. the hpux80 makefile entry and did the trick to make it build this module
  11531. without optimization -- the same trick that was already there for ckcpro.c.
  11532. But then I noticed that not all of the CFLAGS had been copied into the ckcpro
  11533. section -- which might very well explain numerous peculiarities in the HP-UX
  11534. 8.00 version.  So I changed the hpux80 entry to have consistent CFLAGS.
  11535. makefile, 15 Apr 99.
  11536.  
  11537. Warnings occur on HP-UX 10.20 ANSIC-C builds 10 about lines 4091, 4114, and
  11538. 4136 in ckuusx.c: too bad.  The warnings come from calls to tputs(), whose
  11539. third argument is supposed to be a pointer to a function that (a) has a
  11540. certain return type (such as int or void), and (b) takes a certain type of
  11541. argument (such as int or char).  "man tputs" says one thing, but the
  11542. prototypes in curses.h and term.h each contradict the man page -- and each
  11543. other.  No combination of int/int, void/int, int/char, etc, would shut the
  11544. warnings up.  Despite the warnings, however, the code works fine, so no
  11545. changes.
  11546.  
  11547. In anticipation of lots more trouble with tputs(), made all references to
  11548. its return type and its argument type symbolic: TPUTSFNTYPE and TPUTSARGTYPE,
  11549. with default definitions of int and int; these can be overridden on the
  11550. cc command line.  ckuusx.c, 16 Apr 99.
  11551.  
  11552. Improved SEND/RECEIVE/GET failure hints a bit.  ckuus5.c, 16 Apr 99.
  11553.  
  11554. "get /etc/hosts x.x" did not work if both Kermits had PATHNAMES ON.  In this
  11555. case zchko() was being called on the packet name rather than the as-name.
  11556. Fixed in rcvfil(): ckcfns.c, 16 Apr 99.
  11557.  
  11558. Dat Thuc Nguyen had problems debugging a script involving fsplit().  It soon
  11559. became apparent that the real problem was the lack of informative error
  11560. messages.  So I changed the way SET FUNCTION DIAGNOSTICS and SET FUNCTION
  11561. ERROR work so they stand a chance of doing some good without people having to
  11562. know about these commands in advance:
  11563.  
  11564.  . FUNCTION ERROR is now ON by default, rather than OFF.
  11565.  . FUNCTION DIAGNOSTICS, rather than FUNCTION ERROR, now governs whether
  11566.    an error message is printed when a function fails.
  11567.  
  11568. I also added an array-index-out-of-bounds error for \fsplit() (to cover the
  11569. case where it is called with a predeclared array).
  11570.  
  11571. In checking these changes, I discovered that local arrays become global if
  11572. there is no global copy of the same array.  For example:
  11573.  
  11574.   define xx {
  11575.     local \&a[] = one two three
  11576.     show array a
  11577.   }
  11578.   xx
  11579.   show array a
  11580.  
  11581. The second "show array a" shows the local array which should have been
  11582. destroyed when xx finished instead of saying "?Array not declared".
  11583. Diagnosis: popclvl() had no way of knowing whether a local-array pointer was
  11584. NULL because no array of that name had been declared at that level (in which
  11585. case it should leave the global definition alone) or because there was no
  11586. global definition originally (in which case it should delete the current
  11587. definition).  This was handled by pushing a "secret code" on the
  11588. local-variable stack for this array.  dolocal(), pusharray(), popclvl():
  11589. ckuus5.c, 16 Apr 99.
  11590.  
  11591. Also discovered that popping local arrays off the stack never worked at any
  11592. level unless scalar variables were also on the stack at the same level.
  11593. Fixed in popclvl(): ckuus5.c, 16 Apr 99.
  11594.  
  11595. More authentication / encryption changes from Jeff: ckcnet.h, ckuusr.h,
  11596. ckuus[37].c, 16 Apr 99.
  11597.  
  11598. More authentication / encryption changes from Jeff: ckcnet.h, ckuusr.h,
  11599. ckuus7.c, 17 Apr 99.
  11600.  
  11601. HP-UX 8.00 adjustments to makefile, 17 Apr 99.
  11602.  
  11603. Plus more HP-UX adjustments to makefile from Peter E, 17 Apr 99.
  11604.  
  11605. Fixed unbalanced quotes in the sco32v4netgcc makefile entry, 17 Apr 99.
  11606.  
  11607. Further improvements to GET-class command failure hints.  They're obnoxious,
  11608. but they're pretty useful.  ckuus5.c, 17 Apr 99.
  11609.  
  11610. For months, I've been hearing of a problem with the fullscreen file-transfer
  11611. display in VMS but was never able to reproduce it.  Finally I got the needed
  11612. hint -- it happens only when autouploading.  The problem occurs when we use
  11613. printw() to write on the bottom screen line.  For some reason, only when
  11614. autouploading (go figure), an extra CRLF comes out and pushes all the labels
  11615. up one line.  The stupid solution was to not write on the bottom line (in VMS
  11616. only).  ckuusx.c, 17 Apr 99.
  11617.  
  11618. Tried to give VMS C-Kermit the ability to send "keepalive" packets while in
  11619. server mode executing a subprocess that takes a long time to produce output
  11620. (as the UNIX version can -- see notes from Oct 25).  I made the VMS
  11621. get_subrc_line() routine do a timed read and then added all the appropriate
  11622. tests, return codes, etc.  It doesn't break anything; REMOTE HOST commands
  11623. still work fine.  But the timeout feature doesn't work.  To test, put VMS C-K
  11624. in server mode and then tell the client "remote host wait 00:00:30".  VMS C-K
  11625. is supposed to send back an empty data packet every second but it doesn't.
  11626. The debug log shows that it does indeed return a timeout indication, but only
  11627. after the subprocess exits.  ckvfio.c, 17 Apr 99.
  11628.  
  11629. Notes on the Beta.06 build-all...
  11630.  
  11631.  . After building on each platform, I transferred a 3MB binary file to the
  11632.    remote just-built version to make sure the default FLOW /REMOTE selection
  11633.    was appropriate.  Some of these transfers exceeded 500000 cps -- through
  11634.    the Telnet server!  (Results: only HP-UX and VMS need Xon/Xoff; all the
  11635.    others work OK with NONE.)  Then I used the same new binary to make a
  11636.    Telnet connection back to here and send itself, thus testing the network
  11637.    code, file-sending code, etc, as well as the fullscreen file-transfer
  11638.    display.  Also Ctrl-L or "cls" was typed at the C-Kermit> prompt to
  11639.    ensure the new SCREEN code works.
  11640.  
  11641.  . On HP-UX versions where I had access to a serial port, I made sure I
  11642.    could CONNECT to the port and escape back, and still have a prompt.
  11643.    The mixup with SIGINT is apparently peculiar to HP-UX 8.00.  This is
  11644.    handled by adding -DCKCONINTB4CB to CFLAGS.  It was not needed in
  11645.    HP-UX 5.21 or 10.20.  Don't know yet about 6.x, 7.x, or 9.x.
  11646.  
  11647.  . Discovered that you must SET PREFIXING ALL when sending binary files
  11648.    thru the Ultrix Telnet server.  Made a note in ckubwr.txt.
  11649.  
  11650.  . Digital UNIX (both 3.2 and 4.0) gets a segmentation fault when calling
  11651.    tgetstr() (yes, after a successful call to tgetent()).  Curses works, but
  11652.    termcap calls don't.  Added -DNOTERMCAP and supporting code to avoid these
  11653.    routines, and added -DNOTERMCAP to the DU entries.  I guess they really
  11654.    mean it when they say in the man page that these are "old" routines and
  11655.    you should use curses instead.  ckuus[5x].c, makefile, 17 Apr 99.
  11656.  
  11657.  . NOTE: In case anybody wants to look into a better workaround for tgetstr()
  11658.    in DU, note that DU's curses.h says "#define tgetstr _bsd_tgetstr", but
  11659.    then the latter doesn't appear in any header files or man pages I can find.
  11660.    Also the DU 3.2 and DU 4.0 man pages disagree on the calling conventions
  11661.    (even though the header files show the normal ones).
  11662.  
  11663. Next day...  Spent a few more hours on the OSF/1 tgetstr() problem to no
  11664. avail.  A short test program that calls tgetent(), tgetstr(), and then
  11665. tputstr() works OK, but the exact same sequence in C-Kermit gets the
  11666. segmentation fault.  The difference is probably due to some conflict or
  11667. confusion in the many more header files included by ckuusx.c than by the short
  11668. test program (which includes only curses.h).  There's all kinds of crazy stuff
  11669. going on in OSF/1 curses.h that is obviously extremely sensitive to what other
  11670. symbols have been defined, what universes we're in, etc.  No amount of
  11671. finagling helped, not #including <term.h> before <curses.h>, not calling
  11672. _bsd_tblah() explicitly, not #undefing the tgetstr (etc) macros, etc, so I
  11673. left the NOTERMCAP definition in place.  Very unsatisfying.  18 Apr 99.
  11674.  
  11675. Further build-all observations:
  11676.  
  11677.  . Streaming transfers into AIX 4.2 or 4.3 (through the AIX Telnet server)
  11678.    consistently failed, when exactly the same kind of transfers into AIX 4.1
  11679.    worked without incident.  The error reported by AIX is "interrupted system
  11680.    call".  Changing flow control, packet length, prefixing, parity, etc, makes
  11681.    no difference.  Streaming transfers work perfectly, however, if the AIX
  11682.    Telnet server is removed from the picture (e.g, by using "set host * 3000"
  11683.    on AIX, or by using Rlogin instead of Telnet).  They also work perfectly if
  11684.    the Telnet connection is forced into binary mode (C-Kermit command "set
  11685.    telopt requested requested").  (But oddly enough, transfers are much slower
  11686.    through the Rlogin server or the binary-mode Telnet server than through
  11687.    the same Telnet server in NVT mode.)  Otherwise "set streaming off" does
  11688.    the trick.
  11689.  
  11690. Finally figured out how to squelch ANSI compiler warnings from HP-UX 9 and 10
  11691. about tputs().  makefile, ckuusx.c, 18 Apr 99.
  11692.  
  11693. Added -DDCLGETCWD to sco234* entries.  makefile, 18 Apr 99.
  11694.  
  11695. Added prototype for pusharray() to ckuusr.h, 18 Apr 99.
  11696.  
  11697. ---Beta.06---
  11698.  
  11699. From Lucas Hart: Proper implementation of timed reads for pipes (mailboxes)
  11700. in VMS, allowing REMOTE HOST keepalive.  ckvfio.c, 19 Apr 99.
  11701.  
  11702. Somehow in all these years I never heard of the UNIX realpath() function.
  11703. Changed zfnqfp() to use it if CKREALPATH defined.  It does what zfnqfp() does
  11704. (including all the "../.././../" stuff) plus resolving symlinks.  We'll see
  11705. how portable it is in the next build-all.  So far it's OK on Sun, HP-UX 10,
  11706. and SCO OSR5.  ckufio.c, ckcdeb.h, 22 Apr 99.
  11707.  
  11708. Added -DCKCONINTB4CB to all HP-UX 7.xx makefile entries.  23 Apr 99.
  11709.  
  11710. Added sys3upcgfd target, from Peter Mauzey.  makefile, 23 Apr 99.
  11711.  
  11712. From Jeff, 23 Apr 99:
  11713.  . Corrections to X.25-but-no-TCP builds: ckctel.c.
  11714.  . SET TELNET TRANSFER-MODE: ckuusr.h, ckuus[23].c, ckctel.c, ckcpro.w.
  11715.  . \v(authstate), \f(krbflags), ckuusr.h, ckuus4.c.
  11716.  . IKSD login/auth improvements: ckcmai.c.
  11717.  . Fixes to command-line/command-file botches from kerbang changes: ckcmai.c.
  11718.  . Make Telnet Option keywords not depend on #ifdefs: ckuus3.c.
  11719.  . Various other auth/crypt changes: ckuat[h2].[ch], ckuus7.c.
  11720.  
  11721. From Martin Whitaker, 23 Apr 99:
  11722.  . Fixes for OS-9: ck9fio.c, ckuus5.c.
  11723.  . Bad IF stmt in doxconn(): "if (xx = ttchk() < 0) dologend();"
  11724.    Should be: "if ((xx = ttchk()) < 0) dologend();"
  11725.  . Ditto in dodial(): "if (y = conchk() > 0)" -> "if ((y = conchk()) > 0)"
  11726.  . ttnet not found at link time in no-network builds.  ckcnet.c.
  11727.    (Why is #ifdef CK_LOGIN commented out around that big section in ckcmai?)
  11728.    (Maybe it should be #ifdef something else?)
  11729.  
  11730. Regular and -DNONET builds on SunOS were OK.
  11731.  
  11732. Fixed \fsplit() not to dump core if given an empty string. ckuus4.c, 23 Apr 99.
  11733.  
  11734. Changed SET LINE to not print open() failure message if QUIET ON and SET LINE
  11735. command not given from prompt.  This makes the GETLINE script run smoother.
  11736. ckuus7.c, ckutio.c, 23 Apr 99.
  11737.  
  11738. Put QUIET variable (quiet) on the command stack, so a macro or TAKE file can
  11739. SET QUIET ON or OFF without affecting its caller.  This was done differently
  11740. from the other stackable settings (like INPUT CASE, etc) since the 'quiet'
  11741. variable is used in so many places, even in modules that must not have any
  11742. notion of such things as a command stack.  This way the quiet variable can
  11743. be used just as it always was; only those routines that change command level
  11744. need to be concerned with pushing and popping it.  ckuus[356].c, 23 Apr 99.
  11745.  
  11746. Added IF QUIET so scripts can test SET QUIET setting when printing messages.
  11747. ckuusr.h, ckuus6.c, 23 Apr 99.
  11748.  
  11749. Changed DIAL to cancel automatic redialing if call failed because no dialtone.
  11750. ckuus6.c, 23 Apr 99.
  11751.  
  11752. Added the following dial-modifier variables:
  11753.  \v(dm_lp) Long pause
  11754.  \v(dm_sp) Short pause
  11755.  \v(dm_pd) Pulse dial
  11756.  \v(dm_td) Tone dial
  11757.  \v(dm_wa) Wait for answer
  11758.  \v(dm_wd) Wait for dialtone
  11759.  \v(dm_rc) Return to command mode
  11760. The modifier strings are obtained by calling getdm() in ckudia.c.
  11761. ckuusr.h, ckuus4.c, ckudia.c, 23 Apr 99.
  11762.  
  11763. Added /HEAD:n and /TAIL:n switches to TYPE.  ckuus[r256].c, 23 Apr 99.
  11764.  
  11765. Fixed TYPE /TAIL:n to work when n > file lines.  ckuus6.c,24 Apr 99.
  11766.  
  11767. Added TYPE /MATCH:pattern -- like grep (but only works for one file).  And
  11768. TYPE /WIDTH:cols, for truncating lines (e.g. to prevent wraparound).  Added
  11769. TYPE /PREFIX:string to put any desired string at the head of each line.  Added
  11770. TYPE /COUNT to only count (matching) lines, but not print them - like "wc -l".
  11771. Added /WIDTH:n to SET/SHOW OPTIONS TYPE.  ckuusr.[ch], ckuus6.c,24 Apr 99.
  11772.  
  11773. Added:
  11774.  \v(ty_ln)  TYPE line number
  11775.  \v(ty_lc)  TYPE line count
  11776.  \v(ty_mc)  TYPE match count
  11777.  
  11778. \v(ty_ln), or any other variable(s), can be used with TYPE /PREFIX.  Examples:
  11779.  
  11780.   TYPE /PREFIX:{\v(time): }   <-- puts time of TYPE command on each line.
  11781.   TYPE /PREFIX:{\\v(time): }  <-- puts current, running time on each line.
  11782.   TYPE /PREFIX:{\\v(ty_ln): } <-- puts line number on each line.
  11783.   TYPE /PREFIX:{\\flpad(\\v(ty_ln),3): } <-- Ditto, right-adjusted.
  11784.  
  11785. After a TYPE command, SHOW VAR TY gives the statistics: line count of file,
  11786. plus count of lines that matched if a pattern was given.
  11787. ckuusr.h, ckuus4.c, 24 Apr 99.
  11788.  
  11789. Improved parsing of Windows Printer Queue name from Jeff.  ckuus3.c, 24 Apr 99.
  11790.  
  11791. Brought ckermit2.txt up to date.  24 Apr 99.
  11792.  
  11793. From Jeff: missing default return for getdm().  ckudia.c, 26 Apr 99.
  11794.  
  11795. With hints from Lucas Hart, fixed the Digital UNIX termcap problem from April
  11796. 18th.  Once again, the problem derived from referring to a termcap/terminfo
  11797. function (in this case tgetent()) before the <curses.h> include.  The solution
  11798. was to move fxdinit() to below the #include.  Verified on DU 3.2 and 4.0.
  11799. ckuusx.c, 26 Apr 99.
  11800.  
  11801. Defined NOREALPATH for HP-UX 8.00 and earlier.  Verified that realpath() is OK
  11802. in HP-UX 9 (and we already knew about 10).  ckcdeb.h, 26 Apr 99.
  11803.  
  11804. From Jeff, fix IKSD login to not assume anonymous if we don't know who the
  11805. user is after authentication (mainly for TLS).  ckcmai.c, 26 Apr 99.
  11806.  
  11807. Using unsigned chars for buffers and pointers in dotype() caused all sorts of
  11808. stupid mindless fascist warnings to spew forth from picky compilers, so I made
  11809. the offending items regular (signed) char instead.  Can I still TYPE 8-bit
  11810. text files on platforms where C-Kermit can't be built with -funsignedchar?
  11811. Seems OK on HP-UX 10.20.  Time will tell about the others.  Checked to see
  11812. whether HP-UX ANSI compiler has an option to treat all chars as unsigned (it
  11813. doesn't).  ckuus6.c, 26 Apr 99.
  11814.  
  11815. Fixed declaration/ifdef glitches for VOS x25-but-no-tcpip build.  cklnet.c,
  11816. ckuscr.c, ckuus4.c, 26 Apr 99.
  11817.  
  11818. When executing Kerbang scripts, the console was not in cbreak mode, so
  11819. askmore() didn't work normally.  That's because concb() was called only when
  11820. C-Kermit reached top level (e.g. after executing the init file).  But now
  11821. we're executing ASK[Q], GETOK, GETC, and askmore() without ever reaching top
  11822. level, so I added concb() calls for all these.  ckuus[56].c, 26 Apr 99.
  11823.  
  11824. From Jeff: Fix for END given at top level trying to free stuff that was never
  11825. malloc'd.  ckuusr.c, 27 Apr 99.
  11826.  
  11827. Changed DIAL to cancel automatic redialing if call failed because of a
  11828. dialing directory error, access is forbidden, blacklisted, or locked.
  11829. ckuus6.c, 27 Apr 99.
  11830.  
  11831. From Lucas Hart: Fix gcc warnings in VMS gftimer(), ckvtio.c; add missing
  11832. #define for cklongjmp() in one of the #ifdef cases in ckcsig.h.  27 Apr 99.
  11833.  
  11834. In working on REVIEW 2.0 (one of our demo scripts) I discovered a subtle but
  11835. annoying problem: although the \&_[] array could be accessed at top level,
  11836. and in an IF command, and in a FOR loop, it could not be accessed in a FOR
  11837. loop that was inside an IF statement.  Similarly, the \v(argc) variable was
  11838. clobbered inside a FOR loop.  It seems the _GETARGS command was not quite
  11839. completely implemented.  Also, one critical step was lacking from addmac().
  11840. Both fixed in ckuus[56].c, 27 Apr 99.
  11841.  
  11842. Added \v(maclevel), mainly for debugging.  ckuusr.h, ckuus4.c, 27 Apr 99.
  11843.  
  11844. The following (new) construction did not work:
  11845.  
  11846.   if ( condition ) { commands } else if defined \%x { commands... }
  11847.  
  11848. We needed an additional layer of quoting in the else part.  doif(): ckuus6.c,
  11849. 28 Apr 99.  Verified that all script torture-tests still work, and added a
  11850. long "if ... else if ... else if ... else if ... else" section to the IFTEST
  11851. script.
  11852.  
  11853. Dat Thuc Nguyen reported the following problem:
  11854.  
  11855.   define try_this { END 999 }           ; Sets \v(return) to 999
  11856.   try_this
  11857.   if FAIL echo RETURN1="\v(return)"     ; This displays 999
  11858.   try_this
  11859.   if FAIL { echo RETURN2="\v(return)" } ; This displays nothing, why?
  11860.  
  11861. This was yet another problem caused by the fact that IF ... { ... } (the
  11862. Command Formerly Known as XIF) is implemented internally as a macro (whereas
  11863. IF without braces is not), so it was looking in the wrong place on the stack
  11864. for the return value.  However, fixing this was not just a simple matter of
  11865. adding mrval[] to the items handled by _GETARGS and _PUTARGS, since dodo(), as
  11866. part of macro startup, initializes the RETURN value to NULL.  To make it not
  11867. do this for IF, FOR, WHILE, and SWITCH, while still doing for all other
  11868. macros, I added another command-stack flag, CF_IMAC (Internal Macro), which at
  11869. present is used only to prevent initialization of the macro's return value
  11870. (unfortunately it is ephemeral -- if we don't reset it right after use, it is
  11871. propagated to all lower levels -- so other applications for it are not
  11872. practical).  ckuus[56].c, 28 Apr 99.
  11873.  
  11874. Rearranging the declarations in ckuus4.c yesterday for the VOS x25-but-not-tcp
  11875. build caused tn_exit, ttnproto, tcp_incoming, autodl to come up missing on
  11876. nonet builds.  Fixed in ckuus4.c, checked by building with -DNONET, 28 Apr 99.
  11877.  
  11878. fxdinit() was not being included in non-curses builds after I moved it.  Fixed
  11879. (again) by juggling #ifdefs (again).  Fixed in ckuusx.c, fixed by building
  11880. with -DNOCURSES.  28 Apr 99.
  11881.  
  11882. Failure to open init file was not giving an error message.  Added code to
  11883. print a message in doinit(): ckuus5.c, 28 Apr 99.
  11884.  
  11885. Some Telnet authentication changes from Jeff.  ckctel.c, 30 Apr 99.
  11886.  
  11887. The MINPUT command, when typed at the prompt, was not getting into the
  11888. reparse() buffer.  Another case of not calling cmcfm()...  Fixed in ckuusr.c,
  11889. 30 Apr 99.
  11890.  
  11891. Changed SET BELL to be available in all versions, not just K95.  ckcdeb.h,
  11892. ckuusr.h, ckuus[r237].c, 30 Apr 99.
  11893.  
  11894. Added WILDCARD-EXPANSION setting to SHOW FILE.  ckuus4.c, 30 Apr 99.
  11895.  
  11896. Did a little digging on realpath():
  11897.  . SVID for SVR3 does not have it.
  11898.  . SVID for SVR4 does not have it.
  11899.  . POSIX 1003.1 does not have it.
  11900.  . ISO/IEC 9945-1 does not have it.
  11901.  . Apparently it originated with SVR4.2.
  11902.  
  11903. Determined the following UNIX platforms have it:
  11904.  . SunOS 4.1 and all Solaris
  11905.  . AIX 4.1 (and therefore 4.2, 4.3...)
  11906.  . Sinix 5.42
  11907.  . Digital UNIX 4.0.
  11908.  . HP-UX 9 and later.
  11909.  . SCO OSR5.0.5
  11910.  . QNX 4.25
  11911.  . Unixware 2.1.3
  11912.  . Red Hat Linux 5.2
  11913.  . IRIX 5.3 and later
  11914.  . NeXTSTEP 3.3
  11915.  . DG/UX 5.4R3.10 and later
  11916.  
  11917. Determined the following UNIX platforms do not have it:
  11918.  . HP-UX versions through 8.xx (we knew this already)
  11919.  . Motorola SV/68R3
  11920.  . SCO UNIX 3.2v4.x and earlier
  11921.  . SCO XENIX
  11922.  . Digital UNIX 3.2
  11923.  . Ultrix 4.3 (and presumably all other versions).
  11924.  
  11925. Expanded NOREALPATH section of ckcdeb.h to include all these.  2 May 99.
  11926.  
  11927. Tentative fix to Dat Thuc Nguyen's bug report regarding numeric STOP/END value
  11928. not being propagated up the call stack as \v(return).  popclvl(): ckuus5.c, 2
  11929. May 99.
  11930.  
  11931. New HP-UX 6 through 8 makefile entries from Peter E.  Changing -DSVR3 to
  11932. -DSIG_V seems to cure some performance problems in these versions, and
  11933. eliminates the need for -DCONINTB4CB.  Also it seems hardware flow control
  11934. never worked in HP-UX 8.xx because -DSTERMIOX was missing from CFLAGS, so
  11935. this was added to the hpux80 entry.  makefile, 3 May 99.
  11936.  
  11937. kermit -C "" caused an infinite loop.  Fixed in ckuusy.c, 3 May 99.
  11938.  
  11939. The -C "command, command, ..." list did not work if tabs were used instead
  11940. of spaces.  Fixed in ckuusy.c, 3 May 99.
  11941.  
  11942. Fixed serial and CRT displays to wrap long filenames.  ckuusx.c, 3 May 99.
  11943.  
  11944. This did not work:
  11945.  
  11946.   _define abc\%1 { blah blah }
  11947.   if defined \m(abc\%1) ...    <-- should succeed but fails.
  11948.  
  11949. Fixed in ckuus6.c (IF DEFINED did not handle compound macro names), 3 May 99.
  11950.  
  11951. From Jeff: Fix an off-by-one error in initializing the pointer list in
  11952. xwords(): ckuus5.c; cosmetic changes & typo fixes: ckctel.h, 4 May 99.
  11953.  
  11954. Added CK_NEWTERM to openbsd target.  makefile, 4 May 99.
  11955.  
  11956. Moved prototype for setbell() outside of #ifdef OS2.  ckuusr.h, 5 May 99.
  11957.  
  11958. Revisited the xwords() problem, undid Jeff's change.  xwords() itself was not
  11959. the problem; the problem was in some of the calls.  ckuus[r357].c, 5 May 99.
  11960.  
  11961. Found another problem in \fsplit(): given the name of an array, e.g. "a" or
  11962. "A", we blindly compute the array base without first checking the case.
  11963. Changed dclarray() to return the array-base index for use by the caller,
  11964. rather than simply 0 to indicate success, and then changed the callers to use
  11965. the returned value rather than computing it themselves.  ckuus[45].c, 5 May 99.
  11966.  
  11967. From Raul Kacirek <raulka@raulka.mv.com>: Fixed a mismatched quote mark in the
  11968. is3 makefile target.  6 May 99.
  11969.  
  11970. Added a bunch of symbols for new commands, etc, to ckuusr.h:
  11971.  
  11972.   XX_INCR     _INCREMENT           (like INCREMENT but evaluate LHS too)
  11973.   XX_DECR     _DECREMENT           (like DECREMENT but evaluate LHS too)
  11974.   XX_EVAL     _EVALUATE            (like _ASSIGN + \feval())
  11975.  
  11976.   XXARRAY     ARRAY                (Array ops -- copy, sort, declare, destroy)
  11977.   XXHTTP      HTTP                 (HTTP ops)
  11978.   XXPARSE     PARSE                (parse keyword, file, number, etc...)
  11979.  
  11980.   XYEVAL      SET EVALUATE         (old/new EVALUATE syntax, tsk tsk)
  11981.  
  11982.   IFXXCK      IF C-KERMIT          True if C-Kermit but not K-95
  11983.   IFXXK9      IF K-95              True if K-95
  11984.   IFXXMS      IF MS-KERMIT         True if MS-DOS Kermit
  11985.   IFXXWI      IF WILD <filespec>   True if filespec contains wildcard chars
  11986.  
  11987.   VN_XF_BC    \v(xfer_badpacket)   (Transfer blockcheck errors)
  11988.   VN_XF_TM    \v(xfer_timeout)     (Transfer timeouts)
  11989.   VN_XF_RX    \v(xfer_retransmit)  (Transfer retransmissions)
  11990.   VN_M_NAM    \v(m_name)           (Modem full name)
  11991.  
  11992.   FN_SEARCH   \fsearch()           (Search for pattern in string)
  11993.   FN_XLATE    \fxlate()            (Translate string character set)
  11994.  
  11995. But did not implement any of them yet, and might not anyway, we'll see.
  11996. 6 May 99.
  11997.  
  11998. Corrected a minor error in yesterday's changes regarding dclarray() in the
  11999. DIRECTORY /ARRAY:&a code.  domydir(): ckuus6.c, 6 May 99.
  12000.  
  12001. Implemented _INCREMENT and _DECREMENT.  ckuus6.c, 6 May 99.
  12002.  
  12003. Correction to a Kerberos #ifdef from Jeff.  ckuus7.c, 7 May 99.
  12004.  
  12005. Added symbols for modem-signal variables \v(m_sig_xxx) to ckuusr.h, 7 May 99.
  12006.  
  12007. Implemented:
  12008.  \v(m_name)
  12009.  \v(m_sig_cd)  \v(m_sig_dsr) \v(m_sig_dtr)
  12010.  \v(m_sig_cts) \v(m_sig_rts) \v(m_sig_ri)
  12011.  \v(xfer_badpackets) \v(xfer_timeouts) \v(xfer_retrans)
  12012. ckuus4.c, 7 May 99.
  12013.  
  12014. Changed EVALUATE <expression> to EVALUATE <variable> <expression>.  This is
  12015. an incompatible change, but I doubt it will break any scripts, since the
  12016. old EVALUATE command was pretty useless.  But to be nice, I added an invisible
  12017. SET EVAL { NEW, OLD } command to choose the new or old syntax (default = new).
  12018. Then I added an _EVALUATE command, which is to EVALUATE as _ASSIGN is to
  12019. ASSIGN and _INCREMENT is to INCREMENT, etc.  Now we have a nice, symmetrical
  12020. set of variable-assignment operations providing a choices of whether (and
  12021. how, and how much) to evaluate the LHS and/or the RHS, to facilitate OOP-like
  12022. constructions.  ckuusr.c, 7 May 99.
  12023.  
  12024. Examples:
  12025.  
  12026.   _assign Words::\%1.count[\%2] \feval(\m(Words::\%1.count[\%2]) + 1)
  12027.  
  12028. can now be written as:
  12029.  
  12030.   _increment Words::\%1.count[\%2]
  12031.  
  12032. and:
  12033.  
  12034.   _assign complex::\%1.re \feval(\m(complex::\%1.re) + \m(complex::\%2.re))
  12035.  
  12036. can be:
  12037.  
  12038.   _evaluate complex::\%1.re \m(complex::\%1.re) + \m(complex::\%2.re)
  12039.  
  12040. Changed [_]{IN,DE}CREMENT, when given a variable that is not defined, to
  12041. automatically define it with a value of 0.  ckuus5.c, 7 May 99.
  12042.  
  12043. Integrated Jeff's PAM code.  ckuus7.c, ckufio.c, 7 May 99.
  12044.  
  12045. Finished SET EVAL.  ckuus3.c, 8 May 99.
  12046.  
  12047. Added IF { C-KERMIT, K-95, MS-KERMIT }.  ckuus6.c, 8 May 99.
  12048.  
  12049. Made "!" a synonym for NOT in IF conditions.  ckuus6.c, 8 May 99.
  12050.  
  12051. Added IF WILD <filespec> <command>.  ckuus6.c, 8 May 99.
  12052.  
  12053. Added ckitoa() and ckltoa() -- the opposite of atoi() and atol().
  12054. ckclib.[ch], 8 May 99.
  12055.  
  12056. Added \fsearch(pattern,string,start) and \frsearch() -- just like \findex()
  12057. and \rindex(), except the object to search for is a pattern rather than a
  12058. literal string.  ckuusr.h, ckuus[24].c, 8 May 99.
  12059.  
  12060. Fixed Yet Another Bug in \frindex(); it was misinterpreting its optional 3rd
  12061. argument.  ckuus4.c, 8 May 99.
  12062.  
  12063. Shadow password support from Jeff.  ckufio.c, 8 May 99.
  12064.  
  12065. "make linuxc" (Linux on systems that have curses but not ncurses) didn't work
  12066. because it had -lcrypt hardwired into it instead of using the trick of looking
  12067. for it first.  Made new "linuxc" and "linuxnc" (no curses at all) entries.
  12068. makefile, 8 May 99.
  12069.  
  12070. When adding \f[r]search() I also broke up the huge switch() statement in
  12071. fneval() into a bunch of smaller ones, but neglected to prevent them from
  12072. falling thru to the default (error) case at the end.  Fixed by Jeff in
  12073. ckuus4.c, 10 May 99.
  12074.  
  12075. From Martin Whitaker: Recursive directory traversal and built-in DIRECTORY
  12076. command for OS-9: ck9fio.c, ckcdeb.h, 10 May 99.
  12077.  
  12078. Changed ckitoa() and ckltoa() to return string pointers from a revolving 1K
  12079. buffer pool, rather than a single buffer, so that successive calls within the
  12080. same statement would return distinct pointers.  Converted lots of crufty code
  12081. mainly in the ckuus*.c routines to use ckitoa() when appropriate, like when
  12082. numbers need to be passed as function parameters in string form, e.g. as
  12083. defaults for cmnum() calls, or in calls to setgen() by client for REMOTE SET.
  12084. Also handy for debug() when you want to put a number in both the second and
  12085. third fields.  ckclib.c, ckuus[r34567].c, 10 May 99.
  12086.  
  12087. Discovered that DIRECTORY prints total garbage for permissions, size, and date
  12088. in Unixware 7.  Diagnosis: lstat() doesn't work in Unixware 7, even though it
  12089. does work in earlier releases.  Adding -DNOLSTAT to the Unixware 7 makefile
  12090. targets fixes it.  10 May 99.  (SCO evidently does not believe in lstat()
  12091. since it also does not work in XENIX, SCO UNIX, or OSR5.)
  12092.  
  12093. From Jeff: fix a typo in ckuus7.c from yesterday's changes.  11 May 99.
  12094.  
  12095. Added HTTP command parser.  It's completely contained in ckuusr.c within
  12096. #ifndef NOHTTP.  ckuusr.c, 11 May 99.
  12097.  
  12098. Added ARRAY command to collect all array ops together: DECLARE, SORT, SHOW,
  12099. etc.  Made top-level DECLARE and SORT commands invisible.  Old syntax still
  12100. works, of course.  ckuusr.h, ckuus[r5].c, 11 May 99.
  12101.  
  12102. Moved the array-segment-parsing code from SHOW ARRAY to a separate routine,
  12103. arraybounds().  SHOW ARRAY \&a[12:16] still works.  ckuus5.c, 11 May 99.
  12104.  
  12105. Added ARRAY COPY <source> <target>.  This copies an array much more quickly
  12106. than a script FOR loop.  Furthermore, either or both of the source and target
  12107. arrays can include range specifiers, so this command can be used to copy
  12108. pieces of arrays, or to create an array that is a piece of another array, etc.
  12109. A few quick tests look OK, but needs more verification.  ckuusr.c, 11 May 99.
  12110.  
  12111. Discovered that the following:
  12112.  
  12113.   $ kermit + filename arg1 arg2 arg3
  12114.  
  12115. would execute the file and pick up the args, as advertised, but then would say:
  12116.  
  12117.  "filename" - invalid command-line option, type "wermit -h" for help
  12118.  
  12119. Similarly, there would be a complaint if the first arg was "=".  Both fixed in
  12120. ckuusy.c, 12 May 99.
  12121.  
  12122. Finished ARRAY COPY.  Added ARRAY { DESTROY, CLEAR, SET, RESIZE }.  Changed
  12123. [ ARRAY ] DECLARE to accept array-name syntax consistent with the other ARRAY
  12124. commands.  Changed [ ARRAY ] SORT to allow range specification in the array
  12125. brackets.  ckuus[r7].c, 12 May 99.
  12126.  
  12127. Added \farraylook(array,pattern) to search an array and return the index of
  12128. the first matching element.  ckuusr.h, ckuus[24].c, 12 May 99.
  12129.  
  12130. Removed trailing whitespace from source file lines: ckuus[r345].c, 12 May 99.
  12131.  
  12132. New ckuath.c from Jeff, 13 May 99.
  12133.  
  12134. Removed "search" keyword from arraytab[] and fixed a type in rszarray().
  12135. ckuusr.c, 13 May 99.
  12136.  
  12137. Filled in HELP ARRAY and updated HELP EVAL.  ckuus2.c, 13 May 99.
  12138.  
  12139. Added \v(match), which contains the string that matched the pattern most
  12140. recently given to ckmatch(), e.g. by IF MATCH, \fsearch(), \farraylook(),
  12141. wildcard comparisons, etc.  But then I removed it since it turns out that most
  12142. calls to ckmatch() internally append a "*", so the result is usually more than
  12143. you expect.  What we really need is something like SNOBOL's:
  12144.  
  12145.   STRING ( PATTERN . RESULT )
  12146.  
  12147. I'll come back to this later...  ckuusr.h, ckuus4.c, 13 May 99.
  12148.  
  12149. Realized the arguments to \farraylook() were in reverse order from those in
  12150. all the other string-search functions -- \findex(), \fsearch(), etc -- so
  12151. reversed them.  ckuus[24].c, 13 May 99.
  12152.  
  12153. Discovered that top-level \&_[] array was dimensioned 1 greater than it should
  12154. have been.  Fixed in cmdini(): ckuus5.c, 13 May 99.
  12155.  
  12156. Fixed Yet Another Problem with Kerbang invocation: "kermit + file arg1 arg2..."
  12157. would pick up the args and execute the file OK, but then would say "arg1 -
  12158. invalid command-line argument".  Changed command-line parser to simply return
  12159. if the first argument was "+".  (I thought I fixed this problem yesterday, but
  12160. in reality I only shifted it to the right.)  ckuusy.c, 13 May 99.
  12161.  
  12162. Added IF LOCAL <command>.  ckuusr.h, ckuus6.c, 13 May 99.
  12163.  
  12164. Upped MAC_MAX from 4K to 16K for BIGBUFOK builds and from 0.5K to 1K for
  12165. other builds.  ckuusr.h, 14 May 99.
  12166.  
  12167. Added \v(setlinemsg) to contain the error message that was generated by the
  12168. most recent SET LINE / PORT / HOST (or TELNET or RLOGIN) command, if it failed.
  12169. ckuusr.h, ckuus[47].c, 14 May 99.
  12170.  
  12171. From Jeff: Move misplaced #ifdef in \v(setlinemsg) code.  ckuus7.c, 18 May 99.
  12172.  
  12173. The following modems had software flow-control commands defined, but were
  12174. missing the CKD_SW capability: Microlink, Telepath, Motorola X-Jack, Quickcomm
  12175. Spirit II, Megahertz AT&T V.34.  Fixed in ckudia.c, 18 May 99.
  12176.  
  12177. Wrapping of long filenames in Serial and CRT displays did not take the length
  12178. of the first name into account.  Fixed in dpyinit(): ckuusx.c, 18 May 99.
  12179.  
  12180. From Brian Tillman: Updated ckvker.com and ckcnet.h for Wollongong Pathway 3.1.
  12181. 18 May 99.
  12182.  
  12183. From Jeff: Preserve printer settings between invocations.  ckuus3.c, 19 May 99.
  12184.  
  12185. From Jeff: Perform reverse DNS lookup when a numeric IP address is given and
  12186. Kerberos is available so a successful Kerberized connection can be achieved.
  12187. (Previously we skipped the reverse lookup for numeric addresses, but for
  12188. Kerberized connections we need the hostname to get the Kerberos realm.)
  12189. Added #ifdef CK_KERBEROS to the new tests.  ckcnet.c, 19 May 99.
  12190.  
  12191. Added missing dosort() prototype.  ckuusr.[ch], 19 May 99.
  12192.  
  12193. Dale Dellutri reported that in the sequence "set flow keep", "set line tta0",
  12194. "connect", the device's flow control changed when it shouldn't have.  This is
  12195. because the SET LINE code calls setflow(), and for some unknown reason the "if
  12196. (!autoflow) return;" statement in setflow() was commented out.  There's
  12197. nothing in the notes about it, nor any comment in the code.  Clearly we should
  12198. not be switching the flow control automatically if it was set to something
  12199. specific like KEEP or RTS/CTS.  Was the commenting-out done for a reason???  I
  12200. guess there's only one way to find out...  Restored the if (autoflow) test to
  12201. setflow().  But that didn't help -- it seems that setlin() was also setting
  12202. the flow control directly, without going through setflow(), in the serial
  12203. device case (there must have been some logic behind this but I don't see it
  12204. now).  Changed setlin() to call setflow() like everybody else.  ckuus[7x].c,
  12205. 19 May 99.
  12206.  
  12207. changed cmkey() to not print "?No keywords match" if QUIET is ON.  Changed
  12208. command-file reader not to print "Command file: filename, line number" when
  12209. QUIET ON.  And when it does print "Command file:", now it also prints the
  12210. name of the active macro, if any.  ckucmd.c, ckuus5.c, 19 May 99.
  12211.  
  12212. Added /opt to the list of UNIX directories to search for Kermit text files.
  12213. ckuus5.c, 19 May 99.
  12214.  
  12215. Several weeks ago when writing a script, I wanted to send an ATI6 command to
  12216. a USR modem and the parse the results (about 20 lines of text that end with
  12217. "OK") on fly like so:
  12218.  
  12219.   set flag off
  12220.   set input echo on
  12221.   while not flag {
  12222.      minput 10  Blers  Retrains  Speed  OK
  12223.      switch \v(minput) {
  12224.        :1, clear input, input 2 \10, .blers := \fword(\v(input),1), break
  12225.        :2, clear input, input 2 \10, .retrains := \fword(\v(input),5), break
  12226.        :3, clear input, input 2 \10, .speed := \fword(\v(input),1), break
  12227.        :4, set flag on, break
  12228.      }
  12229.   }
  12230.  
  12231. I was discouraged to find that this didn't work at all (on Windows 95).  Huge
  12232. chunks of the modem's report were lost.  I looked closely at the INPUT/MINPUT
  12233. code but found nothing to explain it:  Reads are not buffered -- we do ttinc()
  12234. or coninc() to get each character and deposit it in inpbuf[] one at a time.
  12235. Therefore, reading stops as soon as we have a full match, so we have not read
  12236. ahead at all.  CLEAR INPUT simply clears inpbuf[], which contains only the
  12237. chars that INPUT read, and resets inpbp to the beginning of the buffer.
  12238. Therefore "input 2 \10" should read to the next linefeed, and there should be
  12239. no wraparound since we just cleared the inpbuf[] buffer.  But lots of stuff
  12240. (many lines at once) were being lost anyway.
  12241.  
  12242. So instead I did it like this (get the whole report in one gulp and then parse
  12243. it afterwards):
  12244.  
  12245.   output ATI6\13
  12246.   input 20 OK
  12247.   if fail end 1
  12248.   .\%x := \findex(Retrains Granted,\v(input))
  12249.   if \%x .retrains := \fword(\fsubstr(\v(input),\%x),3)
  12250.   .\%x := \findex(Blers,\v(input),\%x+16)
  12251.   if \%x .blers := \fword(\fsubstr(\v(input),\%x),2)
  12252.   .\%x := \findex(Speed,\v(input),\%x+16)
  12253.   if \%x .ospeed := \fword(\fsubstr(\v(input),\%x),2,,/)
  12254.  
  12255. which worked fine (so no, it wasn't a flow control problem).
  12256.  
  12257. Today I went back to investigate, but this time on an HP workstation with
  12258. HP-UX, and the first method worked perfectly.  I tried it on Windows with an
  12259. external USR modem and it worked perfectly too.  So either some fix that we
  12260. made in the last couple weeks cleared up the problem, or else it's something
  12261. to do with the Compaq (TAPI) Winmodem, so who cares.  So this clears away
  12262. a big item from the list.
  12263.  
  12264. Changed UNDEF <name> to parse but ignore text after the <name>.  This provides
  12265. a clean way to comment out a macro definition without removing it or putting
  12266. semicolons in front of each line.  ckuus6.c, 19 May 99.
  12267.  
  12268. Fixed a typo in yesterday's flow-control changes (comment-close typed as
  12269. *? rather than */).  setflow(): ckuusx.c, 20 May 99.
  12270.  
  12271. From Jeff: /NOPOSTSCRIPT switch for SET PRINTER to under previous /POSTSCRIPT
  12272. switch.  ckuusr.h, ckuus3.c, 20 May 99.
  12273.  
  12274. From Jeff: Updated HELP text for SET TCP REVERSE-DNS-LOOKUP for Kerberos.
  12275. ckuus2.c, 20 May 99.
  12276.  
  12277. From Jeff: new security.txt and telnet.txt, updated iksd.txt.  20 May 99.
  12278.  
  12279. Fixed some mistakes in the Compaq modem definition, and raised the max speed
  12280. parameter for Compaq and USR to 115200.  Made the maximum speed warning a
  12281. hint.  ckudia.c, 20 May 99.
  12282.  
  12283. Added SIG_V and SIG_I to SHOW FEATURES.  ckuus5.c, 20 May 99.
  12284.  
  12285. Made SET LINE messages in UNIX about access to lock or device a hint.
  12286. ckuus7.c, 20 May 99.
  12287.  
  12288. Added \v(textdir), the directory where the C-Kermit/K-95 text files are kept.
  12289. ckuusr.h, ckuus4.c, 20 May 99.
  12290.  
  12291. Added \ftablelook(), just like \farraylook() except it assumes the table is
  12292. sorted, allows array elements to have fields, requires a nonambiguous match,
  12293. and returns -2 on an ambiguous match.  ckuusr.h, ckuus[24].c, 20 May 99.
  12294.  
  12295. From Jeff: move a mispaced brace in setlin(): ckuus7.c, 21 May 99.
  12296.  
  12297. Merged copyright text into VERSION command except in K95 where it wouldn't
  12298. fit.  ckuusr.c, 21 May 99.
  12299.  
  12300. Made the HTTP command (not filled in yet) invisible.  ckuusr.c, 21 May 99.
  12301.  
  12302. Fixed a glitch in filename completion that affected UNIX but not K95:
  12303. "send ./foo<ESC>" would lose the next two name characters after "foo" in the
  12304. expansion.  cmifi2(): ckucmd.c, 21 May 99.
  12305.  
  12306. Moved XYB_xxx definitions from ckuusr.h to ckcker.h for NOSPL/NOICP builds.
  12307. 21 May 99.
  12308.  
  12309. Moved all cmdlvl declarations outside of NOSPL sections.  ckuus*.c, 21 May 99.
  12310.  
  12311. Fixed Solaris 2.3 and 2.4 banners.  ckuver.h, 21 May 99.
  12312.  
  12313. Fixed TCPware "show net" display to say TCPware instead of UCX.  ckuus4.c,
  12314. 21 May 99.
  12315.  
  12316. Fixed linux entry to accept KFLAGS from other Linux entries.  makefile,
  12317. 21 May 99.
  12318.  
  12319. Multinet 4.2 on VMS 7.1 with DECC 6.0 needed <if.h>.  ckcdeb.h, 22 May 99.
  12320.  
  12321. Shuffled some #ifdefs and version numbers and redid the overlay structure to
  12322. enable building on 2.11BSD (first time in 3 years).  ckcker.h, ckcfns.c,
  12323. ckustr.c, ckustr.sed, ckubs2.mak, 23 May 99.
  12324.  
  12325. ---Beta.07---
  12326.  
  12327. Added Base64 conversion routines.  ckclib.[ch], 26 May 99.
  12328.  
  12329. Updates from Jeff, 26 May 99.
  12330.  . Some misplaced case statements fixed in ckcnet.c.
  12331.  . Initial work on HTTP routines: ckuusr.c, ckcnet.[ch].
  12332.  . Additional PRINT switch work -- decoupling port parameter setting
  12333.    from bidirectional mode: ckuus3.c.
  12334.  
  12335. Added -DNOREALPATH to AT&T 3Bx and System III entries, and to all AIX entries
  12336. prior to 4.0.  makefile, 26 May 99.
  12337.  
  12338. Added include for inet.h to Wollongong section of ckcnet.h.  26 May 99.
  12339.  
  12340. Fixed a typo in the Wollongong section of the VMS build procedure.  ckvker.com,
  12341. 26 May 99.
  12342.  
  12343. Changed PA-RISC level indicator for HP-UX 10.20; John Bigg of HP says 10.20
  12344. and up do not support PA-RISC 1.0.  makefile, 26 May 99.
  12345.  
  12346. Changed optimization flag for SNI 5.44 from -F to -K.  makefile, 26 May 99.
  12347.  
  12348. The Base-64 functions did not null-terminate their results, thus forcing the
  12349. caller to do it.  Changed them to deposit a NUL after the result (if the
  12350. buffer had room for it).  ckclib.c, 27 May 99.
  12351.  
  12352. Added \fb64encode() and \fb64decode().  ckuusr.h, ckuus4.c, ckclib.c,
  12353. 27 May 99.
  12354.  
  12355. Fixed \funhexify() to return an appropriate error if called with a non-hex
  12356. string.  ckuus4.c, 27 May 99.
  12357.  
  12358. Fixed solaris25x25 makefile target -- it had unbalanced quotes.  However the
  12359. make doesn't work at all -- the SunLink X.25 9.x header files are broken.
  12360. makefile, 28 May 99.
  12361.  
  12362. In gtword() (the "token getter" of the command parser), there were a couple
  12363. places where we compared the user's keystroke with NL (== whatever '\n' is
  12364. defined to be) when we meant to be checking for LF (linefeed).  This needed
  12365. fixing for OS-9, where '\n' is CR.  This fix also applies to the Macintosh
  12366. in case C-Kermit is ever built there again.  ckucmd.c, 28 May 99.
  12367.  
  12368. Added a NOTTGWSIZ symbol to allow builds without CK_TTGWSIZ to test for
  12369. spurious dependencies.  In UNIX this must be used with -DNORLOGIN, since
  12370. Rlogin requires ttgwsiz().  ckcdeb.h, 28 May 99.
  12371.  
  12372. In the NOTTGWSIZ version, the DIRECTORY command did not list anything, and the
  12373. TYPE command referenced an initialized variable.  Fixed in ckuusr.c, ckuus6.c,
  12374. 28 May 99.
  12375.  
  12376. A bunch of similar fixes: ckuus[r67x].c, 28 May 99.
  12377.  
  12378. Modernized HELP SET FILE (TYPE).  Kermit had changed so much out from
  12379. underneath it that it was positively misleading.  ckuus2.c, 28 May 99.
  12380.  
  12381. With the help of DJ Hagberg at Global Atmospherics, Inc, got past some of the
  12382. initial difficulties with SunLink X.25 9.xx header files.  ckcnet.h, 28 May 99.
  12383.  
  12384. In ckucmd.c, #include "ckcnet.h" was after the includes for ckucmd.h and
  12385. ckuusr.h, and this caused some conflicts with the SunLink header files.  Moved
  12386. it up to after ckcdeb.h and ckcnet.h, and before ckucmd.h and ckuusr.h.
  12387. Now the X.25 version builds OK on Solaris 2.6.  ckucmd.c, 28 May 99.
  12388.  
  12389. Added #ifndef NOCOTFMC around the code in tthang() that closes and reopens
  12390. the device, so we can disable when necessary (or not needed).  This is to see
  12391. if it helps with a problem in Unixware 2.0.3, where the TCSETAW ioctl returns
  12392. an "invalid argument" after the close/open.  ckutio.c, 1 Jun 99.
  12393.  
  12394. Adjusted HELP SET FILE TYPE text again.  ckuus2.c, 1 Jun 99.
  12395.  
  12396. Removed the spurious "?Directory already exists" message that MKDIR always
  12397. printed.  ckuusr.c, 1 Jun 99.
  12398.  
  12399. From Jeff, 1 Jun 99:
  12400.  . Add missing cmdate2tm prototype to ckucmd.h.
  12401.  . Adjust http prototypes in ckcnet.h.
  12402.  . Adjust some prototypes in ckuath.h.
  12403.  
  12404. Moved cmdate2tm() from ckucmd.c to ckutio.c, since it is highly unportable.
  12405. Made a symbol CMDATE2TM that must be defined before we can use this routine,
  12406. and defined it by default for UNIX.  Made another symbol NOCMDATE2TM to
  12407. override the default definition.  If this routine is to be used on non-UNIX
  12408. platforms, it must be copied to their ck*tio.c modules and adapted, but this
  12409. can work only when struct tm is supported.  Therefore, to make it more widely
  12410. useful, we need to define a portable abstraction.
  12411.  
  12412.  . Some Kerberos-realm-getting changes in ckuus7.c
  12413.  . HTTP code fleshed out ckcnet.c.
  12414.  
  12415. The HTTP code in ckcnet.c is not going to be easily portable.  It includes
  12416. <time.h>, which is not portable to all platforms.  Even in UNIX, there are
  12417. many varieties where it is <sys/time.h>, or has an entirely different name.
  12418. That's why I moved cmdate2tm() to ckutio.c, which already has #ifdefs to take
  12419. care of this.  This will need some serious sorting out before we go public.
  12420.  
  12421. Also, you refer to _timezone in http_date() but it's not defined anywhere
  12422. (at least not in SunOS).
  12423.  
  12424. Also, there are calls to nonportable routines like memset(), etc.
  12425.  
  12426. Fixed the call to http_index() in ckuusr.c to have the right number of args.
  12427.  
  12428. From Jeff, IKSD and Kerberos fixes:
  12429.  
  12430.  . syslog'ing was not being performed since the syslog flag was saved
  12431.    before the syslog was opened and then restored after it was opened.
  12432.  
  12433.  . syslog'ing was not being performed during login because the syslog was
  12434.    purposely turned off during login.  I assume to hide passwords.  This
  12435.    is a legitimate concern and I specificly turned off the syslog in the
  12436.    readpass() and in ckxlogin() around the password reading code.
  12437.  
  12438.  . When iksd was compiled with CK_PAM anonymous users would not be
  12439.    prompted for a password and would be summarily rejected.
  12440.  
  12441.  . corrections to yesterday's kerberos autoget ticketing.
  12442.  
  12443.  . Defined CMDATE2TM for K95.
  12444.  
  12445. ckufio.c ckuusr.c ckuus7.c ckuath.c ckucmd.c ckcdeb.h ckcmai.c, 2 Jun 99.
  12446.  
  12447. Changed HTTP code in ckcnet.c to check SYSTIMEH symbol (which is defined in
  12448. ckcdeb.h) before deciding which time.h file to include.  Also added some
  12449. comments and #ifdefs to HTTP code in ckcnet.c, but it will never be truly
  12450. portable in its present form.  It does, however, build OK on at least Solaris,
  12451. SunOS, HP-UX, and Linux, and presumably also in Win32 and OS/2, so it's worth
  12452. keeping.  2 Jun 99.
  12453.  
  12454. Added /ARRAY: switch to the HTTP command parser for INDEX.  dohttp() gets
  12455. the array letter as a new 9th parameter (NUL if none).  The action (actually
  12456. assigning stuff to the array) is filled in, but not used, in http_mkarray()
  12457. in ckcnet.c.  I guess http_index() needs to call http_mkarray()?  2 Jun 99.
  12458.  
  12459. Still more #ifdefs added to the SCREEN support code to allow for the case
  12460. where tputs() requires a pointer to a void function.  ckuusx.c, 3 Jun 99.
  12461.  
  12462. tthang() for some reason stopped working on Unixware 2.0.3.  It used to work
  12463. OK in C-Kermit 6.0, and line-by-line comparison of the tthang() code showed
  12464. no change since then.  It was following the System V path, first trying to
  12465. manipulate the modem signals (because TIOCMBIS, TIOCMBIC, and TIOCM_DTR were
  12466. defined) and failing because these ioctl's were not actually implemented
  12467. (errno 22), so then falling through to the section that gets the current
  12468. speed, saves it, sets it to 0, waits a bit, and then restores the speed.
  12469. The speed-restoring part was failing (ioctl(ttyfd,TCSETA,...)) with errno 22.
  12470. I have no idea why.  Tried "make unixware2 KFLAGS=-DPOSIX", failed miserably.
  12471. So I duplicated the BSD44POSIX speed setting code in #ifdef HUP_POSIX, which
  12472. is defined internally for non-POSIX builds (e.g. Unixware prior to 7.0) that
  12473. need to do POSIX-style hangup.  Later, the fix was verified to work on UW2.0.3
  12474. but who knows what effect it will have on 1.x or 2.1.  ckutio.c, 3 Jun 99.
  12475.  
  12476. Added -DNOREALPATH to Plan 9 makefile.  ckpker.mk, 3 Jun 99.
  12477.  
  12478. From Michal Jaegermann:
  12479.  
  12480.   With a separate 'libcrypt' in glibc there is also a header file
  12481.   <crypt.h> which provides a prototype for 'crypt()'.  Without including
  12482.   it a return value from crypt is losing a half of its significant bits
  12483.   with 64-bit pointers as crypt() type defaults to int.  To work around
  12484.   required "frugal" preprocessors (comments in ckcdeb.h) I added
  12485.   HAVE_CRYPT_H define in makefile flags where -lcrypt is used with Linux
  12486.   and a corresponding conditional include in ckcdeb.h
  12487.  
  12488.   time_t type on Linux/Alpha is long but 'tv_sec' field in 'struct timeval'
  12489.   is int.  I heard that is a POSIX requirement.  Looks to me more like a
  12490.   bug but quite likely is both.  The net effect is that using an address
  12491.   of tv.tv_sec (ckufio.c via macro, ckutio.c) where an address of time_t
  12492.   is needed results in a unaligned trap.  I bracketed these changes with
  12493.   LINUX as 64-bit apps on Sparc and on the future ia64 **may** have the
  12494.   same problem.  In any case an overhead is totally negligible so why
  12495.   not be safe.  In case ckufio.c 'ut.ut_time = time(NULL);' would likely
  12496.   work equally well but I wanted to a keep a consistent style.
  12497.  
  12498.   There is a bunch of unused variables (quite likely some are used with
  12499.   other defines active) but 'static char lockname[DEVNAMLEN+1]' is
  12500.   needed only with USETTYLOCK defined.  'static suftab' in ckuus3.c is
  12501.   not used by anything at all.
  12502.  
  12503.   Wrong format in sprintf resurfaced in some new place (ckuus4.c) and
  12504.   ckussx.c requires a bunch of prototypes from <term.h>. Undeclared
  12505.   functions always make me nervous on Alpha. :-)
  12506.  
  12507. Michal's patches installed in makefile, cku[ft]io.c, ckuus[34x].c, 3 Jun 99.
  12508.  
  12509. Added an HTTP feature-selection section to ckcdeb.h.  Since the HTTP code is
  12510. not portable, it is disabled by default except for SunOS, Solaris, Linux, and
  12511. HP-UX 10 (the places where I've built it successfully so far), and K-95, and
  12512. disabled by default elsewhere unless -DCKHTTP is given on the CC command line
  12513. or in the makefile target.  ckcdeb.h, 3 Jun 99.
  12514.  
  12515. Redid HTTP parser so /ARRAY switch applies to all subcommands and INDEX has
  12516. same filename operands as GET and HEAD:
  12517.  
  12518. HTTP [ /AGENT:<string> ] [  /HEADER:<list of strings> ] -
  12519.      [ /PASSWORD:<string> ] [ /USER:<string>  ] [  /ARRAY:<array> ] -
  12520.      { { GET, HEAD, INDEX } <remote> <local> }, -
  12521.        { PUT, POST }  /MIME:<string> <local> <remote> }
  12522.  
  12523. ckuusr.c, 3 Jun 99.
  12524.  
  12525. Cast all string args to ttol() to (CHAR *) in the http_blah() routines.
  12526. ckcnet.c, 3 Jun 99.
  12527.  
  12528. Tried building with -DCKHTTP in AIX 4.1.  Found that "struct tm" was not
  12529. defined.  Why not?  There was a clause in ckutio.c specifically to avoid
  12530. including <time.h> if AIXRS was defined.  I can't remember why, so I assume it
  12531. must be some peculiarity of AIX 3.x, so I included it after all for AIX41.
  12532. That makes ckutio.c compile.  ckcnet.c had the same complaint.  In this case
  12533. it was deliberately including <sys/time.h> rather than <time.h> if AIXRS was
  12534. defined.  Adding an escape clause for AIX41 here too fixed it, and now we can
  12535. build for AIX 4.1 with HTTP.  ckutio.c, ckcnet.c, 3 Jun 99.
  12536.  
  12537. Added -DCKHTTP for AIX41 and Unixware.  ckcdeb.h, 3 Jun 99.
  12538.  
  12539. Changes for COHERENT 4.2 from Fred Smith: ckcdeb.h, ckcnet.h, ckctel.c,
  12540. cku[tf]io.c, 4 Jun 99.
  12541.  
  12542. From Jeff: Renaming of ck_krb_ functions to make sense since they are no
  12543. longer tied specifically to Kerberos.  ck_krb_* were renamed to ck_tn_* when
  12544. Telnet-related or to ck_auth_* when used for authentication.  Fixed prototypes
  12545. in headers to be in the right place and not duplicated.  Many modules,
  12546. 4 Jun 99.
  12547.  
  12548. A command like "take xxx" (where xxx does not exist) could give a message like:
  12549. "?Error in TAKE command file: Line too long or contains NUL characters".
  12550. That's because TAKE searches an internal "TAKE path" if the filename is not
  12551. absolute and it can't find the file in the current directory, and a file "xxx"
  12552. that is a directory happens to exist in the TAKE path.  TAKE tries to execute
  12553. the directory.  Fixed in ckuusr.c, 4 Jun 99.
  12554.  
  12555. If an error occurred in a macro that was invoked from a command file, the
  12556. error message would erroneously identify the macro name as the command file
  12557. name.  Fixed (I think) in ckuus5.c, 4 Jun 99.
  12558.  
  12559. Implemented SHOW STACK for non-Macintosh platforms (it shows the Kermit
  12560. command stack -- macros & command files).  ckuus5.c, 4 Jun 99.
  12561.  
  12562. The stack display was a lot more informative than the previous error message,
  12563. so now we show it every time there's an error in a command file or macro,
  12564. unless QUIET is ON.  ckuus5.c, 4 Jun 99.
  12565.  
  12566. New Coherent 4.2 makefile entry from Fred Smith.  7 Jun 99.
  12567.  
  12568. Changed parsing of "help function" to allow "help func substr" or "help func
  12569. \fsubstr" or "help func fsubstr".  Also fixed "help func" to always go into
  12570. the recall buffer.  ckuus2.c, 8 Jun 99.
  12571.  
  12572. Moved rdigits() and chknum() from ckucmd.c to ckclib.c.  ckucmd.[ch],
  12573. ckclib.[ch], 8 Jun 99.
  12574.  
  12575. Added isfloat().  ckclib.[ch], 8 Jun 99.
  12576.  
  12577. Added a selection of floating-point functions: \ffpadd(), \ffpsubtract(),
  12578. \ffpsqrt(), etc.  Each has one or two floating-point args, and then an
  12579. optional "decimal places" (d) arg.  These functions are included if FNFLOAT is
  12580. defined at a compile time.  In UNIX at least, it is also necessary to add
  12581. "-lm" to LINKFLAGS, since the math functions are not included in the regular C
  12582. library.  Enabled this stuff in SunOS and Linux.  So far so good.  Will have
  12583. to add them in to others as we go along -- too dangerous to enable by default.
  12584. ckuusr.h, ckuus4.c, 8 Jun 99.
  12585.  
  12586. Added \fabsolute().  ckuusr.h, ckuus4.c, 8 Jun 99.
  12587.  
  12588. Peter Eichhorn verified that -DFNFLOAT works on all HP-UX releases 6.5 thru
  12589. 10.20 and updated the makefile targets.  9 Jun 99.
  12590.  
  12591. Discovered that C-Kermit's expression evaluator did not accept '+' as a
  12592. unary operator, so added it.  ckuus5.c, 9 Jun 99.
  12593.  
  12594. Fixed a bug in evaluating signed "d" arg in fp functions.  ckuus4.c, 9 Jun 99.
  12595.  
  12596. Added rounding for fp results when d > 0.  ckuus4.c, 9 Jun 99.
  12597.  
  12598. Added \ffpround(), \ffpmin(), \ffpmax(), \ffpsin(), \ffpcos(), \ffptan().
  12599. ckuusr.h, ckuus4.c, 9 Jun 99.
  12600.  
  12601. Fixed \fmod(), \fmin(), and \fmax(), which were all broken by "goto fnend"s
  12602. that were inserted before they had a chance to write their results to the
  12603. result buffer.  ckuus4.c, 9 Jun 99.
  12604.  
  12605. Changed IF <, <=, =, !=, >=, and > to take floating-point operands and to
  12606. allow the <number> in "IF <number> <command>" to be a floating-point number.
  12607. ckuus6.c, 9 Jun 99.
  12608.  
  12609. Verified that FP builds OK on Unixware 2 and 7; updated the makefile targets
  12610. accordingly.  makefile, 9 Jun 99.
  12611.  
  12612. Added \v(math_pi), \v(math_e), and \v(cmdbufsize).  ckuusr.h, ckuus4.c,
  12613. 9 Jun 99.
  12614.  
  12615. Added HELP FUNC text for all new functions.  ckuus2.c, 9 Jun 99.
  12616.  
  12617. A report of an infinite loop during INPUT seemed to indicate that a hack that
  12618. had been added to boost efficiency by preventing extraneous calls to gtimer()
  12619. was, in fact, having the opposite effect.  Removed the hack.  Also, if INPUT
  12620. got a NUL, it went straight back to the top of the loop, skipping the
  12621. termination checks, thus allowing the burst count to go negative; I fixed this
  12622. by having jump ahead to the termination checks in that case.  But the log
  12623. revealed that the NULs were not data, but in fact were being returned by
  12624. coninc() when read(0,&ch,1) failed with errno 19, "No such device" -- not your
  12625. normal kind of error when reading from standard input.  Changed coninc() to
  12626. return -1 rather than 0 if read() returns 0 and sets errno to nonzero.  I
  12627. don't know how to test this, since I have no idea how the guy got read() from
  12628. stdin to get error 19.  At least the changes don't seem to break anything --
  12629. login scripts still work, INPUT from the controlling terminal still works.
  12630. ckuus4.c, ckutio.c, 9 Jun 99.
  12631.  
  12632. Fixed bsdi2, 3, and 4, plus assorted Solaris makefile targets to pass along
  12633. KFLAGS.  makefile, 9 Jun 99.
  12634.  
  12635. More FNFLOAT verifying:
  12636.  . VMS/Alpha:   OK (so updated ckcdeb.h).
  12637.  . BSDI 3.1:    OK (so updated makefile targets).
  12638.  . AIX 4.3:     OK (ditto)
  12639.  . DU 3.2:      OK (ditto)
  12640.  . DU 4.0:      OK (ditto)
  12641.  . SINIX 5.42   OK (ditto)
  12642.  . Solaris 2.4: OK (ditto, for all Solaris versions).
  12643.  
  12644. Made sure we can still build without FNFLOAT defined, then added -DFNFLOAT
  12645. and -lm to all (non-Test) SunOS entries.  9 Jun 99.
  12646.  
  12647. Updated ckcdeb.h to not allow FNFLOAT if CKFLOAT not defined or if NOFLOAT
  12648. is defined.  9 Jun 99.
  12649.  
  12650. The CONINTB4CB business was done in only one of two places that needed it.
  12651. Added it to the other place (but more work needed here for SV/68 R3V6).
  12652. ckuus4.c, 10 Jun 99.
  12653.  
  12654. Changed some -FNFLOAT's to -DFNFLOAT.  makefile, 10 Jun 99.
  12655.  
  12656. Changes from Jeff: prototype for ck_krb_rlogin() needed #ifdefs; additional
  12657. support for SRP; new blah-export makefile targets for building with Kerberos
  12658. or SRP but without forbidden modules, etc.  ckcnet.[ch], ckuus4.c, ckufio.c,
  12659. ckuath.c, makefile, 10 Jun 99.
  12660.  
  12661. Added prototypes for readpass() and readtext() to ckcdeb.h, 10 Jun 99.
  12662.  
  12663. Defined NOHTTP automatically if OS2ORUNIX is not defined.  Now we can build
  12664. a network version again on VMS.  ckcdeb.h, 10 Jun 99.
  12665.  
  12666. Fixed a printf() in showstk() that had a %d with no int to print.  10 Jun 99.
  12667.  
  12668. Jeff noticed that packet recognition at the command prompt sometimes doesn't
  12669. work when packets contain spaces, which cause gtword() to return.  Mostly they
  12670. work anyway, because the piece of the packet before the space usually does not
  12671. correspond to a top-level command keyword or token, and so we continue
  12672. absorbing packet characters until the CR or LF is reached.  It's awkward,
  12673. however, since the command parser is beeping and spewing out error messages
  12674. all the while, and packet detection probably *could* fail if a piece of
  12675. ("word" in) a packet corresponded to something legal in a command at that
  12676. point.  I made an initial stab at fixing this problem by setting a global
  12677. variable, kstartactive, whenever kstart() thinks it's in a packet, and
  12678. unsetting it whenever it gets any control character besides SOP (since control
  12679. characters can't appear within an S or I packet).  This seems to work OK.  You
  12680. can get in trouble by typing ^A at the prompt, but you get out of it again as
  12681. soon as you type another control char.  Needs testing and maybe some
  12682. refinement.  ckcnf2.c, ckucmd.c, 10 Jun 99.
  12683.  
  12684. Installed a new initfloat() routine to be called at startup when FNFLOAT is
  12685. defined, which determines by inspection (a) the precision of floating-point
  12686. numbers, and (b) whether printf("%f",x) does rounding.  This way we don't need
  12687. any #ifdefs or system/hardware-dependent code.  On a Sparc, we get 16 decimal
  12688. digits of precision (more like 16.25).  As a reality check, assuming 3.3219282
  12689. bits per decimal digit, that gives us 54 bits for the mantissa, allowing 10
  12690. bits for the exponent and sign, which seems about right. ckuusr.h, ckcmai.c,
  12691. ckuus[45].c, 11 Jun 99.
  12692.  
  12693. Changed floating-point output code to (a) create an sprintf() format string
  12694. for the desired number of decimals; (b) let sprintf() do the rounding if
  12695. initfloat() says it can; (c) set all digits beyond the precision to 0 rather
  12696. than return random digits.  ckuus4.c, 11 Jun 99.
  12697.  
  12698. Made \v(math_e) and \v(math_pi) return the number of digits appropriate to
  12699. the machine precision.  ckuus4.c, 11 Jun 99.
  12700.  
  12701. From Jeff:
  12702.  . Define FNFLOAT for K95.
  12703.  . Protect refs to fp_digits in v(math_*) functions with #ifdef FNFLOAT.
  12704.  . Changes for compatibility with new Kerberos credential cache APIs.
  12705.  . Kerberos 4 realm was not being evaluated when the credentials cache is
  12706.    not a file.
  12707.  . Fixes for the IKSD packet problems (bad code).
  12708.  . When entering CONNECT mode iks_wait() must request a response.
  12709.    Otherwise, the receipt of an initial START can result in a premature
  12710.    exit to command mode.  This is not a change in the TKO protocol.
  12711. ckuath.c, ckctel.c, ckcpro.w, ckuusr.c, ckuus4.c, ckcdeb.h, 13 Jun 99.
  12712.  
  12713. Fix from Jeff for fprintf(stderr,...) front end for WRITE ERROR, which has
  12714. been writing to stdout instead of stderr ever since ckxprintf() was added for
  12715. IKSD.  ckutio.c, 13 Jun 99.
  12716.  
  12717. Fixed WRITE and WRITELN { SCREEN, ERROR } to handle EOL as requested.
  12718. ckuusr.c, 13 Jun 99.
  12719.  
  12720. Put the finishing touches on floating-point functions: handle the case where
  12721. the d arg is a variable with an empty value; fix HELP FUNC to handle ambiguous
  12722. keywords better, etc.  ckuus[245].c, 13 Jun 99.
  12723.  
  12724. Checked to make sure that gtword() was calling kstart() only if COMMAND
  12725. AUTODOWNLOAD was ON.  It was.  ckucmd.c, 13 Jun 99.
  12726.  
  12727. Minor code rearrangement in zvuser() to squelch "statement not reached"
  12728. warnings in non-Kerberos builds.  ckufio.c, 13 Jun 99.
  12729.  
  12730. Added -DFNFLOAT to NeXTSTEP targets; -lm was not needed in this case.
  12731. makefile, 13 Jun 99.
  12732.  
  12733. Added a status indication to SHOW CONNECTION (active, closed, or unknown),
  12734. which is obtained from calling ttchk().  ckuus3.c, 13 Jun 99.
  12735.  
  12736. Started Adding  new general-purpose file i/o commands:
  12737.  
  12738.   FILE { OPEN, CLOSE, READ, WRITE, REWIND, LIST } [ switches ] <channel> ...
  12739.  
  12740. These are parsed and executed if CKCHANNELIO is defined (it isn't defined yet
  12741. except if you "make blah KFLAGS=-DCKCHANNELIO).  Non-UNIX platforms need
  12742. z_xxx() routines filled in.  The idea is to allow multiple open files at once,
  12743. in any combination of read/write/append mode, referred to by their channel
  12744. number, which is assigned by FILE OPEN.  It works, but is not finished --
  12745. still need to:
  12746.  
  12747.  . Add more robustness to parser.
  12748.  . Make execution (esp. of READs) more efficient.
  12749.  . Pass error codes / messages back upon failure.
  12750.  . Put prototypes in header files.
  12751.  . Hook into IF OPEN command.
  12752.  . Document the API.
  12753.  . Document the commands.
  12754.  . Find out how to reasonably set Z_MAXCHAN in UNIX & elsewhere.
  12755.  . Add HELP text.
  12756.  . Test test test.
  12757.  
  12758. For now I'm leaving CKCHANNELIO undefined so people can build the current
  12759. sources normally without noticing it.  ckuusr.h, ckcker.h, ckuusr.c, ckuus7.c,
  12760. ckufio.c, 13 Jun 99.
  12761.  
  12762. Fixed \v(math_pi) and \v(math_e) to NUL-terminate themselves; when will I
  12763. learn to remember that strncpy() can't be trusted to do this...  ckuus4.c,
  12764. 14 Jun 99.
  12765.  
  12766. From Jeff: IKSD should not request the client to stop processing Kermit
  12767. packets simply because it is entering server mode.  ckcpro.w, 14 Jun 99.
  12768.  
  12769. From Jeff:
  12770.  . make \v(authstate) work for the client side connection
  12771.  . added \v(authtype) so a script can determine which method is being
  12772.    used to authenticate with the host.
  12773. ckuusr.h ckuus4.c ckuath.c, 14 Jun 99.
  12774.  
  12775. More work on the FILE command:
  12776.  
  12777.  . Added more robustness to parser.
  12778.  . Passed error codes / messages back upon failure.
  12779.  . Put prototypes in header files.
  12780.  . Documented the commands in ckermit2.txt.
  12781.  
  12782. So far only on SunOS.  ckcker.h, ckuusr.h, ckuus7.c, ckufio.c, 14 Jun 99.
  12783.  
  12784. Added "fi" as abbreviation for "finish", since "file" introduced a conflict.
  12785. ckuusr.c, 15 Jun 99.
  12786.  
  12787. Added #include <time.h> for SV68R3V6.  ckutio.c, 15 Jun 99.
  12788.  
  12789. Added some preprocessor tests for maximum number of open files: OPEN_MAX,
  12790. FOPEN_MAX, etc.  ckufio.c, 15 Jun 99.
  12791.  
  12792. Got z_getpos() working and improved the FILE STATUS display.
  12793. ckufio.c, 15 Jun 99.
  12794.  
  12795. Changed sv68r3v6 target to use wermit rather than xermit, since the xermit
  12796. built lost its mind when escaping back from CONNECT.  makefile, 16 Jun 99.
  12797.  
  12798. Added FOPEN, FREAD, FWRITE, FCLOSE, etc, as shortcuts for FILE OPEN, etc.
  12799. ckuusr.[ch], 16 Jun 99.
  12800.  
  12801. Added \v(filemax) and \v(fileerror).  ckuusr.h, ckuus4.c, ckufio.c, 16 Jun 99.
  12802.  
  12803. Straightened out parsing of read and write filenames.  ckuus7.c, 16 Jun 99.
  12804.  
  12805. Got READ/WRITE mode working.  ckufio.c, 16 Jun 99.
  12806.  
  12807. Made it possible for FREAD /CHAR and FWRITE /CHAR to handle NUL bytes.
  12808. ckuus7.c, ckufio.c, 16 Jun 99.
  12809.  
  12810. Fixed unguarded references to VN_FERR and VN_FMAX in ckuus4.c, 17 Jun 99.
  12811.  
  12812. Added EXEC command for UNIX only under #ifdef CKEXEC.  Like RUN, but overlays
  12813. C-Kermit with the given program.  Might be useful for who knows what -- PPP
  12814. dialing maybe?  ckcdeb.h, ckuusr.[ch], ckuus[25].c, ckufio.c, ckcplm.txt,
  12815. ckermit2.txt, 17 Jun 99.
  12816.  
  12817. Added "(R)" "(W)" "(RW)" "[EOF]" etc to FLIST display.  ckuus7.c, 17 Jun 99.
  12818.  
  12819. Added file functions:
  12820.   \f_status(channel)     = 0 if not open; OPEN flags (1-7) if open.
  12821.   \f_pos(channel)        = File pointer.
  12822.   \f_handle(channel)     = File descriptor (UNIX).
  12823.   \f_eof(channel)        = 1 if at EOF, 0 if not at EOF.
  12824.   \f_getchar(channel)    = FREAD /CHAR.
  12825.   \f_getline(channel)    = FREAD /LINE.
  12826.   \f_getblock(channel,n) = FREAD /SIZE:n.
  12827.   \f_putchar(channel)    = FWRITE /CHAR.
  12828.   \f_putline(channel)    = FWRITE /LINE.
  12829.   \f_putblock(channel,n) = FWRITE /STRING.
  12830.  
  12831. Removed all vestiges of BINREAD from code.  ckuus[r6].c, 17 Jun 99.
  12832.  
  12833. Changed FILE READ to allow variable name to be omitted, in which case it
  12834. just prints what it reads.  ckuus7.c, 17 Jun 99.
  12835.  
  12836. Added another arg to z_in() so allow length of buffer to be specified
  12837. separately from number of bytes to read.  ckcker.h, ckufio.c, ckuus[47].c,
  12838. 17 Jun 99.
  12839.  
  12840. Documented the new file i/o API, plus the new z_exec() function.  ckcplm.txt,
  12841. 17 June 99.
  12842.  
  12843. Made sure the code builds OK without CKCHANNELIO on HP-UX 10.20 and Linux.
  12844. Then tried building with CKCHANNELIO on HP-UX (non-ANSI compiler) and Linux
  12845. (ANSI).  It does, a good sign...
  12846.  
  12847. File i/o code verified on HP-UX 8.00, NeXT, ...  Since it uses <stdio.h>
  12848. features like fopen()/fread()/fwrite()/fclose()/etc, which have been used in
  12849. the mainline code since Day One for opening and reading command files, I'm
  12850. assuming it will be portable to all UNIXes, and so enabled it by default (i.e.
  12851. unless NOCHANNELIO is defined) for UNIX in ckcdeb.h.  Also moved the code to
  12852. ckvfio.c for VMS, where it built with no modifications (except I had to define
  12853. Z_MAXCHAN "by hand" since DECC defines OPEN_MAX as 5 (!).  Meanwhile, Jeff
  12854. copied the code to ckofio.c, where it built with no changes, suggesting we
  12855. should put it in a non-system-specific module...  So I moved the z_blah()
  12856. material from ckufio.c to ckuus7.c, and removed it from ckvfio.c and ckofio.c,
  12857. and took care of any difference in ckcdeb.h, and enabled the code for UNIX,
  12858. K95, VMS, and VOS.  18 Jun 99.
  12859.  
  12860. Added HELP text for FILE commands and functions.  ckuus2.c, 18 Jun 99.
  12861.  
  12862. Added \v(math_precision).  ckuusr.h, ckuus4.c, 20 Jun 99.
  12863.  
  12864. OPEN !READ, READ ... was broken on VMS.  I don't see how it ever could have
  12865. worked -- the code to handle it was missing from rinfill().  Fixed in
  12866. ckvfio.c, 20 Jun 99.
  12867.  
  12868. Disallowed FILE OPEN 0 foo.bar, which worked and assigned the channel number
  12869. for foo.bar to the macro called "0".  Too confusing.  No numbers allowed here
  12870. from now on.  ckuus7.c, 20 Jun 99.
  12871.  
  12872. Added support for Multitech MT5634ZPX modem.  ckuusr.h, ckudia.c, 21 Jun 99.
  12873.  
  12874. Fixed a typo in the FREAD/FWRITE parser that could result in an infinite loop.
  12875. Also fixed a mistake in FREAD parsing that could make it ignore the target
  12876. variable.  ckuus7.c, 21 Jun 99.
  12877.  
  12878. Added FILE OPEN /BINARY.  ckcker.h, ckuus[27].c, 21 Jun 99.
  12879.  
  12880. On some platforms OPEN_MAX or FOPEN_MAX (from which we derive CKMAXOPEN) is
  12881. defined as a ridiculously small number so dimensioning our file array to
  12882. (CKMAXOPEN-ZNFILS-5) fails at compile time because the result is negative.
  12883. However, this tends to be a meaningless definition.  For example, DECC 6.0 for
  12884. VMS defines FOPEN_MAX to be the "minimum number of files that the DEC C
  12885. compiler for your system guarantees can be open simultaneously", which turns
  12886. out to be something like 5 when we all know that VMS will let you open
  12887. hundreds of files.  HP-UX 7.05 also has a very small number for this.  Since
  12888. we can't use relops in proprocessor directives (not portable), I changed the
  12889. code to allocate the file array dynamically to a minimum length of 16.  Let
  12890. the code fail at runtime if no more files can be opened.  ckcdeb.h, ckuus7.c,
  12891. 21 Jun 99.
  12892.  
  12893. Updated k95 Windows startup flags help text from Jeff.  ckuusy.c, 22 Jun 99.
  12894.  
  12895. Changed z_in() section that reads lines to do its own buffering.  z_in() now
  12896. contains three alternative methods for reading lines, chosen by #ifdef.  Ran
  12897. exhaustive trials and found no significant difference among the three, so I
  12898. went back the original and simplest one: fgets().  ckuus7.c, 22 Jun 99.
  12899.  
  12900. Installed a fix for Tru64 UNIX 5.0 from Farrel Woods at DEC; the utmp struct
  12901. used 64-bit times, but time() expected a 32-bit one.  ckufio.c, 22 Jun 99.
  12902.  
  12903. Added code to UNIX sysinit() to try getting the system configured open
  12904. file limit from sysconf(_SC_OPEN_MAX), called only if _SC_OPEN_MAX is defined.
  12905. Seems harmless enough, and works on at least SunOS and HP-UX 10.  ckutio.c,
  12906. ckuus[57].c, 22 Jun 99.
  12907.  
  12908. Added a cast to the malloc() for the array of file structs in z_open(),
  12909. plus assorted minor cleanups.  ckuus7.c, 23 Jun 99.
  12910.  
  12911. Peter E convinced me that the d=0 format for \ffpxxx() functions was pretty
  12912. useless -- who cares what the "default precision" of the underlying C libary
  12913. "%f" printf format is?  So I changed it to give the maximum precision of the
  12914. hardware.  So, for example, when the precision is 16 digits, \ffpdiv(10,3)
  12915. gives 3.333333333333333 instead of 3.333333.  But in making this change I
  12916. found that rounding is not done in many cases when d=0.  But it wasn't done
  12917. before either.  ckuus4.c, 23 Jun 99.
  12918.  
  12919. Kerberos changes from Jeff: ckuath.[ch], ckuus7.c, 23 Jun 99.
  12920.  
  12921. Peter E pointed out that server returns full pathname in ACK to F packet
  12922. when DISABLE CD is in effect.  Fixed in ckcpro.w, 24 Jun 99.
  12923.  
  12924. Fixed a typo in the new MT5634 modem support.  ckudia.c, 24 Jun 99.
  12925.  
  12926. Detlev Knorpp discovered that the sequence: "log packets" and then "log
  12927. connections" and then file transfer (in that order) makes C-Kermit dump core.
  12928. This was because of a typo in diaopn(), in which we closed the packet log
  12929. instead of the connection log, prior to opening the new one.  It seems that
  12930. logpkt() calls zsoutx() to write a packet-log record, but neither one of these
  12931. routines calls chkfn() to make sure the log file is actually open -- they just
  12932. assume it is.  Fixed the typo and had logpkt() call chkfn().  ckuus4.c,
  12933. ckcfn2.c, 24 Jun 99.
  12934.  
  12935. Added FCLOSE ALL to close all open files and FSEEK <channel> EOF to move the
  12936. file pointer to the end of the file.  ckuus7.c, 24 Jun 99.
  12937.  
  12938. Peter E has been reporting a bug in which FREAD would get an error the first
  12939. time it's called on an open file, but then works on all subsequent calls until
  12940. EOF.  This was because, for some reason on his HP-UX 6.5 and 7.05 systems, the
  12941. following sequence:
  12942.  
  12943.   errno = 0;
  12944.   x = fgets(buf,len,file);
  12945.   if (errno) ...
  12946.  
  12947. sets errno to something bizarre like ENOTTY, and z_in() was returning a
  12948. failure code in all cases if errno was nonzero after the fgets() or fread().
  12949. I changed the code to return an error only if fgets() or fread() actually
  12950. failed to return any characters.  Also added debugging statements to catch
  12951. when this happens.  ckuus7.c, 24 Jun 99.
  12952.  
  12953. Looked into getting \ffpxxx() functions to round when d=0.  Not a chance.
  12954. The reason: The digit after the last significant digit is garbage, so it can't
  12955. be used to round the last significant digit.  ckuus7.c (comments only),
  12956. 24 Jun 99.
  12957.  
  12958. From Jeff:
  12959.  . Changes to allow K95 to be built with NO_ENCRYPTION
  12960.  . Correction to ckuus7.c.  ckferror() was being called with the wrong
  12961.    variable.
  12962.  . Fixes for SRP authentication problems.
  12963. ckcdeb.h ckuath.c, ckctel.c, ckuus7.c, 25 Jun 99.
  12964.  
  12965. The SRP business is as follows:
  12966.  
  12967. Several years ago it was discovered that there was an operating system whose
  12968. telnet server did not properly follow the telnet protocol.  In particular,
  12969. this OS vendor did not terminate its subnegotiations properly.  Instead of
  12970.  
  12971.  IAC SB <option> <data> IAC SE
  12972.  
  12973. the vendor sent
  12974.  
  12975.  IAC SB <option> <data> SE
  12976.  
  12977. Now, prior to implementing authentication and encryption there were no
  12978. subnegotiations that would send 8-bit high data.  So adding a check to enable
  12979. Kermit to work with this broken server was not a problem.  As it turns out,
  12980. when encryption or authentication is being used the chance for the <data> to
  12981. contain an SE byte is very likely.  Hence, the string that was supposed to be
  12982. 128 bytes was truncated at 45 bytes and the rest of the string was treated as
  12983. terminal data.  SRP didn't work and you got garbage.  This check had already
  12984. been removed for builds with encryption.  I have no removed this check for all
  12985. builds.  (End quote)
  12986.  
  12987. FILE OPEN channels were not being recycled.  Fixed in z_open(): ckuus7.c,
  12988. 25 Jun 99.
  12989.  
  12990. The SHOW STACK command, which is now also implicitly invoked any time we get a
  12991. command error, was not handling the FOR, WHILE, [X]IF, and SWITCH commands as
  12992. expected, since these are implemented as 2-level internal macros, in which we
  12993. stuff the \%0..9 values from 2 levels up.  The stuffing can not change without
  12994. breaking existing scripts, so I added a hack to shostack() to test for these
  12995. four cases and make the appropriate substitutions in the display.  ckuus5.c,
  12996. 25 Jun 99.
  12997.  
  12998. Changed ?-help for switches to put a colon at the end of any switch that takes
  12999. an arg.  kwdhlp(): ckuus7,c, 25 Jun 99.
  13000.  
  13001. VMS C-Kermit 7.0 Beta.07 in server mode would crash if given a REMOTE HOST
  13002. command.  It doesn't crash any more, and responds correctly -- I must have
  13003. fixed it on June 20th when I fixed the broken OPEN !READ / READ sequence.
  13004.  
  13005. Made DELETE /QUIET not print error messages if file doesn't exist.  dodel():
  13006. ckuus6.c, 25 Jun 99.
  13007.  
  13008. Fixed HELP FUNC parsing once and for all.  Now you can type "help func" by
  13009. itself, or (e.g. for \fsubstring()) "help func" followed by "sub", "fsub",
  13010. "sub()", "fsub()", "\fsub", "\fsub()", "\\fsub()", "\\fsub", etc etc, without
  13011. getting spurious error messages or having to confirm more than once, and a
  13012. proper error message is printed if there is no match.  ckuus2.c, 25 Jun 99.
  13013.  
  13014. Added x.xxMB (or GB) to DIR /HEADING summary.  26 Jun 99.
  13015.  
  13016. Added /BYTE and /LINE switches to FILE SEEK, so now you can FSEEK to a
  13017. particular line in a file.  ckuus7.c, 26 Jun 99.
  13018.  
  13019. Added FILE COUNT / FCOUNT to return the number bytes or lines in an open file
  13020. (without disturbing its current position).  ckuusr.[ch], ckuus7.c, 26 Jun 99.
  13021.  
  13022. Added new functions & variables:
  13023.  . \f_line(chan) to return line number if known.
  13024.  . \v(filecount) to return extern int z_filcount.
  13025.  . \fleft() for convenience and symmetry with \fright().
  13026. ckuusr.h, ckuus[47].c, 26 Jun 99.
  13027.  
  13028. Added /SIZE:n /LPAD:c /RPAD:c switches to FILE WRITE.  ckuus7.c, 26 Jun 99.
  13029.  
  13030. Added \f_ermsg(code).  ckuusr.h, ckcker.h, ckuus[47].c, 27 Jun 99.
  13031.  
  13032. Added relative seeks: FSEEK { /LINE, /BYTE } <channel> {+,-}<number>.
  13033. ckuus7.c, 27 Jun 99.
  13034.  
  13035. Renamed FILE-related variables to \v(f_xxx).  ckuus4.c, 27 Jun 99.
  13036.  
  13037. Updated help text for FILE commands and functions.  ckuus2.c, 27 Jun 99.
  13038.  
  13039. Checked Dale Dellutri's report about SET FLOW KEEP not working in VMS.
  13040. Actually, it was working, but the order in which SET LINE/PORT/HOST and SET
  13041. FLOW are given is now significant, where it wasn't before.  27 Jun 99.
  13042.  
  13043. Added TRACE [ { /ON, /OFF } ] { ASSIGNMENTS, COMMAND-LEVEL, ALL }.  When ON,
  13044. this prints a message every time the value of any variable changes or the
  13045. command level changes.  ckuusr.[ch], ckuus[256].c, 27 Jun 99.
  13046.  
  13047. From Jeff: Fix to bogus rewind() call, fixes to SSL support & some ttclos()
  13048. calls without args.  ckuus7.c, ckutio.c, 28 Jun 99.
  13049.  
  13050. Added NOSTAT for VOS.  ckcdeb.h, 28 Jun 99.
  13051.  
  13052. Added a quick & dirty adaptation of SET SERVER IDLE-TIMEOUT to non-K95 builds
  13053. (K95 already had it).  It's quick & dirty because it can't coexist with SET
  13054. SERVER TIMEOUT.  ckcmai.c, ckcfn2.c, ckcpro.w, ckuus[235].c, 28 Jun 99.
  13055.  
  13056. Added RETURN value to TRACE ASSIGNMENTS.  ckuus6.c, 28 Jun 99.
  13057.  
  13058. While looking at RETURN, discovered that it set success=1 when given a value,
  13059. and success=0 when not given a value, which makes no sense.  Changed it not to
  13060. mess with success.  ckuus6.c, 28 Jun 99.
  13061.  
  13062. Added SET TRANSFER INTERRUPTION { ON, OFF }.  Refers to file-transfer
  13063. interruption in local mode, as opposed to SET TRANSFER CANCELLATION, which
  13064. refers to remote mode.  ckuusr.h, ckcmai.c, ckuus[234x].c, 28 Jun 99.
  13065.  
  13066. From Jeff:
  13067.  
  13068.  . Added ckgetfqhostname() to retrieve the fully qualified hostname
  13069.    from a partial name.  This is done by performing a DNS lookup and
  13070.    immediately performing a reverse lookup on the first IP address in the
  13071.    list.
  13072.  
  13073.  . Warning: if the function is called on an alias such as "cunix" the
  13074.    IP address in the list when calling ckgetfqhostname() may not match
  13075.    the IP address in the list when netopen() calls gethostbyname().
  13076.    If the function is going to be used as a general call in setline()
  13077.    then the result of this function must replace the hostname the user
  13078.    typed in the parse buffer.  I have not made this change as I only need
  13079.    it to check the realm of the host and we assume that all of hosts
  13080.    sharing a common alias will have the same realm.  (although, I am sure
  13081.    somebody will prove us wrong.)
  13082.  
  13083.  . Added check for Ctrl-C in tn_wait().
  13084.  
  13085. ckcnet.c ckuus7.c ckcnet.h ckctel.c, 29 Jun 99.
  13086.  
  13087. Removed #ifdef CK_CURSES from around prototypes for ck_cls() and friends,
  13088. since these are referenced in the code even when CK_CURSES is not defined,
  13089. in which case dummies are provided.  ckuusr.h, 29 Jun 99.
  13090.  
  13091. Peter E reported that if HP-UX C-Kermit was in server mode on a serial port
  13092. which had been dialed in to, and the user hung up without sending BYE, and
  13093. FINISH was disabled, that C-Kermit would go into a loop forever (tying up the
  13094. port and, if the debug log was on, filling up the disk).  Diagnosis: (1) the
  13095. read() in myfillbuf() SVORPOSIX case returned 0, and so myfillbuf() returned 0
  13096. too; (2) mygetbuf(), which called myfillbuf(), returns -2 if myfillbuf()
  13097. returns 0; (3) ttinl(), which calls mygetbuf() through the myread() macro,
  13098. passes the -2 up to rpack(), which passes it up to input(); (4) input()
  13099. interprets -2 (correctly) as "Ctrl-C was typed" and returns 'q' to proto();
  13100. (5) proto() says "oh no you don't -- quitting is disabled" and goes back to
  13101. its read loop, and (6) the process repeats forever.
  13102.  
  13103. How to fix?  First, myfillbuf() should not return 0 if read() returns 0,
  13104. because the device was conditioned to return at least 1 byte with (in the
  13105. SVORPOSIX case) VMIN > 0, VTIME = 0, and O_NDELAY off.  That is, the read() is
  13106. blocking and therefore a 0 return must indicate connection loss or other
  13107. unrecoverable error, EVEN IF errno is 0 after the read (which it is in this
  13108. case).  Therefore (at least SVORPOSIX) myfillbuf() should return -3
  13109. (connection lost) if read() returns 0.  In the FIONBIO case, myfillbuf()
  13110. should also never return 0.  And the same is true in the non-SVORPOSIX /
  13111. non-FIOBIO case.  In every case the read() is blocking, so should never
  13112. return 0.  So I made every instance of UNIX myfillbuf() return -3 if the read
  13113. returns 0, except in the Kerberos, SSL, and other cases, which I'm not sure
  13114. about.  ckutio.c, 29 Jun 99.
  13115.  
  13116. Second, UNIX mygetbuf() had a mistake:
  13117.  
  13118.   my_count = myfillbuf();
  13119.   if (my_count <= 0) { my_count = 0; ...; return((my_count < 0) ? -3 : -2); }
  13120.  
  13121. So it would never return -3 (except in the network case, which had a special
  13122. check).  This was fixed by copying my_count to another variable (x), and then
  13123. checking x in the return() clause.  ckutio.c, 29 Jun 99.
  13124.  
  13125. Third, even when ttinl() returns -3 to rpack(), rpack() was changing it to
  13126. -2 before passing back up if FINISH was disabled.  What a mess...  ckcfn2.c,
  13127. 29 Jun 99.
  13128.  
  13129. Fourth, now that -3 passed all the way up the line, what does input() do with
  13130. it?  It treats -2 and -3 the same, translating them BOTH to (pseudo) packet
  13131. type 'q' (lower case) so the protocol engine can't tell the difference.  So
  13132. now we have to either (a) make a new pseudopacket type to indicate connection
  13133. loss, or (b) manage yet another global flag.
  13134.  
  13135. But wait, there already is one -- 'interrupted' is set by rpack() if ttinl()
  13136. returns -2.  Therefore, whenever the input to the state machine is 'q', but
  13137. interrupted == 0, we must have connection loss.  Or an idle timeout.  OK, so
  13138. two flags...  The code to check these flags was added to the relevant <*>q
  13139. cases in the protocol engine.  ckcpro.w, 29 Jun 99.
  13140.  
  13141. That should do it...  But note that all this is necessary only when (a) read()
  13142. returns 0 but does NOT set errno, AND (b) the client hanging up does cause a
  13143. SIGHUP signal -- Kermit already catches both of those cases.  However, the
  13144. logs show that (a) and (b) are indeed the case at Peter E's site.
  13145.  
  13146. Dat Thuc Nguyen noticed that a closing bracket was not required on a
  13147. single-line macro definition; e.g. "def xx { echo foo" was accepted and
  13148. actually worked.  Of course ANYTHING should be accepted as a macro definition.
  13149. But an error should occur when attempting to execute a malformed macro.  Fixed
  13150. in dodef(), ckuus6.c, 29 Jun 99.
  13151.  
  13152. Peter E confirms yesterday's changes (and SET SERVER IDLE-TIMEOUT) work OK
  13153. on his HP-UX systems.  30 Jun 99.
  13154.  
  13155. Moved UNIX SIGHUP arming from conint() to sysinit() so hangups can be caught
  13156. earlier.  ckutio.c, 30 Jun 99.
  13157.  
  13158. Fixed FILE COUNT to check return code from z_count().  ckuus7.c, 1 Jul 99.
  13159.  
  13160. Added a makefile target for DG/UX 5.4R4.20.  makefile, ckuver.h, 5 Jul 99.
  13161.  
  13162. FSEEK /LINE \%c EOF followed FSEEK /LINE \%c -1 failed because Kermit didn't
  13163. know the current line number.  I changed FSEEK /LINE <channel> EOF to set the
  13164. resulting line number.  ckuus7.c, 5 Jul 99.
  13165.  
  13166. Added a new error code, FX_LNU = Current line number unknown, for use with
  13167. relative line seeks, and changed z_getline() to return it.  ckuus7.c, 5 Jul 99.
  13168.  
  13169. Changed FCLOSE ALL to not fail or print a message if no files were open.
  13170. Changed FCLOSE ALL to fail if an open file could not be closed (but still
  13171. close all the other ones that could be closed).  ckuus7.c, 5 Jul 99.
  13172.  
  13173. Added /RELATIVE /ABSOLUTE switches to FILE SEEK, to force relative or absolute
  13174. seeking, irrespective of the format of the number.  ckuus7.c, 5 Jul 99.
  13175.  
  13176. Added /LIST and /NOLIST switches to FILE COUNT to force display or suppression
  13177. of the count.  /QUIET is a synonym for /NOLIST.  ckuus7.c, 5 Jul 99.
  13178.  
  13179. Added askmore() to FILE LIST.  ckuus7.c, 5 Jul 99.
  13180.  
  13181. Updated HELP FILE texts and fixed HELP FILE COUNT, which was broken.
  13182. ckuus2.c, 5 Jul 99.
  13183.  
  13184. Improvements to method for getting local host name in K95 from Jeff.
  13185. ckcnet.c 6 Jun 99.
  13186.  
  13187. Added some minor speedups to FREAD /LINE, FSEEK /LINE, and FCOUNT /LINE.
  13188. ckuus7.c, 7 Jun 99.
  13189.  
  13190. There was no prohibition against seeking before the beginning of a file, which
  13191. could lead to some interesting problems in script loops (e.g. to read a file's
  13192. lines in reverse order).  Now it fails silently.  ckuus7.c, 7 Jun 99.
  13193.  
  13194. From Jeff:
  13195.  
  13196.   I have made the gethostbyname(NULL) call the default in getlocalipaddr().
  13197.  
  13198.   I have added DNS SRV record lookups.  This is conditionally compiled with
  13199.   CK_DNS_SRV.  If you do not want to compile using it define NO_DNS_SRV.  The
  13200.   changes in ckuus7.c from port numbers to service strings is to allow the
  13201.   DNS_SRV code to work by default.  I have made appropriate changes to
  13202.   netopen() to ensure that each service will be translated to a port number
  13203.   even if getservbyname() is not supported.
  13204.  
  13205.   Now when you telnet / set host to (e.g.) watsun, the DNS SRV query is:
  13206.  
  13207.     _telnet._tcp.watsun
  13208.  
  13209.   If a response arrives we use the first host and ignore the rest (it was too
  13210.   much work to allow a list of host:ports to be specified).
  13211.  
  13212.   I did not need to add any libraries to allow compilation on watsun.  Linux
  13213.   requires -lresolv for the res_search and dn_expand functions.
  13214.  
  13215. ckcdeb.h ckcnet.h ckcnet.c ckuus7.c ckuath.c makefile, 11 Jul 99.
  13216.  
  13217.   Should there be a SET command to control whether this code is used?
  13218.   Time will tell...
  13219.  
  13220. Fixed a few mistakes (e.g. "out" used as variable and label in same function)
  13221. and non-portable constructions (like const and strdup()) in the above.
  13222. ckcnet.c, 11 Jul 99.
  13223.  
  13224. The June 29th changes to catch communications disconnect were making an
  13225. spurious error message ("error 0") come out if you logged out from the remote
  13226. while in CONNECT mode.  Commented out the no-longer needed code.  ckucns.c,
  13227. ckucon.c, 11 Jul 98.
  13228.  
  13229. Rearranged code in the HELP FUNC parser to suppress some harmless compiler
  13230. warnings.  ckuus2.c, 11 Jul 98.
  13231.  
  13232. Added "--nointerrupts" command-line option, equivalent to "set command
  13233. interruption off" + "set suspend off".  This also required changing UNIX
  13234. connoi() to set SIGTSTP to SIG_IGN instead of SIG_DFL.  I wonder why it was
  13235. SIG_DFL in the first place -- kind of defeats the purpose of "set suspend
  13236. off"...  ckuusr.h, ckuus[5y].c, 11 Jul 99.
  13237.  
  13238. Since Jeff's changes were rather drastic, tried building today's version on:
  13239.  . SunOS/gcc: OK
  13240.  . SunOS/cc: Non-ANSI compilations need #ifdefs for "const", then OK.
  13241.  . Solaris 2.5.1/gcc: Needed -lresolv added to LIBS, then OK.
  13242.  . Solaris 7/gcc: OK.
  13243.  . HP-UX 10.20 bundled compiler: OK after non-ANSI changes.
  13244.  . HP-UX 10.20 ANSI compiler: OK.
  13245.  . HP-UX 8.00 non-ANSI: OK.
  13246.  . VMS 7.1 / UCX: HEADER type not defined, C_IN not declared, etc.
  13247.  . Linux RH 5.2: OK after adding -lresolv to linuxa target.
  13248.  . SINIX 5.42: Bombs out with errors in <arpa/nameser.h>.
  13249.  . Unixware 7: OK after adding -lresolv (also for all other Unixware targets)
  13250.  . BSDI 3.1: OK.
  13251.  
  13252. Defined NO_DNS_SRV for VMS.  ckcdeb.h, 11 Jul 99.
  13253.  
  13254. Added -DNO_DNS_SRV to SINIX targets; added -lresolv as indicated above.
  13255. Makefile, 11 Jul 99.
  13256.  
  13257. Added -DNO_DNS_SRV to HP-UX 5.00, SCO Xenix, and Motorola sv68* targets.
  13258. Makefile, 12 Jul 99.
  13259.  
  13260. Checked DNS business on FreeBSD 3.1 -- It's OK.  12 Jul 99.
  13261.  
  13262. Added FSEEK <channel> { /LINE, /CHAR } LAST, meaning to seek to the final
  13263. line or character in the file.  ckuus7.c 12 Jul 99.
  13264.  
  13265. Added associative arrays.  ckuusr.h, ckuus[24].c, 12 Jul 99.
  13266.  
  13267. Fixed typo in -DNO_DNS_SRV addition to Motorola SV/68 makefile targets.
  13268. 13 Jul 99.
  13269.  
  13270. Added an argument to sh_sort() to allow specification of an optional second
  13271. array to be sorted in parallel with the first, and changed the interpretation
  13272. of the final argument from "0 = caseless, nonzero = case sensitive" to
  13273. "0 = alpha/caseless, 1 = alpha/case-sensitive, 2 = numeric".  Numeric sorts
  13274. work for both integers and floating-point numbers, or any mixture.
  13275. ckclib.[ch], ckcfns.c, ckuus[4567].c, 13 Jul 99.
  13276.  
  13277. Added a second argument to isfloat() to say whether the entire argument string
  13278. must be a floating-point number (flag = 0), or to terminate on the first
  13279. illegal character (flag = 1, works like scanf()).  ckclib.[ch], ckcfns.c,
  13280. ckuus[4567].c, 13 Jul 99.
  13281.  
  13282. Changed SORT command to have a /NUMERIC switch and to allow (but not require)
  13283. specification of a second array to be sorted in parallel with the first.
  13284. ckuusr.h, ckuus[27].c, 13 Jul 99.
  13285.  
  13286. Changed addmac() and delmac() to treat associative array names with case
  13287. sensitivity, unlike all other macro names, which are case independent.
  13288. ckuus5.c, 13 Jul 99.
  13289.  
  13290. FOR, WHILE, and SWITCH each defined BREAK and CONTINUE internally, but then
  13291. did not undefine them upon completion.  Tried undef'ing them in the built-in
  13292. FOR, WHILE, and SWITCH definitions, but this caused trouble with the script
  13293. demo torture test, so backed off.  Anyway, now the demo test works fine, even
  13294. after all the recent changes with macros & sorting.  13 Jul 99.
  13295.  
  13296. Some ckcnet.c changes from Jeff.  13 Jul 99.
  13297.  
  13298. Defined NO_DNS_SRV for VOS and AOS/VS.  Makefile, 14 Jul 99.
  13299.  
  13300. Discovered that conint() and connoi() were being called all over the place in
  13301. a rather undisciplined fashion, and furthermore that in many places, a front
  13302. end for them, setint(), was being used instead.  Replaced all calls to
  13303. conint() (except, obviously, in the interrupt handler itself) by calls to
  13304. setint(), and changed setint() to honor the cmdint and suspend flags in
  13305. setting the SIGINT and SIGTSTP traps.  This should allow any combination of
  13306. SET SUSPEND {ON,OFF}, --noint, and SET COMMAND INTERRUPT {ON,OFF} to work
  13307. right and consistently.  ckcmai.c, ckcpro.w, ckuus[456x].c, 14 Jul 99.
  13308.  
  13309. Added some ansification to the nxt*() declarations to shut up overzealous
  13310. compilers about the funcptr = nxt... assignments.  ckcfns.c, 14 Jul 99.
  13311.  
  13312. Added #include <time.h> for SCO 3.2v4.x.  I wonder why this wasn't needed
  13313. in Beta.07?...  ckutio.c, 14 Jul 99.
  13314.  
  13315. Removed -DDCLFDOPEN and -DDCLPOPEN from SCO 3.2v4.x makefile targets -- not
  13316. only are they not needed (because fdopen() and popen() are declared in
  13317. <stdio.h>), but Kermit's internal declarations conflict with the SCO <stdio.h>
  13318. prototypes (because of "const").  Makefile, 14 Jul 99.
  13319.  
  13320. Made sure that CK_DNS_SRV was not defined if TCPSOCKET was not also defined.
  13321. ckcdeb.h, 14 Jul 99.
  13322.  
  13323. Added a forward declaration for ck_termset() in the non-ANSI case.
  13324. ckuusx.c, 14 Jul 99.
  13325.  
  13326. Added {CK,NO}_DNS_SRV display to SHOW FEATURES.  ckuus5.c, 14 Jul 99.
  13327.  
  13328. After today's changes, the following SCO 3.2v4.2 builds are OK again:
  13329. sco32v4 sco32v4ns sco32v4net sco32v4gcc sco32v4netgcc.  Also builds fine
  13330. on SCO OSR5.0.5:  sco32v505 sco32v505net sco32v505gcc sco32v505netgcc.
  13331.  
  13332. Added SET DIAL TEST { ON, OFF }, to test all dialing features without actually
  13333. dialing (phone number conversion, DIAL macro, retries, pauses, etc).  ckuusr.h,
  13334. ckuus6.c, 14 Jul 99.
  13335.  
  13336. Moved invocation of DIAL macro from lookup time to dial time, so it is
  13337. applied to each number that is dialed, when it is dialed.  ckuus6.c,
  13338. 14 Jul 99.
  13339.  
  13340. Added \v(dialcount), to be used inside DIAL macro -- it tells the number of
  13341. the current DIAL attempt.  ckuusr.h, ckuus4.c, ckudia.c.  14 Jul 99.
  13342.  
  13343. SET DNS-SERVICE-RECORDS from Jeff.  ckuusr.h, ckuus[34].c, ckcnet.c, ckuath.c.
  13344. 14 Jul 99.
  13345.  
  13346. Moved {CK,NO}_DNS_SRV setting from ckcdeb.h to ckcnet.h, because it needed to
  13347. be deferred until we are absolutely sure we know whether TCPSOCKET is defined.
  13348. 14 Jul 99.
  13349.  
  13350. From Jeff: Attempt to initialize the Kerberos principal names from the current
  13351. cache file, if any.  ckcnet.c, ckuat*.*, etc, 15 Jul 99.
  13352.  
  13353. Discovered some bugs in \faaconvert() when running it on large arrays: (a) the
  13354. code assumed all members of the same associative array would be contiguous,
  13355. when in fact it is possible for non-members to insert themselves; (b) some
  13356. junk was getting appended to long element names.  The latter was because VNAML
  13357. was hardwired at 64 but element names built from long filespecs were much
  13358. longer than that and overwrote memory, oops.  Fixed by (a) increasing VNAML
  13359. (to 4096 for BIGBUFOK builds, 256 for others) and (b) making dodef() check the
  13360. length of the name before copying it into the variable-name buffer.  ckuusr.h,
  13361. ckuus6.c, 15 Jul 99.
  13362.  
  13363. From Peter E: Set the dialcount variable earlier, so it is in sync with
  13364. the dial try number reported to the user.  ckuus6.c, 15 Jul 99.
  13365.  
  13366. From Jeff: More Kerberos additions.  In particular a new feature to allow
  13367. Kermit's TGT getting to be used for K5 even for sites that do not support K5,
  13368. to allow deployment of scripts that request K5 and K4 tickets without a scary
  13369. message for the user.  When the upgrade takes place the K5 support will just
  13370. work without a need to update the scripts.  ck_crp.c, ckuath.h, ckuath.c,
  13371. ckcnet.c, ckuusr.h, ckuus7.c, ckuus3.c, ckuus2.c, 15 Jul 99.
  13372.  
  13373. Took "--noint" command-line keyword out of the CK_LOGIN section.  ckuusy.c,
  13374. 16 Jul 99.
  13375.  
  13376. connoi() didn't work at all on platforms System V signal handling, notably
  13377. Solaris and SCO UNIX 3.2v4.  The first SIGINT would be ignored, the second one
  13378. would be caught by the shell, which would kill Kermit.  Fixing this required a
  13379. complete overhaul of the UNIX versions of connoi() and conint(), plus some
  13380. further improvements in setint().  As a side benefit, the new ones are a lot
  13381. simpler.  ckuusx.c, ckutio.c, 16 Jul 99.
  13382.  
  13383. Partial completion and ?-help were broken when given in a directory segment of
  13384. path leading up to a filename.  This seems to have been broken since the
  13385. introduction of nzxpand() in Beta.04.  Fixed in cmifi2(): ckucmd.c, 16 Jul 99.
  13386.  
  13387. The RESET command didn't call cmcfm().  Anyway it was pretty useless so I made
  13388. it invisible -- no sense cluttering up valuable top-level ? real estate with
  13389. it.  ckuusr.c, 16 Jul 99.
  13390.  
  13391. Added #include <errno.h> for CKCHANNELIO material for VMS. ckuus7.c, 17 Jul 99.
  13392.  
  13393. A round of preliminary builds:
  13394.  . SunOS/gcc - ok.
  13395.  . SunSO/cc - ok.
  13396.  . VMS nonet DECC - ok.
  13397.  . VMS UCX DECC - ok.
  13398.  . VMS TGV DECC - ok.
  13399.  . HP-UX 10.20 non-ANSI - ok.
  13400.  . HP-UX 10.20 ANSI - ok.
  13401.  . SCO 5.0.5B, all four builds - ok.
  13402.  
  13403. Discovered that Ctrl-\ given to UNIX C-Kermit while it's starting makes it
  13404. dump core.  Added signal(SIGQUIT,SIG_IGN) to sysinit().  ckutio.c, 17 Jul 99.
  13405.  
  13406. Discovered that in the Solaris version, \v(ipaddr) fails, so added
  13407. -DNO_DNS_SRV and removed -lresolv from solaris2xg target.  But that didn't
  13408. help.  Undid changes to makefile and added a new symbol, CKGHNLHOST, which
  13409. means to get the local host IP address the old way (by calling gethostname(buf)
  13410. and then gethostbyname(buf), rather than gethostbyname("") and included this
  13411. symbol in all Solaris targets.  ckcnet.c, ckuus5.c, makefile, 17 Jul 99.
  13412.  
  13413. Discovered the Solaris version would dump core if told to "show variables",
  13414. when trying to display the \v(textdir) variable.  Failed to check pointer for
  13415. nullness.  ckuus4.c, 17 Jul 99.
  13416.  
  13417. Moved CKGHNLHOST definition to ckcnet.h.  Had to define it for:
  13418.  . Solaris
  13419.  . Unixware
  13420.  . Sinix / Reliant
  13421.  . AOS/VS
  13422.  
  13423. Due to compilation errors in system header files, had to define NO_DNS_SRV for:
  13424.  . HP-UX 5.00 through 8.00
  13425.  . Ultrix (all versions)
  13426.  . NeXTSTEP (all versions)
  13427.  
  13428. Had to add -lresolv to:
  13429.  . Some Linuxes but not others (see below).
  13430.  
  13431. Made new makefile entries for Compaq Tru64 UNIX 4.0E and 5.0 (company and
  13432. name change), and added designer banners.  makefile, ckuver.h, 17 Jul 99.
  13433.  
  13434. Fixed a typo in the xdelmac() declaration (extraneous extra arg).  ckuus5.c,
  13435. 17 Jul 99.
  13436.  
  13437. Discovered that some Linuxes (e.g. Red Hat) have libresolv.a (in which case it
  13438. must be searched for res_search() and dn_expan()) while others (Slackware)
  13439. don't.  So I had to change the "make linux" target to dynamically decide on
  13440. which combination of -lcrypt and -resolv (4 possibilities) to use.  makefile,
  13441. 17 Jul 99.
  13442.  
  13443. No #including <sys/stat.h> on VMS with VAXC.  Now it builds OK on VMS 5.5.
  13444. ckuus7.c, 17 Jul 99.
  13445.  
  13446. The old DG MV2500 has trouble booting (hard disk errors) but if you enter the
  13447. diagnostic monitor, let it sit there for a while (so the disk can warm up) and
  13448. then try booting again, it comes up.  But as always, building gets media
  13449. errors on some files, which can usually be gotten around by building the
  13450. affected modules again.  After six hours or so I got a working binary, but
  13451. even with CKGHNLHOST defined, I still don't get a good \v(ipaddress).
  13452.  
  13453. SCO Xenix 2.3.4 needed <time.h> again.  ckutio.c, 17 Jul 99.
  13454.  
  13455. Discovered that the VMS UCX version on the Alpha, when sending a file over
  13456. Ethernet, its throughput steadily decreases as the transfer goes on, every
  13457. time.  It starts at over 100Kcps, and winds up (after about 2MB) at 13Kcps.
  13458. Increasing the TCP SENDBUF size from 4K to 16K makes it start at about 400K
  13459. and drop to 140K with the same file on the same connection.  Increasing it
  13460. beyond that doesn't make any difference.  For receiving, the 4K receive buffer
  13461. size seems to be OK -- throughput is about 400Kcps, and increasing the buffer
  13462. size doesn't change it.  Made default TCP send buffer size 16K on
  13463. VMS/Alpha/UCX.  Ditto for TCPware.  In fact, I made the definition contingent
  13464. on VMS and __alpha, which also includes Multinet, except it is ignored in
  13465. Multinet since SO_SNDBUF is not defined there.  ckcnet.c, 18 Jul 99.
  13466.  
  13467. Put Base-64 stuff in #ifndef NOSPL for PDP-11 build.  ckclib.c, 18 Jul 99.
  13468.  
  13469. Discovered that making a TCP connection to a site that refuses the connection
  13470. did not print an error message.  A perror() was missing in the ocean of
  13471. #ifdefs in netopen() for the UNIX case.  ckcnet.c, 18 Jul 99 (but this change
  13472. is too late to make it into most of the Beta.08 binaries).
  13473.  
  13474. All Multinet builds now get an avalanche of compiler warnings about socket
  13475. routines (socket_read/write/close, htons, getsockname, etc), but they still
  13476. seem to work ok...  Comparison of Beta.07 and 08 ckcnet.h and ckcnet.c doesn't
  13477. reveal anything obvious.
  13478.  
  13479. Removed trailing blanks from all source files.  18 Jul 99.
  13480.  
  13481. ---Beta.08---
  13482.  
  13483. Added -DNO_DNS_SRV to pyrdcosx target.  Makefile, 20 Jul 99.
  13484.  
  13485. From Jeff: Kerberos updates, IKSD fix, NAWS fix for when client tells us it
  13486. has 0 rows and/or 0 columns.  ckcnet.c ckctel.c ckuath.c ckcpro.w ckuus7.c
  13487. ckuus2.c ckuus3.c, 21 Jul 99
  13488.  
  13489. Fixed duplicate solaris25gx25 entries; the second one should have been
  13490. solaris26gx25.  makefile, 21 Jul 98.
  13491.  
  13492. Attempted to cut through the mess surrounding when/how/if to include <time.h>
  13493. (or <sys/time.h>) in ckutio.c, since this was a big source of problems in
  13494. Beta.08.  The possibilities are pretty much any combination of zero or more of
  13495. <time.h>, <sys/time.h>, and <sys/timeb.h>.  The only rational approach is to
  13496. use symbols: TIMEH, NOTIMEH, SYSTIMEH, NOSYSTIMEH, SYSTIMEBH, and NOSYSTIMEBH.
  13497. By default TIMEH is defined for everybody.  SYSTIMEH is defined for a fairly
  13498. long list in ckcdeb.h, and I moved the section that decides about <sys/timeb.h>
  13499. from ckutio.c to ckcdeb.h.  Now any of these can be overridden or undone on
  13500. the command line without touching the source code.  makefile, ckcdeb.h,
  13501. ckutio.c, ckuus5.c, ckuins.txt Section 4.0, 21 Jul 99.
  13502.  
  13503. Tested on:
  13504.  
  13505.   AIX 4.1           OK       QNX 4.25          OK
  13506.   AIX 4.3.2         OK       SCO 3.2v4.2       OK
  13507.   BSDI 3.1          OK       SCO 5.0.5         OK
  13508.   DG/UX R4.11       OK       SINIX 5.42        OK
  13509.   Digital UNIX 3.2  OK       Solaris 2.5.1     OK
  13510.   FreeBSD 2.2.7     OK       Solaris 7         OK
  13511.   HP-UX 10.20       OK       SunOS 4.1.3       OK
  13512.   HP-UX 8.00        OK       Tru64 UNIX 4.0E   ??
  13513.   IRIX 6.2          OK       Unixware 2.1      OK
  13514.   Linux (RH5.2)     OK       Unixware 7        OK
  13515.  
  13516. Peter E verifies good building on HP-UX 6-10.  22 Jul 99.
  13517. Gerry B verifies good building on Motorola SV/68 and SV/88.  22 Jul 99.
  13518.  
  13519. Moved a misplaced #endif to fix -DNOHELP builds.  ckuus2.c, 22 Jul 99.
  13520.  
  13521. Another IKSD fix from Jeff.  ckcpro.w, 22 Jul 99.
  13522.  
  13523. Parameterized the final piece of the time.h code.  ckcdeb.h, ckutio.c,
  13524. makefile, 22 Jul 99.
  13525.  
  13526. Added zcopy() for VMS (from Lucas Hart).  22 Jul 99.
  13527.  
  13528. Fixed some prompt stomping in VMS, at least ones I can reproduce.
  13529. ckvcon.c, 22 Jul 99.
  13530.  
  13531. Fixed Ctrl-\S (status report) in VMS CONNECT crashing C-Kermit (because
  13532. temp buf was too small).  Also added more info to report, as in UNIX.
  13533. ckvcon.c, 22 Jul 99.
  13534.  
  13535. Put lines around status display.  ckvcon.c, ckucns.c, ckucon.c, 22 Jul 99.
  13536.  
  13537. Discovered that VMS C-Kermit had no code to get the username.  This means
  13538. \v(user) never worked, sending username ahead on Telnet connections never
  13539. worked, etc.  Added a GETJPI call to VMS sysinit() to load uidbuf[].  Now
  13540. uidbuf[] has the username in it, and \v(user) is set correctly, but VMS
  13541. C-Kermit still doesn't send the username ahead on a Telnet connection.
  13542. ckvtio.c, 22 Jul 99.
  13543.  
  13544. Because VMS did not have the username defined, the SHOW CONNECTION display
  13545. was messed up.  Fixed dologshow() to handle empty fields better.  ckuus3.c,
  13546. 22 Jul 99.
  13547.  
  13548. VMS \v(tmpdir) had a slash at the end.  Fixed in ckuus4.c, 22 Jul 99.
  13549.  
  13550. Added -lresolve to dgux54420 target.  Makefile, 22 Jul 99.
  13551.  
  13552. There is still a lot of stuff in ckcdeb.h that depends on TCPSOCKET being
  13553. already defined.  All other versions (besides VMS) assume TCPSOCKET is defined
  13554. on the CC command line.  But in VMS, it is defined in ckcnet.h, after ckcdeb.h
  13555. is processed.  Changed the VMS build procedure to define TCPSOCKET if
  13556. net_option is not NONET.  ckvker.com, 22 Jul 99.
  13557.  
  13558. Defined CK_ENVIRONMENT for VMS so it can send the username ahead on Telnet
  13559. connections.  This also turns on a lot of other code for VMS that has never
  13560. been exercised before.  But it seems to work mostly OK -- e.g. interactions
  13561. with IKSD are as expected.  ckcdeb.h, 22 Jul 99.
  13562.  
  13563. From Jeff: Server-side support for Telnet New-Env USER variable.  Corrections
  13564. to zvpass() to properly handle Telnet Auth status reports.  Modifications to
  13565. Username and Password prompting to support username's transmitted by telnet
  13566. negotiation, anonymous logins, and null strings.  ckuus7.c ckufio.c ckcmai.c
  13567. ckctel.[ch] ckcpro.w, 22 Jul 99.
  13568.  
  13569. From Jeff: Modify use of "authentication failed" message when authentication
  13570. is rejected by the peer.  Move initialization of iksd prompt to dotakeini()
  13571. where we know that we are IKSD.  Add some "unsigned char" casts.  ckctel.c
  13572. ckcmai.c ckuus5.c ckuus7.c, 23 Jul 99.
  13573.  
  13574. Checked whether SUNWspro cc had a "consider all chars unsigned" option.
  13575. It doesn't.  23 Jul 99.
  13576.  
  13577. Added sunos41gsc entry that builds with gcc but omits the -funsigned-char
  13578. switch so I will see the signed-vs-unsigned char warnings that everybody else
  13579. complains about before they see them, and will use this one from now on.
  13580. makefile, 23 Jul 99.
  13581.  
  13582. Added -lresolv to all SunOS entries since somebody reported link-time
  13583. complaints even though I don't see them here.  Adding it does no harm here.
  13584. makefile, 23 Jul 99.
  13585.  
  13586. Redid shostk() to work in NOSPL builds.  Guarded all references to
  13587. trace-related variables with NOSPL.  Made Base-64 routines available to NOSPL
  13588. builds since they are also used by ckcnet.c.  ckclib.c, ckuus5.c, 23 Jul 99.
  13589.  
  13590. Removed redundant -DNOREALPATH from sys3upcxxx entries that call sys3upc.
  13591. Makefile, 23 Jul 99.
  13592.  
  13593. Jeff discovered that CHAR was typedef'd "char" (not "unsigned char") in VMS.
  13594. It's been that way probably forever, no doubt to suppress some compiler
  13595. warnings.  But this breaks some things at runtime, like certain Telnet
  13596. protocol operations.  Changed CHAR to be unsigned char for VMS.  This broke
  13597. compilation of lots of modules.  Added casts until it built cleanly with DECC.
  13598. Then tried it with VAXC...  OK.  Then on HP-UX 10.20 with the ANSI optimizing
  13599. compiler... OK.  And with gcc on UNIX without -funsigned-char...  OK.  So now
  13600. the user ID is sent if Telnet NEW-ENVIRONMENT is negotiated.  ckcdeb.h,
  13601. ckcnet.h, ckctel.c, ckcnet.c, ckvfio.c, 23 Jul 99.
  13602.  
  13603. Fixed new GETJPI code to not cut off username at 4 bytes.  ckvtio.c, 23 Jul 99.
  13604.  
  13605. Today's changes seem to fix another problem noticed yesterday: the VMS
  13606. C-Kermit Telnet client would often display the "login:" prompt as "olgin:".
  13607. Previously, this would happen about 25% of the time, but now I can't make it
  13608. happen at all (in about 50 trials).
  13609.  
  13610. Verified that the code works the same way in VMS 7.2 (which shows lowercase
  13611. usernames, etc) -- GETJPI still returns a 12-char field in uppercase.
  13612.  
  13613. Discovered that the REVIEW script, when given a list of filenames on the
  13614. command line, would get the array dimension wrong and so the filename array
  13615. would come out "off center" after sorting (the first filename would be null
  13616. and the last one would be skipped).  This is a long story.  The short version
  13617. is that when dogta() copied the \&_[] array when entering macro level 1 (0
  13618. based), it increased its dimension by 1.  I thought I had fixed this on 27
  13619. April, and again on 13 May, but this time I really did.  ckuus6.c, 23 Jul 99.
  13620.  
  13621. Authentication changes from Jeff.  ckcmai.c, ckuus7.c, ckuus4.c, ckctel.c,
  13622. ckcnet.c, 24 Jul 99.
  13623.  
  13624. Added debugging statements to rlogin code -- it seems in VMS we used to
  13625. lowercase the getenv("USER") name, but this doesn't help now because it is
  13626. overridden by the GETJPI name.  Changed the code to lowercase the name
  13627. if a global flag, ck_lcname, is set, and set this flag by default for VMS
  13628. only.  Now rlogin from VMS to UNIX works again.  ckcnet.c, 24 Jul 99.
  13629.  
  13630. Changed Telnet NEW-ENVIRONMENT to follow the same flag.  Now Telnet from
  13631. VMS to UNIX works as expected.  ckctel.c, 24 Jul 99.
  13632.  
  13633. Added system type and location to VMS sysinit() so now:
  13634. TELNET SENT SB NEW-ENVIRONMENT IS USER<SOH>fdcSYSTEMTYPE<SOH>VMS IAC SE
  13635. (location is not picked up because no LOCATION symbol is defined in VMS).
  13636. Verified that UNIX telnet server picks up and sets SYSTEMTYPE environment
  13637. variable to VMS.  ckvtio.c, 24 Jul 99.
  13638.  
  13639. Parameterized length of uidbuf[] with new symbol UIDBUFLEN, and changed all
  13640. references to specific lengths, like 64 or 63, to use this symbol, and all
  13641. strcpy's into this buf to be strncpy's.  For now the definition is still 64,
  13642. since I don't know of any platform that allows longer usernames.  ckcdeb.h
  13643. plus many modules, 24 Jul 99.
  13644.  
  13645. Adding TCPSOCKET to the VMS CC command line pushed the length of the command
  13646. line over the limit for MultiNet.  However, notes indicate that the limit
  13647. is arbitrarily chosen anyway, so I bumped it up by 9 characters, which does
  13648. not seem to have done any harm since MultiNet builds still work.  ckvker.com,
  13649. 24 Jul 99.
  13650.  
  13651. Added support for the ELSA MicroLink 56K modem, which uses the new standard
  13652. ITU-T V.250 (aka V.25ter) command set.  This is the first international
  13653. standard AT command set and presumably will be adopted by other modem makers
  13654. (especially since Microsoft is pushing it in PC98 follow-ons).  ckuusr.h,
  13655. ckudia.c, 24 Jul 99.
  13656.  
  13657. Added support for generic ITU-T V.250, slightly different from Microlink
  13658. (strictly by the book, no Microlink extensions).  This one is also included
  13659. in MINIDIAL builds.  Also fixed some #ifdefs for MINIDIAL.  The keyword is
  13660. "itu-t-v25ter/v250" with an invisible alias of "itu-t-v250".  ckuusr.h,
  13661. ckudia.c, 24 Jul 99.
  13662.  
  13663. In yesterday's CHAR/char orgy, I missed one spot, which broke no-net builds
  13664. with ANSI compilers (the declaration of nettoc() in the #ifndef NETCONN
  13665. section).  Fixed in ckcnet.c, 24 Jul 99.
  13666.  
  13667. Added more casts to networking code to suppress HP-UX ANSI compiler warnings.
  13668. rlog_ini(): ckcnet.c, 24 Jul 99.
  13669.  
  13670. A few days ago Peter E reported some craziness with new file i/o package on
  13671. HP-UX 7, in which it was very confused about what the maximum number of
  13672. channels could be.  This was due to (a) overconservativeness in calculating
  13673. the maximum number (choosing the smaller, rather than larger, of several
  13674. possibilities when the larger was more likely to be accurate, having come
  13675. from sysconf()), and (b) then ignoring the value we had just calculated
  13676. (i.e. comparing channel numbers against the fixed symbol Z_MAXCHAN rather
  13677. than the variable z_maxchan).  Fixed in ckuus7.c, 24 Jul 99.
  13678.  
  13679. ADD SEND-LIST parsed its final field (as-name) with cmtxt() and then called
  13680. cmcfm().  I changed the cmtxt() call to cmfld().  ckuusr.c, 24 Jul 99.
  13681.  
  13682. Lucas H noticed that ADD SEND-LIST <wildcard> TEXT would forget about the
  13683. TEXT part after sending the first file that matched the wildcard.  Fixed in
  13684. gnfile(): ckcfns.c, 24 Jul 99.
  13685.  
  13686. However, this reveals a bigger problem: when a wildcard is given in a
  13687. SEND-LIST, there's no way to specify automatic type switching while sending
  13688. the files.  This is a hard one, so deferred -- nobody has ever mentioned it,
  13689. and there are obvious workarounds, especially now with regular expressions.
  13690. Documented in ckcbwr.txt.  24 Jul 99.
  13691.  
  13692. Made "if ==" an invisible synonym for "if =".  ckuus6.c, 24 Jul 99.
  13693.  
  13694. Added IF COMMAND and IF FLOAT.  ckuusr.[ch], ckuus2.c, 24 Jul 99.
  13695.  
  13696. Added \v(cx_time) = elapsed time in session (i.e. since making current
  13697. connection, if any, otherwise 0).  ckuusr.h, ckuus[345].c, 24 Jul 99.
  13698.  
  13699. From Jeff: fix a misplaced #ifdef in the file code; some authentication
  13700. changes.  ckcmai.c, ckuus7.c, 25 Jul 99.
  13701.  
  13702. Changed floating-point functions to treat missing or empty arguments as 0.
  13703. ckuus4.c, 25 Jul 99.
  13704.  
  13705. Fixed IF FLOAT parsing when given a variable with no value.  ckuus6.c,
  13706. 25 Jul 99.
  13707.  
  13708. Noticed that elapsed time of connection was often wrong.  To avoid having to
  13709. put dologxxx() calls throughout setlin(), I had placed them after the calls to
  13710. setlin().  This was a good idea except that setlin() can call doconect()
  13711. (e.g. if command was TELNET, or if /CONNECT switch was included), and
  13712. therefore setlin() might not return for hours, in which case the log entry
  13713. would not include the duration of the first (and perhaps only) CONNECT
  13714. session.  So I moved the dologxxx() calls to the appropriate places in
  13715. setlin(), which wasn't so bad after all (since they only needed to go in those
  13716. places where setlin() returns successfully after making a connection, but
  13717. before any call do doconect()).  ckcmai.c, ckuus[37].c, 25 Jul 99.
  13718.  
  13719. Noticed that connections made by command-line options did not start the
  13720. connection log & timer.  Fixed in ckuusy.c, 25 Jul 99.
  13721.  
  13722. Realized it's not very helpful to have \v(cx_time) return 0 when there is no
  13723. active connection, so made it (and SHOW CONNECTION) show the elapsed time of
  13724. the most recent session.  ckuus[34].c, 25 Jul 99.
  13725.  
  13726. Finally, to make the connection log useful on multiprocessing systems, it was
  13727. necessary to not keep it open all the time.  This way, multiple sessions can
  13728. write to the same connection log.  LOG CONNECTION opens the log in the
  13729. requested mode (new, append) and closes it right away (this is mainly so it
  13730. can fail intelligently in case the log can't be opened).  Then, whenever a
  13731. session ends, dologend() opens it again (but this time in append mode, no
  13732. matter what mode the user chose), writes the record, and closes it.
  13733. Collisions are still possible, but in UNIX at least, there is no mechanism for
  13734. opening the file in shared mode -- presumably sharing is allowed and you have
  13735. to go out of your way to prevent it (e.g. with flock()).  In any case, logging
  13736. from multiple sessions seems to work fine now on both UNIX and VMS (and it
  13737. definitely did not before today), as does syslogging on UNIX (after some minor
  13738. tweaking).  ckuus[34].c, ckufio.c, 25 Jul 99.
  13739.  
  13740. So now we have a reliable session-time indicator.  Added session time (and
  13741. some other info) to the CONNECT-mode status display.  It could also be used
  13742. anywhere else -- e.g. in the K95 status line (if there were room).  The way
  13743. to get it is:
  13744.  
  13745.   char * p = NULL;
  13746.   long t = dologshow(0);       ; Seconds
  13747.   if (t > -1L) p = hhmmss(t);  ; Converted to hh:mm:ss
  13748.  
  13749. ckucns.c, ckucon,c, ckvcon.c, 25 Jul 99.
  13750.  
  13751. SET TRANSFER DISPLAY BRIEF, in its summary line, did not deduct the refused
  13752. files from the total number of files transferred.  Fixed in ckuusx.c, 25 Jul
  13753. 99.
  13754.  
  13755. Removed a spurious printf() from REMOTE QUERY left behind from a debugging
  13756. session.  Suppressed gratuitous echoing of QUERY result when not at top level.
  13757. ckuus7.c, 25 Jul 99.
  13758.  
  13759. A fix from Jeff from IKSD login.  ckuus7.c, 25 Jul 99.
  13760.  
  13761. Discovered that SHIFT did not work when given within a FOR or WHILE loop
  13762. when referencing command-line arguments.  Fixed in doshift(): ckuus5.c,
  13763. 26 Jul 99.
  13764.  
  13765. Got rid of "Interrupt during initialization or command-line processing.
  13766. C-Kermit quitting..." message when a Kerbang script is interrupted.  ckcmai.c,
  13767. 26 Jul 99.
  13768.  
  13769. OS-9 fixes from Martin Whitaker.  ckcdeb.h, ckucmd.c, ckuus[6x].c, 26 Jul 99.
  13770.  
  13771. Cleanup of overuse of variable "x" in setlin() from Jeff.  ckuus7.c, 26 Jul 99.
  13772.  
  13773. Fixed number-of-modems definition in ckuusr.h (forgot to update it for
  13774. ITU-T V.250).  26 Jul 99.
  13775.  
  13776. Fixed ITU-T V.250 commands that include multiple "extended commands" to
  13777. separate them with semicolon (V.250 5.4.5.1).  ckudia.c, 26 Jul 99.
  13778.  
  13779. New VMS build procedure from Dave Sneddon, accounts for UCX 5.0.
  13780. ckvker.com, 26 Jul 99.
  13781.  
  13782. Made sure that --syslog: on command line doesn't affect syslogging when
  13783. C-Kermit was built with -DSYSLOGLEVEL=x (the code was already there).
  13784. 27 Jul 99.
  13785.  
  13786. Added a new target to support building IKSD on Unixware7 (needs shadow
  13787. passwords) from Jim Whitby.  27 Jul 99.
  13788.  
  13789. Mike Freeman reported that VMS C-Kermit crashed when given a REMOTE HOST
  13790. command.  Problem: the new timed reads that were added to handle the keepalive
  13791. for long-running host commands.  Kermit crashes in the sys$synch(QIOW_EFN)
  13792. call on the VAX but not on the Alpha.  "help system $synch" on the Alpha says
  13793. this call takes a 64-bit arg on the Alpha only, but only looks at the lower
  13794. byte; it doesn't say this on the VAX.  But I doubt that's the problem -- it
  13795. might be a missing second arg, but I can't tell.  Sent email to Lucas about it
  13796. and undefined PIPETIMER on the VAX in the meantime.  ckvfio.c, 27 Jul 99.
  13797.  
  13798. Peter E complained that the following sequence:
  13799.  
  13800.   set modem type xxx
  13801.   set line /dev/cua0
  13802.   set flow none (or anything else)
  13803.   ...
  13804.   set modem type yyy
  13805.  
  13806. undoes the "set flow" command.  But... if the user gave a SET FLOW command,
  13807. they probably meant it, and it should be sticky at least until the device
  13808. changes.  So now any SET FLOW command (except AUTO, which is the default)
  13809. sets autoflow to 0, but any SET LINE/HOST/PORT or TELNET/RLOGIN/etc command
  13810. sets it back to 1 so appropriate flow control can be selected for the new
  13811. device/connection.  ckuus[37].c, 27 Jul 99.
  13812.  
  13813. Lucas got back with a fix for the sys$synch() call, so REMOTE HOST (with
  13814. keepalive) works again on both VAX and Alpha.  But it's very slow (VERY slow)
  13815. -- I didn't notice this before.  Sent more mail to Lucas.  In the worst case
  13816. we can always back off.  ckvfio.c, 27 Jul 99.
  13817.  
  13818. Peter E noticed that DIR with no switches was like DIR /FILES, when it was
  13819. supposed to be like DIR /ALL.  The problem was in the _CMIFI entry of the
  13820. initial FDB (before any switches were parsed).  Fixed in domydir(), ckuus6.c,
  13821. 27 Jul 99.
  13822.  
  13823. From Jeff: SET TELNET BUG SB-IMPLIES-WILL-DO to cope with broken UCX 5.0
  13824. Telnet server (client sends WILL TERM-TYPE, server sends SB without first
  13825. sending DO, but client is still waiting for DO).  Also various compiler
  13826. warning-avoidance and authorization fixes.  Also cleaned-up code for sending
  13827. NEW-ENVIRONMENT fields.  ckctel.[ch], ckuus[2347].c, ckufio.c, 28 Jul 99.
  13828.  
  13829. Added NOSHOW protection around references to SHOW ARRAY in ckuusr.c.
  13830. 28 Jul 99.
  13831.  
  13832. Fixed an unguarded reference to query.  ckcnfs.c, 28 Jul 99.
  13833.  
  13834. Fixed unguarded refs to dolognet().  ckuus7.c, 28 Jul 99.
  13835.  
  13836. Added SET SERVER KEEPALIVE { ON, OFF } to control the keepalive feature;
  13837. needed for VMS (unless we can get get_subroc_line() fixed), because of how
  13838. it slows down the response to host commands.  ckuusr.h, ckuus[235].c,
  13839. ck[uv]fio.c, 28 Jul 99.
  13840.  
  13841. Moved hhmmss() and parnam() from ckuusx.c to ckclib.c so ck?[tf]io.c routines
  13842. could use them without having to haul in ckuusr.h.  ckuusx.c, ckuusr.h,
  13843. ckclib.[ch], 28 Jul 99.
  13844.  
  13845. Added doiksdinit() to execute the iksd.conf file if -A given on command line,
  13846. just after ttopen() and socket setup, but before authentication begins.
  13847. ckcdeb.h, ckcmai.c, ckuus5.c, iksd.txt, 28 Jul 99.
  13848.  
  13849. Yesterday's fix for SET FLOW was not in exactly the right place.  Moved it
  13850. to a better place and now it works as advertised.  ckuus3.c, 28 Jul 99.
  13851.  
  13852. Added SET AUTH { K4, K5 } PROMPT { PASSWORD, PRINCIPAL }, parsing only.
  13853. Compiles OK but I couldn't test because link fails on ck_krb4_realmofhost.
  13854. Also SET TELNET PROMPT-FOR-USERID.  ckuusr.h, ckuus3.c, 28 Jul 99.
  13855.  
  13856. Fixes from Jeff for Kerberos builds plus filling in the action portions of the
  13857. new SET ... PROMPT commands, plus HELP text for them.  ckuath.c ckuus2.c
  13858. ckuus3.c ckuus7.c ckuusr.h, 29 Jul 99
  13859.  
  13860. Made sure that the following builds worked OK: NONET, NOSHOW, NODIAL, NOHELP,
  13861. NOSPL, NOICP. NOPUSH, NOCSETS, NOLOCAL, MINIDIAL.  A fair amount of work was
  13862. needed to get NOICP builds working again, including a NOICP version of
  13863. readpass(), in case anybody ever wanted to build a command-line-only C-Kermit
  13864. that included authentication, plus the expected #ifdef shuffling in ckcdeb.h,
  13865. etc.  Plus more char/CHAR silliness in ckcnet.c.  Also needed to move several
  13866. routines out of the NOLOCAL section to make the NOLOCAL version link.  Many
  13867. modules, 29 Jul 99.
  13868.  
  13869. Also checked builds on:
  13870.  AIX 4.1:              OK
  13871.  AIX 4.3.2:            OK
  13872.  BSDI 3.1:             OK
  13873.  HP-UX 8.00 no ANSI:   OK
  13874.  HP-UX 9.00 ANSI:      OK
  13875.  HP-UX 9.00 no ANSI:   OK
  13876.  HP-UX 10.20 ANSI:     OK
  13877.  HP-UX 10.20 No ANSI:  OK
  13878.  IRIX 6.2:             OK
  13879.  Linux (RH5.2):        OK
  13880.  Ditto + Kerberos 5:   OK
  13881.  Ditto + Kerberos 4&5: OK
  13882.  SCO 3.2v4.2 cc:       OK (net and nonet)
  13883.  SCO 3.2v4.2 gcc:      OK (net and nonet)
  13884.  SINIX 5.42:           OK
  13885.  Solaris 2.4 cc:       OK
  13886.  Solaris 2.5.1 gcc:    OK
  13887.  Solaris 7 cc:         OK
  13888.  Unixware 2.1.3:       OK
  13889.  Unixware 7:           OK
  13890.  VMS/Alpha/DECC/UCX:   OK
  13891.  VMS/Alpha/DECC/Nonet: OK
  13892.  VMS/VAX/VAXC/UCX:     OK
  13893.  VMS/VAX/VAXC/Nonet:   OK
  13894.  
  13895. From Jeff: check prompt strings to make sure they use the proper
  13896. number and type of % fields.  ckuus3.c, 29 Jul 99.
  13897.  
  13898. From Jeff:  Add color to the prompts.  I use the status line color.
  13899. ckuus7.c, 29 Jul 99.
  13900.  
  13901. Two corrections to tx_cp437(): a-tilde goes to 'a', not 'e', and
  13902. Black Square maps to 254, not "unknown".  ckouni.c, 29 Jul 99.
  13903.  
  13904. Fixes for get_subroc_line() from Lucas Hart -- major speedup.  ckvfio.c,
  13905. 29 Jul 99.
  13906.  
  13907. Discovered two entries were missing from the xlr[] table at the end of
  13908. the Latin/Cyrillic section (4,43 and 4.44).  ckuxla.c, 30 Jul 99.
  13909.  
  13910. Added support for Unicode / ISO-10646 in two forms, UCS-2 and UTF-8, Level 1
  13911. (no combining characters, no Jamos), each of them as both File and Transfer
  13912. Character Sets.  This works only for file transfer so far, not CONNECT,
  13913. TRANSMIT, TRANSLATE, etc.  There are still many loose ends, but nothing to
  13914. prevent including it in Beta.09 and the final 7.0.  Practically all modules
  13915. were touched.  Detailed notes in a separate file, unicode.txt.
  13916. 31 Jul - 1 Aug 99.
  13917.  
  13918. Fixes from Jeff to weekend's Unicode work for K95, plus some authentication
  13919. changes.  ckuus7.c ckuath.c ckuus5.c ckuus3.c ckuus4.c ckcuni.h ckuxla.c
  13920. ckcuni.c ckuath.h ckouni.c ckcnet.c, 2 Aug 99.
  13921.  
  13922. Separated UNICODE and CKOUNI, which were previously synonyms.  Now CKOUNI is
  13923. defined only for K95.  ckcxla.h, 2 Aug 99.
  13924.  
  13925. Fixed a couple places where xpnbyte() did not return a value.  In fact, a lot
  13926. of yesterday's work on on this function seems to have been lost -- I must have
  13927. been editing the wrong copy, or copied the wrong file or something...
  13928. Reconstructed the lost work, ran all the tests again, still OK.  ckcfns.c, 2
  13929. Aug 99.
  13930.  
  13931. Changed unknown-char symbol when translating from Unicode to a single-byte
  13932. character set from Ctrl-G to the customary question mark.  ckcfns.c, 2 Aug 99.
  13933.  
  13934. Added #ifdefs needed to fix NOCSETS builds.  ckcfns.c, 2 Aug 99.
  13935.  
  13936. Added Unicode support to the TRANSLATE command.  This required some creative
  13937. retooling of xgnbyte() into a more-or-less general-purpose routine that works
  13938. for both file transfer and other kinds of translations, and hopefully can be
  13939. used by TRANSMIT and CONNECT.  ckcfns.c, ckuus4.c, 2 Aug 99.
  13940.  
  13941. Code for K95 popup prompts from Jeff, plus some typos fixed, plus some auth
  13942. stuff.  ckuus7.c ckuath.c ckuus3.c ckouni.c, 3 Aug 99.
  13943.  
  13944. Added /POPUP switch to ASK[Q].  ckuus6.c, 3 Aug 99.
  13945.  
  13946. Fixed K95 parsing of SET TERM {REMOTE,LOCAL}-CHAR LATIN1 and NEXT.  ckcuni.c,
  13947. 3 Aug 99.
  13948.  
  13949. Removed SET TERM CHAR { UCS2, UTF8 } from non-K95 SET TERM CHAR tables (since
  13950. there is no supporting code yet), and made SET { FILE,XFER } CHAR { UCS2,UTF8 }
  13951. invisible.  ckuxla.c, 3 Aug 99.
  13952.  
  13953. Fixed SHOW CONNECTION message in the no-connection case. ckuus[r3].c, 3 Aug 99.
  13954.  
  13955. For local reasons, we had to cut off development here and put Beta.09 together
  13956. without the complete Unicode implementation.  So now to repeat the testing
  13957. from several days ago.  Configuration options:
  13958.  
  13959.   Full Unix..ok (SunOS, Unixware 7)
  13960.   Full VMS...ok (Alpha / VMS7.2 / DECC)
  13961.   NoNet VMS..ok (ditto)
  13962.   Krb4.......ok (SunOS)
  13963.   Krb5.......ok (Linux)
  13964.   Krb4+Krb5..ok (Linux)
  13965.   NOUNICODE..ok
  13966.   NOCSETS....ok
  13967.   NONET......ok
  13968.   NOLOCAL....ok
  13969.   NODIAL.....ok
  13970.   MINIDIAL...ok
  13971.   NOSPL......ok
  13972.   NOICP......ok
  13973.   NOSHOW.....ok
  13974.   NOHELP.....ok
  13975.   NOPUSH.....ok
  13976.  
  13977. Some shuffling of #ifdefs and declarations was needed, as usual, to get all
  13978. of these working again.
  13979.  
  13980. Fixed a bogus 5-hex-digit hex case label in tx_lucidasub(). ckcuni.c, 3 Aug 99.
  13981.  
  13982. Changed ASK/ASKQ to evaluate variables in prompt string.  doask(): ckuus6.c,
  13983. 3 Aug 99.
  13984.  
  13985. Added CKCUNI to VMS build procedure.  ckvker.com, ckvker.mms, 3 Aug 99.
  13986.  
  13987. Commented out the questionable section in ucs2_to_utf8() that compares an
  13988. unsigned short with all sorts of 32-bit hex constants, since almost every
  13989. compiler complains about it, and it doesn't do anything useful anyway (we
  13990. don't support UCS-4 yet; when we do we can change the parameter with which
  13991. ucs2_to_utf8() is called from USHORT to UINT, and for that matter drop the
  13992. "2" from the name).  ckcuni.c. 3 Aug 99.
  13993.  
  13994. Fixed UNICODE defines so they are executed only for UNIX and VMS, since the
  13995. other platforms don't have their build procedures adjusted yet to include the
  13996. new modules and dependencies.  ckcxla.h, 3 Aug 99.
  13997.  
  13998. From Jeff: change: "int ttnproto = NP_NONE;" to "int ttnproto = NP_DEFAULT;"
  13999. in ckcnet.c, so "kermit -J host" will work.  ckcnet.c, 3 Aug 99.
  14000.  
  14001. OK, now starts the build-all...
  14002.  
  14003. VMS 5.5 DECC build barfs on #include <conv$routines.h> (file doesn't exist).
  14004. Tried again with VAXC.  This one choked on memmove.  Commented out the
  14005. #include (actually put it #ifndef BUGFILL7) and went back to DECC.  This will
  14006. have to be cleaned up later...
  14007.  
  14008. A few last-minute K95 fixes & changes from Jeff (including /POPUP for the
  14009. AUTHENTICATE commands).  ckcxla.h, ckuus7.c, ckuusr.c.  3 Aug 99.
  14010.  
  14011. ---Beta.09---
  14012. ---1.1.18-CU---
  14013.  
  14014. From Jeff:
  14015.  . Changed ckcssl.h to ck_ssl.h to prevent copying by ck[cu]*...
  14016.  . Verified authentication engine against 3rd authentication servers & clients.
  14017.  . Made sure that IKSD sets the socket options appropriately at startup.
  14018.  . Made sure that platform-specific variables are not exposed to guests.
  14019.  . Prevent deadlocks with TELNET WAIT and encryption.
  14020.  
  14021. New OS-9 makefile from Martin Whitaker, adds ckcuni.[ch].  10 Aug 99.
  14022.  
  14023. Fixed some #ifdefs in SHOW EXTENDED-OPTIONS to allow building with -DNOLOGIN.
  14024. ckuus5.c, 10 Aug 99.
  14025.  
  14026. Added a byte-order test to main() start sequence and added byte order display
  14027. to SHOW FEATURES.  ckcmai.c, ckuus5.c, 10 Aug 99.
  14028.  
  14029. Changes from Jeff for SRP, separate conditionalization of iksd.conf, comments
  14030. & placeholders in telnet & crypto modules, fixes to gtword() to be more
  14031. tolerant when Telnet server of misbehaving clients (e.g. that send bare CR),
  14032. problems with DNS lookups on DU 4.0B caused by sign extension.  ck_crp.c
  14033. ckcmai.c ckcnet.c ckcssl.h ckctel.h ckouni.c ckuath.c ckucmd.c ckuus5.c
  14034. makefile, 11 Aug 99.
  14035.  
  14036. Hoping to stifle the avalanche of compiler warnings on Multinet builds that
  14037. we've been getting since Beta.07, reorganized the VMS section of ckcnet.h to
  14038. have #ifdef..#else structure, so each product section is mutually exclusive.
  14039. I didn't expect it to help and it didn't.  Eventually (long story skipped) it
  14040. turned out that the #include <if.h> that was added to ckcdeb.h to pick up the
  14041. u_int typedef for UCX 5.0 was forcing the Multinet <socket.h> to be skipped,
  14042. so the cure was to put #ifndef MULTINET around #include <if.h>.  This fixes
  14043. all Multinet builds without breaking UCX or others.  The critical hint was
  14044. from Hunter Goatley: use /LIST/SHOW=INCLUDE.  Built and replaced all of the
  14045. Multinet binaries.  ckcdeb.h, 11 Aug 99.
  14046.  
  14047. Changed the VMS build procedure to define IF_DOT_H only for UCX.  Not only do
  14048. we not use this symbol any more outside of UCX, but also it made the Multinet
  14049. CC command line too long.  ckvker.com, 11 Aug 99.
  14050.  
  14051. Added SET FILE UCS BYTE-ORDER { BIG-ENDIAN, LITTLE-ENDIAN }, \v(byteorder),
  14052. SET RECEIVE UCS BOM { ON, OFF } (parsing only).  ckuusr.h, ckcker.h,
  14053. ckuus[37].c, ckuxla.c, 11 Aug 99.
  14054.  
  14055. Filled in \v(byteorder) action.  Returns 0=BE, 1=LE.  ckuus4.c, 11 Aug 99.
  14056.  
  14057. Added union ckshort definition to ckcdeb.h, 11 Aug 99.
  14058.  
  14059. Added preliminary UCS byte-swapping code to xpnbyte().  Compiles OK but is
  14060. totally untested.  ckcfns.c, 11 Aug 99.
  14061.  
  14062. From Jeff:
  14063.  . Updated SSL support for OpenSSL 0.9.4
  14064.  . Moved iksdconf stuff to a more correct location in main()
  14065.  . Made set telopt /server the default when running as IKSD
  14066.  . DU 4.0 inet_addr() thing
  14067. ckcnet.[ch] ckuus3.c ckcmai.c ckuus5.c ck_ssl.h ckuath.c makefile, 11 Aug 99.
  14068.  
  14069. Fixed long lines in ckuath.c, 11 Aug 99.
  14070.  
  14071. Changed the minor edit number from 195 to 196 since we had a private
  14072. Columbia-only release.  ckcmai.c, 11 Aug 99.
  14073.  
  14074. More changes from Jeff, mostly for the DU4.0 inet_addr() business.  ckuus7.c
  14075. ckcnet.c ckuath.c ckcfns.c ckuus3.c ckcnet.h, 12 Aug 99.
  14076.  
  14077. Fixed long lines in ckuath.c again, 12 Aug 99.
  14078.  
  14079. While I was messing with Unicode support, file transfers started failing for
  14080. no apparent reason.  The debug log showed it was because we were calling
  14081. ttinl() with a timeout even though we were streaming.  Why?  Somehow timint
  14082. was getting set to a positive number.  I'm not going to worry about it now --
  14083. I just changed the "just in case" test in rpack() prior to calling ttinl() to
  14084. also check for streaming.  (Actually this was a false alarm -- the real
  14085. problem was a forgotten kermit-in-the-middle -- but the change seems like a
  14086. good idea anyway...)  ckcfn2.c, 12 Aug 99.
  14087.  
  14088. OK, back to Unicode...  Discovered that an #endif was misplaced by one line
  14089. in ucs2_to_utf8(), totally breaking it.  Therefore translation of UCS-2 to
  14090. UTF-8 won't work in K95 1.1.18-CU.  I doubt anybody will notice since (a)
  14091. the file-transfer keywords are invisible, (b) Unicode file-transfer support
  14092. is undocumented, and (c) they'll probably never type an accented or non-Roman
  14093. character natively (the Compose key still works).  But oops, my fault.  Fixed
  14094. in ckcuni.c, 12 Aug 99.
  14095.  
  14096. Added UCS-2 byte-swapping for the file receiver.  This turned out to be easier
  14097. than I thought, although it took some time to realize it.  UCS-2 characters
  14098. are (and must be) kept in native order internally, otherwise translation
  14099. functions (tables, switch statements, etc) don't work.  Therefore bytes are
  14100. swapped only when (a) incoming TCS is UCS-2 (Big Endian by definition) and
  14101. receiving machine is Little Endian, or (b) writing out to a UCS-2 file and the
  14102. user has specified the opposite endianness of the underlying machine.  Also we
  14103. add or don't add the appropriate BOM according to the user's FILE UCS BOM
  14104. { ON, OFF } setting.  xpnbyte(): ckcfns.c, 12 Aug 99.
  14105.  
  14106. Changed setxlatype() to NOT set XLA_NONE when Unicode is involved, even if
  14107. the TCS and FCS are the same, since we might also need to deal with byte
  14108. swapping and BOMs.  ckuxla.c, 12 Aug 99.
  14109.  
  14110. Made sure that every conceivable combination works:
  14111.  
  14112.        From To   TCS      FCS    BOM  Order
  14113.   [ok] Sun  PC   Latin-1  UCS-2  On   Default  (FFFE, A<NUL>)
  14114.   [ok] Sun  PC   Latin-1  UCS-2  On   BE       (FEFF, <NUL>A)
  14115.   [ok] Sun  PC   Latin-1  UCS-2  On   LE       (FFFE, A<NUL>)
  14116.   [ok] Sun  PC   Latin-1  UCS-2  Off  Default  (A<NUL>)
  14117.   [ok] Sun  PC   Latin-1  UCS-2  Off  BE       (<NUL>A)
  14118.  
  14119.   [ok] Sun  PC   UTF-8    UCS-2  On   LE       (FFFE, A<NUL>)
  14120.   [ok] Sun  PC   UTF-8    UCS-2  On   BE       (FEFF, <NUL>A)
  14121.   [ok] Sun  PC   UTF-8    UCS-2  Off  BE       (<NUL>A)
  14122.   [ok] Sun  PC   UTF-8    UCS-2  Off  LE       (A<NUL>)
  14123.  
  14124.   [ok] Sun  PC   UCS-2    UCS-2  On   LE       (FFFE, A<NUL>)
  14125.   [ok] Sun  PC   UCS-2    UCS-2  On   BE       (FEFF, <NUL>A)
  14126.   [ok] Sun  PC   UCS-2    UCS-2  Off  BE       (<NUL>A)
  14127.   [ok] Sun  PC   UCS-2    UCS-2  Off  LE       (A<NUL>)
  14128.  
  14129.   [ok] PC   Sun  Latin-1  UCS-2  On   Default  (FEFF, <NUL>A)
  14130.   [ok] PC   Sun  Latin-1  UCS-2  On   BE       (FEFF, <NUL>A)
  14131.   [ok] PC   Sun  Latin-1  UCS-2  On   LE       (FFFE, A<NUL>)
  14132.   [ok] PC   Sun  Latin-1  UCS-2  Off  LE       (A<NUL>)
  14133.   [ok] PC   Sun  Latin-1  UCS-2  Off  BE       (<NUL>A)
  14134.  
  14135.   [ok] PC   Sun  UTF-8    UCS-2  On   BE       (FEFF, <NUL>A)
  14136.   [ok] PC   Sun  UTF-8    UCS-2  On   LE       (FFFE, A<NUL>)
  14137.   [ok] PC   Sun  UTF-8    UCS-2  Off  LE       (A<NUL>)
  14138.   [ok] PC   Sun  UTF-8    UCS-2  Off  BE       (<NUL>A)
  14139.  
  14140.   [ok] PC   Sun  UCS-2    UCS-2  On   BE       (FEFF, <NUL>A)
  14141.   [ok] PC   Sun  UCS-2    UCS-2  On   LE       (FFFE, A<NUL>)
  14142.   [ok] PC   Sun  UCS-2    UCS-2  Off  LE       (A<NUL>)
  14143.   [ok] PC   Sun  UCS-2    UCS-2  Off  BE       (<NUL>A)
  14144.  
  14145. Changed SET RECEIVE UCS BOM { ON, OFF } to SET FILE UCS BOM { ON, OFF }.
  14146. ckuusr.h, ckuus7.c, 13 Aug 99.
  14147.  
  14148. Jeff changed zmchout() calls in ckcfns.c to pnbyte() to solve a problem with
  14149. IKSD's execution of REMOTE commands.  But that's not right.  First of all a
  14150. lot of stuff is done twice this way (ffc incrementing, crc calculating, etc),
  14151. but mainly it's way too expensive.  zmchout() is a highly efficient macro;
  14152. doing a function call on every character should be avoided whenever possible.
  14153. We can look at this next week.
  14154.  
  14155. Also some changes to ckuath.c from Jeff.  Fixed long lines, plus a typo
  14156. (the word "NULL" was broken in half around line 5382).  13 Aug 99.
  14157.  
  14158. From Jeff:
  14159.  . A new approach to handling the issues related to OS/2 and zmchout() in
  14160.    ckcfns.c  I just placed the conoc() calls in [b]decode as an if else
  14161.    statement.
  14162.  . Renamed:  SET TELNET TRANSFER-MODE to SET TELNET BINARY-TRANSFER-MODE
  14163.  . Added:  SET TELNET AUTH {HOW-FLAG, ENCRYPT-FLAG} to specify which
  14164.    values for the authentication type modifier should be accepted or
  14165.    offered.  Primarily for debugging but it does have the ability to be
  14166.    used to require a mutually authenticated session.
  14167. ckuus2.c, ckcfns.c, ckuath.c, ckuus3.c, ckuusr.h, ckctel.h, ckctel.c,
  14168. ckcpro.w, ckuus4.c, 15 Aug 99.
  14169.  
  14170. From Jeff:
  14171.  . Discovered that OpenSSL is broken on SunOS.  Built OpenSSL on linux.
  14172.    Added SSL/TLS support to our multi-authentication mechanism build.  So
  14173.    now yclept's IKSD has K5, K4, SRP, and SSL/TLS.
  14174.  . Fixed the test for determining when SRP authentication has completed.
  14175.  . Don't attempt to display the SSL/TLS shared cipher list on the client.
  14176. ckcnet.c ck_ssl.h makefile ckufio.c ckuath.c, 15 Aug 99.
  14177.  
  14178. Added UCS settings to SHOW FILE.  ckuus4.c, 15 Aug 99.
  14179.  
  14180. Added support for UCS-2 byte swapping to the file sender.  The source file's
  14181. BOM, if any, takes precedence.  If it's FFFE, then we swap.  If there is a BOM
  14182. (either FEFF or FFFE), we discard it.  If there is no BOM, we swap if SET FILE
  14183. UCS BYTE-ORDER is opposite from the machine's native byte order.  After
  14184. reading a UCS-2 character and possibly swapping according to these rules, we
  14185. assume that the character is in native UCS-2 unsigned short format, and use it
  14186. that way in conversions, etc.  Of course if there is no BOM and the user
  14187. commands us to use the wrong byte order, the results are junk.  xgnbyte():
  14188. ckcfns.c, 15 Aug 99.
  14189.  
  14190. Tested by sending 4 files in text mode with FCS == TCS == UCS-2 and SET FILE
  14191. UCS BYTE-ORDER BIG-ENDIAN and LITTLE-ENDIAN from both Sparc (BE) and PC (LE),
  14192. and looking at the packet logs:
  14193.  
  14194.  Machine:              Sparc...    Linux PC
  14195.  SET FILE UCS BYTE:    BE    LE    LE    BE
  14196.                        --------------------
  14197.  1. ucs2be+bom.txt     ok    ok    ok    ok     BOM takes precedence
  14198.  2. ucs2le+bom.txt     ok    ok    ok    ok     BOM takes precedence
  14199.  3. ucs2be-bom.txt     ok    XX    XX    ok     Setting takes precedence
  14200.  4. ucs2le-bom.txt     XX    ok    ok    XX     Setting takes precedence
  14201.  
  14202. So all combinations work (XX means we lied about the byte order and so the
  14203. bytes were reversed in the packet).  Results are consistent when the transfer
  14204. charset is Latin-1.
  14205.  
  14206. Next I added some rather crude code to handle CRLF/LF/CR conversion to/from
  14207. packets when the TCS is UCS-2.  In this case we need #@#M#@#J in the packet,
  14208. with appropriate conversions from/to the file character set.  This will no
  14209. doubt need some refinement.  In fact, it really strains the current model
  14210. which is a poor design.  The right way to handle line termination is to have
  14211. a line-oriented system-dependent file reader that returns each line *without*
  14212. its terminator.  Then the high-level code can simply tack CRLF onto the end
  14213. (or in this case NUL CR NUL LF), rather than worry about what platform it's
  14214. running on and what the previous and next chars are, etc.  ckcfns.c, 15 Aug 99.
  14215.  
  14216. Fixed the TRANSLATE command to account for byte order and to follow the FILE
  14217. UCS settings.  ckcfns.c, ckuus4.c, 15 Aug 99.
  14218.  
  14219. Some changes from Jeff.  ckuus3.c, ckuath.c, 16 Aug 99.
  14220.  
  14221. Added COPY /SWAP-BYTES <sourcefile> <destfile>.  ckuus6.c, 16 Aug 99.
  14222.  
  14223. Verified that when using UCS-2 or UTF-8 as a transfer character set, it's OK
  14224. to break a code sequence between packets.
  14225.  
  14226. Fixed UNIX CONNECT module to not translate incoming characters when
  14227. transparent print was active.  ckucns.c, 16 Aug 99.
  14228.  
  14229. Updated HP-UX 6 and 7 targets from Peter E.  makefile, 17 Aug 99.
  14230.  
  14231. From Jeff, 20 Aug 99:
  14232.  . Fix \fword()/\fsplit() return value.  ckuus4.c.
  14233.  . Added ckgetlocalipaddrs() (but there is already a
  14234.    getlocalipaddr(), and some compilers/linkers might not support
  14235.    distinctions past the 14th character...)  ckcnet.[ch].
  14236.  . Added code for Kerberos check IP addresses: ckuusr.h, ckuus[37].c.
  14237.    (Changed "checkaddrs" to "check-address").
  14238.  . New ckuath.c (fixed long lines).
  14239.  . New cmdgetc(), not static any more. ckucmd.[ch].  Fixes problem with
  14240.    askmore() in IKSD.
  14241.  
  14242. Fixed Compaq modem DC Off command (&C0 should be %C0).  ckudia.c, 20 Aug 99.
  14243.  
  14244. Added UTF-8 terminal character-set translation to UNIX CONNECT module.
  14245. ckucns.c, 21-22 Aug 99.  (Still need to migrate this code to other CONNECT
  14246. modules, clean it up, etc, and then adapt it to TRANSMIT.)
  14247.  
  14248. Verified that UTF-8 changes to ckucns.c did not break previous byte-to-byte
  14249. translations (e.g. DGI to Latin-1), then cleaned out temporary debug calls
  14250. that were added yesterday.  Also verified that -DNOUNICODE builds still work.
  14251. Then streamlined, parameterized, and documented the UTF-8 routines in
  14252. preparation to moving them to a common module.  23 Aug 99.
  14253.  
  14254. Fix from Jeff to askmore() that I missed before.  ckuusx.c, 23 Aug 99.
  14255.  
  14256. Added to the list of countries where Tone dialing is universally available
  14257. from table in Elsa MicroLink (German modem) manual.  ckudia.c, 24 Aug 99.
  14258.  
  14259. New irix64gcc makefile target from Adam Laurie <adam@algroup.co.uk>, 24 Aug 99.
  14260.  
  14261. Added -DNOTERMCAP to linuxnc target since "linuxnc" (no curses) builds were
  14262. failing on <term.h> on systems where user said No to installing ncurses.
  14263. makefile, 24 Aug 99.
  14264.  
  14265. New uw7iksdudk target, accounts for library shuffle between Unixware 7.0 and
  14266. 7.1 (realpath()), from Jim Whitby <jim@tpsdata.com>.  makefile, 24 Aug 99.
  14267.  
  14268. With a helpful hint from Lucas Hart, cleaned up a mess I made in VMS
  14269. do_label_send() when working on the signed/unsigned char mess, which broke
  14270. LABELED transfers completely.  ckvfio.c, 24 Aug 99.
  14271.  
  14272. Yesterday, cont'd...  Added prototypes for b_to_u() and u_to_b() to ckcuni.h,
  14273. and moved the routines themselves from ckucns.c to ckcuni.c.  24 Aug 99.
  14274.  
  14275. Adapted UTF-8 support to ckucon.c and ckvcon.c.  This brings UTF-8 terminal
  14276. emulation to fork()-using UNIX versions and to VMS, and validates the
  14277. modularity.  24 Aug 99.
  14278.  
  14279. Looked at TRANSMIT command.  It already had K95-specific UTF-8 support added,
  14280. but it didn't work at all in UNIX.  Changed it to use the same model used by
  14281. CONNECT.  Now it works (sort of), but still needs a LOT of cleaning up.  To
  14282. be cont'd...  ckuus4.c, 24 Aug 99.
  14283.  
  14284. In the non-K95 version of SET TERM CHARACTER-SET <remote-set> <local-set>, the
  14285. default local set was set incorrectly, so defaulting it gave a totally wacky
  14286. value.  Not sure when this happened, but it was some time after 6.0.  Fixed
  14287. in settrm(), ckuus7.c, 25 Aug 99.
  14288.  
  14289. From Jeff: Make K95 "set term {r,l} char dec-m*" consistent with C-K.
  14290. ckcuni.c, 25 Aug 99.
  14291.  
  14292. If the TRANSMIT command failed in the setup phase, it could leave the
  14293. 'binary' value altered.  Fixed in translate(), ckuus4.c, 25 Aug 99.
  14294.  
  14295. The TRANSMIT command has always assumed the character set of the file being
  14296. transmitted was the same as the local end of the terminal character-set pair.
  14297. There has never been a way to transmit a file, converting from local (file)
  14298. character-set A to remote (terminal) character-set B, but convert the return
  14299. echo from B to the local end of the terminal character set, C.  To illustrate:
  14300. suppose I want to transmit a file encoded in the NeXT charset to a DG
  14301. computer, translating it to DG Multinational, but my terminal only understands
  14302. Latin-1, so the echoes should be translated from DG to L1.  The distinction is
  14303. important now if we want to TRANSMIT (and translate) UCS-2 file, since UCS-2
  14304. is not a terminal character set.  Fixed in transmit(): ckuus4.c, 25 Aug 99.
  14305.  
  14306. Found a bug I introduced at the beginning of the Unicode changes -- two
  14307. little CKOUNIs that were changed to UNICODE that shouldn't have been, which
  14308. gave C-Kermit (but not K95) a random terminal character set upon startup.
  14309. ckuxla.c, 25 Aug 99.
  14310.  
  14311. Added UCS-2 support to TRANSMIT; cleaned up, commented, consolidated, and
  14312. tightened the code.  In fact, almost totally rewrote it.  Surprisingly, this
  14313. one turned out to be a lot more complicated than file transfer, CONNECT, or
  14314. TRANSLATE, but now it's done except for some minor loose ends.  transmit():
  14315. ckuus4.c, 25 Aug 99.
  14316.  
  14317. From Jeff:
  14318.  . More Telnet authentication changes.  ckcpro.w, ckuath.c
  14319.  . New Kerberized AIX 4.1 makefile target.
  14320. Fixed long lines and trailing blanks in ckuath.c.  25 Aug 99.
  14321.  
  14322. From Jeff, ckcmai.c, ckuath.c, 26 Aug 99:
  14323.  
  14324.  . proper handling of the case where the user authenticates as one name
  14325.    but wants to log in as someone else.
  14326.  
  14327.  . For instance, I want to authenticate as jaltman@CC.COLUMBIA.EDU but
  14328.    log into the host as 'root'.
  14329.  
  14330.  . When mutual authentication is performed I can get an encrypted
  14331.    session, but I still want to be prompted for the 'root' password if
  14332.    the 'root' account does not have a .k5login or .klogin file containing
  14333.    the authorized principal names.  Under no circumstances should we
  14334.    allow a user access to another user's account without appropriate
  14335.    credentials.  This is all fixed.
  14336.  
  14337.  . AUTH_USER means we know the user and the user is authorized either
  14338.    because they are logging into their own account or because they have
  14339.    been given permission to access the specified account name.
  14340.  
  14341.  . AUTH_VALID means we know the user but the user is not authorized to
  14342.    access the requested account without additional credentials.
  14343.  
  14344.  . AUTH_OTHER means we know the user but do not know the name the user
  14345.    wishes to log in under.
  14346.  
  14347.  . AUTH_UNKNOWN means we do not know who the user is but the person
  14348.    should be allowed to log in.
  14349.  
  14350.  . AUTH_REJECT means we do not allow the login to proceed (if
  14351.    authentication is required)
  14352.  
  14353.  . These labels are now consistently used in ckuath.c
  14354.  
  14355. Added chartostr() to ckclib.[ch], to turn a char into a string (and if the
  14356. char is a control char, to return its name).  Convenient for printfs.
  14357. 26 Aug 99.
  14358.  
  14359. Added charset and term bytesize info to SHOW TRANSMIT.  ckuus5.c, 26 Aug 99.
  14360.  
  14361. From Jeff, ckuath.c ckuus7.c ckuusr.h ckcnet.c ckuath.h, 26 Aug 99:
  14362.  . auth k4 list should not have switches
  14363.  . added a /addresses switch to auth k5 list to display the hostnames and
  14364.    ip addresses associated with the tickets.
  14365.  . added the ip address to the information displayed by auth k4 list
  14366.  . IP Address info is necessary to help debug problems associated with
  14367.    multihomed machines.
  14368.  
  14369. Added TRANSMIT /TRANSPARENT to force text mode without charset translation,
  14370. regardless of current charset settings.  ckuus[r4].c, 26 Aug 99.
  14371.  
  14372. Fixed SET TERM CHAR <local> <remote> to use the *terminal* charset keyword
  14373. table, not the *file* one, for the remote charset.  ckuus7.c, 26 Aug 99.
  14374.  
  14375. Updated HELP text for Unicode.  ckuus2.c, 26 Aug 99.
  14376.  
  14377. Fixes from Jeff to a couple syntax errors in yesterday's changes.  ckuus[r4].c,
  14378. 27 Aug 99.
  14379.  
  14380. Changed SET TERM CHAR TRANSPARENT to set a flag that distinguishes between
  14381. "transparent" actually having been specified and tcsl == tcsr.  The difference
  14382. is important for TRANSMIT.  Changed SHOW TERM to TRANSPARENT only if the user
  14383. said TRANSPARENT; otherwise to show the two sets, even if they are the same.
  14384. ckuxla.c, ckuus[47].c, 27 Aug 99.
  14385.  
  14386. From Jeff: fix for a typo in \v(protocol) evaluation.  ckuus4.c, 31 Aug 99.
  14387.  
  14388. Discovered that the TX_blah definitions in ckcuni.h contained a duplicate:
  14389. both TX_CP923 and TX_ELOT928 were defined as 94.  And then all the rest were
  14390. one too low.  Therefore the end of the txrinfo[] table (of function pointers)
  14391. was wrong in the last 8 positions.  Fortunately these were for sets we don't
  14392. use.  Fixed in ckcuni.h, 31 Aug 99.
  14393.  
  14394. Added support for the Hazeltine 1500/1520 graphics set based on reverse
  14395. engineering by Jeff of the HZ1520 "personality" of an IBM 3151 contributed by
  14396. John Simkiss.  ckcuni.[ch], 31 Aug 99.
  14397.  
  14398. Changed F001 debug() format (never used) to be like F111, except number is
  14399. shown in hex.  Also changed F000 to default to hex display for numbers that
  14400. are not single-byte chars.  ckuusx.c, 31 Aug 99.
  14401.  
  14402. Added special-case handling for UCS Line and Paragraph Separator characters
  14403. (LS and PS) to xgnbyte() (for translating file from UCS to Latin-1, etc, when
  14404. SENDing or TRANSLATing) and xpnbyte() (for translating incoming UCS2/UTF8 to
  14405. Latin-1, etc, when receiving files).  ckcfns.c, 31 Aug 99.
  14406.  
  14407. Discovered a bad bug in ucs2_to_utf8() -- it wasn't handling UCS-2 characters
  14408. greater than U+07FF.  My fault -- a careless workaround for compiler warnings
  14409. about "comparisons out of range".  Fixed in ckcuni.c, 31 Aug 99.
  14410.  
  14411. Changed u_to_b() to return(-2) if LS or PS encountered.  ckcuni.c, 31 Aug 99.
  14412.  
  14413. Changed UNIX CONNECT module to handle UTF-8 LS and PS (both are always treated
  14414. as CRLF).  ckucns.c, 31 Aug 99.
  14415.  
  14416. From Jeff:
  14417.  
  14418.  . Let's correct something I said several weeks back.  I swapped the
  14419.    meanings of AUTH_USER and AUTH_VALID.  AUTH_VALID means that not only
  14420.    could we authenticate the user but we were able to confirm that the
  14421.    user has authorization to access the specified account.
  14422.  
  14423.  . AUTH_USER only means that we could authenticate the user. It does not
  14424.    mean the user is authorized to access the specified account.
  14425.  
  14426.  . This distinction is very important on the server.  For instance:
  14427.  
  14428.      AUTH K5 INIT jaltman@KRB5.COLUMBIA.EDU
  14429.      TELNET /userid:root host
  14430.  
  14431.    means that the value of \v(userid) on the server is "root" but
  14432.    unless there is specific authorization by 'root' to allow access
  14433.    by jaltman@KRB5.COLUMBIA.EDU the authtype will be AUTH_USER and
  14434.    not AUTH_VALID.  This means that although we know who
  14435.    jaltman@KRB5.COLUMBIA.EDU is, jaltman@KRB5.COLUMBIA.EDU must still
  14436.    demonstrate via a login that he is allowed access as "root".
  14437.  
  14438.  . For Kermit scripts we now have a \v(authname) variable which will
  14439.    contain 'jaltman@KRB5.COLUMBIA.EDU'.  That way authorization lists
  14440.    can be used for the account specified by \v(userid).
  14441.  
  14442. ckcmai.c ckuusr.h ckuus4.c ckuath.c security.txt ckcpro.w host.ksc, 1 Sep 99.
  14443.  
  14444. Also from Jeff, a fix to output from REMOTE commands in which the trailing
  14445. line terminator was lost.  ckcpro.w, 1 Sep 99.
  14446.  
  14447. In XLATE, range-check csets before using them as array subscripts.  ckuus4.c,
  14448. 1 Sep 99.
  14449.  
  14450. Jeff reported that constructions like "if xxx { commands, FORWARD label }"
  14451. failed to find the label.  Subtle problem, which seems to have been with us
  14452. always.  Diagnosis: the items in the braces are a macro; the FORWARD code
  14453. loops thru the macro definition starting at the current position, but only if
  14454. there are enough chars left in the macro definition to contain the label.  In
  14455. this case there aren't and the test for how the loop ended ("if (i == m)")
  14456. didn't work.  This would tend to happen whenever FORWARD was the last command
  14457. in a macro.  The correct test is "if (i >= m)".  Fixed in dogoto().  Also
  14458. increased max label length from 50 to 64 or 255 (depending on BIGBUFOK).
  14459. ckuus6.c, 1 Sep 99.
  14460.  
  14461. Somebody asked why we don't have an APPEND command if we have COPY, RENAME,
  14462. DELETE, etc.  I added COPY /APPEND -- took three minutes.  Works with other
  14463. COPY switches except /SWAP-BYTES.  I used the cheating method (fopen,
  14464. fread/fwrite, fclose) since the zcopy() API doesn't provide for appending.
  14465. ckuus6.c, 1 Sep 99.
  14466.  
  14467. A couple minor adjustments to pattern lists.  ckcmai.c, 1 Sep 99.
  14468.  
  14469. Migrated CONNECT changes for Unicode LS and PS to ckucon.c and ckvcon.c,
  14470. 1 Sep 99.
  14471.  
  14472. Thought about implications of LS and PS to TRANSMIT command, but I decided to
  14473. do nothing since I have no access to an actual UTF-8 console (e.g. on Plan 9)
  14474. and therefore no way of knowing how incoming UTF-8 characters -- especially
  14475. LF and PS -- are echoed.
  14476.  
  14477. From Jeff:
  14478.  
  14479.  . What do we do when the client is logging into IKSD with the following
  14480.    properties:
  14481.  
  14482.      SET TELOPT AUTH REQUIRED
  14483.      SET LOGIN USER anonymous
  14484.  
  14485.    Up until today the client would fail because IKSD would see the
  14486.  
  14487.      IAC SB AUTH NAME anonymous IAC SE
  14488.  
  14489.    message and reject telnet authentication because you can't
  14490.    authenticate "anonymous".  However, that is not really true.  Now that
  14491.    I properly understand and have implemented the distinction between
  14492.    AUTH_VALID and AUTH_USER there is no reason to reject "anonymous" for
  14493.    all authentication methods.  When Kerberos is being used it makes
  14494.    perfect sense for someone to authenticate using their Kerberos ID but
  14495.    then log into the server as "anonymous".  This shows up as:
  14496.  
  14497.      authstate = AUTH_USER
  14498.      authname  = Kerberos ID
  14499.      userid    = anonymous
  14500.  
  14501.    Therefore, we automatically log the user in as "anonymous" with
  14502.    password equal to their Kerberos ID.
  14503.  
  14504.    This does not work with SRP because it is not possible with SRP to
  14505.    authenticate as one ID and login as another.
  14506.  
  14507.  . Confirmed that \v(userid) is always being set to the correct value.
  14508.  
  14509.  . Added a message to zvpass() to indicate anonymous logins for symmetry
  14510.    with the non-anonymous login message.
  14511.  
  14512. ckcmai.c ckufio.c ckuath.c, 2 Sep 99.
  14513.  
  14514. Added support for the Unicode General Punctuation block (0x2000-206f) to the
  14515. tx_blah() functions -- various-width spaces and dashes, quotation mark
  14516. variations, etc.  ckcuni.c, 2 Sep 99.
  14517.  
  14518. Changed UNIX sysinit() to check LOGNAME for userid[] initialization if USER
  14519. not defined.  ckutio.c, 2 Sep 99.
  14520.  
  14521. Changed the UNIX version to call ckufio.c's whoami() function (formerly
  14522. static) to expand \v(user), rather than just printing uidbuf[].  This returns
  14523. the ID of the actual logged-in (or su'd) user, and works for IKSD too.  But in
  14524. testing this, I discovered that tilde-expansion did not (never did) work in
  14525. IKSD so I fixed that too.  ckufio.c, ckuus4.c, 2 Sep 99.
  14526.  
  14527. If the nopush variable was set, but NOPUSH was not defined at compile time,
  14528. every command that might invoke the shell or another program had to check this
  14529. variable, and not all of them did.  One example was "REMOTE blah | command"
  14530. (now fixed).  But to ensure no others slip through, I added a check for nopush
  14531. in zxcmd(), zshcmd(), and zsyscmd().  ck[uv]fio.c, 2 Sep 99.
  14532.  
  14533. Ditto for ttruncmd() and the NET_CMD case of ttopen(), ckutio.c, 2 Sep 99.
  14534.  
  14535. Added a new symbol XXNOTAV to ckuusr.h, to be used as the keyword value of any
  14536. command that is configured out.  For example, when NOPUSH is defined there was
  14537. no PUSH command, but now when NOPUSH is defined, we can leave the keyword in
  14538. but make its value XXNOTAV.  All commands whose value is XXNOTAV absorb the
  14539. whole command (via cmtxt()) and then print a message to the effect that
  14540. "command 'blah' is not configured in this version of Kermit" and fails, which
  14541. should be less confusing than beeping and printing a no-such-command message
  14542. after the first keyword.  Did this for most classes of top-level commands
  14543. except NOXFER (which nobody uses) and NOFRILLS (since the point of that one is
  14544. to save space).  ckuusr.[ch], ckuus2.c, 2 Sep 99.
  14545.  
  14546. Fixes from Jeff to "help func" + new help text for the Kerberos functions.
  14547. ckuus2.c, 3 Sep 99.
  14548.  
  14549. Fix from Jeff to a mistake in my ckcuni.c changes yesterday.  3 Sep 99.
  14550.  
  14551. New code from Jeff to have SHOW NET display all the IP address of the local
  14552. host in case it has more than one.  ckuus4.c, 3 Sep 99.
  14553.  
  14554. Fixed some #ifdefs to allow No-Unicode builds: ckuus4.c, 3 Sep 99.
  14555.  
  14556. From Jeff: corrections to getlocalipaddr() and getlocalipaddrs(), ckcnet.[ch],
  14557. 3 Sep 99.
  14558.  
  14559. Changed FILE DISPLAY tags from SENDING and RECEIVING to SEND and RECV so server
  14560. messages line up better.  ckuusx.c, 4 Sep 99.
  14561.  
  14562. Testing RESEND with a "set host * xxxx" server on the far end became confused
  14563. very quickly when RESEND seemed to always work instantly without sending
  14564. anything.  Reason: When C-Kermit thinks it's in local mode (as it does when
  14565. told to "set host *"), it automatically DISABLEs DELETE to protect itself
  14566. against autodownload and APC "letter bombs".  But when DELETE is DISABLEd,
  14567. FILE COLLISION becomes RENAME.  So if a file named "x" exists and I send a new
  14568. copy, the new copy becomes "x.~1~".  If the send is interrupted and then I
  14569. "resend x", the receiver looks at the *original* x, not x.~1~ and either says
  14570. "don't bother, it's already here" (if my copy is not bigger than the copy on
  14571. the other end), or worse, corrupts the result.  Of course the problem goes
  14572. away if you tell the connection receiver to ENABLE DELETE.  I don't see any
  14573. other way out of this mess...
  14574.  
  14575. Anyway, once this was sorted out, many repetitions of sending a file,
  14576. interrupting the transfer, and resending it multiple times before the transfer
  14577. was finished failed to show any kind of problem or corruption of the received
  14578. file.
  14579.  
  14580. Those obnoxious HINT messages were coming out every time a transfer was
  14581. interrupted from the keyboard.  This was happening because the "interrupted"
  14582. flag had become overloaded (see notes from June 29th).  Separated the
  14583. different meanings into different flags: "interrupted" means a file transfer
  14584. was interrupted from the keyboard by the user; "fatalio" means a transfer was
  14585. interrupted because of a fatal i/o error (ttinl() fails or ttchk() returns -1).
  14586. Added a catch-all in case input() returns 'q' for neither of those reasons (it
  14587. shouldn't).  ckcfn[s2].c, ckcpro.w, ckuus[5x].c, 4 Sep 99.
  14588.  
  14589. Sending BYE to a "set host * xxx" server had the rather surprising effect of
  14590. logging out the job under which it was running.  Since these jobs are usually
  14591. set up by hand, with the owner in attendance, this could be harmful -- letting
  14592. another person kill other programs the user might have running (mail, editor,
  14593. etc).  So in the TCP server case (but not IKSD) made BYE received by server
  14594. cause Kermit to exit rather than log out its own job.  ckcpro.w, 4 Sep 99.
  14595.  
  14596. Client, after sending BYE, should not be receiving EXIT warnings.  Made sure
  14597. that after sending BYE and receiving the ACK (or failing to after trying),
  14598. the client calls ttclos().  ckcpro.w, 4 Sep 99.
  14599.  
  14600. Some minor improvements to SHOW PROTOCOL display suggested by Lucas Hart.
  14601. ckuus4.c, 4 Sep 99.
  14602.  
  14603. Jim Whitby reported complaints about:
  14604.  
  14605.   sxx = xls[tcs][csin];        /* translation function */
  14606.   rxx = xlr[tcs][csout];    /* pointers. */
  14607.  
  14608. in ckuus4.c on Unixware 7.1 ("declaration out of scope").  I was finally able
  14609. to reproduce them; xls[][] and xlr[][] were declared twice. ckuus4.c, 4 Sep 99.
  14610.  
  14611. Corrected typos in top-level command keyword table for new "not available"
  14612. entries.  ckuusr.c, 4 Sep 99.
  14613.  
  14614. Preliminary run-through of major feature sets & platforms:
  14615.  
  14616.   Full VMS...ok (VAX VMS 5.5-2 VAX C 3.2 UCX 2.0)
  14617.   NoNet VMS..?? <-- Doesn't work yet...
  14618.   Full Unix..ok (SunOS gcc - ANSI - select())
  14619.   Full Unix..ok (SunOS gcc - ANSI - fork())
  14620.   Full Unix..ok (SunOS cc - no ANSI)
  14621.   Full Unix..ok (HP-UX cc - no ANSI)
  14622.   Full Unix..ok (Unixware 7.0 - ANSI)
  14623.   Full Unix..ok (Linux RH 5.2 gcc - ANSI)
  14624.   linuxnotcp.ok (Linux RH 5.2 gcc - ANSI)
  14625.   linuxnc....ok (Linux RH 5.2 gcc - ANSI)
  14626.   Krb4.......ok (SunOS)
  14627.   Krb5.......?? (Linux) <-- NO
  14628.   Krb4+Krb5..?? (Linux) <-- NO
  14629.   NOUNICODE..ok
  14630.   NOCSETS....ok
  14631.   NONET......ok
  14632.   NOLOCAL....ok
  14633.   NODIAL.....ok
  14634.   MINIDIAL...ok
  14635.   NOSPL......ok
  14636.   NOICP......ok
  14637.   NOSHOW.....ok
  14638.   NOHELP.....ok
  14639.   NOPUSH.....ok
  14640.   NODEBUG....ok
  14641.  
  14642. As always, much #ifdef and declaration juggling required:
  14643. ckuus[r467x].c, ckctel.c, ckcfns.c, ckudia.c, ckuscr.c.  4 Sep 99.
  14644.  
  14645. From Jeff: Updated makefile for Linux Kerberos 5 builds, a new error message
  14646. for bind failures, some auth changes: makefile, ckcnet.c, ckuath.c, 5 Sep 99.
  14647. Linux Krb5 builds now ok.
  14648.  
  14649. To clear up ENABLE/DISABLE DELETE vs SET HOST * confusion, changed ENABLED
  14650. macro to take tcp_incoming into account (Jeff's suggestion).  Moved
  14651. declaration of tcp_incoming to ckcmai.c, added an extern declaration for it to
  14652. ckcker.h (where ENABLED is defined, so we can use ENABLED() in any module
  14653. without getting confused by undefined symbol errors for a symbol we can't
  14654. see), removed extern dcls for it that were previously in ckcnet.c, ckctel.c,
  14655. ckucns.c, ckucon.c, and ckuus4.c.  For ENABLE/DISABLE purposes, REMOTE means
  14656. (!local || tcp_incoming) and LOCAL means (local && !tcp_incoming).  5 Sep 99.
  14657.  
  14658. Some research revealed that errno could be referenced in any version of VMS
  14659. (at least back to 5.5) if we include <errno.h>.  Some unguarded references to
  14660. errno had crept in since Beta.09, which were making VMS NONET builds fail.
  14661. Added #include <errno.h> for VMS to ckcdeb.h.  5 Sep 99.  (Except the SPCVXA
  14662. installation, which has messed-up header files.)
  14663.  
  14664. Corrected some syntax problems in VMS files: ckvfio.c didn't like arithmetic
  14665. involving a mixture of signed and unsigned char pointers; ckvcon.c needed its
  14666. chkaes() routine converted from void to int.  Now both UCX and NONET builds
  14667. are OK on both VAX and Alpha.  5 Sep 99.
  14668.  
  14669. Corrected a typo in the STATISTICS command (introduced yesterday) that could
  14670. cause garbage to be printed in the "status" field (or worse).  ckuus4.c,
  14671. 5 Sep 99.
  14672.  
  14673. Cleaned out some declared but unused variables.  Most modules.  5 Sep 99.
  14674.  
  14675. Recent changes to haddr_list stuff broke HP-UX 5.00 Win/TCP, had to undef
  14676. HADDRLIST for HPUX5.  ckcnet.h, 5 Sep 99.
  14677.  
  14678. The new code for \v(user) had the prototype for whoami() inside some #ifdefs
  14679. it should have been outside of.  ckuus4.c, 5 Sep 99.
  14680.  
  14681. Added NOCSETS and NOSPL to revive 16-bit QNX build.  Then it compiled but
  14682. Telnet didn't work.  Built with NONET.  But it still doesn't work -- it beeps
  14683. all the time, won't transfer files in remote mode, etc ("send xxx" complains
  14684. read access denied when the permissions are fine, etc).  Since nobody has ever
  14685. asked for this version, we'll retire until/unless somebody does.  makefile,
  14686. 5 Sep 99.
  14687.  
  14688. On a VMS 7.2 system that has Multinet installed as the production network but
  14689. also has UCX xxx available, CKVIOC.C wouldn't build because UCX$C_IOCTL was
  14690. not defined for some reason (everything else was OK).  Added a clause to
  14691. define as "2" if it was not defined.  ckvioc.c, 5 Sep 99.
  14692.  
  14693. From William Bader: new ckvold.com to account for ckcuni.[ch] and ckvold.c
  14694. that include fmod() missing from old math library.  6 Sep 99.
  14695.  
  14696. Went back and undid the sweeping VMS errno change, since it was fatal on most
  14697. Multinet systems.  Instead, added explicit #include <errno.h> directives to
  14698. each module affected, after including all other header files, if VMS is
  14699. defined and TCPSOCKET is not defined.  ckcdeb.h, ckuus[67].c, 6 Sep 99.
  14700.  
  14701. Removed double declarations for "i" from two routines in ckucon.c to fix
  14702. X.25 builds.  6 Sep 99.
  14703.  
  14704. ---Beta.10---
  14705.  
  14706. A couple small changes for the Amiga from Steve Walton.  ckusig.c, ckuus5.c,
  14707. 7 Sep 99.
  14708.  
  14709. Some syntax & makefile fixes for Dynix/ptx 2.16 from Roger J. Allen.
  14710. ckuus6.c, makefile.  8 Sep 99.
  14711.  
  14712. Minor syntax changes for compilation errors in Coherent 4.2 build
  14713. ("declaration hides parameter", "trailing comma in initializer list", etc).
  14714. ckucmd.c, ckuus[23456].c, ckcfns.c, ckctel.h, ckcuni.c, 8 Sep 99.
  14715.  
  14716. From Jeff:
  14717.  
  14718.  . I removed a bunch of #includes that were no
  14719.    longer necessary and reduced the number of #defines.
  14720.  
  14721.  . updated the makefile entries for krb5 to use the
  14722.    /usr/local/{lib,include} trees instead of the kerberos distribution
  14723.    tree since we no longer reference non-public header files.
  14724.  
  14725.  . Put in CM_ABR entries for "binary-transfer"
  14726.  
  14727. makefile ck_crp.c ckuath.c ckuat2.h ckuath.c ckuus3.c, 8 Sep 99.
  14728.  
  14729. New consolidated makefile entries for NetBSD.  makefile, 8 Sep 99.
  14730.  
  14731. Corrections to pyrdcosx, sni543, and sni544 entries from Graham Jenkins.
  14732. makefile, 8 Sep 99.
  14733.  
  14734. New dynixptx216 makefile entries from Roger Allen.  Workaround for asm
  14735. symbol-table overflow in ckcuni + new gcc entry.  makefile, 9/9/99.
  14736.  
  14737. Fixes from Jeff to typos in my changes from yesterday: ckucmd.c, ckuus4.c,
  14738. 9 Sep 99.
  14739.  
  14740. Put base64 stuff in #ifndef NOSPL and moved query declaration from ckuus7.c
  14741. to ckcmai.c to fix 2.11 BSD build.  9 Sep 99.
  14742.  
  14743. I had added an escape clause to the SCO 2.3.4 builds for not optimizing
  14744. ckuus3.c because last time I tried it seemed to get stuck forever, but
  14745. apparently the sticking was because of something else because now it builds
  14746. fine, so removed the escape clause.  makefile, 9 Sep 99.
  14747.  
  14748. From Jeff: Disable WHO, HOST, etc, in IKSD.  ckcmai.c, ckcfns.c, 9 Sep 99.
  14749.  
  14750. From Jeff: Add a note to docs that "-0" includes TELOPT KERMIT REFUSE REFUSE.
  14751. ckermit2.txt, 9 Sep 99.
  14752.  
  14753. If SET SEND PATHNAMES OFF, strip path from filespec sent back in the ACK to
  14754. the F packet.  Believe it or not, there is a Kermit program (for MUMPS) that
  14755. compares the returned name to the sent one and fails if they are not the same.
  14756. But then I realized that SEND PATHNAMES is already OFF by default, so this
  14757. would be a bad change, since it takes away the ability of the receiver to tell
  14758. the sender where the file went in the default case.  So I backed off and added
  14759. a new (invisible) command SET F-ACK-PATH { ON, OFF }, and it's ON by default.
  14760. Documented in Section 4.22.4 of ckermit2.txt.  ckuusr.h, ckcmai.c, ckcpro.w,
  14761. ckuus[r3].c, 9 Sep 99.
  14762.  
  14763. Discovered that FOPEN /APPEND did not (and never did) work if the file did
  14764. not already exist.  The code for this case was there, but never tested, and
  14765. needed a small fix.  Now it works.  ckuus7.c, 9 Sep 99.
  14766.  
  14767. Noticed that packet i/o statistics were wrong for receiving files when
  14768. streaming -- ACKs were counted that shouldn't have been (stats were correct,
  14769. however, when sending).  Fixed in spack(), ckcfn2.c, 9 Sep 99.
  14770.  
  14771. It was bothering me that to make a Telnet connection to a misbehaving Telnet
  14772. server, you had to SET TELNET WAIT OFF first, because this is sticky and
  14773. affects all subsequent connections unless you remember to undo it.  So I added
  14774. /WAIT and /NOWAIT switches to SET HOST and TELNET to specify [no] waiting
  14775. just for this connection.  I implemented it in the stupidest possible way,
  14776. which probably needs improvement.  I simply save tn_wait_flg and set it to the
  14777. switch value before calling ttopen(), then restore it immediately upon return
  14778. from ttopen(), since hanging onto it and restoring it at some later time would
  14779. be pretty tricky.  VERY tricky, in fact.  ckuusr.h, ckuus7.c, ckermit2.txt,
  14780. 9 Sep 99.
  14781.  
  14782. Changes from Jeff... refinements to ENABLE/DISABLE for IKSD, generalization
  14783. of TELNET / SET HOST switches to (a) include other relevant parameters, and
  14784. (b) make then persist throughout the connection and restore them when the
  14785. connection is closed; fix a typo in my F-ACK-PATH code; ckuus7.c ckuath.c
  14786. makefile ckuus3.c ck_crp.c ckcnet.c ckctel.c ckuus6.c ckuusr.c.  Supplied
  14787. some missing #ifdefs in ckuus3.c.  12 Sep 99.
  14788.  
  14789. Protected #include <term.h> with #ifndef NOTERMCAP to fix linuxnc build on
  14790. systems that actually do not have <term.h> (because they failed to choose
  14791. ncurses at Linux install time).  ckuusx.c, 12 Sep 99.
  14792.  
  14793. At the suggestion of Markus Kuhn, replaced utf8_to_ucs2() with a more robust
  14794. version adapted from Xfree86 xterm (Thomas Dickey).  The previous version
  14795. (Mark Davis, Unicode website samples) only works with well-formed UTF-8
  14796. sequences.  The new version works equivalently but should handle malformed
  14797. sequences properly.  Unfortunately, the caller must treat the return value a
  14798. bit differently now, and this can be a bit complicated because under certain
  14799. conditions, it can return *two* values (0xfffd followed by valid character)
  14800. when a UTF-8 sequence is interrupted by (say) an ASCII character.  ckcuni.c,
  14801. 12 Sep 99.
  14802.  
  14803. With this change, an invalid UTF-8 sequence becomes 0xfffd, and if it was
  14804. interrupted by the valid character, the valid char is lost.  This is better
  14805. than before, but not ideal.
  14806.  
  14807. The callers of utf8_to_ucs2() are:
  14808.  
  14809.   ckcfns.c: rc = utf8_to_ucs2(ch,&us);  <-- In xpnbyte()
  14810.   ckcfns.c: rc = utf8_to_ucs2(ch,&us);  <-- In xgnbyte()
  14811.   ckcuni.c: x = utf8_to_ucs2(c,&ucs2);  <-- In u_to_b()
  14812.  
  14813. Let's see if we can fix them...
  14814.  
  14815. The problem with u_to_b() (which is called by the CONNECT modules and by
  14816. TRANSMIT) is that it has an argument -- the next UTF byte.  So there's no good
  14817. way to save up a second value and return it next time, because we'll get
  14818. increasingly far behind.  But we can make it return a special negative code,
  14819. say -9, to mean: "Use the error character, and then call me again to get the
  14820. next character".  But that won't work, because there's no special arg it can
  14821. be called with that says to return the saved character, because its arg is a
  14822. CHAR.  So we need a second routine for that, u_to_b2().  OK, that was easy:
  14823. ckcuni.c, ckucns.c, ckuus4.c, 12 Sep 99.
  14824.  
  14825. xpnbyte() and xgnbyte() were a bit trickier but I made a first stab at it.
  14826. The resulting Kermit still seems to handle well-formed UTF-8 OK (as it did
  14827. before), but supposedly now should handle invalid UTF-8 sequences by the book.
  14828. Sent the result off to Markus for more testing.  ckcfns.c, 12 Sep 99.
  14829.  
  14830. New (tested) NetBSD entries from Graham Jenkins.  Makefile, 18 Sep 99.
  14831.  
  14832. Updated Commodore Amiga source files from Steve Walton, mainly addition
  14833. of ttgwsiz() and isdir(): cki*.c, 18 Sep 99.
  14834.  
  14835. Added LinuxPPC makefile entry from Nick Strauss <nicks@carriage.chesco.com>.
  14836. makefile, 19 Sep 99.
  14837.  
  14838. Lucas Hart reported that "set file download-directory ?" listed regular
  14839. files as well as directories.  Actually the same was true of any command that
  14840. parsed a directory name, including CD.  Fixed in cmifi2(): ckucmd.c, 19 Sep 99.
  14841.  
  14842. Mark Sapiro reported that we still have the problem with timestamps of
  14843. incoming files in BSDI being off due to DST confusion.  Steve Schultz's
  14844. diagnosis was that the BSD44 path was the tm_gmtoff adjustment already
  14845. accounted for DST, so when adjusting for DST after that, we were effectively
  14846. subtracting two hours instead of one.  The fix of minimum boat-rocking was to
  14847. adjust for DST only in the non-BSD44 case, rather than always.  zstrdt():
  14848. ckufio.c, 19 Sep 99.
  14849.  
  14850. Accumulated changes from Jeff since last week:
  14851.  . Make \v(filename) retain name of last file transferred.  ckuus4.c.
  14852.  . Fix clearchannel auto.  ckuus[25y].c, ckcfns.c, ckermit2.txt.
  14853.  . Fix streaming vs draining after E-Packet while receiving.  ckcfn2.c.
  14854.  . NOPUSH was blocking client end of RHOST.  ckuus7.c.
  14855.  . REMOTE { SET, ASG, COPY, RENAME } did not set success=1 and so would
  14856.    not resume CONNECT mode when invoked via autodownload.  ckcpro.w.
  14857.  . Reinstates the use of select() on TCP/IP connections when streaming so
  14858.    we can detect connection loss.  ckcnet.c.
  14859.  
  14860. The last one + the clearchannel changes also result in a dramatic performance
  14861. improvement on certain kinds of connections, notably TCP/IP over ADSL (in one
  14862. trial, 4BM of precompressed data was transferred 2.6 times faster than with
  14863. FTP.
  14864.  
  14865. Fixed \v(filename) to work more consistently, since sometimes it was empty
  14866. after a successful file-group transfer because (for some unknown reason)
  14867. filnam[] was empty.  Rather than figure out why this would be and "fix" it
  14868. (probably breaking something else) I use the WHERE command info if filnam[]
  14869. is empty.  ckuus4.c, 19 Sep 99.
  14870.  
  14871. Added RELIABLE and CLEARCHANNEL to STATISTICS /VERBOSE display.  This shows
  14872. not the settings (usually AUTO, not very informative), but whether the
  14873. features were actually negotiated and used.  ckuus4.c, 19 Sep 99.
  14874.  
  14875. Added sco32v505udk makefile target on advice from Thomas M. Gill <tom@hcd.net>,
  14876. who says in this case -DDCLTIMEVAL must be added.  makefile, 19 Sep 99.
  14877.  
  14878. Added uw2iksd entry (Unixware 2, like 7, needs shadow password support for
  14879. authentication).  makefile, 19 Sep 99.
  14880.  
  14881. At Lucas Hart's suggestion, make bzero and bcopy be macro definitions in VMS,
  14882. replacing themselves by memset and memcpy, to squelch the warnings we've been
  14883. getting about them all these years.  Probably a bad idea...  (Another idea
  14884. would be to *replace* all references to bzero and bcopy with memset &
  14885. memcpy but they're not portable either so let's try this first...)  Builds and
  14886. runs OK on Alpha VMS 7.1 UCX; Alpha VMS 7.1 TGV; VAX VMS 5.5-2 UCX; VAX VMS
  14887. 7.1 TGV (this one always got errors before) -- so let's keep it.  ckcnet.h,
  14888. 19 Sep 99.
  14889.  
  14890. The newest DECC compiler, 6.2FT, spews out reams of %CC-W-NOTULALQUA warnings
  14891. for constructions like memmove(&xabfhc_ofile.xab$w_lrl,filptr,2), having to do
  14892. with struct member alignment.  The consensus is that these warnings are both
  14893. harmless and overzealous -- they might be important if we were moving multiple
  14894. members of a struct at once and assuming a fixed number of bytes (when the
  14895. Alpha might insert padding and the VAX might not).  But we're not doing that.
  14896. Suggestions for making the warnings go away (like #pragma nomember_alignment,
  14897. or adding compiler switches that only work on some versions of some compilers)
  14898. are dangerous, so we'll just live with the warnings.
  14899.  
  14900. Lucas says DECC -- at least back to V1.3 (1993) -- has an /UNSIGNED_CHAR
  14901. switch (which is not the default).  Tried building C-Kermit on an Alpha with
  14902. DECC 5.5-002 with p4 = "/UNSIGNED_CHAR" -- perfect, not a single warning.  In
  14903. ckvker.com, at the DECC: label, it is probably OK to change 'ccopt =
  14904. "/decc"+ccopt' to 'ccopt = "/decc/unsigned_char"+ccopt'.
  14905.  
  14906. Changed VMS C-Kermit IDs from "7.0.195" to "7.0.196" (for ANALYZE/IMAGE).
  14907. ckvker.com, ckvold.com.  19 Sep 99.
  14908.  
  14909. From Lucas:
  14910.  . Fixes for DELETE in VMS, plus implementation of /ASK.  ckuus6.c.
  14911.  . Fix recovery from illegal filenames in the LOG command.  ckvfio.c,ckuus4.c.
  14912.  
  14913. Added implementation of /LIST to Lucas's implementation of /ASK, and added
  14914. code to error out if user included /SIMULATE on platforms that don't support
  14915. it.  ckuus6.c, 19 Sep 99.
  14916.  
  14917. Fixes needed for VOS, 20 Sep 99:
  14918.  . Shuffle declaration of inserver in ckctel.c.
  14919.  . Shuffle declaration of xaskmore in ckuus7.c.
  14920.  
  14921. Correction to kstart() from Jeff.  ckcfn2.c, 20 Sep 99.
  14922.  
  14923. Remove some more now-superfluous bcopy/bzero definitions from ckcnet.h,
  14924. 20 Sep 99.
  14925.  
  14926. For the benefit of DECC 6.2, add a DECC-only replace for the VMS/SMG printw()
  14927. replacement that handles "varargs".  ckuusx.c, 20 Sep 99.
  14928.  
  14929. There has never been a way to give a DIAL command that specifies a list of
  14930. phone numbers to try until one answers, except by creating a dialing directory
  14931. and putting multiple entries in it under the same name.  This is a big pain,
  14932. especially when using the K95 dialer.  Now the DIAL command accepts "makelist"
  14933. notation, as in:
  14934.  
  14935.   dial {{7654321}{8765432}{9876543}}
  14936.  
  14937. These have to be actual numbers to dial, not names of dialing directory
  14938. entries.  Conversely, dialing directory entries can not contain lists like
  14939. this.  Otherwise, the numbers are treated as if they had been fetched from the
  14940. dialing directory; they can be in literal or portable format, etc.  ckuus6.c,
  14941. 20 Sep 99.
  14942.  
  14943. Updated ICL makefile targets for IKSD.  21 Sep 99.
  14944.  
  14945. Fixes for #ifdefs vs Telnet variables from Jeff.  ckuus[37].c, 21 Sep 99.
  14946.  
  14947. From Jeff: debug stmt added to ckuath.  Cleaned up long lines.  21 Sep 99.
  14948.  
  14949. From Jeff: improved handling of Telnet negotiation timeouts.  ckctel.c,
  14950. ckcnet.c, 21 Sep 99.
  14951.  
  14952. SET PROTOCOL was invisible for non CK_XYZ builds, but people still need to
  14953. use it to set the Kermit upload/download command strings, so made it visible
  14954. in all cases.  ckuusr.c, 21 Sep 99.
  14955.  
  14956. Fixed HELP SET PROTOCOL for non-XYZ case.  ckuus2.c, 21 Sep 99.
  14957.  
  14958. Another tn_wait declaration fix from Jeff.  ckuus7.c, 22 Sep 99.
  14959.  
  14960. From Jeff: some improvements to the Telnet negotiation timeout code and
  14961. messages.  ckctel.c, 22 Sep 99.
  14962.  
  14963. Updated HELP DIAL text for phone-number lists.  ckuus2.c, 22 Sep 99.
  14964.  
  14965. It seems that ever since C-Kermit 6.0, C-Kermit prompts and image-mode
  14966. commands have not appeared in VMS batch logs.  This was intentional -- most
  14967. people did not want them there.  However, there was no way to undo this.
  14968. Switched the code around so that starting Kermit with -z on the command line
  14969. or giving it a SET BACKGROUND OFF command after it started would enable
  14970. issuing of prompts and echoing of commands even in batch.  Also enabled the
  14971. file-transfer display in batch, but forced it to BRIEF if it was set to CRT or
  14972. FULLSCREEN.  ckcker.h, ckvtio.c, ckuus[3]x.c, ckucmd.c, 23 Sep 99.
  14973.  
  14974. Another unhappy discovery: VMS C-Kermit no longer reads image data from a DCL
  14975. command procedure executed at the terminal.  This is entirely separate from
  14976. the batch issue -- Kermit *does* read image data in batch, even when executing
  14977. the exact same .COM file.
  14978.  
  14979. Discovered that the -d command-line option also set the timestamp feature -- I
  14980. probably put that there for some testing and forgot to take it out.  So now
  14981. it's out.  ckuus4.c, 23 Sep 99.
  14982.  
  14983. OK, now I can compare the three VMS debug logs...
  14984.  
  14985.   congm sys$getjpiw mode_flags=3 <-- Interactive
  14986.   congm sys$getjpiw mode_flags=3 <-- DCL
  14987.   congm sys$getjpiw mode_flags=2 <-- Batch
  14988.  
  14989. So DCL and Interactive look the same.  However, isatty(0) fails for DCL and
  14990. Batch but succeeds for Interactive.  So I made a new flag, "itsatty", for VMS
  14991. that is nonzero if sys$input is the terminal, which it isn't in a batch job or
  14992. in a DCL command procedure.  And I changed the hack in VMS coninc() to return
  14993. getchar() if (!itsatty), rather than only if (batch).  Now the documentation
  14994. is right again.  ckvtio.c, ckvbwr.txt, 23 Sep 99.
  14995.  
  14996. From Jeff: Back off on le_buf echoing changes for all but K95; add
  14997. SO_DONTROUTE support.  ckcnet.c, 23 Sep 99.
  14998.  
  14999. User interface for SO_DONTROUTE from Jeff.  ckuusr.[ch], ckuus[34].c,
  15000. ckcmai.c, 24 Sep 99.
  15001.  
  15002. New security.txt and telnet.txt from Jeff.  24 Sep 99.
  15003.  
  15004. Peter E reported that LOG commands didn't work any more, e.g.:
  15005.   [/tmp_mnt/eip/cku195/b10+04/] C-Kermit>log connections
  15006.   ?Invalid: log connections
  15007.  
  15008. The problem is because of the change from Lucas Hart of a few days ago, in
  15009. which the LOG command returns -2 if zfnqfp() returns NULL.  In this case
  15010. zfnqfp() returns NULL because realpath() fails, evidently having something to
  15011. do with being called by root.  So I backed off on Lucas's change for the LOG
  15012. command to fail if zfnqfp() failed.  The real fix would be for VMS zchko()
  15013. (and for that matter, zopeno()) to fail gracefully when given an illegal
  15014. filename.  ckuus4.c, 24 Sep 99.
  15015.  
  15016. Put \v(line) back the way it was in 6.0, so it always shows something,
  15017. rather than returning the empty string when in remote mode.  I don't know why
  15018. it was changed, but some people didn't like it.  ckuus4.c, 24 Sep 99.
  15019.  
  15020. The old problem with packet 0...
  15021.  . Client sends I to server.
  15022.  . Server sends ACK(I) back to client.
  15023.  . Client sends REMOTE blah to server.
  15024.  . Server doesn't receive it, so resends ACK(I).
  15025.  . Since these are all packet 0, client thinks this is ACK(REMOTE blah)
  15026.  
  15027. Previously we had a heuristic in place for GET: If we sent a GET command and
  15028. were answered by an ACK, we knew this had happened because GET can never be
  15029. answered by an ACK (see <get>Y state).  But a REMOTE command can get a
  15030. short-form answer, which is in an ACK; when the ACK comes, the client prints
  15031. the answer and then quits, thinking the transaction is over.  This actually
  15032. turns out to be OK with the server too, since as far as the server is
  15033. concerned, the I/Y exchange is a complete transaction too.  The problem is,
  15034. the requested REMOTE operation never took place.  So a new (ultra-gross)
  15035. heuristic was added.  At <ipkt>Y, we save a copy of the contents of the
  15036. I-packet.  Then at <rgen>Y, we check to see if the contents of the ACK we just
  15037. got match those from ACK(I) and if so, we resend the REMOTE command packet and
  15038. wait for another ACK.  All of this code is within #ifdef PKTZEROHACK..#endif,
  15039. and confined to ckcpro.w.  It doesn't seem to hurt anything, but it's hard to
  15040. set up a test case to actually force the condition.  24 Sep 99.
  15041.  
  15042. Added a (char *) cast to rdatap, which is (CHAR *), in the new <rgen>Y code.
  15043. ckcpro.w, 27 Sep 99.
  15044.  
  15045. Added an x-ref from HELP ECHO to XECHO and WRITE SCREEN.  ckuus2.c, 27 Sep 99.
  15046.  
  15047. From Jeff, 27 Sep 99:
  15048.  . Fixed typos in SET EDITOR code: ckuus[r4].c.
  15049.  . Fixed some mistakes in \v(hwparity) and v(serial): ckuus4.c.
  15050.  . Shuffled some Kerberos & SRP #ifdefs: ckcdeb.h, ckcfns.c.
  15051.  
  15052. Fixed a problem Jim Whitby noticed with quoting in ELSE statements.  This
  15053. problem was introduced when I unified IF and XIF, and occurs only when
  15054. ELSE begins on a line, followed by a { command list } rather than a single
  15055. command.  The solution (gross) was to make a special version of pushcmd()
  15056. (called pushqcmd()) for this situation, which doubles backslashes while
  15057. copying, BUT ONLY IF it's a command list (i.e. starts with "{"); otherwise
  15058. we break lots of other stuff.  Result passes Jim's test and still passes
  15059. ckedemo.ksc and iftest.ksc.  ckucmd.c, ckuus6.c, 27 Sep 99.
  15060.  
  15061. After learning that QNX does not always include TCP/IP, added a qnx32nonet
  15062. makefile target.  28 Sep 99.
  15063.  
  15064. Put the (char *) cast back in the strncmp() call in <rgen>Y; I don't know
  15065. why it keeps disappearing....  ckckpro.w. 28 Sep 99.
  15066.  
  15067. From Jeff: Fix confusion between #ifdef IKSD and #ifdef CK_LOGIN, allowing
  15068. a clean separation of the two concepts, and therefore IKSD implementations
  15069. on platforms that don't have authentication.  Most modules, 30 Sep 99.
  15070.  
  15071. Put the (char *) cast back in the strncmp() call in <rgen>Y; I don't know
  15072. why it keeps disappearing....  ckckpro.w. 30 Sep 99.
  15073.  
  15074. Changed ROBUST macro definition to also SET RELIABLE and (where appropriate)
  15075. CLEARCHANNEL OFF.  ckuus5.c, 30 Sep 99.
  15076.  
  15077. The previous change had no effect since the sequence SET RELIABLE OFF, TELNET
  15078. xxx also had no effect -- Kermit would SET RELIABLE ON anyway.  The problem
  15079. is that it had no way of knowing whether RELIABLE was OFF because the user
  15080. commanded it, or because it was set to OFF automatically when the previous
  15081. connection was not reliable.  Fixed with Yet Another Global Flag.  ckcmai.c,
  15082. ckuus[37y].c, 30 Sep 99.
  15083.  
  15084. From Jeff: Replace a missing line in ckuus4.c from yesterday's merge. 1 Oct 99.
  15085.  
  15086. From Jeroen Scheerder <J.Scheerder@csi.nl>: makefile target for Mac OS X 1.0.
  15087. (straight "make bsd44" works out of the box).  makefile, 1 Oct 99.
  15088.  
  15089. Also from Jeroen Scheerder: supply a missing semicolon in ztime().  ckutio.c,
  15090. 1 Oct 99.
  15091.  
  15092. Added Mac OS X symbols, designer banner. ckcdeb.h,ckuver.h,makefile, 1 Oct 99.
  15093.  
  15094. From Michael Weiser <michael@weiser.saale-net.de>: Fill in some missing
  15095. #ifndef NOXFER..#endif clauses.  ckucns.c, ckufio.c, ckuus[r47x].c, ckuscr.c,
  15096. 1 Oct 99.
  15097.  
  15098. From Jeff: New IF IKSD command.  ckuusr.h, ckuus6.c, 3 Oct 99.
  15099.  
  15100. From Jeff: Hooks for Windows IKSD.  ckuusy.c, ckcdeb.h, ckcmai.c, ckuath.c,
  15101. 3 Oct 99.
  15102.  
  15103. From Gary Brown <gsb@wcom.net>: "Situation: C-Kermit 7.0.196 Beta.10, 4 Sep
  15104. 1999, on a Linux system configured so the lockfile directory is not world
  15105. writable (but it is writable by group uucp, and kermit is setgid uucp).  Bug:
  15106. if you do a "set line" to a port that's already in use, Kermit leaves a
  15107. temporary lockfile ("/var/lock/LTMP.12345" or the like).  Then if you then do
  15108. another "set line," specifying another port, you get a "Sorry, write access to
  15109. UUCP lockfile directory denied" error.  Cause: If the (real) lockfile for that
  15110. port already exists, ttlock() in ckutio.c calls ttchkpid() to see if it's
  15111. stale.  ttchkpid() returns with privileges off, so the subsequent
  15112. unlink(tmpnam) fails, leaving the temp file around.  A subsequent "set line"
  15113. command fails, apparently because the creat() fails with EACCES, although it
  15114. successfully unlinks the file after that, so a third attempt will succeed.
  15115. And if the lockfile turns out to be stale, I suspect that the link() will fail
  15116. on the next pass through the loop, although I didn't test that case.  Fix: I
  15117. think the best bet is to priv_off() before calling ttchkpid() and priv_on()
  15118. afterwards (needed in two places)."  ckutio.c, 3 Oct 99.
  15119.  
  15120. Added an Openstep 4.2 Makefile target, based on NeXTSTEP 3.3.  3 Oct 99.
  15121.  
  15122. First cut at a Shift-JIS to UCS-2 translator (as a separate program).  It has
  15123. two big tables for Kanji (about 8K and 2.5k entries, respectively, for a total
  15124. of 10.5K unsigned shorts so about 21K bytes, of which 6K is wasted due to
  15125. sparseness).  Then it has an algorithmic translation for Katakana and a simple
  15126. transformation for Romaji and controls (a very small amount of code).  The
  15127. result compiles to about 40K on a Sparc and goes fast: 0.28 sec to convert a
  15128. 100K Shift-JIS file, or 360Kcps.  Some tuning might be able to bump up the
  15129. speed.  To be continued...
  15130.  
  15131. From Jeff, 4 Oct 99:
  15132.  . Hooks to mainline code for Windows NT authentication: ckcmai.c, etc.
  15133.  . Allow password to echo when logging in to IKSD anonymously: ckuus7.c.
  15134.  . Fix TRANSLATE command to work in K95 when writing to console: ckuus[r4].c.
  15135. The output-file character-set for TRANSLATE now defaults to "ucs2" for Unicode
  15136. output systems (e.g. Windows NT console) and the file character-set otherwise.
  15137.  
  15138. Rounded up Shift-JIS example files from the net (mostly HTML) for checking,
  15139. analysis, and benchmarks.  Streamlined the Shift-JIS/UCS-2 code, plugged some
  15140. holes, and added code to handle the User-Defined area (both sets have one).
  15141.  
  15142. Updated Mac OS X makefile targets from Jeroen Scheerder.  makefile, 4 Oct 99.
  15143.  
  15144. Also from Jeroen Scheerder: a cast to shut up warnings about an arg to
  15145. localtime() in ztime().  ckutio.c, 4 Oct 99.
  15146.  
  15147. Fixed OpenStep target to build ckcpro.c separately without optimization since
  15148. it crashes the compiler.  makefile, 4 Oct 99.
  15149.  
  15150. Changed CHAR * tocs to char * to shut up stubborn stupid compilers.  ckuusr.c,
  15151. 5 Oct 99.
  15152.  
  15153. Changed calls to mdmhup() to not fall back on tthang() if mdmhup() fails.
  15154. In other words, if SET MODEM HANGUP-METHOD is MODEM-COMMAND, then we use the
  15155. modem command; otherwise we drop DTR or whatever.  ckucns.c, ckudia.c,
  15156. ckuusr.c, 5 Oct 99.
  15157.  
  15158. From Jeff: Don't switch to clearchannel automatically on Rlogin connections.
  15159. ckcfns.c, 5 Oct 99.
  15160.  
  15161. From Jeff: Fix typos; fix Telnet screen-dimension negotiation for K95 IKSD.
  15162. ckcmai.c, ckuusr.c, ckctel.c, 6 Oct 99.
  15163.  
  15164. Rolled back SET MODEM HANGUP change -- it broke a lot of other stuff.
  15165. ckucns.c, ckudia.c, ckuusr.c, 6 Oct 99.
  15166.  
  15167. From Lucas Hart:
  15168.  
  15169.   Changes included in ckvio.diff (which also has a ckcmai.c patch for
  15170.   isabsolute):
  15171.  
  15172.   - Fill in zchko
  15173.   - Change log file error handling, zopen and zclose
  15174.   - Use parse result to handle <> and rel names in zmkdir; cleanup
  15175.   - Extend nzrtol to handle device spec in absolute to relative;
  15176.     more <> dir syntax;  no longer need absolute for zmkdir;
  15177.   - Convert non-file oriented device name to upper case in zfnqfp
  15178.     instead of appending cwd;  replace multiple strncat calls
  15179.   - Fix fgen edit 165
  15180.   - Fix typo in zrmdir
  15181.  
  15182.   Some quick comments on some of the code:
  15183.  
  15184.   - "graceful" error handling for log files
  15185.  
  15186.   My implementation of zchko does not fail when given an illegal file name,
  15187.   because nzrtol may subsequently convert a "multiple dot" Unix name to a
  15188.   legal file name, so the illegal file name causes a fopen error in zopeno.
  15189.   (Of course, it does make sense to convert the file name before testing
  15190.   for write ability, but I'll leave that for your consideration.)
  15191.  
  15192.   In zopeno,  perror(name) gave:
  15193.   beta10+ > log t xxt+.log
  15194.      xxt+.log: non-translatable vms error code: 0x186D4
  15195.     %rms-f-syn, file specification syntax error
  15196.   which I eventually transformed to a more concise:
  15197.  
  15198.     ?fopen file name syntax error : xxt+.log
  15199.  
  15200.   (I'm not sure about the declaration of ckvmserrstr; used the same
  15201.   form as in ckuus4.c)
  15202.  
  15203.   Note that the Unix zopeno has
  15204.  
  15205.       #ifdef COMMENT              /* Let upper levels print message. */
  15206.       perror("Can't open output file");
  15207.       #endif /* COMMENT */
  15208.  
  15209.   but I didn't find where a message is printed (at least where zopen is
  15210.   called in ckuus4.c)
  15211.  
  15212.   - don't know when the logs are flushed to disk; the log files are no
  15213.   longer 'locked by another user' when attempting to view them from
  15214.   another process and the files are still open, but I have yet to read
  15215.   data.  One step forward.
  15216.  
  15217.   - you would suggest looking at zchko :)  I check write capability with
  15218.   a RMS write and delete on close.  Easier to code than checking all the
  15219.   conditions under which VMS will grant write permission, and ckcplm.txt
  15220.   says
  15221.       Checks to see if a file of the given name can be created.  Returns:
  15222.       -1 if file cannot be created, or on any kind of error.
  15223.   (in contrast to the ckufio chko() text which states denial of write
  15224.   permission is the only error condition.)
  15225.  
  15226.   I still have some zchko questions but I'll send them separately, as they
  15227.   may relate to other problems that occur with the original zchko.
  15228.  
  15229.   - I don't like to think of how long it took me to find the typo in zrmdir.
  15230.   The symptom was that mkdir and rmdir were fine when no device was specified,
  15231.   but not on another disk.
  15232.  
  15233.   - In zmkdir, I eliminated some old code instead of commenting it out -
  15234.   for clarity only;  otherwise I pretty much patched my code in.
  15235.  
  15236.   - Hope you don't mind the suggestion for eliminating the multiple strncat
  15237.   calls in zfnqfp; the original seems repetitous but is well exercised.
  15238.  
  15239. ckcmai.c, ckvfio.c, 6 Oct 99.
  15240.  
  15241. Added some clarifications to GET docs & help text.  ckermit2.txt, ckuus2.c,
  15242. 7 Oct 99.
  15243.  
  15244. From Jeff, 7 Oct 99:
  15245.  
  15246.  . Added the ability to assign additional IP addresses for embedding into
  15247.    a Kerberos 5 TGT.  This is necessary for using K5 through a Network
  15248.    Address Translator.
  15249.  
  15250.  . Fixed a bug in the telnet negotiations.  If SB START_TLS FOLLOWS has
  15251.    been sent then we cannot send addition subnegotiations.  All attempts
  15252.    to send sub negotiations should be dropped on the floor.
  15253.  
  15254. ckctel.c ckcnet.c ckuath.c security.txt ckuus2.c ckuus7.c ckuath.h ckuusr.h.
  15255.  
  15256. Lucas Hart pointed out that "log session /foo/bar/baz/xxx" did not print an
  15257. error message when any of the directory path segments after the first did
  15258. not exist, as long as the user had write access to the path up to that point.
  15259. This points out a flaw in the zchko() design -- it doesn't distinguish among:
  15260.  
  15261.  . Can I overwrite an existing file?
  15262.  . Can I create a file (or directory) in an existing directory?
  15263.  . Can I create a file (or directory) and its parent(s)?
  15264.  
  15265. We can't change zchko() without breaking all sorts of things, so the fix
  15266. is to add error messages where they are missing at the higher levels.  In this
  15267. case, the log-opening functions were printing messages if zchko() detected an
  15268. error at filename parse time (in fact, these are printed by cmofi(), the
  15269. output-filename-parser) but were not printing any message if the parse
  15270. succeeded but opening the log failed.  This was fixed in debopn(), pktopn(),
  15271. etc (one routine per log).  ckuus4.c, 7 Oct 99.
  15272.  
  15273. Moved makelist() and brstrip() from ckuusr.[ch] to ckclib.[ch].  7 Oct 99.
  15274.  
  15275. Added a /REDIRECT switch to EXEC (UNIX only).  I don't know if it will work,
  15276. but the idea is that if there is a connection active (ttyfd > -1), this will
  15277. dup ttyfd to stdio before calling execvp(), the obvious application being to
  15278. use C-Kermit as the PPP dialer, and then overlaying itself with pppd or
  15279. whatever.  ckcdeb.h, ckuusr.c, ckufio.c, 7 Oct 99.
  15280.  
  15281. Added One Last New String Function: \fstripb(), which strips enclosing braces,
  15282. brackets, parens, or quotes from its arg.  Many options available, loads of
  15283. fun.  ckuusr.h, ckuus[24].c, ckermit2.txt, 7 Oct 99.
  15284.  
  15285. From Jeff: fixes for VOS networking.  ck[cl]net.[ch], 7 Oct 99.
  15286.  
  15287. From Jeff: a fix for a problem in which DIR would list two or more unreadable
  15288. files, but would fail to list one.  ckucmd.c, 7 Oct 99.
  15289.  
  15290. Eliminated double error messages when cmifi() fails when called from cmfdb().
  15291. ckucmd.c, 7 Oct 99.
  15292.  
  15293. Improved DELETE error message when cmfdb() fails.  ckuus6.c, 7 Oct 99.
  15294.  
  15295. From Jeff: enable syslogging for NT; NT login code juggling; more VOS fixes
  15296. (mainly for X.25-only build).  ckcdeb.h, ckcmai.c, ckcnet.c, ckuus[347].c,
  15297. 8 Oct 99.
  15298.  
  15299. Received confirmation that EXEC /REDIRECT works, at least on Linux for PPP
  15300. dialing.  9 Oct 99.
  15301.  
  15302. From Jeff: change many strcpy()'s to strncpy()'s to avoid memory leaks; finish
  15303. parameterizing all user-id buffer-length reference to UIDBUFLEN; ditto for
  15304. several other kinds of buffers.  ckcfns.c ckucmd.c ckufio.c ckcfn3.c ckutio.c
  15305. ckcnet.c ckclib.c ckctel.c, 9 Oct 99.
  15306.  
  15307. Worked on Kanji (still offline).
  15308.  
  15309. From Jeff: More strcpy -> strncpy: ckufio.c, ckuus[4rx].c; Some corrected
  15310. Telnet return codes: ckctel.c, ckucmd.c; updated auth stuff: ckuath.c.
  15311. 11 Oct 99.
  15312.  
  15313. Added ckstrncpy() to ckclib, which does what strncpy() should have done:
  15314. handles NULL args, ensures result is NUL-terminated, doesn't gratuitously
  15315. right-pad with NULs, and returns something useful: the number of bytes copied.
  15316. ckclib.[ch], 11 Oct 99.
  15317.  
  15318. Went thru many modules and replaced all strncpy(a,b,n) with ckstrncpy(a,b,n),
  15319. and removed subsequent, now superfluous, a[n] = NUL; statements (and also
  15320. marveled at the number of places where they were lacking).  Also whenever we
  15321. had a sequence like "strncpy(a,b,n); m = strlen(a);" this became simply
  15322. "m = ckstrncpy(a,b,n);" since ckstrlen() returns the number of bytes copied.
  15323. Also changed length references from (e.g.) XLEN-1 to XUFLEN, since ckstrncpy()
  15324. assumes it has been given the actual length of the buffer, and ensures that
  15325. the terminating byte or last byte is NUL. ck[cuv]*.[cw], 11 Oct 99.
  15326.  
  15327. Changed zfnqfp() define for non-zfnqfp() platforms from strncpy to ckstrncpy.
  15328. ckcdeb.h, 11 Oct 99.
  15329.  
  15330. Fixed return type of main() to agree with its declaration. ckcmai.c, 11 Oct 99.
  15331.  
  15332. Fixed some confusion in setting http_array.  ckuusr.c, 11 Oct 99.
  15333.  
  15334. Fixed printfs in shofea() that used "%d" to reference sizeof(), which is long.
  15335. ckuus5.c, 11 Oct 99.
  15336.  
  15337. In DIR /ARRAY, make sure we have a valid array pointer before referring to it.
  15338. ckuus6.c, 11 Oct 99.
  15339.  
  15340. Various other syntax adjustments, initializing variables, etc, to suppress
  15341. -Wall complaints that were not actually valid.  Many modules, 11 Oct 99.
  15342.  
  15343. Tested ckedemo.ksc and found that many strings were missing their final
  15344. character.  It seems that ckstrncpy() introduces a new subtlety.  Consider:
  15345.  
  15346.   char *p, * s = "oofa";
  15347.   int n = strlen(s);
  15348.   p = malloc(n+1);
  15349.  
  15350. The customary practice at this point is to:
  15351.  
  15352.   strcpy(p,s);
  15353.  
  15354. and this is absolutely correct (and we should keep doing it this way); we
  15355. know the buffer is the right size, and strcpy() sets the last byte to NUL.
  15356.  
  15357. However:
  15358.  
  15359.   strncpy(p,s,n);
  15360.  
  15361. is NOT correct, since it will not write a terminating NUL, even though most
  15362. people assume it will.  If, instead, you use:
  15363.  
  15364.   ckstrncpy(p,s,n);
  15365.  
  15366. the result will be "oof<NUL>" (not "oofa<NUL>"), since ckstrncpy() interprets
  15367. the third arg as the length of the destination buffer, not the length of the
  15368. source string, and it must ensure the terminating NUL.  Therefore, remember
  15369. when calling ckstrncpy() to give the actual, real, entire size of the buffer:
  15370.  
  15371.   n = strlen(s);
  15372.   p = malloc(n+1);
  15373.   ckstrncpy(p,s,n+1);  <-- But in this case it's still better to use strcpy().
  15374.  
  15375. To illustrate this a different way, suppose you have a string s = "[1]":
  15376.  
  15377.   strncpy(s+1,"2",1);  --> "[2]"
  15378.  
  15379. But:
  15380.  
  15381.   ckstrncpy(s+1,"2",1);  --> "[" (because it NUL-terminates).
  15382.  
  15383. So be careful with this one -- it's not a plug-compatible replacement for
  15384. strncpy().  I went thru the code and checked each call, and changed some of
  15385. them back to strcpy() or strncpy() when appropriate.  In general the rule is:
  15386. use ckstrncpy() to copy a string to a general-purpose big buffer whose length
  15387. is a constant, e.g. "ckstrncpy(line,s,LINBUFSIZ);" but use strncpy() to copy a
  15388. specific number of bytes from the source string, e.g.  "strncpy(line,s,n);"
  15389. followed by "line[n] = NUL;" if the intention is not to insert s at the
  15390. beginning of the string that is already in line[], or else
  15391. "ckstrncpy(line,s,n+1);".
  15392.  
  15393. From Jeff: Corrected a misplaced #ifdef from my changes yesterday, which
  15394. caused streaming transfers to fail.  ckcpro.w, 12 Oct 99.
  15395.  
  15396. Changed a few ckstrncpy's back strncpy's in ckcpro.w and ckcfn*.c.  The rule
  15397. is: use ckstrncpy when you don't know the source length, and you are copying
  15398. to a buffer whose length is known.  Use strncpy() to copy a specific number
  15399. of bytes from the source to the destination.  12 Oct 99.
  15400.  
  15401. Prior to integrating Kanji/Unicode translations, built in various
  15402. configurations on Linux to get baselines:
  15403.  
  15404.   NOCSETS NOUNICODE NOKANJI
  15405.    [   ]    [   ]    [   ]    1329014
  15406.    [   ]    [   ]    [ X ]    1325686 (because it's all done by algorithm)
  15407.    [   ]    [ X ]    [   ]    1158837 (removes 170K, mostly tables
  15408.    [ X ]    [ x ]    [ x ]    1090845 (removes 238K, mostly tables)
  15409.  
  15410. From Jeff: Symbols & parsing for TELOPT ... COM-PORT-CONTROL.  ckuusr.h,
  15411. ckuus[r3].c, 12 Oct 99.
  15412.  
  15413. More minor adjustments to yesterday's ckstrncpy() work. ckuus[57].c, 12 Oct 99.
  15414.  
  15415. Began merging Kanji/Unicode code from offline into C-Kermit...  Added tables
  15416. to ckcuni.c.  This brings full Linux build up to 1393157 bytes.  Added
  15417. functions and prototypes to ckcuni.[ch].  Filled in the appropriate calls in
  15418. xgnbyte() in ckcfns.c.  Compiled but didn't test.  Full Linux binary now
  15419. 1400670 (so only about 7K for the code).  The ckcuni.c source file is now over
  15420. 700K, about twice as long as any other source module.  12 Oct 99.
  15421.  
  15422. Filled in xpnbyte() and then began testing.  Everything worked pretty well
  15423. except for occasional strange corrupted spots in the new file when using UCS-2
  15424. as the transfer charset.  The problem (which is not new to the Kanji code)
  15425. turns out to be: getpkt() calls some routine to get the next byte because
  15426. that's what we put in packets: bytes.  Well, if the "get next byte" routine
  15427. returns (say) 0x0A, getpkt() had no way of knowing that this was actually part
  15428. of a Unicode, and therefore not to treat it like a linfeed, and therefore it
  15429. inserted a carriage return into the data stream, which of course changed the
  15430. Unicode character.  And then it inserted a (null and a) linefeed next time
  15431. around.  The cure involved moving all the end-of-line logic for Unicode to
  15432. xgnbyte() and disabling it for Unicode in getpkt() itself. ckcfns.c, 13 Oct 99.
  15433.  
  15434. Tested sending from PC (Little Endian) to Sparc (Big Endian): OK.  Tested
  15435. non-Japanese transfers (e.g. Latin-1) thru Unicode: OK.  Built with NOKANJI,
  15436. NOUNICODE, and NOCSETS to make sure #ifdefs were OK.  Built on HP-UX 10.20
  15437. with ANSI compiler.  Added -DMAINISVOID to HP-UX 100 ANSI-C compiler targets.
  15438. makefile, 13 Oct 99.
  15439.  
  15440. From Jeff: Changes for building on Windows 2000, mainly that NOCRYPT must be
  15441. defined before #including <windows.h>: ckcsig.h, ckcdeb.h.  IKSD idle timeout:
  15442. ckcpro.w, ckuusx.c, ckcmai.c, ckucmd.c.  13 Oct 99.
  15443.  
  15444. Added EUC-JP as preferred keyword for JAPANESE-EUC, according to common usage,
  15445. and made JAPANESE-EUC invisible.  ckuxla.c, 14 Oct 99.
  15446.  
  15447. Finally gave in and added REMOTE SET FILE CHARACTER-SET.  It simply passes the
  15448. character-set name string to the server, which looks it up in its own table;
  15449. thus the string must be in the server's syntax.  When the server gets this
  15450. command, it also disables automatic character-set selection (otherwise the
  15451. command would have no effect).  ckuus7.c, ckcfns.c, 14 Oct 99.
  15452.  
  15453. This enables cycling through all the new translations in a script like so:
  15454.  
  15455. dcl \&x[] = euc ucs2 utf8             ; xfer charsets
  15456. dcl \&y[] = eu uc ut                  ; abbrevs
  15457. dcl \&f[] = shift euc jis7 ucs2 utf8  ; file charsets
  15458. dcl \&g[] = sj eu j7 uc ut            ; abbrevs
  15459.  
  15460. set file char shift-jis               ; local file character-set is Shift-JIS
  15461. for \%i 1 \fdim(&x) 1 {               ; for each transfer character-set...
  15462.     set xfer char \&x[\%i]            ; set it
  15463.     for \%j 1 \fdim(&f) 1 {           ; for each remote file character-set...
  15464.     remote set file char \&f[\%j] ; set it
  15465.         if fail exit 1 SERVER REJECTED CHARSET
  15466.         send /text meibo-sj.html meibo-sj-\&y[\%i]-\&g[\%j].txt
  15467.         if fail exit 1 TRANSFER FAILED
  15468.     }
  15469. }
  15470.  
  15471. Ran this test (the source file is Shift-JIS and contains Roman, halfwidth
  15472. Katakana, and Kanji) and inspected the results: 9 good, 6 bad:
  15473.  
  15474.   meibo-sj-eu-eu.txt  Looks ok
  15475.   meibo-sj-eu-j7.txt  Looks ok
  15476.   meibo-sj-eu-sj.txt  Is OK (matches original)
  15477.   meibo-sj-eu-uc.txt  BAD -- only ascii chars survived
  15478.   meibo-sj-eu-ut.txt  BAD -- only ascii chars survived
  15479.   meibo-sj-uc-eu.txt  Looks ok - matches meibo-sj-eu-eu.txt
  15480.   meibo-sj-uc-j7.txt  BAD -- spurious ">^N" inserted everywhere
  15481.   meibo-sj-uc-sj.txt  BAD -- looks like Shift-JIS with NUL between each byte
  15482.   meibo-sj-uc-uc.txt  Looks ok
  15483.   meibo-sj-uc-ut.txt  Looks ok
  15484.   meibo-sj-ut-eu.txt  Looks ok
  15485.   meibo-sj-ut-j7.txt  BAD -- Just like meibo-sj-uc-j7.txt
  15486.   meibo-sj-ut-sj.txt  BAD -- Just like meibo-sj-uc-sj.txt
  15487.   meibo-sj-ut-uc.txt  Looks ok
  15488.   meibo-sj-ut-ut.txt  Looks ok
  15489.  
  15490. This pinpoints the problem areas pretty well.  These two:
  15491.   meibo-sj-eu-uc.txt  BAD -- only ascii chars survived
  15492.   meibo-sj-eu-ut.txt  BAD -- only ascii chars survived
  15493.  
  15494. are from the new (TCS=EUC)->(FCS=Unicode) section of xpnbyte().  Problem:
  15495. xpnbyte() isn't even being called in this case.  Diagnosis: tests in decode()
  15496. were in the wrong order.  Once the code was exercised some more bugs were
  15497. found and fixed, but there are still a couple spots where translations differ
  15498. from (TCS=Unicode)->(FCS=Unicode).  This is not so much an issue of
  15499. translation as it is of parsing, keeping track of state, etc.  So this one's
  15500. pretty good now; we'll come back and touch it up later.  New score: 11 to 4.
  15501.  
  15502. These two:
  15503.   meibo-sj-uc-sj.txt  BAD -- looks like Shift-JIS with NUL between each byte
  15504.   meibo-sj-ut-sj.txt  BAD -- Just like meibo-sj-uc-sj.txt
  15505.  
  15506. are simply forgetting to not output both bytes if the left half is empty.
  15507. Fixed in xpnbyte().  Score: 13 to 2.
  15508.  
  15509. And these two:
  15510.   meibo-sj-uc-j7.txt  BAD -- spurious ">^N" inserted everywhere
  15511.   meibo-sj-ut-j7.txt  BAD -- Just like meibo-sj-uc-j7.txt
  15512.  
  15513. indicate a problem in the new JIS-7 constructor when it has to write out
  15514. halfwidth Katakana.  A tiny error in the state machine.  Final score: 15 to 0.
  15515.  
  15516. All fixes confined to ckcfns.c, 14 Oct 99.
  15517.  
  15518. From Jeff: Syslogging changes for NT.  ckcmai.c, 15 Oct 99.
  15519.  
  15520. Remaining problems with EUC->Unicode translation fixed -- in fact they were
  15521. already fixed yesterday; I was looking at old versions of the files.
  15522.  
  15523. Now I have a good copy of the meibo file in all five character sets.  This
  15524. means I can write a new script to translate it from each Japanese character
  15525. set to each other one, similar to the script above.  But the output was too
  15526. noisy so I made TRANSLATE suppress messages if QUIET ON.  First results: 15
  15527. bad, 10 good.  Reason, there seems to be no code to handle Japanese except
  15528. when source or target set is Unicode.  Added code but the score is about the
  15529. same.  ckuus4.c, 15 Oct 99.
  15530.  
  15531. From Jeff: Changed syslog to accept the Kermit message type instead of the
  15532. Unix Syslog message type as the first parameter.  The second parameter is
  15533. whether the message indicates success (1) or (failure).  This is so that the
  15534. appropriate NT Event Log message type may be selected.  SET SYSLOG added so
  15535. the range of messages that are logged may be changed in the iksd.conf file.
  15536. There needs to be a test applied to all SET commands that affect logs that
  15537. restrict access to the command after a user is logged in to IKSD.  ckcpro.w,
  15538. ckuusx.c, ckuus3.c, ckcmai.c, ckufio.c, ckcdeb.h, ckuath.c, ckucmd.c,
  15539. ckuusr.c, ckcfns.c, ckuusr.h.  17 Oct 99.
  15540.  
  15541. Back to Kanji TRANSLATE...  The whole business was getting way out of hand --
  15542. too many combinations, too much duplicated code.  So I junked everything so
  15543. far and tried a simpler approach: source -> UCS2 -> target in all cases, using
  15544. xgnbyte() to feed bytes to xpnbyte().  Now the score is 15:10.  Ironed out
  15545. some confusion over the UCS BOM, improving the score to 20:5.  The bad cases
  15546. were JIS7-to-anything-else.  Found & fixed a typo in getj7(), now 25:0.
  15547. ckuxla.c, 17 Oct 99.
  15548.  
  15549. Moved j7init(), getj7(), eu_to_sj(), and sj_to_eu() out of ckcuni, since they
  15550. have nothing to do with Unicode and can be used in non-Unicode builds.
  15551. ckcuni.[ch], ckcxla.h, ckuxla.c, 17 Oct 99.
  15552.  
  15553. But getting this working is just the first step.  Now the job of cleaning up
  15554. the #ifdefs and preserving correct TRANSLATE operation in non-UNICODE and/or
  15555. non-KANJI builds.  The first task is to make the xgnbyte()/xpnbyte() also work
  15556. for Japanese without Unicode; this is a big plus because it turns out the
  15557. TRANSLATE command has never worked for Japanese.  (hours later...) Got
  15558. C-Kermit to compile and link again with -DNOUNICODE.  Kanji translations work
  15559. except in the halfwidth Katakana spots.  Several hours later all the
  15560. no-Unicode combinations worked.  Rebuilt with UNICODE defined; ran the
  15561. original test, score is back down to 13:12, ugh.  The good ones are (a)
  15562. anything-to-self; (b) anything-to-Unicode.  The bad ones are anything to
  15563. Shift-JIS, JIS7, or EUC.  Aha.  So after one more round, these work again too.
  15564. So now we have a workable model for multibyte/variable-byte character sets
  15565. that can be extended to Chinese, Korean, etc.
  15566.  
  15567. Added output function pointers to arg lists for pnbyte() and xpnbyte().
  15568. ckcker.h, ckcfns.c, ckuus4.c, 18 Oct 99.
  15569.  
  15570. Fixed TRANSLATE <infile> UCS2 UCS2 <outfile> to automatically swap bytes
  15571. if <infile> is the wrong byte order.  ckuus4.c, 18 Oct 99.
  15572.  
  15573. Tested the following builds, adjusting #ifdefs and declarations until all
  15574. of them were stable:
  15575.  
  15576.  -DUNICODE -DNOKANJI
  15577.  -DNOUNICODE -DKANJI
  15578.  -DNOCSETS (saves 350K on Sparc vs full build)
  15579.   Non-ANSI compiler: uh oh, ckcuni.c crashes the SunOS assembler.
  15580.  
  15581. Added -DNOUNICODE to SunOS cc targets.  Also reorganized the makefile to put
  15582. antique targets at the end, and to group the remaining targets a little
  15583. better.  Also added -DNOUNICODE to the non-antique targets that typically blow
  15584. up when we add something new: AT&T UNIX PC, SVR3 and earlier, SV68, Xenix, and
  15585. various small-model targets.  makefile, 18 Oct 99.
  15586.  
  15587. Rebuilt on Sparc and PC, and ran the file-transfer test from Sparc (BE) to
  15588. Linux/PC (LE):
  15589.  
  15590.  . PC translation of incoming to EUC, JIS7, and Shift-JIS OK.
  15591.  . PC translation of incoming to UCS2 swaps bytes OK but gets bad spots.
  15592.  . PC translation of incoming to UTF8 is OK except in one case
  15593.  
  15594. The UTF-8 result has all of the Kanji characters replaced by 0xEFBF, which is
  15595. the UTF-8 translation of UCS-2 0xFFFD.  This happened only when the PC was
  15596. translating from EUC to UTF-8.  It did not happen when translating to UTF-8
  15597. from UCS-2 or UTF-8.  Now, since we translate to UCS-2 first, this pretty much
  15598. narrows the problem to xpnbyte(): EUC->UCS section.  The problem: eu_to_sj()
  15599. was using hardwired byte numbers, rather than indexing through byteorder.
  15600. That fixed the UTF-8 problem and the UCS-2 problems.  ckuxla.c, 18 Oct 99.
  15601.  
  15602. Ran the exact same test (every combination of Kanji FCS and TCS) in the
  15603. opposite direction: PC to Sparc.  It worked perfectly.  18 Oct 99.
  15604.  
  15605. As to TRANSMIT...  Well, TRANSMIT can do with character sets only what CONNECT
  15606. can do, and C-Kermit CONNECT doesn't handle Japanese.  A major redesign and
  15607. rewrite would be required.  I think the trick would be to make ckcputc() be
  15608. the analogue of xpnbyte() and ckcgetc() to be the equivalent of xgnbyte() (and
  15609. added a note to this effect to ckucns.c).  But this would probably be a week's
  15610. worth of coding and testing for a feature nobody has ever asked for.  So we'll
  15611. defer Japanese character-set support in CONNECT and TRANSMIT until after 7.0.
  15612. Updated ckermit2.txt to reflect the current and probably final state of
  15613. affairs for Kanji and Unicode in 7.0.  18 Oct 99.
  15614.  
  15615. Removed voluminous debug() statements from x[gp]nbyte().  ckcfns.c, 18 Oct 99.
  15616.  
  15617. As an experiment, added a global flag wasclosed, which is set to 1 by any code
  15618. that closes a connection (and sets ttyfd to -1), and is tested and reset at
  15619. the top of the parse loop.  ckcmai.c (definition); ckuus5.c (test and reset);
  15620. ck[uv]tio.c, ck[cl]net.c (set).  For this to work in other platforms requires
  15621. similar additions to ck?tio.c.  A closed connection is noticed only in the
  15622. command loop, because that's the only place that any user-defined actions can
  15623. be executed.  If the user gives a SET LINE/PORT/HOST/etc command while another
  15624. connection is still open, there is also a check in hupok(), so if they have
  15625. SET EXIT WARNING ON it will work here too.  Otherwise it won't since both the
  15626. close and the new open happen within the same call to ttopen().  A second
  15627. variable, whyclosed, tells why the connection was closed: 0 is the catch-all
  15628. "closed by remote"; 1 = HANGUP or CLOSE by user, 2 = auth failure.  At the top
  15629. of the parse loop, if wasclosed is set and a macro called ON_CLOSE is defined,
  15630. we set it up and execute it.  The close reason (0, 1, or 2) is passed to the
  15631. macro as \%1.  18 Oct 99.
  15632.  
  15633. Spiffed up ON_CLOSE a bit by calling it in clsconnx(), which is our new
  15634. all-purpose ckuus*.c connection-closing routine, and in the exit sequence,
  15635. just before ON_EXIT.  This SEEMS to catch all the places where we need it.
  15636. ckuus[57x].c, ckermit2.txt, 18 Oct 99.
  15637.  
  15638. Fixed SET FILE CHARACTER-SET to not use the same chained FDBs as REMOTE
  15639. SET  FILE CHARACTER-SET.  ckuus7.c, 19 Oct 99.
  15640.  
  15641. From Jeff: ckcmai.c: the login functionality has to take place in the first
  15642. thread on NT.  ckcfns.c: fix pnbyte() call in reof() to reference appropriate
  15643. output function pointer.  ckcmai.c ckuus3.c: minor change to allow SET SYSLOG
  15644. to only work on IKSD during the processing of IKSDCONF.  19 Oct 99.
  15645.  
  15646. Next project: SEND /ARRAY:<arrayref>.  When done, this command lets Kermit
  15647. send the contents of any array.  The major goal is to link file transfer and
  15648. scripting.  With this, for example, a Kermit script can read selected lines
  15649. from a file into an array, manipulate the lines or the array in any desired
  15650. way, and send the result without intermediate files or filters.  Added parsing
  15651. to ckuusr.[ch], plus a preliminary test routine that I'll finish & move
  15652. tomorrow.  19 Oct 99.
  15653.  
  15654. Finished SEND /ARRAY.  Removed test code from ckuusr.c, moved the dummy
  15655. gnbyte() routine (get next byte from array) to ckcfns.c, changed zminchar()
  15656. macro definition to call agnbyte() when sending from an array.  Faked the
  15657. filename as "_array_a_" (or b, etc).  Made sure we can still build with
  15658. -DNOSPL.  ckcker.h, ckuus[r2].c, ckcfn[s3].c, ckermit2.txt, 20 Oct 99.
  15659.  
  15660. Merged in Jeff's changes mainly for Kerberos and ON_CLOSE reasons for Telnet
  15661. protocol-based closure.  Many modules.  20 Oct 99.
  15662.  
  15663. Removed the -DMAINISVOID's that were added to the makefile recently and
  15664. changed the default type for main() from void to int, and simplified the
  15665. hideous #ifdefs around it.  NOW let's see who hollers...  ckcmai.c, 20 Oct 99.
  15666.  
  15667. Shuffled some lines in TRANSLATE to avoid "statement not reached" errors in
  15668. HP-UX.  ckuus4.c, 21 Oct 99.
  15669.  
  15670. Fixed a debug() call in ckcfn3.c, 21 Oct 99.
  15671.  
  15672. Peter E reports that when using a Telnet modem server, after the following
  15673. sequence of commands:
  15674.  
  15675.   dial xxxx <-- does not exist in dialing directory
  15676.   dial yyyy <-- does exist in dialing directory
  15677.  
  15678. the redial number is xxxx and not yyyy.  It doesn't happen when dialing with a
  15679. serial port.  The variable is dialnum.  I don't have a Telnet modem server and
  15680. can't reproduce it, and inspection of the code shows that from between the
  15681. time the number is fetched and it is stored, there is no different path
  15682. through the code for serial and network dialing.  Will have to dummy it up
  15683. with a fake modem server:
  15684.  
  15685.   set host /connect * 3000
  15686.   set terminal newline on  ; (So Enter sends CRLF)
  15687.  
  15688. Client does the regular sequence to use it:
  15689.  
  15690.   set host 0 3000
  15691.   set modem type hayes
  15692.   set dial display on
  15693.   set dial directory foo ; File that has entry for yyyy but not xxxx
  15694.   dial xxxx
  15695.  
  15696. In the server window I type OK<Enter> to each setup command and then
  15697. NO CARRIER<Enter> to the ATDTxxxx command.  Then I tell client to "dial yyyy"
  15698. and go thru the same sequence at the server.  Now SHOW DIAL on the client
  15699. shows the correct redial number: yyyy (not xxxx).
  15700.  
  15701. Changed character-set associations for incoming files when transfer character
  15702. set is UCS-2 or UTF-8 to be UCS-2 in Windows, UTF-8 elsewhere.  ckuxla.c,
  15703. 22 Oct 99.
  15704.  
  15705. In testing the previous change noticed that SEND /TEXT did not work any more,
  15706. i.e. it did not force a text-mode transfer.  Refer to previous notes
  15707. throughout 1998 about automatic mode-switching versus SET TRANSFER MODE, etc.
  15708. The notes make sense but the code in whoarewe() did not agree with the prose.
  15709. Removed a mistaken test on the saved transfer mode.  ckcfns.c, 22 Oct 99.
  15710.  
  15711. A minor command-parsing improvement.  Suppose you type "te" and then Esc at
  15712. top level.  It beeps because more than one command starts with "te", so then
  15713. you type "?" to see what they are but Kermit shows "telnet" as the only
  15714. possibility.  So why the beep?  Because of invisible keywords like "telopt",
  15715. "terminal", and "text".  But there is no way for the user to discover them.
  15716. The improvement is: if ? is typed AFTER the beginning of a keyword field, then
  15717. invisible keywords are shown too, but if it is typed at the beginning of a
  15718. field, only visible keywords are shown, as before.  ckucmd.c, 22 Oct 99.
  15719.  
  15720. Since we have the Base64 conversion routines anyway, added /FROMB64 and
  15721. /TOB64 switches to the COPY command.  ckclib.[ch], ckuus[26].c, 22 Oct 99.
  15722.  
  15723. From Jeff: Correction to TAPI dialing setup: ckuus6.c; minor Win9x
  15724. authentication changes: ckcmai.c.  23 Oct 99.
  15725.  
  15726. Added some debugging and commentary to makestr().  ckclib.c, 23 Oct 99.
  15727.  
  15728. Put a malloc-failure error check after setting redial number to help catch
  15729. Peter E's problem.  Ran the big demo script with debug log to see if any
  15730. malloc entries appeared; none did.  ckuus6.c, 23 Oct 99.
  15731.  
  15732. There was an inconsistency in macro invocations.  If xx is macro name, it can
  15733. be invoked as "xx" or "do xx".  An "immediate" macro can be invoked as
  15734. "{ command, command, ... }".  But "DO { command, command, ... }" gave a syntax
  15735. error.  Fixed in ckuusr.c, 23 Oct 99.  Restriction: immediate macros can not
  15736. take args (this would have been a big deal to program in the non-DO case but
  15737. actually pretty easy in the DO case).  The big demo script still works.
  15738.  
  15739. Rob Seace <rob@wordstock.com> reported that the getline script did not work
  15740. in QNX.  Of course it doesn't, QNX has no UUCP lockfiles or any other method
  15741. for locking dialout devices.  But Rob pointed out that QNX has a dev_info()
  15742. call that returns the open count.  But we can't really use it as a lock since
  15743. we don't necessarily know its full set of behaviors, nor do we know to what
  15744. degree users depend on the current behavior.  So I added a new command, which
  15745. is visible only in QNX (but which can be given anywhere, but does nothing):
  15746. SET QNX-PORT-LOCK { ON, OFF }.  It is OFF by default.  When ON, it allows the
  15747. open count to serve as a port lock.  In the meantime (until the next Beta),
  15748. added a note to getline.  Then made a new getline that works right with QNX,
  15749. which can be installed when Beta.11 is released.  In ckutio.c, I added
  15750. a qnxopencount() routine, which gives the device open count.  ttlock() calls
  15751. this and fails if the count is > 1 and QNX-PORT-LOCK is ON.  SHOW COMM (fo
  15752. QNX only) displays the QNX-PORT-LOCK setting and, if a device is open, the
  15753. current open count.
  15754.  
  15755. In building on QNX I found some #ifdefs had slipped out of their places as
  15756. they are wont to do, and so fixed them.  ckutio.c,
  15757.  
  15758. Found that the old bug of curses working only once in QNX seems to be fixed,
  15759. whether by Kermit or a newer QNX version I don't know.
  15760.  
  15761. Tried resurrecting the 16-bit QNX version, this time with -DNOSPL and
  15762. -DNOFLOAT.  It built fine, starts OK, but it beeps when you type a space, CR,
  15763. etc, after the top-level keyword.  But aside from that it seems to work OK, so
  15764. apparently the problems I've been having till how have to do with the new
  15765. floating-point support (plus the large size of ckuus4.c).  The compiler is
  15766. Watcom 10.6.  Extensive debugging shows the bell is not being run by Kermit
  15767. calling bleep().  Tried building again with TCP/IP and found it would make the
  15768. connection, complete the Telnet negotiations, show the login prompt, but
  15769. apparently would not send keystrokes.  Comparing logs from the 16 and 32 bit
  15770. versions showed that the qnx32 version had FIONREAD defined, but qnx16 did
  15771. not.  Fiddled the #includes to force the 16-bit to include <ioctl.h>, and now
  15772. it does use the FIONREAD ioctl, which works, but we still get the same
  15773. symptom, and I really can not see the difference in the log.  This was all
  15774. with ckucns.c.  Switched back to ckucon.c.  No difference.  The debug log
  15775. of the 16-bit version looks just like the debug log of the 32-bit version...
  15776. Well, to make a very much longer story short, it turns out a piece of
  15777. buffer-filling code was lost in the #ifdefs for NOCSETS builds when Unicode
  15778. support was added to ckucns.c, and the mistake was copied to ckucon.c.
  15779. Fixed in both, 23 Oct 99.  (But we still get the mysterious beep.)
  15780.  
  15781. Makefile updated to rehabilitate qnx16.  23 Oct 99.
  15782.  
  15783. Fixed a misplaced last-minute #ifdef in yesterday's code that prevented
  15784. ckcuni.c from compiling.  24 Oct 99.
  15785.  
  15786. Propagated #indef NOCSETS correction to ckvcon.c, 24 Oct 99.
  15787.  
  15788. There has always been a confusing lack of symmetry between OPEN and CLOSE.
  15789. Also, SET LINE and SET HOST are misnamed because SET is not supposed to be
  15790. an action command.  So...
  15791.  
  15792.  . Uncoupled the OPEN command from file disposition symbols as keyword
  15793.    values, and defined a new set of OPN_xxx symbols for it. ckcker.h,
  15794.    ckuusr.h, 24 Oct 99.
  15795.  
  15796.  . Made OPEN HOST, OPEN LINE (PORT) be synonyms for SET HOST, SET LINE
  15797.    (PORT).  ckuus[36].c, 24 Oct 99.
  15798.  
  15799.  . Made CLOSE !READ and CLOSE !WRITE acceptable synonyms for CLOSE READ
  15800.    and WRITE, and CLOSE HOST, LINE, and PORT synonyms for CLOSE
  15801.    CONNECTION.  ckuusr.c, 24 Oct 99.
  15802.  
  15803. Some corrections to typos un_to_sj() noticed by Jeff.  ckcuni.c, 24 Oct 99.
  15804.  
  15805. Another longstanding item on the to-do list: INPUT pattern matching.  Expect
  15806. can do it, Kermit can't.  I thought of a way to add this that does not involve
  15807. huge amounts of redesign or breaking existing scripts.  Since the pattern is
  15808. always passed through xxstring at parse time anyway, I added a new function
  15809. \fpattern(), which simply returns its argument (after evaluation) and sets a
  15810. flag saying it's a pattern.  Then a parallel array of flags is passed to
  15811. doinput() along with the regular array of MINPUT search strings.  This allows
  15812. both patterns and literal strings to be used with INPUT and lets MINPUT be
  15813. given any mixture of patterns and literal strings.  In the matching loop, if
  15814. the current search string is a pattern, we call ckmatch() on the pattern and
  15815. all right substrings of the string we have input so far.  Crude but effective
  15816. (and necessary, since we also want to set a variable to the piece that
  15817. matched, and this could not be done otherwise).  ckuusr.h, ckuus[r24].c,
  15818. ckermit2.txt, 24 Oct 99.
  15819.  
  15820. Updated REINPUT to also accept a pattern.  ckuus4.c, 24 Oct 99.
  15821.  
  15822. Protected a comparison of type KEY with > 255 by #ifdefs on platforms where
  15823. KEY is CHAR or char.  showkeycode(): ckuus5.c, 25 Oct 99.
  15824.  
  15825. Added debugging to dodial() and ckdial() to catch Peter E's bug.  ckuus6.c,
  15826. ckudia.c, 25 Oct 99.
  15827.  
  15828. Some minor syntax corrections for VMS.  ckvfio.c, ckuus6.c, 25 Oct 99.
  15829.  
  15830. Built on VMS with runtime checking of array bounds, pointer values, and
  15831. for references to uninitialized variables -- let's hear it for DECC!.  Tested
  15832. CONNECT mode, file transfer, and script execution -- no problems were reported.
  15833. 25 Oct 99.
  15834.  
  15835. Added ON_OPEN.  It gets ttname[] as its only argument; probably most other
  15836. items are available as \v(things).  More open/close symmetry...  ckuus[7y].c,
  15837. 25 Oct 99.
  15838.  
  15839. Peter's REDIAL problem solved.  It's not Kermit, it's his modem.  The modem is
  15840. told to "ATDsomestring" and replies "OK" because "somestring" contains an "s",
  15841. which triggers some unknown function in the modem.  To Kermit, "OK" means
  15842. "partial dialing successful" and so sets the partial flag, which in turn
  15843. inhibits storage of the REDIAL number.  Changed so when the modem replies "OK"
  15844. to an ATD command and the Kermit command was not PDIAL and the dial number did
  15845. not end with ';', it is now considered an error.  ckudia.c, 26 Oct 99.
  15846.  
  15847. Corrections from Jeff to dofast().  ckcfn3.c, 26 Oct 99.
  15848.  
  15849. Lots of minor changes from Jeff, plus the beginning of an IKSD command (what
  15850. is it?).  ckcdeb.h ckcfn3.c ckcker.h ckuath.c ckucns.c ckutio.c ckuus2.c
  15851. ckuus4.c ckuusr.c ckuusr.h ckuusx.c ckwart.c, 27 Oct 99.
  15852.  
  15853. Changed UNIX CONNECT-mode Ctrl-\? menu to be clearer and to only list
  15854. options that make sense on the current kind of connection.  ckucns.c,
  15855. 27 Oct 99.
  15856.  
  15857. In trying to chase down a report that K95 reported backwards file types
  15858. when receiving files from TSO Kermit, which, unlike most other Kermits,
  15859. includes the Format of Records within Packets attribute (/), changed gattr()
  15860. to handle this attribute in incoming packets (previously it ignored it
  15861. except in VOS, and the VOS code was bogus).  This made no difference.  So then
  15862. I dummied up C-Kermit to send A-packets with the same fields as TSO Kermit.
  15863. This made no difference either -- I still can't see anything wrong.  ckcfn3.c,
  15864. 27 Oct 99.
  15865.  
  15866. Found a couple places in ttinl() where wasclosed wasn't being set, which
  15867. prevented ON_CLOSE from running if the connection dropped during a file
  15868. transfer.  As a by-product, fixed this case so ttclos() was called, thus
  15869. ensuring that subsequent calls to ttchk() would behave as expected, rather
  15870. than indicating the connection was still open.  ckutio.c, 27 Oct 99.
  15871.  
  15872. Added "iso2022jp" as a synonym for JIS-7.  They aren't exactly the same, but
  15873. they're close enough (ISO 2022-JP is specified in RFC1463 and seems to be the
  15874. same as DEC Kanji, which we also support as if it were JIS-7, different only
  15875. in that JIS-7 includes SO/SI access to halfwidth Katakana and the other two
  15876. don't).  ckuxla.c, 27 Oct 99.
  15877.  
  15878. Rewrote UNIX ttclos() to handle the case better where close() doesn't return
  15879. and we time out.  Now we set O_NDELAY first (if available) we also re-set the
  15880. alarm before trying any operation that might hang, such as tthang(), ttres(),
  15881. close(), etc, to avoid being stuck for a really long time (or forever), and
  15882. in fact, since any or all of these might time out, the new implementation is
  15883. a state machine that remembers how far it it got so it doesn't repeat any
  15884. previous steps (which has been its mistake up till now).  ckutio.c, 28 Oct 99.
  15885.  
  15886. Discovered that mdmhup() (the routine that hangs up a modem by sending +++ATH0
  15887. or whatever to it) didn't work right if no prior DIAL command had been given,
  15888. since the modem-command response-reading function pointer had not yet been set
  15889. up.  Fixed in ckudia.c, 28 Oct 99.
  15890.  
  15891. Added more error-checking and debugging to the POSIX section of tthang().
  15892. ckutio.c, 29 Oct 99.
  15893.  
  15894. Added Rockwell V.90 modem.  ckuusr.h, ckudia.c, 29 Oct 99.
  15895.  
  15896. Assorted changes from Jeff: ckuath.c ckuusy.c ckuus5.c ckcnet.c ckuusr.h
  15897. ckuusr.c, 29 Oct 99.
  15898.  
  15899. From Jeff: ckcmai.c - iksdcfg flag in the wrong place; ckudia.c - typo in new
  15900. modem def's; ckuusr.c - correction for OS2; ckuath.c - SSL/TLS improvements.
  15901. 30 Oct 99.
  15902.  
  15903. Dave Sneddon noticed when C-Kermit was in the middle between a terminal and a
  15904. VMS system, that SET TERM/INQ on VMS caused errors if SET TERM APC is ON.  The
  15905. same thing happens with the VMS and UNIX versions.  I seem to have broken this
  15906. when adding the Transparent Print code.  The problem is that escape sequences
  15907. from the keyboard are being treated just like escape sequences from the host
  15908. -- buffered up and then sent to the "printer" when complete.  Oops.  In fact,
  15909. this reveals a HUGE whole that opened up when I converted the UNIX CONNECT
  15910. module from two forks to one.  In the 2-fork version, each fork had its
  15911. separate data space, thus variables like "inesc" were separate for the
  15912. incoming and outbound data streams.  In the single-fork version, the same
  15913. state machine and variables were used simultaneously for the host-to-screen
  15914. and keyboard-to-host streams, resulting in no end of confusion -- I'm
  15915. astounded nobody noticed it till now.  This was fixed by making the state
  15916. variables (inesc and oldesc) into 2-element arrays, indexed by 0 = char from
  15917. host, 1 = char from keyboard.  Works well without breaking APC and transparent
  15918. printing.  ckucns.c, 30 Oct 99.
  15919.  
  15920. Same changes for VMS.  Built & tested OK.  ckvcon.c, 30 Oct 99.
  15921.  
  15922. From Jeff: some debugging changes for the network modules.  ckctel.c,
  15923. ckcnet.c, 31 Oct 99.
  15924.  
  15925. Fixed trailing blanks & long lines.  ck[cuw]*.[cwh], 31 Oct 99.
  15926.  
  15927. Got rid of startup message "Default file-transfer mode is ...", since it
  15928. doesn't give the user any clues about how to change it.  Changed SHOW FILE to
  15929. enunciate the relevant info a bit more clearly.  ckuus[45].c, 31 Oct 99.
  15930.  
  15931. Fixed Linux ncurses target to allow for ncurses.h being in either /usr/include/
  15932. or /usr/include/ncurses/.  From Thomas Dickey <dickey@clark.net>, 2 Nov 99.
  15933.  
  15934. Fixed typos Rockwell V.90 modem entry.  ckudia.c, 2 Nov 99.
  15935.  
  15936. Changed command module not to print "?Timed out" if ASK-TIMEOUT expires if
  15937. QUIET is ON.  ckucmd.c, ckuus6.c, 2 Nov 99.
  15938.  
  15939. The notation \fsubstring(\m(name),n1,n2) was annoying me, so I added a
  15940. shorthand: \s(name[n1:n2]).  Works like \m(name) except the substring notation
  15941. is allowed; the separate letter is to prevent collisions with do-it-yourself
  15942. data structures like the ones in the script library.  ckuus4.c, ckermit2.txt
  15943. Section 7.24, 2 Nov 99.
  15944.  
  15945. Added \fhex2n(), the inverse of \fn2hex(), for converting a hex number to
  15946. a decimal one.  Also \fhex2ip() to convert a hex IP address into a dotted
  15947. decimal one, and \fip2hex() to do the inverse. ckuusr.h, ckuus[24].c, 2 Nov 99.
  15948.  
  15949. SSL/TLS stuff from Jeff: ckuus3.c ckuus7.c ckudia.c ck_crp.c ckctel.c
  15950. ckutio.c ckcnet.c ckuath.c ckuusr.c ckuus2.c makefile, 2 Nov 99.
  15951.  
  15952. Fixed trailing blanks & longlines in Jeff's files.
  15953.  
  15954. Added \foct2n() for symmetry with \fn2oct().  ckuusr.h, ckuus[24].c, 3 Nov 99.
  15955.  
  15956. Nested \s(blah[n:m])'s didn't work, e.g.
  15957.  
  15958.   \s(block[1025:\fhex2n(\s(block[101:4]))])
  15959.  
  15960. Problem: zzstring()'s \?(name) parser didn't allow for nested parentheses.
  15961. Therefore some other stuff that should have worked even prior to the
  15962. introduction of \s() wouldn't have worked either, e.g. \m(\fxxx(..)).
  15963. Fixed in ckuus4.c, 3 Nov 99.
  15964.  
  15965. Changed arraybounds() not to fail on negative numbers (because I cheat and
  15966. use arraybounds() to parse the range specifier in \s(blah[m:n]) and there
  15967. is no reason not to allow negative numbers).  ckuus5.c, 3 Nov 99.
  15968.  
  15969. SSL/TLS stuff from Jeff: ckuus7.c ckutio.c ckuath.c, 4 Nov 99.
  15970.  
  15971. Peter E discovered an awful bug from the Oct 9-11 [ck]strncpy() work, namely
  15972. that, under certain circumstances, after a command file or macro was executed,
  15973. top-level commands could no longer be parsed.  It seems that the atom buffer
  15974. (atmbuf[]) was the one place where we really did need strncpy()'s property of
  15975. zero-filling to the given length, rather than depositing just one terminating
  15976. NUL as ckstrncpy() does.  So changed all ckstrncpy(atmbuf,blah,ATMBL) back
  15977. to strncpy(atmbuf,blah,ATMBL); atmbuf[ATMBL] = NUL.  I also make cmini()
  15978. zero the atom buffer in addition to the command buffer (and in the process
  15979. let it use memset() for this rather than a look if USE_MEMCPY is defined --
  15980. a significant speedup now that these buffers are so big).  ckucmd.c, 4 Nov 99.
  15981.  
  15982. From Jeff: A fix for the annoying problem of Kermits A->B->C, with A and B
  15983. both having autodownload enabled.  Since B has it enabled, it should not
  15984. also pass the packet on to A, so at the moment when it detects it has a
  15985. valid packet, it purposely alters the last few characters so A will not
  15986. detect it too.  ckucns.c, 4 Nov 99.
  15987.  
  15988. From Jeff: preliminary changes to enable Telnet option debugging in command
  15989. mode.  ckctel.c, 4 Nov 99.
  15990.  
  15991. From Jeff: Rest of SET TELNET DEBUG, plus propagation of autodownload change
  15992. to ckucon.c, plus casts to stifle complaints from yesterday's changes.  Many
  15993. modules, 5 Nov 99.
  15994.  
  15995. From Joel Soete <JSO@EUROPAY.COM>, changes to support "Trusted HP-UX".
  15996. makefile, ckufio.c, 5 Nov 99.
  15997.  
  15998. Propagated autodownload change to ckvcon.c. 5 Nov 99.
  15999.  
  16000. Added another compact substring notation: \:(variable[start:length]).  This
  16001. differs from \s(macro[start:length]) in that the result of expanding the
  16002. variable is NOT looked up in the macro table.  So now we have compact
  16003. substring notation for all kinds of variables.  ckuus4.c, 5 Nov 99.
  16004.  
  16005. Over the past week, I prototyped an IKSD active-sessions database offline,
  16006. using fopen, fseek, fread, fwrite, ftruncate, and fflush, which we know to be
  16007. highly portable since they've been in C-Kermit 7.0 since the general file i/o
  16008. package was added in Beta.08 back in July.
  16009.  
  16010. A prototype display module was developed as a Kermit script, iksdpy, which is
  16011. what prompted the recent changes to the script language -- hex and IP address
  16012. conversion functions, compact substring notation for extracting database
  16013. fields, etc.  Unfortunately, however, fread() doesn't work well for the
  16014. display module.  Reading the records sequentially poses no problem (and works
  16015. well), but suppose we want to read the same record repeatedly by fseek()ing
  16016. and fread()ing in a loop.  In this case the C library tends not to refresh its
  16017. buffer from the disk so we never see any updates.  The only remedy seems to be
  16018. to close and reopen the file each time thru the loop to force a fresh disk
  16019. read.  The script does this and it doesn't seem to slow it down much (this is
  16020. done only when focussing on a single session).
  16021.  
  16022. Preliminary documentation for the database is in the new file iksdb.txt, which
  16023. will be merged with iksd.txt shortly.
  16024.  
  16025. Now that the prototype seems to be in good shape, I merged the code into
  16026. C-Kermit:
  16027.  
  16028.  . Data and struct definitions: ckcker.h.
  16029.  . Selection (IKSDB) and operating parameters: ckcdeb.h.
  16030.  . General-purpose routines (lset, rset, long/hex conversion): ckclib.[ch].
  16031.  . Database code: ckuusx.c.
  16032.  
  16033. ckuusx.c was chosen for the database code because that was the least bad
  16034. existing module to put it in, from the standpoint of size and appropriateness.
  16035. I didn't want to create a new module since the amount of new code is not that
  16036. large (about 500 lines), and adding a new module is a big pain.  With these
  16037. changes, the code compiles and links OK both with IKSDB defined and not
  16038. defined (when it's defined it adds only 8K to the image size).  5 Nov 99.
  16039.  
  16040. I also built with Kerberos IV and OpenSSL (sunos41gcc+krb4+openssl): builds OK
  16041. except for a bunch of warnings from ck_crp.c ("comparison is always 1..."),
  16042. but then it acts very strange when started -- can't parse command files, beeps
  16043. after every top-level keyword (hmmmm -- the same symptoms as the qnx16 build;
  16044. see notes from 23 Oct...)  I don't think this has anything to do with IKSDB --
  16045. it smells more like one of those ckstrncpy() things...  Nope, that's not it
  16046. (I added code to turn ckstrncpy() back into real strncpy() and rebuilt but it
  16047. made no difference: "touch ckclib.c; make blah KFLAGS=-DNOCKSTRNCPY").  I also
  16048. built again with -DNOIKSDB: same thing, so it's something else.  5 Nov 99.
  16049.  
  16050. Some minor adjustments to top-level command parsing; some of the error
  16051. conditions were not giving error messages promptly.  The possibilities are:
  16052.  
  16053.  1. Top-level keyword (cmdtab[])
  16054.  2. Token (!, etc)
  16055.  3. Macro name
  16056.  4. Immediate macro (e.g. "{ echo foo, echo bar }").
  16057.  
  16058. (1) includes the DO command, which can itself take a macro name or an
  16059. immediate macro.  Allowing for all this created a situation in which typing
  16060. something invalid as the first word in a command gave no error message (of
  16061. course the error was still caught later).  Also "DO { command, ... }" seems
  16062. to have been broken somewhere along the line.  Fixed in docmd(): ckuusr.c,
  16063. 6 Nov 99.
  16064.  
  16065. Added \fradix(number,r1,r2), general-purpose radix conversion between any two
  16066. radices 2-36.  Made all the silly "hex2n, n2oct", etc, functions invisible.
  16067. Hurray, finally we have binary numbers, not to mention base 36, etc.  Also
  16068. replaced custom code in \fhex2n() and \foct2n() to just the use general radix
  16069. code.  ckuusr.h, ckuus[24].c, 6 Nov 99.
  16070.  
  16071. Back to IKSDB...  Added --database:{on,off} and --dbfile:<filename>.
  16072. ckuusr.h, ckuus[5y].c, 6 Nov 99.
  16073.  
  16074. Added dbinit() to initialize database name, my IP address, pid, etc.  Changed
  16075. getlocalipaddress() to store not only the string form but also the unsigned
  16076. long form in the new var myxipaddr.  ckcnet.c, ckuusx.c, ckcmai.c, 6 Nov 99.
  16077.  
  16078. Added call to dbinit() at startup and a call to freeslot() in doexit().
  16079. ckcmai.c, ckuusx.c, 6 Nov 99.
  16080.  
  16081. Added code to zvpass() to fill in user info.  I didn't check the auth stuff.
  16082. ckufio.c, 6 Nov 99.
  16083.  
  16084. Tested with IKSD.  Init is good -- PID, IP, peer IP, times, etc.  Login as
  16085. real user is good; username is picked up, and then record is freed when user
  16086. logs out or exits.  Ditto anonymous.
  16087.  
  16088. Filled in state-change updates simply by calling slotstate() from within
  16089. cksyslog().  ckufio.c, 6 Nov 99.
  16090.  
  16091. Initialized current directory in zvpass() and updated in zchdir().  ckufio.c,
  16092. 6 Nov 99.
  16093.  
  16094. Compiles OK, but it doesn't totally work: the user's initial directory is
  16095. not filled in for some reason.  The state changes are not always recorded,
  16096. probably something to do with tying it to syslog.
  16097.  
  16098. From Jeff: OS/2 adaptations and minor corrections to yesterday's work, plus
  16099. more auth changes.  ckuath.c ckufio.c ckuusx.c ckuus7.c ckcdeb.h ckcnet.c
  16100. ckclib.c, 7 Nov 99.
  16101.  
  16102. Moved ckxlogging & ckxsyslog definitions from ckufio.c to ckcmai.c.
  16103. Moved dbopen def from ckuusx to ckcmai.  Put externs for all these in ckcdeb.h.
  16104. Then I tried to unify syslogging and the IKSD database with:
  16105.  
  16106.   #define LOGSACTIVE(a) ((ckxsyslog>=(a)&&ckxlogging)||dbopen)
  16107.  
  16108. and then using:
  16109.  
  16110.   if (LOGSACTIVE(SYSLG_PR))
  16111.     cksyslog(SYSLG_PR, ...)
  16112.  
  16113. But it was a world of trouble.  First of all, it blew up the compiler (gcc
  16114. 2.7.2) on ckcpro.c.  In cases where it didn't blow up, I still didn't get the
  16115. required results.  So then I removed the macro and added separate calls to
  16116. slotstate() when I wanted to update the database, which actually gives more
  16117. control and therefore better results, at the cost of an extra function call
  16118. (but not always).  But now ckcpro.c blows up the compiler again unless I build
  16119. it without -O.  Will come back to this...  First:
  16120.  
  16121.  1. Moved dbinit() so a record shows up as soon as session starts,
  16122.     rather than waiting for login.  ckcmai.c.
  16123.  2. Updated state for command mode.  ckuus5.c.
  16124.  3. Changed locking method from link() to rename().  ckuusx.c.
  16125.  4. Fixed fractured anonymous username.  ckuus7.c.
  16126.  5. In Dir field, prepended anonroot for guest.  ckufio.c.
  16127.  6. Made username for anonymous be "anonymous:<passwd>". ckufio.c.
  16128.  7. #ifdef'd ftruncate() and kill() calls away for K95.
  16129.  
  16130. Now it all works pretty well, and should build and run for K95 too, except
  16131. there is no stale-pid detection (this can be fixed if the APIs have an "Is
  16132. this pid active?" call).  7 Nov 99.
  16133.  
  16134. Back to ckcpro.w.  We've been having trouble with it for some time -- more and
  16135. more platforms are needing to build it without optimization because -O blows
  16136. it up.  I think the problem is that the wart-generated switch() statement has
  16137. become too big.  We know there is nothing wrong about having many cases in a
  16138. switch() because in the charset modules we have some with hundreds or
  16139. thousands of cases, whereas the protocol module only has 73.  So the touchy
  16140. item seems to be either the amount of code in the largest case, or the total
  16141. amount of code in the switch.
  16142.  
  16143. Experiment 1: Build on watsol, which also has gcc 2.7.2, to see if it's
  16144. something with watsun (swap space filled up or something).  Success.
  16145.  
  16146. Experiment 2: Build on watsun with regular cc.  Success.
  16147.  
  16148. Well, these are inconclusive, but we know we have problems elsewhere, so:
  16149.  
  16150. Experiment 3: Move the code out of the "received an S packet" case into a
  16151. separate routine and rebuild.  gcc still blows up, but cc builds it OK, and
  16152. the result works OK -- that is, it receives files normally.
  16153.  
  16154. Continuing in this vein I moved the eight longest cases to their own routines,
  16155. handled the compilation glitches, added appropriate return values, rebuilt
  16156. with gcc (this time with no complaint), and tested each routine successfully.
  16157. Nevertheless, this was radical surgery and the patient should be watched
  16158. carefully for a few weeks.  ckcpro.w, 7 Nov 99.
  16159.  
  16160. Fixed some minor glitches in \fradix().  ckuus4.c, 7 Nov 99.
  16161.  
  16162. Built the Kerberized version and tested it OK (the trouble I had last time was
  16163. probably because I didn't move the latest ck_*.[ch] files into the build
  16164. directory).  Worked fine, authentication and all.  7 Nov 99.
  16165.  
  16166. Yesterday's code shuffling in ckcpro.w had the nasty side effect that IKSD
  16167. would never issue an interactive login prompt.  The problem was that I
  16168. overlooked the QUIT macro, which is used in some of the new routines.  QUIT
  16169. can return 0 or 1, whereas RESUME always returns 1.  I was using 0 to mean
  16170. "stay in state machine".  Now the new routines return -1 for this, and 0 or
  16171. 1 are passed up the call stack.  ckcpro.w, 8 Nov 99.
  16172.  
  16173. Gerry Belanger reported some compilation errors revealing that IKSD was
  16174. not disabled if NOLOGIN was defined, so I fixed that in ckcdeb.h, 8 Nov 99.
  16175.  
  16176. Added a missing #endif in ckucon.c, 8 Nov 99.
  16177.  
  16178. Ran the code through gcc with:
  16179.  -Wreturn-type -Wcomment -Wformat -Wuninitialized
  16180.  -Wpointer-arith -Wredundant-decls
  16181. and removed various redundant declarations & prototypes, etc.
  16182. "-Wwrite-strings" is useless because is produces tens of thousands of
  16183. warnings about "discards 'const' from...".  Nothing especially serious was
  16184. found, except one printf referencing a long with "%d" and a couple "returns
  16185. without a value", which is what I was looking for.  Pretty much all modules
  16186. were changed.  8 Nov 99.
  16187.  
  16188. Added zchkpid() to ckufio.c, and changed all references to "kill(xxx,0);" in
  16189. non UNIX-specific modules to zchkpid().  (This needs to be filled in for K95
  16190. and VMS.)  ckcplm.txt, ckcdeb.h, ckufio.c, 8 Nov 99.
  16191.  
  16192. As an experiment, I removed the "pop back to command mode after each protocol
  16193. operation" feature from IKSD by #ifdef'ing out the "justone = 1;" commands in
  16194. ckcmai.c (search for IKSDPOPBACK).  This seems to do absolutely no harm, and
  16195. we no longer get the jarring state changes every time we do something (which
  16196. are obvious now in IKSDPY); client/server mode stays put, but CONNECT from the
  16197. client always forces IKSD back into command mode, and SERVER at the IKSD
  16198. prompt still puts it in server mode and makes the client pop back.  FINISH
  16199. works right, BYE works right, etc.  8 Nov 99.
  16200.  
  16201. Spiffed up IKSDPY a bit; gave it consistent commands in each screen and
  16202. a unified "command parser" and help screen rather than 2 different ones.
  16203. 8 Nov 99.
  16204.  
  16205. Revisiting the question of the LOGIN and LOGOUT commands from 20 Aug 98...
  16206. Presently LOGIN is not a command.  LOGOUT is a command, but acts only locally;
  16207. that is, it works only when given at the IKSD prompt.  To log in and out from
  16208. the client requires REMOTE LOGIN and REMOTE LOGOUT.  Why can't these be just
  16209. LOGIN and LOGOUT?  Let's see...
  16210.  
  16211.        Client                           Server
  16212.   LOGIN     Sends REMOTE LOGIN to server     Says "?Already logged in"
  16213.   LOGOUT    Sends REMOTE LOGOUT to client    Logs out (as now).
  16214.  
  16215. Made it so.  Seems fine.  If these commands are given to the client when it
  16216. has no connection, an error message is printed and the command fails.
  16217. Otherwise it acts as shown above.  Why didn't I like it before?  Probably
  16218. because I thought that LOGIN could be given at the IKSD prompt to actually
  16219. log in.  But it can't, so good, another wart removed.  ckuusr.c, 8 Nov 99.
  16220.  
  16221. Updated & incorporated iksdb.txt into iksd.txt.  8 Nov 99.
  16222.  
  16223. From Jeff:
  16224.  . SRP encryption key generation was broken.
  16225.  . Infinite loop in ckuusx.c in K95 only.
  16226.  . Extra ENCRYPT messages when encryption can't possibly be used.
  16227.  . NTLM AUTH not working on Win2K.
  16228.  . IKSD now compatible with Win2K.
  16229. ckuusx.c ckctel.c ckuath.c ck_crp.c, 9 Nov 99.
  16230.  
  16231. Changed wart to never output lines with trailing blanks.  ckwart.c, 9 Nov 99.
  16232.  
  16233. Fixed long lines & trailing blanks in all source files.  9 Nov 99.
  16234.  
  16235. Shuffled a couple return()s and #ifdefs in the new routines in the protocol
  16236. module to stifle "statement not reached" warnings.  ckcpro.w, 9 Nov 99.
  16237.  
  16238. Added -DNOGETUSERSHELL and -DNOSYSLOG to the Unixware 1.x and 2.0 entries.
  16239. makefile, 9 Nov 99.
  16240.  
  16241. Discovered the DATE command was truncating the last character of the result.
  16242. Another ckstrncpy() foulup (subtle difference in the meaning of the 3rd arg:
  16243. the number of bytes to copy to strncpy, but to ckstrncpy it's the size of the
  16244. buffer, which must be NUL-terminated; thus changing strncpy(dest,date,17)
  16245. (which copies a 17-byte date string) to ckstrncpy(dest,date,17) won't work
  16246. since the latter will chop off the last byte and replace it with a NUL,
  16247. thinking the dest buffer is only 17 bytes long.  ckuus6.c, 9 Nov 99.
  16248.  
  16249. A long time ago, before chained FDBs, code was added to allow the SLEEP (WAIT,
  16250. INPUT, etc) time interval to be either a number of seconds or else a time of
  16251. day (like MS-DOS Kermit), using a gross hack.  I changed this code -- at least
  16252. in dopaus() (the routine that handles SLEEP/PAUSE, MSLEEP, and WAIT) -- to use
  16253. chained FDBs instead.  ckuus6.c, 9 Nov 99.
  16254.  
  16255. Now to the point of all this: I extended the WAIT command to wait for file
  16256. events:
  16257.  
  16258.   WAIT <time> { MODEM-SIGNALS <signal-list>, FILE <event> <filename> }
  16259.  
  16260. The previous syntax is still accepted and works the same way; however, the
  16261. modem-signal names are now invisible in the keyword list shown by ? after
  16262. the time field; instead you see the two new keywords above (but you can
  16263. still put a modem signal name in this field).  If you choose FILE, then
  16264. you can choose an event: CREATION, DELETION, or MODIFICATION, and then the
  16265. filename and then Kermit waits up to the timeout for the given event to occur
  16266. with the given file and succeeds or fails accordingly.  ckuus6.c, 9 Nov 99.
  16267.  
  16268. Fixed radix() (and therefore \function()s that call it, such as \fhex2n()) to
  16269. use unsigned long internally, so args with high bit on won't go negative.
  16270. ckuus4.c, 10 Nov 99.
  16271.  
  16272. Fixed trailing blanks and long lines in ckuat*.[ch] and ck_*.[ch].  10 Nov 99.
  16273.  
  16274. Compact substring notation was not being careful enough about exceeding
  16275. boundaries.  Fixed in zzstring(), ckuus4.c, 10 Nov 99.
  16276.  
  16277. Added a little robustness to iksdpy, checking that each record is exactly 4096
  16278. bytes long.  Before the previous fix this would cause Kermit to crash; now
  16279. this check should not be necessary except to allow a more appropriate recovery
  16280. (i.e. quit with a message that the database is corrupt).  Also added clauses
  16281. from Jeff to pick up the database in Windows.  iksdpy, 10 Nov 99.
  16282.  
  16283. Added a prototype for ttyname() in the Sys V/68 R3V6 case. ckutio.c, 10 Nov 99.
  16284.  
  16285. Removed some dangling return()'s from the new routines in ckcpro.w, again
  16286. (the same ones I removed yesterday, but somehow the changes were lost).
  16287. ckcpro.w, 10 Nov 99.
  16288.  
  16289. Took 'extern int inserver' declaration out of #ifdef IKSD..#endif in ckcfns.c,
  16290. since this variable should be available in all builds, but with a value of 0
  16291. when IKSD is not available (and therefore not active).  ckcfns.c, 10 Nov 99.
  16292.  
  16293. Similarly for the 'network' definition in ckuusr.c.  10 Nov 99.
  16294.  
  16295. Changed IKSD database-opening code to use "r+b" rather than "r+" in K95 and
  16296. VMS.  ckuusx.c, 10 Nov 99.
  16297.  
  16298. More work on Unixware 1.x-2.0 makefile entries.  Removed the UNIXWARE
  16299. definition and reverted to vanilla SVR4, but with OLD_UNIXWARE defined just
  16300. for herald purposes.  This fixes the problem with close() of serial device
  16301. hanging.  makefile, 10 Nov 99.
  16302.  
  16303. On SunOS: Built OK with NOIKSD.  Built with NOSPL; this required some
  16304. corrections to ckuus4.c and ckclib.c (NOSPL removes 300K from Sparc binary).
  16305. Built with NONET OK.
  16306.  
  16307. On HP-UX 10.20: Built with non-ANSI compiler OK.  10 Nov 99.
  16308.  
  16309. On VMS 7.1: Built OK with DECC after supplying a missing exter for ksbuf[].
  16310. ckvcon.c, 10 Nov 99.
  16311.  
  16312. On SunOS: Built with NOICP (fixes needed to ckuus4.c) but lots of unresolved
  16313. references show up at link time but the stupid linker doesn't show which
  16314. modules the references occurred in.  Built again on VMS with NOICP to get
  16315. better diagnostics.  Results:
  16316.  
  16317.  . Moved prototypes for doconect() and setflow() from ckuusr.h to ckcker.h.
  16318.  . Adjusted #ifdefs in ckvcon.c and ckuusx.c.
  16319.  . #ifdef'd slrestor() references NOICP in ckcnet.c.
  16320.  . Moved 'hints' declaration to ckcmai.c.
  16321.  
  16322. It still didn't work but the remaining problems were all VMS-specific and
  16323. we'll never really build a NOICP for VMS (or if we do they're easily fixed).
  16324. Back to SunOS...  After a more shuffling, which is too boring to describe,
  16325. the NOICP version built again.  The full version is 1.8MB on Sparc; the
  16326. NOICP version is 0.5MB.  10 Nov 99.
  16327.  
  16328. Added -lresolv to unixwarenetc target.  makefile, 11 Nov 99.
  16329.  
  16330. Fixed trailing blanks & long lines in ckuath.c.  Gave up on ck_crp.c.
  16331. 11 Nov 99.
  16332.  
  16333. Fixed ckradix() (again) to ignore leading 0's (and whitespace) for overflow
  16334. detection purposes (another previous fix that was lost).  Also moved ckradix()
  16335. to ckclib.c.  ckuus4.c, ckclib.[ch], 11 Nov 99.
  16336.  
  16337. A couple corrections to the ISO-8859-7 / Unicode mappings from updated
  16338. official UCS maps at unicode.org.  ckcuni.c, 11 Nov 99.
  16339.  
  16340. Added definitions, parsing, tables, and routines for KOI8-R and KOI8-U
  16341. character sets, ckcuni.[ch], ckuxla.[ch], 11 Nov 99.
  16342.  
  16343. Fixed xls[] and xlr[] charset-conversion function-pointer tables from
  16344. yesterday's (and earlier) changes (one problem went all the way back to July
  16345. 1998).  ckuxla.c, 12 Nov 99.
  16346.  
  16347. Fixed fcsinfo[] table -- it too has skewed (during the Japanese changes of
  16348. a few weeks ago).  ckuxla.c, 12 Nov 99.
  16349.  
  16350. While tracking down yesterday's problems, I discovered that something was
  16351. amiss with any character-set translation involving Unicode.  When translating
  16352. from anything to (say) UTF-8, the non-ASCII characters were translated to
  16353. simple, seemingly random, ASCII characters instead of to UTF-8 sequences.
  16354. Somehow a temporary variable in xgnbyte() that had been a USHORT had become a
  16355. CHAR, thus discarding the high byte of the UCS-2 result (you can't turn your
  16356. back for a minute...)  So now translations *to* Unicode work again.  (This
  16357. affected all translations, including file transfer.)  ckcfns.c, 13 Nov 99.
  16358.  
  16359. But in the TRANSLATE command, translations *from* Unicode always gave a result
  16360. in UCS-2 intstead of the target set.  Why?  Because setxlatype() was setting
  16361. up the translation from the source set to UCS-2, period.  In all the testing
  16362. of the new Japanese/Unicode interface, I must have overlooked the others.
  16363. What was needed for TRANSLATE was a special routine to set up translation from
  16364. any file character-set to any other file character-set with UCS-2 in the
  16365. middle.  This seems to work well and it's a big improvement over the previous
  16366. arrangement, in which the "most appropriate" transfer character-set was picked
  16367. as the intermediate set, which resulted in loss when the source and
  16368. destination sets had characters in common that were lacking from the TCS (this
  16369. is especially noticeable with KOI8-R and -U, which are full of line-and-box
  16370. drawing characters that are not in ISO 8859-5).  Several dozen tests with
  16371. random pairs of charsets, including Japanese, check out fine, and file
  16372. transfers seem fine too, as they should be after the previous fix.  So I
  16373. changed TRANSLATE to always go through Unicode as long as Unicode support is
  16374. built in.  ckuxla.c, ckuus4.c, ckermit2.txt, 13 Nov 99.
  16375.  
  16376. Made KOI8-R and KOI8-U tables for ~kermit/charsets/.  koi8[ru].{c,txt},
  16377. 13 Nov 99.
  16378.  
  16379. From Jeff: "Was this one hard to pin down.  (All the encryption bugs are.)
  16380. Noticed Sunday night that encryption was breaking with SRP on yclept but not
  16381. on other platforms.  Tracked this down to a change in the headers in the newer
  16382. SRP distributions.  The old headers were installed in /usr/local/include and
  16383. were being read by Kermit instead of the newer ones in
  16384. /usr/src/srp/srp..../include/.  Fixed.  While trying to find the above problem
  16385. I discovered that encryption didn't work at all with any authentication method
  16386. if there the connection was made with SET HOST *.  This bug was caused by two
  16387. things.  First, a couple of 'inserver' tests were instead 'sstelnet' which
  16388. meant we were encrypting/decrypting when we shouldn't have been.  Second, at
  16389. some point the ckcgetc() functions were modified to make calls to ttxin().
  16390. But the data returned from ttxin() was never decrypted.  So the state machine
  16391. on incoming data was corrupted."  ckucon.c ckucns.c ckutio.c ck_crp.c
  16392. ckuath.c, 14 Nov 99.
  16393.  
  16394. Changed setting of local and peer IP addresses (the ones used for reporting
  16395. and in the IKSD log) to use network format (htonl()).  ckcnet.c, 14 Nov 99.
  16396.  
  16397. Tested KOI8-R and KOI8-U terminal charsets in new build of K95 GUI -- both
  16398. work fine.  14 Nov 99.
  16399.  
  16400. Some syntax improvements for the FOR command:
  16401.  
  16402.  . Allow parens around the condition list for consistency with IF and WHILE.
  16403.  . If parens included allow increment to be omitted & default appropriately.
  16404.  . If command list lacks enclosing braces, supply them.
  16405.  
  16406. Allow parens around SWITCH variable too.  Aside from improving consistency and
  16407. robustness, these changes pave the way for future extensions, like
  16408. "for ( \%i in ck*.[ch] ) ..." (but exercising massive self-control, I deferred
  16409. implementation of that til after 7.0).  ckuus6.c, ckermit2.txt, 14 Nov 99.
  16410.  
  16411. In preparation for wrapping up Beta.11, did a bunch of builds with various
  16412. -DNOxxxx's defined, on various platforms.  NOCYRILLIC (ok), NOAPC (ok),
  16413. NOBIGBUF (ok)...  The latter only makes about 12K difference; hardly worth it
  16414. any more in these days 2-3MB executables... (but yes, it's still needed at
  16415. least for the PDP-11).
  16416.  
  16417. NOLOCAL (ok) -- this took a fair amount of #ifdef shuffling, plus I managed
  16418. to cut out a lot of additional stuff (e.g. all the file-transfer display
  16419. code), reducing the executable size (on Sparc) by 400K.  This one is handy
  16420. for building IKSD.  [Note: at the moment NOLOCAL also renders the SCREEN
  16421. command useless, but I'll worry about that if anyone complains.]
  16422.  
  16423. Also:
  16424.  . NOXFER (ok) -- This one also took a lot of shuffling.  Saves 420K.
  16425.  . NODISPLAY (ok) -- New; this one disables the file-transfer display.
  16426.  . NOSHOW (ok)
  16427.  . NOSERVER (ok) -- This one was a big deal.
  16428.  . NOREDIRECT (ok)
  16429.  . NOPUSH (ok)
  16430.  . NOPIPESEND (ok)
  16431.  . NOMSEND (ok)
  16432.  . NOLOGIN (ok)
  16433.  . NOIKSD (ok)
  16434.  . NOHELP (ok)
  16435.  . NODIAL (ok)
  16436.  . MINIDIAL (ok)
  16437.  . NOUNICODE (ok)
  16438.  . NOCSETS (ok)
  16439.  . NOSPL (ok) <-- Builds OK but has the beeping bug (*)
  16440.  . NOICP (ok)
  16441.  
  16442. Also built on some other platforms:
  16443.  . HP-UX 10.20 non-ANSI (ok)
  16444.  . HP-UX 10.20 ANSI (ok) (optimizer complains about ckuus[r34].c, ckcpro.c)
  16445.  . HP-UX 9.05 non-ANSI (ok)
  16446.  . HP-UX 9.05 ANSI (ok) (optimizer complains about various files)
  16447.  . HP-UX 8.00 non-ANSI (ok)
  16448.  . Linux RH 5.2 gcc 2.7.2.3 (ok)
  16449.  . VMS 5.5/VAX VAXC 3.2 UCX (ok) and NONET (??)
  16450.  . VMS 7.1/Alpha DECC 6.0 UCX (ok) and NONET (ok)
  16451.  . AIX 4.1 (ok)
  16452.  . Digital UNIX 3.2 (ok) (DU has 8-byte longs)
  16453.  . BSDI 4.0.1 (ok) (Updated makefile target for tputs() complaints)
  16454.  . Unixware 7 (ok)
  16455.  . Unixware 2.1 ("libelf error: Request error: no string table elf_strptr"???)
  16456.  
  16457. Many modules touched in many ways, some of them a lot.  14 Nov 99.
  16458.  
  16459. Tracked down the beeping problem first noted on Oct 23rd: when built with
  16460. NOSPL, there was a putchar('\07') in docmd() that was not inside any 'if'
  16461. clause, and therefore was always executed.  ckuus5.c, 15 Nov 99.
  16462.  
  16463. Added the following new CHECK items: FILE-TRANSFER, MAKING-CONNECTIONS,
  16464. UNICODE, IKSD, CX-LOG.  ckuus3.c, 15 Nov 99.
  16465.  
  16466. Fixed a trailing non-comment after an #endif, ckcfns.c, 15 Nov 99.
  16467.  
  16468. Replaced a lost comment-end after an #endif, ckcuni.h, 15 Nov 99.
  16469.  
  16470. Fixed a bad mistake I made yesterday, when shuffling declarations around for
  16471. NOXFER: I put the extern declaration for feol among the ints, when it should
  16472. have been a CHAR.  This completely messed up end-of-line processing during
  16473. file i/o.  ckcfns.c, 15 Nov 99.
  16474.  
  16475. Checking out Dave Sneddon's renewed complaint about C-Kermit swallowing or
  16476. mangling escape sequences while in CONNECT mode, which I thought I fixed a
  16477. couple weeks ago.  Detailed analysis of the traffic shows VMS sends:
  16478.  
  16479.   <ESC>[c<ESC>7<ESC>[255;255H<ESC>[6n<ESC>8<ESC>[62"p<ESC> F<ESC><RB>
  16480.  
  16481. (where <ESC> is Escape and <RB> is right angle bracket).
  16482.  
  16483. The CONNECT module passes <ESC>[c through OK to the terminal, and the terminal
  16484. sends back the right response: <ESC>[?63;1;2;6;8;9;15;44c.  But when C-Kermit
  16485. goes to read the next character from the host, it is '7' -- so it missed the
  16486. escape between the 'c' and the '7'.  And in fact, the logs show several other
  16487. escapes were missed too.  Let's compare with the UNIX version...  Hmmm, no
  16488. problem there.  Next, compare VMS version with TERM APC OFF (which works) with
  16489. same version with TERM APC ON (which doesn't).  Difference: chkaes() is never
  16490. called if APC is OFF so the problem is obviously in chkaes().  It turned out
  16491. to be a misplaced #ifdef XPRINT in one of the switch cases (which dates from
  16492. when I added transparent printing a year ago), the one that handles escape
  16493. sequences like <ESC>7.  The state-changing statement was inside #ifdef XPRINT,
  16494. but XPRINT is not defined in VMS, so the state remained unchanged and the code
  16495. to write out the saved-up Escape was never executed.  The same #ifdef was
  16496. misplaced in the UNIX version, but it didn't matter there since XPRINT is
  16497. defined in UNIX.  ckvcon.c, ckucns.c, 15 Nov 99.
  16498.  
  16499. A new set of consistent HP-UX 10.xx and 11.xx makefile targets from Peter E,
  16500. which now include regular and Trusted versions for each variation.  makefile,
  16501. 16 Nov 99.
  16502.  
  16503. From Jeff: Beginnings of PTY support.  ckutio.c ckuus7.c ckcdeb.h ckucon.c
  16504. ckuus4.c ckucns.c ckuusr.c ckuusr.h, 16 Nov 99.
  16505.  
  16506. Added top-level PTY command (not tested), similar to PIPE.  Created PTYORPIPE
  16507. macro, which is defined if either NETCMD or NETPTY (or both) are defined.
  16508. ckcdeb.h, ckucns.c, ckuus[r7].c, 16 Nov 99.
  16509.  
  16510. Realized that it would be useful to know what character the user might have
  16511. typed to interrupt a PAUSE, WAIT, INPUT, or similar command from the keyboard,
  16512. so added a new variable \v(kbchar) for this.  It is set by any command that
  16513. times out and can be interrupted from the keyboard.  If it was interrupted,
  16514. this variable is set to the (first) character the user typed.  If it was not
  16515. interrupted, it is set to the empty string (thus "sleep 0" can reset it).
  16516. \v(kbchar) can be used in applications that need to wait for some event OR a
  16517. keystroke, whichever comes first.  For example, iksdpy, which would rather not
  16518. mindlessly refresh the screen if the database hasn't changed and the user
  16519. hasn't touched a key.  Now instead of being driven by getc and timeout, it's
  16520. driven by WAIT 60 FILE MOD <databasefile> -- if user presses a key, it's in
  16521. the variable and it's our command.  ckuusr.h, ckuus[46].c, 16 Nov 99.
  16522.  
  16523. From Jeff: the new pty modules, ckupty.[ch], plus fixes to Telnet debugging
  16524. and BREAK-sending.  ckctel.c, ckcnet.c, 17 Nov 99.
  16525.  
  16526. Added ckupty.c production to the xermit target.  makefile, 17 Nov 99.
  16527.  
  16528. Converted ckupty.[ch] to Kermit coding conventions (there were still some
  16529. #if's and preprocessor logical ops, unguarded ANSIisms, etc); cleaned up
  16530. formatting, added copyright & author notices, removed unused HAVE_blah
  16531. definitions.  Got it to build OK on SunOS with the non-ANSI compiler, and it
  16532. works too.  17 Nov 99.
  16533.  
  16534. On to Solaris...  This one was hopeless.  But then I realized that all the
  16535. problems were in the utmp/wtmp code.  But we don't need that code.  So I
  16536. #ifdef'd it out and poof, it builds and works on Solaris, and still builds
  16537. and works on SunOS.  ckupty.[ch], 17 Nov 99.
  16538.  
  16539. On to HP-UX.  After more twiddling of #ifdefs, got it to compile with no
  16540. complaints, but at runtime it says:
  16541.  
  16542.   ?Unable to open slave
  16543.   ?Slave failed to initialize
  16544.  
  16545. debug log says:
  16546.  
  16547.   ttopen PTY[telnet watsun]
  16548.   do_pty() Xline[/dev/ptyp3]
  16549.   do_pty()[Slave starts]
  16550.   getptyslave()
  16551.   pty_open_slave()[pty_open_ctty() failed]=44806916 = PTY_OPEN_SLAVE_OPENFAIL
  16552.   getptyslave()[Unable to open slave]=44806916
  16553.   do_pty()[Slave fails to initialize]
  16554.   set host line, errno[]=2
  16555.  
  16556. In other words, there is "No such device or directory" as /dev/ptyp3.  But:
  16557.  
  16558.   bash-2.00$ ls -l /dev/ptyp3
  16559.   crw-rw-rw-   2 root       root        16 0x000003 Jun 10  1996 /dev/ptyp3
  16560.  
  16561. The errno=2 indication is a red herring.  I changed the code to print a
  16562. better message, now it says:
  16563.  
  16564.   /dev/ptyp3: Device busy
  16565.  
  16566. Why it's busy, I don't know.  Also we don't want to put words like "slave" in
  16567. user messages -- they are upsetting to some people.  Also there is no need for
  16568. the "?Slave failed to initialize" message if we already just printed a more
  16569. informative message; fixed all this in ckupty.c, 17 Nov 99.
  16570.  
  16571. From Jeff: Additional debugging in pty code, add pty modules to other Unix
  16572. build targets.  makefile, ckutio.c, ckupty.c, 18 Nov 99.
  16573.  
  16574. Fixed PTY command to actually use ptys, not pipes.  ckuusr.c, 18 Nov 99.
  16575.  
  16576. Built with pty support on Unixware 7.1.0 and BSDI.  makefile, ckcdeb.h,
  16577. 18 Nov 99.
  16578.  
  16579. Added KTARGET clauses to all UNIX targets except those in the Antiquities
  16580. section.  makefile, 18 Nov 99.
  16581.  
  16582. Problem: "remote host blah" crashes the client if "blah" is longer than 84
  16583. bytes.  This problem exposed many mistakes, each of which needed fixing.
  16584. First, conol() was being called with a NULL pointer.  It should defend against
  16585. this.  Second, the caller was not setting an error string it should have set.
  16586. Third, the caller of the caller was not checking to see if the string was set.
  16587. All this fixed in ckcpro.w, ckcfn2.c, ckutio.c, 18 Nov 99.
  16588.  
  16589. But why should the limit be 84 when we had just negotiated 4000?  Because...
  16590. we call tinit() after the I/Y exchange and it resets the packet length we just
  16591. negotiated, tsk tsk...  This is another long-standing problem: tinit() is
  16592. overloaded -- it was originally intended to be called before a transaction
  16593. starts, i.e. before the S/I/Y exchange, but then we started calling it just
  16594. after as well, because of the unfortunately fuzzy definition of "transaction"
  16595. in the protocol.  So I changed tinit() to take an argument: 1 to reset
  16596. EVERYTHING, 0 to reset only those things that are not set in the negotiations.
  16597. Now you can send long REMOTE HOST commands.  ckcpro.w, ckcker.h, 18 Nov 99.
  16598.  
  16599. Problem: Typing "mail" by itself causes a core dump.  Cause: a pair of
  16600. statements was out of order in doxsend().  Fixed in ckuusr.c, 18 Nov 99.
  16601.  
  16602. Built on IRIX 6.5 -- pty code compiles OK but doesn't work:
  16603. /dev/ttyp5: No such file or directory...  18 Nov 99.
  16604.  
  16605. Added code to ttinc(): if the read fails, and we were reading from a pty,
  16606. call ttclos().  But it didn't prevent the annoying "A connection seems to
  16607. be open... OK to close?" message, since the upper level code doesn't know
  16608. the connection was closed except by calling ttchk(), and ttchk() was not
  16609. doing the right thing.  ttchk() was being called to "test the connection",
  16610. but it was testing ttyfd only if xlocal != 0, which is silly -- xlocal
  16611. might have been reset by ttclos(), but if ttyfd == -1, we can definitely
  16612. say we do not have an active connection, no matter what the value of
  16613. xlocal!  ckutio.c, 18 Nov 99.
  16614.  
  16615. Pty changes, plus more debugging, from Jeff for HP-UX.  ckupty.c, ckutio.c,
  16616. 19 Nov 99.
  16617.  
  16618. Built on FreeBSD 3.3.  Ptys work OK.  But with or without them, it dumps core
  16619. when trying to initialize curses.  Tried building it with ncurses rather than
  16620. curses; that fixed it.  Also discovered it did not have BIGBUFOK set, so set
  16621. it.  makefile, ckcdeb.h, 19 Nov 99.
  16622.  
  16623. Tried building on FreeBSD 2.2.7.  Hmmm, same thing -- it dumps core in
  16624. fxdinit().  Why and when did this start happening???  Converted the freebsd2
  16625. target to ncurses too.  Works fine -- curses, ptys, everything.  Also, added
  16626. -funsigned-char to FreeBSD entries, since cc is gcc there.
  16627.  
  16628. Dave Sneddon's bug, cont'd...  zkermini() was lopping off the final character
  16629. of the init file name obtained from the CKERMIT_INI logical, thanks to global
  16630. substitution of cknstrncpy() for strncpy().  In this case, the length of the
  16631. source string was specified, rather than the length of the buffer.  Fixed in
  16632. zkermini(), ckvfio.c, 19 Nov 99.
  16633.  
  16634. Fixes from Jeff for ptys on HP-UX 10 and also to add IRIX 6.x to the list of
  16635. pty-capable builds: ckcdeb.h, ckupty.c, ckucns.c. 22 Nov 99.
  16636.  
  16637. Tried building on DU 4.0E and 3.2 -- both OK, ptys work fine; added to list.
  16638. ckcdeb.h, 22 Nov 99.
  16639.  
  16640. Tried building on HP-UX 9.05.  Compiles and links OK, but doesn't work.  Once
  16641. a connection is make (as in "pty telnet localhost") the program seems to hang;
  16642. no chars appear on the screen, and you can't escape back.  Tried building on
  16643. HP-UX 8.00.  Compiles OK but doesn't link: _vhangup and _ptsname unresolved.
  16644. Changed ckupty.c to not define CK_VHANGUP for HPUX8; then it compiles OK, but
  16645. hangs when run, just like HP-UX 9.05.  Rebuilt on HP-UX 9.05 without the
  16646. ioctl() trap that Jeff added for HP-UX 10.  No change, except now it actually
  16647. reads "Connection closed by foreign host."  from the pty but remains totally
  16648. impervious to keystrokes.  Juggled #ifdefs to include ptys only for HP-UX
  16649. 10.00 and above.  ckcdeb.h, ckupty.c
  16650.  
  16651. Tred building on SINIX 5.42.  Compiles and links OK but:
  16652.  
  16653.   ttopen PTY[telnet 128.59.39.2]
  16654.   do_pty()[pty_getpty() fails]=44806914
  16655.   set host line, errno[]=2
  16656.  
  16657. Since there was a /dev/ptmx, I tried defining HAVE_STREAMS; this was an
  16658. improvement; now we get:
  16659.  
  16660.   ttopen PTY[telnet 128.59.39.2]
  16661.   pty_getpty()[open(/dev/ptmx) success]
  16662.   pty_getpty() ttyname()[(NULL)]
  16663.   pty_getpty() slavebuf[/dev/ttyp4]
  16664.   do_pty() Xline[/dev/ttyp4]
  16665.   do_pty()[Slave starts]
  16666.   getptyslave()
  16667.   ptyint_void_association()[setsid()]
  16668.   ptyint_void_association()[open("/dev/tty", O_RDWR)]=-1
  16669.   pty_open_ctty() slave[/dev/ttyp4]
  16670.   ptyint_void_association()[setsid()]
  16671.   ptyint_void_association()[open("/dev/tty", O_RDWR)]=-1
  16672.   pty_open_ctty() open failure[/dev/ttyp4]=2
  16673.   pty_open_slave()[pty_open_ctty() failed]=44806916
  16674.   getptyslave()[Unable to open slave]=44806916
  16675.   do_pty()[getptyslave() fails - exiting]
  16676.   do_pty()[Slave fails to initialize]
  16677.   set host line, errno[]=22 <-- "Invalid Argument"
  16678.  
  16679. The user sees:
  16680.  
  16681.   /dev/ttyp4: No such file or directory
  16682.  
  16683. Added #define HAVE_STREAMS for SINIX to ckupty.h, but won't define NETPTY
  16684. for it unless we figure out how to make it work.  22 Nov 99.
  16685.  
  16686. Built for DG/UX 5.4 -- ptys work ok, added DG/UX to the pty list.
  16687. ckcdeb.h, 22 Nov 99.
  16688.  
  16689. Futzed with "show features" paging.  ckuus5.c, 22 Nov 99.
  16690.  
  16691. Installed missing pieces of developer tools on local DU 4.0E system.  Added a
  16692. cast to an arg of bzero() to shut up DECC.  With that, latest code builds
  16693. without complaint, and ptys work fine.  ckcnet.c, 22 Nov 99.
  16694.  
  16695. Changes from Jeff for HAVE_STREAMS; now it works on SINIX.  ckcpty.c, etc;
  16696. 23 Nov 99.
  16697.  
  16698. Consolidated {Free,Net,Open}BSD pty support under BSD44.  ckcdeb.h, 23 Nov 99.
  16699.  
  16700. Fixed ttopen() to set "ttnmsv" (saved ttname) for ptys too; otherwise, it
  16701. when proto() calls ttopen(), it closes the connection.  ckutio.c, 23 Nov 99.
  16702.  
  16703. Checked file transfer over pty connections:
  16704.  
  16705.  . ssh connections work fine with default FAST settings, streaming, reliable
  16706.    ON, etc, but SET PREFIXING ALL is needed because bare control characters
  16707.    can make trouble on PTYs -- tab expansion, CR->CRLF, who knows what else.
  16708.    8-bit files are sent OK too.  Obviously the transfer rate isn't great.
  16709.  
  16710.  . Same deal for rsh / rlogin.
  16711.  
  16712.  . For telnet, "set parity space" is also needed to transfer 8-bit data.  But
  16713.    the transfer rate is about 10 times faster.  Obviously SET PREFIXING ALL
  16714.    is needed here too for the Telnet escape character and probably also the
  16715.    interrupt character, etc.
  16716.  
  16717. Nothing special needs to be done about tilde on ssh/rsh connections since it
  16718. is significant only at the "beginning of a line", and this never happens with
  16719. Kermit packets.
  16720.  
  16721. Changed SET NETWORK TYPE COMMAND to SET NETWORK TYPE PIPE (but kept COMMAND
  16722. as an invisible keyword).  Ditto for switches, etc.  Because now we run
  16723. commands on ptys too.  ckuus[r47].c, 23 Nov 99.
  16724.  
  16725. Built on NetBSD 1.4.1.  Dumps core in fxdinit(), just like FreeBSD did before
  16726. I switched it to ncurses.  Rather than just switch to ncurses again this time,
  16727. let's find out what's wrong...  (Important because ncurses is an optional
  16728. item, so many people won't have it.)
  16729.  
  16730. First, installed NetBSD Project patches from Herbert Peyerl -- BIGBUFOK,
  16731. assorted casts, plus support for 7200 bps serial speed which I seem to have
  16732. overlooked.  ckcdeb.h, ckuusx, 24 Nov 99.
  16733.  
  16734. Back to fxdinit() in BSD44...  The man page for tgetent() says you have to
  16735. #include <termcap.h>.  That didn't help.  OK, it also said you had to declare
  16736. some variables, like "char *UP, *BC, ..." but that only gave syntax errors.
  16737. Tried linking with -ltermcap instead of -ltermlib.  Shuffling order of libs
  16738. made no difference.  Tried linking with only -lcurses and neither -ltermcap
  16739. nor -ltermlib.  Links OK but still crashes.  Tried casting 2nd tgetent() arg
  16740. to (const char *) like it says in <termcap.h>.  Still crashes.  Tried using a
  16741. static, rather than malloc'd tgetent buffer (16K!); it still crashes.  But a
  16742. newly-built 6.0 still works fine, and it calls the tgetent() exactly the same
  16743. way.  What's the difference?
  16744.  
  16745. EVENTUALLY...  I found it: tgetent() internally calls cgetent(), which in
  16746. turn calls dbopen(), which turns out to be "the library interface to database
  16747. files".  But dbopon is also the name of a new variable in Kermit, an int flag
  16748. meaning the IKSD database is open.  Unfortunately it is referenced in about
  16749. 1000 places...  I changed them all to "ikdbopen" and poof, all better.  Many
  16750. files, 24 Nov 99.
  16751.  
  16752. While on NetBSD, checked UUCP lockfile conventions against cu: OK.  Tried
  16753. dialing (with a Multitech modem) -- didn't work at all.  Why?  The modem
  16754. responses seem to end with <LF> only, rather than <CRLF>.  Added code to
  16755. dook() to allow for this and dialing works again.  But why did it break in the
  16756. first place?  If I CONNECT with SET TERM DEBUG ON, I see CRLFs, so it's not
  16757. the modem's fault.  Should I worry about this?  The debug log shows ttpkt() is
  16758. being called normally and succeeding, so I wonder why DIAL is not seeing the
  16759. CR's...  Instead, it looks like each CR is being converted to a LF, so
  16760. responses look like "OK<LF><LF>".  ckudia.c, 24 Nov 99.
  16761.  
  16762. Back to FreeBSD...  Built it with regular curses, now it's fine of course.
  16763. Tried dialing out, that's fine too -- unlike NetBSD, it sees the CRLFs, so the
  16764. previous trouble must have been NetBSD-specific.  Checked uucp lockfile
  16765. against cu; it's OK.  Access to lockfile & port are thru the dialer group.
  16766. 24 Nov 99.
  16767.  
  16768. Added support for uu_lock() for FreeBSD 3.0 and later.  This is almost just
  16769. like AIX ttylock(), but with different names and return values.  It's the
  16770. preferred method of line locking on FreeBSD 2.2.2 and later (but no point
  16771. making a new makefile entry to differentiate 2.0 from 2.2.2, so it's only in
  16772. the 3.0 target -- anyway, the effect is the same either way).  ckcdeb.h,
  16773. ckutio.c, makefile, 24 Nov 99.
  16774.  
  16775. Fixes to HTTP PUT from Jeff: ckcnet.c, 24 Nov 99.
  16776.  
  16777. Changed TRANSMIT /COMMAND to XMIT /PIPE (and left /COMMAND invisible).  Added
  16778. TRANSMIT /NOWAIT, which means don't wait for a "prompt" after each line in
  16779. text mode.  ckuusr.c, 24 Nov 99.
  16780.  
  16781. Testing TRANSMIT...  Various failures were not producing error messages.
  16782. Certain successes were not setting SUCCESS.  Also, now that the default file
  16783. type is binary, TRANSMIT does not work as expected -- changed TRANSMIT to use
  16784. text mode by default, no matter what the FILE TYPE is; therefore TRANSMIT
  16785. /BINARY *must* be used to transmit in binary mode, which is, after all, a
  16786. rather odd thing to do.  ckuus[r4].c, ckermit2.txt, 24 Nov 99.
  16787.  
  16788. Corrected some type mismatches in the IKSD database code.  ckuusx.c,
  16789. ckufio.c, 26 Nov 99.
  16790.  
  16791. For QNX ptys, added #include <fcntl.h> and #define O_NDELAY O_NONBLOCK, etc,
  16792. to make it compile OK, but it fails to initialize the pty at runtime.
  16793. ckupty.[ch], 26 Nov 99.
  16794.  
  16795. Added prototypes for ttyname() for HPUX 6 and 7.  ckutio.c, 26 Nov 99.
  16796.  
  16797. Eliminated a spurious error message from \fsplit() when it was asked to
  16798. fill an array with more words than the array could hold.  ckuus4.c, 26 Nov 99.
  16799.  
  16800. Fix from Lucas Hart for UNIX nzltor(), in which the last period is kept only
  16801. if it is in a filename, not in a directory path segment, since VMS doesn't
  16802. allow dots in directory names.  ckufio.c, 26 Nov 99.
  16803.  
  16804. SSL/TLS stuff from Jeff, mostly more separation of this from other modules.
  16805. ck_ssl.c ck_ssl.h ckuath.c ckuus3.c ckuus7.c ckuusr.h, 27 Nov 99.
  16806.  
  16807. The change to ttchk() on November 18th broke remote-mode file transfer on QNX.
  16808. Fixed, again.  ckutio.c, 27 Nov 99.
  16809.  
  16810. Noticed that CKMAXOPEN was -2 on QNX.  There is no definition for this in the
  16811. header files; wrote a little test program and found I could open 390 files
  16812. at once; changed ckcdeb.h accordingly.  27 Nov 99.
  16813.  
  16814. Fixes from Jeff for QNX ptys.  It all works except for noticing when the
  16815. pty process terminates.  ckupty.c, 27 Nov 99.
  16816.  
  16817. Added QNX to pty list.  ckcdeb.h, 27 Nov 99.
  16818.  
  16819. Added pseudoterminal control to the list of major features included or not
  16820. in SHOW FEATURES.  ckuus5.c, 27 Nov 99.
  16821.  
  16822. Tested Pty feature on SCO OSR5.0.5 -- it's ok.  Added it to the list.
  16823. ckcdeb.h, 27 Nov 99.
  16824.  
  16825. Tried building with ptys on SCO 3.2v4.2, but compilation dies with a syntax
  16826. error in <memory.h>.  Not worth pursuing.  Added prototype for ttyname().
  16827. ckutio.c, 27 Nov 99.
  16828.  
  16829. Moved the code to get the name of the controlling terminal in UNIX from
  16830. ttopen() to sysinit(), since we only need to get it once, and generalized the
  16831. test for local mode in ttopen() to include both the hardwired name (/dev/tty)
  16832. and the actual name (such as /dev/ttyp5), and made the name available in a
  16833. global string buffer, cttnam[], in case it's useful in the pty routines.
  16834. ckutio.c, 27 Nov 99.
  16835.  
  16836. Added a new variable \v(ctty) to show the name of the controlling terminal,
  16837. which is simply the contents of cttnam[].  For UNIX and VMS.  For the others
  16838. it's just CTTNAM (e.g. "CON", "@output", etc).  ckuusr.h, ckcdeb.h, ckuus4.c,
  16839. ck[uv]tio.c, 27 Nov 99.
  16840.  
  16841. Changed QNX pty code to use cttnam[] instead of "/dev/tty" and removed
  16842. NO_DEVTTY definition.  Works OK, ptyint_void_association() opens controlling
  16843. terminal, all is OK.  But it doesn't make any difference in close detection.
  16844. After logging out from a "pty telnet 0" connection, it reads Telnet's
  16845. "Connection closed by foreign host" message, but select() never notices that
  16846. the pty process died.  There must be some special API as in HPUX, but our QNX
  16847. host doesn't have any man pages and none of my QNX manuals says a word about
  16848. pseudoterminals, nor does the QNX website have any technical info.  I suppose
  16849. we could check just before select() if the slave pid was still alive but (a)
  16850. that could be pretty expensive, and (b) I'm not sure what to do if it isn't --
  16851. some cleanup code in ckupty.c probably needs to run.
  16852.  
  16853. Changed connection log to replace any spaces in the phone number with
  16854. underscores.  ckudia.c, 27 Nov 99.
  16855.  
  16856. Fixed misinterpretation of CARRIER message from Rockwell modems as equivalent
  16857. to CONNECT.  This one was lost since last May, oops.  ckudia.c, 27 Nov 99.
  16858.  
  16859. Somebody pointed out a while back that "?Not valid in this position" was not
  16860. a very good error message for "type blah", where "blah" was the name of a
  16861. nonexistent or inaccessible file.  A byproduct of chained FDBs.  The problem
  16862. is that the message is not issued until after we go through all of the FDBs
  16863. and none of them succeeds.  By that time, the real cause for any error is long
  16864. gone.  But at least we can construct a better message like "?Does not match
  16865. switch or filename", so I made this change in cmfdb(): ckucmd.c, 27 Nov 99.
  16866.  
  16867. There was an odd case not caught by the command-file reader.  If command
  16868. file's final line was a closing brace (e.g. of a loop or block) but lacked a
  16869. terminator, the block would not be completed or executed.  Fixed in getnct():
  16870. ckuus5.c, 27 Nov 99.
  16871.  
  16872. The MANUAL command was not restoring the console terminal modes before
  16873. escaping to the system; thus in VMS (for example) keystrokes didn't echo.
  16874. Fixed in docmd(): ckuusr.c, 27 Nov 99.
  16875.  
  16876. Went to check out a complaint about UUCP lockfiles on Digital UNIX, but UUCP
  16877. wasn't installed, so I installed it.  Couldn't figure out how to use cu (it
  16878. would just exit immediately with no message), but the man pages weren't
  16879. installed either.  Installed the man pages and read them.  Configured a
  16880. "direct" serial device by running uucpsetup -- nothing works unless you do
  16881. this first; the original serial devices are useless.  Made a connection with
  16882. cu and then checked the lockfile.  Everything is fine: location
  16883. (/usr/spool/Locks), name (LCK..ttyxx), and contents (4-byte binary int PID).
  16884. But I added -DNOCOTFMC since the original person said it was necessary to keep
  16885. SET LINE from hanging -- I tested it here and it's fine (but it was also fine
  16886. before).  ckutio.c, 27 Nov 99.
  16887.  
  16888. Added a short HTTP section (2.15) to ckermit2.txt, 27 Nov 99.
  16889.  
  16890. From Jeff...  ckuusr.c: Fixes the LOGIN/LOGOUT problem on VMS.  This code
  16891. should not have been #define CK_LOGIN (since it's for the client).  ckupty.c:
  16892. More changes for QNX.  Still can't determine when the slave is invalid.  I am
  16893. concerned that write()ing to the pty after the slave is closed does not report
  16894. an error.  That leaves me with the impression that the device is still open.
  16895. ckcmai.c ckcnet.c ck_ssl.c ck_ssl.h: More removal of SSL code from the main
  16896. code.  ckuus3.c: Modifications to getyesno() to support K95.  28 Nov 99.
  16897.  
  16898. Checked new stuff on VMS: \v(ctty) OK, LOGIN/OUT fixes OK.  TTY modes around
  16899. MANUAL command OK.  28 Nov 99.
  16900.  
  16901. Lucas Hart reports that recursive transfers of large directory trees stops
  16902. prematurely.  Test case: openssl-0.9.4.  Using the same file set on SunOS I
  16903. see even worse than that -- "dir /recursive openssl-0.9.4" doesn't even parse.
  16904. Added some debugging to addresult()...  Everything proceeds normally until
  16905. after the 166th file is added to the list.  From that point on, we never see
  16906. another regular file -- only directories.  Why?  segisdir is set to 1 when it
  16907. should be 0 -- a mystery since there is no way this can happen; there are
  16908. comments about this in the traverse() code already -- it's been a mystery for
  16909. some time.  But this code is so delicate I really can't risk touching it, so
  16910. let's see if we can find a workaround...  If I "cd openssl-0.9.4", then "dir
  16911. /recursive" works perfectly.  So therefore we can rule out anything special
  16912. about the directory tree itself (its size, depth, number of files, order of
  16913. files and directories, etc).  It must be something about the initial setup in
  16914. splitpath...  Another experiment: "dir /recursive openssl-0.9.4/*" works too.
  16915. So maybe the workaround is to simply tack "/*" onto the end if it's a
  16916. directory.  No, that's not it -- I already do that.  Anyway, most of this was
  16917. a wild goose chase since there was another error in cmifi() that was obscuring
  16918. everything: the '&wild' return value was not being set on recursive file
  16919. parses in which the filespec did not actually contain wildcards, which
  16920. prevented any command that operated on multiple files from working right.
  16921. Fixed in cmifi(): ckucmd.c, 28 Nov 99.
  16922.  
  16923. OK, back to traverse(), my least favorite place to be...  When we say "dir
  16924. openssl-0.9.4" (or "dir openssl-0.9.4/*") we still stop short of listing the
  16925. full directory, but when we cd to the directory and don't give a filespec, we
  16926. do get the full listing.  So what's the difference?
  16927.  
  16928. In the working case (A), a "*" is supplied as the filename, so the initial
  16929. isdir() fails since "*" isn't a directory, whereas in the failing case (B)
  16930. "openssl-0.9.4" is a directory.  That shouldn't matter, since in the latter
  16931. case we append "/*" to make it wild.
  16932.  
  16933. So fgen() in case A gets "*" but in case B it gets "openssl-0.9.4/*".  And
  16934. therefore splitpath() makes one segment in case A and two in B.  Well,
  16935. everything goes along OK for 85 files or so until we get to a certain
  16936. directory (one among many).  For some reason, when we retrieve the first file
  16937. from it, we call ckmatch() with the original filespec ("openssl-0.9.4/*")
  16938. rather than the current name part ("*").  Aha, once again the culprit is
  16939. segisdir...
  16940.  
  16941. OK, what is segisdir anyway?  As I recall it was a hack to cut down on the
  16942. number of calls to isdir(), which are quite expensive, at least in UNIX.  I
  16943. think the idea was that if the current segment had a forward link, then it was
  16944. guaranteed to be a directory, thus obviating the isdir() call.  OK, let's
  16945. see...  segisdir is set up above, but if we open a new directory after setting
  16946. it, that pretty much invalidates its meaning, so what good is it in this
  16947. context?  Finally I commented out the offending segisdir-based test, which
  16948. decides which string to match and this fixes the problem.  But what does it
  16949. break?
  16950.  
  16951. Dug up my old full-page checklist of directory-traversal tests...  Out of
  16952. fifty-some tests, the new version flunks only one that the old one passed:
  16953. "dir /recursive */*.txt" (or */*/*.txt, etc).  Hmmm, it's all coming back to
  16954. me now, vaguely -- this was the problem that the code I just removed was
  16955. intended to fix.  So what's the difference between the two cases?
  16956.  
  16957.  A. dir /recursive openssl-0.9.4 --> "openssl-0.9.4/*"
  16958.  B. dir /recursive */*.txt       --> "*/*.txt"
  16959.  
  16960. The difference, obviously, is left and right *'s.  The only way to keep them
  16961. both happy is to carry around the full relative pathname of each file, rather
  16962. than just the current segment.  To be continued...  ckufio.c, 28 Nov 99.
  16963.  
  16964. Some more SSL changes from Jeff.  ckcmai.c, 29 Nov 99.
  16965.  
  16966. Changed traverse() to compare full paths (rooted at starting position), rather
  16967. than all the clever stuff with segments.  This fixes B without breaking A;
  16968. however it breaks "dir */*.txt", "dir */*/*.txt", etc; any nonrecursive lookup
  16969. in which there is a wildcard in a directory path.  Everything else is fine
  16970. (except for one thing, which has always been broken, more about this later).
  16971. ckufio.c, 29 Nov 99.
  16972.  
  16973. The problem is that "subdir" does not match "*/*.txt" and so the subdirectory
  16974. is being skipped rather than opened.  Removing the clever trick to avoid
  16975. calling isdir() if listing is not recursive fixes this problem, but of course
  16976. slows us down.  But worse, it fails to fix "*/*/*.txt".  In this case,
  16977. ckmatch() is actually being called correctly:
  16978.  
  16979.   ckmatch string[subdir/thisdir/oofa.txt]
  16980.   ckmatch pattern[*/*/*.txt]
  16981.  
  16982. and fails to match.  Why?  Because it's an unstructured string match; it
  16983. doesn't treat filespec field separators differently from any other character,
  16984. whereas in UNIX filename globbing, directory separators are fences and can't
  16985. be gobbled up by "*", etc.  A simple change to ckmatch() to make "*" treat
  16986. "/" as a fence fixes the problem, but of course will break a thousand other
  16987. things.  So I changed the "matchdot" parameter to ckmatch() to be an "options"
  16988. parameter, bitmapped.  Bit 0 = match leading dot.  Bit 1 = filename globbing
  16989. so don't let * span field separators.  Set bit 1 in the appropriate calls,
  16990. mainly the ones from traverse().  Purposely did not set it in some other
  16991. places like SET FILE {TEXT-,BINARY-}PATTERNS because in that case we really
  16992. don't want to treat "/" specially.
  16993.  
  16994. Now in truth, "*/*/*.txt" should match "a/b/c.txt" whether it's a filespec or
  16995. not.  The above fix address filenames, but "if match a/b/c.txt */*/*.txt"
  16996. still does not succeed.  It seems we have two contradictory goals:
  16997.  
  16998.     Pattern    String
  16999.  A. */*/*.txt  a/b/c.txt
  17000.  B. a*bc,      abcbc
  17001.  
  17002. If A matches, B doesn't, and vice versa.  Yet both should match.  Currently
  17003. it's a matter of whether the "*" matcher searches for the rightmost or the
  17004. leftmost occurrence of the thing that follows it.  Until now, the strategy has
  17005. been rightmost, in which B worked.  Changing it to leftmost fixes A and breaks
  17006. B.  How can we make both work?  It appears to be a matter of whether the thing
  17007. that follows the thing that follows the "*" is another "*".  I added this
  17008. distinction and now both work, and "match.ksc" still passes.  Now I commented
  17009. out the previous filename-globbing change and ran the traverse() test again.
  17010. It worked fine, except one thing broke ("../.*").  Restoring the globbing code
  17011. fixed that.  But it broke "dir /recursive subdirname" so I removed it again.
  17012.  
  17013. So where are we now?  Everything works except:
  17014.  
  17015.  a. "directory ../.*" matches too much.
  17016.  b. Other unrelated problems involving symlinks are still there.
  17017.  
  17018. ckmatch() is being called with "../subdir" and ".*".  Well, clearly without
  17019. treating "/" as a fence, ".*" is going to match "../subdir".  But now for some
  17020. reason the fence business also breaks recursion.  This code is exactly like a
  17021. Whack-O-Mole -- you can't knock one down without making another one pop up.  So
  17022. let's leave it like this (no fence) for now; it's not perfect but it's a big
  17023. improvement.  The remaining problems are as above.
  17024.  
  17025. The symlink problem has several facets.  First, suppose the current directory
  17026. contains directory d1 and a symlink, d2, to d1.  Then "dir */*.txt" shows each
  17027. file in d1 twice, e.g. "d1/foo.bar" and "d2/foo.bar".  But "dir /recurs" is
  17028. smart enough to avoid this.  Oddly enough, UNIX "ls" and "ls -R" behave
  17029. exactly like Kermit.
  17030.  
  17031. Second, "dir /recursive /tmp/fdc/" says "empty directory" (when it's not).
  17032. Why?  In this case "/tmp" is a link to "/usr/tmp".  Here we are opening the
  17033. directory 0 times instead of 2 times (as in the previous case), or 1 time
  17034. (as we should).  (ls -R does NOT have this problem.)
  17035.  
  17036. Third, "dir /recursive /tmp" (same /tmp) just shows the symlink instead of
  17037. following it.  (ls -R does NOT have this problem.)
  17038.  
  17039. None of these symlink-related problems is new; they've been with us all along.
  17040. I'll see what I can about them tomorrow.
  17041.  
  17042. From Jeff: changes to the HTTP commands.  The DELETE command is now supported.
  17043. Like PUT it is almost never supported due to security concerns but we include
  17044. it for symmetry.  Fixed several buffer over write errors in the allocation of
  17045. memory for the http request buffer.  Changed the local-file for GET and INDEX
  17046. to be optional.  If the file is not specified the output goes to the display.
  17047. (if we don't like it then we can simply modify the code in ckuusr.c (cx ==
  17048. XXHTTP) to ensure that a local file name is specified.)  Added checks to the
  17049. dohttp() function to insure that the command will not be attempted when there
  17050. is no connection or when Kermit is being used as IKSD.  Finished relocating
  17051. SSL/TLS code: Removed lots of variables that either wre not being used or
  17052. simply complicated the configuration of SSL/TLS.  With these changes I am now
  17053. comfortable including SSL/TLS as a feature without any qualifications.
  17054. ck_ssl.c security.txt ck_ssl.h ckuath.c ckuus3.c ckctel.c ckuus7.c ckcnet.c
  17055. ckcmai.c ckuusr.c ckermit2.txt ckcnet.h, 29 Nov 99.
  17056.  
  17057. Fixed long lines & trailing blanks in ck_ssl.c.  29 Nov 99.
  17058.  
  17059. Never satisfied, went back to traverse() / ckmatch() problems.  Restored the
  17060. pathname fence changes to find out what the problem was with recursion, namely
  17061. that "dir /recursive subdir" does not recurse.  Why?  Obviously because
  17062. "subdir/*" does not match "subdir/a/b/c..." when "/" is a fence.  But since
  17063. the search is recursive, there should be no fences so I changed traverse() to
  17064. enable fences only in nonrecursive searches.  This change works, fixes the
  17065. "../.*" problem, but breaks two things:
  17066.  
  17067.  a. dir */*/*.txt  <-- no match
  17068.  b. dir /etc       <-- doesn't show subdirectories
  17069.  
  17070. These might actually be the same problem, namely that in nonrecursive
  17071. searches, we don't descend far enough.  The solution here is to open
  17072. directories not only on recursive searches, but also on nonrecursive ones
  17073. when the current search depth is less than the pattern depth.  This fixes
  17074. (a) but not (b).  In the latter case we are matching "/etc/blah" with "*"
  17075. (because blah is a directory), but the /'s preclude a match.  So one more
  17076. adjustment: turn off fences if the match object is a directory.  This
  17077. fixes (b).  Now let's run through the big list again to see what we broke:
  17078.  
  17079.  a. dir ./.*  (shows all files)
  17080.  b. dir ../.* (shows dot files plus directories)
  17081.  
  17082. Everything else works except for the symlink problems.
  17083.  
  17084. The problem with (a) is that, even though (say) "READ.ME" does not match ".*",
  17085. it is still being added because it is the end of a path segment.  Changed the
  17086. ELSE part of the big match-result IF statement to apply only if the current
  17087. item is a directory (rather than just ASSUMING it's a directory) AND it
  17088. matches the pattern OR the search is recursive, This fixes (a) but not (b).
  17089. Why?  Because we're matching "../blah" against ".*" without fences because of
  17090. the previous adjustment.  OK, but in this case we should be matching with
  17091. "../.*", not ".*".  I added a disgusting hack to handle this.
  17092.  
  17093. Ran the tests again.  Now we have a problem with "dir /recursive .*".  It
  17094. matches (for example) .xxx/oofa.txt.  Should it?  It didn't before...  But
  17095. worse, it misses some that it should match.  The problem in both cases is that
  17096. it is matching the whole path rather than the current segment, which is how we
  17097. got started on this tangent to begin with.  OK, how should it know when to
  17098. match only the current segment rather than the entire path?  When the search
  17099. is recursive?  OK, that fixes this problem, but breaks "dir /recursive
  17100. */*.txt".  OK, so when the search is recursive AND the pattern does not
  17101. contain slashes...  Good, this fixes "dir /recu .*".  Everything else works
  17102. now except:
  17103.  
  17104.  a. dir /recursive .. (or anything that starts with ..)
  17105.  b. dir /recursive ./ (anything that starts with ./)
  17106.  
  17107. These were fixed by moving the stripping of any leading "./"'s from fgen() to
  17108. traverse(), and changing the "if" for stripping to a "while".  Now we pass ALL
  17109. tests except for symlink problems.  Let's look at these now:
  17110.  
  17111.  a. "dir */*.txt", where the current directory contains a "foo" directory and
  17112.     a symlink, "bar", to foo.  In this case, the contents of the bar directory
  17113.     are shown as if it was a separate directory.  But as noted before, ls
  17114.     does the same thing.  So does "ls -R */*.txt".  But Kermit's "dir /recurs
  17115.     */*.txt" does not -- Is Kermit being too clever?
  17116.  
  17117.  b. "dir /recursive /tmp", where /tmp is a symlink, just displays the symlink
  17118.     rather than entering the directory.  This is no doubt related to the
  17119.     cleverness in (a).  "ls -R /tmp" does NOT have this problem.
  17120.  
  17121.  c. "dir /recursive /tmp/fdc", where /tmp is a symlink, says the directory is
  17122.     empty when it's not.  "ls -R /tmp" does NOT have this problem.
  17123.  
  17124. Conclusion: C-Kermit is being too clever.  How can it possibly know that some
  17125. symlink might be redundant when others are not?  It can't.  The clever bit was
  17126. located in isdir().  Commenting it out fixes a thru c and makes Kermit behave
  17127. like ls and ls -R.  But we'd better run the 60 tests again just to make sure...
  17128. Hmmm, they're all OK.
  17129.  
  17130. Well, a couple minor problems turned up, but they were there before too:
  17131. "dir /recursive ./.*" and "dir /recursive ../.*" are slightly off.  In case
  17132. anybody ever notices these, they can be easily worked around.
  17133.  
  17134. Finally, one more problem was introduced recently.  In the CD command,
  17135. completion no longer works on a directory name (absolute or relative) if the
  17136. part entered so far contains a path separator.  Example:
  17137.  
  17138.   cd subd<Esc>         works (subdir is a subdirectory of the current dir)
  17139.   cd subdir/ano<Esc>   doesn't (ano -> another)
  17140.   cd et<Esc>           works (from /) (for /etc)
  17141.   cd /et<Esc>          doesn't
  17142.  
  17143. Why?  ckmatch is being called with "ano*" and "subdir/another", which don't
  17144. match.  Fixing this in the obvious way would, of course, break everything I
  17145. fixed already.  So let's try something devious, a hideous disgusting hack
  17146. designed to catch exactly this case without disturbing any of the others.
  17147. This seems to work, in that it fixes the problem, and we get through almost
  17148. all of our test suite without difficulty, until reaching "dir /recursive /etc",
  17149. at which point we just hang (I bailed out after 2 minutes).  But removing the
  17150. hideous hack didn't change this.  Well, ls -R works, CK Beta.10 works.  Aha,
  17151. /etc contains a symlink to the NFS-mounted Columbia University mail spool,
  17152. which contains 40,000 directories...  OK, false alarm.  But why does ls -R not
  17153. stumble into the same hole?  Because if you give it the -R (Recursive) option,
  17154. it doesn't follow symlinks at all unless you include the -L option.  OK, back
  17155. to the test suite...  And now for the first time, C-Kermit passes every single
  17156. test.  ckufio.c, 30 Nov 99.
  17157.  
  17158. So what to do about the /etc problem?  Three choices:
  17159.  
  17160.  1. Nothing (keep following symlinks in recursive searches).
  17161.  2. Don't follow symlinks in recursive searches.
  17162.  3. Add a command or switch.
  17163.  
  17164. Option (3) is not practical since it would need to go on every command that
  17165. allows recursion, but even then we still have functions like \frfiles().  If I
  17166. choose (2), then users won't have any way to defeat it.  So let's stick with
  17167. (1); if they get in trouble like I did, they can use circumlocutions.  Added
  17168. some notes about this to ckermit2.txt, 30 Nov 99.
  17169.  
  17170. So there you have it, another three long days on traverse().  If this ever
  17171. comes up again, remind me to throw the whole thing out and start over.  I'd do
  17172. it now, but it's working and we have to move on.
  17173.  
  17174. From Jeff: Plug some IKSD holes; more SSL/TLS shuffling.
  17175. ck_ssl.[ch] ckctel.c ckufio.c ckuus5.c, 30 Nov 99.
  17176.  
  17177. Changed DIR error message to more intelligently differentiate a bad switch
  17178. from a bad file or directory name.  ckuus6.c, 30 Nov 99.
  17179.  
  17180. Tried "pty tn3270 <ibm-mainframe>".  Works fine.  Added a section on this to
  17181. the doc.  ckermit2.txt, 30 Nov 99.
  17182.  
  17183. From Jeff: corrections to filename-matching code in ckmatch() for non-UNIX
  17184. builds: ckclib.c, 1 Dec 99.
  17185.  
  17186. From Jeff: The SET LOGIN PASSWORD password is now used for automated Kerberos
  17187. logins if the TGT was triggered by an Auto-GET and if the principal and realm
  17188. are known.  Otherwise, it is ignored and the user is prompted.  Now the dialer
  17189. can be configured with a user's password and it can trigger and auto login.
  17190. The same is true for SET HOST /PASSWORD:<pwd> <host>.  ckuath.c, ckuus[37].c,
  17191. 1 Dec 99.
  17192.  
  17193. Discovered that telling the client to "set transaction-log brief", "log
  17194. transactions", and then "remote pwd" produced a core dump.  The
  17195. transaction-log writing routines were not protecting against null pointers.
  17196. Fixed in ckuusx.c, 1 Dec 99.
  17197.  
  17198. Lucas Hart reported that "get /recursive" from VMS client to UNIX server
  17199. resulted in all files arriving in binary mode.  Sure enough.  The same thing
  17200. happens UNIX-to-UNIX so it's not a matter of peer recognition.  On the
  17201. Whack-A-Mole theory, tried backing out of the SEND /TEXT change from Oct 22,
  17202. but it made no difference (so I backed out of the backing out).  Turns out
  17203. the problem was in the GET command parser, introduced on 24 Feb 99 with the
  17204. change to make GET /RECOVER imply /BINARY; the problem was a fall-through
  17205. from one switch case to the next that was valid before this change, but not
  17206. after.  Strange nobody noticed the problem for 9 months.  Let's hear it for
  17207. long Betas!  Fixed in doxget(), ckuus6.c, 1 Dec 99.
  17208.  
  17209. Built & tested on VMS:
  17210.  . get *
  17211.  . get /recursive *
  17212.  . get /text *
  17213.  . get /binary *
  17214.  . get blah, get /text blah, get blah (to make sure global mode restored).
  17215. All work fine.
  17216.  
  17217. Added --privid:{ok,no,...} command-line option for IKSD.  Sets ckxpriv, which
  17218. is defined in ckufio.c (so also needs to be defined in other ck*fio.c);
  17219. initial value 1 for compatibility with current behavior, but maybe it should
  17220. be 0.  Does nothing at the moment, but if 0 should prevent login to IKSD as
  17221. a privileged user.  ckuusr.h, ckuus[5y].c, ckufio.c, 1 Dec 99.
  17222.  
  17223. From Jeff: "if not iksd" checks added for many top-level commands.  Many
  17224. modules, 1 Dec 99.
  17225.  
  17226. Added PURGE /RECURSIVE.  (DELETE /RECURSIVE would be easy to add too, except
  17227. it would only affect files; we don't have a good way of deleting a directory
  17228. tree, or knowing when to delete a particular directory and when not to).
  17229. ckuus[27].c, 1 Dec 99.
  17230.  
  17231. Suppose I'm in a directory that contains a bunch of files and backup files and
  17232. I "send *" with filenames literal.  All the files, including the backup files,
  17233. are sent with their own names, like "foo.c.~3~".  OK, fine.  But now suppose I
  17234. "send *" again, to the same directory.  Now the backup files get double backup
  17235. suffixes, like "foo.c.~3~.~1~".  Changed znewn() to automatically trim backup
  17236. suffixes from incoming files before assigning new ones.  ckufio.c, 1 Dec 99.
  17237.  
  17238. Peter E pointed out that constructions like:
  17239.  
  17240.   define foo {,-
  17241.     blah blah
  17242.   }
  17243.  
  17244. didn't work ("?Macros nested too deeply").  But there's no good reason they
  17245. shouldn't.  The rule is that a braced section begins with a line ending with
  17246. an open brace.  But ",-" also indicates a line break, so the construction
  17247. above should be exactly equivalent to the same construction without the ",-".
  17248. Added code to getnct() to account for this situation.  And while looking at
  17249. getnct(), I saw an opportunity for a big speedup (or, rather, to undo a major
  17250. stupidity): this routine allocated a new read buffer every time it was called.
  17251. I changed the code to allocate a new buffer only the first time called, or if
  17252. called later requesting a larger size.  I don't have a good benchmark, but a
  17253. rough measurement indicates a 100% speedup in the reading of command files and
  17254. dialing directories (but only when the command file doesn't actually do any
  17255. computation; in most cases the difference is imperceptible).  ckuus5.c,
  17256. 2 Dec 99.
  17257.  
  17258. Another GET command improvement: in GET [ switches ] <remote> <local>,
  17259. if <local> has the syntax of a directory name we try to CD to it, but if it
  17260. does not exist, GET fails.  Now if it does not exist, we try to create it
  17261. before trying to CD to it, but only if it seems to have directory syntax;
  17262. for example in UNIX if it ends with "/", or in VMS if it ends with "]"
  17263. or ">".  doxget(): ckuus6.c, 2 Dec 99.
  17264.  
  17265. Fixed a minor problem in VMS:  Suppose your current directory has a
  17266. subdirectory [.TMP].  You tell Kermit to "cd tm<Esc>"; Kermit correctly
  17267. expands this to (say) DKA0:[MYNAME]TMP.DIR;1, but when you press Return, it
  17268. says "Invalid argument".  Yet if you type "cd dka0:[myname]tmp.dir;1" it
  17269. works fine.  Too hard to explain.  Fixed in docd(): ckuus5.c, 2 Dec 99.
  17270.  
  17271. Fixed another problem reported by Lucas: if you tell Kermit to "set transfer
  17272. mode manual" (or whatever), then put it in server mode, then transfer some
  17273. files with a client whose transfer mode is auto (different from the server),
  17274. then finish the server, its transfer mode has changed to the client's.  Fixed
  17275. by making SET TRANSFER MODE set the global transfer mode as well as the
  17276. effective one.  ckuus3.c, 2 Dec 99.
  17277.  
  17278. Checked out Lucas's report from a while back about the VMS Kermit server's
  17279. response to REMOTE DIR being history-dependent.  As far as I can tell, it
  17280. doesn't happen any more.  2 Dec 99.
  17281.  
  17282. Lots o' changes from Jeff, mainly for checking in each command whether it may
  17283. be given to IKSD.  Mostly ckuus*.c, 2 Dec 99.
  17284.  
  17285. Changes from Jeff: minor corrections to stuff from yesterday, conversion of
  17286. many (more) sprintf's to ckstrncpy's.  ckcnet.c ckuus4.c ck_ssl.c ckuus2.c
  17287. ckuus6.c ckuus3.c, 3 Dec 99.
  17288.  
  17289. More c.f.j: ordered authentication type list: ck_ssl.c ckuath.c ckuath.h
  17290. ckuus3.c ckuus7.c, 3 Dec 99.
  17291.  
  17292. Made SET RECV a synonym for SET RECEIVE so we can write a lot SET SEND and
  17293. SET RECV commands and have them line up.  ckuusr.c, 4 Dec 99.
  17294.  
  17295. A final touchup to traverse().  There were still some small problems involving
  17296. ".." in UNIX, but removing one of the special cases I inserted in traverse()
  17297. for ".." a couple days ago cleared it up.  Also, the test in fgen() for
  17298. automatically setting "matchdot" for a given match if the given filespec began
  17299. with "." was overlooking the "../blah" case, which also was responsible for
  17300. some of the ".." problems.  Fixed in ckufio.c, 4 Dec 99.
  17301.  
  17302. Suppose you want to use a version of C-Kermit that is stored on the host as
  17303. "wermit" or "ckermit".  If you change your local Kermit's autoupload strings
  17304. to to use this name, C-Kermit would still only recognize "kermit" at its
  17305. prompt.  Added "wermit" and "ckermit" as synonyms.  ckuusr.c, 4 Dec 99.
  17306.  
  17307. New security.txt and telnet.txt from Jeff plus a couple minor source
  17308. corrections.  4 Dec 99.
  17309.  
  17310. Added a new feature for VMS: SET { SEND, RECEIVE } VERSION-NUMBERS { ON, OFF }.
  17311. Normally both are OFF.  If SEND VER ON, the VMS version number is kept on the
  17312. outbound filename; if OFF it is stripped.  If REC VER OFF, any VMS version
  17313. number on the incoming filename is stripped; if ON, it is kept.  This setting
  17314. is independent of FILE NAMES { LITERAL, CONVERTED }.  ckuus[247].c, ckvfio.c,
  17315. 4 Dec 99.
  17316.  
  17317. Noticed that CD command in VMS doesn't work any more -- i.e. instead of
  17318. returning to your login directory, it does nothing at all.  It's because of
  17319. the seemingly innocent change I made to docd() a couple days ago.  Fixed by
  17320. focusing the change a little better.  ckuus5.c, 4 Dec 99.
  17321.  
  17322. Noticed that when uploading a file to VMS with specifying a path, it always
  17323. went in the home directory rather than the current directory.  Cause: a typo
  17324. in the GET-command-improvement code from 2 Dec.  Fixed in doxget(): ckuus6.c,
  17325. 4 Dec 99.
  17326.  
  17327. Noticed that when VMS C-Kermit sends back the full filespec to the sender, it
  17328. always ends in ";" without the version number.  Ditto for the transaction log,
  17329. etc.  It's been like that forever; it has nothing to do with recent changes.
  17330. After some investigation, it turns out that this is howsys$parse() works -- it
  17331. doesn't actually go to disk; it only parses the given string.  Added a new
  17332. routine, getvnum(), that gets the version number using lib$find_file()
  17333. (suggested by Hunter G), and it works, but when the zfnqfp() result includes
  17334. the version number, this breaks all sorts of commands, notably LOG.  For
  17335. example, if DEBUG.LOG;2 exists and you tell C-Kermit to "log debug debug.log",
  17336. zfnqfp() finds DEBUG.LOG;2 and then when we go to open for output we get an
  17337. error.  So I backed out of all this and left it as it was.  4 Dec 99.
  17338.  
  17339. Updated NEWS text.  ckuus2.c, 4 Dec 99.
  17340.  
  17341. Did some preliminary builds to catch major foulups before starting the
  17342. build-all: HP-UX 10 (with and without ANSI features, optimization), VMS
  17343. (UCX and nonet), FreeBSD, SINIX, ...
  17344.  
  17345. Built with various features deselected on FreeBSD: NONET, NOCSETS, NODEBUG,
  17346. NOUNICODE, NOHELP, NOSPL, NOIKSD, NOXFER, NOSHOW, NOSERVER, NOPUSH,
  17347. NOPIPESEND, NOPTY, NOMSEND, NOLOGIN -- various minor #ifdef adjustment were
  17348. needed.  ckuus3.c, etc, 4 Dec 99.
  17349.  
  17350. Changed default IKSD database directory from /tmp to /var/log.  ckcdeb.h,
  17351. 5 Dec 99.
  17352.  
  17353. Installed new "Open-Source-Friendly" copyright notice and changed VERSION
  17354. command to get the paging right.  ckcmai.c, ckuusr.c, 5 Dec 99.
  17355.  
  17356. Changed source-file copyright text to refer to main notice; all modules,
  17357. 5 Dec 99.
  17358.  
  17359. Adapted pty code to NeXTSTEP.  ckupty.c, 5 Dec 99.
  17360.  
  17361. Excluded 4.4 BSD #include for <termcap.h> from BSDI, since it doesn't
  17362. have it.  ckuusx.c, 5 Dec 99.
  17363.  
  17364. Big trouble with Ultrix 4.3 -- first of all it barfs on the new makefile's
  17365. KTARGET clauses.  Makefile, 5 Dec 99.
  17366.  
  17367. After removing the KTARGET phrases from the Ultrix entries, I get:
  17368.  
  17369.   ... -c ckcmai.c
  17370.   cpp: error /usr/include/netdb.h:94: Can't find include file sys/bitypes.h
  17371.   cpp: error /usr/include/netdb.h:96: Can't find include file sys/cdefs.h
  17372.  
  17373. Some header files have disappeared from this computer -- I verified this
  17374. by trying to rebuild Beta.10 (which built OK there before) and it gets the
  17375. same error.  So I could only build a nonet version for Ultrix.
  17376.  
  17377. The SET DIAL TEST { ON, OFF } case was nested inside another case.
  17378. Fixed in ckuus3.c, 5 Dec 99 (after most of the binaries were built).
  17379.  
  17380. Protected an unguarded "extern int ucsorder" declaration with #ifdef UNICODE
  17381. in ckcfns.c (the DG AOS/VS link step will fails if extern declarations are not
  17382. resolved, even though they are never referenced), 5 Dec 99.
  17383.  
  17384. Something was very wrong in VMS 7.2-1; the SMG-based fullscreen file transfer
  17385. display gets: "?refresh: smg$begin_pasteboard_update: %SMG-F-INVPAS_ID,
  17386. invalid pasteboard-id".  But this doesn't happen in VMS 7.1 or earlier.
  17387. Eventually I concluded, correctly I hope, that the problem was just a
  17388. misconfiguration of the terminal database on that machine (because the debug
  17389. log said "initscr: smg$create_pasteboard: %SMG-F-UNDTERNOS, undefined terminal
  17390. - couldn't access system terminal table".  However, Kermit was handling this
  17391. error very badly, spewing thousands of error messages to the screen.  I added
  17392. code to the VMS curses-simulation routines to check for this and to switch
  17393. automatically to the CRT display when it happens. ckuusx.c, 5 Dec 99.
  17394.  
  17395. On one of the Linux systems I have access to, which (last time I heard) was
  17396. Slackware 3.5.0 (how do you tell?) now complains when ckupty.c tries to
  17397. include <sys/select.h>.  There is no <sys/select.h> or <select.h>.  I had to
  17398. make a new Linux target, linuxns, to handle this case.  There must be a better
  17399. fix, since the problem happens only in ckupty.c and not in other modules that
  17400. use select(), but the better solution will have to wait till after Beta.11.
  17401. Hmmm, on second thought, it seems that <[sys/]select.h> is included by ckupty.c
  17402. only in Linux, but no version of Linux I have access to needs it.  So I simply
  17403. commented out the #include.  (NOTE: according to RH 5.2 "man select", the
  17404. needed header files for select() are <sys/time.h>, <sys/types.h>, and
  17405. <unistd.h>, but we don't call select() in ckupty.c so it appears we never
  17406. needed any of this.  makefile, 5 Dec 99.
  17407.  
  17408. Peter E discovered that if you log in to IKSD with REMOTE LOGIN (rather than
  17409. by hand), that IKSD accepts only 91-byte packets, and does not respond to
  17410. file interruption (X) requests.  The problem seems to be confined to IKSD,
  17411. since if you run an ordinary server and REMOTE LOGIN to it, this does not
  17412. happen.  Comparison of the debug logs shows that in spar(), urpsiz is 4000
  17413. in the normal case, 90 in the problem case.  It turns out that dofast()
  17414. (which sets up fast file-transfer parameters) was not being called if there
  17415. was no init file.  Moved the dofast() call to the mainline initialization
  17416. sequence in main(): ckcmai.c, 6 Dec 99.
  17417.  
  17418. Due to a typo, the LOGOUT command was dispatching to the LOGIN routine.
  17419. Fixed in ckuusr.c, 6 Dec 99.
  17420.  
  17421. The LOGIN and LOGOUT commands, if given with no connection, printed an error
  17422. message but did not advance to the next line.  Fixed in ckuus7.c, 6 Dec 99.
  17423.  
  17424. William Bader noticed that the SCO OSR5 version did not display a herald when
  17425. started.  The same in Unixware 2 (but not 7).  Diagnosis: the SCO compiler was
  17426. generating bad code for:
  17427.  
  17428.   if (noherald || bgset > 0 || (bgset != 0 && backgrd != 0)) x = 1;
  17429.  
  17430. x was 0 before this, all conditions are false, and afterwards x is -32.
  17431. Fixed by rephrasing in herald(): ckuus5.c, 6 Dec 99.  (Note: the bug does not
  17432. occur in a small test program; i.e. it is not easily reproducible.)
  17433.  
  17434. New HELP text from Jeff for SSL and HTTP, plus a minor correction to an
  17435. SRP-related ?-help string.  ckuus[23].c, 6 Dec 99.
  17436.  
  17437. Added new tru64-40g target.  makefile, 6 Dec 99.
  17438.  
  17439. Minor changes to the copyright and permissions notice based on text from
  17440. CU counsel.  COPYING.TXT, 6 Dec 99.
  17441.  
  17442. Tried building on SCO 3.2v4.2 with PTY support -- no go; we get a syntax
  17443. error in a system header file (memory.h).  6 Dec 99.
  17444.  
  17445. Fixed an unguarded reference to zmkdir() in the GET parser and generalized the
  17446. #ifdefs around z_exec() to allow disabling from the cc command line with
  17447. -DNOZEXEC.  ckuus6.c, ckufio.c, 7 Dec 99.
  17448.  
  17449. Added #ifndef OPENBSD..#endif around #include <termcap.h>. ckuusx.c, 7 Dec 99.
  17450.  
  17451. Trimmed trailing blanks, fixed long lines.  All modules, 7 Dec 99.
  17452.  
  17453. ---Beta.10---
  17454.  
  17455. From Jeff: Added missing TLS and NTLM keywords, plus some minor syntax
  17456. adjustments.  ckuus[367].c, 8 Dec 99.
  17457.  
  17458. Removed RD as an invisible synonym for RMDIR, now that we also have an
  17459. RDIR command.  ckuusr.c, 8 Dec 99.
  17460.  
  17461. Restored KTARGET clauses to Ultrix entries with new substitution syntax
  17462. from Peter E.  Makefile, 8 Dec 99.
  17463.  
  17464. Changes to #ifdefs around #include <termcap.h> for Mac OSX.  ckuusx.c,
  17465. 8 Dec 99.
  17466.  
  17467. From Jeff: Added version string for SSL/TLS; created a hook to identify the
  17468. Crypto Dll version number; Fixed a typo "|" should have been "&" that was
  17469. resulting in the server responding to ONE_WAY Kerberos authentication
  17470. incorrectly.  ckuath.c, ck_ssl.c, ck_crp.c, ckuus5.c, 8 Dec 99.
  17471.  
  17472. From Jeff: Many SSL changes and a syntax fix in rset().  ck_ssl.c ckctel.c
  17473. ckcmai.c ckctel.h ckuath.c ckclib.c ck_ssl.h ckuus5.c, 9 Dec 99.
  17474.  
  17475. Looked into the core dumping problem on SCO 505 when sending a file.  It
  17476. happens in the fullscreen display at F-packet time.  The core file is total
  17477. garbage.  The debug log shows we crash in zfnqfp().  In OSR5, zfnqfp() simply
  17478. hands off to realpath(), which, when called, scribbles all over memory and
  17479. dumps core.  Tried adding -DNOREALPATH to CFLAGS and poof, it works.  Fixed in
  17480. ckcdeb.h by defining NOREALPATH if CK_SCOV5 is defined.  9 Dec 99.
  17481.  
  17482. Added solaris26gnc target for use when libtermlib is missing.  makefile,
  17483. 10 Dec 99.
  17484.  
  17485. A fix from Jeff to my change of Nov 8 in which I "...removed the 'pop back to
  17486. command mode after each protocol operation' feature from IKSD by #ifdef'ing
  17487. out the 'justone = 1;' commands in ckcmai.c (search for IKSDPOPBACK)..."  This
  17488. change prevented the init file from being executed and the server idle time
  17489. limit from being set.  Fixed by setting justone = 1 during the authentication /
  17490. login phase.  ckcmai.c, ckcpro.w, 10 Dec 99.
  17491.  
  17492. Changes from Fred Smith for Coherent 4.2.  ckcdeb.h, cku[tf]io.c, ckupty.c,
  17493. ckuusx.c, 10 Dec 99.
  17494.  
  17495. Fixed a mixup with #ifdefs in z_exec() -- #ifndef should have been #ifdef.
  17496. This affects all Beta.11 builds; the "PPP dialer" feature (EXEC /REDIRECT)
  17497. won't work.  Let's see if anybody (besides Peter M) notices...  ckufio.c,
  17498. 10 Dec 99.
  17499.  
  17500. From Jeff: Updated help text for SET AUTH and AUTH commands.  Changed name of
  17501. a command to better match common practice.  Decided not to support Tim
  17502. Hudson's /etc/ssl.users file.  We will only support the much safer ~/.tlslogin
  17503. file for authenticated login with certificates.  ck_ssl.c ckctel.c ckuus2.c
  17504. ckuus3.c, 10 Dec 99.
  17505.  
  17506. Fixed custom banner for SCO ODT 3.0.  ckuver.h, 18 Dec 99.
  17507.  
  17508. A block in zvpass() had a variable p, which causes compiler warnings since
  17509. zvpass also has a parameter p.  Changed the former to p2.  ckufio.c, 18 Dec 99.
  17510.  
  17511. Changes from Jeff:
  17512.  . Increase username/password length for IKSD.
  17513.  . Various authentication changes.
  17514.  . UNIX CONNECT fix vs IKSD disconnect and local-echo buffer.
  17515.  . Some fixes to the weighted running CPS calculation.
  17516.  . New code for K95 IKSD to find its configuration file.
  17517.  . Enable SHOW at IKSD prompt
  17518.  . Enable SSL/TLS is OS/2
  17519. Many files.  18 Dec 99.
  17520.  
  17521. More SSL stuff from Jeff.  ckutio.c, ck_ssl.c, ckuath.c, ckcnet.c, 19 Dec 99.
  17522.  
  17523. Peter E complained that building file lists was a lot slower after the changes
  17524. of 28 Nov - 4 Dec.  That's true, but it's because the optimizations and tricks
  17525. that were used prior to that to achieve speed gave bad results in many cases.
  17526. The whole problem centers around calling isdir() on each file to find out if
  17527. it is a directory; this turns out to be quite expensive.  The traverse() code
  17528. uses all kinds of scary tricks to avoid this, which is what makes it so
  17529. delicate.  It occurred to me that the struct returned by readdir() might
  17530. contain some kind of bit saying whether this was a directory; I can't imagine
  17531. why it wouldn't, but if it does I can't find it.  Anyway, I got a 5-10%
  17532. speedup by making an xisdir() macro and calling it within ckufio.c instead of
  17533. isdir(), to avoid the function call.  Then I simplified the conditions under
  17534. which xisdir() is called and the places from which it is called.  This speeds
  17535. up nonrecursive searches about 100% and recursive ones by about 60%.  But
  17536. always remember: you can't fix anything in traverse() without breaking
  17537. something else.  The simplification breaks the nice feature of putting a "/"
  17538. at the end of directory names in file lists, so I backed off, leaving us
  17539. with the 5-10% improvement.  ckufio.c, 19 Dec 99.
  17540.  
  17541. Comparing ls -l * with Kermit's \ffiles(*) shows that traverse() is about as
  17542. fast and therefore not the bottleneck.  The real bottleneck is the DIRECTORY
  17543. command.  Not because it sorts the results (the sort phase is negligible using
  17544. the current simple shellsort; substituting the way-more-complicated quicksort
  17545. gives no measurable speedup), but because it calls stat() AGAIN on each file to
  17546. get the size, permissions, etc.  The only remedy here would involve the
  17547. classic space-time tradeoff: we could make traverse() save the stat info for
  17548. each file.  But this could be quite big and furthermore would not be used
  17549. except in the DIRECTORY command anyway.  It could be done but I don't think
  17550. it's worth it since slowness is not noticed unless thousands of files are
  17551. involved.  So yes, in UNIX ls -l is faster than Kermit DIRECTORY because ls -l
  17552. only calls stat() once on each file.  No changes.  (Except a quicksort routine
  17553. was added to ckclib.c but #ifdef'd out.)
  17554.  
  17555. Ran traverse() tests, all OK.
  17556.  
  17557. Jeff noticed some spurious file transfer failures with "Error 0" since the
  17558. previous round of traverse() changes.  He caught C-Kermit in the act with a
  17559. 68MB debug.log file.  At the end of the last file in the list Kermit sends the
  17560. Z packet, gets the ACK, calls gnfile(), which calls znext(), which returns 0
  17561. with an empty file name when it reaches the end of the list, as it should.
  17562. But for some reason we go back to ssfile state rather than sseot.  Turns out
  17563. that when the final file returned by znext() is not selected by fileselect(),
  17564. gnfile() returns an empty filename but a positive value.  This bug has been
  17565. there since adding the fileselect() code more than 2 years ago.  Fixed in
  17566. gnfile(): ckcfns.c, 19 Dec 99.
  17567.  
  17568. Added code to ignore PROTOCOL and COMPRESSION messages from modem while
  17569. dialing.  ckudia.c, 19 Dec 99.
  17570.  
  17571. Added support for Diamond Supra Express V.90 modem.  Incredibly, it removed
  17572. the &S0/&S1 command available in earlier Supra models and most other modems.
  17573. Therefore it is unlikely this one could ever be used from VMS.  ckudia.c,
  17574. 19 Dec 99.
  17575.  
  17576. Added uw7ssl target for Unixware 7 with OpenSSL.  makefile, 19 Dec 99.
  17577.  
  17578. Went over new security.txt from Jeff.  19 Dec 99.
  17579.  
  17580. Trimmed trailing blanks from lots of files.  19 Dec 99.
  17581.  
  17582. Some corrections from Jeff to ckcnet.c and ckctel.c, plus more SSL/TLS stuff
  17583. in ckuath.c, ck_ssl.c.  20 Dec 99.
  17584.  
  17585. Changed UNIX sysinit() and syscleanup() to get and restore stdin flags.
  17586. ckutio.c, 20 Dec 99.
  17587.  
  17588. Added &S0 and &S1 to Supra Express init string -- it's not in the manual, but
  17589. it's valid anyway.  ckudia.c, 20 Dec 99.
  17590.  
  17591. Fixed a bug in which C-Kermit, when sending a file in local mode and
  17592. streaming, could hang if the user canceled with X or Z.  The problem was that
  17593. the code in sdata() that bumped the packet number when streaming did not also
  17594. bump winlo to match, and so input() did not recognize the resulting ACK from
  17595. the receiver because it seemed to have the wrong packet number.  ckcfns.c,
  17596. 20 Dec 99.
  17597.  
  17598. If such a transfer was interrupted at just the wrong time, the Z packet might
  17599. not contain the D(iscard) directive.  Fixed in ckcpro.w, 20 Dec 99.
  17600.  
  17601. Added "s" to "timestamp" in "set debug timestamp".  ckuus3.c, 20 Dec 99.
  17602.  
  17603. Converted '-P' command-line option to mean "literal filenames".  ckuusy.c,
  17604. 20 Dec 99.
  17605.  
  17606. Added missing carriage returns to the end of four Compaq modem commands that
  17607. lacked them.  ckudia.c, 21 Dec 99.
  17608.  
  17609. Some Supra Express V.90 init string corrections (incl removing Y0, which is
  17610. in the manual but not in the modem).  ckudia.c, 22 Dec 99.
  17611.  
  17612. From Jeff: Add Telnet environment variables to SHOW TELNET.  ckuus4.c,
  17613. 22 Dec 99.
  17614.  
  17615. Minor fixes for FreeBSD uucp lockfiles from Helge Oldach <hmo@sep.hamburg.com>,
  17616. ckutio.c, 22 Dec 99.
  17617.  
  17618. If Kermit given a -j or -J arg on the command line and ^C was typed during
  17619. the connection phase, Kermit would dump core, probably because the longjmp
  17620. buf isn't set up in the command-line parser.  Fixed by adding
  17621. signal(SIGINT,doexit) to cmdlin().  ckuusy.c, 22 Dec 99.
  17622.  
  17623. Added CHECK PTY.  ckuus3.c, 22 Dec 99.
  17624.  
  17625. Back to our old friend, traverse()...  As noted previously, Peter E reports a
  17626. drastic slowdown since the Nov 28 - Dec 4 workover.  I added code to count
  17627. every stat() call.  In a directory with 54 files, "echo \ffiles(*)" results in
  17628. 62 calls (the 8 extra are more-or-less constant overhead).  This shows that
  17629. traverse() is calling stat() once per file.  However "directory *" in the same
  17630. directory results in 227 stat() calls; 62 by traverse and 165 by the DIRECTORY
  17631. code.  That's way more than twice as many as there needs to be.  For each
  17632. file, DIR calls zgetfs(), ziperm(), and zfcdat(), each of which calls stat()
  17633. on the same file.  But ziperm() and zfcdat() should be able to pick up the
  17634. info from zgetf's stat() call.  The whole trick is to make sure it's the same
  17635. file.  But it's not such a trick -- we just check the diractive flag.  Adding
  17636. this to ziperm() reduces the number of stat() calls from 227 to 176.  Then
  17637. adding it to zfcdat() brings it down to 121, which is just about the minimum.
  17638. In a directory with 2500 files, the DIRECTORY listing starts in 4 seconds,
  17639. compared to 6 before this change, about 33% faster.  ckufio.c, 22 Dec 99.
  17640.  
  17641. But this is a small gain, and anyway does not affect non-DIRECTORY file lists,
  17642. such as file menus on "?", file- and directory-name completion, etc.  The only
  17643. way to speed these up is to not call stat() on every file.  But if traverse()
  17644. does not call stat() on every file, it doesn't know whether it's a directory.
  17645. Why do we care if it's a directory?
  17646.  
  17647.  . If it's a recursive search, we must open each directory and read it.
  17648.  . If it's a directories-only search, we must not match regular files.
  17649.  . If it's a files-only search, we must not match directories.
  17650.  
  17651. It is possible to change traverse() to not call stat() if none of these three
  17652. conditions is true, and this speeds up list generation a lot, for example
  17653. reducing the number of stat() calls in a regular DIR command (with no
  17654. switches) to approximately the number of files.  So in the 54-file directory
  17655. we're down from 227 to 62 stat() calls.  In a 2500-file directory, we're
  17656. seeing results after 2 seconds, rather than 6-8.
  17657.  
  17658. The problem with this trick is that it prevents the names of directory files
  17659. from being tagged with '/' at the end and showing up nicely in a file list.
  17660. Aside from that, we still pass the traverse() torture test.  So it's a
  17661. tradeoff.  And whenever there's a tradeoff, there needs to be a SET COMMAND,
  17662. so I added a new, invisible command SET FILE FASTLOOKUP { ON, OFF }.  It's off
  17663. by default, since most people aren't getting file lists of huge NFS-mounted
  17664. directories.  So today's score: 33% speedup without sacrificing anything;
  17665. 300-400% with SET FILE FASTLOOKUP ON.  ckuus7.c, ckufio.c, 22 Dec 99.
  17666.  
  17667. Noticed that a couple details in the flow control handling in ttvt() were
  17668. different from those in ttpkt(), which might explain the problem that somebody
  17669. reported with switching flow control between OUTPUT statements.  There is,
  17670. no doubt, more to do here...  ttvt(): ckutio.c, 22 Dec 99.
  17671.  
  17672. Changed CHECK PIPE back to CHECK PIPES.  ckuus3.c, 23 Dec 99.
  17673.  
  17674. Rearranged command-line parser SIGINT handler to squelch complaints from picky
  17675. compilers.  ckuusy.c, 23 Dec 99.
  17676.  
  17677. Changes from Jeff for X forwarding.  ckcdeb.h, ckctel.[ch], 24 Dec 99.
  17678.  
  17679. Change from Jeff to command-line parser SIGINT handler to squelch even more
  17680. complaints from picky compilers.  ckuusy.c, 24 Dec 99.
  17681.  
  17682. Changed setprefix() for NONE (called when clearchannel is negotiated on a
  17683. network connection) to always prefix Xon and Xoff, regardless of the flow
  17684. control setting, as well as DEL (127), which seems to be particularly
  17685. troublesome, in addition to what it was prefixing before (CR, IAC, etc).  This
  17686. should allow CLEARCHANNEL to work even with connections to VMS and HP-UX.  Now
  17687. I can send from C-Kermit to gkermit on a Telnet connection with only the
  17688. following prefixed: 1, 13, 17, 19, 127, 255; unprefixing any of these kills
  17689. the transfer (and sometimes the connection too).  ckcmai.c, 24 Dec 99.
  17690.  
  17691. Corrected a truly awful mistake in the command parser.  In any WHILE command,
  17692. the first left brace was treated as the beginning of the command list, so if
  17693. the condition contained a left brace, the parsing was totally bollixed, as in
  17694. "while not equal \m(blah) {\35} { commands... }".  Fixed in doif() and
  17695. gtword(); the latter now sets global cmbptr to be a pointer to the CURRENT
  17696. position in the command buffer (cmdbuf[]).  Any higher-level routine can
  17697. examine it to see what has been parsed so far and what has not.  ckucmd.c,
  17698. ckuus6.c, 24 Dec 99.
  17699.  
  17700. Replaced clunky "does incoming file already have a backup suffix" code in
  17701. znewn() with cleaner (and better-working) code from gkermit.  ckufio.c,
  17702. 24 Dec 99.
  17703.  
  17704. From Jeff:
  17705.  . Make \v(userid) return SET LOGIN USER value if one was given: ckuus4.c.
  17706.  . Expand setting of uidbuf[] in sysinit(): ckutio.c.
  17707.  . Some corrections to HTTP code: ckcnet.c.
  17708. 26 Dec 99.
  17709.  
  17710. From Carl Friend: Updated targets for CLIX.  makefile, 27 Dec 99.
  17711.  
  17712. If '-T' or '-i' is given on C-Kermit command line, then set transfer mode
  17713. manual, don't use binary/text patterns, etc.  Giving these options on the
  17714. command line should be just like SEND /BIN or SEND /TEXT at the prompt.
  17715. ckuusy.c, 27 Dec 99.
  17716.  
  17717. Telnet updates from Jeff: ckctel.[ch], ckcnet.c, 28 Dec 99.
  17718.  
  17719. Removed all mention of "regular expressions" from the docs.  They aren't
  17720. regular expressions.  ckermit2.txt, etc.  28 Dec 99.
  17721.  
  17722. Changed zopeno() and zclose() to handle ZCTERM and ZSTDIO better.  ckufio.c,
  17723. 28 Dec 99.
  17724.  
  17725. Corrections to MYDIAL macro in ckermod.ini suggested by David Sanderson, to
  17726. account for SET FLOW no longer being sticky.  28 Dec 99.
  17727.  
  17728. Show actual value of CK_SYSINI, if defined, in SHOW FEATURES.  ckuus5.c,
  17729. 28 Dec 99.
  17730.  
  17731. Added code to save previous handlers for SIGQUIT, SIGPIPE, SIGUSR1, and
  17732. SIGUSR2, and to restore them before any exec(), execl(), execvp(), etc.
  17733. suggested by David Sanderson, cku[ft]io.c, 28 Dec 99.
  17734.  
  17735. More work on ttvt() to make its handling of flow control parallel that of
  17736. ttpkt().  Plus additional debugging, etc.  In response to persistent reports
  17737. that changing flow control between OUTPUT statements doesn't work.  ckutio.c,
  17738. 28 Dec 99.
  17739.  
  17740. Revisited the problem of referring to files with spaces in their names.
  17741. The obvious way to do this is to put braces around the name, e.g.:
  17742.  
  17743.   send {this file}
  17744.  
  17745. This hasn't worked in years, maybe never.  The problem was simple: setatm()
  17746. was being called with the wrong "break mask" arg in this case (we were telling
  17747. setatm() to break on whitespace, but that's silly because the thing we're
  17748. putting in the atom buffer is already a "word" by definition, since it was
  17749. returned by gtword()).  Fixed in cmifi2(): ckucmd.c, 28 Dec 99.
  17750.  
  17751. Other methods are not so easy, however.  "send this\32file" can't work because
  17752. of our stupid DOS/Windows filenames; "this\32file" could easily be a DOS
  17753. filename (file = "32file", in the "this" subdirectory of the current
  17754. directory).  There is simply no way around this without having separate
  17755. fundamental parsing rules for different platforms.  Yes, we could first try a
  17756. match on this\32file literally, and if it didn't match, then try running it
  17757. thru the backslash interpreter and trying again, but this presumes we know
  17758. what the user intended when they typed "this\32file" and of course we can't.
  17759. Added clarification to ckermit2.bwr.  28 Dec 99.
  17760.  
  17761. Changes from Jeff for X forwarding.  ckcnet.c, ckctel.c, 29 Dec 99.
  17762.  
  17763. Backed off on yesterday's changes to zopeno() and zclose() -- they totally
  17764. broke client/server ops; for example, FINISH would get a "?Can't open file"
  17765. error.  ckufio.c, 29 Dec 99.
  17766.  
  17767. Made opent() succeed even if zopeno() returns 0, meaning "already open";
  17768. after all, that's no reason to fail.  ckcfn3.c, 29 Dec 99.
  17769.  
  17770. Fixed a dangling case in the protocol state table, which might have been
  17771. harmful if the new rcv_shortreply() returned -1, which normally would not
  17772. happen except if the client sends a REMOTE command with the response
  17773. redirected to a file, and writing to the file gets an error.  ckcpro.w,
  17774. 29 Dec 99.  [NOTE: This fix is in error and was undone on 31 Dec 99.]
  17775.  
  17776. WAIT 0 <modem-signals> skipped getting the modem signals because of a boundary
  17777. condition on the loop test.  Fixed in ckuus6.c, 29 Dec 99.
  17778.  
  17779. Switching RTS/CTS on and off still didn't work.  I think now I know why.
  17780. In tthflow(), we have constructions like this: 
  17781.  
  17782.   if ((temp.c_cflag & CRTSCTS) == CRTSCTS) ...
  17783.  
  17784. But it turns out that, at least on Linux, CRTSCTS has a definition like:
  17785.  
  17786.    020000000000
  17787.  
  17788. which is liable to go negative, causing an 'if' condition like the one above
  17789. to fail when it should succeed.  Fixed in tthflow() by testing flags & CRTSCTS
  17790. for 0 or non-0, rather than any particular value.  ckutio.c, 29 Dec 99.
  17791.  
  17792. The iksd log is full of references to a file called "//READ.ME" (two slashes).
  17793. A little investigation shows that when C-Kermit is chroot'd (in SunOS), this
  17794. is how realpath() returns names of files in the chroot'd root directory.
  17795. Added a code snippet to collapse multiple leading /'s to a single one.  Also
  17796. noticed many references to a file called "getwd:_can't_open_.." in the log,
  17797. also only when chroot'd; couldn't reproduce this but I suspect that realpath()
  17798. is storing an error message in the destination buffer.  I changed the code to
  17799. zero the buffer if realpath() fails; let's see if this comes out in the log
  17800. again after today.  zfnqfp(): ckufio.c, 29 Dec 99.
  17801.  
  17802. From Jeff: New ckctel.[ch] ckcnet.c ckcdeb.h more pleasing to DECC.  29 Dec 99.
  17803.  
  17804. Added notes to ckermit2.txt about leading 0's in numeric IP addresses.
  17805. 29 Dec 99.
  17806.  
  17807. From Jeff: more X forwarding.  ckcnet.c ckwart.c ckctel.c ckuus5.c ckuus3.c
  17808. ckcdeb.h ckctel.h ckucns.c ckuusr.h ckuus4.c, 30 Dec 99.
  17809.  
  17810. Removed definition of CK_FORWARD_X for UNIX from ckcdeb.h; we'll save this
  17811. for C-Kermit 7.1.  30 Dec 99.
  17812.  
  17813. Changed copyright dates to 2000.  All modules, 30 Dec 99.
  17814.  
  17815. Inserted the final copyright and permissions notice and disclaimer.  ckcmai.c,
  17816. 30 Dec 99.
  17817.  
  17818. Removed Beta references from NEWS text; updated SUPPORT text.  ckuus6.c,
  17819. 30 Dec 99.
  17820.  
  17821. Checked Lucas's bug (make a connection from CK on DU to IKSD, wait 10 min
  17822. until IKSD times out & closes the connection, re-CONNECT, C-Kermit pops back
  17823. because connection is closed, and now CBREAK mode is lost).  Can't reproduce
  17824. it on DU, SunOS, or anything else.  But for safety's sake, added a new
  17825. invisible command, SET COMMAND CBREAK, to force console into CBREAK mode in
  17826. case it got lost.  ckuus3.c, 30 Dec 99.
  17827.  
  17828. Put the tx_lucidasub() routine in #ifdef OS2..#endif, since this is a fairly
  17829. sizeable chunk of code used only by K95, and optimizers always complain about
  17830. it.  ckcuni.c, 30 Dec 99.
  17831.  
  17832. George Gilmer determined that C-Kermit 7.0 Beta.11 can be built for NCR MP-RAS
  17833. 2.03 and 3.02 by adding -DNOGETUSERSHELL and -DNO_DNS_SRV to the sys5r4sx[tcpc]
  17834. targets, and uploaded the resulting binaries.  Added new build targets and
  17835. designer banner for MP-RAS, to be picked up next time around.  makefile,
  17836. ckuver.h, 30 Dec 99.
  17837.  
  17838. Fixed a bug in UNIX zfnqfp() I introduced yesterday by copying the result
  17839. to the wrong buffer, thus breaking file reception whenever backing up was
  17840. necessary.
  17841.  
  17842. After building on VMS 5.5, found that something had gone wrong with the
  17843. "curses" (SMG) support.  The first call worked, subsequent ones didn't.  For
  17844. example, Ctrl-L works the first time but not the second; the prompt comes out
  17845. in the wrong place after the fullscreen file-transfer display.  The Beta.11
  17846. binary, however, works fine.  Comparison of screen-related code in Beta.11
  17847. ckuusx.c and in today's copy shows no differences at all.  What happened?  To
  17848. make a long story short, I *forced* Ctrl-L to work by always calling initscr()
  17849. before clear() and endwin() afterwards (refresh() too, though it doesn't make
  17850. a difference).  But SCREEN MOVE (move()) now behaves exactly like SCREEN
  17851. CLEAR, and yes, we really are calling the correct SMG$blah routine.  So I
  17852. replaced the current ckuusx.c with the one from Beta.11 and rebuilt -- and we
  17853. still have the same problems.  As a final experiment, I rebuilt from the
  17854. entire Beta.11 source set and guess what: this one has the same problems, even
  17855. though the binary I built from exactly the same sources on exactly the same
  17856. machine 24 days ago has no problems at all.  Y2K jitters?  It's only 30 hours
  17857. away...  Anyway, I changed back to the old, old MYCURSES code, despite the
  17858. cautions in the comments.  It works fine on both a fast Alpha and a sloooow
  17859. VAXstation 3100 and cuts about 5K off the binary.  ckuusx.c, 30 Dec 99.
  17860.  
  17861. Next problem -- C-Kermit is not sending back the full pathname in its ACK when
  17862. receiving a file if a file of the same name did not already exist.  Similarly,
  17863. \fpathname(foo) no longer works if foo doesn't exist, but it did in Beta.11.
  17864. After wasting several hours on this, I rolled back all the zfnqfp() changes
  17865. from the past couple days; the only reason for them was to fix some glitches
  17866. in the idsd log, which who cares.  ckufio.c, 30 Dec 99.
  17867.  
  17868. Next problem -- Unix traverse() really is too slow.  People will hate it.
  17869. Changed default value of FASTLOOKUP (variable stathack) to 1.  ckuus7.c,
  17870. 30 Dec 99.
  17871.  
  17872. Added PROTECTION to HELP SET ATTRIBUTES.  ckuus2.c, 30 Dec 99.
  17873.  
  17874. Made sure that NOPUTENV was defined for not K95 or UNIX.  ckcdeb.h, 30 Dec 99.
  17875.  
  17876. More X forwarding from Jeff.  30 Dec 99.
  17877.  
  17878. Trimmed trailing blanks from source files.  30 Dec 99.
  17879.  
  17880. Made sure the result builds cleanly on VMS (net and nonet) and SunOS.
  17881.  
  17882. Some final X forwarding and IKSD changes from Jeff.  ckctel.c ckcnet.c
  17883. ckctel.h ckutio.c, 31 Dec 99.
  17884.  
  17885. David Sanderson reported that client commands that got short-form replies
  17886. from the server (RCD, FINISH, etc) always failed.  This was caused by the
  17887. "Fixed a dangling case in the protocol state table" item from Dec 29; it
  17888. wasn't dangling at all; fixed by removing the fix.  ckcpro.w, 31 Dec 99.
  17889.  
  17890. At the end of the Beta-test period, our census of binaries stands at:
  17891.  
  17892.  Beta 04 binaries:   9
  17893.  Beta 05 binaries:  20
  17894.  Beta 06 binaries:   6
  17895.  Beta 07 binaries:  25
  17896.  Beta 08 binaries:  19
  17897.  Beta 09 binaries:  21
  17898.  Beta 10 binaries:  70
  17899.  Beta 11 binaries: 179
  17900.  Total:            349
  17901.  
  17902. After 2000 came in Russia (Leningrad) I transferred a 1988 file from here
  17903. to there; the timestamp was correct.  Then I touched it there to get the
  17904. 1 Jan 2000 timestamp and transferred it back to NY, and this had the correct
  17905. timestamp too.  Later, same deal between here and Amsterdam.  No problems.
  17906.  
  17907. The pre-10.00 HP-UX builds were all done on systems that had their dates
  17908. set back to 1971, so at midnight they'll turn over 1972, which has the same
  17909. calendar as 2000 (and 1944).  HINT: touch all source files after unpacking
  17910. the tar archive :-)
  17911.  
  17912. A reference to uidbuf[] needed to be #ifdef NOSPL.  ckuus4.c, 31 Dec 99.
  17913.  
  17914. DECC on DU 3.2 now dumps core on ckuus6.c with -O.  makefile, 31 Dec 99.
  17915.  
  17916. Binaries built 31 Dec 1999 - 1 Jan 2000.
  17917.  
  17918. ---7.0.196 Released 1 Jan 2000---
  17919.  
  17920. Minor fixes applied 2 Jan 2000, after binaries built but before announcements
  17921. and final source-code packaging:
  17922.  
  17923.  1. WAIT n FILE MODIFICATION did not fail if interrupted from keyboard.
  17924.     Interfered with IKSDPY: ckuus6.c.
  17925.  
  17926.  2. Fixed NOICP builds by moving declaration of stathack from
  17927.     ckuus7.c to ckcmai.c.
  17928.  
  17929.  3. Fixed SET FLOW help message when CK_DTRCD and CK_DTRCTS are defined. 
  17930.     ckuus3.c.
  17931.  
  17932.  4. Some authentication-related HELP messages updated, ckuus2.c.
  17933.  
  17934.  5. Minor syntax corrections to telnet.txt, security.txt.
  17935.  
  17936.  6. Minor corrections to introductory comments in several modules.
  17937.  
  17938.  7. Server's response to GET xxx where xxx doesn't exist was changed from
  17939.     "No filespec given" to "File not found".  ckcfns.c.
  17940.  
  17941.  8. New makefile targets for NetBSD define DTR/CD and DTR/CTS flow control
  17942.  
  17943.  9. Replaced "??-" in comments with "xx-" to shut the compilers up about
  17944.     trigraphs.
  17945.  
  17946. 10. Replaced a missing comment terminator in ckcpro.w.  This one could
  17947.     cause the following problem: when sending a file and failing to close
  17948.     it, the discard directive would not be sent.  But it's hard to imagine
  17949.     a circumstance in which we would fail to close a file we just opened
  17950.     and read from successfully.
  17951.  
  17952. 11. Enclosed an unguarded reference to the sj struct in #ifdef KANJI.
  17953.     ckcfns.c.
  17954.  
  17955. SHOW VERSIONS of binaries built before these changes give a ckuusr date of
  17956. 1 Dec 1999; binaries with these fixes show 1 Jan 2000 for ckuusr.
  17957.  
  17958. ---7.0.196 Announced 3 Jan 2000---
  17959.  
  17960. Added sinix541 makefile target for SINIX-L (i386) 5.41, plus designer banner,
  17961. and added a couple #ifdefs to allow it to compile (it doesn't like fdopen()).
  17962. makefile, ckuver.h, ckufio.c, 6 Jan 2000.
  17963.  
  17964. Removed -O2 and added -DNODEBUG -DNOIKSD to the ultrix42c makefile entry;
  17965. although it compiled OK, it got bizarre relocation errors at link time and
  17966. this was the only (ok, first) way I could find to make them go away.
  17967. makefile, 6 Jan 2000.
  17968.  
  17969. Updated the ps2aix target for AIX 1.2.1 on the PS/2, and added a new
  17970. ps2aixnetc target in the makefile.  Had to put #ifndef PS2AIX10 around
  17971. #include <netdb.h> in ckcnet.c, and add a prototype for ttyname() to ckutio.c.
  17972. There's a warning about tlog() that's unavoidable (termio.h defines a tlog
  17973. macro and we redefine it).  OK, it's not really unavoidable...  6 Jan 2000.
  17974.  
  17975. Added a couple new paragraphs to the ckermit2.txt section about coping with
  17976. faulty Kermit implementations.  6 Jan 2000.
  17977.  
  17978. Changes for CLIX from Carl Friend.  ckutio.c, ckcnet.c, makefile, 16 Jan 2000.
  17979.  
  17980. Changes from Joe Smith for SunOS 4.1 with X.25.  ckutio.c, makefile,
  17981. 16 Jan 2000.
  17982.  
  17983. Changes from David Lane for Stratus VOS: ckcdeb.h, ckcker.h, cklfio.c,
  17984. 16 Jan 2000.
  17985.  
  17986. A couple new variations on the 3B2/3B20 makefile targets from Peter
  17987. Mauzey.  makefile, 17 Jan 2000.
  17988.  
  17989. Text and binary filename patterns for VOS, and changes to VOS network module
  17990. to allow building for X.25 but not TCP/IP, from David Lane.  ckcmai.c,
  17991. cklnet.c, 17 Jan 2000.
  17992.  
  17993. Some changes to make C-Kermit compile on OSF/1 1.3.  First there is some kind
  17994. of foulup in the header files that turns off ANSI prototyping when C-Kermit
  17995. thinks it should be doing it, so this had to be undone in ckucmd.c, ckcnet.c,
  17996. ckucns.c, ckufio.c, and ckutio.c.  Then in ckuusr2.c there was a string
  17997. constant that contained something like "/usr/share/kermit/*.*", which the
  17998. compiler took to be a comment begin and so lost an #ifdef.  This needed
  17999. "rewording".  Changed the dec-osf target to skip optimization and force
  18000. static linking.  18 Jan 2000.
  18001.  
  18002. Building C-Kermit 7.0 for OS-9/68000 on Steve Rance's Solaris 7 system in
  18003. Australia using the xcc (Ultra C 2.0) cross-compiler (reportedly, Microware no
  18004. longer supports development directly on OS-9, but requires cross-builds).
  18005. This needed a new makefile, ck9xcc.mak.  Notes (19-21 Jan 2000):
  18006.  
  18007.  . We can build wart but can't run it, so must touch ckcpro.c.
  18008.    Later I just took everything to do with wart out of the makefile.
  18009.    Later Steve changed the makefile to build wart for Sun and run it.
  18010.  . All ckc*.c and ckuus*.c build, and so do ck9con and ck9tio.
  18011.  . ck9fio.c blows up because of some inline assembly code.
  18012.    This was handled by changing #asm..#endasm to _asm("...");
  18013.    But we need to do this with #ifdefs to allow old way too?
  18014.  . ck9asm.a just builds, amazing.
  18015.  . ck9ren.c had to be removed from the makefile (not needed for this build).
  18016.  . References to {me,u}_binary in ck9con.c had to be updated to new macros.
  18017.  . Had to add NO_DNS_SRV.
  18018.  . Had to change <inet/...> to <INET/...> in ckcnet.h.
  18019.    But this was only for the cross compiler so I defined a new
  18020.    symbol OSKXXC for this.
  18021.  . Link step, libs, etc, needed changing/updating (termlib added).
  18022.  
  18023. Steve Rance made various other edits, mostly changing the names of error
  18024. symbols from E_blah to EOS_blah (should this be conditionalized? -- will
  18025. it break "native" OS-9 builds?)
  18026.  
  18027. Finally it built OK and runs on OS-9/68000 3.0.3.  It can make a Telnet
  18028. connection, transfer files, produce the fullscreen file-transfer display,
  18029. produce file lists and do filename completion, etc; pretty much fully
  18030. functional.  I did find one glitch: any reference to the \v(ipaddress)
  18031. variable causes a crash, but only before any TCP connections have been made.
  18032. I "fixed" this by #ifndef OSK'ing the code in nvlook() that calls
  18033. getlocalipaddr().  ckuus4.c, 22 Jan 2000.
  18034.  
  18035. To remove voluminous warnings (when -cw added CFLAGS), added CK_STDLIBS to
  18036. OS-9 CFLAGS, but then had to put #include <unistd.h> within #ifndef
  18037. OSK..#endif.  Now it compiles cleanly except for the usual torrent of
  18038. "variable declared (or set) but never used" warnings (because of all the
  18039. #ifdefs), plus warnings about implicit declaration of a few functions,
  18040. including alarm(), isatty(), getpid(), ustrncmp(), _ev_unlink(), and
  18041. _ev_delete(); not sure what to #include to fix these but they should be
  18042. harmless anyway.  ckcdeb.h, 22 Jan 2000.
  18043.  
  18044. Fixed a bunch of nontrivial warnings in ck9tio.c -- nested comments, use of
  18045. uninitialized variables, and int conxxx() routines that did not return a
  18046. value.  22 Jan 2000.
  18047.  
  18048. The only serious remaining problem that I know about is: even though the
  18049. TELNET command works just fine, SET HOST dies immediately with a stack
  18050. overflow.  Tried rebuilding ckuus7.c (the module containing the SET HOST
  18051. code) without optimization but it made no difference.  Will have to wait for
  18052. OS-9 guys to fix this one; some magic incantation to increase the stack
  18053. size?  In the meantime we have a binary that's usable for most things (but
  18054. unfortunately SET HOST is needed for scripting).
  18055.  
  18056. Installed TCPware 5.4 on my Alpha and tried to build C-Kermit 7.0.  Total
  18057. disaster, horrible syntax errors in SYS$COMMON:[SYSLIB]DECC$RTLDEF.TLB;1 (not
  18058. in Kermit code).  Turned it over to Hunter Goatley.  21 Jan 2000.
  18059.  
  18060. Steve Rance fixed the OS-9 problem by increasing the stack size.  I cleaned
  18061. up the source files to #ifdef all the recent changes that depend on Ultra C.
  18062. ck9xcc.mak, ck9[tf]io.c, ck9con.c, 23 Jan 2000.
  18063.  
  18064. Worked on BeOS 4.5.  Got G-Kermit working in about 30 seconds.  C-Kermit is
  18065. harder because (a) no select(); (b) no curses; (c) no standard TCP/IP headers;
  18066. and (d) no /dev/tty.  The last was handled in a new way.  Instead of using
  18067. a hardwired string like "/dev/tty" for the controlling terminal as we have
  18068. always done, I made dftty = NULL for BEOS and #define'd CTTNAM to be dftty.
  18069. Then in sysinit I get the actual device name (like /dev/tt/p1) and make
  18070. dftty point to it.  Works like a charm.  But I have no idea if we can dial
  18071. out or anything...  But I do have a C-Kermit 7.0 binary that transfers files
  18072. in remote mode -- and FAST too!  ckcdeb.h, ckutio.c, ckuver.h, makefile,
  18073. 24 Jan 2000. 
  18074.  
  18075. Added SCO 3.2v5.0.2 makefile targets.  26 Jan 2000.
  18076.  
  18077. Tried to build on 4.3BSD/VAX.  Had to fix the KTARGET clause to avoid immediate
  18078. failure with "sh: bad substitution".  Fails miserably with "too many defines"
  18079. in ckuusr.h.  "make bsdm" gets a bit farther, but not much.  makefile,
  18080. 4 Feb 2000.
  18081.  
  18082. Tried building 6.0 on on 4.3BSD/VAX; the 6.0 ckuusr.h is not too big.  It
  18083. built OK.  4 Feb 2000.
  18084.  
  18085. Corrected KTARGET clauses in RT PC entries too.  makefile, 4 Feb 2000.
  18086.  
  18087. Back to 4.3BSD...  Some old preprocessors just don't expect so many #defines.
  18088. Yet there are huge blocks of #defines in ckuusr.h that are not protected by
  18089. #ifdefs, e.g. #ifndef NODIAL for all the DIAL-related definitions.  Added
  18090. these in and tried building "bsdm".  Then after working out some prototype
  18091. conflicts (ttyname, hostent, servent, etc) and defining the needed -DNOblah's
  18092. (realpath(), putenv(), ...) in the makefile target, the command-line-only
  18093. version built OK.  But the minimum interactive version (-DNOSPL) still won't
  18094. build -- too many defines.   makefile, ckuusr.h, ckutio.c, 5 Feb 2000.
  18095.  
  18096. Migrated a few of the 4.3BSD changes into the RT PC AOS/ACIS/BSD targets.
  18097. makefile, 5 Feb 2000.
  18098.  
  18099. Added Stratus FTX targets to the makefile.  6 Feb 2000.
  18100.  
  18101. Built on an SCO Xenix 2.3.4 TCP/IP development system assembled by Jeff
  18102. Liebermann.  This required addition of -DNO_DNS_SRV and removal of -lmalloc
  18103. from the sco234netc target.  makefile, 8 Feb 2000.
  18104.  
  18105. To build C-Kermit 7.0 on BSD4.3, I tried the following trick:
  18106.  
  18107.  . Tar the BSD4.3 /usr/include tree and ftp it back here.
  18108.  . Make a bsd43 directory with an include subdirectory.
  18109.  . Untar the BSD include tree into the bsd43/include subdirectory.
  18110.  . Copy the C-Kermit 7.0 sources into the bsd43 directory.
  18111.  . Run the following shell script on them:
  18112.  
  18113.    for i in *.c; do
  18114.        echo $i...
  18115.        cc -E -DCK_CURSES -DTCPSOCKET -DBSD4 -DNOREALPATH -DNOTIMEH \
  18116.    -DSYSTIMEBH -DNOIKSD -DNOPUTENV \
  18117.    -I./include $i > $i.e
  18118.        rm -f $i
  18119.        grep -v "^#" $i.e > $i    
  18120.    done
  18121.  
  18122.  . FTP the results back to the BSD system.
  18123.  . Give the regular "make bsd43c" command.
  18124.  
  18125. It almost worked except SunOS cpp seems to have a 1K buffer limit for macro
  18126. expansions, and certain macro expansions from stdio.h need more than 1K.
  18127. So I redid it with gcc instead of cc.  A quick check seems to indicate no
  18128. macro expansions were truncated.  Sent the results back to BSD.  Still no
  18129. good.  In ckucmd.c, routine cmdecho(), was a line:
  18130.  
  18131.   putchar(BS); putchar(SP); putchar(BS); 
  18132.  
  18133. The expansion of putchar() is quite long, and three of them in a row resulted
  18134. in a line that was truncated by cpp -- even in gcc!  The solution was to put
  18135. them on separate lines (so the problem is cpp's output-line buffer).  Then the
  18136. bit in traverse() that checked the inode needed a BSD42 #ifdef.  The whole
  18137. thing compiled and linked OK, and works fine: Telnet, curses, and all.  Since
  18138. the preprocessor ran on a Sun, I also had to change the \v(cpu) and SHOW
  18139. FEATURES processor constants from "sparc" to "vax" by hand.  ckuus[45].c,
  18140. makefile, ckufio.c, 8 Feb 2000.
  18141.  
  18142. For the record, here's the final 4.2BSD script that uses gcc (the changes are
  18143. just to disable ANSI prototyping, void, etc).  The non-gcc one might still
  18144. work, however, now that the putchar() line is unfolded:
  18145.  
  18146.   cp <sourcepath>/ck[cu]*.[ch] .
  18147.   rm -f ckustr.c cku2tm.c ckcmdb.c
  18148.  
  18149.   for i in *.c; do
  18150.       echo $i...
  18151.       gcc -E -DCK_CURSES -DTCPSOCKET -DBSD4 -DNOREALPATH -DNOTIMEH \
  18152.    -DSYSTIMEBH -DNOIKSD -DNOPUTENV -DNOANSI -DBIGBUFOK -traditional \
  18153.    -I./include $i > $i.e
  18154.       rm -f $i
  18155.       grep -v "^#" $i.e > $i    
  18156.   done
  18157.  
  18158. Ditto for 4.2BSD.  Note that 4.2 and 4.3BSD on VAX are binary compatible.  The
  18159. only difference to Kermit is whether the acucntrl() program is called to grab
  18160. a dialout line.  8 Feb 2000.
  18161.  
  18162. In response to a sudden rash of complaints about failure to build on AIX 4.3.0
  18163. because of:
  18164.  
  18165.   ld: 0711-781 ERROR: TOC overflow. TOC size: 70908 Maximum size: 65536
  18166.  
  18167. Did some digging and discovered the "-bbigtoc" ld option for AIX.  But it's
  18168. strange that this was necessary, since the same code was built successfully on
  18169. AIX 4.1.3, 4.1.5, 4.2.1, 4.3.1, 4.3.2, and 4.3.3 without these changes.  Also
  18170. upped -qmaxmem to 16000 since the previous value of 8000 gave failure-to-
  18171. optimize warnings (so did 12000).  makefile, 8 Feb 2000.
  18172.  
  18173. Still on AIX... Here's a good one.  Look at the following code from ckcpro.w:
  18174.  
  18175.     } else if (x == -1) {        /* EOF - finished sending data */
  18176.     debug(F101,"<ssdata>Y cxseen","",cxseen);
  18177.     window(1);            /* Set window size back to 1... */
  18178.     if (clsif() < 0)        /* Close input file */
  18179.       cxseen = 1;            /* Send EOF packet*/
  18180.     debug(F101,"<ssdata>Y CALLING SEOF()","",cxseen);
  18181.     seof(cxseen||czseen);
  18182.     BEGIN sseof;            /* and enter send-eof state */
  18183.     }
  18184.  
  18185. In AIX, this produced the warning: "'/*' detected in comment".  When I
  18186. inserted a space in "packet*/" the warning went away.  This would suggest that
  18187. the last three statements in the block were not being included in AIX builds.
  18188. But if that were true, sending files wouldn't work.  But sending files does
  18189. work.  ckcpro.w, 8 Feb 2000.
  18190.  
  18191. Added -DHUP_POSIX to unixware20 target to fix nonfunctional HANGUP command
  18192. (fix verified by Clarence Dold).  makefile, 8 Feb 2000.
  18193.  
  18194. Added tru64-40f target since we already have a tru64-40e and tru64-40g.
  18195. makefile, 8 Feb 2000.
  18196.  
  18197. Changed help text to not refer to a specific edition of the C-Kermit book.
  18198. ckuus2.c, 8 Feb 2000.
  18199.  
  18200. Changed version number to 7.0.197.  makefile, ckcmai.c, 8 Feb 2000.
  18201.  
  18202. --- 7.0.197 ---
  18203.  
  18204. ******************
  18205. (Build list moved from here to ckx196.txt, 18 Oct 1999).
  18206.  
  18207. ------
  18208. (End)
  18209.