ckc197.txt
资源名称:cku197.tar.Z [点击查看]
上传用户:dufan58
上传日期:2007-01-05
资源大小:3407k
文件大小:866k
源码类别:
通讯/手机编程
开发平台:
Windows_Unix
- proper error message is printed if there is no match. ckuus2.c, 25 Jun 99.
- Added x.xxMB (or GB) to DIR /HEADING summary. 26 Jun 99.
- Added /BYTE and /LINE switches to FILE SEEK, so now you can FSEEK to a
- particular line in a file. ckuus7.c, 26 Jun 99.
- Added FILE COUNT / FCOUNT to return the number bytes or lines in an open file
- (without disturbing its current position). ckuusr.[ch], ckuus7.c, 26 Jun 99.
- Added new functions & variables:
- . f_line(chan) to return line number if known.
- . v(filecount) to return extern int z_filcount.
- . fleft() for convenience and symmetry with fright().
- ckuusr.h, ckuus[47].c, 26 Jun 99.
- Added /SIZE:n /LPAD:c /RPAD:c switches to FILE WRITE. ckuus7.c, 26 Jun 99.
- Added f_ermsg(code). ckuusr.h, ckcker.h, ckuus[47].c, 27 Jun 99.
- Added relative seeks: FSEEK { /LINE, /BYTE } <channel> {+,-}<number>.
- ckuus7.c, 27 Jun 99.
- Renamed FILE-related variables to v(f_xxx). ckuus4.c, 27 Jun 99.
- Updated help text for FILE commands and functions. ckuus2.c, 27 Jun 99.
- Checked Dale Dellutri's report about SET FLOW KEEP not working in VMS.
- Actually, it was working, but the order in which SET LINE/PORT/HOST and SET
- FLOW are given is now signicant, where it wasn't before. 27 Jun 99.
- Added TRACE [ { /ON, /OFF } ] { ASSIGNMENTS, COMMAND-LEVEL, ALL }. When ON,
- this prints a message every time the value of any variable changes or the
- command level changes. ckuusr.[ch], ckuus[256].c, 27 Jun 99.
- From Jeff: Fix to bogus rewind() call, fixes to SSL support & some ttclos()
- calls without args. ckuus7.c, ckutio.c, 28 Jun 99.
- Added NOSTAT for VOS. ckcdeb.h, 28 Jun 99.
- Added a quick & dirty adaptation of SET SERVER IDLE-TIMEOUT to non-K95 builds
- (K95 already had it). It's quick & dirty because it can't coexist with SET
- SERVER TIMEOUT. ckcmai.c, ckcfn2.c, ckcpro.w, ckuus[235].c, 28 Jun 99.
- Added RETURN value to TRACE ASSIGNMENTS. ckuus6.c, 28 Jun 99.
- While looking at RETURN, discovered that it set success=1 when given a value,
- and success=0 when not given a value, which makes no sense. Changed it not to
- mess with success. ckuus6.c, 28 Jun 99.
- Added SET TRANSFER INTERRUPTION { ON, OFF }. Refers to file-transfer
- interruption in local mode, as opposed to SET TRANSFER CANCELLATION, which
- refers to remote mode. ckuusr.h, ckcmai.c, ckuus[234x].c, 28 Jun 99.
- From Jeff:
- . Added ckgetfqhostname() to retrieve the fully qualified hostname
- from a partial name. This is done by performing a DNS lookup and
- immediately performing a reverse lookup on the first IP address in the
- list.
- . Warning: if the function is called on an alias such as "cunix" the
- IP address in the list when calling ckgetfqhostname() may not match
- the IP address in the list when netopen() calls gethostbyname().
- If the function is going to be used as a general call in setline()
- then the result of this function must replace the hostname the user
- typed in the parse buffer. I have not made this change as I only need
- it to check the realm of the host and we assume that all of hosts
- sharing a common alias will have the same realm. (although, I am sure
- somebody will prove us wrong.)
- . Added check for Ctrl-C in tn_wait().
- ckcnet.c ckuus7.c ckcnet.h ckctel.c, 29 Jun 99.
- Removed #ifdef CK_CURSES from around prototypes for ck_cls() and friends,
- since these are referenced in the code even when CK_CURSES is not defined,
- in which case dummies are provided. ckuusr.h, 29 Jun 99.
- Peter E reported that if HP-UX C-Kermit was in server mode on a serial port
- which had been dialed in to, and the user hung up without sending BYE, and
- FINISH was disabled, that C-Kermit would go into a loop forever (tying up the
- port and, if the debug log was on, filling up the disk). Diagnosis: (1) the
- read() in myfillbuf() SVORPOSIX case returned 0, and so myfillbuf() returned 0
- too; (2) mygetbuf(), which called myfillbuf(), returns -2 if myfillbuf()
- returns 0; (3) ttinl(), which calls mygetbuf() through the myread() macro,
- passes the -2 up to rpack(), which passes it up to input(); (4) input()
- interprets -2 (correctly) as "Ctrl-C was typed" and returns 'q' to proto();
- (5) proto() says "oh no you don't -- quitting is disabled" and goes back to
- its read loop, and (6) the process repeats forever.
- How to fix? First, myfillbuf() should not return 0 if read() returns 0,
- because the device was conditioned to return at least 1 byte with (in the
- SVORPOSIX case) VMIN > 0, VTIME = 0, and O_NDELAY off. That is, the read() is
- blocking and therefore a 0 return must indicate connection loss or other
- unrecoverable error, EVEN IF errno is 0 after the read (which it is in this
- case). Therefore (at least SVORPOSIX) myfillbuf() should return -3
- (connection lost) if read() returns 0. In the FIONBIO case, myfillbuf()
- should also never return 0. And the same is true in the non-SVORPOSIX /
- non-FIOBIO case. In every case the read() is blocking, so should never
- return 0. So I made every instance of UNIX myfillbuf() return -3 if the read
- returns 0, except in the Kerberos, SSL, and other cases, which I'm not sure
- about. ckutio.c, 29 Jun 99.
- Second, UNIX mygetbuf() had a mistake:
- my_count = myfillbuf();
- if (my_count <= 0) { my_count = 0; ...; return((my_count < 0) ? -3 : -2); }
- So it would never return -3 (except in the network case, which had a special
- check). This was fixed by copying my_count to another variable (x), and then
- checking x in the return() clause. ckutio.c, 29 Jun 99.
- Third, even when ttinl() returns -3 to rpack(), rpack() was changing it to
- -2 before passing back up if FINISH was disabled. What a mess... ckcfn2.c,
- 29 Jun 99.
- Fourth, now that -3 passed all the way up the line, what does input() do with
- it? It treats -2 and -3 the same, translating them BOTH to (pseudo) packet
- type 'q' (lower case) so the protocol engine can't tell the difference. So
- now we have to either (a) make a new pseudopacket type to indicate connection
- loss, or (b) manage yet another global flag.
- But wait, there already is one -- 'interrupted' is set by rpack() if ttinl()
- returns -2. Therefore, whenever the input to the state machine is 'q', but
- interrupted == 0, we must have connection loss. Or an idle timeout. OK, so
- two flags... The code to check these flags was added to the relevant <*>q
- cases in the protocol engine. ckcpro.w, 29 Jun 99.
- That should do it... But note that all this is necessary only when (a) read()
- returns 0 but does NOT set errno, AND (b) the client hanging up does cause a
- SIGHUP signal -- Kermit already catches both of those cases. However, the
- logs show that (a) and (b) are indeed the case at Peter E's site.
- Dat Thuc Nguyen noticed that a closing bracket was not required on a
- single-line macro definition; e.g. "def xx { echo foo" was accepted and
- actually worked. Of course ANYTHING should be accepted as a macro definition.
- But an error should occur when attempting to execute a malformed macro. Fixed
- in dodef(), ckuus6.c, 29 Jun 99.
- Peter E confirms yesterday's changes (and SET SERVER IDLE-TIMEOUT) work OK
- on his HP-UX systems. 30 Jun 99.
- Moved UNIX SIGHUP arming from conint() to sysinit() so hangups can be caught
- earlier. ckutio.c, 30 Jun 99.
- Fixed FILE COUNT to check return code from z_count(). ckuus7.c, 1 Jul 99.
- Added a makefile target for DG/UX 5.4R4.20. makefile, ckuver.h, 5 Jul 99.
- FSEEK /LINE %c EOF followed FSEEK /LINE %c -1 failed because Kermit didn't
- know the current line number. I changed FSEEK /LINE <channel> EOF to set the
- resulting line number. ckuus7.c, 5 Jul 99.
- Added a new error code, FX_LNU = Current line number unknown, for use with
- relative line seeks, and changed z_getline() to return it. ckuus7.c, 5 Jul 99.
- Changed FCLOSE ALL to not fail or print a message if no files were open.
- Changed FCLOSE ALL to fail if an open file could not be closed (but still
- close all the other ones that could be closed). ckuus7.c, 5 Jul 99.
- Added /RELATIVE /ABSOLUTE switches to FILE SEEK, to force relative or absolute
- seeking, irrespective of the format of the number. ckuus7.c, 5 Jul 99.
- Added /LIST and /NOLIST switches to FILE COUNT to force display or suppression
- of the count. /QUIET is a synonym for /NOLIST. ckuus7.c, 5 Jul 99.
- Added askmore() to FILE LIST. ckuus7.c, 5 Jul 99.
- Updated HELP FILE texts and fixed HELP FILE COUNT, which was broken.
- ckuus2.c, 5 Jul 99.
- Improvements to method for getting local host name in K95 from Jeff.
- ckcnet.c 6 Jun 99.
- Added some minor speedups to FREAD /LINE, FSEEK /LINE, and FCOUNT /LINE.
- ckuus7.c, 7 Jun 99.
- There was no prohibition against seeking before the beginning of a file, which
- could lead to some interesting problems in script loops (e.g. to read a file's
- lines in reverse order). Now it fails silently. ckuus7.c, 7 Jun 99.
- From Jeff:
- I have made the gethostbyname(NULL) call the default in getlocalipaddr().
- I have added DNS SRV record lookups. This is conditionally compiled with
- CK_DNS_SRV. If you do not want to compile using it define NO_DNS_SRV. The
- changes in ckuus7.c from port numbers to service strings is to allow the
- DNS_SRV code to work by default. I have made appropriate changes to
- netopen() to ensure that each service will be translated to a port number
- even if getservbyname() is not supported.
- Now when you telnet / set host to (e.g.) watsun, the DNS SRV query is:
- _telnet._tcp.watsun
- If a response arrives we use the first host and ignore the rest (it was too
- much work to allow a list of host:ports to be specified).
- I did not need to add any libraries to allow compilation on watsun. Linux
- requires -lresolv for the res_search and dn_expand functions.
- ckcdeb.h ckcnet.h ckcnet.c ckuus7.c ckuath.c makefile, 11 Jul 99.
- Should there be a SET command to control whether this code is used?
- Time will tell...
- Fixed a few mistakes (e.g. "out" used as variable and label in same function)
- and non-portable constructions (like const and strdup()) in the above.
- ckcnet.c, 11 Jul 99.
- The June 29th changes to catch communications disconnect were making an
- spurious error message ("error 0") come out if you logged out from the remote
- while in CONNECT mode. Commented out the no-longer needed code. ckucns.c,
- ckucon.c, 11 Jul 98.
- Rearranged code in the HELP FUNC parser to suppress some harmless compiler
- warnings. ckuus2.c, 11 Jul 98.
- Added "--nointerrupts" command-line option, equivalent to "set command
- interruption off" + "set suspend off". This also required changing UNIX
- connoi() to set SIGTSTP to SIG_IGN instead of SIG_DFL. I wonder why it was
- SIG_DFL in the first place -- kind of defeats the purpose of "set suspend
- off"... ckuusr.h, ckuus[5y].c, 11 Jul 99.
- Since Jeff's changes were rather drastic, tried building today's version on:
- . SunOS/gcc: OK
- . SunOS/cc: Non-ANSI compilations need #ifdefs for "const", then OK.
- . Solaris 2.5.1/gcc: Needed -lresolv added to LIBS, then OK.
- . Solaris 7/gcc: OK.
- . HP-UX 10.20 bundled compiler: OK after non-ANSI changes.
- . HP-UX 10.20 ANSI compiler: OK.
- . HP-UX 8.00 non-ANSI: OK.
- . VMS 7.1 / UCX: HEADER type not defined, C_IN not declared, etc.
- . Linux RH 5.2: OK after adding -lresolv to linuxa target.
- . SINIX 5.42: Bombs out with errors in <arpa/nameser.h>.
- . Unixware 7: OK after adding -lresolv (also for all other Unixware targets)
- . BSDI 3.1: OK.
- Defined NO_DNS_SRV for VMS. ckcdeb.h, 11 Jul 99.
- Added -DNO_DNS_SRV to SINIX targets; added -lresolv as indicated above.
- Makefile, 11 Jul 99.
- Added -DNO_DNS_SRV to HP-UX 5.00, SCO Xenix, and Motorola sv68* targets.
- Makefile, 12 Jul 99.
- Checked DNS business on FreeBSD 3.1 -- It's OK. 12 Jul 99.
- Added FSEEK <channel> { /LINE, /CHAR } LAST, meaning to seek to the final
- line or character in the file. ckuus7.c 12 Jul 99.
- Added associative arrays. ckuusr.h, ckuus[24].c, 12 Jul 99.
- Fixed typo in -DNO_DNS_SRV addition to Motorola SV/68 makefile targets.
- 13 Jul 99.
- Added an argument to sh_sort() to allow specification of an optional second
- array to be sorted in parallel with the first, and changed the interpretation
- of the final argument from "0 = caseless, nonzero = case sensitive" to
- "0 = alpha/caseless, 1 = alpha/case-sensitive, 2 = numeric". Numeric sorts
- work for both integers and floating-point numbers, or any mixture.
- ckclib.[ch], ckcfns.c, ckuus[4567].c, 13 Jul 99.
- Added a second argument to isfloat() to say whether the entire argument string
- must be a floating-point number (flag = 0), or to terminate on the first
- illegal character (flag = 1, works like scanf()). ckclib.[ch], ckcfns.c,
- ckuus[4567].c, 13 Jul 99.
- Changed SORT command to have a /NUMERIC switch and to allow (but not require)
- specification of a second array to be sorted in parallel with the first.
- ckuusr.h, ckuus[27].c, 13 Jul 99.
- Changed addmac() and delmac() to treat associative array names with case
- sensitivity, unlike all other macro names, which are case independent.
- ckuus5.c, 13 Jul 99.
- FOR, WHILE, and SWITCH each defined BREAK and CONTINUE internally, but then
- did not undefine them upon completion. Tried undef'ing them in the built-in
- FOR, WHILE, and SWITCH definitions, but this caused trouble with the script
- demo torture test, so backed off. Anyway, now the demo test works fine, even
- after all the recent changes with macros & sorting. 13 Jul 99.
- Some ckcnet.c changes from Jeff. 13 Jul 99.
- Defined NO_DNS_SRV for VOS and AOS/VS. Makefile, 14 Jul 99.
- Discovered that conint() and connoi() were being called all over the place in
- a rather undisciplined fashion, and furthermore that in many places, a front
- end for them, setint(), was being used instead. Replaced all calls to
- conint() (except, obviously, in the interrupt handler itself) by calls to
- setint(), and changed setint() to honor the cmdint and suspend flags in
- setting the SIGINT and SIGTSTP traps. This should allow any combination of
- SET SUSPEND {ON,OFF}, --noint, and SET COMMAND INTERRUPT {ON,OFF} to work
- right and consistently. ckcmai.c, ckcpro.w, ckuus[456x].c, 14 Jul 99.
- Added some ansification to the nxt*() declarations to shut up overzealous
- compilers about the funcptr = nxt... assignments. ckcfns.c, 14 Jul 99.
- Added #include <time.h> for SCO 3.2v4.x. I wonder why this wasn't needed
- in Beta.07?... ckutio.c, 14 Jul 99.
- Removed -DDCLFDOPEN and -DDCLPOPEN from SCO 3.2v4.x makefile targets -- not
- only are they not needed (because fdopen() and popen() are declared in
- <stdio.h>), but Kermit's internal declarations conflict with the SCO <stdio.h>
- prototypes (because of "const"). Makefile, 14 Jul 99.
- Made sure that CK_DNS_SRV was not defined if TCPSOCKET was not also defined.
- ckcdeb.h, 14 Jul 99.
- Added a forward declaration for ck_termset() in the non-ANSI case.
- ckuusx.c, 14 Jul 99.
- Added {CK,NO}_DNS_SRV display to SHOW FEATURES. ckuus5.c, 14 Jul 99.
- After today's changes, the following SCO 3.2v4.2 builds are OK again:
- sco32v4 sco32v4ns sco32v4net sco32v4gcc sco32v4netgcc. Also builds fine
- on SCO OSR5.0.5: sco32v505 sco32v505net sco32v505gcc sco32v505netgcc.
- Added SET DIAL TEST { ON, OFF }, to test all dialing features without actually
- dialing (phone number conversion, DIAL macro, retries, pauses, etc). ckuusr.h,
- ckuus6.c, 14 Jul 99.
- Moved invocation of DIAL macro from lookup time to dial time, so it is
- applied to each number that is dialed, when it is dialed. ckuus6.c,
- 14 Jul 99.
- Added v(dialcount), to be used inside DIAL macro -- it tells the number of
- the current DIAL attempt. ckuusr.h, ckuus4.c, ckudia.c. 14 Jul 99.
- SET DNS-SERVICE-RECORDS from Jeff. ckuusr.h, ckuus[34].c, ckcnet.c, ckuath.c.
- 14 Jul 99.
- Moved {CK,NO}_DNS_SRV setting from ckcdeb.h to ckcnet.h, because it needed to
- be deferred until we are absolutely sure we know whether TCPSOCKET is defined.
- 14 Jul 99.
- From Jeff: Attempt to initialize the Kerberos principal names from the current
- cache file, if any. ckcnet.c, ckuat*.*, etc, 15 Jul 99.
- Discovered some bugs in faaconvert() when running it on large arrays: (a) the
- code assumed all members of the same associative array would be contiguous,
- when in fact it is possible for non-members to insert themselves; (b) some
- junk was getting appended to long element names. The latter was because VNAML
- was hardwired at 64 but element names built from long filespecs were much
- longer than that and overwrote memory, oops. Fixed by (a) increasing VNAML
- (to 4096 for BIGBUFOK builds, 256 for others) and (b) making dodef() check the
- length of the name before copying it into the variable-name buffer. ckuusr.h,
- ckuus6.c, 15 Jul 99.
- From Peter E: Set the dialcount variable earlier, so it is in sync with
- the dial try number reported to the user. ckuus6.c, 15 Jul 99.
- From Jeff: More Kerberos additions. In particular a new feature to allow
- Kermit's TGT getting to be used for K5 even for sites that do not support K5,
- to allow deployment of scripts that request K5 and K4 tickets without a scary
- message for the user. When the upgrade takes place the K5 support will just
- work without a need to update the scripts. ck_crp.c, ckuath.h, ckuath.c,
- ckcnet.c, ckuusr.h, ckuus7.c, ckuus3.c, ckuus2.c, 15 Jul 99.
- Took "--noint" command-line keyword out of the CK_LOGIN section. ckuusy.c,
- 16 Jul 99.
- connoi() didn't work at all on platforms System V signal handling, notably
- Solaris and SCO UNIX 3.2v4. The first SIGINT would be ignored, the second one
- would be caught by the shell, which would kill Kermit. Fixing this required a
- complete overhaul of the UNIX versions of connoi() and conint(), plus some
- further improvements in setint(). As a side benefit, the new ones are a lot
- simpler. ckuusx.c, ckutio.c, 16 Jul 99.
- Partial completion and ?-help were broken when given in a directory segment of
- path leading up to a filename. This seems to have been broken since the
- introduction of nzxpand() in Beta.04. Fixed in cmifi2(): ckucmd.c, 16 Jul 99.
- The RESET command didn't call cmcfm(). Anyway it was pretty useless so I made
- it invisible -- no sense cluttering up valuable top-level ? real estate with
- it. ckuusr.c, 16 Jul 99.
- Added #include <errno.h> for CKCHANNELIO material for VMS. ckuus7.c, 17 Jul 99.
- A round of preliminary builds:
- . SunOS/gcc - ok.
- . SunSO/cc - ok.
- . VMS nonet DECC - ok.
- . VMS UCX DECC - ok.
- . VMS TGV DECC - ok.
- . HP-UX 10.20 non-ANSI - ok.
- . HP-UX 10.20 ANSI - ok.
- . SCO 5.0.5B, all four builds - ok.
- Discovered that Ctrl- given to UNIX C-Kermit while it's starting makes it
- dump core. Added signal(SIGQUIT,SIG_IGN) to sysinit(). ckutio.c, 17 Jul 99.
- Discovered that in the Solaris version, v(ipaddr) fails, so added
- -DNO_DNS_SRV and removed -lresolv from solaris2xg target. But that didn't
- help. Undid changes to makefile and added a new symbol, CKGHNLHOST, which
- means to get the local host IP address the old way (by calling gethostname(buf)
- and then gethostbyname(buf), rather than gethostbyname("") and included this
- symbol in all Solaris targets. ckcnet.c, ckuus5.c, makefile, 17 Jul 99.
- Discovered the Solaris version would dump core if told to "show variables",
- when trying to display the v(textdir) variable. Failed to check pointer for
- nullness. ckuus4.c, 17 Jul 99.
- Moved CKGHNLHOST definition to ckcnet.h. Had to define it for:
- . Solaris
- . Unixware
- . Sinix / Reliant
- . AOS/VS
- Due to compilation errors in system header files, had to define NO_DNS_SRV for:
- . HP-UX 5.00 through 8.00
- . Ultrix (all versions)
- . NeXTSTEP (all versions)
- Had to add -lresolv to:
- . Some Linuxes but not others (see below).
- Made new makefile entries for Compaq Tru64 UNIX 4.0E and 5.0 (company and
- name change), and added designer banners. makefile, ckuver.h, 17 Jul 99.
- Fixed a typo in the xdelmac() declaration (extraneous extra arg). ckuus5.c,
- 17 Jul 99.
- Discovered that some Linuxes (e.g. Red Hat) have libresolv.a (in which case it
- must be searched for res_search() and dn_expan()) while others (Slackware)
- don't. So I had to change the "make linux" target to dynamically decide on
- which combination of -lcrypt and -resolv (4 possibilities) to use. makefile,
- 17 Jul 99.
- No #including <sys/stat.h> on VMS with VAXC. Now it builds OK on VMS 5.5.
- ckuus7.c, 17 Jul 99.
- The old DG MV2500 has trouble booting (hard disk errors) but if you enter the
- diagnostic monitor, let it sit there for a while (so the disk can warm up) and
- then try booting again, it comes up. But as always, building gets media
- errors on some files, which can usually be gotten around by building the
- affected modules again. After six hours or so I got a working binary, but
- even with CKGHNLHOST defined, I still don't get a good v(ipaddress).
- SCO Xenix 2.3.4 needed <time.h> again. ckutio.c, 17 Jul 99.
- Discovered that the VMS UCX version on the Alpha, when sending a file over
- Ethernet, its throughput steadily decreases as the transfer goes on, every
- time. It starts at over 100Kcps, and winds up (after about 2MB) at 13Kcps.
- Increasing the TCP SENDBUF size from 4K to 16K makes it start at about 400K
- and drop to 140K with the same file on the same connection. Increasing it
- beyond that doesn't make any difference. For receiving, the 4K receive buffer
- size seems to be OK -- throughput is about 400Kcps, and increasing the buffer
- size doesn't change it. Made default TCP send buffer size 16K on
- VMS/Alpha/UCX. Ditto for TCPware. In fact, I made the definition contingent
- on VMS and __alpha, which also includes Multinet, except it is ignored in
- Multinet since SO_SNDBUF is not defined there. ckcnet.c, 18 Jul 99.
- Put Base-64 stuff in #ifndef NOSPL for PDP-11 build. ckclib.c, 18 Jul 99.
- Discovered that making a TCP connection to a site that refuses the connection
- did not print an error message. A perror() was missing in the ocean of
- #ifdefs in netopen() for the UNIX case. ckcnet.c, 18 Jul 99 (but this change
- is too late to make it into most of the Beta.08 binaries).
- All Multinet builds now get an avalanche of compiler warnings about socket
- routines (socket_read/write/close, htons, getsockname, etc), but they still
- seem to work ok... Comparison of Beta.07 and 08 ckcnet.h and ckcnet.c doesn't
- reveal anything obvious.
- Removed trailing blanks from all source files. 18 Jul 99.
- ---Beta.08---
- Added -DNO_DNS_SRV to pyrdcosx target. Makefile, 20 Jul 99.
- From Jeff: Kerberos updates, IKSD fix, NAWS fix for when client tells us it
- has 0 rows and/or 0 columns. ckcnet.c ckctel.c ckuath.c ckcpro.w ckuus7.c
- ckuus2.c ckuus3.c, 21 Jul 99
- Fixed duplicate solaris25gx25 entries; the second one should have been
- solaris26gx25. makefile, 21 Jul 98.
- Attempted to cut through the mess surrounding when/how/if to include <time.h>
- (or <sys/time.h>) in ckutio.c, since this was a big source of problems in
- Beta.08. The possibilities are pretty much any combination of zero or more of
- <time.h>, <sys/time.h>, and <sys/timeb.h>. The only rational approach is to
- use symbols: TIMEH, NOTIMEH, SYSTIMEH, NOSYSTIMEH, SYSTIMEBH, and NOSYSTIMEBH.
- By default TIMEH is defined for everybody. SYSTIMEH is defined for a fairly
- long list in ckcdeb.h, and I moved the section that decides about <sys/timeb.h>
- from ckutio.c to ckcdeb.h. Now any of these can be overridden or undone on
- the command line without touching the source code. makefile, ckcdeb.h,
- ckutio.c, ckuus5.c, ckuins.txt Section 4.0, 21 Jul 99.
- Tested on:
- AIX 4.1 OK QNX 4.25 OK
- AIX 4.3.2 OK SCO 3.2v4.2 OK
- BSDI 3.1 OK SCO 5.0.5 OK
- DG/UX R4.11 OK SINIX 5.42 OK
- Digital UNIX 3.2 OK Solaris 2.5.1 OK
- FreeBSD 2.2.7 OK Solaris 7 OK
- HP-UX 10.20 OK SunOS 4.1.3 OK
- HP-UX 8.00 OK Tru64 UNIX 4.0E ??
- IRIX 6.2 OK Unixware 2.1 OK
- Linux (RH5.2) OK Unixware 7 OK
- Peter E verifies good building on HP-UX 6-10. 22 Jul 99.
- Gerry B verifies good building on Motorola SV/68 and SV/88. 22 Jul 99.
- Moved a misplaced #endif to fix -DNOHELP builds. ckuus2.c, 22 Jul 99.
- Another IKSD fix from Jeff. ckcpro.w, 22 Jul 99.
- Parameterized the final piece of the time.h code. ckcdeb.h, ckutio.c,
- makefile, 22 Jul 99.
- Added zcopy() for VMS (from Lucas Hart). 22 Jul 99.
- Fixed some prompt stomping in VMS, at least ones I can reproduce.
- ckvcon.c, 22 Jul 99.
- Fixed Ctrl-S (status report) in VMS CONNECT crashing C-Kermit (because
- temp buf was too small). Also added more info to report, as in UNIX.
- ckvcon.c, 22 Jul 99.
- Put lines around status display. ckvcon.c, ckucns.c, ckucon.c, 22 Jul 99.
- Discovered that VMS C-Kermit had no code to get the username. This means
- v(user) never worked, sending username ahead on Telnet connections never
- worked, etc. Added a GETJPI call to VMS sysinit() to load uidbuf[]. Now
- uidbuf[] has the username in it, and v(user) is set correctly, but VMS
- C-Kermit still doesn't send the username ahead on a Telnet connection.
- ckvtio.c, 22 Jul 99.
- Because VMS did not have the username defined, the SHOW CONNECTION display
- was messed up. Fixed dologshow() to handle empty fields better. ckuus3.c,
- 22 Jul 99.
- VMS v(tmpdir) had a slash at the end. Fixed in ckuus4.c, 22 Jul 99.
- Added -lresolve to dgux54420 target. Makefile, 22 Jul 99.
- There is still a lot of stuff in ckcdeb.h that depends on TCPSOCKET being
- already defined. All other versions (besides VMS) assume TCPSOCKET is defined
- on the CC command line. But in VMS, it is defined in ckcnet.h, after ckcdeb.h
- is processed. Changed the VMS build procedure to define TCPSOCKET if
- net_option is not NONET. ckvker.com, 22 Jul 99.
- Defined CK_ENVIRONMENT for VMS so it can send the username ahead on Telnet
- connections. This also turns on a lot of other code for VMS that has never
- been exercised before. But it seems to work mostly OK -- e.g. interactions
- with IKSD are as expected. ckcdeb.h, 22 Jul 99.
- From Jeff: Server-side support for Telnet New-Env USER variable. Corrections
- to zvpass() to properly handle Telnet Auth status reports. Modifications to
- Username and Password prompting to support username's transmitted by telnet
- negotiation, anonymous logins, and null strings. ckuus7.c ckufio.c ckcmai.c
- ckctel.[ch] ckcpro.w, 22 Jul 99.
- From Jeff: Modify use of "authentication failed" message when authentication
- is rejected by the peer. Move initialization of iksd prompt to dotakeini()
- where we know that we are IKSD. Add some "unsigned char" casts. ckctel.c
- ckcmai.c ckuus5.c ckuus7.c, 23 Jul 99.
- Checked whether SUNWspro cc had a "consider all chars unsigned" option.
- It doesn't. 23 Jul 99.
- Added sunos41gsc entry that builds with gcc but omits the -funsigned-char
- switch so I will see the signed-vs-unsigned char warnings that everybody else
- complains about before they see them, and will use this one from now on.
- makefile, 23 Jul 99.
- Added -lresolv to all SunOS entries since somebody reported link-time
- complaints even though I don't see them here. Adding it does no harm here.
- makefile, 23 Jul 99.
- Redid shostk() to work in NOSPL builds. Guarded all references to
- trace-related variables with NOSPL. Made Base-64 routines available to NOSPL
- builds since they are also used by ckcnet.c. ckclib.c, ckuus5.c, 23 Jul 99.
- Removed redundant -DNOREALPATH from sys3upcxxx entries that call sys3upc.
- Makefile, 23 Jul 99.
- Jeff discovered that CHAR was typedef'd "char" (not "unsigned char") in VMS.
- It's been that way probably forever, no doubt to suppress some compiler
- warnings. But this breaks some things at runtime, like certain Telnet
- protocol operations. Changed CHAR to be unsigned char for VMS. This broke
- compilation of lots of modules. Added casts until it built cleanly with DECC.
- Then tried it with VAXC... OK. Then on HP-UX 10.20 with the ANSI optimizing
- compiler... OK. And with gcc on UNIX without -funsigned-char... OK. So now
- the user ID is sent if Telnet NEW-ENVIRONMENT is negotiated. ckcdeb.h,
- ckcnet.h, ckctel.c, ckcnet.c, ckvfio.c, 23 Jul 99.
- Fixed new GETJPI code to not cut off username at 4 bytes. ckvtio.c, 23 Jul 99.
- Today's changes seem to fix another problem noticed yesterday: the VMS
- C-Kermit Telnet client would often display the "login:" prompt as "olgin:".
- Previously, this would happen about 25% of the time, but now I can't make it
- happen at all (in about 50 trials).
- Verified that the code works the same way in VMS 7.2 (which shows lowercase
- usernames, etc) -- GETJPI still returns a 12-char field in uppercase.
- Discovered that the REVIEW script, when given a list of filenames on the
- command line, would get the array dimension wrong and so the filename array
- would come out "off center" after sorting (the first filename would be null
- and the last one would be skipped). This is a long story. The short version
- is that when dogta() copied the &_[] array when entering macro level 1 (0
- based), it increased its dimension by 1. I thought I had fixed this on 27
- April, and again on 13 May, but this time I really did. ckuus6.c, 23 Jul 99.
- Authentication changes from Jeff. ckcmai.c, ckuus7.c, ckuus4.c, ckctel.c,
- ckcnet.c, 24 Jul 99.
- Added debugging statements to rlogin code -- it seems in VMS we used to
- lowercase the getenv("USER") name, but this doesn't help now because it is
- overridden by the GETJPI name. Changed the code to lowercase the name
- if a global flag, ck_lcname, is set, and set this flag by default for VMS
- only. Now rlogin from VMS to UNIX works again. ckcnet.c, 24 Jul 99.
- Changed Telnet NEW-ENVIRONMENT to follow the same flag. Now Telnet from
- VMS to UNIX works as expected. ckctel.c, 24 Jul 99.
- Added system type and location to VMS sysinit() so now:
- TELNET SENT SB NEW-ENVIRONMENT IS USER<SOH>fdcSYSTEMTYPE<SOH>VMS IAC SE
- (location is not picked up because no LOCATION symbol is defined in VMS).
- Verified that UNIX telnet server picks up and sets SYSTEMTYPE environment
- variable to VMS. ckvtio.c, 24 Jul 99.
- Parameterized length of uidbuf[] with new symbol UIDBUFLEN, and changed all
- references to specific lengths, like 64 or 63, to use this symbol, and all
- strcpy's into this buf to be strncpy's. For now the definition is still 64,
- since I don't know of any platform that allows longer usernames. ckcdeb.h
- plus many modules, 24 Jul 99.
- Adding TCPSOCKET to the VMS CC command line pushed the length of the command
- line over the limit for MultiNet. However, notes indicate that the limit
- is arbitrarily chosen anyway, so I bumped it up by 9 characters, which does
- not seem to have done any harm since MultiNet builds still work. ckvker.com,
- 24 Jul 99.
- Added support for the ELSA MicroLink 56K modem, which uses the new standard
- ITU-T V.250 (aka V.25ter) command set. This is the first international
- standard AT command set and presumably will be adopted by other modem makers
- (especially since Microsoft is pushing it in PC98 follow-ons). ckuusr.h,
- ckudia.c, 24 Jul 99.
- Added support for generic ITU-T V.250, slightly different from Microlink
- (strictly by the book, no Microlink extensions). This one is also included
- in MINIDIAL builds. Also fixed some #ifdefs for MINIDIAL. The keyword is
- "itu-t-v25ter/v250" with an invisible alias of "itu-t-v250". ckuusr.h,
- ckudia.c, 24 Jul 99.
- In yesterday's CHAR/char orgy, I missed one spot, which broke no-net builds
- with ANSI compilers (the declaration of nettoc() in the #ifndef NETCONN
- section). Fixed in ckcnet.c, 24 Jul 99.
- Added more casts to networking code to suppress HP-UX ANSI compiler warnings.
- rlog_ini(): ckcnet.c, 24 Jul 99.
- A few days ago Peter E reported some craziness with new file i/o package on
- HP-UX 7, in which it was very confused about what the maximum number of
- channels could be. This was due to (a) overconservativeness in calculating
- the maximum number (choosing the smaller, rather than larger, of several
- possibilities when the larger was more likely to be accurate, having come
- from sysconf()), and (b) then ignoring the value we had just calculated
- (i.e. comparing channel numbers against the fixed symbol Z_MAXCHAN rather
- than the variable z_maxchan). Fixed in ckuus7.c, 24 Jul 99.
- ADD SEND-LIST parsed its final field (as-name) with cmtxt() and then called
- cmcfm(). I changed the cmtxt() call to cmfld(). ckuusr.c, 24 Jul 99.
- Lucas H noticed that ADD SEND-LIST <wildcard> TEXT would forget about the
- TEXT part after sending the first file that matched the wildcard. Fixed in
- gnfile(): ckcfns.c, 24 Jul 99.
- However, this reveals a bigger problem: when a wildcard is given in a
- SEND-LIST, there's no way to specify automatic type switching while sending
- the files. This is a hard one, so deferred -- nobody has ever mentioned it,
- and there are obvious workarounds, especially now with regular expressions.
- Documented in ckcbwr.txt. 24 Jul 99.
- Made "if ==" an invisible synonym for "if =". ckuus6.c, 24 Jul 99.
- Added IF COMMAND and IF FLOAT. ckuusr.[ch], ckuus2.c, 24 Jul 99.
- Added v(cx_time) = elapsed time in session (i.e. since making current
- connection, if any, otherwise 0). ckuusr.h, ckuus[345].c, 24 Jul 99.
- From Jeff: fix a misplaced #ifdef in the file code; some authentication
- changes. ckcmai.c, ckuus7.c, 25 Jul 99.
- Changed floating-point functions to treat missing or empty arguments as 0.
- ckuus4.c, 25 Jul 99.
- Fixed IF FLOAT parsing when given a variable with no value. ckuus6.c,
- 25 Jul 99.
- Noticed that elapsed time of connection was often wrong. To avoid having to
- put dologxxx() calls throughout setlin(), I had placed them after the calls to
- setlin(). This was a good idea except that setlin() can call doconect()
- (e.g. if command was TELNET, or if /CONNECT switch was included), and
- therefore setlin() might not return for hours, in which case the log entry
- would not include the duration of the first (and perhaps only) CONNECT
- session. So I moved the dologxxx() calls to the appropriate places in
- setlin(), which wasn't so bad after all (since they only needed to go in those
- places where setlin() returns successfully after making a connection, but
- before any call do doconect()). ckcmai.c, ckuus[37].c, 25 Jul 99.
- Noticed that connections made by command-line options did not start the
- connection log & timer. Fixed in ckuusy.c, 25 Jul 99.
- Realized it's not very helpful to have v(cx_time) return 0 when there is no
- active connection, so made it (and SHOW CONNECTION) show the elapsed time of
- the most recent session. ckuus[34].c, 25 Jul 99.
- Finally, to make the connection log useful on multiprocessing systems, it was
- necessary to not keep it open all the time. This way, multiple sessions can
- write to the same connection log. LOG CONNECTION opens the log in the
- requested mode (new, append) and closes it right away (this is mainly so it
- can fail intelligently in case the log can't be opened). Then, whenever a
- session ends, dologend() opens it again (but this time in append mode, no
- matter what mode the user chose), writes the record, and closes it.
- Collisions are still possible, but in UNIX at least, there is no mechanism for
- opening the file in shared mode -- presumably sharing is allowed and you have
- to go out of your way to prevent it (e.g. with flock()). In any case, logging
- from multiple sessions seems to work fine now on both UNIX and VMS (and it
- definitely did not before today), as does syslogging on UNIX (after some minor
- tweaking). ckuus[34].c, ckufio.c, 25 Jul 99.
- So now we have a reliable session-time indicator. Added session time (and
- some other info) to the CONNECT-mode status display. It could also be used
- anywhere else -- e.g. in the K95 status line (if there were room). The way
- to get it is:
- char * p = NULL;
- long t = dologshow(0); ; Seconds
- if (t > -1L) p = hhmmss(t); ; Converted to hh:mm:ss
- ckucns.c, ckucon,c, ckvcon.c, 25 Jul 99.
- SET TRANSFER DISPLAY BRIEF, in its summary line, did not deduct the refused
- files from the total number of files transerred. Fixed in ckuusx.c, 25 Jul 99.
- Removed a spurious printf() from REMOTE QUERY left behind from a debugging
- session. Suppressed gratuitous echoing of QUERY result when not at top level.
- ckuus7.c, 25 Jul 99.
- A fix from Jeff from IKSD login. ckuus7.c, 25 Jul 99.
- Discovered that SHIFT did not work when given within a FOR or WHILE loop
- when referencing command-line arguments. Fixed in doshift(): ckuus5.c,
- 26 Jul 99.
- Got rid of "Interrupt during initialization or command-line processing.
- C-Kermit quitting..." message when a Kerbang script is interrupted. ckcmai.c,
- 26 Jul 99.
- OS-9 fixes from Martin Whitaker. ckcdeb.h, ckucmd.c, ckuus[6x].c, 26 Jul 99.
- Cleanup of overuse of variable "x" in setlin() from Jeff. ckuus7.c, 26 Jul 99.
- Fixed number-of-modems definition in ckuusr.h (forgot to update it for
- ITU-T V.250). 26 Jul 99.
- Fixed ITU-T V.250 commands that include multiple "extended commands" to
- separate them with semicolon (V.250 5.4.5.1). ckudia.c, 26 Jul 99.
- New VMS build procedure from Dave Sneddon, accounts for UCX 5.0.
- ckvker.com, 26 Jul 99.
- Made sure that --syslog: on command line doesn't affect syslogging when
- C-Kermit was built with -DSYSLOGLEVEL=x (the code was already there).
- 27 Jul 99.
- Added a new target to support building IKSD on Unixware7 (needs shadow
- passwords) from Jim Whitby. 27 Jul 99.
- Mike Freeman reported that VMS C-Kermit crashed when given a REMOTE HOST
- command. Problem: the new timed reads that were added to handle the keepalive
- for long-running host commands. Kermit crashes in the sys$synch(QIOW_EFN)
- call on the VAX but not on the Alpha. "help system $synch" on the Alpha says
- this call takes a 64-bit arg on the Alpha only, but only looks at the lower
- byte; it doesn't say this on the VAX. But I doubt that's the problem -- it
- might be a missing second arg, but I can't tell. Sent email to Lucas about it
- and undefined PIPETIMER on the VAX in the meantime. ckvfio.c, 27 Jul 99.
- Peter E complained that the following sequence:
- set modem type xxx
- set line /dev/cua0
- set flow none (or anything else)
- ...
- set modem type yyy
- undoes the "set flow" command. But... if the user gave a SET FLOW command,
- they probably meant it, and it should be sticky at least until the device
- changes. So now any SET FLOW command (except AUTO, which is the default)
- sets autoflow to 0, but any SET LINE/HOST/PORT or TELNET/RLOGIN/etc command
- sets it back to 1 so appropriate flow control can be selected for the new
- device/connection. ckuus[37].c, 27 Jul 99.
- Lucas got back with a fix for the sys$synch() call, so REMOTE HOST (with
- keepalive) works again on both VAX and Alpha. But it's very slow (VERY slow)
- -- I didn't notice this before. Sent more mail to Lucas. In the worst case
- we can always back off. ckvfio.c, 27 Jul 99.
- Peter E noticed that DIR with no switches was like DIR /FILES, when it was
- supposed to be like DIR /ALL. The problem was in the _CMIFI entry of the
- initial FDB (before any switches were parsed). Fixed in domydir(), ckuus6.c,
- 27 Jul 99.
- From Jeff: SET TELNET BUG SB-IMPLIES-WILL-DO to cope with broken UCX 5.0
- Telnet server (client sends WILL TERM-TYPE, server sends SB without first
- sending DO, but client is still waiting for DO). Also various compiler
- warning-avoidance and authorization fixes. Also cleaned-up code for sending
- NEW-ENVIRONMENT fields. ckctel.[ch], ckuus[2347].c, ckufio.c, 28 Jul 99.
- Added NOSHOW protection around references to SHOW ARRAY in ckuusr.c.
- 28 Jul 99.
- Fixed an unguarded reference to query. ckcnfs.c, 28 Jul 99.
- Fixed unguarded refs to dolognet(). ckuus7.c, 28 Jul 99.
- Added SET SERVER KEEPALIVE { ON, OFF } to control the keepalive feature;
- needed for VMS (unless we can get get_subroc_line() fixed), because of how
- it slows down the response to host commands. ckuusr.h, ckuus[235].c,
- ck[uv]fio.c, 28 Jul 99.
- Moved hhmmss() and parnam() from ckuusx.c to ckclib.c so ck?[tf]io.c routines
- could use them without having to haul in ckuusr.h. ckuusx.c, ckuusr.h,
- ckclib.[ch], 28 Jul 99.
- Added doiksdinit() to execute the iksd.conf file if -A given on command line,
- just after ttopen() and socket setup, but before authentication begins.
- ckcdeb.h, ckcmai.c, ckuus5.c, iksd.txt, 28 Jul 99.
- Yesterday's fix for SET FLOW was not in exactly the right place. Moved it
- to a better place and now it works as advertised. ckuus3.c, 28 Jul 99.
- Added SET AUTH { K4, K5 } PROMPT { PASSWORD, PRINCIPAL }, parsing only.
- Compiles OK but I couldn't test because link fails on ck_krb4_realmofhost.
- Also SET TELNET PROMPT-FOR-USERID. ckuusr.h, ckuus3.c, 28 Jul 99.
- Fixes from Jeff for Kerberos builds plus filling in the action portions of the
- new SET ... PROMPT commands, plus HELP text for them. ckuath.c ckuus2.c
- ckuus3.c ckuus7.c ckuusr.h, 29 Jul 99
- Made sure that the following builds worked OK: NONET, NOSHOW, NODIAL, NOHELP,
- NOSPL, NOICP. NOPUSH, NOCSETS, NOLOCAL, MINIDIAL. A fair amount of work was
- needed to get NOICP builds working again, including a NOICP version of
- readpass(), in case anybody ever wanted to build a command-line-only C-Kermit
- that included authentication, plus the expected #ifdef shuffling in ckcdeb.h,
- etc. Plus more char/CHAR silliness in ckcnet.c. Also needed to move several
- routines out of the NOLOCAL section to make the NOLOCAL version link. Many
- modules, 29 Jul 99.
- Also checked builds on:
- AIX 4.1: OK
- AIX 4.3.2: OK
- BSDI 3.1: OK
- HP-UX 8.00 no ANSI: OK
- HP-UX 9.00 ANSI: OK
- HP-UX 9.00 no ANSI: OK
- HP-UX 10.20 ANSI: OK
- HP-UX 10.20 No ANSI: OK
- IRIX 6.2: OK
- Linux (RH5.2): OK
- Ditto + Kerberos 5: OK
- Ditto + Kerberos 4&5: OK
- SCO 3.2v4.2 cc: OK (net and nonet)
- SCO 3.2v4.2 gcc: OK (net and nonet)
- SINIX 5.42: OK
- Solaris 2.4 cc: OK
- Solaris 2.5.1 gcc: OK
- Solaris 7 cc: OK
- Unixware 2.1.3: OK
- Unixware 7: OK
- VMS/Alpha/DECC/UCX: OK
- VMS/Alpha/DECC/Nonet: OK
- VMS/VAX/VAXC/UCX: OK
- VMS/VAX/VAXC/Nonet: OK
- From Jeff: check prompt strings to make sure they use the proper
- number and type of % fields. ckuus3.c, 29 Jul 99.
- From Jeff: Add color to the prompts. I use the status line color.
- ckuus7.c, 29 Jul 99.
- Two corrections to tx_cp437(): a-tilde goes to 'a', not 'e', and
- Black Square maps to 254, not "unknown". ckouni.c, 29 Jul 99.
- Fixes for get_subroc_line() from Lucas Hart -- major speedup. ckvfio.c,
- 29 Jul 99.
- Discovered two entries were missing from the xlr[] table at the end of
- the Latin/Cyrillic section (4,43 and 4.44). ckuxla.c, 30 Jul 99.
- Added support for Unicode / ISO-10646 in two forms, UCS-2 and UTF-8, Level 1
- (no combining characters, no Jamos), each of them as both File and Transfer
- Character Sets. This works only for file transfer so far, not CONNECT,
- TRANSMIT, TRANSLATE, etc. There are still many loose ends, but nothing to
- prevent including it in Beta.09 and the final 7.0. Practically all modules
- were touched. Detailed notes in a separate file, unicode.txt.
- 31 Jul - 1 Aug 99.
- Fixes from Jeff to weekend's Unicode work for K95, plus some authentication
- changes. ckuus7.c ckuath.c ckuus5.c ckuus3.c ckuus4.c ckcuni.h ckuxla.c
- ckcuni.c ckuath.h ckouni.c ckcnet.c, 2 Aug 99.
- Separated UNICODE and CKOUNI, which were previously synomyms. Now CKOUNI is
- defined only for K95. ckcxla.h, 2 Aug 99.
- Fixed a couple places where xpnbyte() did not return a value. In fact, a lot
- of yesterday's work on on this function seems to have been lost -- I must have
- been editing the wrong copy, or copied the wrong file or something...
- Reconstructed the lost work, ran all the tests again, still OK. ckcfns.c, 2
- Aug 99.
- Changed unknown-char symbol when translating from Unicode to a single-byte
- character set from Ctrl-G to the customary question mark. ckcfns.c, 2 Aug 99.
- Added #ifdefs needed to fix NOCSETS builds. ckcfns.c, 2 Aug 99.
- Added Unicode support to the TRANSLATE command. This required some creative
- retooling of xgnbyte() into a more-or-less general-purpose routine that works
- for both file transfer and other kinds of translations, and hopefully can be
- used by TRANSMIT and CONNECT. ckcfns.c, ckuus4.c, 2 Aug 99.
- Code for K95 popup prompts from Jeff, plus some typos fixed, plus some auth
- stuff. ckuus7.c ckuath.c ckuus3.c ckouni.c, 3 Aug 99.
- Added /POPUP switch to ASK[Q]. ckuus6.c, 3 Aug 99.
- Fixed K95 parsing of SET TERM {REMOTE,LOCAL}-CHAR LATIN1 and NEXT. ckcuni.c,
- 3 Aug 99.
- Removed SET TERM CHAR { UCS2, UTF8 } from non-K95 SET TERM CHAR tables (since
- there is no supporting code yet), and made SET { FILE,XFER } CHAR { UCS2,UTF8 }
- invisible. ckuxla.c, 3 Aug 99.
- Fixed SHOW CONNECTION message in the no-connection case. ckuus[r3].c, 3 Aug 99.
- For local reasons, we had to cut off development here and put Beta.09 together
- without the complete Unicode implementation. So now to repeat the testing
- from several days ago. Configuration options:
- Full Unix..ok (SunOS, Unixware 7)
- Full VMS...ok (Alpha / VMS7.2 / DECC)
- NoNet VMS..ok (ditto)
- Krb4.......ok (SunOS)
- Krb5.......ok (Linux)
- Krb4+Krb5..ok (Linux)
- NOUNICODE..ok
- NOCSETS....ok
- NONET......ok
- NOLOCAL....ok
- NODIAL.....ok
- MINIDIAL...ok
- NOSPL......ok
- NOICP......ok
- NOSHOW.....ok
- NOHELP.....ok
- NOPUSH.....ok
- Some shuffling of #ifdefs and declarations was needed, as usual, to get all
- of these working again.
- Fixed a bogus 5-hex-digit hex case label in tx_lucidasub(). ckcuni.c, 3 Aug 99.
- Changed ASK/ASKQ to evaluate variables in prompt string. doask(): ckuus6.c,
- 3 Aug 99.
- Added CKCUNI to VMS build procedure. ckvker.com, ckvker.mms, 3 Aug 99.
- Commented out the questionable section in ucs2_to_utf8() that compares an
- unsigned short with all sorts of 32-bit hex constants, since almost every
- compiler complains about it, and it doesn't do anything useful anyway (we
- don't support UCS-4 yet; when we do we can change the parameter with which
- ucs2_to_utf8() is called from USHORT to UINT, and for that matter drop the
- "2" from the name). ckcuni.c. 3 Aug 99.
- Fixed UNICODE defines so they are executed only for UNIX and VMS, since the
- other platforms don't have their build procedures adjusted yet to include the
- new modules and dependencies. ckcxla.h, 3 Aug 99.
- From Jeff: change: "int ttnproto = NP_NONE;" to "int ttnproto = NP_DEFAULT;"
- in ckcnet.c, so "kermit -J host" will work. ckcnet.c, 3 Aug 99.
- OK, now starts the build-all...
- VMS 5.5 DECC build barfs on #include <conv$routines.h> (file doesn't exist).
- Tried again with VAXC. This one choked on memmove. Commented out the
- #include (actually put it #ifndef BUGFILL7) and went back to DECC. This will
- have to be cleaned up later...
- A few last-minute K95 fixes & changes from Jeff (including /POPUP for the
- AUTHENTICATE commands). ckcxla.h, ckuus7.c, ckuusr.c. 3 Aug 99.
- ---Beta.09---
- ---1.1.18-CU---
- From Jeff:
- . Changed ckcssl.h to ck_ssl.h to prevent copying by ck[cu]*...
- . Verified authentication engine against 3rd authentication servers & clients.
- . Made sure that IKSD sets the socket options appropriately at startup.
- . Made sure that platform-specific variables are not exposed to guests.
- . Prevent deadlocks with TELNET WAIT and encryption.
- New OS-9 makefile from Martin Whitaker, adds ckcuni.[ch]. 10 Aug 99.
- Fixed some #ifdefs in SHOW EXTENDED-OPTIONS to allow building with -DNOLOGIN.
- ckuus5.c, 10 Aug 99.
- Added a byte-order test to main() start sequence and added byte order display
- to SHOW FEATURES. ckcmai.c, ckuus5.c, 10 Aug 99.
- Changes from Jeff for SRP, separate conditionalization of iksd.conf, comments
- & placeholders in telnet & crypto modules, fixes to gtword() to be more
- tolerant when Telnet server of misbehaving clients (e.g. that send bare CR),
- problems with DNS lookups on DU 4.0B caused by sign extension. ck_crp.c
- ckcmai.c ckcnet.c ckcssl.h ckctel.h ckouni.c ckuath.c ckucmd.c ckuus5.c
- makefile, 11 Aug 99.
- Hoping to stifle the avalanche of compiler warnings on Multinet builds that
- we've been getting since Beta.07, reorganized the VMS section of ckcnet.h to
- have #ifdef..#else structure, so each product section is mutually exclusive.
- I didn't expect it to help and it didn't. Eventually (long story skipped) it
- turned out that the #include <if.h> that was added to ckcdeb.h to pick up the
- u_int typedef for UCX 5.0 was forcing the Multinet <socket.h> to be skipped,
- so the cure was to put #ifndef MULTINET around #include <if.h>. This fixes
- all Multinet builds without breaking UCX or others. The critical hint was
- from Hunter Goatley: use /LIST/SHOW=INCLUDE. Built and replaced all of the
- Multinet binaries. ckcdeb.h, 11 Aug 99.
- Changed the VMS build procedure to define IF_DOT_H only for UCX. Not only do
- we not use this symbol any more outside of UCX, but also it made the Multinet
- CC command line too long. ckvker.com, 11 Aug 99.
- Added SET FILE UCS BYTE-ORDER { BIG-ENDIAN, LITTLE-ENDIAN }, v(byteorder),
- SET RECEIVE UCS BOM { ON, OFF } (parsing only). ckuusr.h, ckcker.h,
- ckuus[37].c, ckuxla.c, 11 Aug 99.
- Filled in v(byteorder) action. Returns 0=BE, 1=LE. ckuus4.c, 11 Aug 99.
- Added union ckshort definition to ckcdeb.h, 11 Aug 99.
- Added preliminary UCS byte-swapping code to xpnbyte(). Compiles OK but is
- totally untested. ckcfns.c, 11 Aug 99.
- From Jeff:
- . Updated SSL support for OpenSSL 0.9.4
- . Moved iksdconf stuff to a more correct location in main()
- . Made set telopt /server the default when running as IKSD
- . DU 4.0 inet_addr() thing
- ckcnet.[ch] ckuus3.c ckcmai.c ckuus5.c ck_ssl.h ckuath.c makefile, 11 Aug 99.
- Fixed long lines in ckuath.c, 11 Aug 99.
- Changed the minor edit number from 195 to 196 since we had a private
- Columbia-only release. ckcmai.c, 11 Aug 99.
- More changes from Jeff, mostly for the DU4.0 inet_addr() business. ckuus7.c
- ckcnet.c ckuath.c ckcfns.c ckuus3.c ckcnet.h, 12 Aug 99.
- Fixed long lines in ckuath.c again, 12 Aug 99.
- While I was messing with Unicode support, file transfers started failing for
- no apparent reason. The debug log showed it was because we were calling
- ttinl() with a timeout even though we were streaming. Why? Somehow timint
- was getting set to a positive number. I'm not going to worry about it now --
- I just changed the "just in case" test in rpack() prior to calling ttinl() to
- also check for streaming. (Actually this was a false alarm -- the real
- problem was a forgotten kermit-in-the-middle -- but the change seems like a
- good idea anyway...) ckcfn2.c, 12 Aug 99.
- OK, back to Unicode... Discovered that an #endif was misplaced by one line
- in ucs2_to_utf8(), totally breaking it. Therefore translation of UCS-2 to
- UTF-8 won't work in K95 1.1.18-CU. I doubt anybody will notice since (a)
- the file-transfer keywords are invisible, (b) Unicode file-transfer support
- is undocumented, and (c) they'll probably never type an accented or non-Roman
- character natively (the Compose key still works). But oops, my fault. Fixed
- in ckcuni.c, 12 Aug 99.
- Added UCS-2 byte-swapping for the file receiver. This turned out to be easier
- than I thought, although it took some time to realize it. UCS-2 characters
- are (and must be) kept in native order internally, otherwise translation
- functions (tables, switch statements, etc) don't work. Therefore bytes are
- swapped only when (a) incoming TCS is UCS-2 (Big Endian by definition) and
- receiving machine is Little Endian, or (b) writing out to a UCS-2 file and the
- user has specified the opposite endianness of the underlying machine. Also we
- add or don't add the appropriate BOM according to the user's FILE UCS BOM
- { ON, OFF } setting. xpnbyte(): ckcfns.c, 12 Aug 99.
- Changed setxlatype() to NOT set XLA_NONE when Unicode is involved, even if
- the TCS and FCS are the same, since we might also need to deal with byte
- swapping and BOMs. ckuxla.c, 12 Aug 99.
- Made sure that every conceivable combination works:
- From To TCS FCS BOM Order
- [ok] Sun PC Latin-1 UCS-2 On Default (FFFE, A<NUL>)
- [ok] Sun PC Latin-1 UCS-2 On BE (FEFF, <NUL>A)
- [ok] Sun PC Latin-1 UCS-2 On LE (FFFE, A<NUL>)
- [ok] Sun PC Latin-1 UCS-2 Off Default (A<NUL>)
- [ok] Sun PC Latin-1 UCS-2 Off BE (<NUL>A)
- [ok] Sun PC UTF-8 UCS-2 On LE (FFFE, A<NUL>)
- [ok] Sun PC UTF-8 UCS-2 On BE (FEFF, <NUL>A)
- [ok] Sun PC UTF-8 UCS-2 Off BE (<NUL>A)
- [ok] Sun PC UTF-8 UCS-2 Off LE (A<NUL>)
- [ok] Sun PC UCS-2 UCS-2 On LE (FFFE, A<NUL>)
- [ok] Sun PC UCS-2 UCS-2 On BE (FEFF, <NUL>A)
- [ok] Sun PC UCS-2 UCS-2 Off BE (<NUL>A)
- [ok] Sun PC UCS-2 UCS-2 Off LE (A<NUL>)
- [ok] PC Sun Latin-1 UCS-2 On Default (FEFF, <NUL>A)
- [ok] PC Sun Latin-1 UCS-2 On BE (FEFF, <NUL>A)
- [ok] PC Sun Latin-1 UCS-2 On LE (FFFE, A<NUL>)
- [ok] PC Sun Latin-1 UCS-2 Off LE (A<NUL>)
- [ok] PC Sun Latin-1 UCS-2 Off BE (<NUL>A)
- [ok] PC Sun UTF-8 UCS-2 On BE (FEFF, <NUL>A)
- [ok] PC Sun UTF-8 UCS-2 On LE (FFFE, A<NUL>)
- [ok] PC Sun UTF-8 UCS-2 Off LE (A<NUL>)
- [ok] PC Sun UTF-8 UCS-2 Off BE (<NUL>A)
- [ok] PC Sun UCS-2 UCS-2 On BE (FEFF, <NUL>A)
- [ok] PC Sun UCS-2 UCS-2 On LE (FFFE, A<NUL>)
- [ok] PC Sun UCS-2 UCS-2 Off LE (A<NUL>)
- [ok] PC Sun UCS-2 UCS-2 Off BE (<NUL>A)
- Changed SET RECEIVE UCS BOM { ON, OFF } to SET FILE UCS BOM { ON, OFF }.
- ckuusr.h, ckuus7.c, 13 Aug 99.
- Jeff changed zmchout() calls in ckcfns.c to pnbyte() to solve a problem with
- IKSD's execution of REMOTE commands. But that's not right. First of all a
- lot of stuff is done twice this way (ffc incrementing, crc calculating, etc),
- but mainly it's way too expensive. zmchout() is a highly efficient macro;
- doing a function call on every character should be avoided whenever possible.
- We can look at this next week.
- Also some changes to ckuath.c from Jeff. Fixed long lines, plus a typo
- (the word "NULL" was broken in half around line 5382). 13 Aug 99.
- From Jeff:
- . A new approach to handling the issues related to OS/2 and zmchout() in
- ckcfns.c I just placed the conoc() calls in [b]decode as an if else
- statement.
- . Renamed: SET TELNET TRANSFER-MODE to SET TELNET BINARY-TRANSFER-MODE
- . Added: SET TELNET AUTH {HOW-FLAG, ENCRYPT-FLAG} to specify which
- values for the authentication type modifier should be accepted or
- offered. Primarily for debugging but it does have the ability to be
- used to require a mutually authenticated session.
- ckuus2.c, ckcfns.c, ckuath.c, ckuus3.c, ckuusr.h, ckctel.h, ckctel.c,
- ckcpro.w, ckuus4.c, 15 Aug 99.
- From Jeff:
- . Discovered that OpenSSL is broken on SunOS. Built OpenSSL on linux.
- Added SSL/TLS support to our multi-authentication mechanism build. So
- now yclept's IKSD has K5, K4, SRP, and SSL/TLS.
- . Fixed the test for determining when SRP authentication has completed.
- . Don't attempt to display the SSL/TLS shared cipher list on the client.
- ckcnet.c ck_ssl.h makefile ckufio.c ckuath.c, 15 Aug 99.
- Added UCS settings to SHOW FILE. ckuus4.c, 15 Aug 99.
- Added support for UCS-2 byte swapping to the file sender. The source file's
- BOM, if any, takes precedence. If it's FFFE, then we swap. If there is a BOM
- (either FEFF or FFFE), we discard it. If there is no BOM, we swap if SET FILE
- UCS BYTE-ORDER is opposite from the machine's native byte order. After
- reading a UCS-2 character and possibly swapping according to these rules, we
- assume that the character is in native UCS-2 unsigned short format, and use it
- that way in conversions, etc. Of course if there is no BOM and the user
- commands us to use the wrong byte order, the results are junk. xgnbyte():
- ckcfns.c, 15 Aug 99.
- Tested by sending 4 files in text mode with FCS == TCS == UCS-2 and SET FILE
- UCS BYTE-ORDER BIG-ENDIAN and LITTLE-ENDIAN from both Sparc (BE) and PC (LE),
- and looking at the packet logs:
- Machine: Sparc... Linux PC
- SET FILE UCS BYTE: BE LE LE BE
- --------------------
- 1. ucs2be+bom.txt ok ok ok ok BOM takes precedence
- 2. ucs2le+bom.txt ok ok ok ok BOM takes precedence
- 3. ucs2be-bom.txt ok XX XX ok Setting takes precedence
- 4. ucs2le-bom.txt XX ok ok XX Setting takes precedence
- So all combinations work (XX means we lied about the byte order and so the
- bytes were reversed in the packet). Results are consistent when the transfer
- charset is Latin-1.
- Next I added some rather crude code to handle CRLF/LF/CR conversion to/from
- packets when the TCS is UCS-2. In this case we need #@#M#@#J in the packet,
- with appropriate conversions from/to the file character set. This will no
- doubt need some refinement. In fact, it really strains the current model
- which is a poor design. The right way to handle line termination is to have
- a line-oriented system-dependent file reader that returns each line *without*
- its terminator. Then the high-level code can simply tack CRLF onto the end
- (or in this case NUL CR NUL LF), rather than worry about what platform it's
- running on and what the previous and next chars are, etc. ckcfns.c, 15 Aug 99.
- Fixed the TRANSLATE command to account for byte order and to follow the FILE
- UCS settings. ckcfns.c, ckuus4.c, 15 Aug 99.
- Some changes from Jeff. ckuus3.c, ckuath.c, 16 Aug 99.
- Added COPY /SWAP-BYTES <sourcefile> <destfile>. ckuus6.c, 16 Aug 99.
- Verified that when using UCS-2 or UTF-8 as a transfer character set, it's OK
- to break a code sequence between packets.
- Fixed UNIX CONNECT module to not translate incoming characters when
- transparent print was active. ckucns.c, 16 Aug 99.
- Updated HP-UX 6 and 7 targets from Peter E. makefile, 17 Aug 99.
- From Jeff, 20 Aug 99:
- . Fix fword()/fsplit() return value. ckuus4.c.
- . Added ckgetlocalipaddrs() (but there is already a
- getlocalipaddr(), and some compilers/linkers might not support
- distinctions past the 14th character...) ckcnet.[ch].
- . Added code for Kerberos check IP addresses: ckuusr.h, ckuus[37].c.
- (Changed "checkaddrs" to "check-address").
- . New ckuath.c (fixed long lines).
- . New cmdgetc(), not static any more. ckucmd.[ch]. Fixes problem with
- askmore() in IKSD.
- Fixed Compaq modem DC Off command (&C0 should be %C0). ckudia.c, 20 Aug 99.
- Added UTF-8 terminal character-set translation to UNIX CONNECT module.
- ckucns.c, 21-22 Aug 99. (Still need to migrate this code to other CONNECT
- modules, clean it up, etc, and then adapt it to TRANSMIT.)
- Verified that UTF-8 changes to ckucns.c did not break previous byte-to-byte
- translations (e.g. DGI to Latin-1), then cleaned out temporary debug calls
- that were added yesterday. Also verified that -DNOUNICODE builds still work.
- Then streamlined, parameterized, and documented the UTF-8 routines in
- preparation to moving them to a common module. 23 Aug 99.
- Fix from Jeff to askmore() that I missed before. ckuusx.c, 23 Aug 99.
- Added to the list of countries where Tone dialing is universally available
- from table in Elsa MicroLink (German modem) manual. ckudia.c, 24 Aug 99.
- New irix64gcc makefile target from Adam Laurie <adam@algroup.co.uk>, 24 Aug 99.
- Added -DNOTERMCAP to linuxnc target since "linuxnc" (no curses) builds were
- failing on <term.h> on systems where user said No to installing ncurses.
- makefile, 24 Aug 99.
- New uw7iksdudk target, accounts for library shuffle between Unixware 7.0 and
- 7.1 (realpath()), from Jim Whitby <jim@tpsdata.com>. makefile, 24 Aug 99.
- With a helpful hint from Lucas Hart, cleaned up a mess I made in VMS
- do_label_send() when working on the signed/unsigned char mess, which broke
- LABELED transfers completely. ckvfio.c, 24 Aug 99.
- Yesterday, cont'd... Added prototypes for b_to_u() and u_to_b() to ckcuni.h,
- and moved the routines themselves from ckucns.c to ckcuni.c. 24 Aug 99.
- Adapted UTF-8 support to ckucon.c and ckvcon.c. This brings UTF-8 terminal
- emulation to fork()-using UNIX versions and to VMS, and validates the
- modularity. 24 Aug 99.
- Looked at TRANSMIT command. It already had K95-specific UTF-8 support added,
- but it didn't work at all in UNIX. Changed it to use the same model used by
- CONNECT. Now it works (sort of), but still needs a LOT of cleaning up. To
- be cont'd... ckuus4.c, 24 Aug 99.
- In the non-K95 version of SET TERM CHARACTER-SET <remote-set> <local-set>, the
- default local set was set incorrectly, so defaulting it gave a totally wacky
- value. Not sure when this happened, but it was some time after 6.0. Fixed
- in settrm(), ckuus7.c, 25 Aug 99.
- From Jeff: Make K95 "set term {r,l} char dec-m*" consistent with C-K.
- ckcuni.c, 25 Aug 99.
- If the TRANSMIT command failed in the setup phase, it could leave the
- 'binary' value altered. Fixed in translate(), ckuus4.c, 25 Aug 99.
- The TRANSMIT command has always assumed the character set of the file being
- transmitted was the same as the local end of the terminal character-set pair.
- There has never been a way to transmit a file, converting from local (file)
- character-set A to remote (terminal) character-set B, but convert the return
- echo from B to the local end of the terminal character set, C. To illustrate:
- suppose I want to transmit a file encoded in the NeXT charset to a DG
- computer, translating it to DG Multinational, but my terminal only understands
- Latin-1, so the echoes should be translated from DG to L1. The distinction is
- important now if we want to TRANSMIT (and translate) UCS-2 file, since UCS-2
- is not a terminal character set. Fixed in transmit(): ckuus4.c, 25 Aug 99.
- Found a bug I introduced at the beginning of the Unicode changes -- two
- little CKOUNIs that were changed to UNICODE that shouldn't have been, which
- gave C-Kermit (but not K95) a random terminal character set upon startup.
- ckuxla.c, 25 Aug 99.
- Added UCS-2 support to TRANSMIT; cleaned up, commented, consolidated, and
- tightened the code. In fact, almost totally rewrote it. Surprisingly, this
- one turned out to be a lot more complicated than file transfer, CONNECT, or
- TRANSLATE, but now it's done except for some minor loose ends. transmit():
- ckuus4.c, 25 Aug 99.
- From Jeff:
- . More Telnet authentication changes. ckcpro.w, ckuath.c
- . New Kerberized AIX 4.1 makefile target.
- Fixed long lines and trailing blanks in ckuath.c. 25 Aug 99.
- From Jeff, ckcmai.c, ckuath.c, 26 Aug 99:
- . proper handling of the case where the user authenticates as one name
- but wants to log in as someone else.
- . For instance, I want to authenticate as jaltman@CC.COLUMBIA.EDU but
- log into the host as 'root'.
- . When mutual authentication is performed I can get an encrypted
- session, but I still want to be prompted for the 'root' password if
- the 'root' account does not have a .k5login or .klogin file containing
- the authorized principal names. Under no circumstances should we
- allow a user access to another user's account without appropriate
- credentials. This is all fixed.
- . AUTH_USER means we know the user and the user is authorized either
- because they are logging into their own account or because they have
- been given permission to access the specified account name.
- . AUTH_VALID means we know the user but the user is not authorized to
- access the requested account without addiitional credentials.
- . AUTH_OTHER means we know the user but do not know the name the user
- wishes to log in under.
- . AUTH_UNKNOWN means we do not know who the user is but the person
- should be allowed to log in.
- . AUTH_REJECT means we do not allow the login to procede (if
- authentication is required)
- . These labels are now consistently used in ckuath.c
- Added chartostr() to ckclib.[ch], to turn a char into a string (and if the
- char is a control char, to return its name). Convenient for printfs.
- 26 Aug 99.
- Added charset and term bytesize info to SHOW TRANSMIT. ckuus5.c, 26 Aug 99.
- From Jeff, ckuath.c ckuus7.c ckuusr.h ckcnet.c ckuath.h, 26 Aug 99:
- . auth k4 list should not have switches
- . added a /addresses switch to auth k5 list to display the hostnames and
- ip addresses associated with the tickets.
- . added the ip address to the information displayed by auth k4 list
- . IP Address info is necessary to help debug problems associated with
- multihomed machines.
- Added TRANSMIT /TRANSPARENT to force text mode without charset translation,
- regardless of current charset settings. ckuus[r4].c, 26 Aug 99.
- Fixed SET TERM CHAR <local> <remote> to use the *terminal* charset keyword
- table, not the *file* one, for the remote charset. ckuus7.c, 26 Aug 99.
- Updated HELP text for Unicode. ckuus2.c, 26 Aug 99.
- Fixes from Jeff to a couple syntax errors in yesterday's changes. ckuus[r4].c,
- 27 Aug 99.
- Changed SET TERM CHAR TRANSPARENT to set a flag that distinguishes between
- "transparent" actually having been specified and tcsl == tcsr. The difference
- is important for TRANSMIT. Changed SHOW TERM to TRANSPARENT only if the user
- said TRANSPARENT; otherwise to show the two sets, even if they are the same.
- ckuxla.c, ckuus[47].c, 27 Aug 99.
- From Jeff: fix for a typo in v(protocol) evaluation. ckuus4.c, 31 Aug 99.
- Discovered that the TX_blah definitions in ckcuni.h contained a duplicate:
- both TX_CP923 and TX_ELOT928 were defined as 94. And then all the rest were
- one too low. Therefore the end of the txrinfo[] table (of function pointers)
- was wrong in the last 8 positions. Fortunately these were for sets we don't
- use. Fixed in ckcuni.h, 31 Aug 99.
- Added support for the Hazeltine 1500/1520 graphics set based on reverse
- engineering by Jeff of the HZ1520 "personality" of an IBM 3151 contributed by
- John Simkiss. ckcuni.[ch], 31 Aug 99.
- Changed F001 debug() format (never used) to be like F111, except number is
- shown in hex. Also changed F000 to default to hex display for numbers that
- are not single-byte chars. ckuusx.c, 31 Aug 99.
- Added special-case handling for UCS Line and Paragraph Separator characters
- (LS and PS) to xgnbyte() (for translating file from UCS to Latin-1, etc, when
- SENDing or TRANSLATing) and xpnbyte() (for translating incoming UCS2/UTF8 to
- Latin-1, etc, when receiving files). ckcfns.c, 31 Aug 99.
- Discovered a bad bug in ucs2_to_utf8() -- it wasn't handling UCS-2 characters
- greater than U+07FF. My fault -- a careless workaround for compiler warnings
- about "comparisons out of range". Fixed in ckcuni.c, 31 Aug 99.
- Changed u_to_b() to return(-2) if LS or PS encountered. ckcuni.c, 31 Aug 99.
- Changed UNIX CONNECT module to handle UTF-8 LS and PS (both are always treated
- as CRLF). ckucns.c, 31 Aug 99.
- From Jeff:
- . Let's correct something I said several weeks back. I swapped the
- meanings of AUTH_USER and AUTH_VALID. AUTH_VALID means that not only
- could we authenticate the user but we were able to confirm that the
- user has authorization to access the specified account.
- . AUTH_USER only means that we could authenticate the user. It does not
- mean the user is authorized to access the specified account.
- . This distinction is very important on the server. For instance:
- AUTH K5 INIT jaltman@KRB5.COLUMBIA.EDU
- TELNET /userid:root host
- means that the value of v(userid) on the server is "root" but
- unless there is specific authorization by 'root' to allow access
- by jaltman@KRB5.COLUMBIA.EDU the authtype will be AUTH_USER and
- not AUTH_VALID. This means that although we know who
- jaltman@KRB5.COLUMBIA.EDU is, jaltman@KRB5.COLUMBIA.EDU must still
- demonstrate via a login that he is allowed access as "root".
- . For Kermit scripts we now have a v(authname) variable which will
- contain 'jaltman@KRB5.COLUMBIA.EDU'. That way authorization lists
- can be used for the account specified by v(userid).
- ckcmai.c ckuusr.h ckuus4.c ckuath.c security.txt ckcpro.w host.ksc, 1 Sep 99.
- Also from Jeff, a fix to output from REMOTE commands in which the trailing
- line terminator was lost. ckcpro.w, 1 Sep 99.
- In XLATE, range-check csets before using them as array subscripts. ckuus4.c,
- 1 Sep 99.
- Jeff reported that constructions like "if xxx { commands, FORWARD label }"
- failed to find the label. Subtle problem, which seems to have been with us
- always. Diagnosis: the items in the braces are a macro; the FORWARD code
- loops thru the macro definition starting at the current position, but only if
- there are enough chars left in the macro definition to contain the label. In
- this case there aren't and the test for how the loop ended ("if (i == m)")
- didn't work. This would tend to happen whenever FORWARD was the last command
- in a macro. The correct test is "if (i >= m)". Fixed in dogoto(). Also
- increased max label length from 50 to 64 or 255 (depending on BIGBUFOK).
- ckuus6.c, 1 Sep 99.
- Somebody asked why we don't have an APPEND command if we have COPY, RENAME,
- DELETE, etc. I added COPY /APPEND -- took three minutes. Works with other
- COPY switches except /SWAP-BYTES. I used the cheating method (fopen,
- fread/fwrite, fclose) since the zcopy() API doesn't provide for appending.
- ckuus6.c, 1 Sep 99.
- A couple minor adjustments to pattern lists. ckcmai.c, 1 Sep 99.
- Migrated CONNECT changes for Unicode LS and PS to ckucon.c and ckvcon.c,
- 1 Sep 99.
- Thought about implications of LS and PS to TRANSMIT command, but I decided to
- do nothing since I have no access to an actual UTF-8 console (e.g. on Plan 9)
- and therefore no way of knowing how incoming UTF-8 characters -- especially
- LF and PS -- are echoed.
- From Jeff:
- . What do we do when the client is logging into IKSD with the following
- properties:
- SET TELOPT AUTH REQUIRED
- SET LOGIN USER anonymous
- Up until today the client would fail because IKSD would see the
- IAC SB AUTH NAME anonymous IAC SE
- message and reject telnet authentication because you can't
- authenticate "anonymous". However, that is not really true. Now that
- I properly understand and have implemented the distinction between
- AUTH_VALID and AUTH_USER there is no reason to reject "anonymous" for
- all authentication methods. When Kerberos is being used it makes
- perfect sense for someone to authenticate using their Kerberos ID but
- then log into the server as "anonymous". This shows up as:
- authstate = AUTH_USER
- authname = Kerberos ID
- userid = anonymous
- Therefore, we automatically log the user in as "anonymous" with
- password equal to their Kerberos ID.
- This does not work with SRP because it is not possible with SRP to
- authenticate as one ID and login as another.
- . Confirmed that v(userid) is always being set to the correct value.
- . Added a message to zvpass() to indicate anonymous logins for symmetry
- with the non-anonymous login message.
- ckcmai.c ckufio.c ckuath.c, 2 Sep 99.
- Added support for the Unicode General Punctuation block (0x2000-206f) to the
- tx_blah() functions -- various-width spaces and dashes, quotation mark
- variations, etc. ckcuni.c, 2 Sep 99.
- Changed UNIX sysinit() to check LOGNAME for userid[] initialization if USER
- not defined. ckutio.c, 2 Sep 99.
- Changed the UNIX version to call ckufio.c's whoami() function (formerly
- static) to expand v(user), rather than just printing uidbuf[]. This returns
- the ID of the actual logged-in (or su'd) user, and works for IKSD too. But in
- testing this, I discovered that tilde-expansion did not (never did) work in
- IKSD so I fixed that too. ckufio.c, ckuus4.c, 2 Sep 99.
- If the nopush variable was set, but NOPUSH was not defined at compile time,
- every command that might invoke the shell or another program had to check this
- variable, and not all of them did. One example was "REMOTE blah | command"
- (now fixed). But to ensure no others slip through, I added a check for nopush
- in zxcmd(), zshcmd(), and zsyscmd(). ck[uv]fio.c, 2 Sep 99.
- Ditto for ttruncmd() and the NET_CMD case of ttopen(), ckutio.c, 2 Sep 99.
- Added a new symbol XXNOTAV to ckuusr.h, to be used as the keyword value of any
- command that is configured out. For example, when NOPUSH is defined there was
- no PUSH command, but now when NOPUSH is defined, we can leave the keyword in
- but make its value XXNOTAV. All commands whose value is XXNOTAV absorb the
- whole command (via cmtxt()) and then print a message to the effect that
- "command 'blah' is not configured in this version of Kermit" and fails, which
- should be less confusing than beeping and printing a no-such-command message
- after the first keyword. Did this for most classes of top-level commands
- except NOXFER (which nobody uses) and NOFRILLS (since the point of that one is
- to save space). ckuusr.[ch], ckuus2.c, 2 Sep 99.
- Fixes from Jeff to "help func" + new help text for the Kerberos functions.
- ckuus2.c, 3 Sep 99.
- Fix from Jeff to a mistake in my ckcuni.c changes yesterday. 3 Sep 99.
- New code from Jeff to have SHOW NET display all the IP address of the local
- host in case it has more than one. ckuus4.c, 3 Sep 99.
- Fixed some #ifdefs to allow No-Unicode builds: ckuus4.c, 3 Sep 99.
- From Jeff: corrections to getlocalipaddr() and getlocalipaddrs(), ckcnet.[ch],
- 3 Sep 99.
- Changed FILE DISPLAY tags from SENDING and RECEIVING to SEND and RECV so server
- messages line up better. ckuusx.c, 4 Sep 99.
- Testing RESEND with a "set host * xxxx" server on the far end became confused
- very quickly when RESEND seemed to always work instantly without sending
- anything. Reason: When C-Kermit thinks it's in local mode (as it does when
- told to "set host *"), it automatically DISABLEs DELETE to protect itself
- against autodownload and APC "letter bombs". But when DELETE is DISABLEd,
- FILE COLLISION becomes RENAME. So if a file named "x" exists and I send a new
- copy, the new copy becomes "x.~1~". If the send is interrupted and then I
- "resend x", the receiver looks at the *original* x, not x.~1~ and either says
- "don't bother, it's already here" (if my copy is not bigger than the copy on
- the other end), or worse, corrupts the result. Of course the problem goes
- away if you tell the connection receiver to ENABLE DELETE. I don't see any
- other way out of this mess...
- Anyway, once this was sorted out, many repetitions of sending a file,
- interrupting the transfer, and resending it multiple times before the transfer
- was finished failed to show any kind of problem or corruption of the received
- file.
- Those obnoxious HINT messages were coming out every time a transfer was
- interrupted from the keyboard. This was happening because the "interrupted"
- flag had become overloaded (see notes from June 29th). Separated the
- different meanings into different flags: "interrupted" means a file transfer
- was interrupted from the keyboard by the user; "fatalio" means a transfer was
- interrupted because of a fatal i/o error (ttinl() fails or ttchk() returns -1).
- Added a catch-all in case input() returns 'q' for neither of those reasons (it
- shouldn't). ckcfn[s2].c, ckcpro.w, ckuus[5x].c, 4 Sep 99.
- Sending BYE to a "set host * xxx" server had the rather surprising effect of
- logging out the job under which it was running. Since these jobs are usually
- set up by hand, with the owner in attendence, this could be harmful -- letting
- another person kill other programs the user might have running (mail, editor,
- etc). So in the TCP server case (but not IKSD) made BYE received by server
- cause Kermit to exit rather than log out its own job. ckcpro.w, 4 Sep 99.
- Client, after sending BYE, should not be receiving EXIT warnings. Made sure
- that after sending BYE and receiving the ACK (or failing to after trying),
- the client calls ttclos(). ckcpro.w, 4 Sep 99.
- Some minor improvements to SHOW PROTOCOL display suggested by Lucas Hart.
- ckuus4.c, 4 Sep 99.
- Jim Whitby reported complaints about:
- sxx = xls[tcs][csin]; /* translation function */
- rxx = xlr[tcs][csout]; /* pointers. */
- in ckuus4.c on Unixware 7.1 ("declaration out of scope"). I was finally able
- to reproduce them; xls[][] and xlr[][] were declared twice. ckuus4.c, 4 Sep 99.
- Corrected typos in top-level command keyword table for new "not available"
- entries. ckuusr.c, 4 Sep 99.
- Preliminary run-through of major feature sets & platforms:
- Full VMS...ok (VAX VMS 5.5-2 VAX C 3.2 UCX 2.0)
- NoNet VMS..?? <-- Doesn't work yet...
- Full Unix..ok (SunOS gcc - ANSI - select())
- Full Unix..ok (SunOS gcc - ANSI - fork())
- Full Unix..ok (SunOS cc - no ANSI)
- Full Unix..ok (HP-UX cc - no ANSI)
- Full Unix..ok (Unixware 7.0 - ANSI)
- Full Unix..ok (Linux RH 5.2 gcc - ANSI)
- linuxnotcp.ok (Linux RH 5.2 gcc - ANSI)
- linuxnc....ok (Linux RH 5.2 gcc - ANSI)
- Krb4.......ok (SunOS)
- Krb5.......?? (Linux) <-- NO
- Krb4+Krb5..?? (Linux) <-- NO
- NOUNICODE..ok
- NOCSETS....ok
- NONET......ok
- NOLOCAL....ok
- NODIAL.....ok
- MINIDIAL...ok
- NOSPL......ok
- NOICP......ok
- NOSHOW.....ok
- NOHELP.....ok
- NOPUSH.....ok
- NODEBUG....ok
- As always, much #ifdef and declaration juggling required:
- ckuus[r467x].c, ckctel.c, ckcfns.c, ckudia.c, ckuscr.c. 4 Sep 99.
- From Jeff: Updated makefile for Linux Kerberos 5 builds, a new error message
- for bind failures, some auth changes: makefile, ckcnet.c, ckuath.c, 5 Sep 99.
- Linux Krb5 builds now ok.
- To clear up ENABLE/DISABLE DELETE vs SET HOST * confusion, changed ENABLED
- macro to take tcp_incoming into account (Jeff's suggestion). Moved
- declaration of tcp_incoming to ckcmai.c, added an extern declaration for it to
- ckcker.h (where ENABLED is defined, so we can use ENABLED() in any module
- without getting confused by undefined symbol errors for a symbol we can't
- see), removed extern dcls for it that were previously in ckcnet.c, ckctel.c,
- ckucns.c, ckucon.c, and ckuus4.c. For ENABLE/DISABLE purposes, REMOTE means
- (!local || tcp_incoming) and LOCAL means (local && !tcp_incoming). 5 Sep 99.
- Some research revealed that errno could be referenced in any version of VMS
- (at least back to 5.5) if we include <errno.h>. Some unguarded references to
- errno had crept in since Beta.09, which were making VMS NONET builds fail.
- Added #include <errno.h> for VMS to ckcdeb.h. 5 Sep 99. (Except the SPCVXA
- installation, which has messed-up header files.)
- Corrected some syntax problems in VMS files: ckvfio.c didn't like arithmetic
- involving a mixture of signed and unsigned char pointers; ckvcon.c needed its
- chkaes() routine converted from void to int. Now both UCX and NONET builds
- are OK on both VAX and Alpha. 5 Sep 99.
- Corrected a typo in the STATISTICS command (introduced yesterday) that could
- cause garbage to be printed in the "status" field (or worse). ckuus4.c,
- 5 Sep 99.
- Cleaned out some declared but unused variables. Most modules. 5 Sep 99.
- Recent changes to haddr_list stuff broke HP-UX 5.00 Win/TCP, had to undef
- HADDRLIST for HPUX5. ckcnet.h, 5 Sep 99.
- The new code for v(user) had the prototype for whoami() inside some #ifdefs
- it should have been outside of. ckuus4.c, 5 Sep 99.
- Added NOCSETS and NOSPL to revive 16-bit QNX build. Then it compiled but
- Telnet didn't work. Built with NONET. But it still doesn't work -- it beeps
- all the time, won't transfer files in remote mode, etc ("send xxx" complains
- read access denied when the permissions are fine, etc). Since nobody has ever
- asked for this version, we'll retire until/unless somebody does. makefile,
- 5 Sep 99.
- On a VMS 7.2 system that has Multinet installed as the production network but
- also has UCX xxx available, CKVIOC.C wouldn't build because UCX$C_IOCTL was
- not defined for some reason (everything else was OK). Added a clause to
- define as "2" if it was not defined. ckvioc.c, 5 Sep 99.
- From William Bader: new ckvold.com to account for ckcuni.[ch] and ckvold.c
- that include fmod() missing from old math library. 6 Sep 99.
- Went back and undid the sweeping VMS errno change, since it was fatal on most
- Multinet systems. Instead, added explicit #include <errno.h> directives to
- each module affected, after including all other header files, if VMS is
- defined and TCPSOCKET is not defined. ckcdeb.h, ckuus[67].c, 6 Sep 99.
- Removed double declarations for "i" from two routines in ckucon.c to fix
- X.25 builds. 6 Sep 99.
- ---Beta.10---
- A couple small changes for the Amiga from Steve Walton. ckusig.c, ckuus5.c,
- 7 Sep 99.
- Some syntax & makefile fixes for Dynix/ptx 2.16 from Roger J. Allen.
- ckuus6.c, makefile. 8 Sep 99.
- Minor syntax changes for compilation errors in Coherent 4.2 build
- ("declaration hides parameter", "trailing comma in initializer list", etc).
- ckucmd.c, ckuus[23456].c, ckcfns.c, ckctel.h, ckcuni.c, 8 Sep 99.
- From Jeff:
- . I removed a bunch of #includes that were no
- longer necessary and reduced the number of #defines.
- . updated the makefile entries for krb5 to use the
- /usr/local/{lib,include} trees instead of the kerberos distribution
- tree since we no longer reference non-public header files.
- . Put in CM_ABR entries for "binary-transfer"
- makefile ck_crp.c ckuath.c ckuat2.h ckuath.c ckuus3.c, 8 Sep 99.
- New consolidated makefile entries for NetBSD. makefile, 8 Sep 99.
- Corrections to pyrdcosx, sni543, and sni544 entries from Graham Jenkins.
- makefile, 8 Sep 99.
- New dynixptx216 makefile entries from Roger Allen. Workaround for asm
- symbol-table overflow in ckcuni + new gcc entry. makefile, 9/9/99.
- Fixes from Jeff to typos in my changes from yesterday: ckucmd.c, ckuus4.c,
- 9 Sep 99.
- Put base64 stuff in #ifndef NOSPL and moved query declaration from ckuus7.c
- to ckcmai.c to fix 2.11 BSD build. 9 Sep 99.
- I had added an escape clause to the SCO 2.3.4 builds for not optimizing
- ckuus3.c because last time I tried it seemed to get stuck forever, but
- apparently the sticking was because of something else because now it builds
- fine, so removed the escape clause. makefile, 9 Sep 99.
- From Jeff: Disable WHO, HOST, etc, in IKSD. ckcmai.c, ckcfns.c, 9 Sep 99.
- From Jeff: Add a note to docs that "-0" includes TELOPT KERMIT REFUSE REFUSE.
- ckermit2.txt, 9 Sep 99.
- If SET SEND PATHNAMES OFF, strip path from filespec sent back in the ACK to
- the F packet. Believe it or not, there is a Kermit program (for MUMPS) that
- compares the returned name to the sent one and fails if they are not the same.
- But then I realized that SEND PATHNAMES is already OFF by default, so this
- would be a bad change, since it takes away the ability of the receiver to tell
- the sender where the file went in the default case. So I backed off and added
- a new (invisible) command SET F-ACK-PATH { ON, OFF }, and it's ON by default.
- Documented in Section 4.22.4 of ckermit2.txt. ckuusr.h, ckcmai.c, ckcpro.w,
- ckuus[r3].c, 9 Sep 99.
- Discovered that FOPEN /APPEND did not (and never did) work if the file did
- not already exist. The code for this case was there, but never tested, and
- needed a small fix. Now it works. ckuus7.c, 9 Sep 99.
- Noticed that packet i/o statistics were wrong for receiving files when
- streaming -- ACKs were counted that shouldn't have been (stats were correct,
- however, when sending). Fixed in spack(), ckcfn2.c, 9 Sep 99.
- It was bothering me that to make a Telnet connection to a misbehaving Telnet
- server, you had to SET TELNET WAIT OFF first, because this is sticky and
- affects all subsequent connections unless you remember to undo it. So I added
- /WAIT and /NOWAIT switches to SET HOST and TELNET to specify [no] waiting
- just for this connection. I implemented it in the stupidest possible way,
- which probably needs improvement. I simply save tn_wait_flg and set it to the
- switch value before calling ttopen(), then restore it immediately upon return
- from ttopen(), since hanging onto it and restoring it at some later time would
- be pretty tricky. VERY tricky, in fact. ckuusr.h, ckuus7.c, ckermit2.txt,
- 9 Sep 99.
- Changes from Jeff... refinements to ENABLE/DISABLE for IKSD, generalization
- of TELNET / SET HOST switches to (a) include other relevant parameters, and
- (b) make then persist throughout the connection and restore them when the
- connection is closed; fix a typo in my F-ACK-PATH code; ckuus7.c ckuath.c
- makefile ckuus3.c ck_crp.c ckcnet.c ckctel.c ckuus6.c ckuusr.c. Supplied
- some missing #ifdefs in ckuus3.c. 12 Sep 99.
- Protected #include <term.h> with #ifndef NOTERMCAP to fix linuxnc build on
- systems that actually do not have <term.h> (because they failed to choose
- ncurses at Linux install time). ckuusx.c, 12 Sep 99.
- At the suggestion of Markus Kuhn, replaced utf8_to_ucs2() with a more robust
- version adapted from Xfree86 xterm (Thomas Dickey). The previous version
- (Mark Davis, Unicode website samples) only works with well-formed UTF-8
- sequences. The new version works equivalently but should handle malformed
- sequences properly. Unfortunately, the caller must treat the return value a
- bit differently now, and this can be a bit complicated because under certain
- conditions, it can return *two* values (0xfffd followed by valid character)
- when a UTF-8 sequence is interrupted by (say) an ASCII character. ckcuni.c,
- 12 Sep 99.
- With this change, an invalid UTF-8 sequence becomes 0xfffd, and if it was
- interrupted by the valid character, the valid char is lost. This is better
- than before, but not ideal.
- The callers of utf8_to_ucs2() are:
- ckcfns.c: rc = utf8_to_ucs2(ch,&us); <-- In xpnbyte()
- ckcfns.c: rc = utf8_to_ucs2(ch,&us); <-- In xgnbyte()
- ckcuni.c: x = utf8_to_ucs2(c,&ucs2); <-- In u_to_b()
- Let's see if we can fix them...
- The problem with u_to_b() (which is called by the CONNECT modules and by
- TRANSMIT) is that it has an argument -- the next UTF byte. So there's no good
- way to save up a second value and return it next time, because we'll get
- increasingly far behind. But we can make it return a special negative code,
- say -9, to mean: "Use the error character, and then call me again to get the
- next character". But that won't work, because there's no special arg it can
- be called with that says to return the saved character, because its arg is a
- CHAR. So we need a second routine for that, u_to_b2(). OK, that was easy:
- ckcuni.c, ckucns.c, ckuus4.c, 12 Sep 99.
- xpnbyte() and xgnbyte() were a bit trickier but I made a first stab at it.
- The resulting Kermit still seems to handle well-formed UTF-8 OK (as it did
- before), but supposedly now should handle invalid UTF-8 sequences by the book.
- Sent the result off to Markus for more testing. ckcfns.c, 12 Sep 99.
- New (tested) NetBSD entries from Graham Jenkins. Makefile, 18 Sep 99.
- Updated Commodore Amiga source files from Steve Walton, mainly addition
- of ttgwsiz() and isdir(): cki*.c, 18 Sep 99.
- Added LinuxPPC makefile entry from Nick Strauss <nicks@carriage.chesco.com>.
- makefile, 19 Sep 99.
- Lucas Hart reported that "set file download-directory ?" listed regular
- files as well as directories. Actually the same was true of any command that
- parsed a directory name, including CD. Fixed in cmifi2(): ckucmd.c, 19 Sep 99.
- Mark Sapiro reported that we still have the problem with timestamps of
- incoming files in BSDI being off due to DST confusion. Steve Schultz's
- diagnosis was that the BSD44 path was the tm_gmtoff adjustment already
- accounted for DST, so when adjusting for DST after that, we were effectively
- subtracting two hours instead of one. The fix of minimum boat-rocking was to
- adjust for DST only in the non-BSD44 case, rather than always. zstrdt():
- ckufio.c, 19 Sep 99.
- Accumulated changes from Jeff since last week:
- . Make v(filename) retain name of last file transferred. ckuus4.c.
- . Fix clearchannel auto. ckuus[25y].c, ckcfns.c, ckermit2.txt.
- . Fix streaming vs draining after E-Packet while receiving. ckcfn2.c.
- . NOPUSH was blocking client end of RHOST. ckuus7.c.
- . REMOTE { SET, ASG, COPY, RENAME } did not set success=1 and so would
- not resume CONNECT mode when invoked via autodownload. ckcpro.w.
- . Reinstates the use of select() on TCP/IP connections when streaming so
- we can detect connection loss. ckcnet.c.
- The last one + the clearchannel changes also result in a dramatic performance
- improvement on certain kinds of connections, notably TCP/IP over ADSL (in one
- trial, 4BM of precompressed data was transferred 2.6 times faster than with
- FTP.
- Fixed v(filename) to work more consistently, since sometimes it was empty
- after a successful file-group transfer because (for some unknown reason)
- filnam[] was empty. Rather than figure out why this would be and "fix" it
- (probably breaking something else) I use the WHERE command info if filnam[]
- is empty. ckuus4.c, 19 Sep 99.
- Added RELIABLE and CLEARCHANNEL to STATISTICS /VERBOSE display. This shows
- not the settings (usually AUTO, not very informative), but whether the
- features were actually negotiated and used. ckuus4.c, 19 Sep 99.
- Added sco32v505udk makefile target on advice from Thomas M. Gill <tom@hcd.net>,
- who says in this case -DDCLTIMEVAL must be added. makefile, 19 Sep 99.
- Added uw2iksd entry (Unixware 2, like 7, needs shadow password support for
- authentication). makefile, 19 Sep 99.
- At Lucas Hart's suggestion, make bzero and bcopy be macro definitions in VMS,
- replacing themselves by memset and memcpy, to squelch the warnings we've been
- getting about them all these years. Probably a bad idea... (Another idea
- would be to *replace* all references to bzero and bcopy with memset &
- memcpy but they're not portable either so let's try this first...) Builds and
- runs OK on Alpha VMS 7.1 UCX; Alpha VMS 7.1 TGV; VAX VMS 5.5-2 UCX; VAX VMS
- 7.1 TGV (this one always got errors before) -- so let's keep it. ckcnet.h,
- 19 Sep 99.
- The newest DECC compiler, 6.2FT, spews out reams of %CC-W-NOTULALQUA warnings
- for constructions like memmove(&xabfhc_ofile.xab$w_lrl,filptr,2), having to do
- with struct member alignment. The consensus is that these warnings are both
- harmless and overzealous -- they might be important if we were moving multiple
- members of a struct at once and assuming a fixed number of bytes (when the
- Alpha might insert padding and the VAX might not). But we're not doing that.
- Suggestions for making the warnings go away (like #pragma nomember_alignment,
- or adding compiler switches that only work on some versions of some compilers)
- are dangerous, so we'll just live with the warnings.
- Lucas says DECC -- at least back to V1.3 (1993) -- has an /UNSIGNED_CHAR
- switch (which is not the default). Tried building C-Kermit on an Alpha with
- DECC 5.5-002 with p4 = "/UNSIGNED_CHAR" -- perfect, not a single warning. In
- ckvker.com, at the DECC: label, it is probably OK to change 'ccopt =
- "/decc"+ccopt' to 'ccopt = "/decc/unsigned_char"+ccopt'.
- Changed VMS C-Kermit IDs from "7.0.195" to "7.0.196" (for ANALYZE/IMAGE).
- ckvker.com, ckvold.com. 19 Sep 99.
- From Lucas:
- . Fixes for DELETE in VMS, plus implementation of /ASK. ckuus6.c.
- . Fix recovery from illegal filenames in the LOG command. ckvfio.c,ckuus4.c.
- Added implementation of /LIST to Lucas's implementation of /ASK, and added
- code to error out if user included /SIMULATE on platforms that don't support
- it. ckuus6.c, 19 Sep 99.
- Fixes needed for VOS, 20 Sep 99:
- . Shuffle declaration of inserver in ckctel.c.
- . Shuffle declaration of xaskmore in ckuus7.c.
- Correction to kstart() from Jeff. ckcfn2.c, 20 Sep 99.
- Remove some more now-superfluous bcopy/bzero definitions from ckcnet.h,
- 20 Sep 99.
- For the benefit of DECC 6.2, add a DECC-only replace for the VMS/SMG printw()
- replacement that handles "varargs". ckuusx.c, 20 Sep 99.
- There has never been a way to give a DIAL command that specifies a list of
- phone numbers to try until one answers, except by creating a dialing directory
- and putting multiple entries in it under the same name. This is a big pain,
- especially when using the K95 dialer. Now the DIAL command accepts "makelist"
- notation, as in:
- dial {{7654321}{8765432}{9876543}}
- These have to be actual numbers to dial, not names of dialing directory
- entries. Conversely, dialing directory entries can not contain lists like
- this. Otherwise, the numbers are treated as if they had been fetched from the
- dialing directory; they can be in literal or portable format, etc. ckuus6.c,
- 20 Sep 99.
- Updated ICL makefile targets for IKSD. 21 Sep 99.
- Fixes for #ifdefs vs Telnet variables from Jeff. ckuus[37].c, 21 Sep 99.
- From Jeff: debug stmt added to ckuath. Cleaned up long lines. 21 Sep 99.
- From Jeff: improved handling of Telnet negotiation timeouts. ckctel.c,
- ckcnet.c, 21 Sep 99.
- SET PROTOCOL was invisible for non CK_XYZ builds, but people still need to
- use it to set the Kermit upload/download command strings, so made it visible
- in all cases. ckuusr.c, 21 Sep 99.
- Fixed HELP SET PROTOCOL for non-XYZ case. ckuus2.c, 21 Sep 99.
- Another tn_wait declaration fix from Jeff. ckuus7.c, 22 Sep 99.
- From Jeff: some improvements to the Telnet negotiation timeout code and
- messages. ckctel.c, 22 Sep 99.
- Updated HELP DIAL text for phone-number lists. ckuus2.c, 22 Sep 99.
- It seems that ever since C-Kermit 6.0, C-Kermit prompts and image-mode
- commands have not appeared in VMS batch logs. This was intentional -- most
- people did not want them there. However, there was no way to undo this.
- Switched the code around so that starting Kermit with -z on the command line
- or giving it a SET BACKGROUND OFF command after it started would enable
- issuing of prompts and echoing of commands even in batch. Also enabled the
- file-transfer display in batch, but forced it to BRIEF if it was set to CRT or
- FULLSCREEN. ckcker.h, ckvtio.c, ckuus[3]x.c, ckucmd.c, 23 Sep 99.
- Another unhappy discovery: VMS C-Kermit no longer reads image data from a DCL
- command procedure executed at the terminal. This is entirely separate from
- the batch issue -- Kermit *does* read image data in batch, even when executing
- the exact same .COM file.
- Discovered that the -d command-line option also set the timestamp feature -- I
- probably put that there for some testing and forgot to take it out. So now
- it's out. ckuus4.c, 23 Sep 99.
- OK, now I can compare the three VMS debug logs...
- congm sys$getjpiw mode_flags=3 <-- Interactive
- congm sys$getjpiw mode_flags=3 <-- DCL
- congm sys$getjpiw mode_flags=2 <-- Batch
- So DCL and Interactive look the same. However, isatty(0) fails for DCL and
- Batch but succeeds for Interactive. So I made a new flag, "itsatty", for VMS
- that is nonzero if sys$input is the terminal, which it isn't in a batch job or
- in a DCL command procedure. And I changed the hack in VMS coninc() to return
- getchar() if (!itsatty), rather than only if (batch). Now the documentation
- is right again. ckvtio.c, ckvbwr.txt, 23 Sep 99.
- From Jeff: Back off on le_buf echoing changes for all but K95; add
- SO_DONTROUTE support. ckcnet.c, 23 Sep 99.
- User interface for SO_DONTROUTE from Jeff. ckuusr.[ch], ckuus[34].c,
- ckcmai.c, 24 Sep 99.
- New security.txt and telnet.txt from Jeff. 24 Sep 99.
- Peter E reported that LOG commands didn't work any more, e.g.:
- [/tmp_mnt/eip/cku195/b10+04/] C-Kermit>log connections
- ?Invalid: log connections
- The problem is because of the change from Lucas Hart of a few days ago, in
- which the LOG command returns -2 if zfnqfp() returns NULL. In this case
- zfnqfp() returns NULL because realpath() fails, evidently having something to
- do with being called by root. So I backed off on Lucas's change for the LOG
- command to fail if zfnqfp() failed. The real fix would be for VMS zchko()
- (and for that matter, zopeno()) to fail gracefully when given an illegal
- filename. ckuus4.c, 24 Sep 99.
- Put v(line) back the way it was in 6.0, so it always shows something,
- rather than returning the empty string when in remote mode. I don't know why
- it was changed, but some people didn't like it. ckuus4.c, 24 Sep 99.
- The old problem with packet 0...
- . Client sends I to server.
- . Server sends ACK(I) back to client.
- . Client sends REMOTE blah to server.
- . Server doesn't receive it, so resends ACK(I).
- . Since these are all packet 0, client thinks this is ACK(REMOTE blah)
- Previously we had a heuristic in place for GET: If we sent a GET command and
- were answered by an ACK, we knew this had happened because GET can never be
- answered by an ACK (see <get>Y state). But a REMOTE command can get a
- short-form answer, which is in an ACK; when the ACK comes, the client prints
- the answer and then quits, thinking the transaction is over. This actually
- turns out to be OK with the server too, since as far as the server is
- concerned, the I/Y exchange is a complete transaction too. The problem is,
- the requested REMOTE operation never took place. So a new (ultra-gross)
- heuristic was added. At <ipkt>Y, we save a copy of the contents of the
- I-packet. Then at <rgen>Y, we check to see if the contents of the ACK we just
- got match those from ACK(I) and if so, we resend the REMOTE command packet and
- wait for another ACK. All of this code is within #ifdef PKTZEROHACK..#endif,
- and confined to ckcpro.w. It doesn't seem to hurt anything, but it's hard to
- set up a test case to actually force the condition. 24 Sep 99.
- Added a (char *) cast to rdatap, which is (CHAR *), in the new <rgen>Y code.
- ckcpro.w, 27 Sep 99.
- Added an x-ref from HELP ECHO to XECHO and WRITE SCREEN. ckuus2.c, 27 Sep 99.
- From Jeff, 27 Sep 99:
- . Fixed typos in SET EDITOR code: ckuus[r4].c.
- . Fixed some mistakes in v(hwparity) and v(serial): ckuus4.c.
- . Shuffled some Kerberos & SRP #ifdefs: ckcdeb.h, ckcfns.c.
- Fixed a problem Jim Whitby noticed with quoting in ELSE statements. This
- problem was introduced when I unified IF and XIF, and occurs only when
- ELSE begins on a line, followed by a { command list } rather than a single
- command. The solution (gross) was to make a special version of pushcmd()
- (called pushqcmd()) for this situation, which doubles backslashes while
- copying, BUT ONLY IF it's a command list (i.e. starts with "{"); otherwise
- we break lots of other stuff. Result passes Jim's test and still passes
- ckedemo.ksc and iftest.ksc. ckucmd.c, ckuus6.c, 27 Sep 99.
- After learning that QNX does not always include TCP/IP, added a qnx32nonet
- makefile target. 28 Sep 99.
- Put the (char *) cast back in the strncmp() call in <rgen>Y; I don't know
- why it keeps disappearing.... ckckpro.w. 28 Sep 99.
- From Jeff: Fix confusion between #ifdef IKSD and #ifdef CK_LOGIN, allowing
- a clean separation of the two concepts, and therefore IKSD implementations
- on platforms that don't have authentication. Most modules, 30 Sep 99.
- Put the (char *) cast back in the strncmp() call in <rgen>Y; I don't know
- why it keeps disappearing.... ckckpro.w. 30 Sep 99.
- Changed ROBUST macro definition to also SET RELIABLE and (where appropriate)
- CLEARCHANNEL OFF. ckuus5.c, 30 Sep 99.
- The previous change had no effect since the sequence SET RELIABLE OFF, TELNET
- xxx also had no effect -- Kermit would SET RELIABLE ON anyway. The problem
- is that it had no way of knowing whether RELIABLE was OFF because the user
- commanded it, or because it was set to OFF automatically when the previous
- connection was not reliable. Fixed with Yet Another Global Flag. ckcmai.c,
- ckuus[37y].c, 30 Sep 99.
- From Jeff: Replace a missing line in ckuus4.c from yesterday's merge. 1 Oct 99.
- From Jeroen Scheerder <J.Scheerder@csi.nl>: makefile target for Mac OS X 1.0.
- (straight "make bsd44" works out of the box). makefile, 1 Oct 99.
- Also from Jeroen Scheerder: supply a missing semicolon in ztime(). ckutio.c,
- 1 Oct 99.
- Added Mac OS X symbols, designer banner. ckcdeb.h,ckuver.h,makefile, 1 Oct 99.
- From Michael Weiser <michael@weiser.saale-net.de>: Fill in some missing
- #ifndef NOXFER..#endif clauses. ckucns.c, ckufio.c, ckuus[r47x].c, ckuscr.c,
- 1 Oct 99.
- From Jeff: New IF IKSD command. ckuusr.h, ckuus6.c, 3 Oct 99.
- From Jeff: Hooks for Windows IKSD. ckuusy.c, ckcdeb.h, ckcmai.c, ckuath.c,
- 3 Oct 99.
- From Gary Brown <gsb@wcom.net>: "Situation: C-Kermit 7.0.196 Beta.10, 4 Sep
- 1999, on a Linux system configured so the lockfile directory is not world
- writable (but it is writable by group uucp, and kermit is setgid uucp). Bug:
- if you do a "set line" to a port that's already in use, Kermit leaves a
- temporary lockfile ("/var/lock/LTMP.12345" or the like). Then if you then do
- another "set line," specifying another port, you get a "Sorry, write access to
- UUCP lockfile directory denied" error. Cause: If the (real) lockfile for that
- port already exists, ttlock() in ckutio.c calls ttchkpid() to see if it's
- stale. ttchkpid() returns with privileges off, so the subsequent
- unlink(tmpnam) fails, leaving the temp file around. A subsequent "set line"
- command fails, apparently because the creat() fails with EACCES, although it
- successfully unlinks the file after that, so a third attempt will succeed.
- And if the lockfile turns out to be stale, I suspect that the link() will fail
- on the next pass through the loop, although I didn't test that case. Fix: I
- think the best bet is to priv_off() before calling ttchkpid() and priv_on()
- afterwards (needed in two places)." ckutio.c, 3 Oct 99.
- Added an Openstep 4.2 Makefile target, based on NeXTSTEP 3.3. 3 Oct 99.
- First cut at a Shift-JIS to UCS-2 translator (as a separate program). It has
- two big tables for Kanji (about 8K and 2.5k entries, respectively, for a total
- of 10.5K unsigned shorts so about 21K bytes, of which 6K is wasted due to
- sparseness). Then it has an algorithmic translation for Katakana and a simple
- transformation for Romaji and controls (a very small amount of code). The
- result compiles to about 40K on a Sparc and goes fast: 0.28 sec to convert a
- 100K Shift-JIS file, or 360Kcps. Some tuning might be able to bump up the
- speed. To be continued...
- From Jeff, 4 Oct 99:
- . Hooks to mainline code for Windows NT authentication: ckcmai.c, etc.
- . Allow password to echo when logging in to IKSD anonymously: ckuus7.c.
- . Fix TRANSLATE command to work in K95 when writing to console: ckuus[r4].c.
- The output-file character-set for TRANSLATE now defaults to "ucs2" for Unicode
- output systems (e.g. Windows NT console) and the file character-set otherwise.
- Rounded up Shift-JIS example files from the net (mostly HTML) for checking,
- analysis, and benchmarks. Streamlined the Shift-JIS/UCS-2 code, plugged some
- holes, and added code to handle the User-Defined area (both sets have one).
- Updated Mac OS X makefile targets from Jeroen Scheerder. makefile, 4 Oct 99.
- Also from Jeroen Scheerder: a cast to shut up warnings about an arg to
- localtime() in ztime(). ckutio.c, 4 Oct 99.
- Fixed OpenStep target to build ckcpro.c separately without optimization since
- it crashes the compiler. makefile, 4 Oct 99.
- Changed CHAR * tocs to char * to shut up stubborn stupid compilers. ckuusr.c,
- 5 Oct 99.
- Changed calls to mdmhup() to not fall back on tthang() if mdmhup() fails.
- In other words, if SET MODEM HANGUP-METHOD is MODEM-COMMAND, then we use the
- modem command; otherwise we drop DTR or whatever. ckucns.c, ckudia.c,
- ckuusr.c, 5 Oct 99.
- From Jeff: Don't switch to clearchannel automatically on Rlogin connections.
- ckcfns.c, 5 Oct 99.
- From Jeff: Fix typos; fix Telnet screen-dimension negotiation for K95 IKSD.
- ckcmai.c, ckuusr.c, ckctel.c, 6 Oct 99.
- Rolled back SET MODEM HANGUP change -- it broke a lot of other stuff.
- ckucns.c, ckudia.c, ckuusr.c, 6 Oct 99.
- From Lucas Hart:
- Changes included in ckvio.diff (which also has a ckcmai.c patch for
- isabsolute):
- - Fill in zchko
- - Change log file error handling, zopen and zclose
- - Use parse result to handle <> and rel names in zmkdir; cleanup
- - Extend nzrtol to handle device spec in absolute to relative;
- more <> dir syntax; no longer need absolute for zmkdir;
- - Convert non-file oriented device name to upper case in zfnqfp
- instead of appending cwd; replace multiple strncat calls
- - Fix fgen edit 165
- - Fix typo in zrmdir
- Some quick comments on some of the code:
- - "graceful" error handling for log files
- My implementation of zchko does not fail when given an illegal file name,
- because nzrtol may subsequently convert a "multiple dot" Unix name to a
- legal file name, so the illegal file name causes a fopen error in zopeno.
- (Of course, it does make sense to convert the file name before testing
- for write ability, but I'll leave that for your consideration.)
- In zopeno, perror(name) gave:
- beta10+ > log t xxt+.log
- xxt+.log: non-translatable vms error code: 0x186D4
- %rms-f-syn, file specification syntax error
- which I eventually transformed to a more concise:
- ?fopen file name syntax error : xxt+.log
- (I'm not sure about the declaration of ckvmserrstr; used the same
- form as in ckuus4.c)
- Note that the Unix zopeno has
- #ifdef COMMENT /* Let upper levels print message. */
- perror("Can't open output file");
- #endif /* COMMENT */
- but I didn't find where a message is printed (at least where zopen is
- called in ckuus4.c)
- - don't know when the logs are flushed to disk; the log files are no
- longer 'locked by another user' when attempting to view them from
- another process and the files are still open, but I have yet to read
- data. One step forward.
- - you would suggest looking at zchko :) I check write capability with
- a RMS write and delete on close. Easier to code than checking all the
- conditions under which VMS will grant write permission, and ckcplm.txt
- says
- Checks to see if a file of the given name can be created. Returns:
- -1 if file cannot be created, or on any kind of error.
- (in contrast to the ckufio chko() text which states denial of write
- permission is the only error condition.)
- I still have some zchko questions but I'll send them separately, as they
- may relate to other problems that occur with the original zchko.
- - I don't like to think of how long it took me to find the typo in zrmdir.
- The symptom was that mkdir and rmdir were fine when no device was specified,
- but not on another disk.
- - In zmkdir, I eliminated some old code instead of commenting it out -
- for clarity only; otherwise I pretty much patched my code in.
- - Hope you don't mind the suggestion for eliminating the multiple strncat
- calls in zfnqfp; the original seems repetitous but is well exercised.
- ckcmai.c, ckvfio.c, 6 Oct 99.
- Added some clarifications to GET docs & help text. ckermit2.txt, ckuus2.c,
- 7 Oct 99.
- From Jeff, 7 Oct 99:
- . Added the ability to assign additional IP addresses for embedding into
- a Kerberos 5 TGT. This is necessary for using K5 through a Network
- Address Translator.
- . Fixed a bug in the telnet negotiations. If SB START_TLS FOLLOWS has
- been sent then we cannot send addition subnegotiations. All attempts
- to send sub negotiations should be dropped on the floor.
- ckctel.c ckcnet.c ckuath.c security.txt ckuus2.c ckuus7.c ckuath.h ckuusr.h.
- Lucas Hart pointed out that "log session /foo/bar/baz/xxx" did not print an
- error message when any of the directory path segments after the first did
- not exist, as long as the user had write access to the path up to that point.
- This points out a flaw in the zchko() design -- it doesn't distinguish among:
- . Can I overwrite an existing file?
- . Can I create a file (or directory) in an existing directory?
- . Can I create a file (or directory) and its parent(s)?
- We can't change zchko() without breaking all sorts of things, so the fix
- is to add error messages where they are missing at the higher levels. In this
- case, the log-opening functions were printing messages if zchko() detected an
- error at filename parse time (in fact, these are printed by cmofi(), the
- output-filename-parser) but were not printing any message if the parse
- succeeded but opening the log failed. This was fixed in debopn(), pktopn(),
- etc (one routine per log). ckuus4.c, 7 Oct 99.
- Moved makelist() and brstrip() from ckuusr.[ch] to ckclib.[ch]. 7 Oct 99.
- Added a /REDIRECT switch to EXEC (UNIX only). I don't know if it will work,
- but the idea is that if there is a connection active (ttyfd > -1), this will
- dup ttyfd to stdio before calling execvp(), the obvious application being to
- use C-Kermit as the PPP dialer, and then overlaying itself with pppd or
- whatever. ckcdeb.h, ckuusr.c, ckufio.c, 7 Oct 99.
- Added One Last New String Function: fstripb(), which strips enclosing braces,
- brackets, parens, or quotes from its arg. Many options available, loads of
- fun. ckuusr.h, ckuus[24].c, ckermit2.txt, 7 Oct 99.
- From Jeff: fixes for VOS networking. ck[cl]net.[ch], 7 Oct 99.
- From Jeff: a fix for a problem in which DIR would list two or more unreadable
- files, but would fail to list one. ckucmd.c, 7 Oct 99.
- Eliminated double error messages when cmifi() fails when called from cmfdb().
- ckucmd.c, 7 Oct 99.
- Improved DELETE error message when cmfdb() fails. ckuus6.c, 7 Oct 99.
- From Jeff: enable syslogging for NT; NT login code juggling; more VOS fixes
- (mainly for X.25-only build). ckcdeb.h, ckcmai.c, ckcnet.c, ckuus[347].c,
- 8 Oct 99.
- Received confirmation that EXEC /REDIRECT works, at least on Linux for PPP
- dialing. 9 Oct 99.
- From Jeff: change many strcpy()'s to strncpy()'s to avoid memory leaks; finish
- parameterizing all user-id buffer-length reference to UIDBUFLEN; ditto for
- several other kinds of buffers. ckcfns.c ckucmd.c ckufio.c ckcfn3.c ckutio.c
- ckcnet.c ckclib.c ckctel.c, 9 Oct 99.
- Worked on Kanji (still offline).
- From Jeff: More strcpy -> strncpy: ckufio.c, ckuus[4rx].c; Some corrected
- Telnet return codes: ckctel.c, ckucmd.c; updated auth stuff: ckuath.c.
- 11 Oct 99.
- Added ckstrncpy() to ckclib, which does what strncpy() should have done:
- handles NULL args, ensures result is NUL-terminated, doesn't gratuitously
- right-pad with NULs, and returns something useful: the number of bytes copied.
- ckclib.[ch], 11 Oct 99.
- Went thru many modules and replaced all strncpy(a,b,n) with ckstrncpy(a,b,n),
- and removed subsequent, now superfluous, a[n] = NUL; statements (and also
- marveled at the number of places where they were lacking). Also whenever we
- had a sequence like "strncpy(a,b,n); m = strlen(a);" this became simply
- "m = ckstrncpy(a,b,n);" since ckstrlen() returns the number of bytes copied.
- Also changed length references from (e.g.) XLEN-1 to XUFLEN, since ckstrncpy()
- assumes it has been given the actual length of the buffer, and ensures that
- the terminating byte or last byte is NUL. ck[cuv]*.[cw], 11 Oct 99.
- Changed zfnqfp() define for non-zfnqfp() platforms from strncpy to ckstrncpy.
- ckcdeb.h, 11 Oct 99.
- Fixed return type of main() to agree with its declaration. ckcmai.c, 11 Oct 99.
- Fixed some confusion in setting http_array. ckuusr.c, 11 Oct 99.
- Fixed printfs in shofea() that used "%d" to reference sizeof(), which is long.
- ckuus5.c, 11 Oct 99.
- In DIR /ARRAY, make sure we have a valid array pointer before referring to it.
- ckuus6.c, 11 Oct 99.
- Various other syntax adjustments, initializing variables, etc, to suppress
- -Wall complaints that were not actually valid. Many modules, 11 Oct 99.
- Tested ckedemo.ksc and found that many strings were missing their final
- character. It seems that ckstrncpy() introduces a new subtlety. Consider:
- char *p, * s = "oofa";
- int n = strlen(s);
- p = malloc(n+1);
- The customary practice at this point is to:
- strcpy(p,s);
- and this is absolutely correct (and we should keep doing it this way); we
- know the buffer is the right size, and strcpy() sets the last byte to NUL.
- However:
- strncpy(p,s,n);
- is NOT correct, since it will not write a terminating NUL, even though most
- people assume it will. If, instead, you use:
- ckstrncpy(p,s,n);
- the result will be "oof<NUL>" (not "oofa<NUL>"), since ckstrncpy() interprets
- the third arg as the length of the destination buffer, not the length of the
- source string, and it must ensure the terminating NUL. Therefore, remember
- when calling ckstrncpy() to give the actual, real, entire size of the buffer:
- n = strlen(s);
- p = malloc(n+1);
- ckstrncpy(p,s,n+1); <-- But in this case it's still better to use strcpy().
- To illustrate this a different way, suppose you have a string s = "[1]":
- strncpy(s+1,"2",1); --> "[2]"
- But:
- ckstrncpy(s+1,"2",1); --> "[" (because it NUL-terminates).
- So be careful with this one -- it's not a plug-compatible replacement for
- strncpy(). I went thru the code and checked each call, and changed some of
- them back to strcpy() or strncpy() when appropriate. In general the rule is:
- use ckstrncpy() to copy a string to a general-purpose big buffer whose length
- is a constant, e.g. "ckstrncpy(line,s,LINBUFSIZ);" but use strncpy() to copy a
- specific number of bytes from the source string, e.g. "strncpy(line,s,n);"
- followed by "line[n] = NUL;" if the intention is not to insert s at the
- beginning of the string that is already in line[], or else
- "ckstrncpy(line,s,n+1);".
- From Jeff: Corrected a misplaced #ifdef from my changes yesterday, which
- caused streaming transfers to fail. ckcpro.w, 12 Oct 99.
- Changed a few ckstrncpy's back strncpy's in ckcpro.w and ckcfn*.c. The rule
- is: use ckstrncpy when you don't know the source length, and you are copying
- to a buffer whose length is known. Use strncpy() to copy a specific number
- of bytes from the source to the destination. 12 Oct 99.
- Prior to integrating Kanji/Unicode translations, built in various
- configurations on Linux to get baselines:
- NOCSETS NOUNICODE NOKANJI
- [ ] [ ] [ ] 1329014
- [ ] [ ] [ X ] 1325686 (because it's all done by algorithm)
- [ ] [ X ] [ ] 1158837 (removes 170K, mostly tables
- [ X ] [ x ] [ x ] 1090845 (removes 238K, mostly tables)
- From Jeff: Symbols & parsing for TELOPT ... COM-PORT-CONTROL. ckuusr.h,
- ckuus[r3].c, 12 Oct 99.
- More minor adjustments to yesterday's ckstrncpy() work. ckuus[57].c, 12 Oct 99.
- Began merging Kanji/Unicode code from offline into C-Kermit... Added tables
- to ckcuni.c. This brings full Linux build up to 1393157 bytes. Added
- functions and prototypes to ckcuni.[ch]. Filled in the appropriate calls in
- xgnbyte() in ckcfns.c. Compiled but didn't test. Full Linux binary now
- 1400670 (so only about 7K for the code). The ckcuni.c source file is now over
- 700K, about twice as long as any other source module. 12 Oct 99.
- Filled in xpnbyte() and then began testing. Everything worked pretty well
- except for occasional strange corrupted spots in the new file when using UCS-2
- as the transfer charset. The problem (which is not new to the Kanji code)
- turns out to be: getpkt() calls some routine to get the next byte because
- that's what we put in packets: bytes. Well, if the "get next byte" routine
- returns (say) 0x0A, getpkt() had no way of knowing that this was actually part
- of a Unicode, and therefore not to treat it like a linfeed, and therefore it
- inserted a carriage return into the data stream, which of course changed the
- Unicode character. And then it inserted a (null and a) linefeed next time
- around. The cure involved moving all the end-of-line logic for Unicode to
- xgnbyte() and disabling it for Unicode in getpkt() itself. ckcfns.c, 13 Oct 99.
- Tested sending from PC (Little Endian) to Sparc (Big Endian): OK. Tested
- non-Japanese transfers (e.g. Latin-1) thru Unicode: OK. Built with NOKANJI,
- NOUNICODE, and NOCSETS to make sure #ifdefs were OK. Built on HP-UX 10.20
- with ANSI compiler. Added -DMAINISVOID to HP-UX 100 ANSI-C compiler targets.
- makefile, 13 Oct 99.
- From Jeff: Changes for building on Windows 2000, mainly that NOCRYPT must be
- defined before #including <windows.h>: ckcsig.h, ckcdeb.h. IKSD idle timeout:
- ckcpro.w, ckuusx.c, ckcmai.c, ckucmd.c. 13 Oct 99.
- Added EUC-JP as preferred keyword for JAPANESE-EUC, according to common usage,
- and made JAPANESE-EUC invisible. ckuxla.c, 14 Oct 99.
- Finally gave in and added REMOTE SET FILE CHARACTER-SET. It simply passes the
- character-set name string to the server, which looks it up in its own table;
- thus the string must be in the server's syntax. When the server gets this
- command, it also disables automatic character-set selection (otherwise the
- command would have no effect). ckuus7.c, ckcfns.c, 14 Oct 99.
- This enables cycling through all the new translations in a script like so:
- dcl &x[] = euc ucs2 utf8 ; xfer charsets
- dcl &y[] = eu uc ut ; abbrevs
- dcl &f[] = shift euc jis7 ucs2 utf8 ; file charsets
- dcl &g[] = sj eu j7 uc ut ; abbrevs
- set file char shift-jis ; local file character-set is Shift-JIS
- for %i 1 fdim(&x) 1 { ; for each transfer character-set...
- set xfer char &x[%i] ; set it
- for %j 1 fdim(&f) 1 { ; for each remote file character-set...
- remote set file char &f[%j] ; set it
- if fail exit 1 SERVER REJECTED CHARSET
- send /text meibo-sj.html meibo-sj-&y[%i]-&g[%j].txt
- if fail exit 1 TRANSFER FAILED
- }
- }
- Ran this test (the source file is Shift-JIS and contains Roman, halfwidth
- Katakana, and Kanji) and inspected the results: 9 good, 6 bad:
- meibo-sj-eu-eu.txt Looks ok
- meibo-sj-eu-j7.txt Looks ok
- meibo-sj-eu-sj.txt Is OK (matches original)
- meibo-sj-eu-uc.txt BAD -- only ascii chars survived
- meibo-sj-eu-ut.txt BAD -- only ascii chars survived
- meibo-sj-uc-eu.txt Looks ok - matches meibo-sj-eu-eu.txt
- meibo-sj-uc-j7.txt BAD -- spurious ">^N" inserted everywhere
- meibo-sj-uc-sj.txt BAD -- looks like Shift-JIS with NUL between each byte
- meibo-sj-uc-uc.txt Looks ok
- meibo-sj-uc-ut.txt Looks ok
- meibo-sj-ut-eu.txt Looks ok
- meibo-sj-ut-j7.txt BAD -- Just like meibo-sj-uc-j7.txt
- meibo-sj-ut-sj.txt BAD -- Just like meibo-sj-uc-sj.txt
- meibo-sj-ut-uc.txt Looks ok
- meibo-sj-ut-ut.txt Looks ok
- This pintpoints the problem areas pretty well. These two:
- meibo-sj-eu-uc.txt BAD -- only ascii chars survived
- meibo-sj-eu-ut.txt BAD -- only ascii chars survived
- are from the new (TCS=EUC)->(FCS=Unicode) section of xpnbyte(). Problem:
- xpnbyte() isn't even being called in this case. Diagnosis: tests in decode()
- were in the wrong order. Once the code was exercised some more bugs were
- found and fixed, but there are still a couple spots where translations differ
- from (TCS=Unicode)->(FCS=Unicode). This is not so much an issue of
- translation as it is of parsing, keeping track of state, etc. So this one's
- pretty good now; we'll come back and touch it up later. New score: 11 to 4.
- These two:
- meibo-sj-uc-sj.txt BAD -- looks like Shift-JIS with NUL between each byte
- meibo-sj-ut-sj.txt BAD -- Just like meibo-sj-uc-sj.txt
- are simply forgetting to not output both bytes if the left half is empty.
- Fixed in xpnbyte(). Score: 13 to 2.
- And these two:
- meibo-sj-uc-j7.txt BAD -- spurious ">^N" inserted everywhere
- meibo-sj-ut-j7.txt BAD -- Just like meibo-sj-uc-j7.txt
- indicate a problem in the new JIS-7 constructor when it has to write out
- halfwidth Katakana. A tiny error in the state machine. Final score: 15 to 0.
- All fixes confined to ckcfns.c, 14 Oct 99.
- From Jeff: Syslogging changes for NT. ckcmai.c, 15 Oct 99.
- Remaining problems with EUC->Unicode translation fixed -- in fact they were
- already fixed yesterday; I was looking at old versions of the files.
- Now I have a good copy of the meibo file in all five character sets. This
- means I can write a new script to translate it from each Japanese character
- set to each other one, similar to the script above. But the output was too
- noisy so I made TRANSLATE suppress messages if QUIET ON. First results: 15
- bad, 10 good. Reason, there seems to be no code to handle Japanese except
- when source or target set is Unicode. Added code but the score is about the
- same. ckuus4.c, 15 Oct 99.
- From Jeff: Changed syslog to accept the Kermit message type instead of the
- Unix Syslog message type as the first parameter. The second parameter is
- whether the message indicates success (1) or (failure). This is so that the
- appropriate NT Event Log message type may be selected. SET SYSLOG added so
- the range of messages that are logged may be changed in the iksd.conf file.
- There needs to be a test applied to all SET commands that affect logs that
- restrict access to the command after a user is logged in to IKSD. ckcpro.w,
- ckuusx.c, ckuus3.c, ckcmai.c, ckufio.c, ckcdeb.h, ckuath.c, ckucmd.c,
- ckuusr.c, ckcfns.c, ckuusr.h. 17 Oct 99.
- Back to Kanji TRANSLATE... The whole business was getting way out of hand --
- too many combinations, too much duplicated code. So I junked everything so
- far and tried a simpler approach: source -> UCS2 -> target in all cases, using
- xgnbyte() to feed bytes to xpnbyte(). Now the score is 15:10. Ironed out
- some confusion over the UCS BOM, improving the score to 20:5. The bad cases
- were JIS7-to-anything-else. Found & fixed a typo in getj7(), now 25:0.
- ckuxla.c, 17 Oct 99.
- Moved j7init(), getj7(), eu_to_sj(), and sj_to_eu() out of ckcuni, since they
- have nothing to do with Unicode and can be used in non-Unicode builds.
- ckcuni.[ch], ckcxla.h, ckuxla.c, 17 Oct 99.
- But getting this working is just the first step. Now the job of cleaning up
- the #ifdefs and preserving correct TRANSLATE operation in non-UNICODE and/or
- non-KANJI builds. The first task is to make the xgnbyte()/xpnbyte() also work
- for Japanese without Unicode; this is a big plus because it turns out the
- TRANSLATE command has never worked for Japanese. (hours later...) Got
- C-Kermit to compile and link again with -DNOUNICODE. Kanji translations work
- except in the halfwidth Katakana spots. Several hours later all the
- no-Unicode combinations worked. Rebuilt with UNICODE defined; ran the
- original test, score is back down to 13:12, ugh. The good ones are (a)
- anything-to-self; (b) anything-to-Unicode. The bad ones are anything to
- Shift-JIS, JIS7, or EUC. Aha. So after one more round, these work again too.
- So now we have a workable model for multibyte/variable-byte character sets
- that can be extended to Chinese, Korean, etc.
- Added output function pointers to arg lists for pnbyte() and xpnbyte().
- ckcker.h, ckcfns.c, ckuus4.c, 18 Oct 99.
- Fixed TRANSLATE <infile> UCS2 UCS2 <outfile> to automatically swap bytes
- if <infile> is the wrong byte order. ckuus4.c, 18 Oct 99.
- Tested the following builds, adjusting #ifdefs and declarations until all
- of them were stable:
- -DUNICODE -DNOKANJI
- -DNOUNICODE -DKANJI
- -DNOCSETS (saves 350K on Sparc vs full build)
- Non-ANSI compiler: uh oh, ckcuni.c crashes the SunOS assember.
- Added -DNOUNICODE to SunOS cc targets. Also reorganized the makefile to put
- antique targets at the end, and to group the remaining targets a little
- better. Also added -DNOUNICODE to the non-antique targets that typically blow
- up when we add something new: AT&T UNIX PC, SVR3 and earlier, SV68, Xenix, and
- various small-model targets. makefile, 18 Oct 99.
- Rebuilt on Sparc and PC, and ran the file-transfer test from Sparc (BE) to
- Linux/PC (LE):
- . PC translation of incoming to EUC, JIS7, and Shift-JIS OK.
- . PC translation of incoming to UCS2 swaps bytes OK but gets bad spots.
- . PC translation of incoming to UTF8 is OK except in one case
- The UTF-8 result has all of the Kanji characters replaced by 0xEFBF, which is
- the UTF-8 translation of UCS-2 0xFFFD. This happened only when the PC was
- translating from EUC to UTF-8. It did not happen when translating to UTF-8
- from UCS-2 or UTF-8. Now, since we translate to UCS-2 first, this pretty much
- narrows the problem to xpnbyte(): EUC->UCS section. The problem: eu_to_sj()
- was using hardwired byte numbers, rather than indexing through byteorder.
- That fixed the UTF-8 problem and the UCS-2 problems. ckuxla.c, 18 Oct 99.
- Ran the exact same test (every combination of Kanji FCS and TCS) in the
- opposite direction: PC to Sparc. It worked perfectly. 18 Oct 99.
- As to TRANSMIT... Well, TRANSMIT can do with character sets only what CONNECT
- can do, and C-Kermit CONNECT doesn't handle Japanese. A major redesign and
- rewrite would be required. I think the trick would be to make ckcputc() be
- the analogue of xpnbyte() and ckcgetc() to be the equivalent of xgnbyte() (and
- added a note to this effect to ckucns.c). But this would probably be a week's
- worth of coding and testing for a feature nobody has ever asked for. So we'll
- defer Japanese character-set support in CONNECT and TRANSMIT until after 7.0.
- Updated ckermit2.txt to reflect the current and probably final state of
- affairs for Kanji and Unicode in 7.0. 18 Oct 99.