source: trunk/third/kermit/ckc209.txt @ 20081

Revision 20081, 141.2 KB checked in by zacheiss, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20080, which included commits to RCS files with non-trunk default branches.
Line 
1C-KERMIT CHANGE LOG (Changes since 8.0.200 of 12 Dec 2001)
2
3Chronological order: Go to the bottom to find the newest edits.
4
5---8.0.200---
6
7Known bugs (+ = fixed after release):
8
9 + 1. tilde_expand() can call getcwd() with NULL arg.
10 + 2. getexedir() called too early (fatal in combination with (1)).
11 + 3. Kermit "get blah" where blah is a symlink; server refuses to send it.
12      Should not do this if GET not recursive.
13 ? 4. Dave Sneddon's report about VMS fore/background confusion.
14 + 5. FTP GET path/file doesn't work - path not stripped - but MGET works.
15 + 6. IRIX 5.3 compilation problems (have patches from Marcus Herbert)
16 X 7. Filename completion bug (see below) (deferred).
17 + 8. QNX6 herald and other problems.
18
19-------------
20
21Merged Jeff's changes, 20 Dec 2001:
22
23 . Changed all occurrences of "ttnproto == NP_TELNET" to "IS_TELNET()" to
24   account for the difference between SSH and Telnet.  ckuscr.c,
25   ckuus[3457].c, ckcnet.h, ckcfns.c, ckudia.c, ckutio.c, ckucon.c, ckucns.c.
26
27 . Moved SSH pty failure warnings.  ckuusr.c.
28
29 . Security adjustments to FTP module, plus fix an error message.  ckcftp.c.
30
31 . Adjustment of some security-related #ifdefs. ckcdeb.h, ckuus2.c, ckctel.c.
32
33 . Guard against calling getpwnam() with a NULL arg in tilde_expand() ckufio.c.
34 
35 . Moved getexedir() call to later, where it's safe.  ckcmai.c.
36
37Added SSH ADD and many SSH SET commands from Jeff's spec.  Fixed SHOW SSH
38to not dump core if variables weren't set.  ckcker.h, ckuus[r3].c, 20 Dec 2001.
39
40C-Kermit in server mode, client says "get foo" where foo is a symlink.
41Server says "no files meet selection criteria" instead of sending the file.
42It should only refuse to follow symlinks if it's a recursive get.  Fixed
43in sgetinit(): ckcpro.w, 21 Dec 2001.
44
45More work on SSH and SET/SHOW SSH commands.  ckuus[r3].c, 21 Dec 2001.
46
47Undid Jeff's replacement of the SSH pseudoterminal allocation failure
48message, because now it comes out any time an SSH command has to be
49reparsed (in the non-SSHBUILTIN case).  ckuusr.c, 21 Dec 2001.
50
51More SSH and SET SSH command work back & forth with Jeff, plus Jeff added
52SET HOST /NET:SSH.  ckcmai.c, ckuus[r37].c, ckcdeb.h, ckuusr.h, 22 Dec 2001.
53
54Added SSH OPEN switches.  ckuusr.c, 22 Dec 2001.
55
56Added SSH CLEAR, HELP SSH, and HELP SET SSH.  ckuus[r2].c, 23 Dec 2001.
57
58From Jeff:
59 . SET TCP commands now apply to SSH
60 . SSH V2 REKEY and FORWRD-{LOCAL,REMOTE}-PORT  commands now implemented
61 . Missing DLLs automatically disable appropriate authentication mechanisms.
62ckuusr.c ckcnet.c ckuus3.c ckcmai.c ckcnet.h ckuus4.c, 26 Dec 2001.
63
64From Jeff:
65 . Remove SET SSH KEEPALIVES.
66 . Add help text for SSH AGENT { ADD, DELETE, LIST }.
67ckuus[23].c, 28 Dec 2001.
68
69Added parsing for SSH AGENT { ADD, DELETE, LIST }.  ckuusr.c, 28 Dec 2001.
70
71From Jeff:
72 . Fixed a crash that can happen when making an SSH connection.
73 . Filled in SSH AGENT actions.
74 . Changed default for strict host key check (to ASK) and help text.
75 . uploaded new binaries include ~kermit/os2test/beta/ssh-agent.exe
76 . Read man ssh-agent on ftp.kermit.columbia.edu for details on what it does.
77ckuus[r23].c, 28 Dec 2001.
78
79"ftp get path/filename" didn't work; the FTP client did not strip the path
80from the local copy of the filename when doing a GET, even though it did
81for MGET.  Diagnosis: in doftpget(), the "if (!getone && !skipthis)" statement
82lacked an "else" part for the getone case.  ckcftp.c, 28 Dec 2001.
83
84A while back Jeff reported that in FTP MGET, if you cancel a file with 'x',
85all the rest of the files arrive truncated to 0 bytes.  I tried this on both
86Unix and Windows and couldn't reproduce it.
87
88In the last-minute flurry to release C-Kermit 8.0, I thought I noticed the FTP
89client failing to update the fullscreen file-transfer display.  But it seems
90to work right, at least in Unix.  When downloading a big file with FTP, all
91the display fields are updated as expected.  But smaller files might go by too
92fast for the display to do anything.  HOWEVER, in K95 the file transfer
93display does not update itself until the end of the file, even if the file
94takes a long time to transfer.  This happens in both the Console and GUI
95versions.  A thread thing?  (Jeff says no.)  Yet the same display works fine
96on Telnet connections.
97
98In IRIX 5.3, the select()-based CONNECT module had to include <sys/time.h>
99or else it blew up with "struct timeval" unknown.  Since there already was
100a SYSTIMEH CFLAG, I added the #include within #ifdef SYSTIMEH..#endif and
101rebuilt with KFLAGS=-DSYSTIMEH, only to discover that the irix5* targets
102didn't bother to propogate KFLAGS.  Fixed in ckucns.c, makefile, 30 Dec 2001.
103
104Increased IRIX5x Olimit from 2400 to 3000 because of ckuus[34].c.  Added
105-ansi, since (Marcus Herbert reported) we were not actually getting ANSI-C
106compilation even though CK_ANSIC was defined.  But now that we are, we get
107warnings in <netinet/tcp.h>, which is included by ckcnet.h:
108
109  bit-field 'th_off' type required to be int, unsigned int, or signed int.
110  (3.5.2.1(30))
111          u_char  th_off:4,
112          ------  ^
113Tough.  makefile, 30 Dec 2001.
114
115But adding -ansi to the IRIX 5x targets also make compilation bomb whenever we
116referenced fdopen() or popen(), which evidently don't have prototypes in any
117of the header files.  Luckily we already have CFLAGS for this occasion too:
118DCLFDOPEN and DCLPOPEN.  Added these to the irix51 target.  Also had to copy
119the fdopen()-popen() prototype section to ckuusx.c, which has a new reference
120to fdopen() in a workaround for the curses console buffering bug.  makefile,
121ckuusx.c, 30 Dec 2001.
122
123The QNX6 version did not receive a proper herald (it announced itself as
124"unknown version".  Reshuffled #ifdefs in ckuver.h, added display of QNX6
125and NEUTRINO symbols to ckuus5.c, 30 Dec 2001.
126
127Lucas Hart sent in a patch for the VMS problem.  Apparently it was even worse
128than Dave Sneddon had reported: 8.0 couldn't run at all under Batch.  ckvtio.c,
12931 Dec 2001.
130
131A major obstacle to the usability of the FTP client is that certain commands
132don't behave as FTP users expect: CD, DIR, DELETE, MKDIR, etc, which are local
133rather remote, and there are no LCD (etc), USER, or ACCOUNT commands.  We
134could fix this by adding an FTP command-language personality, but file
135management commands can also be remote or local on connections to Kermit
136servers too.  So:
137
138SET LOCUS { LOCAL, REMOTE, AUTO }
139  Sets the locus for unprefixed file management commands.
140  When LOCAL, a REMOTE (or R) prefix is required for
141  to send file management commands to a remote server (e.g. RCD, RDIR).
142  When REMOTE, an L prefix is required to issue local file management
143  commands (e.g. LCD, LDIR).  The word LOCAL can't be used as a prefix
144  since it is used for declaring local variables.
145
146This applies to all types of connections, and thus is orthogonal to SET
147GET-PUT-REMOTE, which selects between Kermit and FTP for remote file-transfer
148and management commands.
149
150The default LOCUS is AUTO, which means we switch to REMOTE whenever an FTP
151connection is made, and to LOCAL whenever a non-FTP connection is made,
152and switch back accordingly whenever a connnection is closed.
153
154Implementation (31 Dec 2001):
155 . None of this is compiled if LOCUS is not defined.
156 . Added XYLOCUS (SET LOCUS) and LOCUS definitions: ckuusr.h.
157 . Override by defining NOLOCUS (which inhibits definition of LOCUS).
158 . Added LOCUS to SET keyword table: ckuusr.c.
159 . Added locus & autolocus variables: ckuusr.c.
160 . Added SET LOCUS parsing and variable setting: ckuus3.c.
161 . Added display of LOCUS setting to SHOW COMMAND: ckuus5.c.
162 . Added automatic locus setting to setlin(): ckuus7.c.
163 . Added automatic locus setting to ftpopen() and ftpclose(): ckcftp.c.
164
165How to catch all the places where a Kermit connection is closed?  Turns out
166we've done this before, when we added the connection log.  So I made
167dologend() take care of locus switching.  But dologend() was not compiled in
168if certain symbols were defined, such as NOLOCAL, or not defined, such as
169CKLOGDIAL.  So I (a) rearranged the #ifdefs so that even if these would
170otherwise have obliviated dologend(), now they leave a piece of it for
171locus-setting; (b) moved the prototype out of #ifdefs; and (c) took all calls
172to it out of #ifdefs.  ckcker.h, ckcfn2.c, ckcmai.c, ckucns.c, ckucon.c,
173ckuus[r347x].c, 31 Dec 2001.
174
175Added locus checking to the following commands: DIRECTORY, CD/CWD, CDUP,
176DELETE, PWD, MKDIR, RMDIR, RENAME.  ckuusr.c, 31 Dec 2001.
177
178Added LDIRECTORY, LCD/LCWD, LCDUP, LDELETE, LPWD, LMKDIR, LRMDIR,
179LRENAME.  ckuusr.[ch], 31 Dec 2001.
180
181Added USER and ACCOUNT commands, which are the same as FTP USER and FTP
182ACCOUNT.  ckuusr.[ch], ckcftp.c, 31 Dec 2001.
183
184Since automatic locus switching could be a big surprise for most people, I
185printed message any time it changed.  ckcftp.c, ckuus[37].c, 31 Dec 2001.
186
187Added help text for the new L commands and filled in missing HELP text for
188SET GET-PUT-REMOTE, CDUP, MKDIR, and RMDIR.  ckuus2.c, 31 Dec 2001.
189
190Changed help text of CD, DIR, etc, for LOCUS.  Changed the help text for
191RCD, RPWD, RDEL, RDIR, etc, to mention that they also work with FTP servers.
192Updated HELP REMOTE for this too.  ckuus2.c, 31 Dec 2001.
193
194Made sure code builds with NOLOCAL, NOLOGDIAL, and NOLOCUS (it does).
195
196The IKSD command, when given with a /USER: switch, sends the user ID to the
197IKSD.  But the SET HOST /USER: command does not, when making a connection to a
198Kermit service.  This makes it impossible to script IKSD interactions using
199only client commands.  Furthermore, even if you include a /PASSWORD switch
200with the IKSD command, it does not send the password.  I added code near the
201bottom of setlin() to do this.  If we have a connection to a Kermit service
202and a /USER: switch was given, then we attempt a REMOTE LOGIN.  If a
203/PASSWORD: switch was not given then if the username is "ftp" or "anonymous",
204we automatically supply a password of user@host; otherwise we prompt for a
205password.  If a /USER: switch was not given, it acts like before.  It all
206works, but it might not be the best way (or place) to do it.  setlin():
207ckuus7.c, 31 Dec 2001.
208
209  NOTE: The above change doesn't help with IKSD /USER:anonymous,
210  the server prompts for password anyway, not sure why.
211
212  NOTE 2: What about secure authentication?  We have to test to see
213  if user was already authenticated before sending the login packet.
214
215Added /opt/kermit and /opt/kermit/doc to info_dir[] list (for Solaris).
216ckuus5.c, 31 Dec 2001.
217
218From Jeff: new Help text for SET TERM FONT (K95 GUI).  ckuus2.c, 1 Jan 2002.
219
220More work on help text for file management commands -- e.g. we can't lump
221the L-commands together with the unprefixed ones; they need separate entries.
222Also: added missing HELP REMOTE PWD, improved the default case (in which
223help text had been omitted for a valid command).  ckuus2.c, 1 Jan 2002.
224
225It seems VMS C-Kermit was pretty much ignoring the -B (force background) and
226-z (force foreground) command-line options.  Fixed in congm(): ckvtio.c,
2271 Jan 2002.
228
229Tested the SET LOCUS business with VMS C-Kermit, which does not have a
230built-in FTP client.  Of course in this case there is no automatic locus
231switching, but SET LOCUS REMOTE works nicely on IKSD connections.
232
233From Jeff:
234 . #ifdef adjustments for LOCUS changes.
235 . SSH KEY CREATE /TYPE:SRP.
236 . Fix \v(serial) to not be 8N2 by default if speed is 0.
237 . Don't let doexit() run if sysinit() hasn't been called first.
238ckuus[r247x].c, 2 Jan 2002.
239
240Made SET BACKGROUND { ON, OFF } do exactly the same as -B and -z options.
241ckuus3.c, 2 Jan 2002.
242
243Updated user-visible copyright dates to 2002 (but still need to do all the
244source-module comments).  ckcmai.c, ckuus[25].c, 2 Jan 2002.
245
246Rearranged #include <sys/time.h> in ckucns.c that was done for IRIX 5.3,
247to avoid conflicts in SV/68 R3v6.  3 Jan 2002.
248
249From Dave Sneddon: Code changes in VMS sysinit() and congm() to work around
250problems in batch, SPAWN'd, etc, and change CTTNAM from TT: to SYS$INPUT:.
251ckcdeb.h, ckvtio.c, 3 Jan 2002.
252
253From Jeff:
254 . Fixed typo in definition of CTTNAM for VMS.  ckcdeb.h
255 . Moved macro definitions for SSHBUILTIN from ckuus3.c to ckuusr.h
256   so they can be referenced in ckuus7.c
257 . Added SSH functionality to SET HOST:
258     SET HOST /NET:SSH /CONNECT hostname [port] /switches
259 . Fixed SET NET TYPE so it won't reject SSH if SSH is installed.
260 . Changes to allow IKSD to continue functioning.  Somehow this minor change
261   to ckcmai.c got lost in one of the back and forth exchanges.
262 . HELP TEXT for UCS2 kverb
263 . Fix a problem in K95 where multiple threads could be attempting to
264   send a telnet negotiation simultaneously.
265ckcmai.c ckcdeb.h ckuus2.c ckuus3.c ckuusr.c ckuusr.h ckuus7.c ckctel.c
266ck_crp.c ckuat2.h ckuath.c, 4 Jan 2002.
267
268From Jeff:
269
270  Peter Runestig complaining that the Telnet Forward X code was corrupting
271  data.  This resulted in a very thorough examination of the telnet module
272  code and a discovery of some rather significant problems.  The root of the
273  problems is the lack of thread safety.  To correct this problem the
274  following was done.
275
276  All code (regardless of module) which outputs telnet commands is placed
277  into a mutex region to ensure that competing output threads do not result
278  in interleaving their output.  This could happen for instance when the
279  forward-x thread is forwarding data and the user changes the window size
280  or sends an AYT or BREAK.  Next the buffer used for input and output
281  processing were identical.  This means that output data could be treated
282  as input or vice versa.  Ugh....
283
284  I also spent some more time cleaning up setlin().  Mostly reorganizing the
285  code into single if (...) blocks so that breaking it up will be easier.
286
287ckctel.c ckuus7.c, 4 Jan 2002.
288
289Updated internal copyright notices.  All modules, 5 Jan 2002.
290
291From Jeff:
292  More of same, plus new makefile target and changes from Spike Gronim
293  for freebsd44+srp+openssl.
294ckcdeb.h ckcnet.c ckctel.c ckuus7.c ck_ssl.c makefile, 5 Jan 2002.
295
296Some minor updates and fixes to SSH and SET SSH help text.
297ckuus2.c, 6 Jan 2002.
298
299Added SET RGB-COLORS for GUI.  ckuusr.[ch], ckuus3.c, 6 Jan 2002.
300
301From Jeff: More Telnet changes, Debug semaphores for K95, etc: ckcdeb.h,
302ckuusr.h, ckuus[r35x].c, ckctel.[ch], ckuath.c, 7 Jan 2002.
303
304Added --xpos:n --ypos:n, SET GUI WINDOW POSITION x y, and changed SET
305RGB-COLORS to SET GUI RGBCOLOR.  Action needs to be filled in (in setguiwin()
306in ckuus3.c), and gui_xpos and gui_ypos need to be defined in cko???.c.
307ckuusr.h, ckuus[r3y].c, 7 Jan 2002.
308
309Added --fontname:name --fontsize:name (and facename as synonym for fontname).
310ckuusr.h, ckuus[7y].c, 7 Jan 2002.
311
312Moved GUI (not OS/2) SET TERM FONT code in ckuus7.c to its own routine,
313setguifont(), in ckuus3.c, and made GUI SET TERM FONT call this routine,
314and also made SET GUI FONT call the same routine.  ckuus[37].c, 7 Jan 2002.
315
316Added --termtype:, --height:, --width:, --user:.  Also added symbols for
317--telnet:, --ssh:, --ftp:, --[remote-]charset, and --password:, but didn't
318fill them in.  --password: is probably not a good idea (but we allow it for
319FTP); the others involve a lot of code-shuffling and reconciliation, which
320I'll try to do when I get a chance (especially the connection ones, which
321can be done as part of the setlin() restructuring).  ckuusr.h, ckuusy.c,
3228 Jan 2002.
323
324Also I tried commenting out the #ifndef KUI..#endif's around SET TERMINAL
325CHARACTER-SET (easier said than done because a crucial #endif was mislabeled).
326Let's see if it compiles & works...  ckuus7.c, 8 Jan 2002
327
328Added FTP [ OPEN ] /NOINIT, meaning don't send REST, STRU, and MODE commands
329upon making an FTP connection.  This allows connection to servers that close
330the connection (or worse) when given these commands (e.g. Linux 2.4 TUX 2.0
331FTP server).  ckcftp.c, 8 Jan 2002.
332
333Looked at adding caller ID support for the ANSWER command:
334
335 . SET ANSWER CALLER-ID { ON, OFF }
336 . SET ANSWER RINGS <number>
337 . \v(callid_xxx) xxx = { date, time, name, nmbr, mesg }
338 . CKD_CID modem capability
339 . Set CKD_CID for modems that have it.
340 . A quick survey shows:
341   - USR V.90:      No (but Jeff says some USRs have it).
342   - V.250:         No
343   - Lucent Venus:  No
344   - USR:           #CID=1 (the ones that have it -- X2?)
345   - Diamond Supra: #CID=1
346   - Rockwell 56K:  #CID=1
347   - PCTEL:         #CID=1
348   - Zoltrix:       +VCID=1
349   - Conexant:      +VCID=1
350 . Since there are different commands to enable caller ID reporting,
351   we need a new field in struct MDMINF.
352 . SHOW MODEM and SHOW DIAL would need updating.
353 . etc etc...
354
355This is all way too much for now so I just did the setting of the \v(callid_*)
356variables.  These are reset at the beginning of an ANSWER command, and then
357set by the ANSWER command if they come in; thus they persist from the time
358they are collected until another ANSWER command is given.  To take advantage
359of autoanswer, the user has to enable it in the modem (all the modems I found
360that support it have it disabled by default), and also has to set the number
361of rings to at least 2.  This can be done with (depending on the modem):
362
363  set modem command autoanswer on ATS0=2#CID=1\{13}
364  set modem command autoanswer on ATS0=2+VCID=1\{13}
365
366and undone with:
367
368  set modem command autoanswer on ATS0=1#CID=0\{13}
369  set modem command autoanswer on ATS0=1+VCID=0\{13}
370
371The variables can be accessed only after the call is answered.  Therefore the
372only way to refuse a call is to answer it, inspect the variables, and then
373hang it up if desired.  Future Kermit releases can do this more nicely (as
374sketched out above.)  Also while I was in the dialing code, I added result
375code VCON (= VOICE), used by several of the newer modems.  These changes are
376untested.  The SET ANSWER command is written but commented out.  ckuusr.h,
377ckcker.h, ckuus[r3].c, ckudia.c, 8 Jan 2002.
378
379From Jeff: fixes to --termtype:, --height:, --width:, --user:, and filling in
380of --rcharset:, which required extracting code from settrm() into a separate
381parse-method-independent remote character-set setting routine.  ckuus[7y].c,
3828 Jan 2002.
383
384From Jeff: More work on TERMINAL CHARACTER-SET code reorganization, and
385reinstatement of SET TERMINAL CHARACTER-SET in K95G.  Also, fix char/CHAR
386warnings in Telnet module.  ckuus7.c, ckctel.c, 9 Jan 2002.
387
388Made SET TERM CHARACTER-SET visible for all builds, including K95G, and filled
389in HELP text for it.  ckuus[27].c, 9 Jan 2002.
390
391Added help text for new extended options.  ckuusy.c, 9 Jan 2002.
392
393Commented out the return(-2) statement at the end of xgnbyte() to make the
394"Statement not reached" errors go away, after checking to make sure that there
395was no path that could fall through to the end.  I'm 99.99% sure there isn't,
396but that doesn't mean that some compilers might not still complain.  ckcfns.c,
3979 Jan 2002.
398
399From Jeff: fix typo in the K95 extended-option help text; add more
400semaphores to network i/o.  ckuusy.c, ckcnet.c, 10 Jan 2002.
401
402Undid ansiisms in set{lcl,rem}charset() declarations.  ckuus7.c, 10 Jan 2002.
403
404Removed a duplicated clause from the install target.  makefile, 10 Jan 2002.
405
406From Jeff: more semaphores.  ckcnet.c, 11 Jan 2002.
407
408Moved references to tmpusrid and tmpstring out of NOSPL #ifdefs -- they can
409be used with NOSPL.  setlin(): ckuus7.c, 13 Jan 2002.
410
411Made a dummy dologend() routine outside of #ifndef NOICP, so we don't have
412to enclose every reference to dologend in #ifdefs.  (I had added a bunch of
413calls to dologend() throughout the code to handle automatic LOCUS switching.)
414ckuus3.c, 13 Jan 2002.
415
416Moved "extern int nettype" outside of NOICP #ifdefs in ckuus4.c for NOICP
417builds.  13 Jan 2002.
418
419Moved a misplaced #ifdef in the VERSION command.  ckuusr.c, 13 Jan 2002.
420
421Did 81 different feature-selection builds on Linux (RH 7.0), all OK after the
422changes listed above for today.  13 Jan 2002.
423
424Added prototypes for set{rem,lcl}charset().  ckcxla.h, 13 Jan 2002.
425
426Added ckcxla.h to dependencies for ckuusy.c.  ckvker.com, 13 Jan 2002.
427
428Made a correction to the HELP SET LOCUS text and supplied a missing comma
429for HELP REMOTE.  ckuus2.c, 13 Jan 2002.
430
431Built OK on HP-UX 11.11 (K&R and ANSI), Solaris 8 (cc), Solaris 2.5.1 (gcc),
432SunOS 4.1.3 (cc and gcc), VMS 7.1 (DEC C, net and nonet), Unixware 7.1.1,
433Tru64 4.0G, HP-UX 10.20 (K&R), AIX 4.3.3, FreeBSD 2.2.8, Slackware 8.0, IRIX
4346.5.13f, IRIX 5.3 (??? Can't tell -- the computer ran out of swap space -- but
435it was OK a few days ago), VMS 5.5-2 (VAX C, UCX + nonet)...  HP-UX 9.05, ...
436
437Some corrections to comments in HP targets from PeterE.  makefile, 14 Jan 2002.
438
439Corrections to prototypes for set{rem,lcl}charset() (VOID, not void) from Jeff.
440ckcxla.h, 14 Jan 2002.
441
442Builds, cont'd...  SINIX 5.42, Red Hat Linux 5.2 on i386, SuSE 7.0 on S/390,
443Red Hat 7.1 on IA64, QNX 4.25, HP-UX 5.21/WinTCP, ...,
444
445Dell Coleman <dell@aleph.tum.com> noticed that in AIX, the COPY command always
446says "Source and destination are the same file" when the destination file
447doesn't exist.  This is because in AIX, realpath() fails with ENOENT (errno
4482).  The zfnqfp() code already accounts for this, but evidently not well
449enough.  So I did what I should have done long ago.  zfnqfp() was originally
450accomplished with do-it-yourself code.  Later I added support for realpath(),
451and partitioned the routine into mutually exclusive compile-time sections:
452#ifdef CKREALPATH realpath()... #else do-it-yourself... #endif.  But if
453realpath() failed, there was no recourse to the do-it-yourself code.  Today I
454replaced the #else with the #endif, so the do-it-yourself part is always
455included and is executed if the realpath() call fails.  Built and tested on
456AIX 4.3.3 and Solaris 2.5.1, as well as on Linux with and without the
457realpath() code included.  zfnqfp(): ckufio.c, 16 Jan 2002.
458
459Separated K95 and C-Kermit test version numbers, so C-Kermit can be RC.02
460while K95 is Beta.01.  ckcmai.c, 16 Jan 2002.
461
462Inhibited 0-length writes by conol() and conoll(), since they cause big
463trouble with the AIX 4.3.3 pty driver, e.g. when you have an SSH connection
464into AIX and run C-Kermit there.  ckutio.c, 16 Jan 2002.
465
466Suppressed "Switching LOCUS..." messages from FTP client when it was invoked
467from the command line.  ckcfns.c, 17 Jan 2002.
468
469Dave Sneddon noticed that FOPEN /APPEND gets "?Write access denied" in VMS
470if the file exists.  This is apparently because VMS zchko() does the wrong
471thing.  Commenting out the call zchko() in the VMS case gets past this but
472then the appended part of the file has different attributes than the orignal
473part, e.g.:
474
475  abc  <- original line (horizontal, normal)
476  d    <- appended line (vertical)
477  e
478  f
479
480VMS fopen() takes an optional 4th argument: a series of RMS keyword=value
481pairs.  Kermit doesn't give any.  Experimentation shows that appending to
482a Stream_LF works fine.  That'll be a restriction for now, until somebody
483sends in code to get the RMS attributes of the original file and feed them
484to fopen().  Also need code to fix VMS zhcko() to say whether it's OK to
485append to a file.  ckuus7.c, 17 Jan 2002.
486
487Somebody suggested I could get a working Kermit for Neutrino 2+ by doing the
488QNX6 build on Neutrino itself.  I verified that this can't be done -- at least
489not by me -- since Netutrino 2+ doesn't have a compiler, and we already know
490the version cross-built for it on QNX4 doesn't work.  17 Jan 2002.
491
492From Jeff: SET SSH GSSAPI KEY-EXCHANGE { ON, OFF } parsing, SHOW SSH.
493ckuus3.c, 18 Jan 2002.
494
495PeterE suggested that SET ESCAPE allow 8-bit escape characters because of the
496difficulty in entering Ctrl-\ on European keyboards and the hardship (e.g. to
497EMACS and VI users) of sacrificing another C0 control character.  Like
498everything these days, this turns out to be rather a bigger deal than it would
499seem.  The SET ESCAPE parser calls setcc(), which accepts control characters
500in various formats (literal, ^X notation, or numbers), and gives an error
501return if the value is not 0-31 or 127.  This is changed easily enough to also
502allow numbers between 128 and 255.  But who else calls setcc()?  The commands
503for setting Kermit packet start and end characters.  No big deal, this gives
504people a bit more flexibility in case they need it, but it won't be
505documented.  setcc(): ckuus7.c, 18 Jan 2002.
506
507Since code to display the escape character is scattered all over the place,
508and some of it indexes into an array based on the character value (which would
509now dump core if the escape character was > 128), I put the code in one place,
510a new shoesc() routine in ckuusx.c (which needs to be outside #ifndef NOICP,
511since the CONNECT modules use it even in command-line only builds).  Also
512discovered that this code was indexing into the nm[] array with tt_escape to
513get "enabled" or "disabled", which is no longer appropriate, so fixed this
514too.  ckuusr.h, ckuus[5x].c, 18 Jan 2002.
515
516Made SHOW ESCAPE, SHOW TERM, and the various CONNECT modules call shoesc(),
517and updated HELP SET ESC.  ckuus[25].c, ckucns.c, ck[cuvd9]con.c, 18 Jan 2002.
518
519After all that, it occurred to me that this is a really bad idea for K95,
520with all the confusion about Console code pages, OEM code pages, Windows
521code pages, and Unicode.  But I tried "echo \161" at the K95 prompt and got
522the expected 8-bit character in both the Console version and the GUI, so
523maybe it's OK after all.
524
525Removed the automatic IKSD login code from setlin() since it complicates
526interactive anonymous login.  ckuus7.c, 20 Jan 2002.
527
528An #ifdef clause from Matthew Clarke to avoid "redeclaration of free" error
529when building a curses version of C-Kermit for AIX 2.2.1 on RT PC.  ckuusx.c,
53022 Jan 2002.
531
532Took care of one detail I omitted when adding the 8-bit escape character:
533not stripping the 8th bit before comparing the keyboard char with the escape
534char.  ck[uv]con.c, ckucns.c, 24 Jan 2002.
535
536Started to go through Jeff's changes of the last week but he had run trim -t
537on them, which untabifies, so the diffs were huge.  Retabifying Jeff's files
538only makes matters worse.  So instead of comparing each old and new source
539file in EMACS windows with M-X Compare-Windows like I usually do (which can't
540be told to ignore whitespace), I had to work from the diff -c -b listings.
541In ascending order of size of diffs:
542
543ckcker.h: Add I_AM_SSHSUB definition.
544ckuusr.h: XXLINK and VN_PERSONAL, etc, definitions.
545ckuusy.c: Support for "I Am SSHSUB" invocation.
546ckuus5.c: Support for new K95 directory structure.
547ckcmai.c: Init endianness earlier (K95 TYPE was broken), "I Am SSHSUB" support.
548ckuus7.c: Security #ifdefs, SSH OPEN /PASSWORD, SSHSUB support
549ckcftp.c: <-- SAVE TIL LAST
550ckuus6.c: Add LINK command for K95 on NT.
551ckuus4.c: Support for new K95 directory structure; SSHSUB support
552ckuus3.c: Support for new K95 directory structure; some SSH changes
553ckuus2.c: Changes to SSH related help text, add HELP LINK text
554ckuusr.c: LINK command, SSH OPEN /PASSWORD: /SUBSYSTEM: switches,
555  Pattern-management fixes.
556ckctel.c, ck_ssl.c, ckuath.c, ckcnet.c:
557 Took Jeff's without looking.
558ckuusx.c, ckucns.c, ckucon.c, ckwart.c:
559  My changes from weeks ago that were never picked up.
560
561Built OK on Solaris with gcc and on SunOS with (K&R non-ANSI) cc.
56231 Jan 2002.
563
564Meanwhile, Jeff had made various changes in response to Jaya Natarajan at IBM,
565whose basic complaint was that numerous failure conditions were not being
566detected if the fullscreen file-transfer display was active.  Jeff found that
567this was because big blocks of code were skipped in that case and changed the
568code not to do that, which fixed the reported problems.  But later Jaya said
569that "ftp mget file1 file2" acted like "ftp mget *", so it seemed that Jeff's
570fixes broke file selection.  After taking Jeff's fixes for ckcftp.c, however,
571I still could not reproduce the problem.  ckcftp.c, 31 Jan 2002.  <-- Later,
572it turned out the problem was with IBM's custom FTP server.
573
574Fixed updates that I missed yesterday in ckcftp.c, ckuusr.c.  Moved misplaced
575#ifdef in ckuusy.c breaking nonet builds.  Added #ifdefs to sysinit() for
576nonet builds in ckutio.c.  Ran through build-in-many-configurations script
577in Linux, all builds OK.  1 Feb 2002.
578
579Moved shoesc() definition outside of NOXFER to fix NOXFER builds.
580ckuusx.c, 1 Feb 2002.
581
582Added MYCUSTOM definition alongside KERMRC and changed KERMCL to be the
583same as CKMAXPATH, instead of some random hardwired number.  ckuusr.h,
5841 Feb 2002.
585
586Changed ckcdeb.h to define DIRSEP and ISDIRSEP(), and put #ifndef
587[IS]DIRSEP..#endif around all [IS]DIRSEP definitions in ck[udso]fio.c, so we
588can finally put away the many repeated #ifdef chains when we get around to it.
5891 Feb 2002.
590
591Make VMS zkermini() return 1 on success, 0 on failure, rather than 0 always.
592ckvfio.c, 1 Feb 2002.
593
594Added code to doinit(), just before it goes to execute the init file.  If the
595init file name we are about to open is empty or fails zchki(), substitute the
596customization filename.  For now this code is in #ifdef USE_CUSTOM..#endif,
597which is not defined by default.  It does the trick in Unix and VMS.  Also
598included code from Jeff for K95, but this needs verification and testing.
599Also used DIRSEP and ISDIRSEP() throughout doinit() instead of the long #ifdef
600chains.  ckuus5.c, 1 Feb 2002.
601
602Moved shoesc() prototype from ckuusr.h to ckcker.h so modules that need it
603don't have to include ckuusr.h just for this one thing (example: ckvcon.c).
6041 Feb 2002.
605
606Defined USE_CUSTOM by default, except if NOCUSTOM is defined.  ckuusr.h,
6071 Feb 2002.
608
609Fixed kermit-sshsub code to really enter server mode, and to print
610"KERMIT READY TO SERVE..." so scripts can wait for it.  Also bumped the
611C-Kermit test ID to RC.03 and the K95 one to Beta.02.  ckcpro.w, ckcmai.c,
6122 Feb 2002.
613
614I was thinking about adding SET COMMAND BUFFER-SIZE to let people allocate
615as big a buffer as they wanted at runtime, mainly for defining huge macros.
616Moved the SCMD_blah definitions from ckuusr.h to ckuus3.c, since they aren't
617used anywhere else.  But stopped there since the rest turns out to be a rather
618big deal.  ckuusr.h, ckuus3.c, 2 Feb 2002.
619
620From Jeff, 3 Feb 2002:
621 . Fix an out-of-order modem name in the SET MODEM TYPE table: ckudia.c.
622 . Use SET LOGIN USER and PASSWORD if present. ckcftp.c.
623
624Cody Gould noticed that array declarations had become case sensitive, and
625upper case didn't work.  Diagnosis: misplaced case conversion in xarray().
626Fixed in ckuus5.c, 4 Feb 2002.
627
628SHOW VAR dumps core on \v(sexpression) or \v(svalue) -- failure to check for
629NULL pointer.  I wonder why this didn't happen before (answer: because I was
630doing it on SunOS; now I'm doing it on Solaris).  ckuus4.c, 6 Feb 2002.
631
632I've had several requests for "show var name name name...".  I added this to
633doshow(), such that SHOW VAR works exactly as it did before (if you don't give
634it an arg, it lists all variables; if you give it an arg, it appends "*" to it
635and lists all matching variables) but now you can also give more than one arg
636and it works the same way with each one as it did before if you gave it a
637single item (i.e., "*" is appended, so "show var os cmd" shows all variables
638whose names begin with "os" or "cmd".  You can also freely use pattern
639notation, including anchors.  Hmmm, no, actually it's different in that now
640each includes an implied * before AND after, so "show var version" shows all
641variables whose name contain "version" rather than all variables whose names
642start with it.  ckuus5.c, 6 Feb 2002.
643
644Cody Gould reported that WRITE FILE blah blah \fexec(anything) ... got a
645spurious "File or Log not open" error.  This turns out to be a rather
646pervasive problem -- whenever you use \fexec() it calls the parser recursively
647and this can run roughshod over global variables, such as our innocent little
648x, y, and s.  The fix in this case was to put x and y on the stack.  The same
649thing probably needs doing in about 10,000 other places.  Too bad C isn't
650Algol.  ckuusr.c, 6 Feb 2002.
651
652Minor fix to SHO VAR -- the "^" anchor wasn't working (e.g. "show var ^os").
653ckuus5.c, 6 Feb 2002.
654
655Fixes from Jeff for FTP file-transfer character-set translation in K95 and
656in WIKSD, plus updated K95 SSH help text.  ckcftp.c, ckcfns.c, ckuus2.c,
6577 Feb 2002.
658
659Server has its date set in the past.  Client says "remote dir".  Server sends
660A packet containing old date.  If client has FILE COLLISION UPDATE, it
661rejects the directory listing.  Changed gattr() to only reject real files
662(introduced by F packet), not X-packet material like directory listings.
663ckcfn3.c, 7 Feb 2002.
664
665Up-down arrow keys for command recall.  People have been asking for it for
666years but now it's actually important because of PDAs that don't have Ctrl
667keys.  Would have been trivial except that we use getchar() rather than
668coninc() for reading from the keyboard in Unix so conchk() doesn't help.  In
669fact there are lots of other places where conchk() is used this way and works
670only by accident.  The only reason we never noticed a problem before is that
671characters don't usually arrive from the keyboard that fast.  But when an
672arrow key sends "ESC [ A" all once, the stdin buffer gets some extra stuff in
673it, which getchar() will return next time, but which coninc()/conchk() will
674never see.  So I added a new cmdconchk() routine which, if the keyboard is
675being read with getchar() rather than coninc(), looks at the stdin buffer.
676Unfortunately, however, there is no API for this, nor is there any standard
677way to access the stdin buffer directly.  So first I did it for Solaris.  Then
678to make it portable requires a survey of the headers for every platform.  I
679found four major variations:
680
681  stdin->_r:
682    {Free,Open,Net}BSD, BSDI
683  stdin->_cnt:
684    SunOS, Solaris, HP-UX 5-6, AIX, VMS, SINIX, IRIX 5.3-6.5, DGUX
685    4.2BSD, 4.3BSD, OSF/1..Tru64, QNX4, Unixware 1.0-2.1.0
686  stdin->__cnt:
687    HP-UX 7-11, SCO: OSR5.0.6a, Unixware 2.1.3-7.x, OU8, UNIX 3.2v4.x
688  Subtract read from end pointer (_IO_file_flags defined):
689    Linux (tested on RH 5.2 thru 7.1)
690
691The Linux method is new and different to account for multibyte characters.
692All the others assume character == byte.
693
694For docs: ANSI only, 7-bit only; both application and cursor modes are
695accepted.  Only up and down arrow are handled; left and right arrows cause
696a beep.  ckucmd.c, 8 Feb 2002.
697
698Build-all: Discovered that changing CTTNAM from TT: to SYS$INPUT: in VMS
699(which was done on 3 Jan 2002 to work around problems starting Kermit in
700batch, spawn'd, etc) breaks Kermit on VMS 5.5/VAX (concb() fails with "lacks
701sufficient privilege"; if you enable all privs Kermit starts but then spews
702out a constant stream of BEL characters).  If you put dftty back to "TT:",
703everything is fine -- I have no idea why, so I used #ifdef VMSV70 to decide,
704which is totally crude.  Next I had to find where the boundary really is: VAX
705vs Alpha?  VAX C vs DEC C?  Or between VMS releases?  Built on:
706 . VMS 6.2 Alpha (DEC C) - OK with TT:
707 . VMS 6.2 Alpha (DEC C) - OK with SYS$INPUT: <-- keep this one
708 . VMS 7.1 VAX   (DEC C)
709So the final condition is #ifdef VMSV60.  ckvker.com, ckvtio.c, ckuus5.c.
710
711QNX 6 needed some attention too:
712 . Whoever did the makefile target made the default port "/dev/ser1".
713 . Arrow keys...
714But I gave up on getting arrow keys to work -- it should be just like *BSD,
715but for some reason gcc complains that struct FILE has no _r member, even
716though it does (getchar uses it).
717
718Checked stdio.h on Mac OS X and it looks like the *BSDs.
719
720--- C-Kermit 8.0.201 ---
721
722Removed -g from solaris2xg+krb5+krb4+openssl+shadow makefile target -- it
723was producing a 15MB binary!  makefile, 14 Feb 2002.
724
725Fixed a couple thinkos in "make install": $(DESTDIR) should not have been
726included in the tests for whether INFODIR or SRCDIR were desired.  makefile,
72714 Feb 2002.
728
729(tarball refreshed 16 Feb 2002)
730
731--- C-Kermit 8.0.201 ---
732
733From Jeff: Better seeding of \frandom(): ckcmai.c, ckuus4.c, 18 Feb 2002.
734
735From Jeff: Make arrow keys work in WIKSD, but now also unconditionally
736compile arrow-key code in all versions.  ckucmd.c, 18 Feb 2002.
737
738From Jeff: ckuath.c, ck_ssl.c, ckcnet.c (didn't look).  18 Feb 2002.
739
740Added ORIENTATION command, that lists the various important directories, and
741\flongpathname() and \fshortpathname(), which do path format conversions in
742Windows, and are just synonynyms for \fpathname() elsewhere.  The new functions
743need building and testing in Windows.  ckuusr.h, ckuus[r24].c, 18 Feb 2002.
744
745Changed PWD for Windows only to show both short and long paths (but only if
746they are different; otherwise it behaves as before).  ckuusr.c, 18 Feb 2002.
747
748Changed default Windows prompt to show long pathname. ckuus5.c, 18 Feb 2002.
749
750Updated INTRO command to mention FTP, HTTP, and SSH.  ckuus2.c, 18 Feb 2002.
751
752From Jeff: fixes for typos in GetLongPathName() code: ckuus[r4].c, 22 Feb 2002.
753
754From Jeff: net/auth updates: ckcnet.c, ckuath.c, 22 Feb 2002.
755
756Added -DUSE_FILE__CNT to NCR MPRAS targets, George Gilmer: makefile,
75724 Feb 2002.
758
759From Jeff: Add support for GetLongPathName() in Win95 and NT: ckcdeb.h,
760ckuus[r4].c, 24 Feb 2002.
761
762From Jeff: More fixes for FTP SIGINT, plus fix [M]PUT /MOVE.  ckcftp.c,
76324 Feb 2002.
764
765Fixed an unguarded reference to inserver, gtword(): ckucmd.c, 24 Feb 2002.
766
767Adapted RETRIEVE for use with FTP connections; this one was missed when
768adapting GET, REGET, MOVE, etc.  ckuus6.c, ckcftp.c, 24 Feb 2002.
769
770Added special COPYRIGHT command text for the free version of WIKSD.
771ckcmai.c, ckuusr.c, 24 Feb 2002.
772
773C-Kermit, when in CONNECT mode and given the <Esc-Char>U sequence, would
774unconditionally close the connection if it was a network connection.  This
775is bad when Telnetting to a modem server.  I added to code to prevent this
776in the RFC2117 TELNET COMPORT case but I'm not sure how to exend this to the
777general case (or whether it would be a good idea).  ckucns.c, 24 Feb 2002.
778
779During file transfer, chktimo() calls ttgspd() for every packet, which clearly
780doesn't make sense on network connections, especially since on Telnet COMPORT
781connections it results in a network speed query for every packet.  Rearranged
782the code so this happens only on true serial-port connections.  ckcfn2.c,
78324 Feb 2002.
784
785From Jeff: Fix reversed ANSI/non-ANSI function declarations clauses in
786ckcftp.c, 26 Feb 2002.
787
788Changed Unix CONNECT module to call kstart() only when it has a chance of
789doing anything (i.e. a Kermit packet has been partially detected, or the
790packet start character just came in), rather than unconditionally on every
791incoming character.  ckucns.c, 8 Mar 2002.
792
793FTP PUT /SERVER-RENAME:, /RENAME-TO:, /MOVE-TO: were sticky.  Patch: In
794ckcftp.c, near the top of doftpput(), add the lines marked with "+":
795
796    makestr(&filefile,NULL);            /* No filename list file yet. */
797+   makestr(&srv_renam,NULL);           /* Clear /SERVER-RENAME: */
798+   makestr(&snd_rename,NULL);          /*  PUT /RENAME */
799+   makestr(&snd_move,NULL);            /*  PUT /MOVE */
800    putpath[0] = NUL;                   /* Initialize for syncdir(). */
801
802ckcftp.c, 26 Mar 2002.
803
804\fday() and \fnday() were broken for dates prior to 17 Nov 1858.  Fixed in
805fneval(): ckuus4.c, 28 Mar 2002.
806
807From Jeff:
808 . New calling convenion for demoscrn(): ckucmd.c, ckuusx.c
809 . Fix for host-initiated 80/132 col screen mode change.  ckuus7.c.
810 . New \v(desktop) variable: K95 user desktop directory, ckuusr.h, ckuus4.c
811 . New \v(rfc2717_signature) var: Telnet Com Port, ckuusr.h, ckuus4.c
812 . Uncomment "not-reached" return(-2) in xgnbyte(): ckcfns.c
813 . New dates: ckcmai.c.
814 . Telnet Com Port fixes: ckutio.c
815 . SET PRINTER fixes for K95: ckuus3.c
816 . Session limit adjustments: ckuus3.c
817 . New directory layout for K95 (TAKE, ORIENT): ckuusr.c
818 . Fixes for Telnet Com Port, recycling SSH connections: ckuusr.c
819
820From me, not picked up by Jeff previously:
821 . kstart() speedup: ckucns.c.
822
8231 Apr 2002.
824
825---K95 1.1.21---
826
827From Jeff, 4 Apr 2002:
828 . More fixes for Telnet Com Port: ckuus4.c, ckudia.c, ckutio.c, ckcnet.c:
829   . network connections will check for carrier detect if SET
830     CARRIER-WATCH is ON.   This could have a potential conflict if
831     the option is negotiated and the carrier is off, but the site
832     requires login.
833   . modem hangup message generated since the dial module did not
834     believe that network modems could be reset with a DTR drop.
835 . Version number adjustments: 8.0.203, 1.1.99: ckcmai.c.
836 . Security: ck_ssl.[ch], ckuath.c.
837
838---C-Kermit 8.0.203---
839
840From Jeff, 6 Apr 2002:
841 . Fix typo in HELP REMOTE HOST: ckuus2.c.
842 . More Telnet Com Port fixes: ckctel.c, ckcnet.c, ckudia.c, ckutio.c
843
844From Jeff, 9 Apr 2002:
845 . Fix autodownload problem: ckcfn[2s].c.
846
847Chiaki Ishikawa reported that in Linux (two different kinds), if you choose
848hardware parity, CONNECT, then escape back, the speed can change.  I tracked
849this down to the following statement in ttvt():
850
851        tttvt.c_cflag &= ~(IGNPAR);     /* Don't discard incoming bytes */
852
853Somehow execution of this statement corrupted the speed words of the termios
854struct, which are entirely separate words that are nowhere near the c_cflag
855member.  Anyway, the statement is wrong; it should be:
856
857        tttvt.c_cflag |= IGNPAR;        /* Don't discard incoming bytes */
858
859Fixing it cured the problem; don't ask me why.  ckutio.c, 9 Apr 2002.
860
861From Jeff:
862  fixes the problem reported by robi@hastdeer.com.au.  The request to
863  enter server mode was received while we were entering server mode.
864  But the server was waiting for the response to REQ_STOP sent to the
865  client.  Therefore, we weren't quite in server mode yet and the
866  request to enter server mode was rejected.  A check for the sstate
867  value solves the problem.  ckctel.c, 10 Apr 2002.
868
869Chiaki Ishikawa (CI) discovered the real cause for the speed changing problem.
870I was setting the IGNPAR bit in the wrong flag word: it should have been
871c_iflag instead of c_oflag, silly me.  Fixed in ttvt() and ttpkt(): ckutio.c.
872I also did a thorough census of all the termio[s] flags to ensure each was
873applied to the right flag word -- they were, IGNPAR in the HWPARITY case was
874the only mistake.  CI also discovered that the speed words in the Linux
875termios struct are not used at all -- the speeds are encoded in an
876undocumented field of c_cflag, which explains the problem.  10 Apr 2002.
877
878Any use of \{nnn} character notation in a macro definition, loop, or other
879braced block caused an "unbalanced braces" parse error.  The backslash in this
880case is not quoting the open brace; it's introducing a balanced braced
881quantity.  Special-cased in getncm(): ckuus5.c, 12 Apr 2002.
882
883The semantics of "if defined \v(xxx)" were changed in 8.0 to avoid obnoxious
884error messages when xxx was not a built-in variable (see notes of 19 Nov
8852000), such that "if defined \v(xxx)" would always succeed if there were such
886a variable, even if it had no value.  The behavior that is documented in the
887book (and also in ckermit70.html) and that we had in versions 6 and 7, was
888that IF DEFINED \v(xxx) would fail if \v(xxx) was defined but had an empty
889value OR if it was not defined, and would succeed only if it was defined and
890had a value.  Fixed in boolexp(): ckuus6.c, 12 Apr 2002.
891
892What about \function()s?  IF DEF \fblah() presently succeeds if the function
893exists; you don't even have to give arguments.  I think this behavior is more
894useful than if I required valid arguments and then evaluated the function --
895you can do that anyway with 'if not eq "\fxxx(a,b)" "" ...'  Of course this
896argument applies to "if def \v(xxx)" too, except that the current behavior is
897consistent with the 7.0 behavior, so there is no need for a change.
898
899Kent Martin discovered that if a macro contains a LOCAL statement for a
900variable whose name is the same as, or a unique left substring of, the macro's
901name, then undefining the local variable makes the macro disappear:
902
903  define DateDiff {
904    echo {DateDiff(\%1) executing...}
905  }
906  define Kent {
907    do DateDiff {2}
908    local date
909    assign date {}
910    do DateDiff {3}  <-- This fails (A)
911  }
912  do DateDiff {1}
913  do Kent
914  do DateDiff {4}    <-- So does this (B)
915
916The first part of the problem is that "assign date {}" called delmac with
917exact=0, so delmac evidently deleted first macro whose name started with
918"date" -- and since the only one was DateDiff, that's the one that was
919deleted.  Fixing this (change "delmac(vnp,0)" to "delmac(vnp,1)" in dodef())
920got us past A.  The second part was making the same fix to the delmac()
921call in popclvl().  ckuus[56].c, 13 Apr 2002.
922
923The INPUT command ignored the parity setting, thus SET PARITY EVEN,
924INPUT 10 "login:" didn't work.  Fixed in doinput(): ckuus4.c.  Also fixed a
925bogus #ifdef COMMENT section that messed up the block structure of the module
926and therefore EMACS's indenting.  18 Apr 2002.
927
928Added sco32v500net+ssl and Added sco32v505net+ssl targets, from Scott Rochford
929at Dell (not sure yet if they work).  Makefile, 19 Apr 2002.
930
931From Jeff, 22 Apr 2002:
932 . Added "darkgray" color and made "dgray" an invisible synonym: ckuus3.c.
933 . Fix carrier sense on Telnet Com Port immediately after dial: ckudia.c.
934 . Change krb5_des_blah() arg list: ckutio.c.
935 . Fix ttgmdm() for Telnet Com Port: ckutio.c.
936 . Fix tthang() return code: ckutio.c.
937 . Add aix43gcc+openssl target: makefile.
938
939From Jeff, 25 Apr 2002:
940 . Fix SET GUI keyword table: ckuus[37].c.
941 . A final fix to Telnet Com Port: ckctel.c, ckcnet.c.
942
943From Jeff, 26 Apr 2002:
944 . Another final fix to Telnet Com Port: ckctel.c, ckudia.c.
945
946From Jeff, 27 Apr 2002:
947 . separate the wait mechanism for TELNET SB COMPORT synchronous messages
948   from the asynchronous TELNET SB COMPORT MODEMSTATUS messages: ckctel.[ch]
949 . fix debug messages in Certificate verify functions: ck_ssl.c, ckcftp.c.a
950
951Frank, 27 Apr 2002:
952 . Fixed VMS zgetfs() to fail when file doesn't exist: ckvfio.c.
953 . Fixed UNIX zgetfs() to check for null or empty arg: ckufio.c.
954 . Added #include <time.h> for time() call: ckcmai.c.
955 . Add casts to args in tn_wait() calls: ckctel.c.
956
957SINIX-P 5.42 (Pyramid architecture) makefile target from Igor Sobrado.
958makefile (no source-code changes), 1 May 2002.
959
960From Jeff, 5 May 2002,
961 . Fix some "unknown host" messages: ckcftp.c.
962 . Add more casts to tnc_wait() calls: ckudia.c.
963 . Improvements to SHOW SSH, SHOW GUI: ckuus3.c.
964 . Fixes to SET COMMAND { WIDTH, HEIGHT }: ckuus3.c.
965 . Updates to ck_ssl.[ch], ckctel.c, ckcnet.c.
966
967Fixed the erroneous setting of ssh_cas during switch parsing rather than
968after cmcfm() in setlin(): ckuus7.c, 5 May 2002.
969
970setlin() decomposition (2300 lines), Part One:
971
972 . Copied a big chunk from the end of setlin(), beginning with net directory
973   lookup, but only the network-specific and common parts, to a new routine,
974   cx_net(), 900 lines.
975
976 . Extracted many repetitious lines of error-message code from cx_net()
977   to a new routine, cx_fail().  Error messages are stored in slmsg, and
978   also printed but only if we were not called from a GUI dialog (and
979   QUIET wasn't set, etc etc).  Any adjutments in this policy can now be
980   made in one place.
981
982 . I put a call to cx_net() in setlin() just before all the code it replaced.
983   It works for TELNET and SET HOST /TELNET.
984
985 . Built with mkwatsol-k5k4ssl; after a couple fixes it builds OK and makes
986   Kerberized connections OK.
987
988 . Copied the serial-port and common parts of the setlin() post-cmcfm()
989   code to another new routine, cx_serial(), about 275 lines.  Fixed
990   messages not to come out when called from GUI dialog, etc.  Inserted
991   a call to cx_serial() at the appropriate spot in setlin().  Tested
992   serial connections on watsun with "set line /dev/ttyh6", works OK.
993
994 . Removed all the code from setlin() that was copied to cx_*().  This slims
995   setlin() down to 1120 lines.  Tested regular Telnet, Kerberized Telnet, and
996   serial connections again, all OK.  The Unix version of the SSH command is
997   OK too.
998
999setlin() deconstruction, Part Two:
1000
1001Now that we have the common network and serial connection pieces moved out of
1002setlin(), we still need to move out the little code snippets for each network
1003type that take place between command confirmation and the common code we just
1004replaced.   As far as I can tell, this needs doing only for SSH.  The code
1005labeled "Stash everything" copied to cx_ssh() but I didn't remove the original
1006code since I can't test this.  I think I'm done -- maybe I'm overlooking
1007something but I don't know what...  First we need to test the heck out of it
1008in all command-line versions (K95 and C-Kermit).  Then to use this from
1009the GUI, see the calling sequences for cx_serial(), cx_net(), and cx_ssh():
1010
1011 . For serial or TAPI connections, the GUI should call cx_serial().
1012 . For SSH connections, it should call cx_ssh() and then cx_net().
1013 . For all other network connections, just calls cx_net().
1014
1015ckuus7.c, Cinco de Mayo de 2002.
1016
1017New ckuus7.c from Jeff, 8 May 2002.  Merge cx_ssh() into cx_net().  Also: I
1018had made line[] an automatic variable, since the global line[] buffer is used
1019by almost every parsing routine in C-Kermit to hold string fields between
1020parsing and execution but Jeff says he found that some code somewhere depended
1021on line[] containing the hostname after setlin() was finished.
1022
1023From Jeff, 10 May 2002:
1024 . Fix SET SSH STRICT-HOST-CHECKING parse: ckuus3.c.
1025 . Add prototypes for cx_net() and cx_serial(): ckuusr.h.
1026 . Add ANSI versions of cx_net() and cx_serial() declarations and supply a
1027   missing parameter in the cx_serial() invocation, change SSHCMD cx_net()
1028   invocation to new form.
1029
1030From Jeff, 16 May 2002:
1031 . ANSI strictness changes: ck_ssl.[ch]
1032 . New DIALER command: ckuusr.[ch]
1033 . Correction to how -0 turns off autodownload: ckuusy.c
1034 . Prototypes for GUI menu action functions: ckuusr.h.
1035 . Replace setting of GUI-action variables by function calls: ckuus[3457x].c
1036 . Fix FTP -z switch parsing: ckcftp.c.
1037 . Fix SET HOST testing of setlin() return code: ckuus3.c
1038
1039From Jeff, 18 May 2002:
1040 . Allow half-size GUI fonts: ckuus[35y].c.
1041
1042Fixed setguifont() to parse fractional font sizes and round to nearest half
1043point.  ckuus3.c, 18 May 2002.
1044
1045For GUI, wrote front ends for getyesno(), readtext(), and readpass():
1046
1047 . uq_ok() prints text and gets Yes/No, OK/Cancel, or just OK response.
1048   This replaces getyesno() and can also be used for alert or help boxes.
1049
1050 . uq_txt() prints text and gets a single text response.  Replaces
1051   readtext() and readpass().
1052
1053 . uq_mtxt() is like uq_txt() but allows multiple text fields.  Replaces
1054   any combination of readtext() and readpass().
1055
1056Obviously the #ifdef KUI portions of the uq_blah() routines need filling in.
1057ckuusr.h, ckuus3.c, 18 May 2002.
1058
1059Converted selected getyesno() calls to uq_ok(): ckcftp.c, ckuus3.c, ckuus6.c.
1060Some were not converted because it was inappropriate, e.g. DELETE /ASK; others
1061because they're in Jeff's code.  The most interesting conversions are in the
1062DIAL command when DIAL CONFIRMATION is ON.  Here there is a dialog for each
1063phone number asking if it's OK (ug_ok()) and if not, asking for a replacement
1064(uq_txt()); seems to work fine in C-Kermit.  All the candidates for uq_mtxt()
1065are in Jeff's code.  18 May 2002.
1066
1067From Jeff: Convert remaining getyesno/readtext/readpass calls to uq_blah()
1068so they can be GUI dialogs.  ckuus[37].c, ckcftp.c, ckuath.c, ck_ssl.c,
106921 May 2002.
1070
1071Added KCD command = CD to symbolic directory name (EXEDIR, COMMON, APPDATA,
1072TMPDIR, etc etc).  ckuusr.h, ckuus[r25].c, 21 May 2002.
1073
1074From Jeff, 28 May 2002:
1075 . --title: commandline option: ckuusr.h, ckuusy.c
1076 . Fix some #includes, move some declarations: ckcfns.c
1077 . Change K95 version from Dev.00 to Beta.01
1078 . ASK[Q] /GUI: ckuus6.c.
1079 . Various GUI screen updates and #ifdefs: ckuus7.c
1080 . Add missing cx_net() calls to new setlin() for file SuperLAT..: ckuus7.c
1081 . Updated uq_*() routines for GUI dialogs: ckuus3.c.
1082
1083Added GETOK switches (/TIMEOUT for all; /POPUP and /GUI for K95G):
1084ckuus6.c, 29 May 2002.
1085
1086Added HELP SET GUI text.  ckuus2.c, 29 May 2002.
1087
1088From Jeff:
1089 . Another K95-specific #include for ckcfns.c.
1090 . More items for K95G Actions menu.
1091 . Change K95G Locus switching to call setlocus() rather than set variable.
1092 . Ditto for several other variables now settable from Actions menu.
1093 . Fix SET HOST /NET:SSH status code so IF SUCCESS works.
1094 . Fix SHOW SSH port-forwarding.
1095ckcfns.c, ckuus[r367].c, ckcftp.c, ckcmai.c, 30 May 2002.
1096
1097Changed SET LOCUS to have a new value, ASK, corresponding to new autolocus
1098value of 2, K95G only.  Changed setlocus() to not do anything if the new and
1099old loci are the same, otherwise to invoke a GUI dialog in K95G if autolocus
1100is 2, and also to handle any text messages.  Changed SHOW COMMAND to show ASK
1101value for SET LOCUS.  Rewrote HELP SET LOCUS.  ckuusr.[ch], ckuus[23].c,
1102ckcftp.c, 30 May 2002.
1103
1104Add a missing space to Locus popup, and fix Jeff's version of the code to
1105compile in C-Kermit.  ckuusr.c, 31 May 2002.
1106
1107From Jeff, for K95 GUI, 6 June 2002:
1108 . Force some GUI popups to be in foreground: ckuus3.c.
1109 . Fix SHOW TERM font display: ckuus5.c.
1110 . Update K95 version numbers and date (4 June 2002): ckcmai.c.
1111 . Add note about encrypted private keys vs scripts to HELP SET AUTH: ckuus2.c.
1112 . Fix SET HOST for DECnet: ckuus7.c.
1113
1114--- K95 2.0 ---
1115
1116From Jeff, 7 June 2002:
1117 . Fix some #ifdefs for Unix builds (locus, dial, etc): ckuus7.c
1118 . Add gui_resize_scale_font() prototype: ckuus3.c
1119 . Add some missing SET GUI commands: ckuus3.c
1120 . Update version numbers: ckcmai.c
1121
1122--- K95 2.0.1 ---
1123
1124From Jeff, 11 June 2002:
1125 . Conditionalize Locus-switching popup text for GUI/Console: ckuusr.c.
1126 . Fix the SRP_installed_as_server() function.  The new API returns TRUE even
1127   if the SRP config and password files cannot be found.  Went back to the old
1128   API.  This bug affects C-Kermit 8 when built with SRP as well as 1.1.21
1129   through 2.0.1.  Since iksdnt.exe has not been shipped yet I fixed it and
1130   uploaded a new non-beta build of it.  ckuath.c.
1131
1132From Jeff, 12 June 2002:
1133 . Fix SSH AGENT ADD: ckuusr.c.
1134 . Fix --facename: option to not fail if name unknown: ckuusy.c.
1135 . Fixes for OpenSSL 0.9.7 and OpenBSD 3.1: ck_ssl.c.
1136 . Fix SET AUTH TLS VERIFY NO to prevent a dialog but still a warning if
1137   SET AUTH TLS VERBOSE ON is set: ck_ssl.c.
1138 . Fix FTP code to verify the hostname as specified by the user and not
1139   the hostname discovered by the reverse DNS lookup.  For example,
1140     FTP OPEN kermit.columbia.edu
1141   should produce a dialog because that name is not in the certificate
1142   even though ftp.kermit.columbia.edu (the reverse DNS name) is:  ckcftp.c.
1143
1144Add support for Solaris 9 and NetBSD 1.6.  makefile, ckuver.h, ckcdeb.h,
114513 Jun 2002.
1146
1147Discovered that Solaris 9 wants to hide the members of struct FILE, and
1148enforces this for 64-bit builds.  They offer some functions like __fbufsize()
1149to get the info, but not the info we need for reading escape sequences (the
1150_cnt member).  Let's hear it for political correctness.  Created new solaris9g
1151(32-bit) and solaris9g64 (64-bit) targets.  Sorry, no arrow keys in 64-bit
1152mode.  Also no more direct access to sys_errlist[]; must use strerror().
1153makefile, ckucmd.c, 13 Jun 2002.
1154
1155Added solaris9g+openssl+zlib+pam+shadow, which in turn required adding
1156solaris2xg32+openssl+zlib+pam+shadow, needed for gcc 3.1 in which you have
1157to specify 32-bit.  Fails for some mysterious reason in link step
1158(can't find libssl.so.0.9.6 even though it's there).  makefile, 13 Jun 2002.
1159
1160Solaris 8 empty socket problems again -- tthang() times out, subsequent
1161tcsetattr() calls do horrible things.  Added a bandaid to ttclos(): don't
1162call tcsetattr() any more if hangup timed out.  ckutio.c, 14 June 2002.
1163
1164Gerry B reported the bandaid got us bit farther but Kermit still disappears.
1165Added code to reassert the alarm signal handler, since it is likely that
1166Solaris has become stricter about this since last time I looked.  (Later
1167Gerry reported back that this did the trick -- C-Kermit now exits normally
1168and releases the lockfile).  ttclos(): ckutio.c, 17 Jun 2002.
1169
1170If you use Kermit to copy a file to a destination file that already exists and
1171is longer than the source file, the destination file is not truncated.  I had
1172mistakenly assumed that setting O_CREAT in the open() call in zcopy() would
1173create a new copy of the file.  Fixed by also setting O_TRUNC.  ckufio.c,
117417 Jun 2002.
1175
1176Updated HELP INPUT and MINPUT text to explain 0 and -1 timeout values, and
1177HELP DIAL to explain about entering CONNECT mode automatically.  ckuus2.c,
117817 Jun 2002.
1179
1180Got rid of client-side "Press the X or E key to cancel" message when giving
1181a REMOTE command if QUIET is set or if XFER DISPLAY is NONE.  ckuus7.c,
118217 Jun 2002.
1183
1184From Jeff 25 Jun 2002:
1185 . Add SUN terminal type: ckuusr.h, ckuus[57].c.
1186 . Add GUI file transfer display: ckcker.h, ckuus[47x].c.
1187 . Changes to allow C-Kermit to build with OpenSSL 0.9.7.  Current
1188   C-Kermit code is designed to compile with 0.9.6 and earlier.  To
1189   compile with 0.9.7 you must specify -DOPENSSL_097.  This avoids
1190   missing symbols in the DES library.  The functions in OpenSSL were
1191   renamed in 0.9.7 to avoid link time conflicts with Kerberos 4.
1192   ckufio.c ck_crp.c ckuath.c ck_ssl.h ck_ssl.c, makefile.
1193
1194From Jeff 26 Jun 2002:
1195 . apparently the SSL Passphrase Callback function was not converted
1196   from readpass() to uq_txt()
1197 . FTP Authentication failure errors were not being reported to the
1198   user.  So a failure would appear to be a successful completion
1199   unless FTP DEBUG was ON.  Now the message is reported unless
1200   the QUIET flag is set.
1201ck_ssl.c, ckcftp.c.
1202
1203SET TRANSFER MODE MANUAL didn't work for FTP; fixed in putfile() and getfile():
1204ckcftp.c, 1 Jul 2002.
1205
1206Changed debug log for FTP to log "FTP SENT" and "FTP RECD" for protocol
1207messages, just like we do for Telnet, to make it easy to grep them out of
1208the log.  ckcftp.c, 1 Jul 2002.
1209
1210In FTP MGET /UPDATE, equal times spuriously caused download.  doftpget() was
1211misinterpreting chkmodtime()'s return code.  ckcftp.c, 3 Jul 2002.
1212
1213In FTP MGET /RECOVER, recovery is skipped if the local file is newer than
1214the remote.  This would seem to make sense, but when a download is
1215interrupted, the partial file never gets the date of the remote file, so
1216the partial file is always newer, and recovery never works.  Fixed in
1217recvrequest() by commenting out the date check.  ckcftp.c, 3 Jul 2002.
1218
1219A better way to fix the previous problem is to always set the file date from
1220the server and then only allow /RECOVER to work when the dates are equal.
1221But that's not possible because MDTM is not implemented universally, and it
1222conflicts with how Kermit currently works, namely that FTP DATES are OFF by
1223default.  Also, checking dates prevents [M]GET /RECOVER from working with
1224files that were incompletely downloaded by some other FTP client.
1225
1226In FTP MGET /RECOVER <wildcard> <wildcard> ..., the first file in each group
1227is always downloaded.  Diagnosis: Kermit sends "TYPE A" prior to NLST (as it
1228must).  Then when it sends its first SIZE command, it's still in ASCII mode,
1229so the server sends the "ASCII size" rather than the binary size, which does
1230not agree with the size of the local file (which was downloaded in binary
1231mode), so recovery is always attempted even when the files are identical.  The
1232TYPE A command is sent by initconn().  After the remote_files() call, we have
1233to change the type back to the prevailing type before sending the first SIZE
1234command.  Fixed in cmdlinget() and doftpget(): ckcftp.c, 3 Jul 2002.
1235
1236In FTP MGET /EXCEPT:<pattern> used with SET XFER DISPLAY brief, files that
1237are skipped just say ERROR instead of saying why they were skipped.  Fixed
1238in doftpget(): ckcftp.c, 3 Jul 2002.
1239
1240Added EXIT to top-level HELP text.  ckuus2.c, 13 Jul 2002.
1241
1242Strip braces in REINPUT n {string}.  ckuusr.c, 13 Jul 2002.
1243
1244Added /QUIET switch to ASK-class commands.  This means not to print any error
1245messages when an ASK-class command times out waiting for a response.  Made
1246sure that when a timeout occurs, the command fails.  Also made sure the
1247c-Kermit prompt doesn't write over the ASK prompt if ASK times out.  Also
1248fixed ASK, when it times out, not to return -9, which it did in one case,
1249which causes a command-stack dump.  ckuus[267].c, ckucmd.c, 13 Jul 2002.
1250
1251Fixed SET FILE INCOMPLETE help text, which said that both KEEP and AUTO were
1252the default.  ckuus2.c, 13 Jul 2002.
1253
1254If you SET FTP DEB ON and then turn it OFF, the MGET temp file is still kept.
1255Fixed by getting rid of ftp_knf variable and using ftp_deb to control whether
1256temp file is deleted (ftp_knf was being set from ftp_deb anyway, but then
1257wasn't being reset by SET FTP DEB OFF).  ckcftp.c, 13 Jul 2002.
1258
1259If an FTP transfer was in progress but the FTP connection drops and automatic
1260locus switching is enabled, the locus does not change; thus (for example) a
1261subsequent DELETE command makes Kermit send a REMOTE DELETE packet on stdout.
1262Fixed in lostpeer(): ckcftp.c, 13 Jul 2002.
1263
1264For docs: FTP CD with no arg might not be accepted by the server; e.g. the
1265Kermit FTP server says "501 Invalid number of arguments".
1266
1267The FTP module never handled SET INCOMPLETE.  Fixed in doftprecv2().  ckcftp.c,
126813 Jul 2002.
1269
1270When FTP DATES is ON, we set an incoming file's date only if the file was
1271received successfully.  Changed the code to set the file's date even if it was
1272received only partially (assuming we can get the date from server).  ckcftp.c,
127313 Jul 2002.
1274
1275Suppose we were doing FTP MGET /UPDATE from a server directory of 100,000
1276files.  Kermit would send a SIZE command for every file unconditionally.  On
1277some connections, e.g. to the Red Hat Rawhide server, each one could take up
1278to 30 seconds.  That would be 3 million seconds = 34 days.  Don't send a SIZE
1279command during the selection phase unless a /SMALLER or /LARGER selector was
1280given.  Once the file is selected, send a SIZE command only if one hadn't been
1281sent for that file already.  ckcftp.c, 13 Jul 2002.
1282
1283Made [M]GET and [M]PUT /UPDATE switch imply FTP DATES ON, since they didn't
1284work unless it was.  ckcftp.c, 13 Jul 2002.
1285
1286Added FTP [M]GET /DATES-DIFFER, which is like /UPDATE except it selects files
1287that are newer or older, rather than only newer.  This allows updates from
1288sources where files might be rolled back to earlier versions.  It's a bit
1289dangerous if you use it without knowing what it's for, since it allows older
1290files to overwrite newer ones.  (Code is also in place for [M]PUT
1291/DATES-DIFFER, and it works, but I commented it out because it's either
1292useless or dangerous since when uploading, you can't set the the file dates
1293when they are arrive on the server.)  ckcftp.c, 13 Jul 2002.
1294
1295Changed chkmodtime() to remember if MDTM fails on a particular connection
1296because it's an unknown command (500, 502, or 202), and if so, not to ask
1297again.  ckcftp.c, 13 Jul 2002.
1298
1299With this last change, I think it's safe to change the default for FTP DATES
1300from OFF to ON.  ckcftp.c, 13 Jul 2002.
1301
1302Increased max number of /EXCEPT: patterns from 8 to 64 for file transfer (not
1303necessarily for other things).  This is now a compile-time symbol NSNDEXCEPT.
1304ckcker.h, ckcmai.c, ckclib.c, ckcfns.c, ckcftp.c, ckuus[rx].c.  13 Jul 2002.
1305
1306Fixed FTP MGET to not send SIZE command when there is a name collision and
1307FILE COLLISION is DISCARD, even if /SMALLER or /LARGER were also specified.
1308ckcftp.c, 15 Jul 2002.
1309
1310MGET fails if no files were transferred, even if the reason is that no files
1311met the selection critieria: /COLLISION:DISCARD, /UPDATE, /SMALLER, etc.
1312Changed MGET to succeed in that case.  domget(): ckcftp.c, 16 Jul 2002.
1313
1314Big problems with canceling MGET; Ctrl-C cancels the current file, but we
1315don't break out of the file loop, we just go on to the next file.  Worse, if
1316we're executing a command file that has a series of MGETs, Ctrl-C doesn't
1317break us out of the command file.  Fixed by making failftprecv() and
1318failftprecv2() "chain" to the main SIGINT handler, trap().  This is fine in
1319Unix, but I'd be really surprised if it works in K95 so I put it in #ifndef
1320OS2.  Ditto for MPUT: Added the same treatment to failftpsend() and
1321failftpsend2().  Ditto for cmdcancel().  To adapt to K95, search for "TEST ME
1322IN K95" (5 places).  ckcftp.c, 16 Jul 2002.
1323 
1324Fixed previous fix to account for the fact that failftpblah() can be called
1325not only upon Ctrl-C, but also if transfer interrupted with X or Z.
1326ckcftp.c, 16 Jul 2002.
1327
1328Yesterday's fixes revealed another problem: Interrupt MGET with Ctrl-C, start
1329another MGET, and the file list is total garbage.  Diagnosis: secure_getc()
1330and secure_getbyte() use internal static buffer pointers.  The only way they
1331ever get reset is when the data connection is closed by the server, so if you
1332interrupt a GET, the pointers are not reset and the next network read (e.g. of
1333an NLST response) returns whatever junk was lying around in the old buffer.
1334ckcftp.c, 17 Jul 2002.
1335
1336FTP MGET temp file is kept only if FTP DEBUG is ON.  Changed FTP module to
1337also keep it if the regular debug log is active.  ckcftp.c, 17 Jul 2002.
1338
1339Fixed version test in ckermit.ini: should be 6 digits, not 5.  17 Jul 2002.
1340
1341Changed C-Kermit version number to 8.0.205 so scripts can test for the
1342recent changes.  ckcmai.c, 18 Jul 2002.
1343
1344---8.0.205---
1345
1346SET FILE COLLISION UPDATE would unset FTP DATES due to a typo in the recent
1347changes.  ckcftp.c, 21 Jul 2002.
1348
1349FTP [M]GET /DATES-DIFFER really should have been a collision option.  Added
1350this option (implemented for FTP only) to both SET FTP COLLISION and the
1351FTP [M]GET /COLLISION: table, so this way if you have lots of [M]GETs, you
1352don't have to put /DATES-DIFFER on each one.  ckcker.h, ckcftp.c, 21 Jul 2002.
1353
1354"FTP MGET a* b* c*" would fail to get any c*'s if no b*'s existed.
1355ckcftp.c, 21 Jul 2002.
1356
1357From Jeff, 22 Jul 2002:
1358 . Beginnings of Ann Arbor Ambassador terminal emulation for K95;
1359   ckuus[57].c, ckuusr.h.
1360 . Bump K95 version number to 2.0.2: ckcmai.c
1361
1362Added -DCK_PAM -DCK_SHADOW to all Solaris targets, 2.6 and above.  makefile,
136323 Jul 2002.
1364
1365Discovered that CK_SCRIPTS path search for TAKE files was #ifdef'd out
1366except for K95.  Fixed in ckuusr.c, 25 Jul 2002.
1367
1368From Jeff: changes to support K95 italics: ckuus[57].c,  25 Jul 2002.
1369
1370Fixed path search for TAKE to not search the CK_SCRIPTS path if the filespec
1371contains any directory or path parts.  Added a new function to check for
1372this:  int hasnopath(filespec) in ckucmd.c: 26 Jul 2002.
1373
1374Update HP-UX build instructions from PeterE: makefile, 26 Jul 2002.
1375
1376Commented out "const" from struct pam_message declarations because it
1377causes "initialization type mismatch" warnings.  ckufio.c, 26 Jul 2002.
1378
1379Suppose you have a network directory containing a listing for host "foo":
1380
1381  foo tcp/ip foo.bar.com
1382
1383Then in K95 you give a command "set host /network-type:ssh foo".  This
1384results in the directory lookup replacing the "ssh" network type with TCP/IP,
1385and making a Telnet connection.  Fix attempted at about line 8625 of ckuus7.c
1386in cx_net(); needs testing in K95.  26 Jul 2002.
1387
1388FTP Password: prompt in Unix was not allowing editing.  The code looked right;
1389I put in some debugging and suddenly it worked.  Took out the debugging and
1390it still worked.  Maybe I dreamed it.  Anyway, I fixed the "FTP SENT" debug
1391log entry to not record the password, and removed a redundant section above
1392to log the same thing, but prior to any charset conversion.  ckcftp.c,
139327 Jul 2002.
1394
1395From Jeff, 28 Jul 2002:
1396 . Fix typo in initxlist(): ckcmai.c.
1397 . Fix typo in Friday's set-host fix: ckuus7.c.
1398 . Move parsing of --height/width command-line args after prescan(): ckuusy.c.
1399
1400Added invisible top-level SITE and PASSIVE commands for FTP as a convenience
1401for habituated FTP client users.  ckuusr.[ch], ckcftp.c, 28 Jul 2002.
1402
1403A while back a user asked if it was possible to MGET a bunch of files from
1404an FTP server and have them all appended to each other upon arrival.  The
1405obvious way to do this would have been:
1406
1407  mget /collision:append /as-name:bigfile *.*
1408
1409But to make this work, I had to get rid of the "as-name must contain
1410variables" check in the MGET parser.  doftpget(): ckcftp.c, 28 Jul 2002. 
1411
1412Verified that it was possible to do the same thing (GET a bunch of files
1413and append them all into one result file) with Kermit protocol.  It works
1414fine but in this case there is no /COLLISION switch; you have to SET FILE
1415COLLISION APPEND first.  30 Jul 2002.
1416
1417Changed COPY /APPEND to allow wild source to single destination file, e.g.
1418"copy /append *.* bigfile".  ckuus6.c, 30 Jul 2002.
1419
1420From Mark Berryman: a replacement for zchkpath(), the VMS routine that checks
1421whether a file is in the current directory; the old one (that I wrote) was
1422a hack that only worked sometimes.  Martin Vorlaender verified Mark's code in
1423the situation where mine was breaking (server running in captive account).
1424ckvfio.c, 30 Jul 2002.
1425
1426PeterE reported a problem with SWITCH case labels that start with '#':
1427The problem is that the SWITCH variable contents in this case happens to be
1428a comment, e.g.:
1429
1430  CMD(M)[_forward # Stand: 24.07.2002<CR>]
1431
1432so the GOTO target is null.  The solution would be for SWITCH to put the GOTO
1433(_FORWARD) target in quotes.  But GOTO does not strip quotes or braces from
1434around its target.  Fixed in ckuusr.c, 30 Jul 2002.
1435
1436Fixed the SWITCH macro definition to put the _FORWARD target in quotes.
1437ckuus5.c, 30 Jul 2002.
1438
1439PeterE also reported that an empty SWITCH case label did not work.  There's no
1440particular reason why it should, but after a brief look, it wasn't that hard
1441so I did it.  It required commenting out the check for empty labels and fixing
1442the comparison in dogoto().  Now it's possible to read lines from a file and
1443use each line as a SWITCH variable, with patterns as case labels, including an
1444empty label to match empty lines, #* labels to match comment lines, etc.
1445ckuus[r6].c, 30 Jul 2002.
1446
1447PeterE also reported the value of \%* acquiring a trailing blank when
1448referenced inside a SWITCH statment.  This happens because \%* is formed using
1449\fjoin() on the \&_[] array based on its dimension, and at some point the
1450dimension is spuriously increased by one.  As a workaround, I made \fjoin()
1451ignore trailing empty \&_[] array elements and oddly enough this also fixed
1452the growing dimensions problem.  The many script torture tests reveal no ill
1453effects, so it seems like a keeper.  ckuus4.c, 30 Jul 2002.
1454
1455Some of Peter's sample scripts made C-Kermit 8.0.201 dump core, but no more.
1456
1457Fixed "delete xxx" to print an error message and fail if if xxx does not exist.
1458Ditto for when xxx is a directory.  ckuus6.c, 30 Jul 2002.
1459
1460Patches to SSL modules from Jeff based on yesterday's advisory.  ck_ssl.[ch],
146131 Jul 2002.
1462
1463Fixed some typos affecting the filename collision action during command-line
1464FTP [M]GET.  ckcftp.c, 31 Jul 2002.
1465
1466Fixed SHOW FTP to handle FTP COLLISION DATES-DIFFER.  ckcftp.c, 31 Jul 2002.
1467
1468A while back someone pointed out that SET CONTROL UNPREFIX ALL and SET
1469PREFIXING NONE gave different results.  Fixed them to use the same code.
1470Also made "set prefixing none" visible.  ckuus3.c, 4 Aug 2002.
1471
1472Added SET CD HOME <path>, to let the user specify which directory is intended
1473when "CD" or "KCD" is given by itself.  This is because in Windows, some
1474applications set up their own HOME environment variable that isn't necessarily
1475where the user wants "cd" to go, but redefining HOME can interfere with the
1476application (example: Windows EMACS).  SET CD HOME was done by adding a myhome
1477variable, initially a NULL pointer, and then changing homepath() to use it if
1478it is set.  zhome() is not affected.  Also the homepath() prototype had been
1479missing from header files.  ckcmai.c, ckuusr.h, ckuus[2345].c, 4 Aug 2002.
1480
1481PeterE got another core dump with his SWITCH statement.  Found a place where
1482an out-of-bounds array reference could occur if the switch variable was
1483empty.  ckuus6.c, 5 Aug 2002.
1484
1485PeterE noticed that if the switch variable contained a comma, spurious matches
1486could occur with the label pattern.  The real problem turns out to be what
1487happens when the SWITCH variable doesn't match any of the case labels and
1488there is no DEFAULT label.  Fixed by having dogoto() in the SWITCH (_FORWARD)
1489case pop the command stack before returning failure, i.e. by moving the
1490"if (stopflg) return(0);" statement down a few lines.  ckuus6.c, 5 Aug 2002.
1491
1492PeterE noticed that a SWITCH case label of :* did not match an empty SWITCH
1493variable.  Fixed in doswitch(): ckuus6.c, 6 Aug 2002.
1494
1495In testing the previous fix, I found it only worked sometimes.  Inspection
1496of the debug log showed that a statement like:
1497
1498  if (y == -3) s = "{}";
1499
1500was assigning "{" rather than "{}" to s.  Replacing the string constant by a
1501buffer containing the same string fixed it.  The reason (guessed correctly by
1502PeterE) was the following sequence:
1503
1504  y = cmfld("Variable name","",&s,xxstring);
1505  if (y == -3) s = "{}";
1506  len = ckstrncpy(tmpbuf,brstrip(s),TMPBUFSIZ);
1507
1508brstrip() (by design and as documented) affects the string in place.  But in
1509this case the string is a constant, not data in a buffer, so all further uses
1510of "{}" get the wrong string (at least in optimized builds).  The only real
1511cure is to change brstrip() to make a copy of its argument if it has to do
1512anything to it.  This will slow down some scripts, but it's too risky to
1513leave it as it was.  ckclib.c, 6 Aug 2002.
1514
1515The previous change required an audit of the C-Kermit code to make sure that
1516no references to brstrip() depended the result buffer being persistent, or the
1517result pointer indicating a position in the source buffer.  Oops, it turns out
1518that thousands of places rely on brstrip() working in place.  Therefore the
1519change had to be undone.  There's no good way to write a dummy-proof brstrip();
1520programmers either have be sure they're not calling it with a pointer to a
1521string constant, or else they have to copy the result back to the right place
1522each time.  Better to leave it as it was and audit the code to fix any calls
1523that refer to string constants (turns out there were only two).  Restored the
1524original fix to doswitch() (replacing the string constant by a buffer holding
1525the same string), plus minor fixes to ckcftp.c, ckuus[r36].c, 6 Aug 2002.
1526
1527We need file dialogs in several situations in the K95 GUI.  I added a "user
1528query" routine for this, uq_file(), in ckuus3.c, filling it in only for Unix.
1529Then I added code to call it from rcvfil() when (a) it's an autodownload, and
1530(b) SET TERM AUTODOWNLOAD is ASK (I just added this option; it needs to be set
1531to see it in action -- maybe it should be the default for KUI, in which case
1532initialize "int autodl = ?" to TAD_ASK in ckcmai.c).  Works fine, except of
1533course it interferes with the file-transfer display, but that won't be a
1534problem in K95G.  ckuusr.h, ckuus[37].c, ckcfns.c, ckucns.c, 6 Aug 2002.
1535
1536Another place we need a file dialog is when Kermit is a URL interpreter.  The
1537problem is: how can we let the user decide whether Kermit should ask?  There
1538really isn't any way.  Either it always asks or it never does.  In this case I
1539think it makes sense to always ask if it's KUI, otherwise never.  I added the
1540code for ftp: URLs to to doftprecv2(), which I tested successfully in Unix
1541before putting it into #ifdef KUI..#endif.  Also added code for http[s] to
1542ckuusy.c in #ifdef KUI..#endif, not tested.
1543
1544Still need this added for K95G Actions->Capture.  The clearest example is the
1545FTP one.  Just search for KUI in the FTP module.
1546
1547Some minor adjustments to yesterday's work, mainly just comments, plus
1548generate the full pathname for the default file.  ckuus3.c, ckcftp.c,
15497 Aug 2002.
1550
1551Note: for some reason cmofi() is not supplying the default value if user
1552enters an empty name... (but that won't affect the Windows version).
1553
1554Added /USER: and /PASSWORD: switches to SET TCP { HTTP-PROXY, SOCKS-SERVER }.
1555ckuus3.c, 7 Aug 2002.
1556
1557New 'uninstall' target from PeterE, works by having the 'install' target
1558write an UNINSTALL shell script.  makefile, 8 Aug 2002.
1559
1560Added some debugging statements to the VMS communications i/o module to try
1561to track down a problem that occurs when the controlling terminal is a LAT
1562device.  ckvtio.c, 10 Aug 2002.
1563
1564Fixed the non-K95 uq_file() to respect the given default name, but still show
1565the fully qualified absolute pathname for the default in the dialog.  The
1566reason to not use the fully qualifed name as the default in the cmxxx() calls
1567is that this can easily result in a whole directory tree being created due to
1568directory aliases, symlinks, etc.  So when you get a file by referring to its
1569URL (e.g. ftp://kermit.columbia.edu/kermit/READ.ME), uq_file() converts the
1570READ.ME part to (e.g.) /home/fdc/tmp/READ.ME but gives just "READ.ME" as the
1571default when parsing the name.  This way the user knows where it will go and
1572gets an opportunity to change it, and if the default is accepted, it goes into
1573the current directory.  uq_file(): ckuus3.c, 10 Aug 2002.
1574
1575Found the spot for calling uq_file() for kermit:// URL downloads.  Added
1576prefatory text to filename prompts for Kermit and FTP downloads.  ckcfns.c,
1577ckcftp.c, 10 Aug 2002.
1578
1579Now with kermit:// or ftp:// URL downloads there's no way to disable the
1580prompting.  I could easily make SET TERMINAL AUTODOWNLOAD ASK cover these
1581cases too (even though "terminal" has nothing to do with FTP or URL
1582downloads).  OK, I did this, but now prompting is disabled by default.
1583ckcftp.c, ckcfns.c.  10 Aug 2002.
1584
1585Enabled file prompting (adl_ask) by default in K95G, disabled it by default
1586everywhere else.  So now FTP and Kermit URL downloads as well as terminal-mode
1587Kermit (but not Zmodem) downloads are prompted for if TERMINAL AUTODOWNLOAD is
1588ASK, which is it by default only in K95G.  But this will happen only if
1589uq_file() is filled in for K95G; otherwise everything should work as before.
1590ckcmai.c, 10 Aug 2002.
1591
1592Notes:
1593 . Need a better command to control this.
1594 . FTP URL downloads are almost instantaneous, whereas Kermit URL downloads
1595   take a really long time to set up (logging in takes at least 10 seconds).
1596
1597From Jeff, 13 Aug 2002:
1598 . Increase K95 version to 2.1.0: ckcmai.c.
1599 . SET TCP { HTTP-PROXY, SOCKS-SERVER } /USER: /PASSWORD: actions: ckuus3.c.
1600
1601From PeterE: a new install target that's only about half as a big as the
1602previous one, yet still generates an UNINSTALL script.  makefile, 13 Aug 2002.
1603
1604Vace wanted to be able to give the FTP client an offset for the server time,
1605in case the server's time (or timezone) is set incorrectly.  I added this by
1606building on all the date/time parsing/arithmetic code -- notably delta times
1607-- that was done for C-Kermit 8.0.  The new command is SET FTP
1608SERVER-TIME-OFFSET delta-time; shows up in SHOW FTP and HELP SET FTP.
1609ckcftp.c, 13 Aug 2002.
1610
1611Fixed HELP ASK and HELP GETOK text.  ckuus2.c, 14 Aug 2002.
1612
1613Fixed GETOK to accept /GUI switch even in K95.EXE and C-Kermit, just like ASK
1614does (in which case, it just ignores it).  ckuus6.c, 14 Aug 2002.
1615
1616SET XFER CHAR TRANSPARENT no longer disables character-set translation because
1617file-scanning turns it back on.  The "new way" to disable character-set
1618translation is SET XFER TRANSLATION OFF.  This needlessly confuses users who
1619expect the old way to still work.  So I fixed SET XFER CHAR TRANSPARENT to set
1620XFER TRANSLATION OFF, and SET XFER CHAR anything-else to set it back ON.
1621ckuus3.c, 15 Aug 2002.
1622
1623Fixed SET TERM AUTODOWNLOAD { ON, OFF } to turn off the ASK flag (adl_ask).
1624ckuus7.c, 16 Aug 2002.
1625
1626Added FEAT query to FTP client from draft-ietf-ftpext-mlst-13.txt.  FEAT is
1627sent along with REST 0, MODE S, and STRU F if /NOINIT is not included in the
1628FTP OPEN command.  Parsing the FEAT result is handled by turning the "auth"
1629argument to getreply() into a function code: GRF_AUTH to parse AUTH reply;
1630GRF_FEAT to parse FEAT reply.  For GRF_FEAT, getreply() fills in a flag array,
1631sfttab[] (server feature table); sfttab[0] > 0 means server responded to the
1632FEAT query, in which case individual elements are set > 0 for each supported
1633feature.  ckcftp.c, 18 Aug 2002.
1634
1635If server sends a feature list, display it if FTP DEBUG is on, then set mdtmok
1636and sizeok (the flags that say whether it's OK to send MDTM and SIZE commands)
1637accordingly.  If user gives an [M]PUT /RECOVER command and server has
1638announced it doesn't support REST, print a warning but try anyway (maybe
1639change this later).  Responses about other features that we use such as AUTH
1640and PBSZ are ignored for now -- i.e. we try them anyway.  And of course
1641responses for features we don't care about (LANG, TVFS, PROT) are ignored.
1642ckcftp.c, 18 Aug 2002.
1643
1644If the server says it supports MLST, use MLSD instead of NLST to get the file
1645list.  This is done in remote_files() with some simple string-twiddling.  Then
1646replace the relevant (but not all) SIZE commands with code to first check if
1647we already got the size from the MLSD response and use that instead rather
1648than asking again.  Same deal for MDTM.  ckcftp.c, 18 Aug 2002.
1649
1650Checked that this works when giving pathnames in the MGET filespec.  Checked
1651to make sure everything works as before with servers that don't support FEAT
1652or MLSD.  Checked to make sure FTP OPEN blah /NOINIT worked with servers that
1653do support FEAT and MLSD.  Checked that FTP CHECK works.  It's all OK.
1654
1655Tested only with Ipswitch server; need to find and test with others.
1656
1657The stack of temp files needed for MGET /RECURSIVE is annoying because what
1658if we run out of file descriptors...  But the spec doesn't provide a way to
1659request a recursive listing.
1660
1661Supplied a missing comma in HELP SET CD text.  ckuus2.c, 19 Aug 2002.
1662
1663Generalized parsing of MLST/MLSD file facts and values.  Got file type from
1664server and had MGET skip non-regular files.  ckcftp.c, 19 Aug 2002.
1665
1666Kirk Turner-Rustin <ktrustin@owu.edu> reported that if Unix C-Kermit has a SET
1667HOST PTY connection (e.g. SSH) open, local window size changes are not
1668propogated through the connection to the host.  I imagine that must be because
1669the SIGWINCH signal is caught by Kermit and its children don't see it; maybe
1670if I pass it along to the child fork, all will be OK.  Began by exporting
1671"slavepid" from the pty module and changing its name to pty_fork_pid.  Moved
1672the SIGWINCH handler, winchh(), from ckctel.c to ckutio.c.  Armed it from Unix
1673sysinit() so it's always armed.  This way window changes affect Unix C-Kermit
1674no matter what mode it's in: tt_rows, tt_cols, cmd_rows, and cmd_cols are all
1675kept in sync.  Then if we're not in remote mode (i.e. we have a ttyfd), we
1676call tn_snaws() and rlog_snaws() (which should be ok since they return right
1677away if the appropriate kind of connection is not open) and then if
1678(pty_fork_pid > -1), a SIGWINCH signal is sent to it.  ckupty.c, ckctel.c,
1679ckutio.c, 20 Aug 2002.
1680
1681All this works fine except the PTY part; in other words, the original problem
1682is not fixed.  The "kill(pty_fork_pid,SIGWINCH)" call executes without error
1683but has no effect because the size of the PTY never changed.  To make this
1684work I had to add an ioctl() to change the size of the PTY before sending it
1685the SIGWINCH.  Compiles and works ok on Linux and Solaris; Kirk also confirmed
1686it for AIX 4.3.3.  ckutio.c, 20 Aug 2002.
1687
1688Fixed xlookup() to work for uppercase keywords.  ckucmd.c, 20 Aug 2002.
1689
1690Fixed FTP parsefeat() and parsefacts() to use xlookup() instead of lookup(),
1691since abbreviated keywords are not allowed.  ckcftp.c, 20 Aug 2002.
1692
1693Adjusted some lines from yesterday's window-size code for platforms I hadn't
1694tried yet.  ckutio.c, 21 Aug 2002.
1695
1696EXIT from K95 when it has an FTP connection open and it pops up the
1697Locus dialog.  Made it not do this if it knows it's in the act of EXITing.
1698ckuus[rx].c, 22 Aug 2002.
1699
1700In K95, FTP GET in ASCII mode results in a file with Unix line terminators
1701even though the protocol is correct:
1702
1703  RETR smjulie.txt
1704  150 Opening ASCII mode data connection for smjulie.txt (1878 bytes).
1705
1706The source file is a regular Unix text file with LF at the end of each line.
1707It's incredible that nobody noticed this before.  It only came to light when
1708somebody tried to open a downloaded text file with Notepad, which doesn't
1709handle Unix-format files (Wordpad and Emacs have no problems with them).  The
1710problem was in doftprecv2() in the FTT_ASC section.  There was no conditional
1711code for Unix vs Windows.  In all cases, the code discarded incoming CR's in
1712ASCII mode.  I put the CR-discarding code in #ifdef UNIX..#endif.  ckcftp.c,
171322 Aug 2002.
1714
1715Removed super-verbose debugging from gtword(): ckucmd.c, 23 Aug 2002.
1716
1717Gregory Bond reported a problem with "if defined \$(BLAH) ..." inside of a
1718SWITCH statement.  It wasn't really the SWITCH that was doing it, it was the
1719fact that he had enclosed the SWITCH case in braces, which made it an
1720"immediate macro" (XXMACRO).  The XXMACRO code parsed the macro definition
1721(the part inside the braces) with cmtxt(...,xxstring), which should have been
1722cmtxt(...,NULL) to defer the evaluation of the interior of the macro until it
1723was executed.  This is better illustrated with the following example:
1724
1725  { echo START, for \%i 1 3 1 { echo \%i }, echo STOP }
1726
1727which totally fell on its face prior to the fix.  Also fixed ?-help for
1728immediate macros, which was broken too.  ckuusr.c, 23 Aug 2002.
1729
1730RFC959 says STOU does not take an argument.  But every FTP server I've
1731encountered but one accepts the arg and constructs the unique name from it,
1732which is better than making up a totally random name for the file, which is
1733what RFC959 calls for.  Especially because there is no way for the client to
1734find out the name chosen by the server (because RFC 959 and 1123 are
1735contradictory, plus no servers follow either one of them for this anyway).  So
1736we try STOU with the argument first, which works with most servers, and if it
1737fails, we retry it without the arg, for the benefit of the one picky server
1738that is not "liberal in what it accepts" UNLESS the first STOU got a 502 code
1739("not implemented") which means STOU is not accepted, period (which happens
1740with ProFTPD).  ckcftp.c, 25 Aug 2002.
1741
1742Added SET FTP ANONYMOUS-PASSWORD (plus help text and show value).  ckcftp.c,
174325 Aug 2002.
1744
1745Made FTP command "not available" if NOFTP is defined.  ckuusr.c, 25 Aug 2002.
1746
1747Forced client to send a TYPE command upon initial connection, since given
1748the variable quality of FTP servers, it's not safe to assume the server is
1749in ASCII or any other particular mode.  ckcftp.c, 25 Aug 2002.
1750
1751SET FTP CHARACTER-SET-TRANSLATION ON is completely broken in K95, although it
1752works fine in C-Kermit.  Furthermore it is broken in both the GUI and Console
1753versions, so it's not a Unicode vs OEM console-character-set issue.
1754
1755Added Concurrent PowerMAX OS target from Tom Horsley.  makefile, ckuver.h,
175627 Aug 2002.
1757
1758Minor fixes to FTP module from Jeff.  ckcftp.c, 27 Aug 2002.
1759
1760New Makefile target for Mac OS X 10.2, needs -DNDSYSERRLIST added, from
1761William Bader.  2 Sep 2002.
1762
1763SET OPT DIR /DOTFILES didn't work for server listings.  A few years ago when
1764I front-ended zxpand() with nzxpand(), I missed a couple places where
1765traverse() needed to refer to xmatchdot (nzxpand's argument flag) rather than
1766global matchdot.  Fixed in traverse(): ckufio.c, 2 Sep 2002.
1767
1768From Jeff, 4 Sep 2002:
1769 . setautodl(x) -> setautodl(x,y): ckuusr.h, ckuus[7y].c
1770 . Add another parameter to popup_readblah(): ckuus6.c
1771 . Sort out some confusion in scanfile() where a parameter was also used as a
1772   local flag.  ckuusx.c.
1773 . Protect restoring of saved terminal idle parameters with a flag that says
1774   they were actually saved.  ckuusr.c.
1775 . Rework uq_text() and uq_mtxt().  ckuus3.c.
1776 . Fix FTP charset translation for little-endian hardware: ckcftp.c.
1777
1778The latter still doesn't work in Linux:
1779
1780  (/home/fdc/kermit/) C-Kermit>set ftp server-character-set latin1-iso
1781  (/home/fdc/kermit/) C-Kermit>set file character-set utf8
1782  (/home/fdc/kermit/) C-Kermit>get latin1.txt
1783
1784Results in "????????: file not found".  But it works fine on the Sun.
1785
1786Jeff's patch removed a little-endian byte-swap (LEBS) from doftpsend2().  But
1787the real problem was that LEBS was not being done consistently throughout the
1788module.  There were similar xgnbyte()/xpnbyte() loops elsewhere in the code,
1789and all of them needed to work the same way.  Undoing Jeff's fix and then
1790adding the LEBS to the loop in getreply() makes downloads work right, but the
1791messages are still messed up (they come out in Chinese :-)  Begin by moving all
1792byte-swapping operations that occur in ckcftp.c itself into a new function,
1793bytswap().  It's either right to do it all the time, or to do it never; this
1794way we can turn it on and off in one place.
1795
1796xp/gnbyte() include behavior that depends on what Kermit is doing: W_SEND,
1797etc.  xpnbyte() tests W_KERMIT, which is a combination of W_SEND, W_RECV, etc.
1798Defined a new symbol W_XFER, which is like W_KERMIT but includes W_FTP.  These
1799are all the "whats" in which character sets might need to be converted.
1800Changed the W_KERMIT reference in xpnbyte() to W_XFER.  Fixed the inderminate
1801"what" state after an FTP command by moving "what = W_COMMAND;" from before
1802the main parse loop to inside it (this didn't matter before the addition of
1803FTP but now it does).  ckcker.h, ckcftp.c, ckuus5.c, 6 Sep 2002.
1804
1805Finally I changed xlatec() to be consistent with all the other xgnbyte() /
1806xpnbyte() usage throughout the FTP module and, poof, everything worked in
1807Linux (and still works on the Sun).  We still need some work in Windows (where
1808the file character-set is not necessarily the console character set for
1809messages) but we can tackle that next.  ckcftp.c, 6 Sep 2002.
1810
1811Checking yesterday's work:
1812
1813Kermit file transfers with charset translation work fine in both directions.
1814
1815FTP GET with charset translation works fine on both BE and LE
1816
1817Fixed a typo in yesterday's changes that made FTP PUT with charset translation
1818always upload 0-length files.  ckcftp.c, 7 Sep 2002.
1819
1820FTP PUT (after the typo was fixed) with charset translation works fine on BE,
1821but on LE the message comes out in Chinese and the resulting file gets ? or
1822nothing for all for the accented letters:
1823
1824      FTP...  Kermit
1825      Up  Dn  Up  Dn  Term
1826  BE  OK  OK  OK  OK   xx
1827  LE  no  OK  OK  OK   xx
1828
1829xx = C-Kermit CONNECT mode with translation doesn't seem to do anything, not
1830only in today's code, but also in the 8.0 release version: "set term char
1831latin1 utf8" -- SHOW CHAR shows the right stuff, but no translation is done.
1832Ditto for the 7.0 release.  That can't be right...
1833
1834But one problem at a time -- what's wrong with LE FTP uploads?  Note that
1835XLATE works on the same machine, so it's obviously confusion in xgnbyte()
1836about "what".  Suppose we make xgnbyte() ALWAYS return bytes in BE order.
1837This makes sense because xgnbyte() is almost always used to feed xpnbyte(),
1838and xpnbyte() requires its bytes to come in BE order.  This means that all
1839code that uses xgnbyte()/xpnbyte() loops can be simplifed, which I did for
1840the FTP module.  ckcfns.c, ckcftp.c, 7 Sep 2002.
1841
1842Of course Kermit protocol uses xgnbyte() too, but only for filling
1843packets, and packets never contain UCS2 and even if they did, it would have
1844to be big-endian, so no changes needed for getpkt().  Now we have:
1845
1846      FTP...  Kermit
1847      Up  Dn  Up  Dn
1848  BE  OK  OK  OK  OK
1849  LE  OK  OK  OK  OK
1850
1851Now let's look at the remaining xgnbyte() calls in the rest of the code:
1852
1853ckuus4.c:
1854  xlate() uses it of course.  I simplified the general-case loop.
1855  Works OK on both Sun and Linux.
1856
1857ckuus6.c:
1858  typegetline() uses it.  I commented out the byte swap.  Seems OK.
1859
1860Built and tested on Linux, Solaris, and SunOS.  I'm sure I must have broken
1861something, but the main things are better than they were.  Kermit and FTP
1862transfers need testing in K95, as well as the TYPE command (there's a bunch of
1863special K95 code in there).  C-Kermit charset translation during CONNECT is
1864still broken, or else I forgot how to use it, but that's a separate issue
1865since xgnbyte()/xpnbyte() are not involved.  And we still need to do something
1866in FTP getreply() for K95 to convert messages to the console character set for
1867display, rather than the file character set (should be trivial).  Also there's
1868still a lot of extra debugging and commented-out junk in ckcftp.c to be
1869cleaned up after more testing.
1870
1871During yesterday's testing, I noticed that REMOTE SET { FILE, XFER }
1872CHARACTER-SET didn't work.  The server accepted these commands but they didn't
1873seem to do anything.  In fact, they did work, but they were undone later by
1874code in sfile() that restored the global settings in case they had been
1875temporarily overridden by autoswitching or whatever.  The solution is to
1876"unsave" the saved values whenever a global setting is performed explicitly.
1877Tested successfully against Sun and Linux servers.  Also the server end of
1878REMOTE SET needed updating for Unicode.  ckcfn[s3].c, ckuus3.c, 8 Sep 2002.
1879
1880Cleaned commented-out cruft and extra debugging from ckcftp.c.  8 Sep 2002.
1881
1882Kermit autodownload with ASK file dialog: if user supplied an absolute
1883pathname, it was treated like a relative one.  Fixed the invocation of
1884uq_file() in rcvfil() to temporarily override the RECEIVE PATHNAMES setting.
1885ckcfns.c, 10 Sep 2002.
1886
1887Added SET TERMINAL ROLL KEYSTROKES { SEND, RESTORE-AND-SEND, IGNORE }, parse
1888only.  Needs implementation (search for tt_rkeys and rollkeytab in ckuus7.c).
1889ckuusr.h, ckuus[27].c, 10 Sep 2002.
1890
1891If FILE INCOMPLETE is DISCARD and a file is being received by IKSD but IKSD
1892gets a Telnet LOGOUT command, the partial file is not deleted.  In fact this
1893happens any time doexit() is called for any reason during file reception,
1894e.g. because of SIGHUP.  Added code to doclean() to check if a download
1895output file was open, and if so, to delete it after closing it if keep==0.
1896ckuusx.c, 10 Sep 2002.
1897
1898Added a brief one-line message after remote-mode file transfer saying
1899what (or how many) file(s) were transferred, where they went, and whether
1900the transfer was successful -- kind of an automatic WHERE command, useful
1901with autodownloads so you know what happened.  ckcpro.w, 11 Sep 2002.
1902
1903The Unix and VMS C-Kermit CONNECT modules have botched remote-charset to
1904local-UTF8 translation ever since the Unicode was first added in v7.0.  Fixed
1905in ckucns.c, ckucon.c, ckvcon.c, 11 Sep 2002.
1906
1907On to pattern-matching...  The matchdot business should apply only for (Unix)
1908filename matching, not for general string matching.  Fixed in ckmatch():
1909ckclib.c, 11 Sep 2002.
1910
1911A bigger problem occurs in filename matching.  Somehow the dirsep == fence
1912business interferes with matching {foo,bar,baz} segments.  For example, I have
1913a filename "foo" and I want to match it with the pattern "{foo,bar}".  Somehow
1914the segment pattern becomes "*/foo" and doesn't match the string.  Where does
1915the '/' get tacked on?  I don't even know how to explain this, but the short
1916story was that ckmatch(), under certain circumstances, would back up to before
1917the beginning of the filename string, which just happened to contain a "/"
1918(and before that a ".") because of who was calling it.  Obviously this is not
1919how to write a pattern matching function...  Ensuring that it never backs up
1920beyond the beginning of a string fixed the immediate problem and does not seem
1921to have broken any other matching scenarios (I have 150 of them in my test
1922script).  ckclib.c, 11 Sep 2002.
1923
1924There's still a problem though.  Suppose the a client sends "dir {{.*,*}}" to
1925a server.  This asks for a directory listing of all files that begin with
1926dot as well as all files.  Still doesn't work because we don't normally show
1927dot-files, but in this case it SHOULD work because ".*" was explicitly
1928requested.  Staring at the ckmatch() code revealed how to fix this, and I did,
1929but that was only half the problem.  The other half was that the list of
1930files being fed to ckmatch() did not include the dotfiles in the first place.
1931The cure here is to change nzxpand() to prescan the pattern to see if it
1932includes a leading dot, and if so to set the "xmatchdot" flag itself, even
1933if it wasn't set by the caller.  ckclib.c, ckufio.c, 11 Sep 2002.
1934
1935Now that {foo,bar,...} patterns work better, I added a quick hack to the
1936DIRECTORY command to allow multiple filespecs to be given, in which case we
1937combine them into a {file1,file2,...} pattern before calling nzxpand().  Works
1938fine but it's a hack because you don't get file lists upon "?" in the second
1939and subsequent filespec fields, but I doubt anyone will notice.  So now,
1940finally, people can do "dir .* *" like they do in Unix (except with ls) to get
1941a listing of all files in a directory without having to know about or use the
1942/DOTFILES switch.  This was NOT done for the server end of RDIR because of
1943ambiguity of spaces as separators versus filename characters.)  domydir():
1944ckuus6.c, ckuus[r2].c, 11 Sep 2002.
1945
1946Added a CONTINUE command.  In a script, this does whatever CONTINUE did before
1947(e.g. in a FOR or WHILE loop).  At the prompt, it calls popclvl(), which gives
1948a more natural way to continue a script that has "shelled out" to the prompt.
1949ckuusr.[ch], 11 Sep 2002.
1950
1951Added help text for CONTINUE.  ckuus2.c, 12 Sep 2002.
1952
1953From Jeff, 16 Sep 2002:
1954 . SET TERM ROLL KEYSTROKES for K95: ckuusr.h, ckuus7.c
1955 . Remove the doexit() call from the Telnet TELOPT_LOGOUT handler: ckctel.c
1956
1957Fixed an FTP debug message to be consistent with Kermit ones.
1958ckcftp.c, 16 Sep 2002.
1959
1960Added SET/SHOW TRANSFER REPORT to turn the post-transfer report off and on.
1961ckuusr.h, ckuus[234].c, 16 Sep 2002.
1962
1963Fixed Solaris (and maybe some other SVORPOSIX builds) to find out their full
1964hostname rather than just short form (e.g. watsol.cc.columbia.edu rather than
1965just watsol).  ckhost(): ckuusx.c, 16 Sep 2002.
1966
1967"cat somefile | kermit -Ts -" is supposed to send stdin in text mode, but
1968K95's file transfer display reports BINARY.  Looked at C-Kermit code; it seems
1969fine.  Looked at packet and debug logs; C-Kermit was indeed sending in text
1970mode and announcing it correctly.  K95 gattr() is doing the right thing:
1971
1972  gattr file type[AMJ]=3
1973  gattr attribute A=text=0
1974  gattr sets tcharset TC_TRANSP[A]
1975
1976Same thing happens when C-Kermit is receiving.  Yet when I send an actual
1977file, rather than stdin, it's received in text mode.  The only difference is
1978that stdin does not have a Length attribute in its A-packet, so in this case
1979the receiver skips any calls to screen() that show the length or percent done.
1980Aha, so maybe it's just a display problem -- scrft() is not being called to
1981repaint the file type if the size was not known.  Fixed in opena() by
1982removing the IF clause from "if (fsize > -1L) xxscreen(SCR_FS,0,fsize,"");".
1983ckcfn3.c, 18 Sep 2002.
1984
1985K95 user has a listfile containing some regular filenames and then some
1986filenames that include paths and has all kinds of problems with MGET /LISTFILE
1987(pieces of different names concatenated to each other, etc).  Setting up the
1988same scenario here, I don't see the same problems but I do see "Refused: Name"
1989when we go to get a path/name file.  This happens because (a) we had already
1990got a top-level file with a certain name, (b) a file in a subdirectory has the
1991same name, (c) we are stripping the path before calling zchki(), and (d)
1992FTP COLLISION is set to DISCARD.  How do we make FTP not strip the path?
1993
1994This is an interesting question...  The answer depends on where the user
1995wants the file to go.  Normally if you tell an FTP client to "get foo/bar",
1996you want the file "bar" to be downloaded to the current directory.
1997
1998Anyway, it turns out the FTP module uses paths locally during MGET only if
1999/RECURSIVE was specified.  So:
2000
2001  mget /listfile:blah /recursive
2002
2003should have made this work, but it didn't because in the /LISTFILE case,
2004we have effectively turned an MGET into a series of GETs, where the code to
2005check whether to strip the path didn't check the recursive flag because how
2006could a GET (as opposed to an MGET) be recursive?  Adding this exception to
2007the if-condition got us a bit farther but now when we try to open the output
2008file in doftprecv2(), zopeno() fails because the name contains a dirsep.
2009We have to call zmkdir() first but that wasn't happening because some other
2010flag wasn't set right in this case.  Finally zmkdir was called, but with
2011the wrong string.  After fixing that, it works.  Now we should be able
2012to use /RECURSIVE to force the pathname to be used on the local end.
2013ckcftp.c, 19 Sep 2002.
2014
2015Checked FTP filename conversion issues.  FTP FILENAMES AUTO is supposed to
2016mean LITERAL if "wearealike" OR server is UNIX or Windows, otherwise
2017CONVERTED, but there were places where this rule was not applied consistently,
2018fixed now.  ckcftp.c, 21 Sep 2002.
2019
2020Added SET FTP DISPLAY, which is like SET TRANSFER DISPLAY but applies only to
2021FTP, mainly because I tended to type it all the time.  Now if you have dual
2022sessions, each session can have its own transfer display style.  ckcftp.c,
2023ckuusr.h, ckuus[347].c, 21 Sep 2002.
2024
2025Back to FTP MLSD.  We're supposed to match the pattern locally, not rely on
2026the server to filter its list according to the client's pattern.  Thus we must
2027also allow an empty argument to MGET and must not send a filespec with MLSD.
2028Actually this is tricky -- how is the client supposed to know whether to send
2029a filespec.  For example, if the user's command is "mget foo*bar", and the
2030server supports MLSD, then what should the client do?  The client does not
2031know the wildcard syntax on the server, so for all the client knows, this
2032might be a valid directory name, in which case it should be sent.  On the
2033other hand, the user might intend it as a wildcard, in which case it should
2034NOT be sent.  But the FTP client can't read the user's mind.  This is another
2035serious flaw in the Elz/Hethmon draft.  Anyway, I got the local matching
2036business working for MLSD as long as the user's MGET arg is really a pattern
2037and not a directory name.  To be continued...  ckcftp.c, 21 Sep 2002.
2038
2039Added FTP { ENABLE, DISABLE } { FEAT, MLST }.  If we always send FEAT, we
2040usually get a complaint.  If we send FEAT and MLST is negotiated, there is a
2041good chance it is misimplemented or will have undesirable side effects, such
2042as sending huge file lists.  NOTE: /NOINIT on the FTP OPEN command also
2043disables both of these.  ckcftp.c, 22 Sep 2002.
2044
2045Fixed mkstemp() code in FTP remote_files().  mktemp() does not open the file,
2046mkstemp() does open it; previously we had been opening it again and never
2047closing the first instance so every MGET would create another open file
2048descriptor.  ckcftp.c, 22 Sep 2002.
2049
2050Added debug messages for temp-file creation and lines read from the temp file.
2051ckcftp.c, 22 Sep 2002.
2052
2053Eliminated sending of some extraneous TYPE commands, but there's still room
2054for improvement.  ckcftp.c, 22 Sep 2002.
2055
2056Moved definition of build date to top of ckcmai.c.  22 Sep 2002.
2057
2058Added recursion to MGET with MLSD...  It's all done in remote_files().
2059Temp-file pointers are on a stack (max size 128).  When parsing MLSD lines
2060from the temp file and we see "type=dir", we create the local directory by
2061calling zmkdir(), change to the remote by sending CWD, increment the depth,
2062and call ourselves.  When reading from a temp file, upon EOF we close and
2063dispose of the temp file, return -3 if currently at top level, otherwise we
2064free the tmpfile name, decrement the depth, send CDUP to the server, "cd .."
2065locally, and go back and read the next line from the previous but now current
2066temp file.  Conceptually simple but needed hours of debugging -- what must
2067be static, what must be on the stack...  Seems OK now but still needs some
2068heavy testing.  ckcftp.c, 22 Sep 2002.
2069
2070Added FTP { ENABLE, DISABLE } { SIZE, MDTM } and add help text for FTP
2071ENABLE and DISABLE.  ckcftp.c, 23 Sep 2002.
2072
2073Don't allow restart if SIZE disabled.  ckcftp.c, 23 Sep 2002.
2074
2075Make sure all implicit SIZE commands are surpressed if SIZE disabled.
2076ckcftp.c, 23 Sep 2002.
2077
2078If an explicit FTP MODTIME command is sent when MDTM is DISABLED, and it
2079succeeds, re-ENABLE MDTM.  Ditto for SIZE.  ckcftp.c, 23 Sep 2002.
2080
2081If an explicit FTP FEATURES command is sent during an FTP session, redo the
2082features database from it.  ckcftp.c, 23 Sep 2002.
2083
2084After further discussion with Robert Elz, I realized I had to expose the
2085underlying MGET mechanisms to the user; the draft isn't going to change, and
2086the new spec will result in undesirable effects if the client tries to "do the
2087right thing" by magic in all situations; thus the user must have some new
2088controls:
2089
2090  MGET [ /MLST, /NLST, /MATCH:xxx ] [ filespec [ filespec [ ... ] ] ]
2091
2092These switches let the user force the use of MLSD or NLST when there's a
2093choice, and to force local use of a pattern rather than sending it to the
2094server, and even to send a directory name to the server at the same time as
2095specifying a pattern for local matching, and of course by default we try to do
2096the right thing in all scenarios.  Symbols only; not coded yet.  ckuusr.h,
209723 Sep 2002.
2098
2099Added the three new switches to MGET, plus /MLST is an invisible synonym for
2100/MLSD.  If /NLST or /MLSD is given it, it forces the corresponding FTP protocol
2101directive.  ckcftp.c, 25 Sep 2002.
2102
2103Now for the tricky part: now we have two separate concepts for what to send to
2104the server: a filename or wildcard to be interpreted by the server (NLST only)
2105or a directory from which to get a list of all the files (NLST or MLSD),
2106possibly together with a pattern to be used by the client to match filenames
2107returned by the server.  This required giving remote_files() an additional
2108argument.  Now it uses "pattern" (if any) strictly for local pattern matching
2109(because now it is the /MATCH: switch argument, not the MGET filespec), and
2110"arg" (the MGET filespec) is what it sends to the server, maybe (see the
2111comments in the code for the actual details); either or both these can be
2112null.  ckcftp.c, 25 Sep 2002.
2113
2114Discovered that "mget foo", where foo is a directory name, never worked.
2115Fixed in remote_files(): ckcftp.c, 25 Sep 2002.
2116
2117Going through every combination of NLST, MLSD, /MATCH:, and MGET arg and
2118debugging each case until OK...  Then also with the panix.com NetBSD server
2119(lukemftpd 1.0) which also supports MLSD....  11 test cases all debugged and
2120tested OK.  ckcftp.c, 26 Sep 2002.
2121
2122Added /NODOTFILES switch to FTP MGET, to control what happens with dot-files
2123if the server includes their names in the list (as lukemftpd does).  There's
2124no point in adding a /DOTFILES switch because what could it possibly do?
2125ckcftp.c, 26 Sep 2002.
2126
2127Changed a bunch of "skipthis++" to "continue" in doftpget(), to avoid
2128error messages when skipping files that user said she wanted to skip.
2129ckcftp.c, 26 Sep 2002.
2130
2131Added help text for the new MGET switches.  ckcftp.c, 26 Sep 2002.
2132
2133Don't switch LOCUS when making an FTP connection until logged in.
2134ckcftp.c, 26 Sep 2002.
2135
2136Fixed LDIR to run Kermit's built-in DIRECTORY code rather than the external
2137directory program.  ckuusr.c, 26 Sep 2002.
2138
2139Protect iswild() against NULL args.  ckufio.c, 26 Sep 2002.
2140
2141From Jeff: SET GUI WINDOW RUN-MODE { MAXIMIZE, MINIMIZE, RESTORE },
2142plus variables for GUI Window X position, GUI Window Y position, GUI
2143Window X resolution, GUI Window Y resolution, GUI Window Run mode.
2144ckuusr.h, ckuus[24].c, 27 Sep 2002.
2145
2146From Ronan Flood: updated FreeBSD 1.0 makefile entry, plus an #ifdef to protect
2147sysconf() calls.  makefile, ckutio.c, 28 Sep 2002.
2148
2149Change ftp_auth() to return(0) if an AUTH command gets a 500 response, so it
2150doesn't keep sending other kinds of AUTH commands.  ckcftp.c, 29 Sep 2002.
2151
2152Changes from Jeff to yesterday's changes.  ckcftp.c, 30 Sep 2002.
2153
2154From Jeff: SSH command-line personality.  Uses same command line as the Telnet
2155personality.  ckcker.h, ckcmai.c, ckuus[4y].c, 3 Oct 2002.
2156
2157From Jeff, 7 Oct 2002:
2158 . SET PRINTER CHARACTER-SET.  ckuxla.c, ckuusr.h, ckuus[25].c
2159 . Promotion of K95 to Beta.01.  ckcmai.c
2160 . Promotion of SET GUI { MENUBAR, TOOLBAR } to visible.  ckuus3.c
2161
2162Changed the URL parser as follows: if the username and/or password fields are
2163present but empty, as in:
2164
2165           ftp://@ftp.xyzcorp.com/somepath
2166  or:      ftp://:@ftp.xyzcorp.com/somepath
2167  but not: ftp://:ftp.xyzcorp.com/somepath
2168
2169the pointer for these items becomes a pointer to an empty string, rather than
2170a NULL pointer.  Then when we go to open the connection, if the username
2171string pointer points to an empty string, we prompt for the username (and/or
2172password).  ckuusy.c 9 Oct 2002.
2173
2174Jason Heskett reported an interesting bug involving a core dump when an
2175ON_EXIT macro is defined that executes another macro.  Sometimes.  He was able
2176to send a short command file that always crashed.  Diagnosis: ON_EXIT, when it
2177is called, pokes itself out of the macro table by setting its own entry in the
2178macro name list to an empty string.  But this interferes with any macro
2179lookups that are done while executing ON_EXIT's body and also evidently some
2180code is not happy with empty macro names...  To fix: replace "on_exit" with
2181"on_exxx", so the replacement keyword is (a) nonempty, and (b) doesn't wreck
2182the alphabetical sorting of the table.  ckuusx.c, 9 Oct 2002.
2183
2184Added makefile targets for FreeBSD 4.6 and 5.0.  Built and tested on 4.6;
2185don't know about 5.0.  ckuver.h, makefile, 9 Oct 2002.
2186
2187Added targets for AIX 5.2 and 5.3; totally untested.  ckuver.h, makefile,
21889 Oct 2002.
2189
2190Built current source on Unixware 7.1.3 (make uw7); it's fine.  9 Oct 2002.
2191
2192Promoted C-Kermit to 8.0.206 Beta.01 in hopes of a simultaneous release
2193with K95 2.1.  ckcmai.c, 9 Oct 2002.
2194
2195From Jeff: Change KERMITFONT definitions to use the new (Unicode 3.1) code
2196points for the terminal graphics characters (such as VT100 horizontal scan
2197lines), rather than private-use codes.  ckcuni.c, 10 Oct 2002.
2198
2199Jason Heskett also complained that REMOTE CD would print the name of the new
2200directory returned by the server even if he SET QUIET ON.  This is a tricky
2201one.  Which server replies should the QUIET settings apply to?  If I give a
2202REMOTE DIRECTORY command, it means I want to see the directory listing,
2203period.  But if I give a REMOTE CD command, I get an "unsolicited" response
2204message that SET QUIET ON should suppress.  Adding message suppression to
2205rcv_shortreply() is close, but not totally right; for example, it also
2206suppresses the response to REMOTE PWD, which is not helpful.  The only right
2207way to do this is to suppress for REMOTE CD only, which can be done only by
2208setting a (new) global flag, rcdactive.  ckuus[r57].c, ckcpro.w, 10 Oct 2002.
2209
2210Ditto for REMOTE LOGIN response message ("Logged in").  ckuus7.c, 11 Oct 2002.
2211
2212From Jeff: SET GUI WINDOW FONT { NAME, SIZE }. ckuusr.h, ckuus4.c, 11 Oct 2002.
2213
2214Quick preliminary 8.0.206 build-all:
2215
2216 OK SunOS 4.1.3
2217 OK Solaris 2.5.1
2218 OK Solaris 9
2219 OK AIX 4.3.3
2220 OK HP-UX 10.20
2221 OK VMS 7.1 Alpha + TCP/IP
2222 OK VMS 7.1 Alpha nonet
2223 OK VMS 5.5 VAX + TCP/IP
2224 OK VMS 5.5 VAX nonet
2225 OK Unixware 7.1.3
2226 OK FreeBSD 3.1
2227 OK FreeBSD 4.6
2228 OK NetBSD 1.5.2 MVME (Gerry B)
2229 OK Sinix 5.42
2230
2231Sinix build got stuck on ckuusr.c even though we're not optimizing on Sinix
2232any more.  Rebooting the machine fixed it.
2233
2234Fixed some #ifdefs for VMS in new incomplete-file deletion code in doclean().
2235ckuusx.c, 11 Oct 2002.
2236
2237Moved uq_blah() prototypes from ckuusr.h to ckcker.h because these routines
2238are called in modules that don't (and shouldn't have to) include ckuusr.h.
223911 Oct 2002.
2240
2241Jeff verified secure builds on Linux and Solaris.
2242
2243Custom-build workout: 80 different feature-selection combinations:
2244 . Fixed yesterday's change for NOSPL: ckcfns.c.
2245 . Fixed conflict between NORECALL and USE_ARROWKEYS: ckucmd.c.
2246 . Moved setseslog() from ckuus5.c to ckuusx.c to avoid link-time foulups.
2247 . Fixed an unguarded reference to zmkdir() in ckcftp.c.
2248 . Protected rmsg() by #ifndef NOXFER: ckuus7.c.
2249 . Protected initxlist() by #ifndef NOXFER: ckcmai.c.
2250 . Fixed unguarded references to g_url struct in xx_ftp(): ckuusy.c.
2251 . Fixed unguarded references to tt_snaws() in winchh(): ckutio.c.
2252
2253--- 8.0.206 Beta.01 11 Oct 2002 ---
2254
2255From Jeff, 16 Oct 2002:
2256 . Fix K95 RMDIR: ckcfn3.c.
2257 . Makefile targets for Red Hat 7.2, 7.3, 8.0: ckuver.h, makefile.
2258 . Added \v(log_xxx) for each kind of log for PeterE: ckuusr.h, ckuus4.c.
2259 . Added SET TERM ATTRIBUTE DIM { ON, OFF }: ckuus[27].c.
2260 . Change "const" to "CONST" in some PAM declarations.  ckufio.c.
2261
2262Added SET MATCH { DOTFILE, FIFO } { ON, OFF }.  A FIFO special file is a named
2263pipe, used for interprocess communication.  It must be opened at both ends, so
2264it's silly to match them by default; opening a FIFO and attempting to read
2265will block forever unless somebody is writing into the other end.  Made the
2266MATCH FIFO default OFF in all cases.  The dotfile default is the same as
2267always (OFF for UNIX, ON elsewhere); SET MATCH DOTFILE is simply a more
2268untuitive and findable command than SET WILD KERMIT /MATCH-DOT-FILES.  Note
2269that SET MATCH DOTFILE undoes SET OPTIONS DIRECTORY /[NO]DOTFILES, and vice
2270versa.  ckcmai.c, ckuusr.h, ckuus[23].c, ckufio.c. 17 Oct 2002.
2271
2272Added client and server end of REMOTE SET MATCH { DOTFILE, FIFO } { ON, OFF }.
2273The new protocol codes are 330 and 331, respectively.  ckuus[367].c, ckcfns.c,
227417 Oct 2002.
2275
2276Adjusted the "match dot if pattern starts with dot" heuristic in nzxpand()
2277to not kick in if the filespec is "./foo".  This probably needs more work.
2278ckufio.c, 17 Oct 2002.
2279
2280Fixed typo in transcribing Jeff's ckcfn3.c code from yesterday.  18 Oct 2002.
2281
2282Moved some help text out of #ifdef ANYSSH that had nothing to do with SSH.
2283(Idea for a new EMACS feature: M-X list-ifdef-environment.)
2284ckuus2.c, 18 Oct 2002.
2285
2286Removed "set file { permission, protection }" keywords, which led nowhere.
2287ckuus7.c, 18 Oct 2002.
2288
2289Added -DSV68 to all SV/68 targets.  Make ckgetfqhostname() just return its
2290argument in SV/68; it dumps core otherwise.  In case this happens anywhere
2291else, add -DNOCKGETFQHOST to CFLAGS.  makefile, ckcnet.c, 18 Oct 2002.
2292
2293For PeterE, added SET { SEND, RECEIVE } PERMISSIONS { ON, OFF } so incoming and
2294outbound permission attributes can be set separately. ckuus[27].c, 18 Oct 2002.
2295
2296Changed SHOW ATTRIBUTES to show In and Out permissions separately.
2297ckuus5.c, 18 Oct 2002.
2298
2299Fixed REDO to display the command it's redoing and to add it to the bottom
2300of the recall buffer.  ckuusr.c, 18 Oct 2002.
2301
2302Discovered that DATE SATURDAY dumps core...  Apparently it always did; this
2303case was not included in the date-time torture test script.  The crash happens
2304because the DATE parsing code doesn't check for a NULL date-converion
2305error-message pointer.  Fixed in ckuusr.c, 18 Oct 2002.
2306
2307The reason DATE SATURDAY got a date-conversion error was that this path thru
2308the code left a result pointer unset.  Fixed in cmcvtdate(): ckucmd.c,
230919 Oct 2002.
2310
2311DATE SUNDAY +1DAY returned incorrect results (for any day-of-week name, any
2312delta time), even though DATE TODAY +1DAY worked fine.  Fixed in cmcvtdate():
2313ckucmd.c, 19 Oct 2002.
2314
2315SET TAKE ECHO ON counted each line twice when GOTO was active.  Fixed in
2316dogoto(): ckuus6.c, 19 Oct 2002.
2317
2318Jeff noticed:
2319"KERMIT READY TO GET...
2320 RCVD: (2 files) Last: [/amd/prost/p/kd/jaltman/.src/ckonet.c] (OK)
2321the last file attempted may have been ckonet.c but it certainly was
2322not the last file received" (similarly for sending).  Fixed by having two
2323pointers for each name; a preliminary pointer, which is set for each file at
2324the beginning of the transfer (when we have all the needed info), and a final
2325one that is set from the preliminary one only after the file was transferred
2326successfully.  This corrects not only the automatic "wheremessage" at the end
2327of a remote-mode transfer, but also the WHERE and SHOW FILE command results.
2328ckuusx.c, ckcfn[s3].c, ckcpro.w, 19 Oct 2002.
2329
2330From Jeff: Improve ORIENTATION message for K95 to say which directories are
2331for which INI files.  ckuusr.c, 23 Oct 2002.
2332
2333Removed Beta designation from herald.  ckcmai.c, 23 Oct 2002.
2334
2335Put final dates and ID strings in Unix and VMS build procedures.
2336Makefile, ckvker.com, 23 Oct 2002.
2337
2338Build-all...  #ifdef adjustments: ckcfns.c...  83 different feature-set
2339combinations build OK on Linux.  23 Oct 2002.
2340
2341From Jeff: SET WIN95 HORIZONTAL-SCAN-LINE-SUBSTITUTIONS.  ckuusr.h, ckuus7.c,
234224 Oct 2002.
2343
2344Fixed Heath-19 graphic character-set table to use new Unicode 3.1 values
2345if WIN95 HORIZ OFF.  ckcuni.c, 24 Oct 2002.
2346
2347Changed tx_usub() to return Unicode 3.1 values if WIN95 HORIZ OFF.
2348ckcuni.c, 24 Oct 2002. <-- No backed off on this.
2349
2350Some problems during build-all:
2351
2352 . VMS 7.1 TGV 4.2: If I make a Telnet connection with it, then try to send
2353   a file (itself. wermit.exe) over the connection, the connection drops
2354   after about 20%, the thermometer zooms out to 100% and SUCCESS is reported.
2355   This doesn't happen with UCX.
2356
2357 . VMS 7.3 TGV 4.3: ckcmai.c won't compile because of a complaint about the
2358   declaration of select() (which ckcmai.c doesn't use) in
2359   SYS$COMMON:[SYSLIB]DECC$RTLDEF.TLB.  Ditto in VMS 7.2 TGV 4.3.
2360   Adding NOSELECT to CFLAGS doesn't help.  I don't think the VMS version
2361   even uses select().  But the TGV 4.3 builds were OK in 8.0.201, so what
2362   changed?  I don't see anything in ckcnet.h that would have done it.
2363
2364It builds OK with VMS 7.1 / TGV 4.2 but sending files on Telnet connections
2365fails in a strange way: the connection drops, but the thermomoter goes to 100%
2366and success is reported.  I don't know why the connection is dropping (s_errno
2367is 32 == "broken pipe"), but the spurious success indication is because of
2368a double failure in sdata(): (1) The packet-sending loop index could go
2369negative without breaking the loop when streaming; (2) if spack() fails,
2370sdata() should return -2, not -1 (which means EOF).  Also if any ttchk() in
2371sdata() returns < 0, sdata should return -2.  I fixed this code (which has
2372been this way for YEARS) and now VMS C-Kermit properly fails when it gets
2373the spack() error, but ttchk() in this case still doesn't think the connection
2374is lost, but that must be our new problem with MultiNet.  ckcfns.c,
237527 Oct 2002.
2376
2377The compilation failure in ckcmai.c is a clue...  The problem was that I added
2378#ifdef VMS / #include <time.h> / #endif to shut up complaints about the time()
2379call.  Evidently something in VMS <time.h> gives MultiNet a bad case of
2380indigestion; removing it fixes the compilation and the result works fine.  The
2381transmission failures in the other case seem to be a coincidence -- something
2382to do with the U of Arizona (probably some obscure VMS quota on my IDs there,
2383or some kind of network connection throttling), since it doesn't happen
2384anywhere else.  ckcmai.c, 27 Oct 2002.
2385
2386Changed four occurrences of "void" to "VOID" in ckcftp.c, 27 Oct 2002.
2387
2388Defined NOCKFQHOSTNAME for HPUXPRE65.  Might also need this for HP-UX 7
2389and maybe 8.  ckcnet.c, 27 Oct 2002.
2390
2391From Jeff: PAM_CONST definition to clear up warnings caused by different
2392vendors' definitions of PAM structs.  ckufio.c, 28 Oct 2002.
2393
2394Unixware 2.1.0 build bombs immediately with "UX:make: ERROR: line too long"
2395(which line?)  Not worth chopping up the makefile to fix but in a pinch it
2396could be done.  2.1.3 builds OK.
2397
2398Did another 20-some platform builds, bringing the total to 83, plus a final
2399runthrough of the build-with-84-different-feature-set-combinations script on
2400Linux.  Should be good to go!
2401
2402--- 8.0.206 24 Oct 2002 ---
2403
2404Finally got access to Linux on IA64 again.  Builds OK but dumps core
2405immediately on startup.  Adding -DNOCKGETFQHOST was necessary but not
2406sufficient.  In this case, the very call to ckgetfqhostname() from ckhost()
2407(which is in ckuusx.c) was dumping core; thus I had to move the definition of
2408NOCKGETFQHOST from ckcnet.c to ckcdeb.h, add an #ifdef __ia64__ clause to it,
2409and protect the call to ckgetfqhostname() with it.  Obviously there has to be
2410a better fix but this will have to for now.  ckcnet.c, ckuusx.c, ckcdeb.h,
241131 Oct 2002.
2412
2413Link step fails in Mandrake 9.0 with undefined references to res_search,
2414dn_expand, and crypt.  Turns out the linux makefile target tests for the
2415existence of libcrypt.a and libresolv.a, but in Mandrake 9.0 they exist
2416only as *.so.  Changed linux target to look for both.  makefile, 1 Nov 2002.
2417
2418Vace reported that "ftp mget a b c" would get ALL files from the server's
2419directory if c did not exist.  Diagnosis: off-by-one error in counting MGET
2420args processed.  Naturally fixing this bug revealed another (this time
2421cosmetic) one, which resulted in spurious error messages when hitting MGET
2422args that have no match on the server.  Fixed in ckcftp.c, 1 Nov 2002.
2423
2424Rebuilt about 60 of the most important Unix binaries to pick up the fixes
242531 Oct - 1 Nov 2002, and refreshed the FTP site with new sources, tarballs,
2426ZIP files, etc.  Sat Nov  2 19:11:30 2002
2427
2428From Martin Vorlaender and Jeff, SSL/TLS support for VMS:
2429ckuusr.h, ckuath.h, ckcnet.c, ckctel.c, ckuath.c, 10 Nov 2002.
2430
2431Added PASV as invisible synonym for PASSIVE.  ckcftp.c, 10 Nov 2002.
2432
2433--- 8.0.206 24 Oct 2002 #2 ---
2434
2435More work on SSL in VMS: Jeff + Martin Vorlaender: ck_ssl.c ckcmai.c ckcnet.c
2436ckctel.c ckuath.h ckvcon.c ckvtio.c ckvker.com 10-15 Nov 2002.
2437
2438Discovered that ckvfio.c would not compile on VMS 6.1 with UCX 4.1 because
2439<conv$routines.h> was missing, which is explicitly included.  Enclosed the
2440#include in #ifdef NOCONVROUTINES..#endif and rebuilt with
2441@[users.fdc.src]ckvker.com "" "" "NOCONVROUTINES".  16 Nov 2002.
2442
2443Fixed the "ftp mget */data/*" problem with two small changes to doftpget():
2444ckcftp.c, 16 Nov 2002.  Placed a copy of ckcftp.patch in ~kermit/f.
2445
2446From Lucas Hart: Fixes for VAX C 2.x and CMU TCP/IP.  "Can't guarantee that
2447the revised CKVOLD will work for all combinations of more recent
2448VMS/compiler/TCPIP releases, but I've tested it for compatibility on our AXP
2449VMS 6.2, UCX 4.0, DECC 5.6, your AXP VMS 7.1, DEC TCPIP 5.1, DECC 6.0 as well
2450as with VAX VMS 5.4, VAX C 3.2, CMU12 and VAX VMS 4.7, VAX C 2.4."  ckvfio.c,
2451ckvtio.c, ckuus5.c, ckvker.com, ckvold.com, 17 Nov 2002.
2452
2453From Jeff: More work on VMS SSL.  Now it actually works, even in CONNECT mode,
2454except it hangs when it gets an error alert or the remote closes the
2455connection.  ckcnet.c. ckvtio.c, 17 Nov 2002.
2456
2457NOTE: Lucas's changes should go into the 8.0.206 source code but it's too
2458late since ckvtio.c (upon which he based his changes) is already full of
2459SSL code.
2460
2461MGET in K95 in totally broken FOR SOME PEOPLE (mainly me) if the TMP (or TEMP)
2462value is too long.  It works fine if you set these to C:\TMP.  Diagnosis: (1)
2463we were malloc'ing only 16 bytes for the temp file name (I think this was my
2464fault -- I was only looking at the "ckXXXXXX" part and forgetting that this
2465was appended to the TMP path); (2) the Windows version of mktemp() wants you
2466to use the value pointed to by the pointer it returns, rather than assuming
2467the mktemp() arg will be modified in place.  The code was changed to malloc a
2468longer string and to use the return value from mktemp() (if any) rather than
2469assuming that mktemp() modified its argument string (in K95 only -- not sure
2470about Unix platforms; the man pages differ on this, but at least this way if
2471some mktemp() version does NOT alter its argument, we still have a usable
2472filename (like /tmp/ckXXXXXX)).  Of course this won't be good for recursive
2473MLSD downloads, but we can always issue patches for the Unix version later if
2474needed.  The Linux and BSD versions use mkstemp() anyway.  There is, however,
2475a danger of a memory leak in the Unix version if the user has defined a TMPDIR
2476or CK_TMP environment variable whose value is longer than 9 bytes.  All this
2477is highly unlikely so we should be OK.  ckcftp.c, 17 Nov 2002.
2478
2479--- K95 2.1.1 and updated ck[uv]206.{tar,zip} but not C-Kermit binaries ---
2480
2481From Jeff: Fixes for Telnet Com Port Control, update to a newer release of
2482OpenSSL: ck_ssl.c ck_ssl.h ckcdeb.h ckcftp.c ckcmai.c ckcnet.c ckctel.c
2483ckuath.c ckuath.h ckucns.c ckuus4.c ckuus5.c ckuusr.c ckuusr.h ckvcon.c
2484ckvfio.c ckvker.com ckvtio.c ckvvms.h, 25 Nov 2002.
2485
2486--- K95 2.1.2 and C-Kermit 8.0 CDROM ---
2487
2488From Jeff, 28 Nov 2002:
2489 . Updated SSL modules: ck_ssl.[ch].
2490 . Fixed cipher-list display in SHOW AUTH & FTP ssl_auth(): ckuus7.c. ckcftp.c
2491 . Some minor tn_wait() fixes: ckctel.c.
2492 . Preliminary SSL support for VMS CONNECT: ckvcon.c.
2493
2494Bumped C-Kermit edit number to 207.
2495
2496From Jeff, 29 Nov 2002: "[C-Kermit was dumping core on SCO OSR5 Telnet Com Port
2497connections because] the SCO compiler treats all characters as signed.  This
2498was causing 'sprintf(buf,"02x ",ch);' to produce strings such as "ffffffc2"
2499instead of "c2" for values between 128 and 255.  This wrote beyond the end of
2500a buffer and blew away the stack.  Having fixed this I also noticed that
2501conect() did not properly check for carrier when TN CPC was negotiated.  This
2502has now been fixed as well."  ckucns.c, ckucon.c, ckctel.c, 29 Nov 2002.
2503
2504From Jeff, 30 Nov 2002: Fix SSL for VMS and also carry forward the CPC fixes
2505to VMS.  ckcnet.c, ckvtio.c, ckvcon.c, 30 Nov 2002.
2506
2507Changed copyright dates that are displayed (but not yet all the internal
2508ones) from 2002 to 2003.  ckcmai.c, 3 Jan 2003.
2509
2510Fixed the FTP module's brief-format transaction log, which had the status
2511inverted: OK for FAILED and v.v.  ckcftp.c 3 Jan 2003.
2512
2513From Jeff, 4 Jan 2003:
2514 . Make /MOVE-TO:xxx convert xxx to full pathname: ckuus[r67].c,
2515 . Make SHOW OPTIONS ALL show both kinds of options: ckuus2.c.
2516 . More command-line personalities: ckcmai.c, ckuusy.c.
2517 . New NOSCROLL command for K95: ckuusr.[ch], ckuus2.c.
2518 . New lockdown and other command-line options: ckuusr.h, ckuusy.c.
2519 . SSL interface updated to OpenSSL 0.9.7: ck_ssl.c.
2520 . SET TERM LINE-SPACING and CURSOR xxx NOBLINK: ckuus[27]c.
2521 . Expanded SHOW GUI command: ckuus3.c
2522 . New SHOW TABS code: ckuus5.c.
2523
2524Updated SUPPORT (BUG), NEWS, and INTRO texts.  ckuus[26].c. 5 Jan 2003.
2525
2526Fixed FTP module to suppress "'FEAT': Command not understood" message
2527unless FTP DEBUG is ON.  ckcftp.c, 6 Jan 2003.
2528
2529Got a report that C-Kermit dumps core on Solaris when executing a certain
2530script.  Seems to be related to changing vnambuf[] in zzstring() from an
2531automatic array to a malloc'd buffer (see notes from 29 Jun 2000).  Changed
2532it to an automatic buffer except for K95.  ckuus4.c, 6 Jan 2003.
2533
2534Nope, that's not it.  It evidently happens only after FTP PUT has been used.
2535Fixed solaris9g makefile target to include -funsigned-char and built a new
2536binary.  Determined that building with gcc and -funsigned-char makes no
2537difference.  makefile, 7 Jan 2003.
2538
2539I did a preliminary audit, looking at the items in the left column: if used in
2540a given routine, are there any obvious mistakes:
2541
2542                       1        2          3           4              5
2543                   doftpput->putfile->sendrequest->doftpsend2->secure_write
2544malloc                OK       OK         OK          OK             OK
2545makestr               OK       OK         OK          OK             OK
2546automatic arrays      OK       OK         OK          OK             OK
2547[ck]str[n]cpy         OK       OK         OK          OK             OK
2548[ck]str[n]cat         OK       OK         OK          OK             OK
2549sprintf               OK       OK         OK          OK             OK
2550nzltor                OK       OK         OK          OK             OK
2551zfnqfp                OK       OK         OK          OK             OK
2552memcpy                OK       OK         OK          OK             OK
2553bcopy                 OK       OK         OK          OK             OK
2554
2555secure_write sends the data directly on clear-text connections.  On secure
2556connections, it calls secure_putbuf(), which calls secure_putbyte(), but we
2557aren't using those, so secure_write() is the end of the call chain for FTP
2558PUT.  doftpsend2 has buf[] as an automatic array, which it reads file data
2559into using zxin (binary mode only), but this looks OK.  Still, I changed it
2560read 1 less than the buffer size (fread) just in case.  Also there was one
2561debug() statement that referred to an automatic array (fullname[]) before it
2562was initialized (but not used in this case), which I fixed.  ckcftp.c,
25637 Jan 2003.
2564
2565FTP GET /RECURSIVE somepath/somefile still didn't work, despite what the
2566notes of 19 Sep 2001 say.  There are so many paths through the code,
2567depending on switch values, GET vs MGET, etc, that a crucial spot was missed.
2568Fixed in doftpget(): ckcftp.c, 7 Jan 2003.
2569
2570Back to the core dump...  after two days of full-time debugging, I found the
2571culprit: the buffer-full test in the zzout() macro should have been ">="
2572rather than just ">", thus Kermit wrote 1 byte past the end of the malloc'd
2573FTP PUT output buffer, ucbuf.  Why did it never happen in K95?  Because, since
2574it's a secure build, FUDGE_FACTOR is defined there.  But it's not defined in
2575Solaris or other clear-text builds.  Although the crash wouldn't happen in
2576secure builds, the 1-byte leak might have caused errors in the data transfer.
2577In non-Solaris clear-text builds, like Linux, I suspect that malloc() tends
2578add something for safety (especially given the man page statement that it
2579allocates "at least" what you asked for).  Another reason the problem escaped
2580notice is that zzout() is used only for text-mode PUTs (and then only when
2581there is no character-set translation), but most transfers these days are
2582binary and/or downloads.  Anyway, in the course of debugging, a lot of small
2583cleanups were done: sizeof(blah) for all arrays was replaced by the same
2584symbolic size that was used to allocate the array, numeric array sizes were
2585replaced with symbolic ones, etc.  The real fix is one character long.
2586ckcftp.c, 9 Jan 2003.
2587
2588Got a report that "mget /recursive */somedir/*" downloaded the files into
2589the current directory, rather than re-creating the remote directory structure.
2590Fixed in doftpget(): ckcftp.c, 10 Jan 2003.
2591
2592Unix C-Kermit did not allow file transfer if started under inetd and accessed
2593via Internet raw socket (or whatever).  Diagnosis: isatty() and friends would
2594fail causing ttopen() to fail.  Fixed by adding escape clauses for "-l 0"
2595situations (i.e. Kermit invoked with an already-open file descriptor) at the
2596appropriate places.  ckcmai.c, ckutio.c, 14 Jan 2003.
2597
2598From Jeff for K95 2.1.3
2599 . Add test for startflags & 128 to trap() for ignoring BREAK.
2600 . Fix for SHOW TRANSMIT.
2601
2602--- K95 2.1.3 ---
2603
2604FTP USER, FTP ACCOUNT, plus the various prompts and switches for FTP username,
2605password, and account all neglected to strip quotes, and in most cases quotes
2606are necessary to specify a username that contains spaces.  ckcftp.c,
260715 Jan 2003.
2608
2609FTP MPUT f1 f2 f3... gets a parse error if any of the fn's do not match an
2610existing file.  This is bad for scripts.  In doftpput(), cmfdb() looks for
2611keywords (switches) or CMIFI.  When it hits CMIFI, it exits from the initial
2612parse loop and then does additional cmifi()s in a loop until done.  The most
2613obvious fix is to parse each field with cmfdb(CMIFI,CMFLD), i.e. fall back to
2614CMFLD if CMIFI doesn't match anything.  Then if CMFLD was used, we don't add
2615the filespec to the list.  This is a rather big change but it seems to work.
2616No error messages or failures happen for non-matching fields, but an error
2617message is printed (and the MPUT command fails) if none of the fields match
2618any files.  This fix got in too late for 2.1.3; workaround: use C-Shell
2619like wildcard list (ftp mput "{*.abc,foo.*}").  ckcftp.c, 16 Jan 2003.
2620
2621GREP did not pass its pattern through the expander, thus variables could
2622not be used for patterns.  This must have been an oversight -- I can't find
2623anything in my notes about it.  Fixed in dogrep(): ckuus6.c, 24 Jan 2003.
2624
2625New makefile target for HP-UX 11.xx with OpenSSL from Tapani Tarvainen.
2626makefile, 31 Jan 2003.
2627
2628From Jeff:
2629 . Avoid core dump when dereferencing tnc_get_signature(): ckuus4.c.
2630 . Bump version numbers to 8.0.208, 2.1.4: ckcmai.c.
2631
2632Added /NOLOGIN to FTP [OPEN].  ckcftp.c, 10 Feb 2003.
2633
2634Don't dump core if FTP DEBUG is ON and FTP OPEN does not include a service.
2635openftp(): ckcftp.c, 10 Feb 2003.
2636
2637HELP PATTERN text incorrectly identified commands and functions with
2638floating and anchored patterns.  The corrected lists are:
2639Floating: GREP, TYPE /MATCH:, /EXCEPT: patterns, \farraylook(),
2640Anchored: IF MATCH, file-matching wildcards, \fsearch(), \frsearch()
2641ckuus2.c, 10 Feb 2003.     
2642
2643INPUT n \fpattern(xxx) did not work for case-independent comparisons.
2644Fixed in doinput(): ckuus4.c, 10 Feb 2003.
2645
2646It seems \fpattern() didn't work with MINPUT at all.  There was no code to
2647handle \fpattern() in the MINPUT parse loop, so it never worked.  The code
2648had to be totally rewritten to use cmfld() in a loop, rather than cmtxt()
2649and then cksplit().  Furthermore, whenever any of the fields was an
2650\fjoin(), this had to be split.  ckuusr.c, 10 Feb 2003.
2651
2652Macro replacement via \m() and \fdefinition() does not work as advertised
2653(i.e. case sensitively) for associative array elements; e.g. \m(xxx<abc>) is
2654treated the same as \m(xxx<ABC>), contrary to section 7.10.10 of the C-Kermit
26557.0 update notes, and to the fact that the two really do exist separately.
2656Fixed by adding a static function isaarray(s) which succeeds if s is an
2657associative array reference and fails otherwise, and then having \m()
2658and \fdef() call mxxlook() (case-sensitive lookup) if isaarray(), otherwise
2659(as before) mxlook()).  ckuus4.c, 11 Feb 2003.
2660
2661Fixed FTP OPEN to allow the /USER switch to override SET FTP AUTOLOGIN OFF,
2662just as /NOLOGIN overrides SET FTP AUTOLOGIN ON.  ckcftp.c, 11 Feb 2003.
2663
2664In K95, "set key \1234 \27H" (any SET KEY command in which the first char of
2665the definition was backslash, and the ONLY character after the backslash
2666quantity was an uppercase letter, that letter would be lowercased).  Diagnosis:
2667xlookup() poking its argument (see notes from July 2000).  Jeff sent a fix.
2668ckucmd.c, 15 Feb 2003.
2669
2670Ran my S-Expression torture test to make sure Sexps still worked.  They do,
2671except the bitwise & and | operators were broken, e.g. (& 7 2) and (| 1 2 4)
2672get "Invalid operand" errors.  Jeff's code had added an early failure return
2673from the lookup loop when when a single-byte keyword matched a keyword that
2674started with the same byte but was more than one byte long.  So "&" would hit
2675"&&" and fail instead of continuing its search (xlookup tables aren't sorted
2676so there can be no early return).  Fixed in xlookup(): ckucmd.c, 16 Feb 2003.
2677
2678Got rid of "krbmit" target from makefile.  It's still there, but we don't
2679use it any more.  All secure targets now use "xermit", and produce a binary
2680called wermit, just like the regular ones do (except the old ckucon.c ones).
2681Non-secure targets, since they don't define any of the security symbols,
2682wind up compiling and linking to (mostly) empty security modules.  makefile,
268315 Feb 2003.
2684
2685Added \fcvtdate(xxx,3) to format its result in MDTM format (yyyymmddhhmmss,
2686all numeric, no spaces or punctuation).  Of course these numeric strings
2687are too big to be 32-bit numbers and are useless for arithmetic, but they're
2688useful for lexical comparison, etc.  ckuus[24].c, 16 Feb 2003.
2689
2690The following FTP commands did not set FAILURE when they failed: RMDIR,
2691CD, CDUP, Fixed in the corresponding doftpblah() routines.  ckcftp.c,
269216 Feb 2003.
2693
2694RENAME would sometimes not print an error message when it failed, e.g. in K95
2695when the destination file already existed.  ckuus6.c, 17 Feb 2003.
2696
2697Fixed COPY error messages, which did not come out in standard format when
2698/LIST was not included.  ckuus6.c, 17 Feb 2003.
2699
2700Fixed #ifdefs in ck_crp.c to allow nonsecure builds on old platforms like
2701System V/68 R3.  19 Feb 2003.
2702
2703Similar treatment for ck_ssl.c.  20 Feb 2003.
2704
2705From Jeff, 21 Feb 2003:
2706 . AIX53 and AIX52 symbols for ckcdeb.h, makefile.
2707 . New gcc targets for various AIX 4.x/5.x versions: makefile.
2708 . Copyright date updates: ck_crp.c, ck_ssl.c.
2709 . ENABLE/DISABLE QUERY broken because keyword table out of order: ckuusr.c.
2710 . Fixed the use of HTTP proxies for HTTP [RE]OPEN for Unix: ckcnet.c.
2711
2712Also for K95 only: Allow file transfer when K95 is invoked on the remote end
2713of a connection to a Pragma Systems Terminal Server connection; automatically
2714SET EXIT HANGUP OFF when invoked with open port handle ("k95 -l nnnn").
2715
2716"cd a*" failed even when "a*" matched only one directory.  Fixed in cmifi():
2717ckucmd.c, 21 Feb 2003.
2718
2719In the Unix version, replace "extern int errno;" with "#include <errno.h>"
2720if __GLIBC__ is defined, since glibc now defines a thread-specific errno.
2721ckcdeb.h, 26 Feb 2003.
2722
2723Added #ifdefs to skip compilation of ckuath.c in nonsecure builds.  Tested
2724by building both secure and regular versions in Linux.  ckuath.c, 26 Feb 2003.
2725
2726Ran the build-in-84-different-configurations script on Linux to make sure it
2727still builds with all different combinations of feature selection options.
2728All OK.  26 Feb 2003.
2729
2730Built on VMS.  Needed to add a prototype for mxxlook*() to ckuusr.h; built
2731OK otherwise.  26 Feb 2003.
2732
2733From Jeff: More #ifdef shuffling for nonsecure builds: ckuath.c, ck_ssl.c,
273427 Feb 2003.
2735
2736Added code to ensure \v(download) ends in a directory separator in Unix,
2737Windows, and OS/2.  ckuus7.c, 27 Feb 2003.
2738
2739Added code to K95 zfnqfp() to tack on directory separator when returning
2740a directory name.  ckofio.c, 27 Feb 2003.
2741
2742Somehow an old copy of ckuath.c popped to replace the new one.  Put the new
2743one back.  28 Feb 2003.
2744
2745From Jeff: Fix typo in my K95 zfnqfp() code from yesterday; fixes for handling
2746UNCs uniformly, no matter which way their slashes are leaning.  ckofio.c,
274728 Feb 2003.
2748
2749At Jeff Mezei's suggestion, separate text and binary mode open sequences
2750for VMS session log.  ckvfio.c, 28 Feb 2003.
2751
2752Added freebsd48 target for FreeBSD 4.8.  makefile, 1 Mar 2003.
2753
2754Changed Mac OS X entries to include -DUSE_STRERROR.  makefile, 2 Mar 2003.
2755
2756Fixed GETOK /GUI to evaluate its text argument.  ckuus6.c, 3 Mar 2003.
2757
2758Jeff fixed the K95 Dialer QUICK dialog to (a) allow templates, and (b) have
2759a Save-As option.  3 Mar 2003.
2760
2761Jeff fixed a problem with the Xmodem-CRC checksum being crunched whenever
2762there was a retransmission.  7 Mar 2003.
2763
2764Added target/banner for Tru64 5.1B.  makefile, ckuver.h, 5 Mar 2003.
2765
2766In Unix, the zcopy() routine (used by the COPY command) reset the user's umask
2767to 0 for the remainder of the Kermit process lifetime.  The bug was in
2768ckufio.c 8.0.194, 24 Oct 2002, and is fixed in ckufio.c 8.0.195, 6 Mar 2003.
2769Of course this happened after building 155 C-Kermit 8.0.208 binaries.  (But
2770before officially releasing 8.0.208.)
2771
2772In the VMS version, changed:
2773
2774        while ((n--) && xx_inc(2) > -1) ;
2775to:
2776        while ((n--) && xx_inc(2) >= 0) ;
2777
2778to suppress the "...is being compared with a relational operator to a constant
2779whose value is not greater than zero" warning.  ckvtio.c, 7 Mar 2002.
2780
2781Added a debug call to dologend in hopes of catching overzealous Locus
2782switching, which seems to happen only in K95.  ckuus3.c, 7 Mar 2002.
2783
2784Rebuilt binaries for some of the more current Unix releases: AIX 4.3.3-5.1,
2785Solaris 7-9 , Red Hat 7.0-8.0, Slackware 8.1, Freebsd 4.7-4.8, NetBSD 1.6,
2786OpenBSD 3.2, Unixware 7.1.3, Open Unix 8, OSR5.0.6a, etc.  A Unix binary with
2787COPY umask fix shows a 6 Mar 2003 date for "UNIX File support" in SHOW
2788VERSIONS; a binary without the fix shows 24 Oct 2002.
2789
2790C-Kermit 8.0.208 dated 14 March 2003 released on 10 March 2003.
2791
2792---8.0.208---
2793
2794From Jeff 13 Mar 2003:
2795 . Updated SSL module allows importation of tickets from host.
2796 . freebsd50+openssl target: makefile.
2797 . FTP PUT /PERMISSIONS error message for K95: ckcftp.c.
2798 
2799Fixed MINPUT to strip quotes or braces from around targets (this was broken
2800on Feb 10th).  Thanks to Jason Heskett for discovering and reporting this
2801(killer) bug.  ckuusr.c, 14 Mar 2003.
2802
2803Changed version number to 209 Dev.00.  ckcmai.c, 14 Mar 2003.
2804
2805While debugging the alphapage script, I found that the command "minput 8 \6\13
2806\21\13 \13\27\4\13 \30\13" gets "?Not confirmed" in 8.0.208 and 8.0.209, but
2807not in 206 and earlier.  This problem too was introduced on Feb 10th by
2808changing MINPUT parsing from cmtxt() followed by cksplit() to cmfld() in a
2809loop.  cmfld() uses setatm() to return its result and of course setatm()
2810breaks on \13.  Changing setatm() not to do this would break everything else.
2811But cmfld() has no arguments that let us tell it to do anything different in
2812this case.  Changing the API would be a disaster.  The only solution is to add
2813an "MINPUT ACTIVE" (minputactive) global variable that tells cmfld() to tell
2814setatm() not to break on CR.  Now MINPUT with braced targets containing CR
2815and/or LF works in 209, 206, and 201 (but not 208).  ckucmd.c, ckuusr.c,
2816ckuus5.c, 15 Mar 2003.
2817
2818MINPUT n \fjoin(&a) works OK if all the members of \&a[] are text strings, but
2819if they are strings of control chars (as above), they don't get separated by
2820the spaces.  For example in:
2821
2822  dcl \&a[] = "\4\5" "\6\7" xxx
2823  minput 10 \fjoin(&a)
2824
2825MINPUT gets two targets: "aaa" and "\4\5 \6\7 xxx".  The bug was in the
2826cksplit() call in the \fjoin() case of MINPUT: it needed to specify an
2827include set consisting of all the control characters except NUL.  ckuusr.c,
282816 Mar 2003.
2829
2830But there's still a problem:
2831
2832  dcl \&a[] = "\4\5\13\10" "\6\7" "xxx"
2833
2834creates an array whose first member is "^D^E (one doublequote included).  But
2835if braces are used instead, there's no problem.  Same deal as MINPUT: cmfld()
2836breaks on CR or LF, thus the end quote is lost.  If I set minputactive for
2837DECLARE initializers too, that fixes it.  Is there any reason not to do this?
2838Can't think of any (famous last words)...  ckuusr.c, 16 Mar 2003.
2839
2840Since it has multiple applications, changed the flag's name from minputactive
2841to keepallchars.  ckucmd.c, ckuus[r5].c, 16 Mar 2003.
2842
2843\v(exedir) wasn't being set correctly (it included the program name as well
2844as the directory).  Fixed in getexedir(): ckuus4.c, 16 Mar 2003.
2845
2846SET CARRIER-WATCH <Esc> "auto matic" (spurious space in supplied keyword).
2847Cosmetic only; it still worked.  Fixed in setdcd(): ckuus3.c, 16 Mar 2003.
2848
2849"directory a b c" listed too many files -- all files whose names END WITH a,
2850b, or c, rather than the files whose names WERE a, b, or c.  Diagnosis: The
2851filespec is changed into a pattern: {a,b,c}, which is the correct form.  It is
2852passed to nzxpand(), which goes through the directory getting filenames and
2853sending each one to ckmatch() with the given pattern.  ckmatch() receives the
2854correct pattern but then prepends a "*" -- that's not right.  It's not just
2855in filename matching either.  The following succeeds when it shouldn't:
2856
2857  if match xxxxc {{a,b,c}} <command>
2858
2859Changing ckmatch() to not prepend the "*" to each segment fixes the command
2860above but breaks lots of others.  Running through the "match" torture-test
2861script shows the problem occurs only when the {a,b,c} list is the entire
2862pattern, and not embedded within a larger pattern.  Testing for this case
2863fixed the problem.  ckmatch(): ckclib.c, 16 Mar 2003.
2864
2865Fixed FTP MODTIME to not print anything if QUIET ON.  ckcftp.c, 16 Mar 2003.
2866
2867Picked up a new ckuath.c from Jeff, not sure what the changes are. 16 Mar 2003.
2868
2869Did a few regular and secure builds to make sure I didn't wreck anything.
2870
2871Changed version number to 209 (final).  ckcmai.c, 16 Mar 2003.
2872
2873Jason Heskett found another bug: if you define a macro FOO inside the
2874definition of another macro BAR, and FOO's definition includes an odd number
2875of doublequotes (such as 1), FOO's definition absorbs the rest of BAR's
2876definition.  Example:
2877
2878  def TEST {
2879    .foo = {X"}
2880    sho mac foo
2881  }
2882  do test
2883  sho mac foo
2884
2885Results in:
2886
2887  foo = {X"}, sho mac foo
2888
2889Diagnosis: the TEST definition becomes:
2890
2891  def TEST .foo = {X"}, sho mac foo
2892
2893and the macro reader is erroneously treating the doublequote as an open
2894quote, and then automatically closes the quote at the end of the definition.
2895The error is that a doublequote should be significant only at the beginning of
2896a field.  But the macro reader isn't a command parser; it doesn't know what
2897a field is -- it's just looking for commas and skipping over quoted ones.
2898First we have to fix an oversight: SET COMMAND DOUBLEQUOTING OFF should have
2899worked here, but it wasn't tested in this case.  Fixed in getncm(): ckuus5.c,
290017 Mar 2003.
2901
2902There are only certain cases where it makes sense to treat doublequotes as
2903signicant:
2904
2905 . An open quote must be at the beginning or preceded by a space.
2906 . A close quote is only at the end or else followed by a space.
2907
2908This too was fixed in getncm(): ckuus5.c, 17 Mar 2003.
2909
2910A fix from Jeff SSL/TLS FTP data decoding.  ckcftp.c, 18 Mar 2003.
2911
2912---8.0.209---
2913
2914Tried building C-Kermit on a Cray Y-MP with UNICOS 9.0.  "int suspend",
2915declared in ckcmai.c and used in many modules, conflicts with:
2916
2917  unistd.h:extern int suspend __((int _Category, int _Id));
2918
2919The "=Dsuspend=xsuspend" trick doesn't work for this; there is no way around
2920the conflict other than to rename the variable: ckcmai.c, ckutio.c,
2921ckuus[35xy].c.  26 Mar 2003.  VMS and K95 not affected.
2922
2923OK that gets us past ckcmai.c...  Then in ckutio.c I had to add a new #ifdef
2924around the LFDEVNO setting, because the Cray didn't have mkdev.h.  Could not
2925find a Cray-specific manifest symbol, so I made a new makefile target (cray9)
2926that sets this symbol.  Having done this I have no idea what kind of lockfile
2927would be created, but I also doubt if anybody dials out from a Cray.  The
2928binary should run a C90, J90, or Y-MP.  makefile, 26 Mar 2003.
2929
2930Added a target for SCO OSR5.0.7.  makefile, ckuver.h, 30 Mar 2003.
2931
2932Changed since 208:
2933makefile ckuver.h ckcmai.c ckclib.c ckcftp.c ckucmd.c ckuus*.c ckutio.c.
2934
2935***********************
Note: See TracBrowser for help on using the repository browser.