home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / pub / test / text / ckc212.txt < prev    next >
Text File  |  2020-01-01  |  165KB  |  3,265 lines

  1. C-KERMIT CHANGE LOG (Changes since 8.0.207 / K95 2.1.3 January 2003)
  2.  
  3.   Chronological order.
  4.   Go to the bottom to find the newest edits.
  5.  
  6.   F. da Cruz, The Kermit Project, Columbia University, NYC.
  7.  
  8. FTP USER, FTP ACCOUNT, plus the various prompts and switches for FTP username,
  9. password, and account all neglected to strip quotes, and in most cases quotes
  10. are necessary to specify a username that contains spaces.  ckcftp.c,
  11. 15 Jan 2003.
  12.  
  13. FTP MPUT f1 f2 f3... gets a parse error if any of the fn's do not match an
  14. existing file.  This is bad for scripts.  In doftpput(), cmfdb() looks for
  15. keywords (switches) or CMIFI.  When it hits CMIFI, it exits from the initial
  16. parse loop and then does additional cmifi()s in a loop until done.  The most
  17. obvious fix is to parse each field with cmfdb(CMIFI,CMFLD), i.e. fall back to
  18. CMFLD if CMIFI doesn't match anything.  Then if CMFLD was used, we don't add
  19. the filespec to the list.  This is a rather big change but it seems to work.
  20. No error messages or failures happen for non-matching fields, but an error
  21. message is printed (and the MPUT command fails) if none of the fields match
  22. any files.  This fix got in too late for 2.1.3; workaround: use C-Shell
  23. like wildcard list (ftp mput "{*.abc,foo.*}").  ckcftp.c, 16 Jan 2003.
  24.  
  25. GREP did not pass its pattern through the expander, thus variables could
  26. not be used for patterns.  This must have been an oversight -- I can't find
  27. anything in my notes about it.  Fixed in dogrep(): ckuus6.c, 24 Jan 2003.
  28.  
  29. New makefile target for HP-UX 11.xx with OpenSSL from Tapani Tarvainen.
  30. makefile, 31 Jan 2003.
  31.  
  32. From Jeff:
  33.  . Avoid core dump when dereferencing tnc_get_signature(): ckuus4.c.
  34.  . Bump version numbers to 8.0.208, 2.1.4: ckcmai.c.
  35.  
  36. Added /NOLOGIN to FTP [OPEN].  ckcftp.c, 10 Feb 2003.
  37.  
  38. Don't dump core if FTP DEBUG is ON and FTP OPEN does not include a service.
  39. openftp(): ckcftp.c, 10 Feb 2003.
  40.  
  41. HELP PATTERN text incorrectly identified commands and functions with
  42. floating and anchored patterns.  The corrected lists are:
  43. Floating: GREP, TYPE /MATCH:, /EXCEPT: patterns, \farraylook(),
  44. Anchored: IF MATCH, file-matching wildcards, \fsearch(), \frsearch()
  45. ckuus2.c, 10 Feb 2003.     
  46.  
  47. INPUT n \fpattern(xxx) did not work for case-independent comparisons.
  48. Fixed in doinput(): ckuus4.c, 10 Feb 2003.
  49.  
  50. It seems \fpattern() didn't work with MINPUT at all.  There was no code to
  51. handle \fpattern() in the MINPUT parse loop, so it never worked.  The code
  52. had to be totally rewritten to use cmfld() in a loop, rather than cmtxt()
  53. and then cksplit().  Furthermore, whenever any of the fields was an
  54. \fjoin(), this had to be split.  ckuusr.c, 10 Feb 2003.
  55.  
  56. Macro replacement via \m() and \fdefinition() does not work as advertised
  57. (i.e. case sensitively) for associative array elements; e.g. \m(xxx<abc>) is
  58. treated the same as \m(xxx<ABC>), contrary to section 7.10.10 of the C-Kermit
  59. 7.0 update notes, and to the fact that the two really do exist separately.
  60. Fixed by adding a static function isaarray(s) which succeeds if s is an
  61. associative array reference and fails otherwise, and then having \m()
  62. and \fdef() call mxxlook() (case-sensitive lookup) if isaarray(), otherwise
  63. (as before) mxlook()).  ckuus4.c, 11 Feb 2003.
  64.  
  65. Fixed FTP OPEN to allow the /USER switch to override SET FTP AUTOLOGIN OFF,
  66. just as /NOLOGIN overrides SET FTP AUTOLOGIN ON.  ckcftp.c, 11 Feb 2003.
  67.  
  68. In K95, "set key \1234 \27H" (any SET KEY command in which the first char of
  69. the definition was backslash, and the ONLY character after the backslash
  70. quantity was an uppercase letter, that letter would be lowercased).  Diagnosis:
  71. xlookup() poking its argument (see notes from July 2000).  Jeff sent a fix.
  72. ckucmd.c, 15 Feb 2003.
  73.  
  74. Ran my S-Expression torture test to make sure Sexps still worked.  They do,
  75. except the bitwise & and | operators were broken, e.g. (& 7 2) and (| 1 2 4)
  76. get "Invalid operand" errors.  Jeff's code had added an early failure return
  77. from the lookup loop when when a single-byte keyword matched a keyword that
  78. started with the same byte but was more than one byte long.  So "&" would hit
  79. "&&" and fail instead of continuing its search (xlookup tables aren't sorted
  80. so there can be no early return).  Fixed in xlookup(): ckucmd.c, 16 Feb 2003.
  81.  
  82. Got rid of "krbmit" target from makefile.  It's still there, but we don't
  83. use it any more.  All secure targets now use "xermit", and produce a binary
  84. called wermit, just like the regular ones do (except the old ckucon.c ones).
  85. Non-secure targets, since they don't define any of the security symbols,
  86. wind up compiling and linking to (mostly) empty security modules.  makefile,
  87. 15 Feb 2003.
  88.  
  89. Added \fcvtdate(xxx,3) to format its result in MDTM format (yyyymmddhhmmss,
  90. all numeric, no spaces or punctuation).  Of course these numeric strings
  91. are too big to be 32-bit numbers and are useless for arithmetic, but they're
  92. useful for lexical comparison, etc.  ckuus[24].c, 16 Feb 2003.
  93.  
  94. The following FTP commands did not set FAILURE when they failed: RMDIR,
  95. CD, CDUP, Fixed in the corresponding doftpblah() routines.  ckcftp.c,
  96. 16 Feb 2003.
  97.  
  98. RENAME would sometimes not print an error message when it failed, e.g. in K95
  99. when the destination file already existed.  ckuus6.c, 17 Feb 2003.
  100.  
  101. Fixed COPY error messages, which did not come out in standard format when
  102. /LIST was not included.  ckuus6.c, 17 Feb 2003.
  103.  
  104. Fixed #ifdefs in ck_crp.c to allow nonsecure builds on old platforms like
  105. System V/68 R3.  19 Feb 2003.
  106.  
  107. Similar treatment for ck_ssl.c.  20 Feb 2003.
  108.  
  109. From Jeff, 21 Feb 2003:
  110.  . AIX53 and AIX52 symbols for ckcdeb.h, makefile.
  111.  . New gcc targets for various AIX 4.x/5.x versions: makefile.
  112.  . Copyright date updates: ck_crp.c, ck_ssl.c.
  113.  . ENABLE/DISABLE QUERY broken because keyword table out of order: ckuusr.c.
  114.  . Fixed the use of HTTP proxies for HTTP [RE]OPEN for Unix: ckcnet.c.
  115.  
  116. Also for K95 only: Allow file transfer when K95 is invoked on the remote end
  117. of a connection to a Pragma Systems Terminal Server connection; automatically
  118. SET EXIT HANGUP OFF when invoked with open port handle ("k95 -l nnnn").
  119.  
  120. "cd a*" failed even when "a*" matched only one directory.  Fixed in cmifi():
  121. ckucmd.c, 21 Feb 2003.
  122.  
  123. In the Unix version, replace "extern int errno;" with "#include <errno.h>"
  124. if __GLIBC__ is defined, since glibc now defines a thread-specific errno.
  125. ckcdeb.h, 26 Feb 2003.
  126.  
  127. Added #ifdefs to skip compilation of ckuath.c in nonsecure builds.  Tested
  128. by building both secure and regular versions in Linux.  ckuath.c, 26 Feb 2003.
  129.  
  130. Ran the build-in-84-different-configurations script on Linux to make sure it
  131. still builds with all different combinations of feature selection options.
  132. All OK.  26 Feb 2003.
  133.  
  134. Built on VMS.  Needed to add a prototype for mxxlook*() to ckuusr.h; built
  135. OK otherwise.  26 Feb 2003.
  136.  
  137. From Jeff: More #ifdef shuffling for nonsecure builds: ckuath.c, ck_ssl.c,
  138. 27 Feb 2003.
  139.  
  140. Added code to ensure \v(download) ends in a directory separator in Unix,
  141. Windows, and OS/2.  ckuus7.c, 27 Feb 2003.
  142.  
  143. Added code to K95 zfnqfp() to tack on directory separator when returning
  144. a directory name.  ckofio.c, 27 Feb 2003.
  145.  
  146. Somehow an old copy of ckuath.c popped to replace the new one.  Put the new
  147. one back.  28 Feb 2003.
  148.  
  149. From Jeff: Fix typo in my K95 zfnqfp() code from yesterday; fixes for handling
  150. UNCs uniformly, no matter which way their slashes are leaning.  ckofio.c,
  151. 28 Feb 2003.
  152.  
  153. At Jeff Mezei's suggestion, separate text and binary mode open sequences
  154. for VMS session log.  ckvfio.c, 28 Feb 2003.
  155.  
  156. Added freebsd48 target for FreeBSD 4.8.  makefile, 1 Mar 2003.
  157.  
  158. Changed Mac OS X entries to include -DUSE_STRERROR.  makefile, 2 Mar 2003.
  159.  
  160. Fixed GETOK /GUI to evaluate its text argument.  ckuus6.c, 3 Mar 2003.
  161.  
  162. Jeff fixed the K95 Dialer QUICK dialog to (a) allow templates, and (b) have
  163. a Save-As option.  3 Mar 2003.
  164.  
  165. Jeff fixed a problem with the Xmodem-CRC checksum being crunched whenever
  166. there was a retransmission.  7 Mar 2003.
  167.  
  168. Added target/banner for Tru64 5.1B.  makefile, ckuver.h, 5 Mar 2003.
  169.  
  170. In Unix, the zcopy() routine (used by the COPY command) reset the user's umask
  171. to 0 for the remainder of the Kermit process lifetime.  The bug was in
  172. ckufio.c 8.0.194, 24 Oct 2002, and is fixed in ckufio.c 8.0.195, 6 Mar 2003.
  173. Of course this happened after building 155 C-Kermit 8.0.208 binaries.  (But
  174. before officially releasing 8.0.208.)
  175.  
  176. In the VMS version, changed:
  177.  
  178.         while ((n--) && xx_inc(2) > -1) ;
  179. to:
  180.         while ((n--) && xx_inc(2) >= 0) ;
  181.  
  182. to suppress the "...is being compared with a relational operator to a constant
  183. whose value is not greater than zero" warning.  ckvtio.c, 7 Mar 2002.
  184.  
  185. Added a debug call to dologend in hopes of catching overzealous Locus
  186. switching, which seems to happen only in K95.  ckuus3.c, 7 Mar 2002.
  187.  
  188. Rebuilt binaries for some of the more current Unix releases: AIX 4.3.3-5.1,
  189. Solaris 7-9 , Red Hat 7.0-8.0, Slackware 8.1, Freebsd 4.7-4.8, NetBSD 1.6,
  190. OpenBSD 3.2, Unixware 7.1.3, Open Unix 8, OSR5.0.6a, etc.  A Unix binary with
  191. COPY umask fix shows a 6 Mar 2003 date for "UNIX File support" in SHOW
  192. VERSIONS; a binary without the fix shows 24 Oct 2002.
  193.  
  194. C-Kermit 8.0.208 dated 14 March 2003 released on 10 March 2003.
  195.  
  196. ---8.0.208---
  197.  
  198. From Jeff 13 Mar 2003:
  199.  . Updated SSL module allows importation of tickets from host.
  200.  . freebsd50+openssl target: makefile.
  201.  . FTP PUT /PERMISSIONS error message for K95: ckcftp.c.
  202.  
  203. Fixed MINPUT to strip quotes or braces from around targets (this was broken
  204. on Feb 10th).  Thanks to Jason Heskett for discovering and reporting this
  205. (killer) bug.  ckuusr.c, 14 Mar 2003.
  206.  
  207. Changed version number to 209 Dev.00.  ckcmai.c, 14 Mar 2003.
  208.  
  209. While debugging the alphapage script, I found that the command "minput 8 \6\13
  210. \21\13 \13\27\4\13 \30\13" gets "?Not confirmed" in 8.0.208 and 8.0.209, but
  211. not in 206 and earlier.  This problem too was introduced on Feb 10th by
  212. changing MINPUT parsing from cmtxt() followed by cksplit() to cmfld() in a
  213. loop.  cmfld() uses setatm() to return its result and of course setatm()
  214. breaks on \13.  Changing setatm() not to do this would break everything else.
  215. But cmfld() has no arguments that let us tell it to do anything different in
  216. this case.  Changing the API would be a disaster.  The only solution is to add
  217. an "MINPUT ACTIVE" (minputactive) global variable that tells cmfld() to tell
  218. setatm() not to break on CR.  Now MINPUT with braced targets containing CR
  219. and/or LF works in 209, 206, and 201 (but not 208).  ckucmd.c, ckuusr.c,
  220. ckuus5.c, 15 Mar 2003.
  221.  
  222. MINPUT n \fjoin(&a) works OK if all the members of \&a[] are text strings, but
  223. if they are strings of control chars (as above), they don't get separated by
  224. the spaces.  For example in:
  225.  
  226.   dcl \&a[] = "\4\5" "\6\7" xxx
  227.   minput 10 \fjoin(&a)
  228.  
  229. MINPUT gets two targets: "aaa" and "\4\5 \6\7 xxx".  The bug was in the
  230. cksplit() call in the \fjoin() case of MINPUT: it needed to specify an
  231. include set consisting of all the control characters except NUL.  ckuusr.c,
  232. 16 Mar 2003.
  233.  
  234. But there's still a problem:
  235.  
  236.   dcl \&a[] = "\4\5\13\10" "\6\7" "xxx"
  237.  
  238. creates an array whose first member is "^D^E (one doublequote included).  But
  239. if braces are used instead, there's no problem.  Same deal as MINPUT: cmfld()
  240. breaks on CR or LF, thus the end quote is lost.  If I set minputactive for
  241. DECLARE initializers too, that fixes it.  Is there any reason not to do this?
  242. Can't think of any (famous last words)...  ckuusr.c, 16 Mar 2003.
  243.  
  244. Since it has multiple applications, changed the flag's name from minputactive
  245. to keepallchars.  ckucmd.c, ckuus[r5].c, 16 Mar 2003.
  246.  
  247. \v(exedir) wasn't being set correctly (it included the program name as well
  248. as the directory).  Fixed in getexedir(): ckuus4.c, 16 Mar 2003.
  249.  
  250. SET CARRIER-WATCH <Esc> "auto matic" (spurious space in supplied keyword).
  251. Cosmetic only; it still worked.  Fixed in setdcd(): ckuus3.c, 16 Mar 2003.
  252.  
  253. "directory a b c" listed too many files -- all files whose names END WITH a,
  254. b, or c, rather than the files whose names WERE a, b, or c.  Diagnosis: The
  255. filespec is changed into a pattern: {a,b,c}, which is the correct form.  It is
  256. passed to nzxpand(), which goes through the directory getting filenames and
  257. sending each one to ckmatch() with the given pattern.  ckmatch() receives the
  258. correct pattern but then prepends a "*" -- that's not right.  It's not just
  259. in filename matching either.  The following succeeds when it shouldn't:
  260.  
  261.   if match xxxxc {{a,b,c}} <command>
  262.  
  263. Changing ckmatch() to not prepend the "*" to each segment fixes the command
  264. above but breaks lots of others.  Running through the "match" torture-test
  265. script shows the problem occurs only when the {a,b,c} list is the entire
  266. pattern, and not embedded within a larger pattern.  Testing for this case
  267. fixed the problem.  ckmatch(): ckclib.c, 16 Mar 2003.
  268.  
  269. Fixed FTP MODTIME to not print anything if QUIET ON.  ckcftp.c, 16 Mar 2003.
  270.  
  271. Picked up a new ckuath.c from Jeff, not sure what the changes are. 16 Mar 2003.
  272.  
  273. Did a few regular and secure builds to make sure I didn't wreck anything.
  274.  
  275. Changed version number to 209 (final).  ckcmai.c, 16 Mar 2003.
  276.  
  277. Jason Heskett found another bug: if you define a macro FOO inside the
  278. definition of another macro BAR, and FOO's definition includes an odd number
  279. of doublequotes (such as 1), FOO's definition absorbs the rest of BAR's
  280. definition.  Example:
  281.  
  282.   def TEST {
  283.     .foo = {X"}
  284.     sho mac foo
  285.   }
  286.   do test
  287.   sho mac foo
  288.  
  289. Results in:
  290.  
  291.   foo = {X"}, sho mac foo
  292.  
  293. Diagnosis: the TEST definition becomes:
  294.  
  295.   def TEST .foo = {X"}, sho mac foo
  296.  
  297. and the macro reader is erroneously treating the doublequote as an open
  298. quote, and then automatically closes the quote at the end of the definition.
  299. The error is that a doublequote should be significant only at the beginning of
  300. a field.  But the macro reader isn't a command parser; it doesn't know what
  301. a field is -- it's just looking for commas and skipping over quoted ones.
  302. First we have to fix an oversight: SET COMMAND DOUBLEQUOTING OFF should have
  303. worked here, but it wasn't tested in this case.  Fixed in getncm(): ckuus5.c,
  304. 17 Mar 2003.
  305.  
  306. There are only certain cases where it makes sense to treat doublequotes as
  307. signicant:
  308.  
  309.  . An open quote must be at the beginning or preceded by a space.
  310.  . A close quote is only at the end or else followed by a space.
  311.  
  312. This too was fixed in getncm(): ckuus5.c, 17 Mar 2003.
  313.  
  314. A fix from Jeff SSL/TLS FTP data decoding.  ckcftp.c, 18 Mar 2003.
  315.  
  316. Tried building C-Kermit on a Cray Y-MP with UNICOS 9.0.  "int suspend",
  317. declared in ckcmai.c and used in many modules, conflicts with:
  318.  
  319.   unistd.h:extern int suspend __((int _Category, int _Id));
  320.  
  321. The "=Dsuspend=xsuspend" trick doesn't work for this; there is no way around
  322. the conflict other than to rename the variable: ckcmai.c, ckutio.c,
  323. ckuus[35xy].c.  26 Mar 2003.  VMS and K95 not affected.
  324.  
  325. OK that gets us past ckcmai.c...  Then in ckutio.c I had to add a new #ifdef
  326. around the LFDEVNO setting, because the Cray didn't have mkdev.h.  Could not
  327. find a Cray-specific manifest symbol, so I made a new makefile target (cray9)
  328. that sets this symbol.  Having done this I have no idea what kind of lockfile
  329. would be created, but I also doubt if anybody dials out from a Cray.  The
  330. binary should run a C90, J90, or Y-MP.  makefile, 26 Mar 2003.
  331.  
  332. Added a target for SCO OSR5.0.7.  makefile, ckuver.h, 30 Mar 2003.
  333.  
  334. Changed since 208:
  335. makefile ckuver.h ckcmai.c ckclib.c ckcftp.c ckucmd.c ckuus*.c ckutio.c.
  336.  
  337. ---8.0.209---
  338.  
  339. From Mark Sapiro, a fix for the March 17th doubleqote fix, getncm(): ckuus5.c,
  340. 4 Apr 2003.
  341.  
  342. From Jeff, 29 Apr 2003:
  343.  . Corrected target for HP-UX 11.00 + OpenSSL: makefile, 
  344.  . Do not allow WILL AUTH before WONT START_TLS: ckctel.h ckctel.c
  345.  . Add hooks for SFTP and SET/SHOW SFTP: ckcdeb.h ckuusr.h ckuusr.c ckuus3.c
  346.  . Add SKERMIT ckuusr.h ckuusr.c
  347.  . Add ADM-5 terminal emulation: ckuus7.c, ckuus5.c
  348.  . Uncomment and update HELP SET SSH V2 AUTO-REKEY: ckuus2.c
  349.  . Enable IF TERMINAL-MACRO and IF STARTED-FROM-DIALER for C-Kermit: ckuus6.c
  350.  . Fix conflicting NOSCROLL keyword definition: ckuusr.h
  351.  . Set ttname when I_AM_SSH: ckuusy.c
  352.  . Add extended arg parsing for SSH, Rlogin, Telnet: ckuusy.c, ckuus4.c
  353.  . Security updates: ckuath.c, ck_ssl.c
  354.  . Change K95 version number to 2.2.0: ckcmai.c
  355.  . Save K95 term i/o state before executing keyboard macro: ckuus4.c
  356.  . Add tests for SSH Subsystem active during INPUT/OUTPUT/CONNECT: ckuus[45].c
  357.  . Enable K95 SET SSH V2 AUTO-REKEY: ckuus3.c
  358.  
  359. SFTP and SET SFTP subcommands are implemented up to the case statements.
  360.  
  361. Files of mine that Jeff hadn't picked up:
  362.   ckuver.h ckcftp.c ckutio.c ckuusx.c (just minor changes for last build-all)
  363.  
  364. On 4 Jan 2003, SET RECEIVE MOVE-TO was changed to convert is argument to an
  365. absolute path, which made it impossible to specify a relative path, then
  366. move to different directories and have it apply relatively to each directory.
  367. Changed this as follows:
  368.  
  369.  . Parser uses cmtxt() rather than cmdir() so it won't fail at parse time.
  370.  . If path is absolute, we fail at parse time if directory doesn't exist.
  371.  . In reof() we run the the path through xxstring (again, in case deferred
  372.    evaluation of variables is desired) and then, if not null, use it.
  373.  . If the directory doesn't exist, rename() fails and reof() returns -4,
  374.    resulting in a protocol error (this is not a change).  We do NOT create
  375.    the directory on the fly. 
  376.  
  377. I also fixed SET SEND/RECEIVE RENAME-TO to parse with cmtxt() rather than
  378. cmdir(), since it's parsing a text template, not a directory name, e.g.
  379. "set receive rename-to file-\v(time)-v(date)-\v(pid)".  This was totally
  380. broken, since when I don't know.  We don't call xxstring() in this parse, so
  381. evaluation is always deferred -- I'd better not change this.  ckuus7.c,
  382. ckcfns.c, 1 May 2003.
  383.  
  384. From Jeff, Sat May  3 14:15:23 2003:
  385.  . Pick up the right isascii definition for K95: ckctel.c
  386.  . malloc...  ckuath.c (new safe malloc routines for K95)
  387.  . Add author listing: ckuus5.c
  388.  . SSH Heartbeat support (K95 only): ckuus[23].c
  389.  . Prescan --height and --width to avoid window resizing at startup: ckuusy.c
  390.  . Add checks for fatal() or doexit() called from sysinit(): ckuusx.c
  391.  . Move some K95-specific definitions to ckoker.h: ckcdeb.h
  392.  . Add support for ON_CD macro in zchdir(): ckufio.c
  393.  . Add a command to let FTP client authenticate with SSLv2: ckcftp.c
  394.  . Fix parsing of FTP file facts like "UNIX.mode": ckcftp.c
  395.  
  396. ON_CD will need some explaining (to be done).  It's implemented for Unix,
  397. VMS, WIndows, and OS/2.
  398.  
  399. The FTP file facts fix came from first exposure to the new OpenBSD FTP
  400. server: ftp://ftp7.usa.openbsd.org/pub/os/OpenBSD/3.3/i386/
  401. The period in "UNIX.mode" caused an erroneous word break, adding junk to
  402. the filename.
  403.  
  404. About the malloc changes, Jeff says "K95 is not behaving well in low memory
  405. environments.  I'm not sure that C-Kermit does much better.  The program does
  406. not crash but it certainly does not behave the way the user expects it to.
  407. I'm beginning to think that any malloc() error should be treated as fatal."
  408.  
  409. Not visible in these changes because it's in K95-specific modules: Jeff made
  410. SET ATTRIBUTES OFF and SET ATTRIBUTES DATE OFF apply to XYZMODEM transfers.
  411.  
  412. From Jeff, 11 May 2003:
  413.  . Add support for SSH Keepalive to relevant SET command (K95): ckuus3.c
  414.  . Reduce max overlapped i/o requests from 30 to 7 (K95): ckuus7.c
  415.  . Don't call sysinit() in fatal(): ckuusx.c.
  416.  . Some new conditionalizations for SSL module: ck_ssl.c
  417.  
  418. The doublequote-parsing fixes from March and April broke the SWITCH statement,
  419. which is implemented by internally defining, then executing, a macro.  If I
  420. drop back to the old dumb handling of doublequotes, everything is fixed except
  421. the problem of March 17th.  But can we really expect getncm() to pre-guess
  422. what the parser is going to do?  getncm()'s only job is to find command
  423. boundaries, which are represented by commas.  Commas, however, is needed IN
  424. commands too.  We take a comma literally if it is quoted with \, or is inside
  425. a matched pair of braces, parens, or doublequotes.  It is not unreasonable to
  426. require a doublequote in a macro definition to be prefixed by \ when it is to
  427. be taken literally.  The proper response to Jason Heskett's complaint of March
  428. 17th should have been to leave the code alone and recommand an appropriate
  429. form of quoting:
  430.  
  431.   def TEST {
  432.       .foo = {X\"}
  433.       sho mac foo
  434.   }
  435.  
  436. And this is what I have done.  Another reason for sticking with the old method
  437. is that it's explainable.  The "improved" method, even if it worked, would be
  438. be impossible to explain.  Btw, in testing this I noticed that the switch-test
  439. script made 8.0.201 dump core.  Today's version is fine.  The problem with
  440. quoted strings inside of IF {...} clauses and FOR and WHILE loops is fixed
  441. too.  Perhaps "unbroken" would be a better word.  ckuus5.c, 11 May 2003.
  442.  
  443. Vace discovered that FTP MGET /EXCEPT:{... (with an unterminated /EXCEPT list)
  444. could crash Kermit.  Fixed in ckcftp.c, 11 May 2003.
  445.  
  446. CONTINUE should not affect SUCCESS/FAILURE status.  ckuusr.c, 11 May 2003.
  447.  
  448. Fixed an oversight that goes back 15 years.  While \{123} is allowed for
  449. decimal codes, \x{12} and \o{123} were never handled.  ckucmd.c, 11 May 2003.
  450.  
  451. Added support for Red Hat <baudboy.h> and /usr/sbin/lockdev.  Supposedly this
  452. allows Kermit to be installed without setuid or setgid bits and still be able
  453. to lock and use the serial device.  Compiles and starts, but not tested.
  454. ckcdeb.h, makefile, ckutio.c, ckuus5.c, 16 May 2003.
  455.  
  456. From Jeff: FTP ASCII send data to host when FTP /SSL was in use was broken.
  457. ftp_dpl is set to Clear when FTP /SSL is in use.  This was causing the data to
  458. be written to the socket with send() instead of the OpenSSL routines.
  459. ckcftp.c, ckuath.c, 21 May 2003.
  460.  
  461. From Jeff: Stuff for Kerberos 524: ckcdeb.h.  Fixes for FTP; "FTP ASCII send
  462. data did not properly compute the end of line translations.  On Unix (and
  463. similar platforms) the end of line was correct for no character sets but
  464. incorrect when character sets were specified.  On Windows/OS2, the end of line
  465. was correct when character sets were specified and incorrect when they were
  466. not.  On MAC, both were broken.  Also, FTP Send Byte counts were incorrect
  467. when character sets were specified."  ckcftp.c.  17 Jun 2003.
  468.  
  469. From Jeff: fixes to HTTP /AGENT: and /USER: switch action: ckcnet.c ckuus3.c
  470. ck_crp.c ckcftp.c ckuus2.c ckuusy.c ckuusr.c ckcnet.h, 21 Jun 2003.
  471.  
  472. From Jeff: Fix SET DIALER BACKSPACE so it can override a previous SET KEY
  473. (e.g. from INI file): ckuus7.c.  Some SSL/TLS updates: ck_ssl.c.  HTTP support
  474. for VMS and other VMS improvements (e.g. a way to not have to hardwire the
  475. C-Kerit version number into the build script) from Martin Vorlaender:
  476. ckcnet.h, ckuus[r3].c, ckcdeb.h, ckvtio.c, ckcnet.c, ckvker.com.  Built on
  477. Solaris (gcc/ansi) and SunOS (cc/k&r).  The new VMS script tests the VMS
  478. version and includes HTTP support only for VMS 6.2 or later.  2 Jul 2003.
  479.  
  480. Tried to build on our last VMS system but it seems to be dead.  Looks like a
  481. head crash (makes really loud noises, boot says DKA0 not recognized) (fooey, I
  482. just paid good money to renew the VMS license).  Tried building at another
  483. site with:
  484.  
  485.   Process Software MultiNet V4.3 Rev A-X,
  486.   Compaq AlphaServer ES40, OpenVMS AXP V7.3
  487.   Compaq C V6.4-008 on OpenVMS Alpha V7.3
  488.  
  489. Had to make a few corrections to ckvker.com.  But still, compilation of
  490. ckcnet.c bombs, indicating that the SELECT definition somehow got lost
  491. somewhere since the 209 release (i.e. no SELECT type is defined so it falls
  492. thru to "SELECT is required for this code").  But I don't see anything in
  493. ckcdeb.h or ckcnet.[ch] that would explain this.  Not ckvker.com either
  494. (putting the old one back gives the same result).  OK, I give up, maybe it's
  495. just that I haven't tried building it on MultiNet recently.  What about UCX?
  496. Aha, builds fine there except for warnings about mlook, dodo, and parser in
  497. ckvfio.c (because of ON_CD) -- I suppose I have #include <ckucmd.h>... (done)
  498. Anyhow it builds OK and the HTTP code is active and almost works (HTTP OPEN
  499. works; HTTP GET seems to succeed but creates an empty file every time).  Tried
  500. building under MultiNet at another installation; same bad result.
  501.  
  502. OK so why won't it build for MultiNet?  Comparing ckcnet.c with the 209
  503. version, not a single #ifdef or #include is changed.  Tried building with
  504. p3="NOHTTP" -- builds OK, aha.  Where's the problem?  Not ckcnet.h...
  505. Not ckcdeb.h...  OK I give up, will revisit this next time I get time to
  506. do anything with the code.
  507.  
  508. Later Jeff said "Martin did not implement VMS networking for the HTTP code.
  509. All he did was activate the #define HTTP which happens to work because his
  510. connections are using SSL/TLS connections.  http_inc(), http_tol(), etc have
  511. no support for VMS networking regardless of whether it is UCX or MULTINET.
  512. The vast majority of HTTP connections are not secured by SSL/TLS.  It makes no
  513. sense to support HTTP on VMS until someone is willing to either do the work or
  514. pay have the work done to implement VMS networking in that code base."  So the
  515. fix is to not enable HTTP for VMS after all.  Removed the CKHTTP definition
  516. for VMS from ckcdeb.h, 6 Jul 2003.
  517.  
  518. Fixed ckvfio.c to #include <ckuusr.h> (instead of <ckucmd.h>) to pick up 
  519. missing prototypes.  6 Jul 2003.
  520.  
  521. From Arthur Marsh: solaris2xg+openssl+zlib+srp+pam+shadow and the corresponding
  522. Solaris 7 target.  makefile, 6 Jul 2003.
  523.  
  524. Remove duplicate #includes for <sys/stat.h>, <errno.h>, and <ctype.h> from
  525. ckcftp.c.  6 Jul 2003.
  526.  
  527. Add -DUSE_MEMCPY to Motorola SV/68 targets because of shuffled #includes in 
  528. ckcftp.c.  8 Jul 2003.
  529.  
  530. From Jeff: Fix problems mixing SSL and SRP without Kerberos.  Plus a few minor
  531. #define comment changes and a reshuffling of #defines in ckcdeb.h to allow me
  532. to build on X86 Windows without Kerberos.  ckcdeb.h, ck_crp.c, ckuath.c,
  533. 10 Jul 2003.
  534.  
  535. From Jeff: updated ckuat2.h and ckuath.c, 29 Jul 2003.
  536.  
  537. Mats Peterson noticed that a very small Latin-1 file would be incorrectly
  538. identified as UCS-2 by scanfile().  Fixed in ckuusx.c, 29 Jul 2003.
  539.  
  540. Fixed ACCESS macro definition to account for the fact that FIND is now a
  541. built-in command.  ckermit.ini, 30 Jul 2003.
  542.  
  543. From Jeff: Fix for typo in urlparse() (svc/hos): ckuusy.c, 18 Aug 2003.
  544.  
  545. From Jeff: Redhat9 makefile targets (needed for for OpenSSL 0.9.7):
  546. makefile, 19 Aug 2003.
  547.  
  548. GREP /NOLIST and /COUNT did too much magic, with some undesirable fallout:
  549. "GREP /NOLIST /COUNT:x args" printed "file:count" for each file.  "GREP
  550. /COUNT:x /NOLIST args" did not print "file:count", but neither did it set the
  551. count variable.  Removed the magic.  Also one of the GREP switches,
  552. /LINENUMBERS, was out of order.  Fixed in ckuus6.c, 20 Aug 2003.
  553.  
  554. From Jeff: "Reorganizing code to enable building with different subsets of
  555. options; a few typos corrected as well."  ckcdeb.h, ckuver.h (for RH9),
  556. ckcnet.c, ckuus7.c, ckuus3.c: 24 Aug 2003.
  557.  
  558. Scanfile misidentified a big PDF file as text because the first 800K of it
  559. *was* text (most other PDF files were correctly tagged as binary).  Fixed
  560. by adding a check for the PDF signature at the beginning of the file.
  561. scanfile(): ckuusx.c, 25 Aug 2003.
  562.  
  563. Ditto for PostScript files, but conservatively.  Signature at beginning of
  564. file must begin with "%!PS-Ado".  If it's just "%!" (or something nonstandard
  565. like "%%Creator: Windows PSCRIPT") we do a regular scan.  Also added "*.ps"
  566. to all binary filename patterns.  ckuusx.c, 4 Sep 2003.
  567.  
  568. Ditto (but within #ifndef NOPCLSCAN) for PCL (<ESC>E) and PJL (<ESC>%) files,
  569. but no binpatterns (note: ".PCL" is the extension for TOPS-20 EXEC scripts).
  570. ckuusx.c, 4 Sep 2003.
  571.  
  572. Added comments about OpenSSL 0.9.7 to all linux+openssl targets.
  573. makefile, 4 Sep 2003.
  574.  
  575. From Jeff: Added - #define ALLOW_KRB_3DES_ENCRYPT.  When this symbol is defined
  576. at compilation Kermit will allow non-DES session keys to be used during Telnet
  577. Auth.  These session keys can then be used for Telnet Encrypt.  The reason
  578. this is not compiled on by default is that the MIT Kerberos Telnet does not
  579. follow the RFC for constructing keys for ENCRYPT DES when the keys are longer
  580. than 8 bytes in length.  ckuath.c, ckuus5.c, 4 Sep 2003.
  581.  
  582. "ftp mget a b c" succeeded if one or more of the files did not exist, even
  583. with "set ftp error-action proceed".  This is because the server's NLST file
  584. list does not include any files that don't exist, so the client never even
  585. tries to get them.  Fortunately, the way the code is structured, this one was
  586. easy to fix.  ckcftp.c, 14 Sep 2003.
  587.  
  588. From Jeff: Corrected code in ckcnet.c to ensure that Reverse DNS Lookups are
  589. not performed if tcp_rdns is OFF.  Fixed ck_krb5_getrealm() to actually return
  590. the realm of the credentials cache and not the default realm specified in the
  591. krb5.conf file.  Previously krb5_cc_get_principal() was not being called.
  592. Fixed ck_krb5_is_tgt_valid() to test the TGT in the current ccache and not the
  593. TGT constructed from the default realm.  ckcnet.c, ckuath.c, 14 Sep 2003.
  594.  
  595. Marco Bernardi noticed that IF DIRECTORY could produce a false positive if
  596. the argument directory had previously been referenced but then removed.  This
  597. is because of the clever isdir() cache that was added to speed up recursion
  598. through big directory trees.  Changed IF DIRECTORY to make a second check
  599. (definitive but more expensive) if isdir() succeeds, and changed the
  600. directory-deleting routine, ckmkdir(), to flush the directory cache (UNIX
  601. only -- this also should be done in K95 but it's not critical).  This was
  602. done by adding a routine, clrdircache() to ckufio.c, which sets prevstat
  603. to -1 and prevpath[0] to NUL.  ckcfn3.c, ckuus6.c, ckufio.c, 18 Sep 2003.
  604.  
  605. Marco reported the second fix still didn't work for him (even though it did
  606. for me).  Rather than try to figure out why, I concluded that the directory
  607. cache is just not safe: a directory found a second ago might have been deleted
  608. or renamed not only by Kermit but by some other process.  Why did I add this
  609. in the first place?  The log says:
  610.  
  611.   Some debug logs showed that isdir() is often called twice in a row on the
  612.   same file.  Rather than try to sort out clients, I added a 1-element cache
  613.   to Unix isdir().  ckufio.c, 24 Apr 2000.
  614.  
  615. Experimentation with DIR and DIR /RECURSIVE does not show this happening at
  616. all.  So I #ifdef'd out the directory cache (see #ifdef ISDIRCACHE in ckufio.c;
  617. ISDIRCACHE is not defined) and backed off the previous changes: ckufio.c,
  618. ckcfn3.c, ckuus6.c, 28 Sep 2003.
  619.  
  620. From Jeff: Replace the compile time ALLOW_KRB_3DES_ENCRYPT with a run-time
  621. command SET TELNET BUG AUTH-KRB5-DES which defaults to ON: ckctel.[ch],
  622. ckuus[234].c, ck_crp.c, ckuath.c.  4 Oct 2003.
  623.  
  624. Allow DIAL RETRIES to be any positive number, and catch negative ones.
  625. Also added code to check for atoi() errors (e.g. truncation).  At least on
  626. some platforms (e.g. Solaris) atoi() is supposed to set errno, but it
  627. doesn't.  ckuus3.c, ckucmd.c, 4 Oct 2003.
  628.  
  629. Added /DEFAULT: to ASK-class commands (ASK, ASKQ, GETOK):
  630.  
  631.  . For popups: no way to send defaults to popup_readtext() or popup_readpass().
  632.  . For GUI ASK[Q], pass default to gui_txt_dialog().
  633.  . For GUI GETOK, convert "yes" "ok" or "no" default to number for uq_ok().
  634.  . For Text GETOK, add default to cmkey().
  635.  . For Text ASK[Q], add default to cmtxt().
  636.  . For GETC, GETKEY, and READ: no changes.
  637.  
  638. GETOK, ASK, and ASKQ with /TIMEOUT: no longer fail when the timer goes off
  639. if a /DEFAULT was supplied.  The GUI functions (uq_blah) don't seem to
  640. support timeouts.  Only the text version has been tested.  ckuus[26].c,
  641. 4 Oct 2003.
  642.  
  643. From Jeff: add /DEFAULT: for popups.  ckuus6.c. 6 Oct 2003.
  644.  
  645. Change SET DIAL INTERVAL to be like SET DIAL RETRIES.  ckuus[34].c, 6 Oct 2003.
  646.  
  647. Added target for HP-UX 10/11 + OpenSSL built with gcc, from Chris Cheney.
  648. Makefile, 12 Oct 2003.
  649.  
  650. From Jeff, 6 Nov 2003:
  651.  . #ifdef adjustments: ckcftp.c, ckcdeb.h
  652.  . Fix spurious consumption of first byte(s) on Telnet connection: ckctel.c
  653.  . Another HP PJL test for scanfile: ckuusx.c.
  654.  . K95: Recognize DG4xx protected fields in DG2xx emulation: ckuus7.c.
  655.  . Add SSLeay version display to SHOW AUTH command: ckuus7.c
  656.  . Improved SET MOUSE CLEAR help text: ckuus2.c.
  657.  . Improved Kverbs help text: ckuus2.c (+ new IBM-3151 Kverbs).
  658.  . Some changes to ck_ssl.c, ckuath.c.
  659.  
  660. From PeterE, 10 Nov 2003:
  661.  . Improved HP-UX 10/11 makefile targets for OpenSSL.
  662.  . #ifdef fix for OpenSSL on HP-UX: ck_ssl.c.
  663.  
  664. Another new makefile from PeterE with improved and integrated HP-UX targets.
  665. 12 Nov 2003.
  666.  
  667. A couple fixes to the solaris9g+krb5+krb4+openssl+shadow+pam+zlib target
  668. from Jeff.  Added a solaris9g+openssl+shadow+pam+zlib target.  makefile,
  669. 21 Nov 2003.
  670.  
  671. From Jeff, 30 Nov 2003:
  672.  . Fix SEND /MOVE-TO: ckuusr.c.
  673.  . Fix K95 SET TITLE to allow quotes/braces around text: ckuus7.c.
  674.  . Improved "set term autodownload ?" response: ckuus5.c.
  675.  . Fix SHOW FEATURES to specify the protocol for encryption: ckuus5.c
  676.  . Make {SEND, RECEIVE} {MOVE-TO, RENAME-TO} work for XYZMODEM (K95 only).
  677.  
  678. From Jeff: 7 Jan 2004:
  679.  . At one point Frank started to add a timer parameter to the
  680.    uq_txt() function but he only did it for the non-ANSI
  681.    compilers.  I added it for the ANSI compilers, fixed the
  682.    prototypes and provided a default value easily changed
  683.    DEFAULT_UQ_TIMEOUT: ckcker.h, ckuus[36].c, ck_ssl.c, ckcftp.c, ckuath.c.
  684.  . Fixed SET TERMINAL DEBUG ON (typo in variable name): ckuus7.c.
  685.  . Fixed BEEP INFORMATION; previously it made no sound, now uses
  686.    MB_ICONQUESTION.  ckuusx.c.
  687.  
  688. From Ian Beckwith <ian@nessie.mcc.ac.uk> (Debianization), 7 Jan 2004:
  689.  . Search dir/ckermit for docs, as well as dir/kermit in cmdini(): ckuus5.c.
  690.  . New linux+krb5+krb4+openssl+shadow+pam target (kitchen sink minus SRP,
  691.    which Debian does not distribute): makefile.
  692.  ? Mangles the DESTDIR support in makefile to install into a staging area:
  693.    makefile (I didn't take this one yet).
  694.  
  695. Updated copyright notices for 2004, all modules.  7 Jan 2004.
  696.  
  697. Added INPUT /NOMATCH, allowing INPUT to be used for a fixed amount of time
  698. without attempting to match any text or patterns, so it's no longer
  699. necessary to "input 600 STRING_THAT_WILL_NEVER_COME".  If /NOMATCH is
  700. included, INPUT succeeds if the timeout expires, with \v(instatus) = 1
  701. (meaning "timed out"); fails upon interruption or i/o error.  ckuusr.h,
  702. ckuus[r24].c, 7 Jan 2004.
  703.  
  704. Added SET INPUT SCALE-FACTOR <float>.  This scales all INPUT timeouts by the
  705. given factor, allowing time-sensitive scripts to be adjusted to changing
  706. conditions such as congested networks or different-speed modems without
  707. having to change each INPUT-class command.  This affects only those timeouts
  708. that are given in seconds, not as wall-clock times.  Although the scale
  709. factor can have a fractional part, the INPUT timeout is still an integer.
  710. Added this to SHOW INPUT, and added a \v(inscale) variable for it.
  711. ckuusr.h, ckuus[r257].c, 7 Jan 2004.
  712.  
  713. undef \%a, \fverify(abc,\%a) returns 0, which makes it look as if \%a is a
  714. string composed of a's, b's, and/or c's, when in fact it contains nothing.
  715. Changed \fverify() to return -1 in this case.  ckuus4.c, 12 Jan 2004.
  716.  
  717. \fcode(xxx) returned an empty string if its argument string was empty.  This
  718. makes it unsafe to use in arithmetic or boolean expressions.  Changed it to
  719. return 0 if its argument was missing, null, or empty.  ckuus4.c, 12 Jan 2004.
  720.  
  721. Updated \verify() and \fcode() help text.  ckuus2.c, 12 Jan 2004.
  722.  
  723. While setting up IKSD, Ian Beckwith noticed that including the --initfile:
  724. option caused Kermit to start parsing its own Copyright string as if it were
  725. the command line, and eventually crash.  I couldn't reproduce on Solaris /
  726. Sparc but I could in Linux / i386 (what Ian is using) -- a change from Jeff
  727. on 28 Apr 2003 set the command-line arg pointer to a literal empty string in
  728. prescan() about line 1740 of of ckuus4.c; the pointer is incremented next
  729. time thru the loop, resulting in random memory being referenced.  Fixed by
  730. setting the pointer to NULL instead of "".  ckuus4.c, 12 Jan 2004.
  731.  
  732. declare \&a[999999999999999] would dump core on some platforms.  atoi()
  733. or whatever would truncate the dimension to maxint.  When we add 1 to the
  734. result, we get a negative number, which is used as an index, loop test, etc.
  735. Fixed both dodcl() and dclarray() to check for (n+1 < 0).  ckuus[r5].c,
  736. 12 Jan 2004.
  737.  
  738. Unix zchki() would fail on /dev/tty, which is unreasonable.  This prevented
  739. FOPEN /READ from reading from the terminal.  zchki() already allowed for
  740. /dev/null, so I added /dev/tty to the list of specials.  Ditto for FOPEN
  741. /WRITE and zchko().  ckufio.c 13 Jan 2004.
  742.  
  743. Added untabify() routine to ckclib.[ch], 13 Jan 2004.
  744. Added FREAD /TRIM and /UNTABIFY.  ckuus[27].c, 13 Jan 2004.
  745. Added \funtabify().  ckuusr.h, ckuus[24].c, 13 Jan 2004.
  746.  
  747. Dat Nguyen noticed that (setq u 'p') followed by (u) dumped core.  This was
  748. caused by an over-clever optimization that skipped mallocs for short
  749. literals, but then went on later to try to free one that hadn't been
  750. malloc'd.  Fixed in dosexp(): ckuus3.c, 14 Jan 2004.
  751.  
  752. Catch another copyright date.  ckuus5.c, 14 Jan 2004.
  753.  
  754. Fixed SWITCH to work even when SET COMMAND DOUBLEQUOTE OFF (from Mark
  755. Sapiro).  ckuus5.c, 15 Jan 2004.
  756.  
  757. Changed version to 8.0.211 so scripts can test for recently added features.
  758. ckcmai.c, 15 Jan 2004.
  759.  
  760. Fixed a glitch in K95 "help set port".  ckuus2.c, 20 Jan 2004.
  761.  
  762. Fix from Jeff: Connections to a TLS-aware protocol which require a reconnect
  763. upon certificate verification failure could not reconnect if the connection
  764. was initiated from the command line or via a URL.  ckctel.c ckcmai.c
  765. ckuusr.c ckuus7.c ckuusy.c, 20 Jan 2004.
  766.  
  767. From Alex Lewin: makefile target and #ifdef for Mac OS X 10.3 (Panther):
  768. makefile, ckcnet.c, 7 Feb 2004.
  769.  
  770. Added KFLAGS to sco32v507 targets to make PTY and SSH commands work.  The
  771. same flags could probably also be added to earlier OSR5 targets but they
  772. have not been tested there.  makefile, 7 Feb 2004.
  773.  
  774. Checked a complaint that "LOCAL &a" did not make array \&a[] local.  Indeed
  775. it did not, and can not.  You have to use the full syntax in the LOCAL
  776. command, "LOCAL \&a[]", or else it doesn't know it's not a macro named &a.
  777. 7 Feb 2004.
  778.  
  779. Fixed some confusion in creating IKSD database file and temp-file names.
  780. I was calling zfnqfp() without remembering that the path member of the
  781. returned struct included the filename, so to get just the directory name,
  782. I needed to strip the filename from the right.  ckuusy.c, 2 Mar 2004.
  783.  
  784. New ckuath.c, ck_ssl.c from Jeff.  2 Mar 2004.
  785.  
  786. Updated Jeff's affiliation in VERSION command text.  ckuusr.c, 2 Mar 2004.
  787.  
  788. Designation changed from Dev.00 to Beta.01.  ckcmai.c, 2 Mar 2004.
  789.  
  790. Fixed zrename() syslogging -- it had success and failure reversed.
  791. Beta.02: ckufio.c, 4 Mar 2004.
  792.  
  793. Problem: when accessing IKSD via a kermit:// or iksd:// URL, and a user ID
  794. is given but no password, doxarg() set the password to "" instead of leaving
  795. it NULL, but all the tests in dourl() are for NULL.  Fixed in doxarg():
  796. ckuusy.c, 5 Mar 2004.
  797.  
  798. The logic in dourl() about which macro to construct (login and connect,
  799. login and get directory listing, or login and fetch a file) was a bit off,
  800. so all three cases were not handled.  ckcmai.c, 5 Mar 2004.
  801.  
  802. Trial Beta builds:
  803.  . HP-UX B.11.11 PA-RISC
  804.  . HP-UX B.11.23 IA64
  805.  . Tru64 4.0G Alpha
  806.  . Tru64 5.1B Alpha
  807.  . Debian 3.0 i386
  808.  . Red Hat ES 2.1 i386
  809.  . Slackware 9.1 i386
  810.  . VMS 7.3-1 Alpha + UCX 5.3
  811.  . VMS 7.3-1 Alpha no TCP/IP
  812.  . VMS 7.3 Alpha MultiNet 4.3 A-X
  813.  . SCO UnixWare 7.1.4 i386
  814.  . SCO OSR5.0.7 i386
  815.  . Solaris 9 Sparc
  816.  
  817. Fixed compiler warning in doxarg() caused by typo (NULL instead of NUL) in
  818. the 5 March doxarg() edit.  ckuusy.c, 9 Mar 2004.
  819.  
  820. IKSD (kermit://) command-line URLs did not work right if the client had
  821. already preauthenticated with Kerberos or somesuch because they tried to log
  822. in again with REMOTE LOGIN.  The macros constructed in doxarg() needed to
  823. check \v(authstate) before attempting REMOTE LOGIN.  ckcmai.c, 10 Mar 2004.
  824.  
  825. Added ckuker.nr to x.sh (ckdaily upload) and updated ckuker.nr with current
  826. version number and dates.  10 Mar 2004.
  827.  
  828. Replaced hardwired references to /usr/local in makefile with $(prefix)
  829. (which defaults to /usr/local, but can be overridden on the command line),
  830. suggested by Nelson Beebe for use with Configure.  10 Mar 2004.
  831.  
  832. From Nelson Beebe: In the Kermit makefile in the install target commands,
  833. line 981 reads:
  834.  
  835.         cp $(BINARY) $(DESTDIR)$(BINDIR)/kermit || exit 1;\
  836.  
  837. Could you please add this line before it:
  838.  
  839.         rm -f $(DESTDIR)$(BINDIR)/kermit;\
  840.  
  841. Some sites (mine included) keep multiple versions of software around,
  842. with hard links between $(prefix)/progname and $(prefix)/progname-x.y.z.
  843. Failure to remove the $(prefix)/progname at "make install" time then
  844. replaces the old $(prefix)/progname-x.y.z with the new one, destroying
  845. an old version that the site wanted to be preserved.  makefile, 10 Mar 2004.
  846.  
  847. Minor syntax and typo fixes (mostly prototypes): ckcdeb.h, ckcfns.c,
  848. ckclib.c, ckufio.c, ckuusr.h, ckuusx.c, 10 Mar 2004.  (I still have a few
  849. more to do.)
  850.  
  851. Added CC=$(CC) CC2=$(CC2) to many (but not all) makefile targets that
  852. reference other makefile targets.  On some platforms (notably AIX, Solaris,
  853. SunOS) there are specific targets for different compilers, so I skipped
  854. those.  makefile, 10 Mar 2004.
  855.  
  856. Added error checking to kermit:// URL macros, so they don't plow ahead
  857. after the connection is closed.  ckcmai.c, 11 Mar 2004.
  858.  
  859. Added FreeBSD 4.9 and 5.1 targets (only the herald is affected).
  860. makefile, ckuver.h, 11 Mar 2004.
  861.  
  862. Added "LIBS=-lcrypt" to bsd44 targets since nowadays crypt is almost always
  863. unbundled from libc.  Also added explanatory notes.  makefile, 11 Mar 2004.
  864.  
  865. Changed MANDIR to default to $(manroot)/man/man1, and manroot to default
  866. to $(prefix).  More adding of CC=$(CC) clauses: {Free,Net,Open}BSD, 4.4BSD.
  867. makefile, 11 Mar 2004.
  868.  
  869. Miscellaneous cleanups: ckuusx.c, ckcnet.c, ckufio.c, 11 Mar 2004.
  870.  
  871. Corrected the check in the linux target to see if /usr/include/crypt.h
  872. exists, and if so to define HAVE_CRYPT_H, which is used in ckcdeb.h to
  873. #include <crypt.h> to get the prototype for crypt() and prevent bogus
  874. conversions on its return type on 64-bit platforms (the previous test wasn't
  875. quite right and the resulting symbol wasn't spelled right).  makefile,
  876. 12 Mar 2004.
  877.  
  878. From Jeff, 14 Mar 2004:
  879.  . Initialize localuidbuf[] in tn_snenv(): ckctel.c.
  880.  . Remove remote-mode checks in hupok() for K95G only (why?): ckuus3.c.
  881.  . Add help text for new K95-only TYPE /GUI switches: ckuus2.c.
  882.  . TYPE /GUI parsing, ...: ckuusr.c.
  883.  . TYPE /GUI action, dotype(): ckuus6.c
  884.  . Change Jeff's affiliation: most modules.
  885.  
  886. 20 Mar 2004: Looked into adding long file support, i.e. handling files more
  887. than 2GB (or 4GB) long.  Discovered very quickly this would be a major
  888. project.  Each platform has a different API, or environment, or transition
  889. plan, or whatever -- a nightmare to handle in portable code.  At the very
  890. least we'll need to convert a lot of Kermit variables from long or unsigned
  891. long to some new Kermit type, which in turn is #defined or typedef'd
  892. appropriately for each platform (to off_t or size_t or whatever).  Then we
  893. have to worry about the details of open() vs fopen(); printf() formats (%lld
  894. vs %Ld vs %"PRId64"...), platforms like HP-UX where you might have to use
  895. different APIs for different file systems on the same computer, etc.  We'll
  896. need to confront this soon, but let's get a good stable 8.0.211 release out
  897. first!  Meanwhile, for future reference, here are a few articles:
  898.  
  899. General: http://freshmeat.net/articles/view/709/
  900. Linux:   http://www.ece.utexas.edu/~luo/linux_lfs.html
  901. HP-UX:   http://devrsrc1.external.hp.com/STK/partner/lg_files.pdf
  902. Solaris: http://wwws.sun.com/software/whitepapers/wp-largefiles/largefiles.pdf
  903.  
  904. Looked into FTP timeouts.  It appears I can just call empty() (which is
  905. nothing more than a front end for select()) with the desired timeout before
  906. any kind of network read.  If it returns <= 0, we have a timeout.  This is
  907. not quite the same as using alarm() / signal() around a recv() (which could
  908. get stuck) but alarm() / signal() are not not used in the FTP module and are
  909. not naturally portable to Windows, but select() is already in use in the FTP
  910. module for both Unix and Windows.  This form of timeout could be used
  911. portably for both command response and data reads.  What about writes to the
  912. command or data socket?  They can get stuck for hours and hours without
  913. returning too, but the select() approach won't help here -- we need the
  914. actual send() or recv() to time out, or be wrapped in an alarm()/signal()
  915. kind of mechanism.  But if we can do that for sends, we can also do it for
  916. receives.  Better check with Jeff before I start programming anything.
  917. 20 Mar 2004.
  918.  
  919. Later: Decided to postpone the above two projects (ditto IPv6) until after
  920. 8.0.211 is released because both will have major impacts on portability.
  921. Grumble: all i/o APIs should have been designed from the beginning with a
  922. timeout parameter.  To this day, hardly any have this feature.
  923.  
  924. 3-4 Apr 2004: More 8.0.211 Beta.02+ test builds:
  925.  
  926.  . FreeBSD 3.3
  927.  . FreeBSD 4.4
  928.  . Linux Debian 2.1
  929.  . Linux RH 6.1
  930.  . Linux RH 7.1
  931.  . Linux RH 7.2
  932.  . Linux RH 9 (with 84 different combinations of feature selection)
  933.  . Linux SuSE 6.4
  934.  . Linux SuSE 7.0
  935.  . NetBSD 1.4.1
  936.  . NetBSD 1.5.2
  937.  . OpenBSD 2.5
  938.  . OpenBSD 3.0
  939.  . QNX 4.25
  940.  . SCO UnixWare 2.1.3
  941.  . SCO UnixWare 7.1.4
  942.  . SCO OpenServer 5.0.7
  943.  . SCO XENIX 2.3.4 (no TCP)
  944.  
  945. Changes needed: None.
  946.  
  947. Problem: SCO XENIX 2.3.4 network build failed in the FTP module with
  948. header-file syntax and conflicting-definitions trouble.  I'm not going to
  949. try to fix it; 8.0.209 built OK with FTP, so we'll just keep that one
  950. available.
  951.  
  952. Got access to VMS 8.1 on IA64.  Building the nonet version of C-Kermit
  953. required minor modifications to ckvvms.h, ckv[ft]io.c, and ckvcon.c, to
  954. account for a third architecture.  Also to SHOW FEATURES in ckuus5.c.  Once
  955. that was done, the UCX 5.5 version built OK too.  Starts OK, makes Telnet
  956. connection OK, sends files.  Has some obvious glitches though -- "stat"
  957. after a file transfer reports 0 elapsed time (in fact it was 00:09:48) and
  958. 1219174400 cps (when in fact it was 10364).  This doesn't happen on the
  959. Alpha.  Btw, the IA64 binary is twice as big as the Alpha one.  Changed
  960. to Beta.03.  5 Apr 2004.
  961.  
  962. Fixed the ckdaily script to include the makefile and man page in the Zip
  963. file (they were not included because the Zip file was intended mainly for
  964. VMS users, but some Unix users prefer Zip to tar.gz).  6 Apr 2004.
  965.  
  966. Traced problems in VMS/IA64 statistics report to rftimer()/gftimer() in
  967. ckvtio.c, which use sys$ and lib$ calls to figure elapsed time.  These work
  968. on VAX and Alpha but not IA64.  Sent a report to the chief engineer of the
  969. IA64 VMS port; he says it's probably a bug in VMS 8.1 (which is not a real
  970. release); he'll make sure it's fixed in 8.2.  As an experiment, tried
  971. swapping in the Unix versions of these routines (which call gettimeofday()
  972. etc).  They seem work just fine (it hung a couple times but I think that's
  973. because the underlying system hung too; trying it later on a new connection,
  974. it was fine; however I noticed a BIG discrepancy in throughput between
  975. sending and receiving).  Moved definitions for VMS64BIT and VMSI64 to
  976. ckcdeb.h so all modules can use them and added them to the SHOW FEATURES
  977. display.  Added VMSV80 definition to build procedure.  Beta.03+.  ckcdeb.h,
  978. ckcuus5.c, ckcvvms.h, ckvtio.c, ckvker.com, 6 Apr 2004.
  979.  
  980. While doing the build-all, I noticed the VMS version did not build with
  981. Multinet or older UCX versions, always with the same errors -- undeclared
  982. variables, undefined symbols, all TCP/IP related.  This didn't happen a
  983. couple weeks ago...  Somehow the order of #includes was messed up --
  984. ckuusr.h depended on symbols that are defined in ckcnet.h, but ckcnet.h
  985. was being included after ckuusr.h...  this was compounded by two missing
  986. commas in ckvker.com.  11 Apr 2004.
  987.  
  988. Removed Beta designation, released as 8.0.211, 10 Apr 2004.
  989.  
  990. I had somehow lost the edit to ckutio.c that changed the UUCP lockfile for
  991. Mac OS X from /var/spool/uucp to /var/spool/lock.  So I slipped it in and
  992. re-uploaded version 8.0.211.  You can tell the difference because SHOW
  993. VERSIONS has 17 Apr 2004 for the Communications I/O module.  Also the 10.3
  994. executable now has a designer banner: "Mac OS X 10.3".  makefile, ckuver.h,
  995. ckutio.c, ckuus[45].c, 17 Apr 2004.
  996.  
  997. ---8.0.211---
  998.  
  999. Removed "wermit" from "make clean" (how did it get there?).  makefile.
  1000.  
  1001. From Jeff, applied 10 May 2004.
  1002.  . Rearrange #ifdefs that define OS/2-only features. ckcdeb.h.
  1003.  . Fix two strncat()s that should have been ckstrncat()s.  ckuus7.c.
  1004.  . Fix two strncat()s that should have been ckstrncat()s.  ckuus4.c.
  1005.  . Fix one strncat(). ckcfns.c.
  1006.  . SET FTP CHAR ON used backwards byte order when output to screen.  ckcfns.c.
  1007.  . Fix two strncat()s.  ckuus3.c.
  1008.  . Add SET NETWORK TYPE NAMED-PIPE for K95.  ckuus3.c.
  1009.  . Add "No active connections" message to hupok().  ckuus3.c.
  1010.  . Fix many strncat()s.  ckcnet.c.
  1011.  . Fix some strncat()s.  ckcftp.c
  1012.  . Make FTP port unsigned short for 16383 < port < 65536.  ckcftp.c.
  1013.  . Improvements to FTP USER command.  ckcftp.c.
  1014.  . Fix FEAT parsing to allow for various forms of whitespace.  ckcftp.c.
  1015.  
  1016. S-Expression (AND FOO BAR) would not short-circuit if FOO's value was 0,
  1017. even though short-circuiting code has been there since Day 1.  Similarly for
  1018. (OR BAR FOO).  Turns out the first operand was a special case that bypassed
  1019. the short-circuit check.  Fixed in dosexp(): ckuus3.c, 10 May 2004.
  1020.  
  1021. Red Hat 7.3 (and maybe others) <baudboy.h> referenced open() without first
  1022. ensuring it was declared.  The declaration is in <fcntl.h>, which is after
  1023. <baudboy.h> in ckutio.c series of #includes.  Made a special case for this.
  1024. ckutio.c (see comments), 10 May 2004.
  1025.  
  1026. If the local Kermit's parity is set to SPACE and then a file arrives via
  1027. autodownload, automatic parity detection improperly switches it to NONE.
  1028. Fixed in rpack() by switching parity automatically only if parchk() returns
  1029. > 0 (rather than > -1), since NONE and SPACE are indistinguishable.  A
  1030. bigger problem still remains: autodownload does not work at all if the
  1031. sender is using actual parity bits (even, odd, or mark) and the receiver's
  1032. parity is NONE.  ckcfn2.c, 10 May 2004.
  1033.  
  1034. When a DIAL MACRO is defined and the phone number is comprised of more than
  1035. one "word" (i.e. contains spaces), the dial macro loses the second and
  1036. subsequent words after the first call. Fixed in xdial() by inserting quotes
  1037. around phone number before passing it to xdial(). ckuus6.c, 10 May 2004.
  1038.  
  1039. DIAL MACRO fix was not right; the quotes were kept as part of the phone
  1040. number and sent to the modem.  dodo() pokes its argument to separate the
  1041. macro argument string into its component arguments.  xdial() is called
  1042. repeatedly on the same string, so after the first time, a NUL has been
  1043. deposited after the first word of the telephone number.  The fix is to have
  1044. xdial() create a pokeable copy of its argument string before calling
  1045. dodo(dial-macro,args...).  It might seem odd that dodo pokes its argument,
  1046. but making copies would be would be prohibitive in space and time.
  1047. ckuus6.c, 23 May 2004.
  1048.  
  1049. FTP CD did not stripe braces or quotes from around its argument.  Fixed in
  1050. doftprmt(): ckcftp.c, 23 May 2004.
  1051.  
  1052. Added client side of REMOTE MESSAGE/RMESSAGE/RMSG: ckuus[r27].c, 23 May 2004.
  1053.  
  1054. Server side of REMOTE MESSAGE: ckcpro.w, 23 May 2004.
  1055.  
  1056. From Dave Sneddon: an updated CKVKER.COM containing a fix where the
  1057. COMPAQ_SSL symbol was not defined but later referenced which generated an
  1058. undefined symbol error.  ckvker.com, 5 Jan 2005.
  1059.  
  1060. From Andy Tanenbaum (28 May 2005):
  1061.  . Fix an errant prototype in ckcker.h and ckucmd.h - () instead of (void).
  1062.  . Add support for MINIX 3.0.  makefile, ckutio.c, ckufio.c, ckuver.h.
  1063.  
  1064. Fixed messed-up sndhlp() call which apparently had been jiggered to
  1065. compensate for the bad prototype which has now been fixed, ckcpro.w,
  1066. 12 Jun 2005.
  1067.  
  1068. From Jeff (12 June 2005):
  1069.  . Security updates.  ck_ssl.c, ck_crp.c, ckuath.c.
  1070.  . Fix bug in K95 SET PRINTER CHARACTER-SET. ckuus3.c.
  1071.  . Add printer character-set to K95 SHOW PRINTER display. ckuus5,c
  1072.  . Add SET MSKERMIT FILE-RENAMING to K95. ckuus7.c, ckuusr.h.
  1073.  . Add help for K95 SET MSKERMIT.  ckuus2.c.
  1074.  . Add SET GUI CLOSE to K95.  ckuusr.h, ckuus2.c, ckuus3.c
  1075.  . Add help text for K95 SET GUI MENUBAR and TOOLBAR.  ckuus2.c.
  1076.  . Add --noclose command-line option for K95.  ckuusy.c
  1077.  . Add PAM support for Mac OS X.  ckufio.c.
  1078.  . Add GSSAPI support for Mac OS X.  ckcftp.c.
  1079.  . Pick up more URL options.  ckcker.h, ckuusy.c.
  1080.  . Fix bug in delta-time calculation across year boundary.  ckucmd.c.
  1081.  . Add Secure Endpoints to copyright notices.  ckcmai.c.
  1082.  . Fix FTP HELP to override unverbose setting.  ckcftp.c.
  1083.  . Fix assorted minor typos.
  1084.  
  1085. From Matthias Kurz: automatic herald generation for NetBSD 2.0 and later,
  1086. "make netbsd2".  ckuver.h, makefile, 12 Jun 2005.
  1087.  
  1088. Added SET TERMINAL LF-DISPLAY, like CR-DISPLAY but for linefeed rather than
  1089. carriage return.  ckuusr.h, ckuus[257x].c, 12 Jun 2005.
  1090.  
  1091. Made a command-line option --unbuffered to do what the -DNONOSETBUF
  1092. compile-time option does, i.e. force unbuffered console i/o.  Unix only.
  1093. ckuusr.h, ckuusy.c, ckutio.c, 12 Jun 2005.
  1094.  
  1095. Fixed getiact() (which displays TERM IDLE-ACTION setting) to display
  1096. space as \{32}.  ckuus7.c, 12 Jun 2005.
  1097.  
  1098. Added LMV as a synonym for LRENAME, which is itself a synonym for LOCAL
  1099. RENAME.  ckuusr.c, 12 Jun 2005.
  1100.  
  1101. Put HELP SET TERMINAL DG-UNIX-MODE text where it belonged.  ckuus2.c,
  1102. 12 Jun 2005.
  1103.  
  1104. Added IF LINK (Unix only) to test if a filename is a symlink.  Uses the most
  1105. simpleminded possible method, calls readlink() to see if it succeeds or fails.
  1106. No other method is dependable across different Unixes.  This code should be
  1107. portable because I already use readlink() elsewhere within exactly the same
  1108. #ifdefs.  ckufio.c, ckuus2.c, ckuus6.c, 12 Jun 2005.
  1109.  
  1110. Fixed a bug in which \fdir() wouldn't work when its argument was the nonwild
  1111. name of a directory file.  zxpand(): ckufio.c, 12 Jun 2005.
  1112.  
  1113. Made \fdirectory() a synonym for \fdirectories().  Made \fdir() an
  1114. acceptable abbreviation for these, even though it clashes with \fdirname(),
  1115. which still works as before.  ckuus4.c, 12 Jun 2005.
  1116.  
  1117. Added the long-needed \flopx() function, to return rightmost pieces of
  1118. strings, such as file extensions.  \fstripx() and \flopx() are the
  1119. orthogonal functions we need to pick filenames apart from the right:
  1120. \stripx(foo.tar.gz) = foo.tar; flopx(foo.tar.gz) = gz.  ckuusr.h, ckuusr.c,
  1121. ckuus2.c, 12 Jun 2005.
  1122.  
  1123. Removed reference to defunct fax number, ckcmai.c, 12 Jun 2005.
  1124.  
  1125. Added -DHAVE_PTMX to linux+krb5+openssl+zlib+shadow+pam.  From Timothy Folks.
  1126. makefile, 12 Jun 2005.
  1127.  
  1128. Built on Solaris 9 and NetBSD 2.0.
  1129.  
  1130. From Jeff: New build target for Mac OS X 10.3 with Kerberos 5 and SSL.
  1131. makefile, 14 Jun 2005.
  1132.  
  1133. Fixed error in ckuver.h NetBSD #ifdefs.  15 Jun 2005.
  1134.  
  1135. Fixed SET TERMINAL IDLE-ACTION OUTPUT to work as documented, namely if the
  1136. output string is empty, to send a NUL.  Previously there was no way to make
  1137. it send a NUL.  ckuus7.c, 15 Jun 2005.
  1138.  
  1139. Suppose (in Unix, for example) a filename contains wildcard characters, such
  1140. as {abc}.txt.  When referring to such a file (e.g. in a SEND command), these
  1141. characters can be quoted, e.g. \{abc\}.txt.  But if the file list has been
  1142. obtained programmatically, e.g. stored in an array, there is no way, short
  1143. of tedious, complicated, and error-prone string processing, to reference the
  1144. file.  For this we need a way to disable wildcard processing.  I added { ON,
  1145. OFF } choices for the SET WILD and SHOW FILE commands: ckuusr.h, ckuus[234].c.
  1146. { ON, OFF } turns wildcarding off and on without affecting the { KERMIT,
  1147. SHELL } agent choice; it does this by setting a new and separate global
  1148. variable, wildena.  Added semantics to ckufio.c.  Crude but effective.  It
  1149. might have been more Unixlike to add Yet Another form of quoting but we
  1150. have enough of that already (later maybe I'll add a \function() for this).
  1151. Needs to be propogated to Windows and VMS.  15 Jun 2005.
  1152.  
  1153. Improved and fixed typos in HELP WILDCARD and HELP PATTERN.  ckuus2.c,
  1154. 15 Jun 2005.
  1155.  
  1156. The GREP command, and probably anything else that uses ckmatch() for pattern
  1157. matching, failed on patterns like */[0-3]*.html.  The [a-b] handler, when
  1158. failing to match at the current position, neglected to back up the pattern
  1159. and try again on the remainder of the string.  I also fixed another case, in
  1160. which matching a literal string a*b?c against the pattern a[*?]*[?*]c caused
  1161. ckmatch() to recurse until it blew up.  ckclib.c, 16 Jun 2005.
  1162.  
  1163. Added builds and designer banner for Solaris 10.  makefile, ckuver.h,
  1164. 27 Jun 2005.
  1165.  
  1166. Defined CKHTTP for NetBSD, the HTTP code builds and works fine there.
  1167. ckcdeb.h, 2 Jul 2005.
  1168.  
  1169. Added #ifndef OSF40..#endif around definition of inet_aton() in ck_ssl()
  1170. to allow building in Tru64.  Added tru64-51b+openssl to makefile.
  1171. 15 Jul 2005.
  1172.  
  1173. HTTP GET would fail if the URL contained any metacharacters, no matter how
  1174. much you quoted them.  Although it uses cmfld() to parse the (partial) URL,
  1175. it then uses cmofi() to get the output filename, which by default is the
  1176. "filename" from the URL, which might be something like "rankem.asp?id=1639".
  1177. cmofi() refuses to accept unquoted metacharacters in "filenames" and that's
  1178. what happens in this case if the output filename is not specified.  Worked
  1179. around this by disabling wildcard processing around HTTP GET using the new
  1180. "wildena" variable from June 15th.  ckuusr.c, 18 Jul 2005.
  1181.  
  1182. Fixed the June 16th fix to the pattern matcher.  I fixed a real problem, but
  1183. I made an unrelated optimization that introduced new ones.  ckclib.c,
  1184. 18 Jul 2005.
  1185.  
  1186. Added missing help text for \fb64encode() and \fb64decode().  ckuus2.c,
  1187. 18 Jul 2005.
  1188.  
  1189. Changed SET WILD OFF help text to warn that this setting prevents the
  1190. creation of backup files (later I'll have to see if something more useful
  1191. can be done about this).  ckuus2.c, 18 Jul 2005.
  1192.  
  1193. Built OK on Mac OS X 10.4.2 using macosx103 target (but with some
  1194. "signedness" warnings in ckcnet.c and ckcftp.c).  Built on Unixware 7.1.4
  1195. with uw7 target.  27-28 Jul 2005. 
  1196.  
  1197. Added -DCKHTTP to Mac OS X 10.3-.4 KFLAGS.  Makefile, 4 Aug 2005.
  1198.  
  1199. Built on BSDI 4.3.1.  Added -DCKHTTP.  
  1200.  
  1201. Compact substring notation extended to accept not only start:length but also
  1202. start-end notation.  Thus \s(foo[12:18]) means the substring of foo starting
  1203. at position 12 of length 18, and tne new \s(foo[12-18]) means the substring
  1204. of foo starting at position 12 and ending with position 18.  Ditto for
  1205. \:(\%a), etc.  ckuus4.c, 9 Aug 2005.
  1206.  
  1207. See correspondence with Mark Sapiro, Nov 2003 and Sep 2004, about certain
  1208. variations on IF syntax having been broken by the introduction of "immediate
  1209. macros" circa 1999.  It seems the problem -- variables not being expanded --
  1210. always occurs in the ELSE part when (a) the IF condition is false; (b) the
  1211. ELSE command is "standalone", i.e. expressed as a separate command after the
  1212. IF command (original C-Kermit 5A syntax), and (c) its command list is a block.
  1213. This would suggest the problem is in the XXELS parser.
  1214.  
  1215. Going back to 1999, I find this:
  1216.   Fixed a problem Jim Whitby noticed with quoting in ELSE statements.  This
  1217.   problem was introduced when I unified IF and XIF, and occurs only when
  1218.   ELSE begins on a line, followed by a { command list } rather than a single
  1219.   command.  The solution (gross) was to make a special version of pushcmd()
  1220.   (called pushqcmd()) for this situation, which doubles backslashes while
  1221.   copying, BUT ONLY IF it's a command list (i.e. starts with "{"); otherwise
  1222.   we break lots of other stuff.  Result passes Jim's test and still passes
  1223.   ckedemo.ksc and iftest.ksc.  ckucmd.c, ckuus6.c, 27 Sep 99.
  1224.  
  1225. I undid this change and it made no difference to all the other IF
  1226. constructions (in fact, it fixed an urelated one that was broken, so now
  1227. iftest scores 54 out of 54, instead of 53).  However, it does not fix the
  1228. ELSE problem; in fact it pushes it all the way in the other direction:
  1229.  
  1230.   The opposite occurs any time you try to execute an immediate macro inside a
  1231.   macro or any other { block }: not only is the variable evaluated, it is
  1232.   evaluated into nothing.  It looks like this happens only in immediate
  1233.   macros, i.e. *commands* that start with '{'.  So maybe we really have two
  1234.   isolated problems, that can each be fixed.
  1235.  
  1236. The situation is illustrated by this simple script:
  1237.  
  1238.   def xx {
  1239.       if false { echo \%1, echo \%2 }
  1240.       else { echo \%3, echo \%4 }
  1241.   }
  1242.   xx one two three four
  1243.  
  1244. With pushqcmd() it echoes the variable names literally; with pushcmd() it 
  1245. echoes empty lines.  Since ELSE, when its argument is a block, dispatches
  1246. to the immediate-macro handler, it seems we have unified the two problems,
  1247. so fixing one should fix the other.
  1248.  
  1249. The problem is that we define a new temporary macro and then call dodo() to
  1250. execute it.  But if the definition contains macro arguments, we have added a
  1251. new level of macro invocation, thus wiping out the current level of args.
  1252. The cure is to expand the variables in the immediate macro in the current
  1253. context, before executing it.  This means simply changing the cmtxt() call
  1254. that reads the immediate macro to specify xxsting as its processing
  1255. function, rather than NULL, which is used for real macros to defer their
  1256. argument evaluation until after the macro entered.  ckuusr.c, 11 Aug 2005.
  1257.  
  1258. Added a new makefile target, macosx10.4, for Mac OS X 10.4.  This one uses
  1259. an undocumented trick to get the otherwise unavailable-except-by-clicking
  1260. Mac OS X version number (in this case 10.4.2) and stuff it into the HERALD
  1261. string.  makefile, 11 Aug 2005.
  1262.  
  1263. Built OK on Solaris 9, Solaris 10 (with a few implicit declaration warnings
  1264. in ckuusx.c), Mac OS X 10.4.2 (with some warnings in ckcnet.c and ckcftp.c),
  1265. Mac OS X 10.3.9 (also using the macos10.4 entry, which gets the right
  1266. version number, and gets no warnings at all), RH Enterprise Linux AS4 on AMD
  1267. x86_64, Tru64 Unix 4.0F, SCO UnixWare 7.1.4
  1268.  
  1269. For docs and/or scriptlib:  Unix C-Kermit can be a stdin/out filter.  The
  1270. trick is to use the ASK, ASKQ, or GETC command for input, specifying no
  1271. prompt, and ECHO or XECHO for output, e.g.:
  1272.  
  1273. while true {
  1274.     ask line
  1275.     if fail exit 0
  1276.     echo \freverse(\m(line))
  1277. }
  1278. exit 0
  1279.  
  1280. FOPEN didn't do anything with the channel number if the open failed, so any
  1281. subsequent command that tried to reference it would get a parse error it was
  1282. undefined or non-numeric, not very helpful.  Changed FOPEN to set the
  1283. channel number to -1 if the file can't be opened.  Now subsequent operations
  1284. on the channel fail with "Channel -1: File not open".  I also added two
  1285. magic channel numbers: -8 means that any FILE command (besides OPEN and
  1286. STATUS) on that channel is a noop that succeeds silently; -9 is a noop that
  1287. fails silently.  So now it's possible to simply set a channel number to one
  1288. of these values to disable i/o to certain file without getting lots of error
  1289. messages.  dofile(): ckuus7.c, 12 Aug 2005.
  1290.  
  1291. Added automatic herald construction for UnixWare 7.  makefile, 12 Aug 2005.
  1292.  
  1293. Unix isdir() never allowed for arguments that started with tilde, so gave
  1294. incorrect results for ~/tmp/ or ~fdc.  The problem was mainly invisible
  1295. since most commands that parsed file or directory names used cmifi(), cmdir(),
  1296. etc, which did the conversions themselves.  But IF DIRECTORY was an exception,
  1297. since its operand had to be treated as just text, and then tested after it
  1298. was parsed.  ckufio.c, 13 Aug 2005.
  1299.  
  1300. Fixed the following:
  1301. "ckuusx.c", line 8959: warning: implicit function declaration: ckgetpeer
  1302. "ckufio.c", line 1869: warning: implicit function declaration: ttwait
  1303. "ckufio.c", line 2941: warning: implicit function declaration: mlook
  1304. "ckufio.c", line 2943: warning: implicit function declaration: dodo
  1305. "ckufio.c", line 2944: warning: implicit function declaration: parser
  1306. "ckcftp.c", line 2625: warning: implicit function declaration: delta2sec
  1307. "ckcftp.c", line 4071: warning: no explicit type given for parameter: prm
  1308. "ckcftp.c", line 8389: warning: no explicit type given for parameter: brief
  1309. ckuusx.c, ckufio.c, ckcftp.c, ckucmd.h.  13 Aug 2005.
  1310.  
  1311. Unbuffered stdout code has never worked because the setbuf(stdout,NULL) call
  1312. has to occur before the stdout has been used.  The reason it's needed is
  1313. that some Kermit code writes to stderr (which is unbuffered) and other code
  1314. writes to stdout, and therefore typescripts can come out jumbled.  Robert
  1315. Simmons <robertls@nortel.com> provided the needed clue when he insisted it
  1316. worked only when executed at the very beginning of main().  So I moved the
  1317. code to that spot.  But since now we also want to make unbuffered a runtime
  1318. (command-line) option, I had to do a clunky by-hand pre-prescan inline in
  1319. main() to look thru argv[], even before prescan() was called.  ckcmai.c,
  1320. ckutio.c, ckuusy.c, 13 Aug 2005.  (Now that this works, it might be a good
  1321. idea to remove all use of stderr from Kermit.)
  1322.  
  1323. Managed, after some finagling, to build a 64-bit version on Solaris 10 at
  1324. Utah Math with Sun cc.  (Can't make any gcc builds at all, 32- or 64-bit,
  1325. they all blow up in <sys/siginfo.h>.)  New target: solaris10_64.  makefile,
  1326. 15 Aug 2005.
  1327.  
  1328. The 64-bit Solaris 10 version compiles and links OK and transfers files in
  1329. remote mode.  It can make FTP connections and use them, but Telnet connections
  1330. always fail with "network unreachable".  This is with all default libs and
  1331. include files.  Nelson has a separate set in /usr/local, which he references
  1332. explicitly in all his 64-bit builds, but using these makes no difference.
  1333. Some data type is wrong in ckcnet.c.  But telnet works fine in 64-bit Linux
  1334. and Tru64 builds.  Debug logs trace the difference to netopen() (of course),
  1335. the spot where we test the results of inet_addr(), which is already marked
  1336. suspicious for 64-bit builds.  It seems that inet_addr() is of type in_addr_t,
  1337. which in turn is u_int32, i.e. an unsigned 32-bit int.  Yet the man page says
  1338. that failure is indicated by returning -1.  I guess this doesn't matter in
  1339. 32-bit builds, but in the 64-bit world, the test for failure didn't work
  1340. right.  I made a Solaris-specific workaround, and checked that it works in
  1341. both 32-bit and 64-builds.  I really hate typedefs.  ckcnet.c, 15 Aug 2005.
  1342.  
  1343. Changed the plain-text version (as opposed to the popup or GUI version - the
  1344. GUI version, at least, already does this) of ASKQ to echo keystrokes
  1345. asterisks rather than simply not echo anything, so it's easier to see what
  1346. you're doing, the effects of editing, etc.  Experimental; for now, there's
  1347. no way to disable this.  Not sure if there needs to be.  Anyway, to get this
  1348. working required a fair amount of cleaning up of gtword(), which was echoing
  1349. different ways in different places.  ckuus6.c, ckucmd.c, 15 Aug 2005.
  1350.  
  1351. Added a solaris9_64 target for building a 64-bit version on Solaris 9 with
  1352. Sun cc.  Verified, using the DIR command and \fsize() function on a 4.4GB
  1353. file, that the Solaris 64-bit version of Kermit gets the size correctly, and
  1354. that it can copy such a file (thus its fopen/fread/fwrite/fclose interface
  1355. works right).  Initiated a large-file transfer between here and Utah over
  1356. SSH and verified that it puts the correct file size in the A packet when
  1357. sending; the right quantites are shown on the file transfer display (file
  1358. size CPS, percent done, etc).  But even at 5Mb/sec, it takes a good while to
  1359. transfer 4.4GB, more than 2 hours (not streaming; 30 window slots, 4K
  1360. packets, maybe it would go faster with streaming)...  After an hour or so,
  1361. it filled up the partition and gave up (gracefully) before it reached the
  1362. 2GB frontier (drained its pending packets, closed the partial file).
  1363. Restarted at 12:54, this time with streaming and 8K packets (the speed
  1364. wasn't significantly different).  This time it transferred 95% of the file
  1365. (4187660288 bytes) before failing because the disk filled up.  Went to Utah
  1366. and started a transfer between two Solaris 10/Sparc hosts; this goes about 8
  1367. times faster.  The transfer completed successfully after 17m41s.  All fields
  1368. in the f.t. display looked right the whole time.  Then I verified various
  1369. other 64-bit combinations transferring the same 4.4GB file:
  1370.  
  1371.         To................
  1372.   From  Sol  Amd  i64  Tru      
  1373.   Sol   OK   OK   OK   OK      Sol = Solaris 10 / Sparc
  1374.   Amd   OK                     Amd = AMD x86_64 RH Enterprise Linux AS4
  1375.   i64   OK                     i64 = Intel IA64, RH 2.1AS
  1376.   Tru                          Tru = Tru64 Unix 4.0F Alpha
  1377.  
  1378. (The other combinations are difficult to test for logistical reasons.)
  1379.  
  1380. Tried sending the same long file with Kermit's FTP client.  It chugged along
  1381. for a while until I stopped it; it would have taken hours to complete.
  1382. There is no indication that it wouldn't have worked, assuming the FTP server
  1383. could also handle long files, which who knows.  Anyway, Kermit showed all
  1384. the right data on the display screen.  17 Aug 2005.
  1385.  
  1386. On AMD x86_64 and IA64 native 64-bit Linux builds, the pty routines did not
  1387. work at all.  ptsname() dumped core.  If I commented out ptsname(), then the
  1388. next thing dumped core.  The same code works on the other 64-bit builds.
  1389. Poking around, I see that this version of Linux has an openpty() function,
  1390. which I could try using instead of the current API -- grantpty(), etc.  Then
  1391. I see that openpty() is already coded into Kermit's pty module,
  1392. conditionalized under HAVE_OPENPTY, which has never before been defined for
  1393. any build.  I added a test to the makefile linux target (look for the
  1394. openpty() prototype in <pty.h>, if found define HAVE_OPENPTY as a CFLAG and
  1395. also add -lutil to LNKFLAGS).  Works fine on the problem builds, and also
  1396. on previously working 32-bit builds.  makefile, 17 Aug 2005.
  1397.  
  1398. Fixed a bug in the ASKQ echo asterisks code, which made the VMS version of
  1399. C-Kermit always echo asterisks.  Turns out that some code in the main parse
  1400. loop to reset command-specific flags was in the wrong place, which had other
  1401. effects too, for example ASKQ temporarily turns off debug logging as a
  1402. security measure, but the code to turn it back on was skipped in most cases.
  1403. Some other side effects related to the DIRECTORY and CD commands might have
  1404. been possible but I haven't seen them.  ckuus[56].c, 23 Aug 2005.
  1405.  
  1406. Problem reported when sending a file to VMS when the name in the F packet
  1407. starts with a device specification and does not include a directory field,
  1408. and PATHNAMES are RELATIVE.  Example: dsk:foo.bar becomes f_oo.bar.  The
  1409. code assumes that if there is a device field, it is followed by a directory
  1410. field, and it inserts a dot after the '[', which in this case is not there.
  1411. Later the dot becomes '_' because of the only-one-dot rule.  Solution: only
  1412. insert the dot if there really is an opening bracket.  nzrtol(): ckvfio.c,
  1413. 23 Aug 2005.
  1414.  
  1415. A report on the newsgroup complains that C-Kermit and K95 servers were
  1416. sending REMOTE DIR listings with only #J line terminators, rather than #M#J.
  1417. Yet all the other REMOTE xxx responses arrived with #M#J.  snddir() was
  1418. neglecting to switch to text mode.  ckcfns.c, 26 Aug 2005.
  1419.  
  1420. Back to long files.  What happens if 32-bit Kermit is sent a long file?
  1421. It gets an A-packet that looks like this:
  1422.  
  1423.   ^A_"A."U1""B8#120050815 18:28:03!'42920641*4395073536,#775-!7@ )CP
  1424.  
  1425. The 32-bit receiver reacts like so:
  1426.  
  1427.   gattr length[4395073536]=100106240
  1428.  
  1429. the first number being the string from the A-packet, the second being the
  1430. value of the long int it was converted to by atol().  Clearly not equal in
  1431. this case.  When this happens Kermit should reject the file instead of
  1432. accepting it and then getting a horrible error a long time later.  Added
  1433. code to gattr() to convert the result of atol() back to a string and compare
  1434. it with the original string; if they're not equal, reject the file on the
  1435. assumption that the only reason this could happen is overflow.  Also some
  1436. other code in case the sender sends the only LENGTHK attribute.  Now files
  1437. whose lengths are too big for a long int are rejected right away, provided
  1438. the sender sends the length in an A packet ahead of the file itself.  If
  1439. this new code should ever cause a problem, it can be bypassed with SET
  1440. ATTRIBUTE LENGTH OFF.  ckcfn3.c, 26 Aug 2005.
  1441.  
  1442. As I recall from when I was testing this a few weeks ago, when the too-big
  1443. length is not caught at A-packet time, the transfer fails more or less
  1444. gracefully when the first attempt is made to write past the limit.  I went
  1445. to doublecheck this by sending a big file from the 64-bit Solaris10 version
  1446. to a 32-bit Mac OS X version that does not have today's code.  The Mac
  1447. thinks the incoming file is 2GB long when it's really 4GB+.  But in this
  1448. case, something new happens!  Although the percent done and transfer rate go
  1449. negative, the file keeps coming.  It would seem that Mac OS X lets us create
  1450. long files without using any special APIs.  The transfer runs to completion.
  1451. Mac OS X Kermit says SUCCESS (but gets the byte count and cps wrong, of
  1452. course).  But then a STATUS command says FAILURE.  The file was, however,
  1453. transferred successfully; it is exactly the same length and compares byte
  1454. for byte with the original.  This tells me that in the Mac OS X version --
  1455. and how many others like it??? -- today's rejection code should not be
  1456. enabled.  Meanwhile I put today's new code in #ifndef NOCHECKOVERFLOW..#endif,
  1457. and defined this symbol in the Mac OS X 10.4 target.  Over time, I'll have
  1458. to find out what other platforms have this characteristic.  And of course
  1459. I'll also have to do something about file-transfer display, statistics, and
  1460. status.  makefile, ckcfn3.c, 26 Aug 2005.
  1461.  
  1462. From now on I'm going to bump the Dev.xx number each time I upload a new
  1463. ckdaily.  This one will be Dev.02.  ckckmai.c, 26 Aug 2005.
  1464.  
  1465. Got rid of all the extraneous FreeBSD 4 and 5 build targets.  Now there's
  1466. one (freebsd) for all FreeBSD 4.1 and later.  makefile, 27 Aug 2005.
  1467.  
  1468. Mac OS X 10.4 (Tiger) is a 64-bit OS.  Building C-Kermit 0n 10.4.2 without
  1469. any special switches stilll gives a 32-bit executable.  Ditto building with
  1470. -mpowerpc64.  Further investigation turned up a tip sheet on MySQL that says
  1471. you have to include all of these: -mpowerpc64 -mcpu=G5 -mtune=G5 -arch
  1472. ppc64.  That did the trick.  New makefile target: macosx10.4_64.  But the
  1473. 10.4.2 system I tried did not have 64-bit [n]curses or resolv libs, so this
  1474. build has no -DNOCURSES -DNO_DNS_SRV.  makefile, 27 Aug 2005.
  1475.  
  1476. Created a symbol CK_64BIT to indicate true 64-bit builds at compile time.
  1477. Added 64-bit announcement to the startup herald and the VERSION text.
  1478. ckcdeb.h, ckuus[r5].c, 27 Aug 2005.
  1479.  
  1480. Added a built-in variable \v(bits) to indicate the size of the build
  1481. (16, 32, 64, or whatever else sizeof() might report).  ckuusr.h, ckuus4.c,
  1482. 27 Aug 2005.
  1483.  
  1484. Got rid of all the warnings in 64-bit Mac OS X about args to getsockopt(),
  1485. getsockname(), and getpeername(), and the comparisons on the return value
  1486. of inet_addr().  ckcnet.[ch], 27 Aug 2005.
  1487.  
  1488. Now to check the effects on other builds...
  1489.   Linux on AMD64: ok.
  1490.   Linux on IA64: ok.
  1491.   Linux on i386: ok.
  1492.   Mac OS X 10.3.9 32-bit: ok.
  1493.   Solaris 10 64-bit: ok.
  1494.   Solaris 9 32-bit: ok.
  1495.   Tru64 4.0F: ok.
  1496.   FreeBSD 4.11: ok.
  1497.   FreeBSD 5.4 ia64 (64-bit): ok.
  1498.   FreeBSD 5.4 i386 (32-bit): ok.
  1499.  
  1500. The Tru64 5.1B build totally blew up because they have their own unique
  1501. sockopt/etc length-argument data type (int!), so I had to roll back on using
  1502. socklen_t for this in all 64-bit builds.  Checked to make sure it still
  1503. builds on Tru64 4.0F after this change (it does).  ckcnet.h, 27 Aug 2005.
  1504.  
  1505. The HP-UX 11i/ia64 build comes out to be 32-bit but thinks it's 64-bit.
  1506. CK_64BIT is set because __ia64 is defined.  So how do I actually make a
  1507. 64-bit HP-UX build?  I tried adding +DD64 to CFLAGS, and this generates
  1508. 64-bit object files but linking fails to find the needed 64-bit libs
  1509. (e.g. -lm).  For now I added an exception for HPUX to the CK_64BIT
  1510. definition section.  ckcdeb.h, 27 Aug 2005.
  1511.  
  1512. Took the time to verify my recollection about the "graceful failure" on a
  1513. regular Pentium Linux system when receiving a too-big file...  OK, it's not
  1514. exactly graceful.  It gets a "File size limit exceeded" error; the message
  1515. is printed in the middle of the file-transfer display, apparently not by
  1516. Kermit, and Kermit exits immediately.  Looks like a trap...  Yup.  "File
  1517. size limit exceeded" is SIGXFSZ (25).  What happens if we set it to SIG_IGN?
  1518. Just the right thing: The receiver gets "Error writing data" at 2147483647
  1519. bytes, sends E-packet to sender with this message, and recovers with total
  1520. grace (drains packet buffers, returns to prompt).  ckutio.c, 27 Aug 2005.
  1521.  
  1522. Backed off from rejecting a file because its announced size overflows a
  1523. long.  Now instead, I set the file size to -2 (a negative size means the
  1524. size is unknown, but we have always used -1 for this; -2 means "unknown and
  1525. probably too big").  In this case, the f-t display says:
  1526.  
  1527.   File Size: POSSIBLY EXCEEDS LOCAL FILE SIZE LIMIT
  1528.  
  1529. then the user can interrupt it with X or whatever, or can let it run and
  1530. see if maybe (as in the case of Mac OS X) it will be accepted anyway.  This
  1531. way, we skip all the bogus calculations of percent done, time remaining, etc.
  1532. ckcfn3.c, ckuusx.c, 27 Aug 2005.
  1533.  
  1534. Discovered that VMS C-Kermit on Alpha and IA64 is a 32-bit application;
  1535. sizeof(long) == sizeof(char *) == 4.  Tried adding /POINTER_SIZE=64 to VMS
  1536. DECC builds on Alpha and IA64, but the results aren't great.  Tons of
  1537. warnings about pointer size mismatches between Kermit pointers and RMS ones,
  1538. and the executable doesn't run.  It appears that access to long files
  1539. would require a lot of hacking, similar to what's needed for 32-bit Linux.
  1540.  
  1541. --- Dev.02: 27 Aug 2005 ---
  1542.  
  1543. From Jeff, 28 Aug 2005.
  1544.  . Fix SSH GLOBAL-KNOWN-HOSTS-FILE / USER-KNOWN-HOSTS-FILE parsing, ckuus3.c.
  1545.  . Pick up K95STARTFLAGS from environment, ckuus4.c.
  1546.  . Fix some typos in command-line processing (-q), ckuus4.c.
  1547.  . Be sure to suppress herald if started with -q, ckuus7.c.
  1548.  . Fix ssh command-line switches, ckuusy.c.
  1549.  
  1550. Eric Smutz complained that HTTP POST was adding an extraneous blank line,
  1551. which prevented his application from successfully posting.  RFC 2616 states
  1552. (in Section 4.1):
  1553.  
  1554.    In the interest of robustness, servers SHOULD ignore any empty
  1555.    line(s) received where a Request-Line is expected. In other words, if
  1556.    the server is reading the protocol stream at the beginning of a
  1557.    message and receives a CRLF first, it should ignore the CRLF.
  1558.  
  1559.    Certain buggy HTTP/1.0 client implementations generate extra CRLF's
  1560.    after a POST request. To restate what is explicitly forbidden by the
  1561.    BNF, an HTTP/1.1 client MUST NOT preface or follow a request with an
  1562.    extra CRLF.
  1563.  
  1564. This seems pretty clear.  One section of code in http_post() (just above the
  1565. postopen: label) was appending a CRLF to a buffer whose last already was
  1566. terminated by CRLF, and then appended a second CRLF; thus two empty lines.
  1567. I removed the second one.  ckcnet.c, 28 Aug 2005.
  1568.  
  1569. I looked into the 64-bitness of NetBSD, it seems to be like Linux and
  1570. FreeBSD on 64-bit hardware, i.e. you just build it there and it works, at
  1571. least on Alpha and AMD64, going back to NetBSD 1.4 or 1.5.  But I don't have
  1572. access to any of these for verification and documentation on the Web is
  1573. scanty.
  1574.  
  1575. Checked PeterE's complaint again of warnings in ckutio.c about parameter
  1576. list of get[ug]id() and gete[ug]id().  When I "make hpux1100o" on HP-UX
  1577. 11.11 (PA-RISC), there are definitely no warnings.  He says the same thing
  1578. happens on 10.xx, but I don't have access to that any more.  I also did
  1579. "make hpux1100o" on HP-UX 11.23 (11i v2) (PA-RISC), also no warnings.
  1580. (Except in both cases, a warning about a comment within a comment in
  1581. /usr/include/sys/ptyio.h).  On HP-UX 11i v2 on Itanium, however, there are
  1582. TONS of warnings, mostly of the "variable set but never used" kind.  Also
  1583. "dollar sign used in identifier".  Tracking this last one down, I see it's
  1584. complaining about code that's in #ifdefs for other platforms, such as
  1585. Apollo Aegis.  Is "aegis" defined in HP-UX 11i v2/IA64?  No!  (It would show
  1586. up in SHOW FEATURES if it was.)  Some phase of the compiler is complaining
  1587. about code that it should be skipping (and that, in fact, it *is* skipping
  1588. it because the build is successful).  It's as if cc is running lint for me
  1589. but not telling lint which macros are defined and which are not.
  1590.  
  1591. Verified that 64-bit linking fails in the same way for HP-UX 11i v2 on both
  1592. IA64 and PA-RISC.  Sent a query to HP.
  1593.  
  1594. Compiling ckcnet.c and ckcftp.c got the familiar sockopt-related warnings on
  1595. HP-UX 11i v2; turns out it is just like Tru64 Unix in using an int for the
  1596. length argument.  Added another special case and the warnings went away.
  1597. ckcnet.h, 28 Aug 2005.
  1598.  
  1599. Added some stuff to SHOW FEATURES to see what kinds of macros are exposed
  1600. (e.g. INT_MAX, LONG_MAX, LLONG_MAX, etc) and also show sizeof(long long) and
  1601. sizeof(off_t).  Building this code all over the place will give me an idea
  1602. of how widespread these data types are, and to what extent I can tell
  1603. whether they are available from clues in the header files.  (At first
  1604. glance, it appears that I'm not picking up <limits.h>, but adding an
  1605. #include for it is just asking for trouble.)  No complaints about long long
  1606. or off_t from Solaris 9 or recent Linuxes.  ckuus5.c, 28 Aug 2005.
  1607.  
  1608. Fixed a warning in HP-UX 10 and 11 stemming from some old-style prototypes
  1609. in ckutio.c for get[re][gu]id().  ckutio.c, 29 Aug 2005.
  1610.  
  1611. Updated minix3 target from Andy Tanenbaum.  makefile, 29 Aug 2005.
  1612.  
  1613. PeterE confirms that "long long" and off_t are available in all HP-UX 10 and
  1614. 11, and in HP-UX 9 on PA-RISC but not Motorola.  30 Aug 2005.
  1615.  
  1616. Got 64-bit builds to work on HP-UX.  According to my notes, John Bigg of HP
  1617. said (in 1999) that HP-UX 10.30 and later require PA-RISC 1.1, and do not
  1618. work on PA-RISC 1.0.  But is PA 1.0 64-bit or what?  Today, Alex McKale of
  1619. HP said "The 64-bit binaries will work on all machines that have the same or
  1620. later release of HP-UX (excluding PA-RISC 1.1 machines)".  Still need
  1621. clarification...  Maybe it's that all IA64 builds can be 64-bit but I need
  1622. dual builds for PA-RISC.  Meanwhile I started transfer of a 4GB+ file from
  1623. Solaris to HP-UX 11i but it exceeded some quota on the HP long before it
  1624. approached the 2G point.  It failed cleanly and up until then it was working
  1625. fine (numbers, stats, etc).  30 Aug 2005.
  1626.  
  1627. Support of large files in 32-bit builds began in 10.20.  64-bit application
  1628. support began in 11.00, but not all machines that run 11.00 support 64 bits.
  1629. About long files, see HP /usr/share/doc/lg_files.txt.
  1630.  
  1631. PeterE found that certain patterns can still make Kermit loop; example:
  1632.  
  1633.   if match T01011-00856-21-632-073 *[abc] { echo GOOD } else { echo BAD }
  1634.   if match T01011-00856-21-632-073 *[a-z] { echo GOOD } else { echo BAD }
  1635.  
  1636. The minimum offending pattern is * followed immediately by an [xxx]
  1637. construction, followed by anything else, including nothing.  Previous
  1638. versions of Kermit handled this one correctly, without looping (but failed
  1639. certain matches that should have succeeded).  The new section of code I
  1640. added on 15 June, upon failure to match, advances the string pointer and
  1641. backs up the pattern to the previous pattern, and starts again
  1642. (recursively).  However, there needed to be a corresponding check at entry
  1643. for an empty target string.  ckmatch(): ckclib.c, 12 Sep 2005.
  1644.  
  1645. PeterE discovered that "kermit -y filethatdoesnotexit" gives an erroneous
  1646. error message that names the user's customization, rather than the name
  1647. given on the command line.  doinit(): ckuus5.c, 12 Sep 2005.
  1648.  
  1649. FREAD does not get an error if it tries to read a record or file or piece of
  1650. file that is too big for its buffer.  In particular, FREAD /SIZE:xxx seems
  1651. to succeed even if less than xxx was read.  It should fail unless, perhaps,
  1652. it successfully read up to the end of the file.  Furthermore, if xxx is
  1653. bigger than the file buffer size, it should complain.  The buffer is
  1654. line[LINBUFSIZ], 32K.  The lack of failure was due to code in dofile() that
  1655. adjusted the given size silently if it was greater than the buffer size,
  1656. which I removed, and also added a check when parsing the /SIZE: switch.
  1657. dofile(): ckuus7.c, 12 Sep 2005.
  1658.  
  1659. That still didn't help with FREAD /SIZE:n returning less than n bytes, even
  1660. when they were available.  That's because the underlying routine, z_in(),
  1661. didn't check fread()'s return code, which is the number of bytes read.
  1662. If fread() has smaller buffers, it needs to be called in a loop.  z_in():
  1663. ckuus7.c, 12 Sep 2005.
  1664.  
  1665. Flen() fails on strings of length 8192 or more.  The limitation is in the
  1666. callers of zzstring, which seem to be specifying an 8K buffer, in this case
  1667. fneval().  The operable symbols are FNVALL (max length of value returned by
  1668. a function) and MAXARGLEN (maximum length of an argument to a function).  I
  1669. changed both of these for BIGBUFOK builds to be CMDBL.  Buffers can never be
  1670. infinite, there has to be a limit.  It's important to make everything work
  1671. consistently within that limit, and to make something useful happen when the
  1672. limit is exceeded.  At this point, I can probably also increase the limits
  1673. for modern 32-bit systems, and certainly for 64-bit ones.  Also there's no
  1674. point in worrying about 16-bit platforms any more; earlier C-Kermit versions
  1675. can still be used on them if necessary. ckuusr.h, 12 Sep 2005.
  1676.  
  1677. Special #ifdefs for finding resolv.h and nameser.h in MINIX3 from Andy
  1678. Tanenbaum.  ckcnet.c, 20 Sep 2005.
  1679.  
  1680. PeterE noticed that ckmatch(), even though it works pretty well now, does a
  1681. lot of extra and unnecessary recursion after determining the string and
  1682. pattern do not match, at least when the pattern is of the form *[abc].
  1683. After several false starts I was able reduce this effect to a minor level
  1684. (but not eliminate it all together) by changing a while loop into a do loop.
  1685. ckmatch(): ckclib.c, 15 Oct 2005.
  1686.  
  1687. Added -DNOLONGLONG to HP-UX 8.00 and earlier builds, and to Motorola-based
  1688. HP-UX 9.00 builds.  This is simply to inhibit the test for whether "long
  1689. long" is supported by the compiler, since when it isn't, the module
  1690. containing the test won't compile.  makefile, ckuus5.c, 16 Oct 2005.
  1691.  
  1692. Making ASKQ always echo askterisks is a bad idea, because when it doesn't
  1693. echo, it's the perfect way to read silently from stdin, e.g. in a CGI script
  1694. (INPUT can also be used for this but it's not as straightforward).  So I put
  1695. the default for ASKQ back to no echoing, then gave ASKQ its own switch
  1696. table, which is the same as for ASK with the addition of an /ECHO:x switch,
  1697. which tells what character to echo.  ckucmd.c, ckuus[26].c, 17 Oct 2005.
  1698.  
  1699. Fixed a bug in FTP GET /COMMAND filename commandname; it always dumped core
  1700. dereferencing a null string (the nonexistent local asname).  ckcftp.c,
  1701. 17 Oct 2005.
  1702.  
  1703. For docs: if you don't like the funny business that happens when you type
  1704. an IF command at the prompt, use XIF instead and it won't happen.  Also note
  1705. that commands like "if xxx { echo blah } else { echo blah blah }" don't
  1706. work when typed at the prompt; you have to use XIF for this. 
  1707.  
  1708. Back to ckmatch()...  Under certain conditions (e.g. patterns like *[abc])
  1709. failure to match would not stop the recursion because the string and pattern
  1710. arguments are on the stack, as they must be, so there was no way for level
  1711. n-1 to know that level n had detected a definitive nonmatch and that no
  1712. further attempts at matching were required.  The right way to handle this is
  1713. to recode the whole thing as coroutines, the cheap way out is with a global
  1714. static flag.  Works perfectly, in the sense that the match.ksc test results
  1715. are identical to what they were before and the extra backing up and
  1716. recursion are eliminated.  (The Oct 15th fix wasn't really a fix, it broke
  1717. a couple of cases.)  ckclib.c, 20 Oct 2005.
  1718.  
  1719. ckuus7.c(2987): warning #267: the format string requires additional arguments
  1720. (in PURGE command); fixed 20 Oct 2005.
  1721.  
  1722. From Andy Tanenbaum, final changes for MINIX3: #ifdef out the inline
  1723. definitions for gettimeofday() and readlink().  ckutio.c, 23 Oct 2005.
  1724.  
  1725. From Jeff: struct gss_trials initializers changed from gss_mech_krb5 to
  1726. ck_gss_mech_krb5.  ckcftp.c, 23 Oct 2005.
  1727.  
  1728. From Jeff: some improvements to K95 GUI SHOW TERMINAL.  ckuus5.c, 23 Oct 2005.
  1729.  
  1730. Found and corrected some misplaced #ifdefs in shofeat(), ckuus5.c, 23 Oct 2005.
  1731.  
  1732. --- Dev.03 ---
  1733.  
  1734. Fixed a compiler warning in a debug() statement in zzstring() by adding
  1735. parens.  ckuus4.c, 24 Oct 2005.
  1736.  
  1737. Added -DNOLONGLONG to sv68r3v6 target, makefile, 25 Oct 2005.
  1738.  
  1739. New makefile targets for HP-UX from PeterE to handle the 'long long'
  1740. situation.   26 Oct 2005.
  1741.  
  1742. From Jeff: changes to support OpenSSL 0.9.8, ck_ssl.h.  ckcasc.h has had
  1743. short names defined for ASCII control characters for 20-some years but now
  1744. they are causing conflicts, so EM becomes XEM (also for OpenSSL 0.9.8).
  1745. Changed K95's default terminal type from VT320 to VT220 because VT320
  1746. termcaps/terminfos are disappearing from Unix hosts: ckuus7.c.  Reorganize
  1747. the data-types section of SHOW FEATURES to add more macro tests for integral
  1748. sizes and to provide for the proper printf formatting in order to allow the
  1749. sizes to be output ("You are going to need to be careful because %llx is not
  1750. supported on all platforms.  On Windows, it is the same as %lx, 32 bits"):
  1751. ckuus5.c, 26 Oct 2005.
  1752.  
  1753. Defined NOLONGLONG ckcdeb.h for various old platforms where we know we are
  1754. never going to need 64-bit ints (even if they support a long long datatype,
  1755. chances are pretty slim they supported 64-bit file sizes).  ckcdeb.h,
  1756. 26 Oct 2005.
  1757.  
  1758. PeterE noticed that GOTO targets can only be 50 characters long.  This was
  1759. by design, a long time ago, on the assumption that nobody would make longer
  1760. labels.  But in SWITCH statements, case labels can be variables that expand
  1761. to anything at all.  If we chop them off at 50, we might execute the wrong
  1762. case.  Changed the maximum label size to be 8K, and added code to dogoto()
  1763. to check when a label or target is too long and fail, to prevent spurious
  1764. GOTO or SWITCH results.  ckuusr.h, ckuus[r6].c, 26 Oct 2005.
  1765.  
  1766. Testing revealed there was still a problem with SWITCH case labels that were
  1767. variables that expanded into long strings.  Turns out that I was being
  1768. too clever when I decided that, if the SWITCH macro was n1 characters long
  1769. and the case-label search target was n2 characters long, I only had to
  1770. search the first n1-n2+1 characters of the macro definition.  That was true
  1771. before I allowed case labels to be variables, but not any more!  Fixed in
  1772. dogoto(): ckuus5.c, 26 Oct 2005.
  1773.  
  1774. --- Dev.04 ---
  1775.  
  1776. Dev.04 didn't actually contain Jeff's data-type changes to shofeat(),
  1777. I think I saved the wrong buffer in EMACS...  Fixed now.  27 Oct 2005.
  1778.  
  1779. PeterE corrected a typo in the HP-UX 7.00 makefile target.  27 Oct 2005.
  1780.  
  1781. PeterE had been reporting problems stress-testing the new SWITCH code, but
  1782. only on HP-UX 9, primarily stack overrun.  Turns out to be the HP-UX 9
  1783. optimizing compiler's fault.  No optimization, no problems.
  1784.  
  1785. PeterE found that even when dogoto() detects a string that is too long
  1786. and fails, this does not stop SWITCH from producing a result, which can not
  1787. possibly be trusted.  Changed the part of dogoto() that handles this to
  1788. not just fail, but also to exit the script immediately and return to top
  1789. level.  ckuus6.c, 28 Oct 2005.
  1790.  
  1791. An idea popped into my head after having typed too many commands like "dir
  1792. ck[cuw]*.[cwh]" to check the list of matching files, and then having to
  1793. retype the same filespec in a SEND command: Why not unleash some unused
  1794. control character such as Ctrl-K to spit out the most recently entered input
  1795. filespec?  It was easy, just a few lines in cmifi2() and gtword(), plus a
  1796. couple declarations.  To see all the changes, search for "lastfile" (all the
  1797. new code is protected by #ifndef NOLASTFILE).  ckucmd.c, 28 Oct 2005.
  1798.  
  1799. I added a new variable \v(lastfilespec) that expands to the same last
  1800. filespec, for use in scripts.  ckuusr.h, ckuus4.c, 28 Oct 2005.
  1801.  
  1802. The Unix version of C-Kermit failed to put anything in the session log if
  1803. SET TERMINAL DEBUG ON.  Rearranged the pertinent clause so logging happens
  1804. independent of TERMINAL DEBUG.  For now, since the user who noticed this
  1805. wanted debug format to go into the session log, that's what I do.  The
  1806. alternative would be to just log the raw incoming stream as usual, or to add
  1807. Yet Another SET Command to choose.  ckucns.c, 11 Nov 2005.
  1808.  
  1809. Fixed HELP INTRO text.  ckuus2.c, 11 Nov 2005.
  1810.  
  1811. Added NOLONGLONG for SV68.  ckcdeb.h, 11 Nov 2005.
  1812.  
  1813. --- Dev.05 ---
  1814.  
  1815. Added a debug() statement in FTP secure_getbyte() to see what's going on
  1816. with Muhamad Taufiq Tajuddin's 205-byte-per-second FTP/SSL downloads.
  1817.  
  1818. --- Dev.06 ---
  1819.  
  1820. Result: nothing, SSL_get_error() does not report any errors.  Suggested
  1821. testing SSL_read()'s return code, if 0 don't update the screen.
  1822.  
  1823. Created a new data type CK_OFF_T in ckcdeb.h that will eventually resolve
  1824. to whatever each platform uses for file sizes and offsets.  ckcdeb.h,
  1825. 17 Nov 2005.
  1826.  
  1827. Made a new library routine ckfstoa() that converts a file size or offset to
  1828. a string.  This is to solve the problem with having to use different
  1829. printf() formats for different representations of file size (int, long, long
  1830. long, off_t, signed, unsigned, etc).  Replaced a few printf("%l",size) with
  1831. printf("%s",ckfstoa(size)) with the expected results.  This is just a start,
  1832. the definitions will need adjustment for many platforms, variables need to
  1833. be redeclared, and all the offending printf's (and printw's) will have to
  1834. hunted down and converted.  ckclib.[ch], ckuus4.c, 17 Nov 2005.
  1835.  
  1836. Built a minimal version on Linux with:
  1837. make linux "KFLAGS=-DNOLOCAL -DNOICP -DNOCSETS -DNODEBUG"
  1838. Worked fine, result was 260K on i686.  21 Nov 2005.
  1839.  
  1840. Discovered that Kermit's date parser, contrary to the documentation, failed
  1841. to handle strings like "Wed, 13 Feb 2002 17:43:02 -0800 (PST)", which are
  1842. commonly found in email.  This was because of an overzealous and misguided
  1843. check in the code; once removed, all was well.  ckucmd.c, 26 Nov 2005.
  1844.  
  1845. Added a new format code 4 to \fcvtdate() to emit asctime() format, used in
  1846. BSD-format email message envelopes (i.e. the "From " line).  shuffledate(),
  1847. ckucmd.c, ckuus[24].c, 26 Nov 2005.
  1848.  
  1849. Added a new function \femailaddress().  Given a From: or Sender: header line
  1850. from an RFC2822-format email address, extracts and returns the actual email
  1851. address, such as kermit@columbia.edu.  ckuusr.h, ckuus[42].c, 26 Nov 2005.
  1852.  
  1853. Using the new functions, I wrote a script to fetch mail from a POP3 server
  1854. over a TLS connection.  But the line-at-a-time input (needed for changing
  1855. line terminators and byte-stuffing text lines that start with "From ") is
  1856. slow, 17 sec to read 29 messages totaling 175K.
  1857.  
  1858. Added INPUT /CLEAR so INPUT can be started with a clean buffer without
  1859. requiring a sepearate CLEAR INPUT command.  ckuusr.h, ckuus[r24].c,
  1860. 27 Nov 2005.
  1861.  
  1862. One thing that INPUT was never able to do well was read and save the
  1863. complete incoming data stream.  That's because, while waiting for its
  1864. target, the buffer might overflow wrap around.  Yet there was never a way to
  1865. tell it to stop when its buffer fills up and let me save it.  I added a
  1866. /NOWRAP switch that does this.  If the buffer fills up before any other
  1867. completion criterion is met, INPUT returns failure, but with \v(instatus)
  1868. set to 6 (the next available instatus value).  Thus a program that wants to
  1869. read and save (say) an email message from a POP server, which could be any
  1870. length at all, and which terminates with <CRLF>.<CRLF> could do this:
  1871.  
  1872.   set flag off
  1873.   while open connection {
  1874.       input /nowrap 10 \13\10.\13\10 # Wait for <CRLF>.<CRLF>
  1875.       if success {
  1876.           frwrite /string \%o {\freplace(\v(input),\13\10.\13\10,\13\10)}
  1877.           set flag on
  1878.           break
  1879.       } else if ( == \v(instatus) 6 || == \v(instatus) 1 ) {
  1880.           frwrite /string \%o {\v(input)}
  1881.           continue
  1882.       }
  1883.       break
  1884.   }
  1885.   if flag (handle success)
  1886.  
  1887. Note carefully the braces around the FWRITE text; without them, trailing
  1888. spaces would be lost.
  1889.  
  1890. Previously the only way to INPUT an entire data stream without losing
  1891. anything (assuming it was ordinary lines of text that were not "too long"),
  1892. was line-by-line:
  1893.  
  1894.   while open connection {
  1895.       input /clear 10 \13\10
  1896.       if fail break
  1897.       if eq "\v(input)" "$ \13\10" break
  1898.       fwrite /string \%o {\freplace(\v(input),\13\10,\10)}
  1899.   }
  1900.  
  1901. The new code is 3 times faster using the default INPUT buffer length of 4K.
  1902. Raising it to 16K makes it 3.6 times faster (not worth it).  Changing the
  1903. POP3 script to use INPUT /NOWRAP makes it about twice as fast (it does more;
  1904. it has to do all the byte-stuffing and unstuffing).  27 Nov 2005.
  1905.  
  1906. Changed ssl_display_xxx() to just return if SET QUIET ON.  Otherwise there
  1907. is no way to suppress the messages.  Also protected a previously unprotected
  1908. printf("[SSL - OK]\r\n"); by if ( ssl_verbose_flag ).  ck_ssl.c,
  1909. 28 Nov 2005.
  1910.  
  1911. Discovered that FOPEN /APPEND doesn't work if the file doesn't exist.  It
  1912. uses cmiofi() which is a super-hokey front end to cmifi2().  I had code to
  1913. call it but for some reason it was commented out, with a note to the effect
  1914. it didn't work.  I uncommented it but that didn't help much.  So I wrote an
  1915. entirely new cmiofi() that works exactly as it should, using chained FDBs,
  1916. _CMIFI to _CMOFI (I think the original cmiofi() predated chained FDBs).
  1917. ckuus7.c, ckucmd.c, 29 Nov 2005.
  1918.  
  1919. Getting rid of the awful hacks required to call cmiofi() meant I also had to
  1920. change the EDIT command, which is the only other place where it's used.
  1921. Unfortunately now it's no longer possible to give EDIT without a filename
  1922. (to just start an empty editor) but I doubt anyone will notice.  ckuusr.c,
  1923. 29 Nov 2005.
  1924.  
  1925. IF KERBANG didn't always work right.  If a kerbang script TAKEs another
  1926. kerbang script, the second one should have IF KERBANG false, but it didn't.
  1927. Added a check for \v(cmdlevel) == 1.  Now you can write a wrapper that runs
  1928. a kerbang script in a loop, and the latter can use IF KERBANG to know
  1929. whether to EXIT (if called at top level) or END (if called by another
  1930. script, thus allowing -- in this case -- the loop to continue).  ckuus6.c,
  1931. 29 Nov 2005.
  1932.  
  1933. Changed \flop() and flopx() functions to take a third argument, a number
  1934. signifying at which occurrence of the break character to lop, so:
  1935.  
  1936.   \flopx(sesame.cc.columbia.edu) = edu
  1937.   \flopx(sesame.cc.columbia.edu,,2) = columbia.edu
  1938.  
  1939. ckuus[24].c, 1 Dec 2005.
  1940.  
  1941. Built OK on VMS 7.2-1 with MultiNet 4.4.  Built with and without OpenSSL on
  1942. Linux OK, ditto Solaris 9.  Built OK on RH Linux AS4 on X86_64 (64-bit);
  1943. "show var fsize" (using new ckfstoa()) works OK there.  Also Mac OS X 10.3.9
  1944. (32-bit), Tru64 UNIX 4.0F (64-bit), HP-UX 11iv2 (64-bit) (picky new compiler
  1945. spews out tons of useless warnings), FreeBSD 6.0 on ia64 (64-bit).
  1946.  
  1947. --- Dev.07 ---
  1948.  
  1949. Changed "make netbsd" to be a synonym for "make netbsd2" because the
  1950. original netbsd target was ancient.  Renamed it to netbsd-old.  makefile,
  1951. 3 Dec 2005.
  1952.  
  1953. Updated INPUT and MINPUT help text.  ckuus2.c, 3 Dec 2005.
  1954.  
  1955. Discovered that on a SET PORT /SSL connection, Kermit treats incoming
  1956. 0xff data bytes (e.g. sent from the POP server) as IACs and goes into Telnet
  1957. negotiations.  Jeff says "You will need to implement NP_SSLRAW and NP_TLSRAW
  1958. that do the same as NP_TCPRAW but negotiate SSL or TLS as appropriate."
  1959. This was not as easy as it sounded, because apparently a lot of the Telnet
  1960. code is used by SSL and TLS even when Telnet protocol is not being executed.
  1961. I wound up doing this as follows: I added /SSL-RAW and /TLS-RAW to the
  1962. switch table.  Rather than disable Telnet, they do exactly what the /SSL and
  1963. /TLS switches do, but also set a special flag.  This flag is checked in only
  1964. two place: netclos() (to prevent Kermit from sending TELNET LOGOUT when
  1965. closing the connection), and tn_doop() (to prevent Kermit from reacting to
  1966. incoming IACs; it makes tn_doop() return(3), which means "quoted IAC", which
  1967. causes the caller to keep the IAC as data).  ckcnet.h, ckctel.h, ckctel.c,
  1968. ckuus7.c, 4 Dec 2005.
  1969.  
  1970. The INPUT command did not account for tn_doop() returning 3.  Fixed in
  1971. doinput(), ckuus4.c, 4 Dec 2005.
  1972.  
  1973. Added another debug() statement in FTP secure_getbyte() to see what's going on
  1974. with Muhamad Taufiq Tajuddin's 205-byte-per-second FTP/SSL downloads, plus
  1975. new code to test SSL_read()'s return code (byte count); if 0 don't update
  1976. the screen.  ckcftp.c, 4 Dec 2005.
  1977.  
  1978. --- Dev.08 ---
  1979.  
  1980. Fixed a typo in the non-ANSIC definition of ckfstoa().  ckclib.c, 7 Dec 2005.
  1981.  
  1982. Our Ctrl-C trap (the ON_CTRLC macro) wasn't working for kerbang files.
  1983. Rearranged some code to make it work.  ckcmai.c, 8 Dec 2005.
  1984.  
  1985. Started converting code to use CK_OFF_T for file sizes and offsets, and
  1986. all [s]printf's to replace "%ld" or whatever with "%s", and the size
  1987. variable with a call to ckfstoa().  Since I haven't actually changed the
  1988. definition of CK_OFF_T from what all the size variables were to begin
  1989. with (i.e. long), it shouldn't do any harm.  So far just ckcfn3.c
  1990. 10 Dec 2005.
  1991.  
  1992. An updated HP-UX 9.xx makefile target from PeterE to fix a core dump that
  1993. happens on that platform due to insufficient resources.  14 Dec 2005.
  1994.  
  1995. Added debug() statements to http_blah() routines to tell whether the
  1996. connection is "chunked".  There seems to be a bad performance problem.
  1997. ckcnet.c, 14 Dec 2005.
  1998.  
  1999. PeterE complained about ugly DIRECTORY error message, ?No files match -
  2000. "{blah}".  The braces are used internally in case the user typed more than
  2001. one filespec.  I changed the error message to remove them.  Ditto DELETE.
  2002. ckuus6.c, 15 Dec 2005.
  2003.  
  2004. The problem with HTTP downloads is that Kermit always does single-character
  2005. read() or socket_read() calls (or the SSL equivalent); see http_inc().  I
  2006. added buffering code for non-SSL connections only but it's gross because it
  2007. has to swap ttyfd and httpfd before calling nettchk().  I tried making a
  2008. nettchk() clone that accepts a file descriptor as an argument but it didn't
  2009. work because too many other routines that are invoked directly or implicitly
  2010. by nettchk() (such as in_chk()) are still hardwired to use ttyfd.  HTTP GETs
  2011. are now 20 times faster on the local network (the improvement is less
  2012. dramatic over a clogged Internet).  ckcnet.[ch], 15 Dec 2005.
  2013.  
  2014. --- Dev.09 ---
  2015.  
  2016. HTTP file-descriptor swapping is not thread safe.  Doing it right, of
  2017. course, is a big deal, so for now I just don't define HTTP_BUFFERING for
  2018. Windows.  ckcnet.c, 15 Dec 2005.
  2019.  
  2020. Noticed that HTTP not included in FreeBSD and OpenBSD builds.  Fixed in
  2021. ckcdeb.h, 22 Dec 2005.
  2022.  
  2023. Fleshed out 32/64-bit data type definitions and changed struct zattr
  2024. (file attribute structure) members length and lengthk to have the new
  2025. CK_OFF_T type.  Changed final arguments of debug() and tlog() to be the new
  2026. LONGLONG type.  ckcdeb.h, 22 Dec 2005.
  2027.  
  2028. Changed ckfstoa() to return a signed number in string form, rather than an
  2029. unsigned one.  That's because off_t is signed (thank goodness).  Added the
  2030. inverse function, ckatofs() so we can convert file sizes and offsets back
  2031. and forth between binary number and string.  ckclib.c, 22 Dec 2005.
  2032.  
  2033. Changed Attribute Packet reader to convert incoming file size attribute
  2034. with ckatofs() rather than atol().  ckcfn3.c, 22 Dec 2005.
  2035.  
  2036. Converted debug(), tlog(), ckscreen(), etc, to handle potentially "long long"
  2037. arguments by making their "n" argument CK_OFF_T.  ckuusx.c, ckcdeb.h,
  2038. 22 Dec 2005.
  2039.  
  2040. Converted the rest of the source files to use CK_OFF_T for all file size
  2041. and offset and byte-count related variables, and converted all references to
  2042. these variables in printfs to go through ckfstoa().  Then I built it on
  2043. Linux/i386 with:
  2044.  
  2045.   make linux "KFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
  2046.  
  2047. which makes off_t be 64 bits and magically makes all the regular file APIs
  2048. use 64-bit sizes and offsets without changing the API calls in the source
  2049. code.  It's going to be a lot of work to get through all the kinks but I was
  2050. able to send a long file, do directory listings of long files, do
  2051. \fsize(longfile), etc.  When it sends a file, the length is shown correctly
  2052. in the A packet.  If the receiver does not support big numbers, it receives
  2053. the file OK anyway, without showing the size, the thermometer, or percent
  2054. done (and then will get an error when the file keeps coming after the 2G
  2055. mark).  Kermit 95 actually refuses long files for "Size", but only if the
  2056. announced is less than 2^63 bytes.  When today's Linux version receives a
  2057. file, it shows the length correctly in the file-transfer display, as well as
  2058. percent done, thermometer, etc.  Also built this version on true 64-bit
  2059. Linux, and it worked fine.  Many files changed, 22 Dec 2005.
  2060.  
  2061. For the record, this API is specified in X/Open's Single UNIX Specification
  2062. Version 2, which is branded as UNIX 98.  It is called Large File Support, or
  2063. LFS, and was developed at the Large File Summit.
  2064.  
  2065. It looks like the operative feature-test macro in glibc for transitional
  2066. large file support is __USE_LARGEFILE64.  So if this is defined, we can also
  2067. supply _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64 automatically for 32-bit
  2068. Linux builds.  But there's a Catch-22, you don't know if this is defined
  2069. until you read the header files, but you have to define _LARGEFILE_SOURCE
  2070. and _FILE_OFFSET_BITS before you read the header files.  Maybe it's good
  2071. enough to grep through <features.h> for __USE_LARGEFILE64.  makefile,
  2072. 23 Dec 2005.
  2073.  
  2074. Checked this on true 64-bit Linux.  The same symbols are defined in CFLAGS,
  2075. but they do no harm; it builds without complaint and works fine.  24 Dec 2005.
  2076.  
  2077. Built it on Red Hat Linux 6.1 from 1999.  This picked up the long file
  2078. support too.  Guess 6.1 isn't old enough to not have it!  Kermit seems to
  2079. work OK on regular files but I don't have enough disk space to create a long
  2080. file, and my bigfile.c program (which creates a long file containing only 1
  2081. byte) doesn't work ("fseeko: invalid argument").  It looks like parts of
  2082. this API were visible in Linux before they were actually working.
  2083. 24 Dec 2005.
  2084.  
  2085. Converted all fseek() and ftell() to macros that expand to fseek() and ftell()
  2086. or fseeko() and ftello() depending on whether _LARGEFILE_SOURCE is defined.
  2087. ckufio.c, ckuus7.c, ckuusx.c, 24 Dec 2005.
  2088.  
  2089. Made a CK_OFF_T version of cmnum().  It would be a very big deal to just
  2090. change cmnum() to return a new type, so another idea is to rename cmnum() to
  2091. something else, cmnumw(), change its result argument to CK_OFF_T, and then
  2092. make a stub cmnum() to call it to get an int, then call cmnumw() explicitly
  2093. any time we need a big number.  ckucmd.c, 24 Dec 2005.
  2094.  
  2095. Calling cmnumw() directly requires changes to each routine that uses it.
  2096. The INCREMENT and DECREMENT commands, for example, required changes to
  2097. doincr(), varval(), and incvar(), and all references to them.  ckuusr.[ch],
  2098. ckuus[56].c, 24 Dec 2005.
  2099.  
  2100. Calling cmnumw() in chained FDBs required defining a new function code,
  2101. _CMNUW, adding a new member to the OFDB struct for returning wide results,
  2102. and adding a new case to cmfdb().  ckucmd.[ch], 24 Dec 2005.
  2103.  
  2104. Changed FSEEK and FCOUNT to use the new chained FDB interface, now we can
  2105. seek and look past 2GB.  ckuus7.c, 24 Dec 2005.
  2106.  
  2107. Next come switches, which store their results in a struct stringint.  This
  2108. struct was defined in each module where it was used (ckuus[r367].c, ckcftp.c).
  2109. I moved the definition to ckuusr.h and added a wval member, which can be
  2110. referenced by any switch-parsing code that calls cmnumw().  24 Dec 2005.
  2111.  
  2112. Changed SEND /CALIBRATE:n to allow big values of n.  This makes it possible
  2113. to test the protocol aspects of long-file transfer without actually having a
  2114. long file handy.  ckuusr.c, 24 Dec 2005.
  2115.  
  2116. SEND /SMALLER-THAN:n, SEND /LARGER-THAN:n, and and SEND /START:n also now
  2117. allow large values of n.  ckuusr.c, 24 Dec 2005.
  2118.  
  2119. Changed the algebraic expression evaluator to use wide values.
  2120. ckuus5.c, 24 Dec 2005.
  2121.  
  2122. Fixed ckfstoa() to handle the case when n is negative and (0 - n) is also
  2123. negative, which happens for numbers 2^(n-1) or greater, where n is the
  2124. number of bits in the word size we're dealing with, e.g. 64, in which case
  2125. 2^63 has its sign bit set so seems to be negative.  In such cases, ckfstoa()
  2126. returns "OVERFLOW" instead of a numeric string.  We'll have to see how this
  2127. plays out but I think it's better to cause a parse error and stop things
  2128. dead than to return a spurious number.  ckclib.c, 24 Dec 2005.
  2129.  
  2130. Converted the S-Expression handler to use wide integers. ckuus3.c, 24 Dec 2005.
  2131.  
  2132. Took all the LONGLONG stuff out of ckcdeb.h, we don't need it.
  2133.  
  2134. All of these changes result in 64-bit arithmetic (more or less) on 32-bit
  2135. Linux, as well as on true 64-bit platforms.
  2136.  
  2137. Rebuilt today's code on Solaris 9 in the 32-bit and 64-bit worlds, on Red
  2138. Hat 6.1, Red Hat AS4.2.  I haven't bothered trying a 32/64 hybrid build for
  2139. Solaris, since I can build a pure 64-bit version there.  Quick tests show
  2140. the large-number arithmetic works OK in all cases except, of course, on pure
  2141. 32-bit builds (unfortunately I can't find a running Linux system old enough
  2142. to verify this for Linux, but it's true for other 32-bit platforms).
  2143. 24 Dec 2005.
  2144.  
  2145. Tried building a hybrid version on Solaris 9 after all since the LFS API is
  2146. ostensibly the same as for Linux:
  2147.  
  2148.  make solaris9 "KFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
  2149.  
  2150. It built smoothly and the resulting binary is 2.5MB compared to 3.4MB for
  2151. the 100% 64-bit version.  Looks like a keeper.  For now, added solaris9lfs
  2152. and solaris10lfs entries to the makefile but if these work on PCs we can
  2153. make these the regular entries for Solaris 9 and 10.  27 Dec 2005.
  2154.  
  2155. Built on Mac OS X 10.4 with the regular target.  It seems that in that case,
  2156. off_t is 64 bits anyway.  Noticed that a lot of stuff didn't work, like
  2157. exponentiation in S-Expressions.  Tried building it as above, which worked,
  2158. and now CK_OFF_T is 64 bits instead of 32, but (^ 2 30) is still 2.0.  In
  2159. fact 2-to-the-any-power is 2.0.  It seems that the Mac OS X version did not
  2160. have FNFLOAT defined.  It also seems that every test in dosexp() like:
  2161.  
  2162.   if (result != fpresult) fpflag++;
  2163.  
  2164. should have been protected by #ifdef FNFLOAT..#endif /* FNFLOAT */ -- a
  2165. double-ended break, as they say in the nuclear power industry.  ckuus3.c,
  2166. 27 Dec 2005.
  2167.  
  2168. Added GREP /EXCEPT:pattern.  ckuus[26].c, 27 Dec 2005.
  2169.  
  2170. Fixed a problem with uninitialized pv[].wval (switch-parsing parameter-value)
  2171. members that showed up on certain platforms or with certain compilers.  Now
  2172. the Mac OS X 10.4 version works.  ckuus[r367].c, ckcftp.c, 28 Dec 2005.
  2173.  
  2174. Built on Unixware 7.1.1, a pure 32-bit build, seems fine.  Rebuilt on Red
  2175. Hat AS 4.2 just to make sure I didn't break anything, it's OK.  No testing
  2176. on HP-UX, etc, because HP testdrive file sytem is full, can't upload anything.
  2177. 29 Dec 2005.
  2178.  
  2179. Commented out the SHOW FEATURES section that displays constants like
  2180. INT_MAX, CHAR_MAX, etc, because printing each value in the appropriate
  2181. format is too tricky, and we don't need them anyway.  ckuus5.c, 29 Dec 2005.
  2182.  
  2183. Updated ckvfio.c to use CK_OFF_T for the relevant variables.  Built and
  2184. tested on VMS/Alpha 7.2: file transfer in remote mode; making a Telnet
  2185. connection and then local-mode file transfer; S-Expressions, all OK.  Also
  2186. built a no-net version OK.  29 Dec 2005.
  2187.  
  2188. Built and tested on Red Hat AS4 AMD X86_64, used it to upload new sources to
  2189. FreeBSD 4.11.  Built on FreeBSD 4.11/i386.  Here's another one where off_t
  2190. is 64 bits, even though long is 32 bits.  But it seems to work ok, not sure
  2191. why, when CK_OFF_T is 32 bits.  There is no _LARGEFILE_SOURCE stuff in the
  2192. header files.  29 Dec 2005.
  2193.  
  2194. Built on Mac OS X 10.3.9 using the new macosx10.4 target to pick up LFS.
  2195. Works fine.
  2196.  
  2197. Built on Red Hat Linux 4WS on IA64 (64-bit).  Now this one is odd, stat()
  2198. fails on big files.  It happens also if I use the "linuxnolfs" target, which
  2199. does not define _USE_LARGEFILE or _FILE_OFFSET_BITS=64.  DIRECTORY BIGFILE
  2200. shows the size as -1, but if "log debug", it says "no files match", i.e.
  2201. different behavior, observer effect.  I hate when that happens.
  2202.  
  2203. Let's see if that's an anomoly...  Built on Tru64 Unix 4.0F (64-bit Alpha).
  2204. It sees long files just fine.  Rebuilt and checked on x86_64 again... fine.
  2205. OK, let's not worry about IA64 yet.
  2206.  
  2207. Another small fix to the HP-UX 9.0 target from PeterE.  makefile, 29 Dec 2005.
  2208.  
  2209. ---Dev.10---
  2210.  
  2211. Code adjustments from Jeff, mainly to the SSL and TLS Raw mode code from
  2212. several weeks ago, plus changing some data types in the security code to
  2213. CK_OFF_T, plus a different data type for CK_OFF_T for K95 because Windows
  2214. size_T isn't signed.  This presumably will allow large-number arithmetic but
  2215. it will not give large file access because that will require replacing all C
  2216. library file i/o calls (esp. in ckofio.c) with native Windows APIs.  Build
  2217. on Solaris 9 with and without SSL and on Linux RH AS4.2 with and without
  2218. SSL.  ck_crp.c, ck_ssl.c, ck_ssl.h, ckcdeb.h, ckcftp.c, ckcmai.c, ckcnet.c,
  2219. ckcnet.h, ckctel.c, ckuat2.h, ckuus4.c, ckuus7.c, ckuusr.c, 30 Dec 2005.
  2220.  
  2221. It was reported that WRITE SESSION always returned a failure status, even
  2222. when it succeeded.  The problem was that Unix versions of zsout() and
  2223. zsoutl(), for the session log only, were using write() and returning
  2224. write()'s return code, which is different from what zsout() and zsoutl() are
  2225. documented to return.  Also plugged a couple potential holes in zsoutx()
  2226. that I noticed while I was in the neighborhood.  ckufio.c, 30 Dec 2005.
  2227.  
  2228. Added FSEEK /FIND:pattern.  This form of FSEEK accepts all the other
  2229. switches and arguments and performs the desired seek.  Then, if the seek was
  2230. successful, it starts from that point and reads through the file, line by
  2231. line, searching for the first line that contains the given string or matches
  2232. the given (unanchored) pattern and, if found, sets the file pointer to the
  2233. beginning of that line.  Useful, e.g., for very long timestamped logs, where
  2234. you want to start processing at a certain date or time; searching for a
  2235. particular string is much faster than doing date comparisons on each line.
  2236. ckuus[27].c, 30 Dec 2005.
  2237.  
  2238. It was annoying me that FILE STATUS (FSTATUS) required a channel number to
  2239. be given even if only one file was open, so I supplied the correct default
  2240. in that case.  ckuus7.c, 30 Dec 2005.
  2241.  
  2242. INPUT /NOWRAP, added recently, is used for efficiently copying the INPUT
  2243. stream intact, but it's not good for matching because if the INPUT target is
  2244. broken between the end of the previous buffer and the beginning of the next
  2245. one, the context is lost and the match does not occur.  I thought of several
  2246. ways around this, but they all involve saving a huge amount of context --
  2247. old input buffers, the arrays of target strings and corresponding match
  2248. positions, etc.  The alternative is fairly simple but it's not transparent
  2249. to the user.  Here's what I did in a POP script:
  2250.  
  2251.     .eom := "\13\10.\13\10"
  2252.     set flag off                           # FLAG ON = success
  2253.     while ( open connection && not flag ) {
  2254.         .oldinput := \fright(\v(input),8)  # Save tail of previous INPUT buffer
  2255.         input /clear /nowrap 4 \m(eom)     # Get new INPUT buffer
  2256.         if success {                       # INPUT matched - good
  2257.             .s := {\freplace(\v(input),\m(eom),\13\10)}
  2258.             set flag on
  2259.         } else {                           # No match
  2260.             .s := \v(input)                # Check if target crossed the border
  2261.             .oldinput := \m(oldinput)\fsubstr(\v(input),1,8)
  2262.             if \findex(\m(eom),\m(oldinput)) set flag on
  2263.         }
  2264.         ...
  2265.     }
  2266.  
  2267. I think this will be easier to explain than any dangerous and grotesque
  2268. magic I might put into doinput() itself.  For now, added a few words about
  2269. this to HELP INPUT.  ckuus2.c, 30 Dec 2005.
  2270.  
  2271. Back to the pattern matcher.  Noticed that "IF MATCH index.html [a-hj-z]*"
  2272. succeeded when it should have failed.  In ckmatch(), the clist section
  2273. needed one more clause: it can't float the pattern if an asterisk does not
  2274. occur in the pattern before the clist.  This change fixes the problem
  2275. without breaking any other cases that weren't already broken, most of which
  2276. involve slists, i.e. {string,string,string,...}.  ckclib.c, 30 Dec 2005.
  2277.  
  2278. Tried FSEEK /FIND: on a largish file (over 100,000 lines), using it to seek
  2279. to a line near the end.  It took 0.756 seconds, compared with Unix grep,
  2280. which did the same thing in 0.151 sec.  That's because C-Kermit is using
  2281. ckmatch().  But if the search target is not a pattern, it should be a bit
  2282. faster to use ckindex().  Yup, 0.554 sec, a 36% improvement.  Can't expect
  2283. to compete with grep, though; it's highly tuned for its single purpose.
  2284. ckclib.[ch], ckuus7.c, 1 Jan 2006.
  2285.  
  2286. Updated visible copyright dates to 2006: ckcmai.c, ckuus2.c, ckuus5.c,
  2287. 1 Jan 2006.
  2288.  
  2289. Noticed that NetBSD 2.0.3 has 64-bit off_t, and that _LARGEFILE_SOURCE is
  2290. mentioned in <stdio.h>.  Tried building Kermit with _LARGEFILE_SOURCE added
  2291. to CFLAGS, it's good.  Added it to the netbsd target.  makefile, 1 Jan 2006.
  2292.  
  2293. Fixed typo, #ifdef CK_NOLONGLONG in ckuus5.c should have been #ifndef
  2294. CK_LONGLONG (which, it turns out, we don't use anyway).  2 Jan 2005.
  2295.  
  2296. Observed that FreeBSD 4.x has a 64-bit off_t, but does not use the
  2297. _LARGEFILE_SOURCE convention.  Reasoning that all versions of FreeBSD have
  2298. off_t (I was able to check back to FreeBSD 3.3), I simply #define CK_OFF_T
  2299. to be off_t in ckcdeb.h within #ifdef __FreeBSD__ .. #endif.  Another one
  2300. down.  This can be done for any platform that is guaranteed to have off_t.
  2301. Turns out FreeBSD 3.3 has 64-bit off_t too.  2 Jan 2005.
  2302.  
  2303. OpenBSD, same as FreeBSD.  Also, added OS-version-getting thing to makefile
  2304. target for the program herald, as in the other BSDs.  Built on OpenBSD 2.5
  2305. from 1998, it has 64-bit off_t too.  ckcdeb.h, makefile, 2 Jan 2005.
  2306.  
  2307. Dumping the command stack every time there's an error is really too much.
  2308. I added SET COMMAND ERROR-DISPLAY {0,1,2,3} to set the verbosity level of
  2309. error messages.  Only level 3 dumps the stack.  ckuus[235].c, 2 Jan 2005.
  2310.  
  2311. Built on HP-UX 11.11 with _LARGEFILE_SOURCE and _FILE_OFFSET_BITS=64.  The
  2312. result works fine as far as I can tell.  It sees big files, it can open
  2313. them, seek to positions past the 2^31 boundary.  It can send large files.
  2314. It can do large-number arithmetic (^ 2 62).  The only problem is that during
  2315. compilation, every single modules warns:
  2316.  
  2317.   cc: "/usr/include/sys/socket.h", line 504: warning 562: Redeclaration of
  2318.   "sendfile" with a different storage class specifier: "sendfile" will have
  2319.   internal linkage.
  2320.   cc: "/usr/include/sys/socket.h", line 505: warning 562: Redeclaration of
  2321.   "sendpath" with a different storage class specifier: "sendpath" will have
  2322.   internal linkage.
  2323.  
  2324. These warnings should be perfectly harmless since they are not coming from
  2325. C-Kermit code, nor does C-Kermit use either one of those functions.  These
  2326. warnings don't come out in HP-UX 11i v2, but on that one we get tons and tons
  2327. of picky compiler warnings (variables set but not used, defined but not
  2328. referenced, etc).  A couple, however, turned out to be valid; one case of
  2329. "expression has no effect", and two of "string format incompatible with
  2330. data type" (I missed a couple file-size printfs).
  2331.  
  2332. There were also numerous warnings about signedness mismatch or sign
  2333. conversion of constants like IAC (0xff).  Does the HP-UX Optimizing Compiler
  2334. have a compiler flag to make all chars unsigned?  Yes, +uc, but the man page
  2335. says "Be careful when using this option.  Your application may have problems
  2336. interfacing with HP-UX system libraries and other libraries that do not use
  2337. this option".  Sigh, better not use it.
  2338.  
  2339. After reviewing "HP-UX Large Files White Paper Version 1.4" and HP's
  2340. "Writing Portable Code" documents, I added -D_LARGEFILE_SOURCE
  2341. -D_FILE_OFFSET_BITS=64 to the hpux1000 target, which is the basis for all
  2342. HP-UX 10.00 and later builds.  Large files are available in HP-UX 10.20 and
  2343. later.  10.00 and 10.10 were not real releases, and anyway these flags
  2344. should be harmless there unless the large-file implementation was only
  2345. partly done.  Built OK on both PA-RISC and IA64, optimized and plain.
  2346. makefile, 4 Jan 2006.
  2347.  
  2348. Built on FreeBSD 6.0 on IA64.  All OK except I got a warning about the
  2349. argument passed to time() in logwtmp() in ckufio.c.  This section had
  2350. already been partially fixed; thus I put the improved version into
  2351. #ifdef CK_64BIT, which is our newly available symbol that should be
  2352. automatically defined for any true 64-bit build.  ckufio.c, 4 Jan 2006.
  2353.  
  2354. Finally got around to testing Jeff's changes to SSL/TLS RAW mode from
  2355. December 30th against our POP server.  It didn't work, couldn't log in.
  2356. Tried backing off the ckctel.c changes first; that allowed login and
  2357. communication, but it did not suppress activation of Telnet protocol
  2358. whenever a 0xff byte arrived.  Backed off the rest of the changes and now
  2359. all is OK again.  ckctel.c, ckcnet.c, ckuus7.c, 9 Jan 2006.
  2360.  
  2361. Built on NetBSD 1.4.1 (1999), found that it did not like the large file
  2362. assumption -- fseeko() and ftello() do not exist; added a clause to the
  2363. netbsd target to check for fseeko and not define _LARGEFILE_SOURCE if not
  2364. found.  Oddly enough, off_t is 64 bits anyway, but it doesn't look like the
  2365. APIs are half-done.  For example, stat() uses off_t (64 bits) for the file
  2366. length, but fseek() uses long (32 bits) and there is no 64-bit analog.
  2367. Anyway the new netbsd target works on both 1.4.1 and 1.5.2 (no large files)
  2368. and on 2.0.3 (large files).  makefile, 9 Jan 2006.
  2369.  
  2370. Built on QNX-32 4.25, which has no large file support.  Got a few strange
  2371. compiler (WatCom) warnings, but it built and runs OK.  Noticed that file
  2372. transfers into QNX over a Telnet connection can't use streaming, but that's
  2373. nothing new to this version; same thing happens with C-Kermit 7.0.  9 Jan 2006.
  2374.  
  2375. Built on IRIX 6.5.  I didn't bother with large files there because it does
  2376. not support the _LARGEFILE_SOURCE interface; you have to change all the APIs
  2377. at the source level from blah() to blah64().  Seems to work fine as a 32-bit
  2378. app even though its off_t is 64 bits.  Tried a pure 64-bit IRIX 6.5 build
  2379. but it dies in ckcnet.c when it hits SOCKOPT_T and GSOCKNAME_T with "The
  2380. identifier 'socklen_t' is undefined".
  2381.  
  2382. Looks like I no longer have access to SCO OSR5.
  2383.  
  2384. Made a pure 32-bit build on SCO UnixWare 7.1.4, all OK.  Found that this
  2385. version also supports LFS, added it to the uw7 target.  makefile, 9 Jan 2006.
  2386.  
  2387. --- Dev.11 ---
  2388.  
  2389. Evidently the HP-UX bundled (non-ANSI non-optimizing) compiler doesn't like
  2390. long integers in switch expressions.  Changed three examples of these in the
  2391. S-expression code.  ckuus3.c, 10 Jan 2006.
  2392.  
  2393. A section of tstats() where GFTIMER isn't defined (e.g. on Motorola
  2394. sv68r3v6) was garbled.  Fixed in ckcfn2.c, 10 Jan 2006.
  2395.  
  2396. A fix for setting 921600 bps on Linux from Paul Fulghum, Microgate Systems Ltd.
  2397. ttgspd(): ckutio.c, 11 Jan 2006.
  2398.  
  2399. Noticed that when I changed the compact substring notation code back on
  2400. August 9th, I broke the ability to use arithmetic expressions within the
  2401. brackets, which explains some rather odd behavior I saw with some of my
  2402. scripts.  Looking more deeply into this, I also see that all the parsers I
  2403. have been using up to now for this, as well as for array bounds pairs, have
  2404. been inadequate because they never allowed for nested constructions, such as
  2405. a member of a bounds pair that itself was an array element, possibly with
  2406. another array element as a subscript.  I wrote a new routine for this,
  2407. called boundspair(), which is like arraybounds() except it accepts an extra
  2408. argument, an array of characters that can serve as bounds-pair delimiters,
  2409. and it returns the pair separator that was encountered in another new
  2410. argument.  For the alternative substring notation for [startpos-endpos] I
  2411. had to change the delimiter from '-' to '_' because '-' can be used in
  2412. arithmetic but '_' is not a recognized operator.  This is so I can parse,
  2413. e.g. [a:b] or [a_b] in the same context, and then find out which form was
  2414. used, e.g. \s(line[9:12]) or \s(line[9_12]); the first string is 4 bytes
  2415. long, the second is 12.  Everything seems to be OK now.  \s(line[10]) gives
  2416. everything starting at 10, but \s(line[10:0]) gives the null string.  Bad
  2417. syntax in the bounds pairs results in a null string; missing pieces of the
  2418. bounds pair result in defaults that should be compatible with previous
  2419. behavior.  ckuus[45].c, ckuusr.h, 13 Jan 2005.
  2420.  
  2421. Changed arraybounds() to call boundsdpair().  This was a rather drastic
  2422. change, not strictly necessary, but I think I got all the kinks out.
  2423. ckuus5.c, 13 Jan 2005.
  2424.  
  2425. Changes from PeterE to the makefile for HP-UX 6 and 7, to accommodate bigger
  2426. symbol tables, etc.  19 Jan 2005.
  2427.  
  2428. Determined that SCO OSR5.0.6 (and earlier) do(es) not support large files.
  2429. Don't know about 5.0.7.  30 Jan 2005.
  2430.  
  2431. Created a new build target for SCO OSR6.0.0.  Gets the exact 6.x.x version
  2432. dynamically.  Supports large files and big-number arithmetic via CK_OFF_T.
  2433. The sockopt() family of functions changed the data types of some of their
  2434. arguments since OSR5.  It was already possible to define SOCKOPT_T and
  2435. GSOCKNAME_T from the command line but I had to add code to also allow this
  2436. for GPEERNAME_T too.  ckcnet.c, makefile, 30 Jan 2005.
  2437.  
  2438. Apparently, ever since C-Kermit 7.0 was released, it has never been possible
  2439. to use a variable for the as-name in a RECEIVE command in Kermit 95.  This
  2440. is because evaluation of the as-name field was deferred until after we could
  2441. check whether it might be a directory name (which, in Windows, could start
  2442. with a backslash).   This little bit of magic was not a good idea, magic
  2443. hardly ever is.  I changed the code to evaluate both as-name fields in the
  2444. normal way.  If they want to receive to a directory called "\%1", they'll
  2445. just have to spell it differently.  The workaround is to turn the whole
  2446. command into a macro and evaluate it before executing it, e.g.:
  2447.  
  2448.   assign xx receive /as-name:\%1
  2449.   do xx
  2450.  
  2451. ckuus6.c, 1 Feb 2006.
  2452.  
  2453. Built OK on FreeBSD 6.1 on AMD64.  Adjusted some copyrights and date stamps.
  2454. ckcmai.c, makefile, 8 Feb 2006.
  2455.  
  2456. --- Dev.12 ---
  2457.  
  2458. Fixed a signed/unsigned char warning in the new boundspair() calling code
  2459. in the compact substring notation handler.  ckuus4.c, 9 Feb 2006.
  2460.  
  2461. Removed a spurious extra linux+openssl label from the makefile, added
  2462. solaris10g_64 synonym.  9 Feb 2006.
  2463.  
  2464. Satisfied myself that LFS is OK on Solaris 10 i386, and I'm going to assume
  2465. it's also OK on Solaris 9.  Made LFS standard for all Solaris 9 and 10
  2466. builds (including the secure ones) except the explicitly 64-bit ones, and
  2467. made the provisional solarisXXlfs targets into synonyms.  makefile, 9 Feb 2006.
  2468.  
  2469. --- Dev.13 ---
  2470.  
  2471. Further attempts at SSL/TLS message suppression when QUIET is ON.
  2472. ck_ssl.c, 16 Feb 2006.
  2473.  
  2474. From J.Scott Kasten: (quote...) I just uploaded a patch to /kermit/incoming.
  2475. The file name is "jsk-patch-for-cku211.diff".  I have also included the
  2476. patch as ASCII text in this email below.  This patch may be applied to the
  2477. cku211.tar.gz source code via:
  2478.   cd cku211, patch -p1 <../jsk-patch-for-cku211.diff
  2479. The patch adds 4 new build targets:
  2480.   netbsdwoc - a stripped no curses target for iksd used.
  2481.   netbsdse  - security enhanced target with srp, ssl, and zlib.
  2482.   irix65gcc - build on SGI Irix 6.5 platform using gcc.
  2483.   irix65se  - security enhanced target with srp, ssl, and zlib.
  2484. The patch fixes one build target:
  2485.   irix64gcc - The "-s" option is not supported by gcc under Irix.
  2486. I thank all of you in the Kermit Project for such a fine utility.  I
  2487. recently had to get a 16 MB file overseas across a spotty communications
  2488. link to repair a computer remotely.  Kermit was the only thing that could do
  2489. the job, so I wanted to contribute these patches back to the mainstream to
  2490. say thanks.  This digitally signed email is a binding contract that
  2491. officially assigns the rights to the source code patch (shown below) that I
  2492. developed to the Kermit Project at Columbia University. (...end quote)
  2493. ck_ssl.c, makefile, 23 Feb 2006.
  2494.  
  2495. Changed the new NetBSD target names to be consistent with the conventions
  2496. used in most other targets:
  2497.  
  2498.   netbsdwoc -> netbsdnc
  2499.   netbsdse  -> netbsd+ssl+srp+zlib
  2500.   irix65se  -> irix65+ssl+srp+zlib
  2501.  
  2502. and removed old, now superfluous, NetBSD targets (old-netbsd, netbst15,
  2503. netbst16), leaving synonym labels in their place.  Also updated (crudely)
  2504. the Linux target variations (curses instead of nocurses, no curses at all)
  2505. to be (appropriately modified) copies of the current linux target.  It would
  2506. be nicer to combine them, but this gets the job done.  makefile, 23 Feb 2006.
  2507.  
  2508. --- Dev.14 ---
  2509.  
  2510. Fixed the HELP command when used with tokens like @, ^, #, and ;.  The first
  2511. two had been omitted from the table.  The second two required a new path
  2512. into the guts of the parser, since comments are normally stripped at a very
  2513. low level.  ckuus[r2].c, ckucmd.c, 24 Feb 2006.
  2514.  
  2515. Built on AIX 5.1 ("make aix51") without incident.  Then I tried:
  2516.  
  2517.  make aix51 "KFLAGS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
  2518.  
  2519. This had no effect.  I found the relevant document ath the IBM website.  It
  2520. says to use -D_LARGE_FILES instead.  I added this to the AIX 4.2 target
  2521. since (a) IBM says large files are supported by AIX 4.2 and later, and (b)
  2522. all Kermit AIX targets past 4.2 use the 4.2 one.  Plus a clause to make
  2523. sure CK_OFF_T is defined appropriately.  ckcdeb.h, makefile, 6 Mar 2006.
  2524.  
  2525. Added a 32-bit aix51+openssl target.  Builds OK, works fine (tested against
  2526. our SSL POP server).  Tried I tried adding -D_LARGE_FILES.  It seems to work
  2527. fine, so we'll keep it.  Cleaned up the other aix5blah entries a bit also.
  2528. makefile, 6 Mar 2006.
  2529.  
  2530. Fixes from J. Scott Kasten to the IRIX 6.4 and 6.5 makefile targets.  They
  2531. were badly wrong.  makefile, 6 Mar 2006.
  2532.  
  2533. The reason Kermit was looping on directories in IRIX was a classic
  2534. "double-ended break".  The makefile targets failed to define DIRENT so
  2535. Kermit was open/read on directories rather than opendir()/readdir().  But
  2536. then it was also failing to account for the fact that read() would return -1
  2537. on error.  The makefile fix adds -DDIRENT, and the read() case in traverse()
  2538. now properly terminates its loop on error.  ckufio.c, 6 Mar 2006.
  2539.  
  2540. --- Dev.14 ---
  2541.  
  2542. In response to a complaint that C-Kermit would not build on HP-UX 11 with
  2543. OpenSSL, I tried it myself on both 11.11/PA-RISC and 11i v2/Itanium.  It built
  2544. OK on both but I had to add a new target (hpux1000o+openssl-nozlib) for no
  2545. Zlib since these boxes did not have it installed.  makefile, 9 Mar 2006.
  2546.  
  2547. Added OpenSSL version number display to SHOW FEATURES.  ckuus5.c, 9 Mar 2006.
  2548.  
  2549. Gavin Graham noticed that FTP [M]GET /DELETE /MOVE-TO: was rejected with
  2550. "?Sorry, /DELETE conflicts with /MOVE or /RENAME".  This check belongs in the
  2551. PUT code but not in the GET code.  Commented it out and tested the result.
  2552. The combination is now accepted but then Kermit refuses the incoming file as
  2553. if it had been given a /SMALLER-THAN: or /LARGER-THAN: switch, which it didn't
  2554. happen.  Turns out there was one more place where I wasn't initializing the
  2555. new "wide int" member of the switch-parsing pv[] struct.  Once this was fixed,
  2556. the /MOVE-TO part still didn't work.  Turned out the /DELETE case was part of
  2557. a long if-else-if-else- chain, which effectively made /DELETE and /MOVE-TO: or
  2558. /RENAME-TO: mutually exclusive.  Fixed this, now it works fine.  ckcftp.c,
  2559. 13 Mar 2006.
  2560.  
  2561. Got access to AIX 5.3, built there, all OK, including large files. 13 Mar 2006.
  2562.  
  2563. --- Dev.16 ---
  2564.  
  2565. Patches from Mark Sapiro to suppress getsockopt() and getsockname() warnings
  2566. in Mac OS X.  ckcnet.[ch], 18 Mar 2006.
  2567.  
  2568. In response to a complaint from Clarence Dold, tried "make redhat9" (which
  2569. is the rather dated target that tried to include all forms of security) on
  2570. RH Linux AS4.3, it failed miserably.  I made a new makefile target, removing
  2571. Kerberos IV and got a lot farther.  But then in ckcftp.c, the following
  2572. struct definition:
  2573.  
  2574.   struct {
  2575.       CONST gss_OID_desc * CONST * mech_type;
  2576.       char *service_name;
  2577.   } gss_trials[] = {
  2578.       { &ck_gss_mech_krb5, "ftp" },
  2579.       { &ck_gss_mech_krb5, "host" },
  2580.   };
  2581.  
  2582. refers to a variable, ck_gss_mech_krb5, that is not defined anywhere.  Up
  2583. above, however, is a static definition for gss_mech_krb5, so I changed the
  2584. struct definition to match.  Next, in ckuath.c, the compiler could not find
  2585. the com_err.h file.  Turns out in Linux this is in a subdirectory, et, so we
  2586. have to add a -I clause to the makefile target for this.  Made a target for
  2587. Linux+SSL only.  Made a target for Linux+Krb5 only; this required moving an
  2588. #ifdef in ckuus7.c to prevent an unguarded reference to SSLEAY_VERSION.
  2589. New targets: linux+krb5+ssl, linux+krb5, linux+krb5.  ckcftp.c, ckuus7.c,
  2590. makefile, 27 Mar 2006.  
  2591.  
  2592. New targets of HP-UX 10/11 with OpenSSL from PeterE.  makefile, 27 Mar 2006.
  2593.  
  2594. Added large file/integer support to SHOW FEATURES.  ckuus5.c, 27 Mar 2006.
  2595.  
  2596. Built OK on Solaris 9 and 10 with gcc (someone was complaining that this
  2597. didn't work, but that was 8.0.211).
  2598.  
  2599. Started build on a Sun 3/80 mc68030 with NetBSD 2.0 and gcc 3.3.3.  But it
  2600. died with an assembler error in ckcfn2.c (compiler bug).  27 Mar 2006.
  2601.  
  2602. --- Dev.17 ---
  2603.  
  2604. NebBSD 2.0 build completed by turning off optimization on ckcfn2.c
  2605. ("KFLAGS=-O0").  Result supports 64-bit ints and, presumably, large files.
  2606. uname -p = "m68k", -m = "sun3". 29 Mar 2006.
  2607.  
  2608. Corrected an omission in applying PeterE's updates to the HP-UX targets.
  2609. makefile, 28 Mar 2006.
  2610.  
  2611. Tried resurrecting the solaris2xg+krb5+krb4+openssl+shadow target.  It asks
  2612. to link with libdes but there is no libdes.  Removed -ldes from the target,
  2613. now at least it builds and runs wart.  The compilation blows up in ckcftp.c
  2614. for missing header files:
  2615.  
  2616.   ckcftp.c:462: kerberosIV/krb.h: No such file or directory
  2617.   ckcftp.c:500: gssapi/gssapi_generic.h: No such file or directory
  2618.   ckcftp.c:501: gssapi/gssapi_krb5.h: No such file or directory
  2619.  
  2620. Got a bit farther by adding appropriate -I's and -L's to KFLAGS but it still
  2621. dies compiling (or linking?) ckcftp.c, but it doesn't say exactly why.  OK,
  2622. deferred.
  2623.  
  2624. Added SET SEXPRESSION TRUNCATE-ALL-RESULTS { ON, OFF }.  This can be used
  2625. for force integer arithmetic in any kind of calculation that requires it,
  2626. such as date calculations.  This is a global setting, not on any kind of
  2627. stack.  Also, updated SHOW SEXP and added HELP SET SEXP which wasn't there
  2628. before.  ckuus[23].c, 30 Mar 2006.
  2629.  
  2630. To make the RENAME command a bit more useful, need to add some switches.
  2631. But it shares a switch table, qvswtab[], with some other commands.  Broke
  2632. this off into its own switch table.  ckuus6.c, 17 Apr 2006.
  2633.  
  2634. Added RENAME switch values that can be used in the same table with the DELETE
  2635. switch values, which are shared by many commands.  ckuusr.h, 17 Apr 2006.
  2636.  
  2637. Discovered that the RENAME command could be entered without any arguments
  2638. and it would still succeed.  Fixed in dorenam(): ckuus6.c, 17 Apr 2006.
  2639.  
  2640. Added parsing for RENAME /UPPER:option (to uppercase the file name(s)),
  2641. /LOWER:option (to lowercase), and /REPLACE:{{s1}{s2}} (to do string
  2642. replacement on the filename(s)), but not the semantics.  When any of these
  2643. switches is given, the target ("to") name is not parsed; they act on the
  2644. source name.  The /LOWER: switch takes keyword args to specify whether it
  2645. should act only only files that have all UPPER case latters, or on ALL files
  2646. (i.e., including files with mixed-case names); similarly for the /UPPER:
  2647. switch.  There is some creative parsing allowing these to be given with or
  2648. without a colon and keyword argument, which works fine except if you include
  2649. the colon but no argument, execute the command (which works fine), and then
  2650. recall the command.  I haven't yet decided about the interaction among these
  2651. switches.  Clearly if /UPPER is given after /LOWER, it overrides.  But if
  2652. /UPPER (or /LOWER) is given with /REPLACE, what should happen?  ckuus6.c,
  2653. 17 Apr 2006.
  2654.  
  2655. Filled in actions for RENAME /UPPER: and /LOWER: for the single file case,
  2656. and tested all combinations of switch values and filename configurations.
  2657. Once that was OK, moved the code out into a separate routine, renameone(),
  2658. and then called it from both the single-file case and the multifile case.
  2659. ckuus6.c, 19 Apr 2006.
  2660.  
  2661. Added RENAME /SIMULATE.  Filled in the code for string replacement, needs
  2662. testing.  ckuus6.c, 20 Apr 2006.
  2663.  
  2664. Changed /REPLACE options to allow a negative number to specify an occurrence
  2665. from the right, so -1 means the last occurrence, -2 means the next-to-last,
  2666. etc.  ckuus6.c, 24 Apr 2006.
  2667.  
  2668. Added RENAME /COLLISION:{OVERWRITE,PROCEED,FAIL}.  This is implemented but
  2669. not tested.  ckuus6.c, 24 Apr 2006.
  2670.  
  2671. Worked on RENAME /COLLISION:FAIL.  I decided it was less than useful to ...
  2672.  
  2673. Added SET RENAME { COLLISION, LIST } to let user change default collision
  2674. and listing actions.  ckuusr.[ch], ckuus[36].c, 25 Apr 2006.
  2675.  
  2676. Experimented with parsing for /CONVERT:cset1:cset2.  The problem here is
  2677. that there is no straightforward way for a switch to have multiple
  2678. arguments.  Or is there...?  If I parse cset1 with cmswi() rather than
  2679. cmkey(), it almost works; the only problem is that the character-set
  2680. keywords don't have CM_ARG set, so they don't know to stop on, and ignore, a
  2681. colon.  If I make a copy of the table and set CM_ARG in the flags field for
  2682. each keyword, it works fine: if I Tab in the first name, it fills itself
  2683. out, supplies a colon, and waits for the second name.  So in the code, the
  2684. first time that RENAME /CONVERT is invoked, I put code to copy fcstab[] and
  2685. set CM_ARG in each flags field.  Works fine, and now we know how to make a
  2686. switch that takes multiple arguments.  ckuus6.c, 24 Apr 2006.
  2687.  
  2688. I thought I had a function to convert the character set of a string but I
  2689. don't, so actually implementing /CONVERT: will be difficult.
  2690.  
  2691. Actually the parsing wasn't that easy either.  It works OK interactively,
  2692. but not in a TAKE file.  To make a long story short, I had to change
  2693. gtword() and cmkey2() to not require "/" at the beginning of a switch, and
  2694. then to parse arguments-that-are-followed-by-other-arguments as if they were
  2695. switches, so that they can end with colon rather than space.  This might
  2696. seem dangerous, but switches always have "/" at the beginning, so the check
  2697. is superfluous.  ckucmd.c, 26 Apr 2006.
  2698.  
  2699. Back to /CONVERT...  Once I was able to get the code to call cvtstring() I
  2700. was able to debug it (at first it was skipping every second character).  And
  2701. now we have a general-purpose string-translating function we can call from
  2702. anywhere.  Requires that C-Kermit be built with Unicode support.
  2703. ckuus6.c, 26 Apr 2006.
  2704.  
  2705. Added SHOW RENAME.  ckuusr.h, ckuus[r5].c, 26 Apr 2006.
  2706.  
  2707. Conditionalized some Unix/Windows assumptions in renameone() so the code
  2708. could work in VMS.  ckuus6.c, 2 May 2006.
  2709.  
  2710. Added RENAME /FIXSPACES to change all spaces in the filename(s) to
  2711. underscore or any other character or string that is given.  This is just a
  2712. special case of RENAME /REPLACE:{{ }{x}} with easier syntax.
  2713. ckuusr.h, ckuus6.c, 2 May 2006.
  2714.  
  2715. Added an "all-but" control to the /REPLACE options:
  2716. /REPLACE:{{.}{_}{~1}} means replace all but the first (this one works);
  2717. /REPLACE:{{.}{_}{~-1}} means replace all but the last (this one not yet).
  2718. ckuus6.c, 2 May 2006.
  2719.  
  2720. Filled in the second one ("all but" the given occurrence).  The algorithm is
  2721. simply to reverse the three strings and then use the same code as we use in
  2722. the left-right-case, and then unreverse the result.  At first I used
  2723. yystring() for this but yikes, what a bad design!  So I made a better
  2724. string-reversal routine, gnirts(), for this (luckily yystring() is only used
  2725. in one place, for which its design is appropriate). ckuus6.c, 3-4 May 2006.
  2726.  
  2727. Added code to handle the case where the file being renamed includes a path
  2728. specification.  In this case we separate the path, apply the renaming
  2729. functions to the filename only, and then at the end rejoin the original
  2730. filename with the path, and join the new name with same path or, if a
  2731. destination directory was given, with that.  ckuus6.c, 4 May 2006.
  2732.  
  2733. Added HELP SET RENAME and updated HELP RENAME.  ckuus2.c, 4 May 2006.
  2734.  
  2735. "Tom Violin" (Tom Hansen) noticed that the first time you FOPEN a file,
  2736. Kermit's memory consumption goes way up.  In fact there's a warning to that
  2737. effect in the code, where, upon first open, a potentially big array of
  2738. potentially big structs is allocated.  I rewrote the code to allocate each
  2739. array member (struct ckz_file) as needed, i.e. when a file is opened, and to
  2740. free it when the file is closed (or the open fails).  This was actually
  2741. quite a lot of work, which is why I didn't do it the first time around:
  2742. every single "."  had to be changed to "->".  Every check for a valid
  2743. channel first had to check if the channel's struct was allocated and every
  2744. other reference to z_file[i]->anything had to be prechecked that z_file[i]
  2745. was not a NULL pointer.  Also I made some improvements to FILE STATUS, and I
  2746. fixed FILE CLOSE to default the channel number if only one channel was open,
  2747. as I did for FILE STATUS a while back.  ckuus7.c, Cinco de mayo 2006.
  2748.  
  2749. Ran my old BUILDS script that builds C-Kermit with about 100 different
  2750. combinations of feature-selection switches.  Fixed a few small glitches so
  2751. now they all build OK (except can't do NOANSI builds any more on recent
  2752. Linuxes because of varargs()).  ckuus3.c, ckuus5.c, ckuus6.c, ckuus7.c,
  2753. ckucmd.c, ckcfns.c, 6 May 2006.
  2754.  
  2755. Fixed RENAME /LOWER and /UPPER, when given with no colon or agrument, to
  2756. default to ALL.  ckuus6.c, 13 May 2006.
  2757.  
  2758. Built on VMS 7.2-1, tested new RENAME command there; seems to be OK.
  2759. 13 May 2006.
  2760.  
  2761. --- Dev.18 ---
  2762.  
  2763. I wanted to test large files against RESEND but I don't have access to any
  2764. system that can run C-Kermit and that also has enough space for a large
  2765. file.  I created a "fake" large file on Linux (3G hole plus 1 byte), and
  2766. sent it over a localhost connection, and interrupted it repeatedly and then
  2767. initiated a RESEND at the sender.  In each case, it picked up where it left
  2768. off.  But before the 2G boundary was crossed the disk filled up.
  2769. Inconclusive.  14 May 2006.
  2770.  
  2771. PeterE got a warning in the new FILE OPEN code when building in HP-UX 9.
  2772. I added a cast, built on HP-UX 11, no more complaint.  However there
  2773. are warnings about internal vs external bindings of sendpath and sendfile
  2774. in every module.  Too bad, these are not Kermit tokens, it's a conflict in
  2775. HP's header files.  Marc Sapiro doesn't see them; probably it's something
  2776. on the HP testdrive site.  ckuus7.c, 17 May 2006.
  2777.  
  2778. Fixed the tru64-51b+openssl target -- the terminating doublequote of KFLAGS
  2779. was missing -- and also the osf target, which failed to import the LIBS
  2780. definition from whatever other target invoked it.  Now the SSL build goes OK
  2781. on Tru64 5.1B.  Replaced x.tar.z in the download areas without declaring a
  2782. new Dev number.  The new one has a makefile with today's date.  Software
  2783. engineering at its best!  makefile, 18 May 2006.
  2784.  
  2785. Scott Kasten noted that the estimated-time-remaining calculation would go
  2786. bonkers on LFS systems when RESENDing a large file.  It looks like the
  2787. shocps() and shoetl() functions escaped the CK_OFF_T conversion.  I made
  2788. what seemed to be the right adjustments, and then was lucky enough to find a
  2789. computer that had enough free disk space for me to send a large file,
  2790. interrupt it several times, resend it, all seems to be OK.  28 May 2006.
  2791. Later Scott verified these changes independently for Linux, but the problems
  2792. in IRIX remain.
  2793.  
  2794. Patches from Scott Kasten for large files on IRIX 6.5: ckcdeb.h, makefile,
  2795. 12 Jun 2006.
  2796.  
  2797. --- Dev.19 ---
  2798.  
  2799. Added a new function for dealing with JPGs and GIFs:
  2800.  
  2801. \fpicture(filename,&a)
  2802.   returns 0 if file not recognized or can't be opened;
  2803.   returns 1 if landscape, 2 if portrait or square.
  2804.   If array given, element 1 is width, element 2 is height.
  2805.  
  2806. ckuusr.h, ckuus4.c, 19 Jun 2006.
  2807.  
  2808. Scott Kasten reports that the FTP client can transfer large files OK, at
  2809. least in Linux, but has trouble with recovery:
  2810.  
  2811.  . Kermit takes a very long time to start the transfer, sometimes over
  2812.    30 minutes.  Suspect the ftp server is counting the bytes in a long file?
  2813.    Or maybe it's a text-mode transfer and it's counting the lines?  Probably
  2814.    in response to Kermit's SIZE command.
  2815.  
  2816.  . The size shown in the FT display is wrong by a random amount.  And of
  2817.    course so are the progress bar, percent done, and time remaining.
  2818.  
  2819.  . The file, however, is transferred correctly.  REGET works correctly too.
  2820.  
  2821. I tried setting up a test scenario locally but our Solaris FTP server does
  2822. not support large files:
  2823.  
  2824.   FTP SENT [SIZE BIGFILE]
  2825.   FTP RCVD [550 BIGFILE: not a plain file.]
  2826.   FTP SENT [PASV]
  2827.   FTP RCVD [227 Entering Passive Mode (128,59,48,24,246,37)]
  2828.   FTP SENT [RETR BIGFILE]
  2829.   FTP RCVD [550 BIGFILE: Value too large for defined data type.]
  2830.  
  2831. Created the same 3GB on a Tru64 Unix system that allows FTP access.  Made
  2832. the connection from C-Kermit on Solaris (32-bit with LFS):
  2833.  
  2834.   16:46:12.908 FTP SENT [SIZE BIGFILE]
  2835.   16:46:12.947 FTP RCVD [213 3000000001]
  2836.  
  2837. Note that it takes less than half a second to get the reply.  Now I start
  2838. the download and then interrupt it at about 2%:
  2839.  
  2840.   16:46:12.979 FTP SENT [TYPE I]
  2841.   16:46:13.174 FTP RCVD [200 Type set to I.]
  2842.   16:46:13.226 FTP SENT [PASV]
  2843.   16:46:13.262 FTP RCVD [227 Entering Passive Mode (15,170,178,171,11,37)]
  2844.   16:46:13.299 FTP SENT [RETR BIGFILE]
  2845.   16:46:13.337 FTP RCVD [150 Opening BINARY mode data connection for BIGFILE..]
  2846.   16:47:24.895 FTP RCVD [426 Transfer aborted. Data connection closed.]
  2847.   16:47:24.934 FTP RCVD [226 Abort successful]
  2848.   16:47:24.991 FTP SENT [MDTM BIGFILE]
  2849.   16:47:25.028 FTP RCVD [213 20060706204458]
  2850.  
  2851. Now I do a REGET:
  2852.  
  2853.   16:51:55.321 FTP SENT [PASV]
  2854.   16:51:55.357 FTP RCVD [227 Entering Passive Mode (15,170,178,171,11,43)]
  2855.   16:51:55.394 FTP SENT [REST 122736640]
  2856.   16:51:55.430 FTP RCVD [350 Restarting at 122736640. Send STORE or RETRIEVE..]
  2857.   16:51:55.431 FTP SENT [RETR BIGFILE]
  2858.   16:51:55.469 FTP RCVD [150 Opening BINARY mode data connection for BIGFILE..]
  2859.  
  2860. This worked perfectly, as far as I can tell; the FT display picked up in the
  2861. right place; the thermometer, percent done, and estimated time remaining
  2862. were the same as when we left off last time.  I did the same thing several
  2863. more times, everything was OK.  It would have taken a really long time to
  2864. let this run to completion, but I think this demonstrates that Scott's
  2865. symptoms are server-dependent.  No changes.  6 July 2006.
  2866.  
  2867. Checked current code on VMS 8.2-1 on IA64 / UCX 5.5, builds fine.
  2868. No changes.  Updated listing at HP.  6 July 2006.
  2869.  
  2870. Checked FTP GET of large file in ASCII mode against Tru64 FTP server.  It
  2871. was fine, and there was no delay in the server's response to our SIZE command
  2872. (as there would be if it were scanning the entire file to count how many
  2873. bytes would be required to send it in text mode).  7 Jul 2006.
  2874.  
  2875. Tested FTP PUT big file against Tru64, OK.  Ditto FTP RESEND big file:
  2876.  
  2877.   C-Kermit>resend BIGFILE
  2878.    PUT BIGFILE (binary) (3000000001 bytes)---> PASV
  2879.   227 Entering Passive Mode (15,170,178,171,13,186)
  2880.   ---> SIZE BIGFILE
  2881.   213 343211280
  2882.   ---> MDTM BIGFILE
  2883.   213 20060707141243
  2884.   ---> APPE BIGFILE
  2885.   150 Opening BINARY mode data connection for BIGFILE (128.59.59.56,45470).
  2886.  
  2887. Made REPUT a synonym for RESEND.  ckuusr.c, 7 Jul 2006.
  2888.  
  2889. Added FTP REPUT and FTP RESEND since previously there was no FTP-prefixed
  2890. command for recovering uploads, only the regular RESEND command, which might
  2891. not have been obvious to people.  ckcftp.c, 7 Jul 2006.
  2892.  
  2893. Added help text for FTP RESEND and REPUT and amended RESEND help text.
  2894. ckcftp.c, ckuus2.c, 7 Jul 2006.
  2895.  
  2896. Changed name of \fpicture() to \fpictureinfo() and added help text.  By the
  2897. way, ImageMagick can do this too: identify -format "%w %h" dscf0520.jpg.
  2898. The advantage of having it in Kermit is that not everybody has ImageMagick.
  2899. ckuus[24].c, 7 Jul 2006.
  2900.  
  2901. Changed the numeric comparisons = < > <= >= != to allow long integers by
  2902. changing the data type to CK_OFF_T, etc.  ckuus6.c, 7 Jul 2006.
  2903.  
  2904. Noticed that \fkeywordvalue(foo=this is a string) only kept the first word.
  2905. Fixed it to keep the whole definition.  Also added \fkwvalue() as a briefer
  2906. synomym.  ckuus4.c, 7 Jul 2006
  2907.  
  2908. Sometimes we want to check if a file's status before we've FOPEN'd it, in
  2909. which case the channel variable is likely to be empty and \f_status(\%c)
  2910. would get an error.  Making the obvious change didn't fix this, however.  It
  2911. turns out that the function evaluator failed to adjust argn (argument count)
  2912. when trailing arguments were empty, and argn was being used in this case,
  2913. and probably others, to test whether an argument existed.  I added code to
  2914. adjust argn to reflect the number of aruments up to and including the
  2915. rightmost non-empty one.  ckuus4.c, 7 Jul 2006.
  2916.  
  2917. Fixed \fstripb() to not dump core if second argument is missing.
  2918. ckuus4.c, 7 Jul 2006.
  2919.  
  2920. Discovered that it was not obvious what pattern to use to match strings
  2921. enclosed in square brackets.  "if match [abc] \[*\]" didn't work.  Neither
  2922. did various other tricks like NCRs for the brackets.  However, "if match
  2923. [abc] \\[*\\]" does work.  Trying to fix this would no doubt break 100 other
  2924. things, so let's call it a feature.  7 Jul 2006.
  2925.  
  2926. Added \fgetpidinfo(n) to return info about a process ID; for now it simply
  2927. returns 1 if the process is alive and 0 if not (or -1 if the argument is
  2928. bad or missing or on any kind of error).  ckuusr.h, ckuus[24].c, 7 Jul 2006.
  2929.  
  2930. The "where-did-my-file-go" message seemed to be ending with a LF rather
  2931. than CRLF, probably because the terminal modes had not yet been restored,
  2932. leaving the next prompt hanging below it, rather than on the left margin,
  2933. if C-Kermit exited immediately after the transfer.  Fixed by changing
  2934. all \n's to \r\n's in wheremsg(): ckcpro.w, 8 Jul 2006.
  2935.  
  2936. Added \v(lastkwval) so we can retrieve programmatically the keyword most
  2937. recently processed by \fkeywordval().  ckuusr.h, ckuus4.c, 9 Jul 2006.
  2938.  
  2939. --- Dev.20 ---
  2940.  
  2941. Added #ifdef SV68, #include <unistd.h>, #endif because Unix System V/68 on
  2942. Motorola choked on the SEEK_CUR reference without it.  ckuus4.c, 10 Jul 2006.
  2943.  
  2944. Make \fkeywordval(xxx) undefine xxx (i.e. when a keyword is given with no
  2945. value).  This way command-line keywords will always override preexisting
  2946. default definitions, whether they have a value or not, which makes it easier
  2947. to parse command lines like "foo=bar blah xx=yy".  ckuus[24].c, 12 Jul 2006.
  2948.  
  2949. On 29 Nov 2005 I changed IF KERBANG to solve a problem (see entry for that
  2950. date), but introduced a new one; namely that you can't have (e.g.)  a FATAL
  2951. macro that uses IF KERBANG to decide whether to EXIT all the way or STOP
  2952. back to the prompt.  Changed it again, this time to require not that the
  2953. command level be 1, but that the command *file* level be 0 (i.e. that we are
  2954. in the top-level command file, irrespective of the command or macro level,
  2955. but not in a subfile).  ckuus6.c, 12 Jul 2006.
  2956.  
  2957. It is unhelpful when Kermit gets a syntax error in the middle of a big
  2958. compound statement block (e.g. FOR or WHILE loop) and dumps out the whole
  2959. thing in an error message.  I changed the two places where this can happen
  2960. to call a new routine that, instead of dumping out the entire cmdbuf,
  2961. checks its length first and if it's more than a line long, truncates it
  2962. and adds an ellipsis.  ckuus6.c, 12 Jul 2006.
  2963.  
  2964. The new RENAME command didn't give very good error messages, e.g. if the
  2965. filespec didn't match any files.  Fixed in dorenam(): ckuus6.c, 12 Jul 2006.
  2966.  
  2967. Fixed DIR /TOP to work if the /TOP:n argument was omitted, defaulting
  2968. to 10.  domydir(): ckuus6.c, 12 Jul 2006.
  2969.  
  2970. Added DIR /COUNT:v to count the number of files that match the given
  2971. criteria and store result in the variable v.  ckuusr.h, ckuus[r26].c,
  2972. 24 Aug 2006.
  2973.  
  2974. Added HDIRECTORY as an invisible synonym for DIR /SORT:SIZE /REVERSE.
  2975. Can be used with other switches, of course, so (e.g.) HD /TOP shows the
  2976. ten biggest files.  ckuusr.h, ckuus[r26].c, 24 Aug 2006.
  2977.  
  2978. DIR /FOLLOWLINKS and /NOFOLLOWLINKS always did the same thing; the switch
  2979. was ignored, a symlink is always followed.  Fixed in ckuus6.c, 24 Aug 2006.
  2980.  
  2981. Added DIR /NOLINKS, which means don't show or count symlinks at all.
  2982. ckuusr.h, ckuus[r26].c, 24 Aug 2006.
  2983.  
  2984. Build on Solaris 9 and NetBSD 3.0, 24 Aug 2006.
  2985.  
  2986. Added a missing definition for LOCK_DIR in the Linux HAVE_BAUDBOY case,
  2987. suggested by Gerry Belanger.  ckutio.c, 6 Oct 2006.
  2988.  
  2989. Suggested by Jim Crapuchettes: \v(dialmessage) is the text string
  2990. corresponding to \v(dialstatus).  ckuusr.h, ckuus4.c, 6 Oct 2006.
  2991.  
  2992. Soewono Effendi sent code for exit sequence to leave DTR on; this amounted
  2993. to unsetting HPUCL in c_cflag.  I did it a simpler way, hopefully portable
  2994. to all Unixes, but who knows at this late date.  The code is inside
  2995. #ifndef CK_NOHUPCL..#endif in case it causes trouble.  It is executed if
  2996. SET EXIT HANGUP is OFF and a serial port was open at the time Kermit exits
  2997. (or closes it explicitly).  ttclos(): ckutio.c, 6 Oct 2006.
  2998.  
  2999. Built on Solaris9/Sparc; FreeBSD 6.2/AMD64; NetBSD 3.0/i386; HP-UX 11i v2;
  3000. SCO OSR6.00.
  3001.  
  3002. --- Dev.21 ---
  3003.  
  3004. Added netbsd+openssl target to makefile.  Built OK (NetBSD 3.0, OpenSSL
  3005. 0.9.7d) except with some warnings in ck_crp.c.  Connects and logs in OK to a
  3006. secure site.  10 Oct 2006.
  3007.  
  3008. Added a debug statement to ftp_hookup() to record the TCP port that was used.
  3009. ckcftp.c, 11 Oct 2006.
  3010.  
  3011. Built with OpenSSL 0.9.7l on Solaris 9.  Built with OpenSSL 0.9.8d on
  3012. Solaris 9; connects and logs in to a secure site.  11 Oct 2006.
  3013.  
  3014. The new RENAME command didn't work if both the source and destination names
  3015. included directory segments, e.g. "rename /tmp/foo ~/bar" (see notes of
  3016. 4 May 2006).  This was fixed in renameone() by a special case in which
  3017. the second argument is given but it is a filename, not a directory name.
  3018. ckuus6.c, 11 Oct 2006.
  3019.  
  3020. Fixed unguarded reference to dialmsg[] for \fdialmessage(), noticed by
  3021. Gerry Belanger.  ckuus4.c, 12 Oct 2006.
  3022.  
  3023. Added a TOUCH command that does what UNIX touch does: creates the file if it
  3024. does not exist, updates the timestamp if it does.  If a wildcard is given,
  3025. it operates only on existing files.  It shares the DIRECTORY command parser,
  3026. so all the same file selection switches can be given.  ckuusr.[ch],
  3027. ckuus[26].c, 12 Oct 2006.
  3028.  
  3029. PeterE noticed that if you FOPEN a file, do some seeks or reads, then FCLOSE
  3030. it, then FOPEN it again (or open a different one), some of the old
  3031. information is still there (e.g. current line number).  This is an artifact
  3032. of the changes of May 4th.  Now the file closing and opening routines are a
  3033. bit more careful about scrubbing and initializing the file info struct.
  3034. ckuus7.c, 12 Oct 2006.
  3035.  
  3036. --- Dev.22 ---
  3037.  
  3038. Built OK on Red Hat Linux AS4 with both "make linux" and "make linuxnc". 
  3039. 15 Oct 2006.
  3040.  
  3041. DIRECTORY /BRIEF ignored file selection switches and always listed all
  3042. files.  This was because of how I cleverly called filhelp() (the routine
  3043. that lists matching files when ? is typed in a filename field) and, of
  3044. course, filhelp() doesn't know anything about the DIRECTORY command's file
  3045. selections.  Changed filhelp() to accept all the args needed for passing
  3046. along to fileselect(), renamed it to xfilhelp(), and made a filhelp() stub
  3047. that chains to xfilhelp() with null selections.  ckcker.h, ckucmd.[ch],
  3048. ckuus6.c, 29 Nov 2006.
  3049.  
  3050. SHOW CONNECTION for an SSH connection said the connection type was "NET"
  3051. rather than "SSH".  Fixed in dolognet(): ckuus3.c, 29 Nov 2006.
  3052.  
  3053. SHOW CONNECTION didn't show the TCP port number.  This command works by
  3054. parsing the current connection log entry string, which doesn't have a field
  3055. for this, but which sometimes shows the port number as part of the hostname
  3056. (but more often not).  Added code to dolognet() to log the TCP port number,
  3057. if known.  This involved adding a gettcpport() function to ckcnet.c.
  3058. ckcnet.[ch], ckuus3.c, 29 Nov 2006.
  3059.  
  3060. This was impossible: def \%1 upper, echo \f\%1(abc) -- i.e. to "compose" a
  3061. function name.  Fixed in zzstring().  But note that it's still not possible
  3062. to do this: def \%1 \fupper, echo \%1(abc) -- because at the point where
  3063. "\fupper" is encountered, which is automatically fed to fneval(), the
  3064. argument list hasn't been read yet.  ckuus4.c, 29 Nov 2006.
  3065.  
  3066. The meaningless Lisp command (=) would cause Kermit to hang.  Due to some
  3067. idiosyncracy in the parser, it would see this as ((=) and would go into
  3068. "wait for the closing paren" mode.  There was already a hack in the code to
  3069. compensate for this, but it didn't work.  I fixed the hack but I don't
  3070. understand the real problem.  Anyway, comparing Kermit with real (Franz)
  3071. Lisp I discovered that comparison operators do not require two arguments, as
  3072. Kermit has been doing, although they do require at least one.  I changed
  3073. Kermit to not require two, so now all the comparison predicates behave
  3074. exactly like Franz Lisp, including getting an error if there are no args).
  3075. ckuus[r3].c, 29 Nov 2006.
  3076.  
  3077. From to-do list: Make a way to inhibit pattern matching in SWITCH labels.
  3078. It's already there; just quote the wildcard characters; the only trick is
  3079. that for some reason (such as that SWITCH is really an internally defined
  3080. macro), a double quote is needed:
  3081.  
  3082.   switch \%1 {
  3083.     :a\\*z, echo literally "a*z", break
  3084.     :abcxyz, echo literally "abcxyz", break
  3085.     :a*z, echo a...z, break
  3086.     :default, echo NO MATCH
  3087.   }
  3088.  
  3089. In first case, the asterisk is taken literally; in the third it's a
  3090. metacharacter and the label matches any string that starts with 'a' and
  3091. ends with 'z'.
  3092.  
  3093. Array initializion would quit early if any initializers were undefined,
  3094. e.g. "decl \&a[] = \%a \%b \%c" would stop at the first element if \%b
  3095. was not defined, even though \%c might be defined.  Fixed in dodcl():
  3096. ckuusr.c, 30 Nov 2006.
  3097.  
  3098. DIR /ARRAY:a filespec, when the filespec does not match any files,
  3099. terminates with the array undeclared.  It would be better to return a
  3100. declared but empty array (\&a[0] = 0).  The code is already there to do
  3101. that, but isn't working.  And yet "declare \&a[0]" does indeed create a
  3102. 0-element array ("show array" shows a dimension of 0).  Turns out there were
  3103. two problems; one was the careless recycling of a local variable ("array"),
  3104. resulting in failure to create \&a[] (but not any other array).  Fixed in
  3105. domydir(): ckuus6.c, 30 Nov 2006.
  3106.  
  3107. The other problem was that dclarray(), when called with an array name and a
  3108. dimension of zero, does two different things depending on whether the array
  3109. already existed.  There is still a fair amount of confusion about whether a
  3110. dimension of 0 indicates an array with 1 element (as it should) or a
  3111. nonexistent array.  We call dclarray() with a size of 0 to undeclare an
  3112. array but we also need to able able to declare an array with only element 0.
  3113. I changed dclarray() to treat a negative dimension as a command to destroy
  3114. the array, and 0 or positive as a command to create the array with the given
  3115. dimension.  ckuus[r56].c, 30 Nov 2006.
  3116.  
  3117. Next problem: when chkarray() returns 0, this should not be interpreted to
  3118. mean the array does not exist.  Looks like the only place this happened was
  3119. in \fcontents(); fixed in ckuus4.c, 30 Nov 2006.
  3120.  
  3121. If we include file selectors with DIR /ARRAY:&a and some of the files that
  3122. match the given filespec but don't fit the selectors, the array's dimension
  3123. is bigger than its number of elements.  Added code at the end of domydir()
  3124. to resize the array so \fdim() returns the number of filenames in the array,
  3125. and also made sure that element 0 contains that number too.  ckuus6.c,
  3126. 30 Nov 2006.
  3127.  
  3128. This would be a nice elegant way to loop over a bunch of files, if it worked:
  3129.  
  3130.   for \%i 1 \ffiles(*) 1 { rename \fnextfile() xxx_\flpad(\%i,3,0) }
  3131.  
  3132. But in this loop, Kermit skips every other file (beginning with the first)
  3133. and then runs out of files halfway through the loop.  Why?  Because in
  3134. commands like RENAME and DELETE, the filename parser is in a chained FDB
  3135. with the switch parser.  First the switch parser, cmswi(), gets its hands on
  3136. \fnextfile(), passing it through the evaluator and thus getting the first
  3137. filename, which it then sees is not a switch, so now the field is parsed by
  3138. the next parser in the chain, cmifi(), which causes \fnextfile() to be 
  3139. executed again.  In fact, the FOR loop has nothing to do with; the same
  3140. thing happens like this:
  3141.  
  3142.   void \ffiles(*)
  3143.   delete \fnextfile()
  3144.  
  3145. This deletes not the first file, but the second one.  Obviously users can be
  3146. told not to refer to \fnextfile() in chained-fdb fields:
  3147.  
  3148.   for \%i 1 \ffiles(*) 1 { .f := \fnextfile(), delete \m(f) }
  3149.  
  3150. but this is hardly intuitive.  I had some clever ideas of how to make
  3151. \fnextfile() work as expected in this context but it's way too much magic.
  3152. Better to simply document that \fnextfile() is "deprecated" and the array
  3153. format should be used:
  3154.  
  3155.   for \%i 1 \ffiles(*,&a) 1 { delete \&a[\%i] }
  3156.  
  3157. The difference is, an array element doesn't change every time it's referred to!
  3158.  
  3159. Added a /PRESERVE switch to the COPY command to preserve the timestamp and
  3160. permissions of the file.  I did this using the Kermit APIs so it should work
  3161. for any version of C-Kermit or K95.  ckuus[26].c, 30 Nov 2006.
  3162.  
  3163. Added COPY /OVERWRITE:{ALWAYS,NEVER,OLDER,NEWER} to control name collisions
  3164. when copying across directories.  ckuus[26].c, 1 Dec 2006.
  3165.  
  3166. --- Dev.23 ---
  3167.  
  3168. Fixed a bug in SET TELNET PROMPT-FOR-USERID, SET AUTH KERBEROS[45] PROMPT,
  3169. and SET AUTH SRP PROMPT in which the user's string was compared with a
  3170. literal (s == ""), reported by Pavol Rusnak.  Worse, empty strings (if the
  3171. test succeeded) were turned into null pointers, and then fed to strlen().
  3172. Fixed in ckuus3.c, 5 Dec 2006.
  3173.  
  3174. Added an optional 4th argument to \findex(), \frindex(), \fsearch(), and
  3175. \frsearch(): the desired occurrence number of the searched-for string.
  3176. \frsearch() was a bit tricky.  ckuus[24].c, 7 Dec 2006.
  3177.  
  3178. Added \fcount(s1,s2) to tell the number of occurrences of s1 in s2.
  3179. ckuus[24].c, 8 Dec 2006.
  3180.  
  3181. Added \ffunction(s1) to tell if a given built-in function is available.
  3182. ckuus[24].c, 8 Dec 2006.
  3183.  
  3184. Changed RENAME /COLLISION:PROCEED to be /COLLISION:SKIP, which is clearer.
  3185. ckuus[26].c, 8 Dec 2006.
  3186.  
  3187. For communication protocols: INPUT /COUNT:n to read exactly n characters
  3188. without any matching.  Can be used, for example, with CONTENT_LENGTH in CGI
  3189. scripts; NUL characters are counted but not collected.  ckuusr.[ch],
  3190. ckuus4.c, 8 Dec 2006.
  3191.  
  3192. There was a bad bug in the date-parsing routines; it's been there for years.
  3193. If a date string includes a timezone, e.g. "Sat, 9 Dec 2006 19:26:23 EST",
  3194. and converting to GMT changes the date, the variables for day, month, and
  3195. year (which are used later) were not updated, and the final result was a day
  3196. off.  Fixed in cmcvtdate(): ckucmd.c, 10 Dec 2006.
  3197.  
  3198. Built OK with SSL/TLS.  Tested with the POP script, found that I broke INPUT
  3199. when adding the /COUNT feature; there was a path through the code that could
  3200. leave the "anychar" variable unset and therefore random.  Fixed in
  3201. doinput().  The POP script, which does not use /COUNT, works again and so
  3202. does a new CGI script, which does use /COUNT.  ckuus4.c, 10 Dec 2006.
  3203.  
  3204. Supplied a missing comma in the help-text array for HELP SET TERMINAL, which
  3205. resulted in bad formatting in K95 around SET SNI-FIRMWARE-VERSIONS.
  3206. ckuus2.c, 10 Dec 2006.
  3207.  
  3208. Made "help locus" a synonym for "help set locus".  ckuusr.[ch], ckuus2.c,
  3209. 11 Dec 2006.
  3210.  
  3211. This morning the Columbia FTP server was malfunctioning in a perfect way
  3212. for me to implement and test an FTP timeout mechanism.  The server would
  3213. close the data connection after sending the file, but the client never saw
  3214. the close and was stuck forever in a recv().  I added code to do a select()
  3215. on the data connection prior to entering the recv(), with a timeout on the
  3216. select() that the user can establish with SET FTP TIMEOUT.  Built and tested
  3217. on Solaris 9, clear-text FTP.  Also built cleanly for FTPS and tested
  3218. against a server that does not hang; I don't have access to an FTPS server
  3219. that would tickle the timeout code.  ckcftp.c, 11 Dec 2006.
  3220.  
  3221. --- Dev.24 ---
  3222.  
  3223. Fixed a bug in the INPUT /COUNT: parser: the array of search strings was
  3224. never initialized, which didn't matter before, but with /COUNT:, if the
  3225. first element was not a NULL pointer, we'd treat it as a search string, and
  3226. then if it happened to match something in the input stream, the operation
  3227. would stop before the count was exhausted.  Fixed by (a) initializing the
  3228. array, and (b) ignoring any search strings if /COUNT: was given.  ckuusr.c,
  3229. 13 Dec 2006.
  3230.  
  3231. Removed a debug() statement from zsattr() that suddenly started making some
  3232. version of gcc complain, reported by Gerry Belanger.  ckufio.c, 13 Dec 2006.
  3233.  
  3234. --- Dev.25 ---
  3235.  
  3236. Some casts for the 3 interior args of the new select() call in ckcftp.c
  3237. for HP-UX 9.  14 Dec 2006.
  3238.  
  3239. Changed \fkeywordvalue() to accept a string rather than a single character
  3240. as its second argument, so that more than one separator could be specified,
  3241. and to return -1 on error, 0 if it found nothing, 1 if given a kewyord but
  3242. no value, and 2 if there was a keyword and a value.  dokwval(): ckuus[24].c,
  3243. 14 Dec 2006.
  3244.  
  3245. Checked FTP timeout on command channel with FTP DIRECTORY of a big directory
  3246. using a path into our ftp server that preserves the hanging behavior.  The
  3247. timeout was actually working, but the failure condition wasn't propogating
  3248. back to the user, and there was no error message.  Fixed in doftprecv2() and
  3249. failftprecv2(): ckcftp.c, 15 Dec 2006.
  3250.  
  3251. Added the obvious timeout checks for FTP uploads, but I have no way to test
  3252. the code since our misbehaving FTP server does not hang when receiving
  3253. files, only when sending them.  But uploads work both with and without a
  3254. timeout set, so at least no harm is done.  ckcftp.c, 17 Dec 2006.
  3255.  
  3256. When downloading with FILE DESTINATION NOWHERE (= /CALIBRATE), Kermit still
  3257. checked the size of the incoming file and refused it if there wasn't enough
  3258. free disk space, on platforms (such as VMS) where zchkspa()) actually works;
  3259. reported by Bob Gezelter.  ckcfn3.c, 18 Dec 2006.
  3260.  
  3261. Built on Mac OS X 10.4.8 and NetBSD 3.1_RC3, all OK.  19 Dec 2006.
  3262.  
  3263. ------------------------------
  3264. ***********************
  3265.