1 Description: Documentation and .ini files from ckermit-211
2 These files are not shipped with betas.
6 +++ ckermit-212/ckututor.txt
9 +C-KERMIT 8.0 UNIX MANUAL PAGE AND TUTORIAL
11 + Frank da Cruz, Christine M. Gianone
12 + [1]The Kermit Project, [2]Columbia University
14 + [ [3]PDF version ] [ [4]Nroff version ]
16 + This document is intended to give the beginner sufficient
17 + information to make basic (if not advanced) use of C-Kermit 8.0.
18 + Although it might be rather long for a Unix manual page (about 1600
19 + lines), it's still far shorter than the C-Kermit manual, which
20 + should be consulted for advanced topics such as customization,
21 + character-sets, scripting, etc. We also attempt to provide a clear
22 + structural overview of C-Kermit's many capabilities, functional
23 + areas, states, and modes and their interrelation, that should be
24 + helpful to beginners and veterans alike, as well as to those
25 + upgrading to the new release.
27 + Most recent update: 24 October 2002
28 + ________________________________________________________________________
34 + * [8]COMMAND LANGUAGE
35 + * [9]INITIALIZATION FILE
36 + * [10]MODES OF OPERATION
37 + * [11]MAKING CONNECTIONS
38 + * [12]TRANSFERRING FILES WITH KERMIT
39 + * [13]KERMIT CLIENT/SERVER CONNECTIONS
40 + * [14]KERMIT'S BUILT-IN FTP AND HTTP CLIENTS
41 + * [15]INTERNET KERMIT SERVICE
43 + * [17]ALTERNATIVE COMMAND-LINE PERSONALITIES
46 + * [20]DOCUMENTATION AND UPDATES
49 + _________________________________________________________________
51 + DESCRIPTION [ [23]Top ] [ [24]Contents ] [ [25]Next ]
53 + [26]C-Kermit is an all-purpose communications software package from
54 + the [27]Kermit Project at [28]Columbia University that:
56 + * Is portable to many platforms, Unix and non-Unix alike.
57 + * Can make both serial and network connections.
58 + * Can conduct interactive terminal sessions over its connection.
59 + * Can transfer text or binary files over the same connection.
60 + * Can convert text-file character sets in terminal mode or file
62 + * Is customizable in every aspect of its operation.
64 + C-Kermit is a modem program, a Telnet client, an Rlogin client, an FTP
65 + client, an HTTP client, and on selected platforms, also an X.25
66 + client. It can make its own secure Internet connections using
67 + IETF-approved security methods including Kerberos IV, Kerberos V,
68 + SSL/TLS, and SRP and it can also make SSH (Secure Shell) connections
69 + through your external SSH client application. It can be the far-end
70 + file-transfer or client/server partner of your desktop Kermit client.
71 + It can also accept incoming dialed and network connections. It can
72 + even be installed as an Internet service on its own standard TCP
73 + socket, 1649 [[29]RFC2839, [30]RFC2840].
75 + And perhaps most important, everything you can do "by hand"
76 + (interactively) with C-Kermit, can be "scripted" (automated) using its
77 + built-in cross-platform transport-independent script programming
78 + language, which happens to be identical to its interactive command
81 + This manual page offers an overview of C-Kermit 8.0 for Unix ("Unix"
82 + is an operating system family that includes AIX, DG/UX, FreeBSD,
83 + HP-UX, IRIX, Linux, Mac OS X, NetBSD, OpenBSD, Open Server, Open Unix,
84 + QNX, Solaris, SunOS, System V R3, System V R4, Tru64 Unix, Unixware,
85 + Xenix, and many others). For thorough coverage, please consult the
86 + published C-Kermit manual and supplements (see [31]DOCUMENTATION
87 + below). For further information about C-Kermit, Kermit software for
88 + other platforms, and Kermit manuals, visit the Kermit Project website:
90 + [32]http://www.columbia.edu/kermit/
92 + This is a longer-than-average manual page, and yet it barely scratches
93 + the surface. Don't be daunted. C-Kermit is a large and complex
94 + package, evolving over decades of practice and experience, but that
95 + doesn't mean it's hard to learn or use. Its most commonly used
96 + functions are explained here with pointers to additional information
99 + [ [33]Kermit Home ] [ [34]C-Kermit Home ] [ [35]C-Kermit FAQ ]
100 + ________________________________________________________________________
102 + SYNOPSIS [ [36]Top ] [ [37]Contents ] [ [38]Next ] [ [39]Previous ]
104 + Usage: kermit [filename] [-x arg [-x arg]...[-yyy]..] [ {=,--,+} text
108 + * -x is an option requiring an argument;
109 + * -y is an option with no argument.
111 + If the first command-line argument is the name of a file,
112 + interactive-mode commands are executed from the file. The '=' (or
113 + "--") argument tells Kermit not to parse the remainder of the command
114 + line, but to make the words following '=' available as \%1, \%2, ...
115 + \%9. The "+" argument is like "=" but for use in "kerbang scripts"
116 + (explained [40]below). A second command-line format allows the one and
117 + only argument to be a [41]Telnet, FTP, HTTP, or IKSD URL.
119 + Order of execution:
121 + 1. [42]The command file (if any).
122 + 2. [43]The initialization file, if any, unless suppressed with -Y.
123 + 3. [44]The customization file (if it is executed by the
124 + initialization file).
125 + 4. [45]The command-line URL (if any, and if so, execution stops
127 + 5. [46]Command-line options (if any).
128 + 6. [47]Interactive commands.
130 + Some command-line options can cause actions (such as -s to send a
131 + file); others just set parameters. If any action options are included
132 + on the command line, Kermit exits when finished unless also given the
133 + -S ("stay") option. If no action options are given, no initialization
134 + or command files contained an EXIT or QUIT command, and no fatal
135 + errors occurred, Kermit issues its prompt and waits for you to type
138 + Bear in mind that C-Kermit can be built with selected features
139 + disabled, and also that certain features are not available on all
140 + platforms. For example, C-Kermit can't be built with TCP/IP support
141 + on a platform that does not have TCP/IP header files and libraries
142 + (and even if Kermit does include TCP/IP support, it can't be used
143 + to make TCP/IP connections on a computer that does not have a
144 + TCP/IP stack installed). If your version of C-Kermit lacks a
145 + feature mentioned here, use its SHOW FEATURES command to see what
146 + might have been excluded.
148 + C-Kermit has three kinds of commands: regular single-letter
149 + command-line options, extended-format command-line options, and
150 + interactive commands.
152 + [ [48]Kermit Home ] [ [49]C-Kermit Home ] [ [50]C-Kermit FAQ ]
153 + ________________________________________________________________________
155 + OPTIONS [ [51]Top ] [ [52]Contents ] [ [53]Next ] [ [54]Previous ]
157 + Like most Unix commands, C-Kermit can be be given options on the
158 + command line. But C-Kermit also can be used interactively by giving it
159 + [55]commands composed of words, which are more intuitive than cryptic
160 + command-line options, and more flexible too. In other words, you don't
161 + have to use C-Kermit's command-line options, but they are available if
162 + you want to. (By the same token, you don't have to use its interactive
163 + commands either -- you can use either or both in any combination.)
165 + C-Kermit is generally installed in the PATH as "kermit", and therefore
166 + is invoked by typing the word "kermit" (lowercase) at the shell
167 + prompt, and then pressing the Return or Enter key. If you wish to
168 + include command-line options, put them after the word "kermit" but
169 + before pressing Return or Enter, separated by spaces, for example:
171 + $ kermit -s ckermit.tar.gz
173 + ('$' is the shell prompt; "kermit -s ckermit.tar.gz" is what you type,
174 + followed by Return or Enter.)
176 + Here is a list of C-Kermit's single-letter command-line options, which
177 + start with a single dash (-), in ASCII ("alphabetical") order.
178 + Alphabetic case is significant (-A is not the same as -a). The Action?
179 + column contains Y for action options and N for non-action options.
180 + Option Action? Description
181 + -0 N (digit zero) 100% transparent Connect state for "in-the-middle"
182 + operation: 8 bits, no parity, no escape character, everything passes
184 + -8 N (digit eight) Connection is 8-bit clean (this is the default in
185 + C-Kermit 8.0). Equivalent to the EIGHTBIT command, which in turn is a
186 + shortcut for SET TERMINAL BYTESIZE 8, SET COMMAND BYTESIZE 8, SET
188 + -9 arg N (digit nine) Make a connection to an FTP server. Equivalent
189 + to the FTP OPEN command.
190 + Argument: IP-address-or-hostname[:optional-TCP-port].
191 + NOTE: C-Kermit also has a separate FTP command-line personality, with
192 + regular FTP-like command-line syntax. [56]More about this below.
193 + -A N Kermit is to be started as an Internet service (IKSD) (only from
195 + -B N Kermit is running in Batch or Background (no controlling
196 + terminal). To be used in case Kermit doesn't automatically sense its
197 + background status. Equivalent to the SET BACKGROUND ON command.
198 + -C arg N Interactive-mode Commands to be executed.
199 + Argument: Commands separated by commas, list in doublequotes.
200 + -D arg N Delay before starting to send in Remote mode. Equivalent to
201 + the SET DELAY command.
202 + Argument: Number of seconds.
203 + -E N Exit automatically when connection closes. Equivalent to SET EXIT
205 + -F arg N Use an open TCP connection.
206 + Argument: Numeric file descriptor of open TCP connection.
208 + -G arg Y Get file(s) from server, send contents to standard output,
209 + which normally would be piped to another process.
210 + Argument: Remote file specification, in quotes if it contains
213 + -H N Suppress program startup Herald and greeting.
214 + -I N Tell Kermit it has a reliable connection, to force streaming to
215 + be used where it normally would not be. Equivalent to the SET RELIABLE
217 + -J arg N "Be like Telnet." Like -j but implies -E.
218 + Argument: IP hostname/address optionally followed by service.
219 + NOTE: C-Kermit also has a separate Telnet command-line personality,
220 + with regular Telnet-like command-line syntax. [57]More about this
222 + -L N Recursive directory descent for files in -s option.
223 + -M arg N My user name (for use with Telnet, Rlogin, FTP, etc).
224 + Equivalent to the SET LOGIN USER command.
225 + Argument: Username string.
226 + -O Y (Uppercase letter O) Be a server for One command only. Also see:
228 + -P N Don't convert file (Path) names of transferred files. Equivalent
229 + to SET FILE NAMES LITERAL.
230 + -Q N Quick Kermit protocol settings. Equivalent to the FAST command.
231 + This is the default in C-Kermit 7.0 and later.
232 + -R N Remote-only (this just makes IF REMOTE true).
233 + -S N Stay (enter command parser after action options).
234 + -T N Force Text mode for file transfer; implies -V. Equivalent to SET
235 + TRANSFER MODE MANUAL, SET FILE TYPE TEXT.
236 + -V N Disable automatic per-file text/binary switching. Equivalent to
237 + SET TRANSFER MODE MANUAL.
238 + -Y N Skip (don't execute) the initialization file.
239 + -a arg N As-name for file(s) in -s, -r, or -g.
240 + Argument: As-name string (alternative filename). When receiving files,
241 + this can be a directory name.
242 + -b arg N Speed for serial device. Equivalent to SET SPEED.
243 + Argument: Numeric Bits per second for serial connections.
244 + -c Y Enter Connect state before transferring files.
245 + -d N Create a debug.log file with detailed debugging information (a
246 + second -d adds timestamps). Equivalent to LOG DEBUG but takes effect
248 + -e arg N Maximum length for incoming Kermit file-transfer packets.
249 + Equivalent to SET RECEIVE PACKET-LENGTH.
250 + Argument: Length in bytes.
251 + -f Y Send a FINISH command to a Kermit server.
252 + -g arg N Get file(s) from a Kermit server.
253 + Argument: File specification on other computer, in quotes if it
254 + contains metacharacters. Equivalent to GET.
255 + Also see: -a, -G, -r.
256 + -h Y Print Help text for single-letter command-line options (pipe thru
257 + 'more' to prevent scrolling).
258 + -i N Force binary (Image) mode for file transfer; implies -V.
259 + Equivalent to SET TRANSFER MODE MANUAL, SET FILE TYPE BINARY.
260 + -j arg N Make a TCP/IP connection.
261 + Argument: IP host name/address and optional service name or number.
262 + Equivalent to the TELNET command.
264 + -k Y Receive file(s) to standard output, which normally would be piped
265 + to another process.
267 + -l arg N (Lowercase letter L) Make a connection on the given serial
268 + communications device. Equivalent to the SET LINE (SET PORT) command.
269 + Argument: Serial device name, e.g. /dev/ttyS0.
270 + -m arg N Modem type for use with the -l device. Equivalent to the SET
271 + MODEM TYPE command.
272 + Argument: Modem name as in SET MODEM TYPE command, e.g. "usrobotics".
273 + -n Y Enter Connect state after transferring files (historical).
274 + -p arg N Parity. Equivalent to the SET PARITY command.
275 + Argument: One of the following: e(ven), o(dd), m(ark), n(one),
277 + -q N Quiet (suppress most messages). Equivalent to SET QUIET ON.
278 + -r Y Receive file(s). Equivalent to the RECEIVE command.
279 + Argument: (none, but see -a)
280 + -s arg N Send file(s).
281 + Argument: One or more local file specifications. Equivalent to the
284 + -t N (Historical) Xon (Ctrl-Q) Turnaround character for half-duplex
285 + connections (used on serial linemode connections to old mainframes).
286 + Equivalent to SET DUPLEX HALF, SET HANDSHAKE XON.
287 + -v arg N Window size for Kermit protocol (ignored when streaming).
288 + Equivalanet to SET WINDOW-SIZE.
289 + Argument: Number, 1 to 32.
290 + -w N Incoming files Write over existing files. Equivalent to SET FILE
291 + COLLISION OVERWRITE.
292 + -x Y Enter server mode. Equivalent to the SERVER command. Also see:
294 + -y arg N Alternative initialization file.
295 + Argument: Filename.
296 + -z N Force foreground behavior. To be used in case Kermit doesn't
297 + automatically sense its foreground status. Equivalent to the SET
298 + BACKGROUND OFF command.
300 + Extended command-line options (necessary because single-letter ones
301 + are about used up) start with two dashes (--), with words rather than
302 + single letters as option names. If an extended option takes an
303 + argument, it is separated from the option word by a colon (:).
304 + Extended options include:
306 + --bannerfile:filename File to display upon startup or IKSD login.
307 + --cdfile:filename File to be sent for display to the client when
308 + server changes directory (filename is relative to the changed-to
310 + --cdmessage:{on,off} Enable/disable the server CD message feature.
311 + --help Prints usage message for extended options.
312 + --helpfile:filename Designates a file containing custom text to
313 + replace the top-level HELP command.
314 + --nointerrupts Disables keyboard interrupts.
315 + --noperms Disables the Kermit protocol file Permissions attribute, to
316 + prevent transmission of file permissions (protection) from sender to
319 + Plus several other [58]IKSD-Only options.
321 + See the [59]file-transfer section for examples of command-line
323 + ________________________________________________________________________
325 + COMMAND LANGUAGE [ [60]Top ] [ [61]Contents ] [ [62]Next ] [ [63]Previous ]
327 + * [64]Command Files, Macros, and Scripts
330 + C-Kermit's interactive command language is the subject of a
331 + [66]622-page book and another several hundred pages of updates, far
332 + too much for a manual page. But it's not hard to get started. At the
333 + shell prompt, just type "kermit" to get C-Kermit's interactive command
337 + (/current/directory) C-Kermit>
339 + Begin by typing "help" (and then press the Return or Enter key) for a
340 + top-level overview, read it, and go from there. Your second command
341 + should probably be "intro" (introduction). Note the prompt shows your
342 + current directory (unless you tell Kermit to prompt you with something
345 + Interactive commands are composed mainly of regular English words,
346 + usually in the form of imperative sentences, such as:
350 + which tells Kermit to send (transfer) the file whose name is oofa.txt,
353 + set transfer mode automatic
355 + which sets Kermit's "transfer mode" to "automatic" (whatever that
358 + While typing commands, you can abbreviate, ask for help (by pressing
359 + the "?" key anywhere in a command), complete keywords or filenames
360 + (with the Tab or Esc key), and edit your typing with Backspace or
361 + Delete, Ctrl-W, Ctrl-U, etc. You can also recall previous commands,
362 + save your command history, and who knows what else. Give the INTRO
363 + command for details.
365 + C-Kermit has hundreds of commands, and they can be issued in infinite
366 + variety and combinations, including commands for:
368 + * Making connections (SET LINE, DIAL, TELNET, SSH, FTP, CONNECT,
370 + * Breaking connections (HANGUP, CLOSE)
371 + * Transferring files (SEND, GET, RECEIVE, MOVE, RESEND, ...)
372 + * Establishing preferences (SET)
373 + * Displaying preferences (SHOW)
374 + * Managing local files (CD, DELETE, MKDIR, DIRECTORY, RENAME, TYPE,
376 + * Managing remote files (RCD, RDEL, RMKDIR, RDIR, ...)
377 + * Using local files (FOPEN, FCLOSE, FREAD, FWRITE)
378 + * Programming (TAKE, DEFINE, IF, FOR, WHILE, SWITCH, DECLARE, ...)
379 + * Interacting with the user (ECHO, ASK, ...)
380 + * Interacting with a remote computer (INPUT, OUTPUT, ...)
381 + * Interacting with local programs (RUN, EXEC, PTY, ...)
382 + * Logging things (LOG SESSION, LOG PACKETS, LOG DEBUG, ...)
384 + And of course QUIT or EXIT to get out and HELP to get help, and for
385 + programmers: loops, decision making, variables, arrays, associative
386 + arrays, integer and floating point arithmetic, macros, built-in and
387 + user-defined functions, string manipulation, pattern matching, block
388 + structure, scoping, recursion, and all the rest. To get a list of all
389 + C-Kermit's commands, type a question mark (?) at the prompt. To get a
390 + description of any command, type HELP followed by the name of the
391 + command, for example:
395 + The command interruption character is Ctrl-C (hold down the Ctrl key
396 + and press the C key).
398 + The command language "escape character", used to introduce variable
399 + names, function invocations, and so on, is backslash (\). If you need
400 + to include a literal backslash in a command, type two of them, e.g.:
402 + get c:\\k95\\k95custom.ini
404 + Command Files, Macros, and Scripts
406 + A file containing Kermit commands is called a Kermit command file or
407 + Kermit script. It can be executed with Kermit's TAKE command:
409 + (/current/dir) C-Kermit> take commandfile
411 + (where "commandfile" is the name of the command file). Please don't
412 + pipe a command file into Kermit's standard input (which might or might
413 + not work); if you have Kermit commands in a file, tell Kermit to TAKE
416 + In Unix only, a Kermit command file can also be executed directly by
417 + including a "kerbang" line as the first line of the file:
419 + #!/usr/local/bin/kermit +
421 + That is, a top line that starts with "#!", followed immediately by the
422 + full path of the Kermit executable, and then, if the Kermit script is
423 + to be given arguments on the command line, a space and a plus sign.
424 + The script file must also have execute permission:
426 + chmod +x commandfile
428 + Except for the " +" part, this is exactly the same as you would do for
429 + a shell script, a Perl script, etc. Here's a simple but useless
430 + example script that regurgitates its arguments (up to three of them):
432 + #!/usr/local/bin/kermit +
433 + if defined \%1 echo "Argument 1: \%1"
434 + if defined \%2 echo "Argument 2: \%2"
435 + if defined \%3 echo "Argument 3: \%3"
436 + if defined \%4 echo "etc..."
439 + If this file is stored in your current directory as "commandfile",
442 + ./commandfile one two three four five
451 + This illustrates the basic structure of a standalone Kermit script:
452 + the "kerbang line", then some commands. It should end with "exit"
453 + unless you want the Kermit prompt to appear when it is finished. \%1
454 + is the first argument, \%2 the second, and so on.
456 + You can also create your own commands by defining named macros
457 + composed of other Kermit commands (or macros). Here's a simple
461 + set modem type usrobotics
462 + set port /dev/ttyS0
469 + This shows how you can combine many commands into one command,
470 + "mydial" in this case (you can use any name you like, provided it does
471 + not clash with the name of a built-in command). When this macro
472 + definition is in effect, you can type commands like:
476 + and it executes all the commands in macro definition, substituting the
477 + first operand ("7654321") for the formal parameter ("\%1") in the
478 + definition. This saves you from having to type lots of commands every
479 + time you want to make a modem call.
481 + One way to have the macro definition in effect is to type the
482 + definition at the Kermit prompt. Another way is to store the
483 + definition in a file and TAKE the file. If you want the the definition
484 + to be in effect automatically every time you start Kermit, put the
485 + definition in your initialization or customization file (explained
488 + Here's a somewhat more ambitious example:
492 + assign trash \v(home)trashcan/
493 + if not defined \%1 end 1 "Delete what?"
494 + if wild \%1 end 1 "Deleting multiple files is too scary"
495 + if not exist \%1 end 1 "I can't find \%1"
496 + if not directory \m(trash) {
498 + if fail end 1 "No trash can"
500 + rename /list \%1 \m(trash)
502 + define myundelete {
504 + assign trash \v(home)trashcan/
505 + if not defined \%1 end 1 "Undelete what?"
506 + if wild \%1 end 1 "Undeleting multiple files is too hard"
507 + if not directory \m(trash) end 1 "No trash can"
508 + if not exist \m(trash)\%1 end 1 "I can't find \%1 in trash can"
509 + rename /list \m(trash)\%1 .
512 + These macros are not exactly production quality (they don't handle
513 + filenames that include path segments, they don't handle multiple
514 + files, etc), but you get the idea: you can pass arguments to macros,
515 + they can check them and make other kinds of decisions, and the
516 + commands themselves are relatively intuitive and intelligible.
518 + If you put the above lines into your initialization or customization
519 + file, you'll have MYDELETE and MYUNDELETE commands available every
520 + time you start Kermit, at least as long as you don't suppress
521 + execution of the initialization file. (Exercise for the reader: Make
522 + these macros generally useful: remove limitations, add trashcan
523 + display, browsing, emptying, etc.)
525 + Kerbang scripts execute without the initialization file. This to keep
526 + them portable and also to make them start faster. If you want to write
527 + Kerbang scripts that depend on the initialization file, include the
530 + take \v(home).kermrc
532 + at the desired spot in the script. By the way, \v(xxx) is a built-in
533 + variable (xxx is the variable name, "home" in this case). To see what
534 + built-in variables are available, type "show variables" at the
535 + C-Kermit prompt. To see what else you can show, type "show ?". \m(xxx)
536 + is a user defined variable (strictly speaking, it is a macro used as a
541 + C-Kermit has more than 200 top-level commands, and some of these, such
542 + as SET, branch off into hundreds of subcommands of their own, so it's
543 + not practical to describe them all here. Instead, here's a concise
544 + list of the most commonly used top-level commands, grouped by
545 + category. To learn about each command, type "help" followed by the
546 + command name, e.g. "help set". Terms such as Command state and Connect
547 + state are explained in subsequent sections.
549 + Optional fields are shown in [ italicized brackets ]. filename means
550 + the name of a single file. filespec means a file specification that is
551 + allowed to contain wildcard characters like '*' to match groups of
552 + files. options are (optional) switches like /PAGE, /NOPAGE, /QUIET,
553 + etc, listed in the HELP text for each command. Example:
555 + send /recursive /larger:10000 /after:-1week /except:*.txt *
557 + which can be read as "send all the files in this directory and all the
558 + ones underneath it that are larger than 10000 bytes, no more than one
559 + week old, and whose names don't end with ".txt".
562 + HELP Requests top-level help.
563 + HELP command Requests help about the given command.
564 + INTRODUCTION Requests a brief introduction to C-Kermit.
565 + LICENSE Displays the C-Kermit software copyright and license.
566 + VERSION Displays C-Kermit's version number.
567 + EXIT [ number ] Exits from Kermit with the given status code.
568 + Synonyms: QUIT, E, Q.
569 + TAKE filename [ parameters... ] Executes commands from the
571 + LOG item [ filename ] Keeps a log of the given item in the
573 + [ DO ] macro [ parameters... ] Executes commands from the
575 + SET parameter value Sets the given parameter to the given
577 + SHOW category Shows settings in a given category.
578 + STATUS Tells whether previous command succeeded or failed.
579 + DATE [ date-and/or-time ] Shows current date-time or interprets
581 + RUN [ extern-command [ parameters... ] Runs the given external
582 + command. Synonym: !.
583 + EXEC [ extern-command [ params... ] Kermit overlays itself with
585 + SUSPEND Stops Kermit and puts it in the background. Synonym: Z.
587 + Local File Management
588 + TYPE [ options ] filename Displays the contents of the given
590 + MORE [ options ] filename Equivalent to TYPE /PAGE (pause after
592 + CAT [ options ] filename Equivalent to TYPE /NOPAGE.
593 + HEAD [ options ] filename Displays the first few lines of a
595 + TAIL [ options ] filename Displays the last few lines of a
597 + GREP [ options ] pattern filespec Displays lines from files
598 + that match the pattern. Synonym: FIND.
599 + DIRECTORY [ options ] [ filespec ] Lists files (built-in, many
601 + LS [ options ] [ filespec ] Lists files (runs external "ls"
603 + DELETE [ options ] [ filespec ] Deletes files. Synonym: RM.
604 + PURGE [ options ] [ filespec ] Removes backup (*.~n~) files.
605 + COPY [ options ] [ filespecs... ] Copies files. Synonym: CP.
606 + RENAME [ options ] [ filespecs... ] Renames files. Synonym: MV.
607 + CHMOD [ options ] [ filespecs... ] Changes permissions of
609 + TRANSLATE filename charsets filename ] Converts file's
610 + character set. Synonym: XLATE.
611 + CD Changes your working directory to your home directory.
612 + CD directory Changes your working directory to the one given.
613 + CDUP Changes your working directory one level up.
614 + PWD Displays your working directory.
615 + BACK Returns to your previous working directory.
616 + MKDIR [ directory ] Creates a directory.
617 + RMDIR [ directory ] Removes a directory.
620 + SET LINE [ options ] devicename Opens the named serial
621 + port. Synonym: SET PORT.
622 + OPEN LINE [ options ] devicename Same as SET LINE. Synonym:
624 + SET MODEM TYPE [ name ] Tells Kermit what kind of modem is on
626 + DIAL [ number ] Tells Kermit to dial the given phone number
628 + REDIAL Redials the most recently dialed phone number.
629 + ANSWER Waits for and answers an incoming call on the modem.
630 + AUTHENTICATE [ parameters... ] Performs secure authentication
631 + on a TCP/IP connection.
632 + SET NETWORK TYPE { TCP/IP, X.25, ... } Selects network type for
633 + subsequent SET HOST commands.
634 + SET HOST [ options ] host [ port ] Opens a network connection
635 + to the given host and port.
636 + SET HOST [ options ] * port Waits for an incoming TCP/IP
637 + connection on the given port.
638 + TELNET [ options ] host Opens a Telnet connection to the host
639 + and enters Connect state.
640 + RLOGIN [ options ] host Opens an Rlogin connection to the host
641 + and enters Connect state.
642 + IKSD [ options ] host Opens a connection to an Internet Kermit
644 + SSH [ options ] host Opens an SSH connection to the host and
645 + enters Connect state.
646 + FTP OPEN host [ options ] Opens an FTP connection to the host.
647 + HTTP [ options ] OPEN host Opens an HTTP connection to the
649 + PTY external-command Runs the command on a pseudoterminal as if
650 + it were a connection.
651 + PIPE external-command Runs the command through a pipe as if it
655 + CONNECT [ options ] Enters Connect
656 + (terminal) state. Synonym: C.
657 + REDIRECT command Redirects the given external command over the
659 + TELOPT command Sends a Telnet protocol command (Telnet
661 + Ctrl-\C "Escapes back" from Connect state to Command state.
662 + Ctrl-\B (In Connect state) Sends a BREAK signal (serial or
664 + Ctrl-\! (In Connect state) Enters inferior shell; "exit" to
666 + Ctrl-\? (In Connect state) Shows a menu of other escape-level
668 + Ctrl-\Ctrl-\ (In Connect state) Type two Ctrl-Backslashes to
670 + SET ESCAPE [ character ] Changes Kermit's Connect-state escape
673 + Closing Connections
674 + HANGUP Hangs up the currently open serial-port or network
676 + CLOSE Closes the currently open serial-port or network
678 + SET LINE (with no devicename) Closes the currently
679 + open serial-port or network connection.
680 + SET HOST (with no hostname) Closes the currently open
681 + serial-port or network connection.
682 + FTP CLOSE Closes the currently open FTP connection.
683 + HTTP CLOSE Closes the currently open HTTP connection.
684 + EXIT Also closes all connections. Synonym: QUIT.
685 + SET EXIT WARNING OFF Suppresses warning about open connections
689 + SEND [ options ] filename [ as-name ] Sends the given file.
691 + SEND [ options ] filespec Sends all files that match.
692 + RESEND [ options ] filespec Resumes an interupted SEND from the
694 + RECEIVE [ options ] [ as-name ] Waits passively for files to
695 + arrive. Synonym: R.
696 + LOG TRANSACTIONS [ filename ] Keeps a record of file transfers.
697 + FAST Use fast file-transfer settings (default).
698 + CAUTIOUS Use cautious and less fast file-transfer settings.
699 + ROBUST Use ultra-conservative and slow file-transfer settings.
700 + STATISTICS [ options ] Gives statistics about the most recent
702 + WHERE After transfer: "Where did my files go?".
703 + TRANSMIT [ options ] [ filename ] Sends file without protocol.
705 + LOG SESSION [ filename ] Captures remote text or files without
707 + SET PROTOCOL [ name... ] Tells Kermit to use an external
708 + file-transfer protocol.
709 + FTP { PUT, MPUT, GET, MGET, ... } FTP client commands.
710 + HTTP { PUT, GET, HEAD, POST, ... } HTTP client commands.
713 + ENABLE, DISABLE Controls which features
714 + can be used by clients.
715 + SET SERVER Sets parameters prior to entering Server state.
716 + SERVER Enters Server state.
718 + Client of Kermit or FTP Server
719 + [ REMOTE ] LOGIN [ user password ] Logs in to a Kermit server
720 + or IKSD that requires it.
721 + [ REMOTE ] LOGOUT Logs out from a Kermit server or IKSD.
722 + SEND [ options ] filename [ as-name ] Sends the given file to
723 + the server. Synonyms: S, PUT.
724 + SEND [ options ] filespec Sends all files that match.
725 + RESEND [ options ] filespec Resumes an interupted SEND from the
727 + GET [ options ] remote-filespec Asks the server to send the
728 + given files. Synonym: G.
729 + REGET [ options ] remote-filespec Resumes an interrupted GET
730 + from the point of failure.
731 + REMOTE CD [ directory ] Asks server to change its working
732 + directory. Synonym: RCD.
733 + REMOTE PWD [ directory ] Asks server to display its working
734 + directory. Synonym: RPWD.
735 + REMOTE DIRECTORY [ filespec... ] Asks server to send a
736 + directory listing. Synonym: RDIR.
737 + REMOTE DELETE [ filespec... ] Asks server to delete files.
739 + REMOTE [ command... ] (Many other commands: "remote ?" for a
741 + MAIL [ options ] filespec Sends file(s) to be delivered as
742 + e-mail (Kermit only).
743 + FINISH Asks the server to exit server state (Kermit only).
744 + BYE Asks the server to log out and close the connection.
747 + DEFINE, DECLARE, UNDEFINE, UNDECLARE, ASSIGN, EVALUATE,
748 + SEXPRESSION, ARRAY, SORT, INPUT, OUTPUT, IF, FOR, WHILE,
749 + SWITCH, GOTO, ECHO, ASK, GETC, GETOK, ASSERT, WAIT, SLEEP,
750 + FOPEN, FREAD, FWRITE, FCLOSE, STOP, END, RETURN, LEARN, SHIFT,
751 + TRACE, VOID, INCREMENT, DECREMENT, ... For these and many more
752 + you'll need to consult the [68]manual and supplements, and/or
753 + visit the [69]Kermit Script Library, which also includes a
754 + brief tutorial. Hint: HELP LEARN to find out how to get Kermit
755 + to write simple scripts for you.
757 + Many of Kermit's commands have synonyms, variants, relatives, and so
758 + on. For example, MSEND is a version of SEND that accepts a list of
759 + file specifications to be sent, rather than just one file
760 + specification, and MPUT is a synonym of MSEND. MOVE means to SEND and
761 + then DELETE the source file if successful. MMOVE is like MOVE, but
762 + accepts a list of filespecs, and so on. These are described in the
763 + [70]full documentation.
765 + Use question mark to feel your way through an unfamiliar command, as
766 + in this example (the part you type is underlined):
768 + C-Kermit> remote ? One of the following:
769 + assign delete help login print rename space
770 + cd directory host logout pwd rmdir type
771 + copy exit kermit mkdir query set who
772 + C-Kermit> remote set ? One of the following:
773 + attributes file retry transfer
774 + block-check receive server window
775 + C-Kermit> remote set file ? One of the following:
776 + character-set incomplete record-length
777 + collision names type
778 + C-Kermit> remote set file names ? One of the following:
780 + C-Kermit> remote set file names literal
783 + This is called menu on demand: you get a menu when you want one, but
784 + menus are not forced on you even when know what you're doing. Note
785 + that you can also abbreviate most keywords, and you can complete them
786 + with the Tab or Esc key. Also note that ? works for filenames too, and
787 + that you can use it in the middle of a keyword or filename, not just
788 + at the beginning. For example, "send x?" lists all the files in the
789 + current directory whose names start with 'x'.
791 + [ [71]Kermit Home ] [ [72]C-Kermit Home ] [ [73]C-Kermit FAQ ]
792 + ________________________________________________________________________
794 + INITIALIZATION FILE [ [74]Top ] [ [75]Contents ] [ [76]Next ] [ [77]Previous
797 + In its default configuration, C-Kermit executes commands from a file
798 + called .kermrc in your home directory when it starts, unless it is
799 + given the -Y or -y command-line option. Custom configurations might
800 + substitute a shared system-wide initialization file. The SHOW FILE
801 + command tells what initialization file, if any, was used. The standard
802 + initialization file "chains" to an individual customization file,
803 + .mykermc, in the home directory, in which each user can establish
804 + her/his own preferences, define macros, and so on.
806 + Since execution of the initialization file (at least the standard one)
807 + makes C-Kermit take longer to start, it might be better not to have an
808 + initialization file, especially now that Kermit's default startup
809 + configuration is well attuned to modern computing and networking -- in
810 + other words, you no longer have do anything special to make Kermit
811 + transfers go fast. So instead of having an initialization file that is
812 + executed every time Kermit starts, you might consider making one or
813 + more kerbang scripts (with names other that .kermrc) that do NOT
814 + include an "exit" command, and invoke those when you need the
815 + settings, macro definitions, and/or scripted actions they contain, and
816 + invoke C-Kermit directly when you don't.
818 + To put it another way... We still distribute the standard
819 + initialization file since it's featured in the manual and backwards
820 + compatibility is important to us. But there's no harm in not using it
821 + if you don't need the stuff that's in it (services directory, dialing
822 + directory, network directory, and associated macro definitions). On
823 + the other hand, if there are settings or macros you want in effect
824 + EVERY time you use Kermit, the initialization file (or the
825 + customization file it chains to) is the place to put them, because
826 + that's the only place Kermit looks for them automatically each time
829 + [ [78]Kermit Home ] [ [79]C-Kermit Home ] [ [80]C-Kermit FAQ ]
830 + ________________________________________________________________________
832 + MODES OF OPERATION [ [81]Top ] [ [82]Contents ] [ [83]Next ] [ [84]Previous ]
834 + Kermit is said to be in Local mode if it has made a connection to
835 + another computer, e.g. by dialing it or establishing a Telnet
836 + connection to it. The other computer is remote, so if you start
837 + another copy of Kermit on the remote computer, it is said to be in
838 + Remote mode (as long as it has not made any connections of its own).
839 + The local Kermit communicates over the communications device or
840 + network connection, acting as a conduit between the the remote
841 + computer and your keyboard and screen. The remote Kermit is the
842 + file-transfer partner to the local Kermit and communicates only
843 + through its standard input and output.
845 + At any moment, a Kermit program can be in any of the following states.
846 + It's important to know what they are and how to change from one to the
851 + In this state, Kermit reads commands from:
853 + + Your keyboard; or:
855 + + A macro definition.
857 + You can exit from Command state back to Unix with the EXIT or
858 + QUIT command (same thing). You can enter Connect state with any
859 + of various commands (CONNECT, DIAL, TELNET, etc). You can enter
860 + file transfer state with commands like SEND, RECEIVE, and GET.
861 + You can enter Server state with the SERVER command. The TAKE
862 + command tells Kermit to read and execute commands from a file.
863 + The (perhaps implied) DO command tells Kermit to read and
864 + execute commands from a macro definition. While in Command
865 + state, you can interrupt any command, macro, or command file by
866 + typing Ctrl-C (hold down the Ctrl key and press the C key);
867 + this normally brings you back to the prompt.
871 + You can invoke an inferior shell or external command from the
872 + Kermit command prompt by using the PUSH, RUN (!), EDIT, or
873 + BROWSE command. While the inferior shell or command is active,
874 + Kermit is suspended and does nothing. Return to Kermit Command
875 + state by exiting from the inferior shell or application.
879 + In this state, which can be entered only when in Local mode
880 + (i.e. when Kermit has made a connection to another computer),
881 + Kermit is acting as a terminal to the remote computer. Your
882 + keystrokes are sent to the remote computer and characters that
883 + arrive over the communication connection are displayed on your
884 + screen. This state is entered when you give a CONNECT, DIAL,
885 + TELNET, RLOGIN, or IKSD command. You can return to command
886 + state by logging out of the remote computer, or by typing:
890 + That is: Hold down the Ctrl key and press the backslash key,
891 + then let go of the Ctrl key and press the C key. This is called
892 + escaping back. Certain other escape-level commands are also
893 + provided; type Ctrl-\? for a list. For example, you can enter
898 + To send a Ctrl-\ to the host while in Connect state, type two
899 + of them in a row. See HELP CONNECT and HELP SET ESCAPE for more
902 + Local file-transfer state
904 + In this state, Kermit is sending packets back and forth with
905 + the other computer in order to transfer a file or accomplish
906 + some other file-related task. And at the same time, it is
907 + displaying its progress on your screen and watching your
908 + keyboard for interruptions. In this state, the following
909 + single-keystroke commands are accepted:
911 + X Interrupt the current file and go on to the next (if any).
912 + Z Interrupt the current file and skip all the rest.
913 + E Like Z but uses a "stronger" protocol (use if X or Z don't
915 + Ctrl-C Interrupt file-transfer mode (use if Z or E don't
918 + Kermit returns to its previous state (Command or Connect) when
919 + the transfer is complete or when interrupted successfully by X,
920 + Z, E, or Ctrl-C (hold down the Ctrl key and press the C key).
922 + Remote file-transfer state
924 + In this state, Kermit is exchanging file-transfer packets with
925 + its local partner over its standard i/o. It leaves this state
926 + automatically when the transfer is complete. In case you find
927 + your local Kermit in Connect state and the remote one in
928 + File-transfer state (in which it seems to ignore your
929 + keystrokes), you can usually return it to command state by
930 + typing three Ctrl-C's in a row. If that doesn't work, return
931 + your local Kermit to Command state (Ctrl-\ C) and type
932 + "e-packet" and then press the Return or Enter key; this forces
933 + a fatal Kermit protocol error.
935 + Remote Server state
937 + This is like Remote File-transfer state, except it never
938 + returns automatically to Command state. Rather, it awaits
939 + further instructions from the client program; that is, from
940 + your Local Kermit program. You can return the Remote Server to
941 + its previous state by issuing a "finish" command to the client,
942 + or if you are in Connect state, by typing three Ctrl-C's in a
943 + row. You can tell the server job to log out and break the
944 + connection by issuing a "bye" command to the client.
948 + Like Remote-Server state, but in local mode, and therefore with
949 + its file-transfer display showing, and listening for single-key
950 + commands, as in Local File-transfer state. Usually this state
951 + is entered automatically when a remote Kermit program gives a
954 + C-Kermit, Kermit 95, and MS-DOS Kermit all can switch automatically
955 + from Connect state to Local File-transfer state when you initiate a
956 + file transfer from the remote computer by starting Kermit and telling
957 + it to send or get a file, in which case, Connect state is
958 + automatically resumed after the file transfer is finished.
960 + Note that C-Kermit is not a terminal emulator. It is a communications
961 + application that you run in a terminal window (e.g. console or Xterm).
962 + The specific emulation, such as VT100, VT220, Linux Console, or Xterm,
963 + is provided by the terminal window in which you are running C-Kermit.
964 + Kermit 95 and MS-DOS Kermit, on the other hand, are true terminal
965 + emulators. Why is C-Kermit not a terminal emulator? [85]CLICK HERE to
968 + [ [86]Kermit Home ] [ [87]C-Kermit Home ] [ [88]C-Kermit FAQ ]
969 + ________________________________________________________________________
971 + MAKING CONNECTIONS [ [89]Top ] [ [90]Contents ] [ [91]Next ] [ [92]Previous ]
973 + Here is how to make different kinds of connections using interactive
974 + Kermit commands (as noted above, you can also make connections with
975 + command-line options). Note that you don't have to make connections
976 + with Kermit. It can also be used on the far end of a connection as the
977 + remote file transfer and management partner of your local
978 + communications software.
980 + Making a Telnet Connection
982 + At the C-Kermit command prompt, simply type:
984 + telnet foo.bar.com ; Substitute desired host name or address.
985 + telnet xyzcorp.com 3000 ; You can also include a port number.
987 + If the connection is successful, Kermit automically enters
988 + Connect state. When you logout from the remote host, Kermit
989 + automatically returns to its prompt. More info: HELP TELNET,
990 + HELP SET TELNET, HELP SET TELOPT. Also see the [93]IKSD section
993 + Making an Rlogin connection
995 + This is just like Telnet, except you have to be root to do it
996 + because Rlogin uses a privileged TCP port:
998 + rlogin foo.bar.com ; Substitute desired host name or address.
1000 + More info: HELP RLOGIN.
1002 + Making an SSH Connection
1004 + Unlike Telnet and Rlogin, SSH connections are not built-in, but
1005 + handled by running your external SSH client through a
1006 + pseudoterminal. Using C-Kermit to control the SSH client gives
1007 + you all of Kermit's features (file transfer, character-set
1008 + conversion, scripting, etc) over SSH.
1010 + ssh foo.bar.com ; Substitute desired host name or address.
1012 + More info: HELP SSH, HELP SET SSH.
1014 + Dialing with a Modem
1016 + If it's an external modem, make sure it is connected to a
1017 + usable serial port on your computer with a regular
1018 + (straight-through) modem cable, and to the telephone jack with
1019 + a telephone cable, and that it's turned on. Then use these
1022 + set modem type usrobotics ; Or other supported type
1023 + set line /dev/ttyS0 ; Specify device name
1024 + set speed 57600 ; Or other desired speed
1025 + set flow rts/cts ; Most modern modems support this
1026 + set dial method tone ; (or pulse)
1027 + dial 7654321 ; Dial the desired number
1029 + Type "set modem type ?" for a list of supported modem types. If
1030 + you omit the SET MODEM TYPE command, the default type is
1031 + "generic-high-speed", which should work for most modern
1032 + AT-command-set modems. If the line is busy, Kermit redials
1033 + automatically. If the call does not succeed, use "set dial
1034 + display on" and try it again to watch what happens. If the call
1035 + succeeds, Kermit enters Connect state automatically and returns
1036 + to its prompt automatically when you log out from the remote
1037 + computer or the connection is otherwise lost.
1039 + You can also dial from a modem that is accessible by Telnet,
1040 + e.g. to a reverse terminal server. In this case the command
1043 + set host ts.xxx.com 2000 ; Terminal-server and port
1044 + set modem type usrobotics ; Or other supported type
1045 + set dial method tone ; (or pulse)
1046 + dial 7654321 ; Dial the desired number
1048 + If the terminal server supports the Telnet Com Port Option,
1049 + [94]RFC 2217, you can also give serial-port related commands
1050 + such as SET SPEED, SET PARITY, and so on, and Kermit relays
1051 + them to the terminal server using the protocol specified in the
1054 + More info: HELP SET MODEM, HELP SET LINE, HELP SET SPEED, HELP
1055 + SET FLOW, HELP DIAL, HELP SET DIAL, HELP SET MODEM, HELP SET
1056 + CARRIER-WATCH, SHOW COMMUNICATIONS, SHOW MODEM, SHOW DIAL.
1058 + Direct Serial Port
1060 + Connect the two computers, A and B, with a null modem cable (or
1061 + two modem cables interconnected with a null-modem adapter or
1062 + modem eliminator). From Computer A:
1064 + set modem type none ; There is no modem
1065 + set line /dev/ttyS0 ; Specify device name
1066 + set carrier-watch off ; If DTR and CD are not cross-connected
1067 + set speed 57600 ; Or other desired speed
1068 + set flow rts/cts ; If RTS and CTS are cross-connected
1069 + set flow xon/xoff ; If you can't use RTS/CTS
1070 + set parity even ; (or "mark" or "space", if necessary)
1071 + set stop-bits 2 ; (rarely necessary)
1072 + connect ; Enter Connect (terminal) state
1074 + This assumes Computer B is set up to let you log in. If it
1075 + isn't, you can run a copy of Kermit on Computer B and follow
1076 + approximately the same directions. More info: As above plus
1079 + With modems or direct serial connections, you might also have to "set
1080 + parity even" (or "mark" or "space") if it's a 7-bit connection.
1082 + Of the connection types listed above, only one can be open at a time.
1083 + However, any one of these can be open concurrently with an [95]FTP or
1084 + HTTP session. Each connection type can be customized to any desired
1085 + degree, scripted, logged, you name it. See the manual.
1087 + NOTE: On selected platforms, C-Kermit also can make X.25 connections.
1088 + See the manual for details.
1090 + [ [96]Kermit Home ] [ [97]C-Kermit Home ] [ [98]C-Kermit FAQ ]
1091 + ________________________________________________________________________
1093 + TRANSFERRING FILES WITH KERMIT [ [99]Top ] [ [100]Contents ] [ [101]Next ] [
1096 + * [103]Downloading Files
1097 + * [104]Uploading Files
1098 + * [105]Kermit Transfers the Old-Fashioned Way
1099 + * [106]If File Transfer Fails
1100 + * [107]Advanced Kermit File Transfer Features
1101 + * [108]Non-Kermit File Transfer
1103 + There is a [109]widespread and persistent belief that Kermit is a slow
1104 + protocol. This is because, until recently, it used conservative tuning
1105 + by default to make sure file transfers succeeded, rather than failing
1106 + because they overloaded the connection. Some extra commands (or
1107 + command-line options, like -Q) were needed to make it go fast, but
1108 + nobody bothered to find out about them. Also, it takes two to tango:
1109 + most non-Kermit-Project Kermit protocol implementations really ARE
1110 + slow. The best file-transfer partners for C-Kermit are: another copy
1111 + of [110]C-Kermit (7.0 or later) and [111]Kermit 95. These combinations
1112 + work well and they work fast by default. MS-DOS Kermit is good too,
1113 + but you have to tell it to go fast (by giving it the FAST command).
1115 + Furthermore, all three of these Kermit programs support "autodownload"
1116 + and "autoupload", meaning that when they are in Connect state and a
1117 + Kermit packet comes in from the remote, they automatically switch into
1118 + file transfer mode.
1120 + And plus, C-Kermit and K95 also switch automatically between text and
1121 + binary mode for each file, so there is no need to "set file type
1122 + binary" or "set file type text", or to worry about files being
1123 + corrupted because they were transferred in the wrong mode.
1125 + What all of these words add up to is that now, when you use up-to-date
1126 + Kermit software from the Kermit Project, file transfer is not only
1127 + fast, it's ridiculously easy. You barely have to give any commands at
1132 + Let's say you have [112]Kermit 95, [113]C-Kermit, or
1133 + [114]MS-DOS Kermit on your desktop computer, with a connection
1134 + to a Unix computer that has C-Kermit installed as "kermit". To
1135 + download a file (send it from Unix to your desktop computer),
1136 + just type the following command at your Unix shell prompt:
1138 + kermit -s oofa.txt
1140 + (where oofa.txt is the filename). If you want to send more than
1141 + one file, you can put as many filenames as you want on the
1142 + command line, and they can be any combination of text and
1145 + kermit -s oofa.txt oofa.zip oofa.html oofa.tar.gz
1147 + and/or you can use wildcards to send groups of files:
1151 + If you want to send a file under an assumed name, use:
1153 + kermit -s friday.txt -a today.txt
1155 + This sends the file friday.txt but tells the receiving Kermit
1156 + that its name is today.txt. In all cases, as noted, when the
1157 + file transfer is finished, your desktop Kermit returns
1158 + automatically to Connect state. No worries about escaping back,
1159 + re-connecting, text/binary mode switching. Almost too easy,
1164 + To upload files (send them from your desktop computer to the
1165 + remote Unix computer) do the same thing, but use the -g (GET)
1166 + option instead of -s:
1168 + kermit -g oofa.txt
1170 + This causes your local Kermit to enter server mode; then the
1171 + remote Kermit program requests the named file and the local
1172 + Kermit sends it and returns automatically to Connect state when
1175 + If you want to upload multiple files, you have have use shell
1176 + quoting rules, since these aren't local files:
1178 + kermit -g "oofa.txt oofa.zip oofa.html oofa.tar.gz"
1179 + kermit -g "oofa.*"
1181 + If you want to upload a file but store it under a different
1184 + kermit -g friday.txt -a today.txt
1186 + Kermit Transfers the Old-Fashioned Way
1188 + If your desktop communications software does not support
1189 + autoupload or autodownload, or it does not include Kermit
1190 + server mode, the procedure requires more steps.
1192 + To download a file, type:
1194 + kermit -s filename
1196 + on the host as before, but if nothing happens automatically in
1197 + response to this command, you have to switch your desktop
1198 + communications software into Kermit Receive state. This might
1199 + be done by escaping back using keyboard characters or hot keys
1200 + (Alt-x is typical) and/or with a command (like RECEIVE) or a
1201 + menu. When the file transfer is complete, you have to go back
1202 + to Connect state, Terminal emulation, or whatever terminology
1203 + applies to your desktop communications software.
1205 + To upload a file, type:
1209 + on the host (rather than "kermit -g"). This tells C-Kermit to
1210 + wait passively for a file to start arriving. Then regain the
1211 + attention of your desktop software (Alt-x or whatever) and
1212 + instruct it to send the desired file(s) with Kermit protocol.
1213 + When the transfer is finished, return to the Connect or
1216 + If File Transfer Fails
1218 + Although every aspect of Kermit's operation can be finely
1219 + tuned, there are also three short and simple "omnibus tuning"
1220 + commands you can use for troubleshooting:
1223 + Use fast file-transfer settings. This has been the
1224 + default since C-Kermit 7.0 now that most modern computers
1225 + and connections support it. If transfers fail with fast
1226 + settings, try . . .
1229 + Use cautious but not paranoid settings. File transfers,
1230 + if they work, will go at medium speed. If not, try . . .
1233 + Use the most robust, resilient, conservative, safe, and
1234 + reliable settings. File transfers will almost certainly
1235 + work, but they will be quite slow (of course this is a
1236 + classic tradeoff; ROBUST was C-Kermit's default tuning in
1237 + versions 6.0 and earlier, which made everybody think
1238 + Kermit protocol was slow). If ROBUST doesn't do the
1239 + trick, try again with SET PARITY SPACE first in case it's
1240 + not an 8-bit connection.
1242 + Obviously the success and performance of a file transfer also
1243 + depends on C-Kermit's file transfer partner. Up-to-date, real
1244 + [115]Kermit Project partners are recommended because they
1245 + contain the best Kermit protocol implementations and because
1246 + [116]we can support them in case of trouble.
1248 + If you still have trouble, consult Chapter 10 of [117]Using
1249 + C-Kermit, or send email to [118]kermit-support@columbia.edu.
1251 + Advanced Kermit File-Transfer Features
1253 + Obviously there is a lot more to Kermit file transfer,
1254 + including all sorts of interactive commands, preferences,
1255 + options, logging, debugging, troubleshooting, and anything else
1256 + you can imagine but that's what the [119]manual and updates are
1257 + for. Here are a few topics you can explore if you're interested
1258 + by Typing HELP for the listed commands:
1260 + Logging transfers:
1261 + LOG TRANSACTIONS (HELP LOG)
1263 + Automatic per-file text/binary mode switching:
1264 + SET TRANSFER MODE { AUTOMATIC, MANUAL } (HELP SET
1267 + Cross-platform recursive directory tree transfer:
1268 + SEND /RECURSIVE, GET /RECURSIVE (HELP SEND, HELP GET).
1270 + File collision options:
1271 + SET FILE COLLISION { OVERWRITE, BACKUP, DISCARD, ... }
1274 + Update mode (only transfer files that changed since last time):
1275 + SET FILE COLLISION UPDATE (HELP SET FILE).
1277 + Filename selection patterns:
1280 + Flexible file selection:
1281 + SEND (or GET) /BEFORE /AFTER /LARGER /SMALLER /TYPE
1284 + Character-set conversion:
1285 + SET { FILE, TRANSFER } CHARACTER-SET, ASSOCIATE, ...
1287 + File/Pathname control:
1288 + SET { SEND, RECEIVE } PATHNAMES, SET FILE NAMES.
1290 + Atomic file movement:
1291 + SEND (or GET) /DELETE /RENAME /MOVE-TO
1293 + Transferring to/from standard i/o of other commands:
1294 + SEND (or GET) /COMMAND
1296 + Recovery of interrupted transfer from point of failure:
1297 + RESEND, REGET (HELP RESEND, HELP REGET).
1299 + Non-Kermit File Transfer
1301 + You can also use C-Kermit to transfer files with FTP or HTTP
1302 + Internet protocols; [120]see below.
1304 + On a regular serial or Telnet connection where the other
1305 + computer doesn't support Kermit protocol at all, you have
1306 + several options. For example, if your desktop communications
1307 + software supports Zmodem, use "rz" and "sz" on the host rather
1308 + than Kermit. But if Kermit is your desktop software, and you
1309 + are using it to make calls or network connections to other
1310 + computers that don't support Kermit protocol (or that don't
1311 + have a good implementation of it), then if your computer also
1312 + has external X, Y, or Zmodem programs that are redirectable,
1313 + Kermit can use them as external protocols. HELP SET PROTOCOL
1316 + You can also capture "raw" data streams from the other computer
1317 + with LOG SESSION (HELP LOG and HELP SET SESSION-LOG for
1318 + details), and you can upload files without any protocol at all
1319 + with TRANSMIT (HELP TRANSMIT, HELP SET TRANSMIT).
1321 + [ [121]Kermit Home ] [ [122]C-Kermit Home ] [ [123]C-Kermit FAQ ]
1322 + ________________________________________________________________________
1324 + KERMIT CLIENT/SERVER CONNECTIONS [ [124]Top ] [ [125]Contents ] [ [126]Next ]
1327 + On any kind of connection you can make with Kermit -- serial, TCP/IP,
1328 + X.25, etc -- you can set up a convenient client/server relationship
1329 + between your Kermit client (the one that made the connection) and the
1330 + Kermit program on the far end of the connection (the remote Kermit) by
1331 + putting the remote Kermit in server mode. This is normally done by
1332 + giving it a SERVER command, or by starting it with the -x command-line
1333 + option. In some cases ([128]Internet Kermit Service, SSH connections
1334 + to a Kermit subsystem, or specially configured hosts), there is
1335 + already a Kermit server waiting on the far end. Here is a quick
1336 + synopsis of the commands you can give to the client for interacting
1339 + SEND [ switches ] filename
1340 + Sends the named file to the server. The filename can include
1341 + wildcards. Lots of switches are available for file selection,
1342 + etc. Type HELP SEND at the client prompt for details.
1344 + GET [ switches ] filename
1345 + Asks the server to send the named file. The filename can
1346 + include wildcards. Type HELP GET at the client prompt for
1350 + Terminates the server and closes your connection to it.
1353 + Terminates the server. If you started the server yourself, this
1354 + leaves the remote host at its shell prompt. If it was a
1355 + dedicated server (such as IKSD or an SSH subsystem), FINISH is
1356 + equivalent to BYE.
1358 + SET LOCUS { LOCAL, REMOTE, AUTO }
1359 + (C-Kermit 8.0.201 and later, K95 1.1.21 and later) This tells
1360 + the client whether file-management commands like CD, PWD,
1361 + DIRECTORY, DELETE, MKDIR, etc, should be executed locally or by
1362 + the server. In this type of connection, the default is LOCAL.
1363 + Use SET LOCUS REMOTE if you want Kermit to behave like an FTP
1364 + client, in which case these commands are executed remotely, and
1365 + their local versions must have an L prefix: LCD, LPWD,
1366 + LDIRECTORY, etc. When LOCUS is LOCAL, then the remote versions
1367 + must have an R prefix: RCD, RPWD, RDIRECTORY, etc. HELP SET
1368 + LOCUS for details. SHOW COMMAND to see current locus.
1370 + The following commands are affected by SET LOCUS:
1373 + Change (working, current) directory. HELP CD for details.
1375 + CDUP, LCDUP, RCDUP
1378 + DIRECTORY, LDIRECTORY, RDIRECTORY
1379 + Produce a directory listing. Many options are available for local
1380 + listings. HELP DIRECTORY for details.
1382 + DELETE, LDELETE, RDELETE
1383 + Deletes files or directories. Many options available, HELP DELETE.
1385 + RENAME, LRENAME, RRENAME
1386 + Renames files or directories. Many options available, HELP RENAME.
1388 + MKDIR, LMKDIR, RMKDIR
1389 + Creates a directory. HELP MKDIR.
1391 + RMDIR, LRMDIR, RRMDIR
1392 + Removes a directory. HELP RMDIR. There are dozens -- maybe hundreds --
1393 + of other commands, described in the built-in help, on the website,
1394 + and/or in the published or online manuals. But even if you don't have
1395 + access to documentation, you can "set locus remote" and then use
1396 + pretty much the same commands you would use with any FTP client.
1398 + [ [129]Kermit Home ] [ [130]C-Kermit Home ] [ [131]C-Kermit FAQ ]
1399 + ________________________________________________________________________
1401 + KERMIT'S BUILT-IN FTP AND HTTP CLIENTS [ [132]Top ] [ [133]Contents ] [
1402 + [134]Next ] [ [135]Previous ]
1404 + Kermit's FTP client is like the regular Unix FTP client that you're
1405 + used to, but with some differences:
1407 + * It has lots more commands and features.
1408 + * You can have an FTP session and a regular Kermit serial or Telnet
1409 + session open at the same time.
1410 + * FTP sessions can be fully automated.
1412 + By default Kermit's FTP client tries its best to present the same user
1413 + interface as a regular FTP client: PUT, GET, DIR, CD, BYE, etc, should
1414 + work the same, even though some of these commands have different
1415 + meaning in Kermit-to-Kermit connections; for example, CD, DIR, RENAME,
1416 + etc, in Kermit act locally, whereas in FTP they are commands for the
1417 + server. This might cause some confusion, but as in all things Kermit,
1418 + you have total control:
1420 + * The [136]SET LOCUS command lets you specify where file management
1421 + commands should be executed -- locally or remotely -- for any kind
1423 + * Any FTP command can be prefixed with the word "FTP" to remove any
1426 + Pending publication of the next edition of the manual, the Kermit FTP
1427 + client is thoroughly documented at the Kermit Project website:
1429 + [137]http://www.columbia.edu/kermit/ftpclient.html
1431 + You also can use HELP FTP and HELP SET FTP to get descriptions of
1432 + Kermit's FTP-related commands.
1434 + The HTTP client is similar to the FTP one, except you prefix each
1435 + command with HTTP instead of FTP: HTTP OPEN, HTTP GET, HTTP PUT, HTTP
1436 + CLOSE, etc. Type HELP HTTP for details, or visit the to view the
1437 + [138]manual supplements. HTTP connections can be open at the same time
1438 + as regular serial or Telnet connections and FTP connections. So Kermit
1439 + can manage up to three types connections simultaneously.
1441 + [ [139]Kermit Home ] [ [140]C-Kermit Home ] [ [141]C-Kermit FAQ ] [
1442 + [142]FTP Client ] [ [143]HTTP Client ]
1443 + ________________________________________________________________________
1445 + INTERNET KERMIT SERVICE [ [144]Top ] [ [145]Contents ] [ [146]Next ] [
1448 + C-Kermit can be configured and run as an Internet service (called
1449 + IKSD), similar to an FTP server (FTPD) except you can (but need not)
1450 + interact with it directly, plus it does a lot more than an FTP server
1451 + can do. The TCP port for IKSD is 1649. It uses Telnet protocol.
1452 + C-Kermit can be an Internet Kermit Server, or it can be a client of an
1453 + IKSD. You can make connections from C-Kermit to an IKSD with any of
1454 + the following commands:
1456 + telnet foo.bar.edu 1649
1457 + telnet foo.bar.edu kermit ; if "kermit" is listed in /etc/services
1460 + The IKSD command is equivalent to a TELNET command specifying port
1461 + 1649. For more information about making and using connections to an
1464 + [148]http://www.columbia.edu/kermit/cuiksd.html
1466 + You can run an Internet Kermit Service on your own computer too (if
1467 + you are the system administrator). For instructions, see:
1469 + [149]http://www.columbia.edu/kermit/iksd.html
1471 + [ [150]Kermit Home ] [ [151]C-Kermit Home ] [ [152]C-Kermit FAQ ]
1472 + ________________________________________________________________________
1474 + SECURITY [ [153]Top ] [ [154]Contents ] [ [155]Next ] [ [156]Previous ]
1476 + All of C-Kermit's built-in TCP/IP networking methods (Telnet, Rlogin,
1477 + IKSD, FTP, and HTTP) can be secured by one or more of the following
1478 + IETF-approved methods:
1485 + For complete instructions see:
1487 + [157]http://www.columbia.edu/kermit/security.html
1489 + And as noted previously, you can also make SSH connections with
1490 + C-Kermit if you already have an SSH client installed.
1492 + [ [158]Kermit Home ] [ [159]C-Kermit Home ] [ [160]C-Kermit FAQ ]
1493 + ________________________________________________________________________
1495 + ALTERNATIVE COMMAND-LINE PERSONALITIES [ [161]Top ] [ [162]Contents ] [
1496 + [163]Next ] [ [164]Previous ]
1498 + When invoked as "kermit" or any other name besides any of the special
1499 + ones, C-Kermit has the command-line options described above in the
1500 + [165]OPTIONS section. However, if you invoke C-Kermit using any of the
1503 + telnet Telnet client
1506 + https Secure HTTP client
1508 + Kermit's command-line personality changes to match. This can be done
1509 + (among other ways) with symbolic links (symlinks). For example, if you
1510 + want C-Kermit to be your regular Telnet client, or the Telnet helper
1511 + of your Web browser, you can create a link like the following in a
1512 + directory that lies in your PATH ahead of the regular telnet program:
1514 + ln -s /usr/local/bin/kermit telnet
1516 + Now when you give a "telnet" command, you are invoking Kermit instead,
1517 + but with its Telnet command-line personality so, for example:
1519 + telnet xyzcorp.com
1521 + Makes a Telnet connection to xyzcorp.com, and Kermit exits
1522 + automatically when the connection is closed (just like the regular
1523 + Telnet client). Type "telnet -h" to get a list of Kermit's
1524 + Telnet-personality command-line options, which are intended to be as
1525 + compatible as possible with the regular Telnet client.
1527 + Similarly for FTP:
1529 + ln -s /usr/local/bin/kermit ftp
1531 + And now type "ftp -h" to see its command-line options, and use command
1532 + lines just like you would give your regular FTP client:
1534 + ftp -n xyzcorp.com
1536 + but with additional options allowing an entire session to be specified
1537 + on the command line, as explained in the C-Kermit [166]FTP client
1540 + And similarly for HTTP:
1542 + ln -s /usr/local/bin/kermit http
1544 + ./http www.columbia.edu -g kermit/index.html
1546 + Finally, if Kermit's first command-line option is a Telnet, FTP, IKSD,
1547 + or HTTP URL, Kermit automatically makes the appropriate kind of
1548 + connection and, if indicated by the URL, takes the desired action:
1550 + kermit telnet:xyzcorp.com ; Opens a Telnet session
1551 + kermit telnet://olga@xyzcorp.com ; Ditto for user olga
1552 + kermit ftp://olga@xyzcorp.com/public/oofa.zip ; Downloads a file
1553 + kermit kermit://kermit.columbia.edu/kermit/f/READ.ME ; Ditto for IKSD
1554 + kermit iksd://kermit.columbia.edu/kermit/f/READ.ME ; (This works too)
1555 + kermit http://www.columbia.edu/kermit/index.html ; Grabs a web page
1556 + kermit https://wwws.xyzcorp.com/secret/plan.html ; Grabs a secure web pag
1559 + [ [167]Kermit Home ] [ [168]C-Kermit Home ] [ [169]C-Kermit FAQ ]
1560 + ________________________________________________________________________
1562 + LICENSE [ [170]Top ] [ [171]Contents ] [ [172]Next ] [ [173]Previous ]
1564 + C-Kermit has an unusual license, but a fair and sensible one given
1565 + that the Kermit Project must support itself out of revenue: it's not a
1566 + BSD license, not GPL, not Artistic, not commercial, not shareware, not
1567 + freeware. It can be summed up like this: if you want C-Kermit for your
1568 + own use, you can download and use it without cost or license (but we'd
1569 + appreciate it if you would purchase the manual). But if you want to
1570 + sell C-Kermit or bundle it with a product or otherwise distribute it
1571 + in a commercial setting EXCEPT WITH AN OPEN-SOURCE OPERATING SYSTEM
1572 + DISTRIBUTION such as Linux, FreeBSD, NetBSD, or OpenBSD, you must
1573 + license it. To see the complete license, give the LICENSE command at
1574 + the prompt, or see the COPYING.TXT file distributed with C-Kermit 7.0
1575 + or later, or download it from
1576 + [174]ftp://kermit.columbia.edu/kermit/c-kermit/COPYING.TXT. Send
1577 + licensing inquiries to [175]kermit@columbia.edu.
1579 + [ [176]Kermit Home ] [ [177]C-Kermit Home ] [ [178]C-Kermit FAQ ]
1580 + ________________________________________________________________________
1582 + OTHER TOPICS [ [179]Top ] [ [180]Contents ] [ [181]Next ] [ [182]Previous ]
1584 + There's way more to C-Kermit than we've touched on here --
1585 + troubleshooting, customization, character sets, dialing directories,
1586 + sending pages, script writing, and on and on, all of which are covered
1587 + in the manual and updates and supplements. For the most up-to-date
1588 + information on documentation (or updated documentation itself) visit
1589 + the Kermit Project website:
1591 + [183]http://www.columbia.edu/kermit/
1593 + There you will also find [184]Kermit software packages for other
1594 + platforms: different Unix varieties, Windows, DOS, VMS, IBM
1595 + mainframes, and many others: 20+ years' worth.
1597 + [ [185]Kermit Home ] [ [186]C-Kermit Home ] [ [187]C-Kermit FAQ ]
1598 + ________________________________________________________________________
1600 + DOCUMENTATION AND UPDATES [ [188]Top ] [ [189]Contents ] [ [190]Next ] [
1603 + The manual for C-Kermit is:
1605 + 1. Frank da Cruz and Christine M. Gianone, [192]Using C-Kermit,
1606 + Second Edition, Digital Press / Butterworth-Heinemann, Woburn, MA,
1607 + 1997, 622 pages, ISBN 1-55558-164-1. This is a printed book. It
1608 + covers C-Kermit 6.0.
1609 + 2. The C-Kermit 7.0 Supplement:
1610 + [193]http://www.columbia.edu/kermit/ckermit70.html
1611 + 3. The C-Kermit 8.0 Supplement:
1612 + [194]http://www.columbia.edu/kermit/ckermit80.html
1614 + The C-Kermit home page is here:
1616 + [195]http://www.columbia.edu/kermit/ckermit.html
1618 + Visit this page to learn about new versions, Beta tests, and other
1619 + news; to read case studies and tutorials; to download source code,
1620 + install packages, and [196]prebuilt binaries for many platforms. Also
1623 + [197]http://www.columbia.edu/kermit/scriptlib.html
1624 + The Kermit script library and tutorial
1626 + [198]http://www.columbia.edu/kermit/newfaq.html
1627 + The Kermit FAQ (Frequently Asked Questions about Kermit)
1629 + [199]http://www.columbia.edu/kermit/ckfaq.html
1630 + The C-Kermit FAQ (Frequently Asked Questions about C-Kermit)
1632 + [200]http://www.columbia.edu/kermit/security.html
1633 + The Kermit security reference.
1635 + [201]http://www.columbia.edu/kermit/telnet.html
1636 + C-Kermit Telnet client documentation.
1638 + [202]http://www.columbia.edu/kermit/studies.html
1641 + [203]http://www.columbia.edu/kermit/ckcbwr.html
1642 + General C-Kermit Hints and Tips.
1644 + [204]http://www.columbia.edu/kermit/ckubwr.html
1645 + Unix C-Kermit Hints and Tips.
1647 + [205]http://www.columbia.edu/kermit/ckvbwr.html
1648 + VMS C-Kermit Hints and Tips.
1650 + [206]http://www.columbia.edu/kermit/ckuins.html
1651 + Unix C-Kermit Installation Instructions
1653 + [207]http://www.columbia.edu/kermit/ckvins.html
1654 + VMS C-Kermit Installation Instructions
1656 + [208]http://www.columbia.edu/kermit/support.html
1657 + Technical support.
1659 + [209]http://www.columbia.edu/kermit/k95tutorial.html
1660 + Kermit 95 tutorial (this document).
1662 + [210]comp.protocols.kermit.misc
1663 + The Kermit newsgroup (unmoderated).
1665 + [ [211]Kermit Home ] [ [212]C-Kermit Home ] [ [213]C-Kermit FAQ ]
1666 + ________________________________________________________________________
1668 + FILES [ [214]Top ] [ [215]Contents ] [ [216]Next ] [ [217]Previous ]
1674 + Initialization file.
1677 + Customization file.
1680 + Kermit dialing directory (see manual).
1683 + Kermit network directory (see manual).
1686 + Kermit services directory (see manual).
1689 + Installation instructions for Unix.
1692 + General C-Kermit bugs, hints, tips.
1695 + Unix-specific C-Kermit bugs, hints, tips.
1698 + C-Kermit program logic manual.
1701 + C-Kermit compile-time configuration options.
1704 + (in your PATH) SSH connection helper.
1707 + (in your PATH) external protocols for XYZmodem.
1709 + /var/spool/locks (or whatever)
1710 + UUCP lockfile for dialing out (see [226]installation
1713 + [ [227]Kermit Home ] [ [228]C-Kermit Home ] [ [229]C-Kermit FAQ ]
1714 + ________________________________________________________________________
1716 + AUTHORS [ [230]Top ] [ [231]Contents ] [ [232]Previous ]
1718 + Frank da Cruz and Jeffrey E Altman
1719 + The Kermit Project - Columbia Univerity
1720 + 612 West 115th Street
1721 + New York NY 10025-7799
1724 + 1985-present, with contributions from hundreds of others all over the
1726 + _________________________________________________________________
1729 + C-Kermit 8.0 Unix Manual Page and Tutorial /
1730 + [233]kermit@columbia.edu / 24 October 2002
1734 + 1. http://www.columbia.edu/kermit/
1735 + 2. http://www.columbia.edu/
1736 + 3. http://www.columbia.edu/kermit/ckututor.pdf
1737 + 4. ftp://kermit.columbia.edu/kermit/test/text/ckuker.nr
1738 + 5. http://www.columbia.edu/kermit/ckututor.html#description
1739 + 6. http://www.columbia.edu/kermit/ckututor.html#synopsis
1740 + 7. http://www.columbia.edu/kermit/ckututor.html#options
1741 + 8. http://www.columbia.edu/kermit/ckututor.html#commands
1742 + 9. http://www.columbia.edu/kermit/ckututor.html#initfile
1743 + 10. http://www.columbia.edu/kermit/ckututor.html#modes
1744 + 11. http://www.columbia.edu/kermit/ckututor.html#connections
1745 + 12. http://www.columbia.edu/kermit/ckututor.html#transfer
1746 + 13. http://www.columbia.edu/kermit/ckututor.html#server
1747 + 14. http://www.columbia.edu/kermit/ckututor.html#ftp
1748 + 15. http://www.columbia.edu/kermit/ckututor.html#iksd
1749 + 16. http://www.columbia.edu/kermit/ckututor.html#security
1750 + 17. http://www.columbia.edu/kermit/ckututor.html#personae
1751 + 18. http://www.columbia.edu/kermit/ckututor.html#license
1752 + 19. http://www.columbia.edu/kermit/ckututor.html#other
1753 + 20. http://www.columbia.edu/kermit/ckututor.html#documentation
1754 + 21. http://www.columbia.edu/kermit/ckututor.html#files
1755 + 22. http://www.columbia.edu/kermit/ckututor.html#authors
1756 + 23. http://www.columbia.edu/kermit/ckututor.html#top
1757 + 24. http://www.columbia.edu/kermit/ckututor.html#contents
1758 + 25. http://www.columbia.edu/kermit/ckututor.html#synopsis
1759 + 26. http://www.columbia.edu/kermit/ckermit.html
1760 + 27. http://www.columbia.edu/kermit/
1761 + 28. http://www.columbia.edu/
1762 + 29. ftp://ftp.isi.edu/in-notes/rfc2839.txt
1763 + 30. ftp://ftp.isi.edu/in-notes/rfc2840.txt
1764 + 31. http://www.columbia.edu/kermit/ckututor.html#documentation
1765 + 32. http://www.columbia.edu/kermit/
1766 + 33. http://www.columbia.edu/kermit/
1767 + 34. http://www.columbia.edu/kermit/ckermit.html
1768 + 35. http://www.columbia.edu/kermit/ckfaq.html
1769 + 36. http://www.columbia.edu/kermit/ckututor.html#top
1770 + 37. http://www.columbia.edu/kermit/ckututor.html#contents
1771 + 38. http://www.columbia.edu/kermit/ckututor.html#options
1772 + 39. http://www.columbia.edu/kermit/ckututor.html#synopsis
1773 + 40. http://www.columbia.edu/kermit/ckututor.html#kerbang
1774 + 41. http://www.columbia.edu/kermit/ckututor.html#personae
1775 + 42. http://www.columbia.edu/kermit/ckututor.html#kerbang
1776 + 43. http://www.columbia.edu/kermit/ckututor.html#initfile
1777 + 44. http://www.columbia.edu/kermit/ckututor.html#initfile
1778 + 45. http://www.columbia.edu/kermit/ckututor.html#personae
1779 + 46. http://www.columbia.edu/kermit/ckututor.html#options
1780 + 47. http://www.columbia.edu/kermit/ckututor.html#commands
1781 + 48. http://www.columbia.edu/kermit/
1782 + 49. http://www.columbia.edu/kermit/ckermit.html
1783 + 50. http://www.columbia.edu/kermit/ckfaq.html
1784 + 51. http://www.columbia.edu/kermit/ckututor.html#top
1785 + 52. http://www.columbia.edu/kermit/ckututor.html#contents
1786 + 53. http://www.columbia.edu/kermit/ckututor.html#commands
1787 + 54. http://www.columbia.edu/kermit/ckututor.html#description
1788 + 55. http://www.columbia.edu/kermit/ckututor.html#commands
1789 + 56. http://www.columbia.edu/kermit/ckututor.html#personae
1790 + 57. http://www.columbia.edu/kermit/ckututor.html#personae
1791 + 58. http://www.columbia.edu/kermit/ckututor.html#iksd
1792 + 59. http://www.columbia.edu/kermit/ckututor.html#transfer
1793 + 60. http://www.columbia.edu/kermit/ckututor.html#top
1794 + 61. http://www.columbia.edu/kermit/ckututor.html#contents
1795 + 62. http://www.columbia.edu/kermit/ckututor.html#initfile
1796 + 63. http://www.columbia.edu/kermit/ckututor.html#options
1797 + 64. http://www.columbia.edu/kermit/ckututor.html#kerbang
1798 + 65. http://www.columbia.edu/kermit/ckututor.html#cmdlist
1799 + 66. http://www.columbia.edu/kermit/ckututor.html#documentation
1800 + 67. http://www.columbia.edu/kermit/ckututor.html#initfile
1801 + 68. http://www.columbia.edu/kermit/ckututor.html#documentation
1802 + 69. http://www.columbia.edu/kermit/ckscripts.html
1803 + 70. http://www.columbia.edu/kermit/ckututor.html#documentation
1804 + 71. http://www.columbia.edu/kermit/
1805 + 72. http://www.columbia.edu/kermit/ckermit.html
1806 + 73. http://www.columbia.edu/kermit/ckfaq.html
1807 + 74. http://www.columbia.edu/kermit/ckututor.html#top
1808 + 75. http://www.columbia.edu/kermit/ckututor.html#contents
1809 + 76. http://www.columbia.edu/kermit/ckututor.html#modes
1810 + 77. http://www.columbia.edu/kermit/ckututor.html#commands
1811 + 78. http://www.columbia.edu/kermit/
1812 + 79. http://www.columbia.edu/kermit/ckermit.html
1813 + 80. http://www.columbia.edu/kermit/ckfaq.html
1814 + 81. http://www.columbia.edu/kermit/ckututor.html#top
1815 + 82. http://www.columbia.edu/kermit/ckututor.html#contents
1816 + 83. http://www.columbia.edu/kermit/ckututor.html#connections
1817 + 84. http://www.columbia.edu/kermit/ckututor.html#initfile
1818 + 85. http://www.columbia.edu/kermit/ckfaq.html#term
1819 + 86. http://www.columbia.edu/kermit/
1820 + 87. http://www.columbia.edu/kermit/ckermit.html
1821 + 88. http://www.columbia.edu/kermit/ckfaq.html
1822 + 89. http://www.columbia.edu/kermit/ckututor.html#top
1823 + 90. http://www.columbia.edu/kermit/ckututor.html#contents
1824 + 91. http://www.columbia.edu/kermit/ckututor.html#transfer
1825 + 92. http://www.columbia.edu/kermit/ckututor.html#modes
1826 + 93. http://www.columbia.edu/kermit/ckututor.html#iksd
1827 + 94. ftp://ftp.isi.edu/in-notes/rfc2217.txt
1828 + 95. http://www.columbia.edu/kermit/ckututor.html#ftp
1829 + 96. http://www.columbia.edu/kermit/
1830 + 97. http://www.columbia.edu/kermit/ckermit.html
1831 + 98. http://www.columbia.edu/kermit/ckfaq.html
1832 + 99. http://www.columbia.edu/kermit/ckututor.html#top
1833 + 100. http://www.columbia.edu/kermit/ckututor.html#contents
1834 + 101. http://www.columbia.edu/kermit/ckututor.html#server
1835 + 102. http://www.columbia.edu/kermit/ckututor.html#connections
1836 + 103. http://www.columbia.edu/kermit/ckututor.html#download
1837 + 104. http://www.columbia.edu/kermit/ckututor.html#upload
1838 + 105. http://www.columbia.edu/kermit/ckututor.html#oldfashioned
1839 + 106. http://www.columbia.edu/kermit/ckututor.html#trouble
1840 + 107. http://www.columbia.edu/kermit/ckututor.html#advanced
1841 + 108. http://www.columbia.edu/kermit/ckututor.html#nonkermit
1842 + 109. http://www.columbia.edu/kermit/kermit.html#notslow
1843 + 110. http://www.columbia.edu/kermit/ckermit.html
1844 + 111. http://www.columbia.edu/kermit/k95.html
1845 + 112. http://www.columbia.edu/kermit/k95.html
1846 + 113. http://www.columbia.edu/kermit/ckermit.html
1847 + 114. http://www.columbia.edu/kermit/mskermit.html
1848 + 115. http://www.columbia.edu/kermit/
1849 + 116. http://www.columbia.edu/kermit/support.html
1850 + 117. http://www.columbia.edu/kermit/ckmanual.html
1851 + 118. mailto:kermit-support@columbia.edu
1852 + 119. http://www.columbia.edu/kermit/ckututor.html#documentation
1853 + 120. http://www.columbia.edu/kermit/ckututor.html#ftp
1854 + 121. http://www.columbia.edu/kermit/
1855 + 122. http://www.columbia.edu/kermit/ckermit.html
1856 + 123. http://www.columbia.edu/kermit/ckfaq.html
1857 + 124. http://www.columbia.edu/kermit/ckututor.html#top
1858 + 125. http://www.columbia.edu/kermit/ckututor.html#contents
1859 + 126. http://www.columbia.edu/kermit/ckututor.html#ftp
1860 + 127. http://www.columbia.edu/kermit/ckututor.html#transfer
1861 + 128. http://www.columbia.edu/kermit/ckututor.html#iksd
1862 + 129. http://www.columbia.edu/kermit/
1863 + 130. http://www.columbia.edu/kermit/ckermit.html
1864 + 131. http://www.columbia.edu/kermit/ckfaq.html
1865 + 132. http://www.columbia.edu/kermit/ckututor.html#top
1866 + 133. http://www.columbia.edu/kermit/ckututor.html#contents
1867 + 134. http://www.columbia.edu/kermit/ckututor.html#iksd
1868 + 135. http://www.columbia.edu/kermit/ckututor.html#transfer
1869 + 136. http://www.columbia.edu/kermit/ckututor.html#server
1870 + 137. http://www.columbia.edu/kermit/ftpclient.html
1871 + 138. http://www.columbia.edu/kermit/ckututor.html#documentation
1872 + 139. http://www.columbia.edu/kermit/
1873 + 140. http://www.columbia.edu/kermit/ckermit.html
1874 + 141. http://www.columbia.edu/kermit/ckfaq.html
1875 + 142. http://www.columbia.edu/kermit/ckermit3.html#x3
1876 + 143. http://www.columbia.edu/kermit/ckermit3.html#x2.2
1877 + 144. http://www.columbia.edu/kermit/ckututor.html#top
1878 + 145. http://www.columbia.edu/kermit/ckututor.html#contents
1879 + 146. http://www.columbia.edu/kermit/ckututor.html#security
1880 + 147. http://www.columbia.edu/kermit/ckututor.html#ftp
1881 + 148. http://www.columbia.edu/kermit/cuiksd.html
1882 + 149. http://www.columbia.edu/kermit/iksd.html
1883 + 150. http://www.columbia.edu/kermit/
1884 + 151. http://www.columbia.edu/kermit/ckermit.html
1885 + 152. http://www.columbia.edu/kermit/ckfaq.html
1886 + 153. http://www.columbia.edu/kermit/ckututor.html#top
1887 + 154. http://www.columbia.edu/kermit/ckututor.html#contents
1888 + 155. http://www.columbia.edu/kermit/ckututor.html#personae
1889 + 156. http://www.columbia.edu/kermit/ckututor.html#iksd
1890 + 157. http://www.columbia.edu/kermit/security.html
1891 + 158. http://www.columbia.edu/kermit/
1892 + 159. http://www.columbia.edu/kermit/ckermit.html
1893 + 160. http://www.columbia.edu/kermit/ckfaq.html
1894 + 161. http://www.columbia.edu/kermit/ckututor.html#top
1895 + 162. http://www.columbia.edu/kermit/ckututor.html#contents
1896 + 163. http://www.columbia.edu/kermit/ckututor.html#license
1897 + 164. http://www.columbia.edu/kermit/ckututor.html#iksd
1898 + 165. http://www.columbia.edu/kermit/ckututor.html#options
1899 + 166. http://www.columbia.edu/kermit/ckermit3.html#x3.1.2
1900 + 167. http://www.columbia.edu/kermit/
1901 + 168. http://www.columbia.edu/kermit/ckermit.html
1902 + 169. http://www.columbia.edu/kermit/ckfaq.html
1903 + 170. http://www.columbia.edu/kermit/ckututor.html#top
1904 + 171. http://www.columbia.edu/kermit/ckututor.html#contents
1905 + 172. http://www.columbia.edu/kermit/ckututor.html#other
1906 + 173. http://www.columbia.edu/kermit/ckututor.html#personae
1907 + 174. ftp://kermit.columbia.edu/kermit/c-kermit/COPYING.TXT
1908 + 175. mailto:kermit@columbia.edu
1909 + 176. http://www.columbia.edu/kermit/
1910 + 177. http://www.columbia.edu/kermit/ckermit.html
1911 + 178. http://www.columbia.edu/kermit/ckfaq.html
1912 + 179. http://www.columbia.edu/kermit/ckututor.html#top
1913 + 180. http://www.columbia.edu/kermit/ckututor.html#contents
1914 + 181. http://www.columbia.edu/kermit/ckututor.html#documentation
1915 + 182. http://www.columbia.edu/kermit/ckututor.html#license
1916 + 183. http://www.columbia.edu/kermit/
1917 + 184. http://www.columbia.edu/kermit/howtoget.html
1918 + 185. http://www.columbia.edu/kermit/
1919 + 186. http://www.columbia.edu/kermit/ckermit.html
1920 + 187. http://www.columbia.edu/kermit/ckfaq.html
1921 + 188. http://www.columbia.edu/kermit/ckututor.html#top
1922 + 189. http://www.columbia.edu/kermit/ckututor.html#contents
1923 + 190. http://www.columbia.edu/kermit/ckututor.html#files
1924 + 191. http://www.columbia.edu/kermit/ckututor.html#other
1925 + 192. http://www.columbia.edu/kermit/ckmanual.html
1926 + 193. http://www.columbia.edu/kermit/ckermit70.html
1927 + 194. http://www.columbia.edu/kermit/ckermit80.html
1928 + 195. http://www.columbia.edu/kermit/ckermit.html
1929 + 196. http://www.columbia.edu/kermit/ck80binaries.html
1930 + 197. http://www.columbia.edu/kermit/scriptlib.html
1931 + 198. http://www.columbia.edu/kermit/newfaq.html
1932 + 199. http://www.columbia.edu/kermit/ckfaq.html
1933 + 200. http://www.columbia.edu/kermit/security.html
1934 + 201. http://www.columbia.edu/kermit/telnet.html
1935 + 202. http://www.columbia.edu/kermit/studies.html
1936 + 203. http://www.columbia.edu/kermit/ckcbwr.html
1937 + 204. http://www.columbia.edu/kermit/ckubwr.html
1938 + 205. http://www.columbia.edu/kermit/ckvbwr.html
1939 + 206. http://www.columbia.edu/kermit/ckuins.html
1940 + 207. http://www.columbia.edu/kermit/ckvins.html
1941 + 208. http://www.columbia.edu/kermit/support.html
1942 + 209. http://www.columbia.edu/kermit/k95tutorial.html
1943 + 210. news:comp.protocols.kermit.misc
1944 + 211. http://www.columbia.edu/kermit/
1945 + 212. http://www.columbia.edu/kermit/ckermit.html
1946 + 213. http://www.columbia.edu/kermit/ckfaq.html
1947 + 214. http://www.columbia.edu/kermit/ckututor.html#top
1948 + 215. http://www.columbia.edu/kermit/ckututor.html#contents
1949 + 216. http://www.columbia.edu/kermit/ckututor.html#authors
1950 + 217. http://www.columbia.edu/kermit/ckututor.html#documentation
1951 + 218. ftp://kermit.columbia.edu/kermit/c-kermit/COPYING.TXT
1952 + 219. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit.ini
1953 + 220. ftp://kermit.columbia.edu/kermit/c-kermit/ckermod.ini
1954 + 221. http://www.columbia.edu/kermit/ckuins.html
1955 + 222. http://www.columbia.edu/kermit/ckcbwr.html
1956 + 223. http://www.columbia.edu/kermit/ckubwr.html
1957 + 224. http://www.columbia.edu/kermit/ckcplm.html
1958 + 225. http://www.columbia.edu/kermit/ckccfg.html
1959 + 226. http://www.columbia.edu/kermit/ckuins.html
1960 + 227. http://www.columbia.edu/kermit/
1961 + 228. http://www.columbia.edu/kermit/ckermit.html
1962 + 229. http://www.columbia.edu/kermit/ckfaq.html
1963 + 230. http://www.columbia.edu/kermit/ckututor.html#top
1964 + 231. http://www.columbia.edu/kermit/ckututor.html#contents
1965 + 232. http://www.columbia.edu/kermit/ckututor.html#files
1966 + 233. mailto:kermit@columbia.edu
1968 +++ ckermit-212/ckuins.txt
1971 +C-Kermit 8.0 Unix Installation Instructions
1973 + [ [1]Contents ] [ [2]C-Kermit ] [ [3]Kermit Home ]
1976 + The Kermit Project
1977 + Columbia University
1979 + As of C-Kermit version: 8.0.211, 10 April 2004
1980 + This file last updated: Tue Apr 13 10:14:33 2004 (New York City
1983 + IF YOU ARE READING A PLAIN-TEXT version of this document, note that
1984 + this file is a plain-text dump of a Web page. You can visit the
1985 + original (and possibly more up-to-date) Web page here:
1987 +[4]http://www.columbia.edu/kermit/ckuins.html
1988 + __________________________________________________________________________
1994 + 1. [6]INTERNET QUICK START
1995 + 2. [7]INSTALLING FROM PACKAGES
1996 + 3. [8]INSTALLING PREBUILT BINARIES
1997 + 4. [9]BUILDING FROM SOURCE CODE
1998 + 5. [10]INSTALLING THE KERMIT FILES
1999 + 6. [11]INSTALLING UNIX C-KERMIT FROM DOS-FORMAT DISKETTES
2000 + 7. [12]CHECKING THE RESULTS
2001 + 8. [13]REDUCING THE SIZE OF THE EXECUTABLE PROGRAM IMAGE
2002 + 9. [14]UNIX VERSIONS
2003 + 10. [15]DIALING OUT AND COORDINATING WITH UUCP
2004 + 11. [16]RUNNING UNIX C-KERMIT SETUID OR SETGID
2005 + 12. [17]CONFIGURING UNIX WORKSTATIONS
2006 + 13. [18]BIZARRE BEHAVIOR AT RUNTIME
2007 + 14. [19]CRASHES AND CORE DUMPS
2008 + 15. [20]SYSLOGGING
2009 + 16. [21]BUILDING SECURE VERSIONS OF C-KERMIT 8.0
2010 + 17. [22]INSTALLING C-KERMIT AS AN SSH SERVER SUBSYSTEM
2011 + __________________________________________________________________________
2015 + [ [23]Top ] [ [24]Contents ] [ [25]Next ]
2017 + WARNING: This document contains notes that have been accumulating
2018 + since the early 1980s. Many of the products and Unix versions
2019 + mentioned here have not been heard of in a long while, but that
2020 + does not necessarily mean they are not still running in some
2023 + This file contains Unix-specific information. A lot of it. Unlike most
2024 + other packages, C-Kermit tries very hard to be portable to every Unix
2025 + variety (and every release of each one) known to exist, including many
2026 + that are quite old, as well as to other platforms like VMS, AOS/VS,
2027 + VOS, OS-9, the BeBox, the Amiga, etc.
2029 + Since C-Kermit gets so deeply into the file system, i/o system, and
2030 + other areas that differ radically from one Unix platform to the next,
2031 + this means that a lot can go wrong when you try to install C-Kermit on
2032 + (for example) a new release of a particular variety of Unix, in which
2033 + certain things might have changed that C-Kermit depended upon.
2035 + This file concentrates on installation. For a description of general
2036 + configuration options for C-Kermit, please read the [26]Configurations
2037 + Options document. For troubleshooting after installation, see the
2038 + [27]General Hints and Tips and [28]Unix-Specific Hints and Tips
2039 + documents. The latter, in particular, contains lots of information on
2040 + lots of specific Unix platforms. If you want to work on the source
2041 + code, see the [29]C-Kermit Program Logic Manual
2043 + You may install C-Kermit:
2045 + * From an "[30]install package", if one is available.
2046 + * As a [31]prebuilt binary, if available, plus accompanying text
2048 + * By building from [32]source code.
2049 + __________________________________________________________________________
2051 +1. INTERNET QUICK START
2053 + [ [33]Top ] [ [34]Contents ] [ [35]Next ] [ [36]Previous ]
2055 + If your Unix computer is on the Internet and it has a C compiler,
2056 + here's how to download, build, and install C-Kermit directly from the
2057 + "tarballs" or Zip archives:
2059 + 1. Make a fresh directory and cd to it.
2060 + 2. Download the C-Kermit source code:
2061 + [37]ftp://kermit.columbia.edu/kermit/archives/cku211.tar.Z
2062 + (compress format) or
2063 + [38]ftp://kermit.columbia.edu/kermit/archives/cku211.tar.gz
2065 + 3. Uncompress the compressed tar file with "uncompress" or "gunzip",
2066 + according to which type of compressed file you downloaded. (If you
2067 + don't understand this, you could download a (much larger)
2068 + uncompressed tar archive directly:
2069 + [39]ftp://kermit.columbia.edu/kermit/archives/cku211.tar
2070 + 4. Now type "tar xvf cku211.tar" to unpack the individual files from
2072 + 5. Type "rm cku211.tar" to get rid of the tar archive, which is no
2074 + 6. Read the comments at the top of the makefile to find out which
2075 + target to use and then type the appropriate "make" command, such
2076 + as "make linux", "make solaris8", etc.
2077 + 7. This produces a binary in your current directory called "wermit".
2078 + Start it by typing "./wermit" and [40]try it out to make sure it
2079 + works. Then read [41]Section 5 for how to install it, or simply
2080 + copy the wermit binary to the desired public directory, rename it
2081 + to kermit, and give it the needed permissions (and, if it is going
2082 + to be used to dial out, give it the same group and owner and
2083 + permissions as the cu, tip, or minicom program).
2085 + For secure installations, see [42]Sections 5 and [43]16.
2086 + __________________________________________________________________________
2088 +2. INSTALLING FROM PACKAGES
2090 + [ [44]Top ] [ [45]Contents ] [ [46]Next ] [ [47]Previous ]
2092 + Various Unix varieties -- Linux, Solaris, AIX, etc -- now incorporate
2093 + the idea of "install packages", and many users expect to find all new
2094 + applications in this format. A selection of install packages might be
2095 + available for any given release of C-Kermit, but there is a tradeoff
2096 + between convenience and safety. Unix presents several notable problems
2097 + to the builder of install packages:
2099 + a. Since C-Kermit is portable to many non-Unix platforms (VMS, VOS,
2100 + AOS/VS, etc), some of the files in the C-Kermit distribution do
2101 + not fit into the Unix application model. In particular, C-Kermit
2102 + includes some plain text files (described in [48]Section 5) and
2103 + Unix has no standard place to put such files. Typical Unix package
2104 + managers do not allow for them. Where should they go, and how will
2105 + the user know where to find them?
2106 + b. Installation of any program that will be used to make modem calls
2107 + requires some important decisions from the installer regarding
2108 + security and privilege.
2110 + Item (b) is discussed at length in [49]Sections 10 and [50]11 of this
2111 + document, but the package-related aspects are also given here. The
2112 + basic problem is that Unix dialout devices and the UUCP "lock files"
2113 + that regulate contention for them (described in [51]Section 10) are
2114 + usually protected against "world". Therefore, the install procedure
2115 + must either run as root in order to give the Kermit binary the
2116 + required permissions, group, and/or owner, or else the dialout devices
2117 + and associated directories must be open for group or world reading and
2118 + writing. Otherwise, the Kermit program just installed WILL NOT WORK
2121 + Thus, a well-crafted installation procedure should present the options
2122 + and allow the installer to choose the method, if any, for regulating
2123 + access to the dialout devices:
2125 + a. Check the permissions of the lockfile directory and the dialout
2126 + devices. If they do not allow group or world R/W access, then:
2127 + b. "Your UUCP lockfile directory and/or dialout devices require
2128 + privilege to access. You must either change their permissions or
2129 + install Kermit with privileges."
2130 + c. "If you wish to install Kermit with privileges, it will be given
2131 + the same owner, group, and permissions as the cu program so it can
2132 + use the dialout devices."
2133 + d. If they choose (c) but the user is not root, give a message that
2134 + the install procedure can be run only by root and then quit.
2136 + It should go without saying, of course, that any binaries that are to
2137 + be included in an install package should be built fresh on the exact
2138 + platform (e.g. Red Hat 8.0 on Intel) for which the package is
2139 + targeted; prebuilt binaries ([52]next section) from other sites are
2140 + likely to have library mismatches. [53]CLICK HERE for more about
2141 + building C-Kermit install packages.
2143 + The Kermit Project does not have the resources or the expertise to
2144 + make install packages for every platform. Most install packages,
2145 + therefore, are contributed by others, and they do not necessarily
2146 + follow the guidelines given above. Pay attention to what they do.
2148 + If you are an end user who has obtained a C-Kermit install package for
2149 + a particular platform, you should be aware that some additional steps
2150 + might needed if you want to use Kermit to dial out. Read [54]Section
2152 + __________________________________________________________________________
2154 +3. INSTALLING PREBUILT BINARIES
2156 + [ [55]Top ] [ [56]Contents ] [ [57]Next ] [ [58]Previous ]
2158 + Hundreds of prebuilt C-Kermit binaries are available on the CDROM in
2159 + the BINARY tree [NOTE: The C-Kermit CDROM is still for version 7.0],
2160 + and at our ftp site in the [59]kermit/bin area (with names starting
2161 + with "ck"), also accessible on the [60]C-Kermit website. To install a
2164 + a. Rename the binary to "wermit".
2165 + b. Make sure it works; some tests are suggested in [61]Section 7.
2166 + c. Follow steps (b) through (e) in [62]Section 4.
2167 + d. Install related files as described in [63]Section 5.
2169 + But first... Please heed the following cautions:
2171 + a. If you pick the wrong binary, it won't work (or worse).
2172 + b. Even when you pick the appropriate binary, it still might not work
2173 + due to shared-library mismatches, etc. (see [64]Section 4.0).
2174 + c. Don't expect a binary built on or for version n of your OS to work
2175 + on version n - x (where x > 0). However, it is usually safe to run
2176 + a binary built on (or for) an older OS release on a newer one.
2178 + Therefore, it is better to build your own binary from source code
2179 + ([65]next section) if you can. But since it is increasingly for Unix
2180 + systems (not to mention VMS and other OS's) to be delivered without C
2181 + compilers, it is often impractical. In such cases, try the most
2182 + appropriate prebuilt binary or binaries, and if none of them work,
2183 + [66]contact us and we'll see what we can do to help.
2184 + __________________________________________________________________________
2186 +4. BUILDING FROM SOURCE CODE
2188 + [ [67]Top ] [ [68]Contents ] [ [69]Next ] [ [70]Previous ]
2190 + Also see: [71]Section 8 and [72]Section 9.
2192 + C-Kermit is designed to be built and used on as many platforms as
2193 + possible: Unix and non-Unix, old and new (and ancient), ANSI C and
2194 + K&R. The Unix version does not use or depend on any external tools for
2195 + building except the "make" utility, the C compiler, and the linker. It
2196 + does not use any automated configuration tools such as configure,
2197 + autoconf, automake, libtool, etc. Everything in C-Kermit has been
2198 + built by hand based on direct experience or reports or contributions
2199 + from users of each platform.
2201 + The [73]C-Kermit makefile contains the rules for building the program
2202 + for each of the hundreds of different kinds of Unix systems that
2203 + C-Kermit attempts to support. It covers all Unix variations since
2204 + about 1980 -- pretty much everything after Unix V6. Separate makefiles
2205 + are used for [74]Plan 9 and [75]2.x BSD.
2209 + * The C compiler, linker, and make program must be installed.
2210 + * The C libraries and header files must be installed (*).
2211 + * The C-Kermit source code and makefile in your current directory.
2212 + * The C-Kermit text files ([76]Section 5) in your current directory.
2214 + * This is becoming problematic in this new age of "selective
2215 + installs" e.g. of Linux packages. C-Kermit builds will often fail
2216 + because replying "no" to some obscure Linux installation option
2217 + will result in missing libraries or header files. Ditto on
2218 + platforms like AIX and Solaris that don't come with C compilers,
2219 + and then later have gcc installed, but are still missing crucial
2220 + libraries, like libm (math).
2224 + * For TCP/IP networking support, the sockets library and related
2225 + header files must be installed.
2226 + * The math library for floating-point arithmetic support (can be
2227 + deselected by adding -DNOFLOAT to CFLAGS and removing -lm from
2229 + * Many and varied security libraries for building a secure version
2230 + (Kerberos, SSL/TLS, SRP, Zlib,...) These are required only if you
2231 + select a secure target.
2232 + * For the curses-based fullscreen file-ransfer display, the curses
2233 + or ncurses header file(s) and library, and probably also the
2234 + termcap and/or termlib library. Note that the names and locations
2235 + of these files and libraries are likely to change capriciously
2236 + with every new release of your Unix product. If you discover that
2237 + the C-Kermit build procedure fails because your curses and/or
2238 + termxxx headers or libraries are not named or located as expected,
2239 + please [77]let us know. In the meantime, work around by installing
2241 + * IMPORTANT: Modern Linux distributions might give you the choice
2242 + during installation of whether to install the "ncurses development
2243 + package" (perhaps called "ncurses-devel"). If you did not install
2244 + it, you won't be able to build C-Kermit with curses support
2245 + included. In this case, either go back and install ncurses, or
2246 + else choose (or create) a non-curses makefile target for your
2247 + platform. To install the ncurses developers tools in Red Hat
2252 +rpm -ivh ncurses-devel*.rpm
2253 +or to have the exact name ls ncurse* and load as
2255 +then leave the cdrom and unmount it.
2257 + * In AIX you might have to go back and install any or all of:
2265 + from the first installation CD.
2267 + The makefile might need to be renamed from ckuker.mak to makefile.
2270 + a. Type "make xxx" where xxx is the name of the makefile target most
2271 + appropriate to your platform, e.g. "make linux", "make aix43",
2272 + etc. Read the [78]comments at the top of the makefile for a
2273 + complete list of available targets (it's a long list).
2274 + b. Test the resulting 'wermit' file (see [79]Section 7 for
2275 + suggestions). If it's OK, proceed; otherwise [80]notify us.
2277 + NOTE: steps (c) through (e) can be accomplished using the
2278 + [81]makefile 'install' target as described in [82]Section 5.4.
2279 + c. Rename the 'wermit' file to 'kermit', copy it to the desired
2280 + binary directory (such as /usr/local/bin or /opt/something), and
2281 + if it is to be used for dialing out, give it the same owner,
2282 + group, and permissions as the 'cu' program (IMPORTANT: read
2283 + [83]Sections 10 and [84]11 for details).
2284 + d. Install the man page, ckuker.nr, with your other man pages.
2285 + e. Install the accompanying text files (see [85]Section 5).
2286 + f. If you want C-Kermit to also offer a Telnet command-line
2287 + personality, make a symbolic link as follows:
2289 +cd directory-where-kermit-binary-is
2290 +ln -s kermit telnet
2292 + If you want C-Kermit to be the default Telnet client, make sure
2293 + the directory in which you created the symlink is in the PATH
2294 + ahead of the where the regular Telnet client is.
2295 + g. If you want C-Kermit to also offer an FTP command-line
2296 + personality, make a symlink called "ftp" as in (f).
2297 + h. If you want C-Kermit to also offer an FTTP command-line
2298 + personality, make a symlink called "http" as in (f).
2299 + i. If you want to offer an Internet Kermit Service, follow the
2300 + directions in the [86]IKSD Administrator's Guide.
2301 + ________________________________________________________________________
2303 + 4.0. Special Considerations for C-Kermit 8.0
2305 + [ [87]Top ] [ [88]Contents ] [ [89]Next ]
2307 + Also see: [90]C-Kermit Configuration Options
2311 +4.1. [91]The Unix Makefile
2312 +4.2. [92]The C-Kermit Initialization File
2313 +4.3. [93]The 2.x BSD Makefile
2314 +4.4. [94]The Plan 9 Makefile
2315 +4.5. [95]Makefile Failures
2317 + (Also see the [96]Configurations Options document, [97]Section 8).
2319 + Lots of new features have been added in versions 7.0 and 8.0 that
2320 + require access to new symbols, APIs, libraries, etc, and this will no
2321 + doubt cause problems in compiling, linking, or execution on platforms
2322 + where 6.0 and earlier built without incident. This section contains
2323 + what we know as of the date of this file.
2325 + The first category concerns the new Kermit Service Daemon (IKSD; see
2326 + the [98]IKSD Administrator's Guide for details):
2329 + When C-Kermit is started as an IKSD (under inetd), it makes
2330 + syslog and wtmp entries, and also keeps its own ftpd-like log.
2331 + The code assumes the wtmp log is /var/log/wtmp on Linux and
2332 + /usr/adm/wtmp elsewhere. No doubt this assumption will need
2333 + adjustment. Use -DWTMPFILE=path to override at compile time
2334 + (there is also a runtime override). See [99]iksd.html for
2337 + UTMP, utsname(), etc
2338 + C-Kermit 7.0 gets as much info as it can about its job --
2339 + mainly for IKSD logging -- from utmp. But of course utmp
2340 + formats and fields differ, and for that matter, there can be
2341 + two different header files, <utmp.h> and <utmpx.h>. Look for
2342 + HAVEUTMPX and HAVEUTHOST in [100]ckufio.c and let me know of
2343 + any needed adjustments.
2346 + IKSD needs to authenticate incoming users against the password
2347 + list. In some cases, this requires the addition of -lcrypt
2348 + (e.g. in Unixware 2.x). In most others, the crypt functions are
2349 + in the regular C library. If you get "crypt" as an unresolved
2350 + symbol at link time, add -lcrypt to LIBS. If your site has
2351 + local replacement libraries for authentication, you might need
2352 + a special LIBS clause such as "LIBS=-L/usr/local/lib -lpwent".
2354 + These days most Unix systems take advantage of shadow password
2355 + files or Plugable Authentication Modules (PAM). If your system
2356 + uses shadow passwords you must add -DCK_SHADOW to the CFLAGS
2357 + list. If your system requires PAM you must add -DCK_PAM to the
2358 + CFLAGS and -lpam -ldl to LIBS.
2361 + This is called by the IKSD at login time to see if a user has
2362 + been "turned off". But many Unix platforms lack this function.
2363 + In that case, you will get unresolved symbol reports at link
2364 + time for _getusershell, _endusershell; to work around, add
2368 + This is called by IKSD after successful authentication. But
2369 + some platforms do not have this function, so obviously it can't
2370 + be called there, in which case add -DNOINITGROUPS.
2372 + setreuid(), setreuid(), setregid() not found or "deprecated"
2373 + Find out what your Unix variety wants you to use instead, and
2374 + make appropriate substitutions in routine zvpass(), module
2375 + [101]ckufio.c, and [102]let us know.
2378 + IKSD installs a printf() substitute to allow redirection of
2379 + printf-like output to the connection. However, this can
2380 + conflict with some curses libraries. In this case, separate
2381 + binaries must be built for IKSD and non-IKSD use.
2383 + If you encounter difficulties with any of the above, and you are not
2384 + interested in running C-Kermit as an IKSD, then simply add NOIKSD to
2385 + CFLAGS and rebuild. Example:
2388 +(get lots of errors)
2390 +make sco286 "KFLAGS=-DNOIKSD"
2392 + Some non-IKSD things to watch out for:
2394 + Return type of main()
2395 + The main() routine is in [103]ckcmai.c. If you get complaints
2396 + about "main: return type is not blah", define MAINTYPE on the
2397 + CC command line, e.g.:
2399 +make xxx "KFLAGS=-DMAINTYPE=blah
2401 + (where blah is int, long, or whatever). If the complaint is
2402 + "Attempt to return a value from a function of type void" then
2405 +make xxx "KFLAGS=-DMAINISVOID=blah
2407 + DNS Service Records
2408 + This feature allows a remote host to redirect C-Kermit to the
2409 + appropriate socket for the requested service; e.g. if C-Kermit
2410 + requests service "telnet" and the host offers Telnet service on
2411 + port 999 rather than the customary port 23. If you get
2412 + compile-time complaints about not being able to find
2413 + <resolv.h>, <netdb.h>, or <arpa/nameser.h>, add -DNO_DNS_SRV to
2414 + CFLAGS. If you get link-time complaints about unresolved
2415 + symbols res_search or dn_expand, try adding -lresolve to LIBS.
2418 + If "echo \v(ipaddress)" shows an empty string rather than your
2419 + local IP address, add -DCKGHNLHOST to CFLAGS and rebuild.
2422 + If this file can't be found at compile time, add -DNOREDIRECT
2423 + to CFLAGS. This disables the REDIRECT and PIPE commands and
2424 + anything else that needs the wait() system service.
2427 + C-Kermit can now write syslog records. Some older platforms
2428 + might not have the syslog facility. In that case, add
2429 + -DNOSYSLOG. Others might have it, but require addition of
2430 + -lsocket to LIBS (SCO OSR5 is an example). See [104]Section 15.
2433 + If "_putenv" comes up as an undefined symbol, add -DNOPUTENV to
2434 + CFLAGS and rebuild.
2436 + "Passing arg1 of 'time' from incompatible pointer"
2437 + This is a mess. See the mass of #ifdefs in the appropriate
2438 + module, [105]ckutio.c or [106]ckufio.c.
2441 + Wrong number of arguments. On most platforms, gettimeofday()
2442 + takes two arguments, but on a handful of others (e.g. Motorola
2443 + System V/88 V4, SNI Reliant UNIX 5.43, etc) it takes one. If
2444 + your version of gettimeofday() is being called with two args
2445 + but wants one, add -DGTODONEARG.
2447 + "Assignment makes pointer from integer without a cast"
2448 + This warning might appear in [107]ckutio.c or [108]ckufio.c.
2449 + (or elsewhere), and usually can be traced to the use of a
2450 + system or library function that returns a pointer but that is
2451 + not declared in the system header files even though it should
2452 + be. Several functions are commonly associated with this error:
2454 + + getcwd(): Add -DDCLGETCWD to CFLAGS and rebuild.
2455 + + popen() : Add -DDCLPOPEN to CFLAGS and rebuild.
2456 + + fdopen(): Add -DDCLFDOPEN to CFLAGS and rebuild.
2458 + "Operands of = have incompatible types"
2459 + "Incompatible types in assignment"
2460 + If this comes from [109]ckcnet.c and comes from a statement
2461 + involving inet_addr(), try adding -DINADDRX to CFLAGS. If that
2462 + doesn't help, then try adding -DNOMHHOST.
2464 + Complaints about args to get/setsockopt(), getpeername(),
2466 + These are all in [110]ckcnet.c. Different platforms and OS's
2467 + and versions of the same OS change this all the time: int,
2468 + size_t, unsigned long, etc. All the affected variables are
2469 + declared according to #ifdefs within ckcnet.c, so find the
2470 + declarations and adjust the #ifdefs accordingly.
2473 + In case of complaints about "unknown type size_t", add
2474 + -DSIZE_T=int (or other appropriate type) to CFLAGS.
2477 + Use of undefined enum/struct/union 'timezone'
2478 + Left of 'tv_sec' specifies undefined struct/union 'timeval' And
2479 + similar complaints in [111]ckutio.c: Add -DNOGFTIMER and/or
2483 + The new built-in DIRECTORY command should show symlinks like
2484 + "ls -l" does. If it does not, check to see if your platform has
2485 + the lstat() and readlink() functions. If so, add -DUSE_LSTAT
2486 + and -DCKSYMLINK to CFLAGS and rebuild. On the other hand, if
2487 + lstat() is unresolved at link time, add -DNOLSTAT to CFLAGS. If
2488 + readlink() is also unresolved, add -DNOSYMLINK.
2491 + Link-time complains about realpath() -- find the library in
2492 + which it resides and add it to LIBS (example for Unixware 7.1:
2493 + "-lcudk70") or add -DNOREALPATH to CFLAGS and rebuild. If built
2494 + with realpath() but debug log file is truncated or mangled,
2495 + ditto (some realpath() implementations behave differently from
2496 + others). If built with realpath() and seemingly random core
2497 + dumps occur during file path resolution, ditto.
2499 + Failure to locate header file <term.h>
2500 + Usually happens on Linux systems that have the C compiler
2501 + installed, but not the ncurses package (see comments about
2502 + selective installs above). Go back and install ncurses, or use
2503 + "make linuxnc" (Linux No Curses).
2505 + "Can't find shared library libc.so.2.1"
2506 + "Can't find shared library libncurses.so.3.0", etc...
2507 + You are trying to run a binary that was built on a computer
2508 + that has different library versions than your computer, and
2509 + your computer's loader is picky about library version numbers.
2510 + Rebuild from source on your computer.
2512 + Time (struct tm) related difficulties:
2513 + Errors like the following:
2515 +"ckutio.c", line 11994: incomplete struct/union/enum tm: _tm
2516 +"ckutio.c", line 11995: error: cannot dereference non-pointer type
2517 +"ckutio.c", line 11995: error: assignment type mismatch
2518 +"ckutio.c", line 11997: warning: using out of scope declaration: localtime
2519 +"ckutio.c", line 11997: error: unknown operand size: op "="
2520 +"ckutio.c", line 11997: error: assignment type mismatch
2521 +"ckutio.c", line 11998: error: undefined struct/union member: tm_year
2522 +"ckutio.c", line 12000: error: undefined struct/union member: tm_mon
2523 +"ckutio.c", line 12001: error: undefined struct/union member: tm_mday
2524 +"ckutio.c", line 12002: error: undefined struct/union member: tm_hour
2525 +"ckutio.c", line 12003: error: undefined struct/union member: tm_min
2526 +"ckutio.c", line 12004: error: undefined struct/union member: tm_sec
2528 + are due to failure to include the appropriate time.h header
2529 + files. Unix platforms generally have one or more of the
2530 + following: <time.h>, <sys/time.h>, and <sys/timeb.h>. Any
2531 + combination of these might be required. Defaults are set up for
2532 + each makefile target. The defaults can be corrected on the CC
2533 + command line by adding the appropriate definition from the
2534 + following list to CFLAGS:
2536 +-DTIMEH Include <time.h>
2537 +-DNOTIMEH Don't include <time.h>
2538 +-DSYSTIMEH Include <sys/time.h>
2539 +-DNOSYSTIMEH Don't include <sys/time.h>
2540 +-DSYSTIMEBH Include <sys/timeb.h>
2541 +-DNOSYSTIMEBH Don't include <sys/timeb.h>
2543 + Note that <sys/timeb.h> is relatively scarce in the System V
2544 + and POSIX environments; the only platform of recent vintage
2545 + where it was/is used is OSF/1 and its derivatives (Digital Unix
2548 + Struct timeval and/or timezone not declared:
2549 + In some cases, merely including the appropriate time.h header
2550 + files is still not enough. POSIX.1 does not define the timeval
2551 + struct, and so the items we need from the header are protected
2552 + against us by #ifndef _POSIX_SOURCE or somesuch. In this case,
2553 + we have to declare the timeval (and timezone) structs
2554 + ourselves. To force this, include -DDCLTIMEVAL in CFLAGS.
2556 + Warnings about dn_expand() Argument #4
2557 + WARNING: argument is incompatible with prototyp. It's the old
2558 + char versus unsigned char stupidity again. Try to find a
2559 + compiler switch like GCC's "-funsigned-char". Failing that, add
2560 + -DCKQUERYTYPE=xxx to CFLAGS, where xxx is whatever 'man
2561 + dn_expand' tells you the type of the 4th argument should be
2562 + (presumably either char or unsigned char; in the latter case
2563 + use CHAR to avoid confusion caused by multiple words.
2565 + Switch Table Overflow (in [112]ckcuni.c)
2566 + Add -DNOUNICODE to CFLAGS.
2568 + Compile-time warnings about ck_out() or tgetstr() or tputs():
2569 + Easy solution: Add -DNOTERMCAP to CFLAGS. But then you lose the
2570 + SCREEN function. Real solution: Try all different combinations
2571 + of the following CFLAGS:
2573 +-DTPUTSARGTYPE=char -DTPUTSFNTYPE=int
2574 +-DTPUTSARGTYPE=int -DTPUTSFNTYPE=void
2576 + Until the warnings go away, except maybe "ck_outc: return with
2577 + a value in a function returning void", and in that case also
2578 + add -DTPUTSISVOID.
2580 + "Passing arg 1 of to tputs() makes pointer from integer without a
2582 + Add -DTPUTSARG1CONST to CFLAGS.
2584 + "Undefined symbol: dup2"
2585 + Add -DNOZEXEC to CFLAGS.
2587 + "header file 'termcap.h' not found"
2588 + Add -DNOHTERMCAP to CFLAGS.
2590 + Other difficulties are generally of the "where is curses.h and what is
2591 + it called this week?" variety (most easily solved by making symlinks
2592 + in the include and lib directories), or overzealous complaints
2593 + regarding type mismatches in function calls because of the totally
2594 + needless and silly signed versus unsigned char conflict (*), etc. In
2595 + any case, please send any compilation or linking warnings or errors to
2596 + the author, preferably along with fixes.
2598 + * C-Kermit does not use the signed property of chars at all
2599 + anywhere, ever. So if all chars and char *'s can be made unsigned
2600 + at compile time, as they can in gcc with "-funsigned-char", they
2603 + IMPORTANT: If you find any of these hints necessary for a particular
2604 + make target (or you hit upon others not listed here), PLEASE SEND A
2607 +[113]kermit-support@columbia.edu
2608 + ________________________________________________________________________
2610 + 4.1. The Unix Makefile
2612 + [ [114]Top ] [ [115]Contents ] [ [116]Section Contents ] [ [117]Next ]
2615 + If your distribution does not contain a file with the name "makefile"
2616 + or "Makefile", then rename the file called ckuker.mak to makefile:
2618 +mv ckuker.mak makefile
2620 + Then type "make xxx", where xxx is the platform you want to build
2621 + C-Kermit for. These are listed in the [119]comments at the top of the
2622 + makefile. For example, to build C-Kermit for Linux, type:
2626 + Here are some typical examples:
2628 + Target Description
2629 + linux Linux, any version on any hardware platform
2630 + openbsd OpenBSD, any version on any hardware platform
2632 + aix43g AIX 4.3, built with gcc
2633 + solaris9 Solaris 9
2634 + solaris9g Solaris 9 built with gcc
2635 + hpux1100 HP-UX 11-point-anything
2637 + The makefile is quite long, and at least two versions of Unix, SCO
2638 + Xenix/286 and 2.x BSD, cannot cope with its length. An attempt to
2639 + "make sco286" gives the message "Make: Cannot alloc mem for env..
2640 + Stop". Solution: edit away some or all of the nonrelevant material
2641 + from the makefile. (A separate version of the makefile is provided for
2642 + BSD 2.x: ckubs2.mak but C-Kermit 8.0 can't be built for BSD 2.x -- it
2643 + has simply grown too large.)
2645 + Some make programs reportedly cannot handle continued lines (lines
2646 + ending in backslash (\)). If you have a problem with the makefile, try
2647 + editing the makefile to join the continued lines (remove the
2648 + backslashes and the following linefeed).
2650 + Other makefile troubles may occur because tabs in the makefile have
2651 + somehow been converted to spaces. Spaces and tabs are distinct in Unix
2654 + Similarly, carriage returns might have been added to the end of each
2655 + line, which also proves confusing to most Unix versions of make.
2657 + Check to see if there are comments about your particular version in
2658 + its makefile target itself. In a text editor such as EMACS or VI,
2659 + search for the make entry name followed by a colon, e.g. "linux:" (if
2660 + you really are building C-Kermit for Linux, do this now).
2662 + Check to see if there are comments about your particular version in
2663 + the [120]ckubwr.txt file ([121]CLICK HERE for the Web version).
2665 + If you have trouble with building [122]ckwart.c, or running the
2666 + resulting wart preprocessor program on [123]ckcpro.w:
2668 + 1. Just "touch" the [124]ckcpro.c file that comes in the distribution
2669 + and then give the "make" command again, or:
2670 + 2. Compile ckwart.c "by hand": cc -o wart ckwart.c, or:
2671 + 3. Try various other tricks. E.g. one Linux user reported that that
2672 + adding the "static" switch to the rule for building wart fixed
2675 +wart: ckwart.$(EXT)
2676 + $(CC) -static -o wart ckwart.$(EXT) $(LIBS)
2678 + If your compiler supports a compile-time option to treat ALL chars
2679 + (and char *'s, etc) as unsigned, by all means use it -- and send me
2680 + email to let me know what it is (I already know about gcc
2683 + To add compilation options (which are explained later in this
2684 + document) to your makefile target without editing the makefile,
2685 + include "KFLAGS=..." on the make command line, for example:
2687 +make linux KFLAGS=-DNODEBUG
2688 +make bsd "KFLAGS=-DKANJI -DNODEBUG -DNOTLOG -DDYNAMIC -UTCPSOCKET"
2690 + Multiple options must be separated by spaces. Quotes are necessary if
2691 + the KFLAGS= clause includes spaces. The KFLAGS are added to the end of
2692 + the CFLAGS that are defined in the selected makefile target. For
2693 + example, the "bsd" entry includes -DBSD4 -DTCPSOCKET, so the second
2694 + example above compiles Kermit with the following options:
2696 +-DBSD4 -DTCPSOCKET -DKANJI -DNODEBUG -DNOTLOG -DDYNAMIC -UTCPSOCKET
2698 + (Notice how "-UTCPSOCKET" is used to negate the effect of the
2699 + "-DTCPSOCKET" option that is included in the makefile target.)
2701 + WARNING: Be careful with KFLAGS. If you build C-Kermit, change some
2702 + files, and then run make again using the same make entry but
2703 + specifying different KFLAGS than last time, make won't detect it and
2704 + you could easily wind up with inconsistent object modules, e.g. some
2705 + of them built with a certain option, others not. When in doubt, "make
2706 + clean" first to make sure all your object files are consistent.
2707 + Similarly, if you change CFLAGS, LIBS, or any other items in the
2708 + makefile, or you rebuild using a different makefile target, "make
2711 + If you create a new makefile target, use static linking if possible.
2712 + Even though this makes your C-Kermit binary bigger, the resulting
2713 + binary will be more portable. Dynamically linked binaries tend to run
2714 + only on the exact configuration and version where they were built; on
2715 + others, invocation tends to fail with a message like:
2717 +Can't find shared library "libc.so.2.1"
2718 + ________________________________________________________________________
2720 + 4.2. The C-Kermit Initialization File
2722 + [ [125]Top ] [ [126]Contents ] [ [127]Section Contents ] [ [128]Next ]
2725 + (This section is obsolete.) Read [130]Section 5 about the
2726 + initialization file.
2727 + ________________________________________________________________________
2729 + 4.3. The 2.x BSD Makefile
2731 + [ [131]Top ] [ [132]Contents ] [ [133]Section Contents ] [ [134]Next ]
2734 + This section is obsolete. C-Kermit 6.0 was the last release that
2735 + could be built on PDP-11 based BSD versions.
2736 + ________________________________________________________________________
2738 + 4.4. The Plan 9 Makefile
2740 + [ [136]Top ] [ [137]Contents ] [ [138]Section Contents ] [ [139]Next ]
2743 + Use the separate makefile [141]ckpker.mk. NOTE: The Plan 9 version of
2744 + C-Kermit 8.0 has not yet been built. There should be no impediment to
2745 + building it. However, even when built successfully, certain key
2746 + features are missing, notably TCP/IP networking.
2747 + ________________________________________________________________________
2749 + 4.5. Makefile Failures
2751 + [ [142]Top ] [ [143]Contents ] [ [144]Section Contents ] [
2754 + First, be sure the source files are stored on your current disk and
2755 + directory with the right names (in lowercase). Second, make sure that
2756 + the makefile itself does not contain any lines with leading spaces:
2757 + indented lines must all start with horizontal TAB, and no spaces.
2759 + Then make sure that your Unix PATH is defined to find the appropriate
2760 + compiler for your makefile target. For example, on SunOS systems,
2761 + "make sunos41" builds C-Kermit for the BSD environment, and assumes
2762 + that /usr/ucb/cc will be used for compilation and linking. If your
2763 + PATH has /usr/5bin ahead of /usr/ucb, you can have problems at compile
2764 + or link time (a commonly reported symptom is the inability to find
2765 + "ftime" during linking). Fix such problems by redefining your Unix
2766 + PATH, or by specifying the appropriate "cc" in CC= and CC2= statements
2767 + in your makefile target.
2769 + During edits 166-167, considerable effort went into making C-Kermit
2770 + compilable by ANSI C compilers. This includes prototyping all of
2771 + C-Kermit's functions, and including the ANSI-defined system header
2772 + files for system and library functions, as defined in K&R, second
2773 + edition: <string.h>, <stdlib.h>, <unistd.h> (except in NeXTSTEP this
2774 + is <libc.h>), and <sys/stdtypes.h>. If you get warnings about any of
2775 + these header files not being found, or about argument mismatches
2776 + involving pid_t, uid_t, or gid_t, look in ckcdeb.h and make
2777 + amendments. C-Kermit assumes it is being compiled by an ANSI-compliant
2778 + C compiler if __STDC__ is defined, normally defined by the compiler
2779 + itself. You can force ANSI compilation without defining __STDC__
2780 + (which some compilers won't let you define) by including -DCK_ANSIC on
2781 + the cc command line.
2783 + On the other hand, if your compiler defines __STDC__ but still
2784 + complains about the syntax of Kermit's function prototypes, you can
2785 + disable the ANSI-style function prototyping by including -DNOANSI on
2788 + For SCO OpenServer, UNIX, ODT, and XENIX compilations, be sure to pick
2789 + the most appropriate [146]makefile target, and be sure you have
2790 + installed an SCO development system that is keyed to your exact SCO
2791 + operating system release, down to the minor version (like 2.3.1).
2793 + Also note that SCO distributes some of its libraries in encrypted
2794 + form, and they must be decrypted before C-Kermit can be linked with
2795 + them. If not, you might see a message like:
2797 +ld: file /usr/lib/libsocket.a is of unknown type: magic number = 6365
2799 + To decrypt, you must supply a key (password) that came with your
2800 + license. Call SCO for further info.
2802 + If your compiler uses something other than int for the pid (process
2803 + id) data type, put -DPID_T=pid_t or whatever in your CFLAGS.
2805 + If you get complaints about unknown data types uid_t and gid_t, put
2806 + -DUID_T=xxx -DGID_T=yyy in your CFLAGS, where xxx and yyy are the
2807 + appropriate types.
2809 + If your compilation fails because of conflicting or duplicate
2810 + declarations for sys_errlist, add -DUSE_STRERROR or -DNDSYSERRLIST to
2813 + If your compilation dies because getpwnam() is being redeclared (or
2814 + because of "conflicting types for getwpnam"), add -DNDGPWNAM to your
2815 + CFLAGS. If that doesn't work, then add -DDCGPWNAM to your CFLAGS (see
2816 + ckufio.c around line 440).
2818 + If the compiler complains about the declaration of getpwnam() during
2819 + an ANSI C compilation, remove the declaration from ckufio.c or change
2820 + the argument in the prototype from (char *) to (const char *).
2822 + If you get complaints that getpwuid() is being called with an improper
2823 + type, put -DPWID_T=xx in your CFLAGS.
2825 + If you get compile-time warnings that t_brkc or t_eofc (tchars
2826 + structure members, used in BSD-based versions) are undefined, or
2827 + structure-member- related warnings that might be traced to this fact,
2828 + add -DNOBRKC to CFLAGS.
2830 + If you get a linker message to the effect that _setreuid or _setregid
2831 + is not defined, add -DNOSETREU to CFLAGS, or add -DCKTYP_H=blah to
2832 + CFLAGS to make C-Kermit read the right <types.h>-kind-of-file to pick
2833 + up these definitions.
2835 + If you get a message that _popen is undefined, add -DNOPOPEN to
2838 + If you get a complaint at compile time about an illegal
2839 + pointer-integer combination in ckufio.c involving popen(), or at link
2840 + time that _popen is an undefined symbol, add the declaration "FILE
2841 + *popen();" to the function zxcmd() in ckufio.c (this declaration is
2842 + supposed to be in <stdio.h>). If making this change does not help,
2843 + then apparently your Unix does not have the popen() function, so you
2844 + should add -DNOPOPEN to your make entry, in which case certain
2845 + functions involving "file" i/o to the standard input and output of
2846 + subprocesses will not be available.
2848 + If your linker complains that _getcwd is undefined, you can add a
2849 + getcwd() function to ckufio.c, or add it to your libc.a library using
2855 +getcwd(buf,size) char *buf; int size; {
2862 + if (!buf) return(NULL);
2863 + if (!(pfp = popen("pwd","r"))) return(NULL);
2864 + fgets(buf,size-2,pfp);
2866 + buf[strlen(buf)-1] = '\0';
2867 + return((char *)buf);
2871 +#endif /* NOPOPEN */
2875 +FILE *popen(s,t) char *s,*t; {
2878 +#endif /* NOPOPEN */
2880 + If you get complaints about NPROC having an invalid value, add a valid
2881 + definition for it (depends on your system), as in the cray entry.
2883 + If you get some symbol that's multiply defined, it probably means that
2884 + a variable name used by Kermit is also used in one of your system
2885 + libraries that Kermit is linked with. For example, under PC/IX some
2886 + library has a variable or function called "data", and the variable
2887 + "data" is also used extensively by Kermit. Rather than edit the Kermit
2888 + source files, just put a -D in the make entry CFLAGS to change the
2889 + Kermit symbol at compile time. In this example, it might be
2892 + Some symbol is defined in your system's header files, but it produces
2893 + conflicts with, or undesired results from, Kermit. Try undefining the
2894 + symbol in the makefile target's CFLAGS, for example -UFIONREAD.
2896 + Some well-known symbol is missing from your system header files. Try
2897 + defining in the makefile target's CFLAGS, for example -DFREAD=1.
2899 + You get many warnings about pointer mismatches. This probably means
2900 + that Kermit is assuming an int type for signal() when it should be
2901 + void, or vice-versa. Try adding -DSIG_I (for integer signal()) or
2902 + -DSIG_V (for void) to CFLAGS. Or just include KFLAGS=-DSIG_V (or
2903 + whatever) in your "make" command, for example:
2905 +make bsd KFLAGS=-DSIG_V
2907 + You get many messages about variables that are declared and/or set but
2908 + never used. It is difficult to avoid these because of all the
2909 + conditional compilation in the program. Ignore these messages.
2911 + Some of C-Kermit's modules are so large, or contain so many character
2912 + string constants, or are so offensive in some other way, that some C
2913 + compilers give up and refuse to compile them. This is usually because
2914 + the -O (optimize) option is included in the make entry. If this
2915 + happens to you, you can (a) remove the -O option from the make entry,
2916 + which will turn off the optimizer for ALL modules; or (b) compile the
2917 + offending module(s) by hand, including all the switches from make
2918 + entry except for -O, and then give the appropriate "make" command
2919 + again; or (c) increase the value of the -Olimit option, if your
2920 + compiler supports this option; or (d) change the [147]makefile target
2921 + to first compile each offending module explicitly without
2922 + optimization, then compile the others normally (with optimization),
2925 +#Fortune 32:16, For:Pro 2.1 (mostly like 4.1bsd)
2927 + @echo 'Making C-Kermit $(CKVER) for Fortune 32:16 For:Pro 2.1...'
2928 + $(MAKE) ckuusx.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
2929 + -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
2930 + $(MAKE) ckuxla.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
2931 + -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
2932 + $(MAKE) ckudia.$(EXT) "CFLAGS= -DNODEBUG -DBSD4 -DFT21 -DNOFILEH \
2933 + -SYM 800 \ -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short"
2934 + $(MAKE) wermit "CFLAGS= -O -DNODEBUG -DBSD4 -DFT21 -DNOFILEH -SYM 800 \
2935 + -DDYNAMIC -DNOSETBUF -DCK_CURSES $(KFLAGS) -DPID_T=short" \
2936 + "LNKFLAGS= -n -s" "LIBS= -lcurses -ltermcap -lv -lnet"
2938 + As an extreme example, some compilers (e.g. gcc on the DG AViiON) have
2939 + been known to dump core when trying to compile ckwart.c with
2940 + optimization. So just do this one "by hand":
2942 +cc -o wart ckwart.c
2948 + and then give the "make" command again.
2950 + Speaking of wart, it is unavoidable that some picky compilers might
2951 + generate "statement unreachable" messages when compiling ckcpro.c.
2952 + Unreachable statements can be generated by the wart program, which
2953 + generates ckcpro.c automatically from [148]ckcpro.w, which translates
2954 + lex-like state/input constructions into a big switch/case
2957 + Some function in Kermit wreaks havoc when it is called. Change all
2958 + invocations of the function into a macro that evaluates to the
2959 + appropriate return code that would have been returned by the function
2960 + had it been called and failed, for example: -Dzkself()=0. Obviously
2961 + not a good idea if the function is really needed.
2963 + If you have just installed SunOS 4.1.2 or 4.1.3, you might find that
2964 + C-Kermit (and any other C program) fails to link because of unresolved
2965 + references from within libc. This is because of a mistake in Sun's
2966 + /usr/lib/shlib.etc files for building the new libc. Change the libc
2967 + Makefile so that the "ld" lines have "-ldl" at the end. Change the
2968 + README file to say "mv xccs.multibyte. xccs.multibyte.o" and follow
2970 + __________________________________________________________________________
2972 +5. INSTALLING THE KERMIT FILES
2974 + [ [149]Top ] [ [150]Contents ] [ [151]Next ] [ [152]Previous ]
2978 +5.1. [153]The C-Kermit Initialization File
2979 +5.2. [154]Text Files
2980 +5.3. [155]Installing the Kermit Files
2981 +5.4. [156]The Makefile Install Target
2983 + The C-Kermit executable does not need any external files to run.
2984 + Unlike, say, the cu program, which on most platforms is useless unless
2985 + you (as root) edit the /usr/spool/uucp/Systems and
2986 + /usr/spool/uucp/Devices files to supply whatever obscure and
2987 + undocumented syntax is required to match some supposedly user-friendly
2988 + mnemonic to the real pathname of whatever device you want to use,
2989 + Kermit runs on its own without needing any external configuration
2990 + files, and lets you refer to device (and network hosts and services)
2991 + by their own natural undisguised names.
2993 + Nevertheless, a number of external files can be installed along with
2994 + the C-Kermit executable if you wish. These include configuration and
2995 + customization files that are read by Kermit as well as documentation
2996 + files to be read by people. All of this material is (a) optional, and
2997 + (b) available on the Kermit website:
2999 +[157]http://www.columbia.edu/kermit/
3001 + and usually in a more pleasant form, perhaps also with updated
3002 + content. So if your computer is on the Internet, there is no need to
3003 + install anything but the Kermit executable if users know how to find
3004 + the Kermit website (and if they don't, Kermit's "help" command tells
3007 + 5.1. The C-Kermit Initialization File
3009 + In C-Kermit 7.0 and earlier, the standard initialization file was a
3010 + key C-Kermit component because:
3012 + a. It "loaded" the dialing and network directories.
3013 + b. It defined all the macros and variables for the services
3015 + c. It defined macros for quickly changing Kermit's file-transfer
3016 + performance tuning.
3018 + The standard initialization file is quite long (more than 600 lines)
3019 + and requires noticeable processing time (the slower the computer, the
3020 + more noticeable), yet few people actually use the services directory,
3021 + whose definition takes up most of its bulk. Meanwhile, in C-Kermit
3022 + 8.0, many of the remaining functions of the standard initialization
3023 + file are now built in; for example, the FAST, CAUTIOUS, and ROBUST
3026 + More to the point, many of the settings that could be made only in the
3027 + initialization and customization files can now be picked up from
3028 + environment variables. The first group identifies initialization and
3032 + The path of your Kermit initialization file, if any. This
3033 + overrides the built-in search for $HOME/.kermrc.
3036 + The character set used for encoding local text files.
3037 + Equivalent to SET FILE CHARACTER-SET.
3040 + The full pathname of one or more Kermit dialing directory
3041 + files. Equivalent to SET DIAL DIRECTORY.
3044 + The full pathname of one or more Kermit network directory
3045 + files. Equivalent to SET NETWORK DIRECTORY.
3049 + The full pathname of a directory containing Kermit (if any)
3050 + containing ckubwr.txt and other Kermit text files. Overrides
3051 + Kermit's built-in search for this directory.
3053 + The next group is related to dialing modems:
3056 + The telephonic numeric country code for this location, e.g. 1
3057 + for North America or 39 for Italy. It is recommended that this
3058 + one be set for all users, system-wide. Not only is it used to
3059 + process portable-format dialing directory entries, but it is
3060 + also compared against Kermit's built-in list of "tone
3061 + countries" to see if tone dialing can be used. Equivalent to
3062 + Kermit's SET DIAL COUNTRY-CODE command.
3065 + The telephonic numeric area code for this location, e.g. 212
3066 + for Manhattan, New York, USA. Recommend this one also be set
3067 + system-wide, so shared portable-format dialing directories will
3068 + work automatically for everybody. Equivalent to Kermit's SET
3069 + DIAL AREA-CODE command.
3072 + TONE or PULSE. Equivalent to Kermit's SET DIAL METHOD command.
3073 + If a dial method is not set explicitly (or implicitly from the
3074 + country code), Kermit does not specify a dialing method, and
3075 + uses the modem's default method, which tends to be pulse.
3078 + The telephonic numeric international dialing prefix for this
3079 + location. Equivalent to Kermit's SET DIAL INTL-PREFIX command.
3082 + The telephonic numeric long-distance dialing prefix for this
3083 + location. Equivalent to Kermit's SET DIAL LD-PREFIX command.
3086 + The telephonic numeric PBX internal call prefix for this
3087 + location. Equivalent to Kermit's SET DIAL PBX-INSIDE-PREFIX
3091 + The telephonic numeric PBX external call prefix for this
3092 + location. Equivalent to Kermit's SET DIAL PBX-OUTSIDE-PREFIX
3096 + The telephonic numeric PBX exchange (first part of the
3097 + subscriber number). Equivalent to Kermit's SET DIAL
3098 + PBX-EXCHANGE command.
3101 + A list of one or more telephonic numeric toll-free area codes.
3104 + The telephonic numeric toll-free dialing prefix, in case it is
3105 + different from the long-distance prefix. Equivalent to Kermit's
3106 + SET DIAL TF-PREFIX command.
3108 + The final group includes well-known environment variables that are
3109 + also used by Kermit:
3112 + Where the CD command should look for relative directory names.
3115 + The path of your Unix shell. Used by the RUN (!) command to
3116 + choose the shell to execute its arguments.
3119 + Your Unix username.
3122 + The name or path of your preferred editor (used by the EDIT
3123 + command). Equivalent to SET EDITOR.
3126 + The name or path of your preferred web browser (used by the
3127 + BROWSE command). Equivalent to Kermit's SET BROWSER command.
3129 + Does this mean the initialization file can be abolished? I think so.
3132 + * Kermit already does everything most people want it to do without
3134 + * Important site-specific customizations can be done with global
3135 + environment variables.
3136 + * There is no longer any need for everybody to have to use the
3137 + standard initialization file.
3138 + * This means that your initialization file, if you want one, can
3139 + contain your own personal settings, definitions, and preferences,
3140 + rather than 600 lines of "standard" setups.
3141 + * If you still want the services directory, you can either TAKE the
3142 + standard initialization file (which must be named anything other
3143 + than $HOME/.kermrc to avoid being executed automatically every
3144 + time you start Kermit), or you can make it a kerbang script and
3145 + execute it "directly" (the [158]makefile install target does this
3146 + for you by putting ckermit.ini in the same directory as the Kermit
3147 + binary, adding the appropriate Kerbang line to the top, and giving
3148 + it execute permission).
3150 + In fact, you can put any number of kerbang scripts in your PATH to
3151 + start up C-Kermit in different ways, to have it adopt certain
3152 + settings, make particular connections, execute complicated scripts,
3153 + whatever you want.
3157 + These are entirely optional. Many of them are to be found at the
3158 + Kermit website in HTML form (i.e. as Web pages with clickable links,
3159 + etc), and very likely also more up to date. Plain-text files that
3160 + correspond to Web pages were simply "dumped" by Lynx from the website
3161 + to plain ASCII text. The format is whatever Lynx uses for this
3162 + purpose. If you wish, you can install them on your computer as
3163 + described in the [159]next section.
3166 + Copyright notice, permissions, and disclaimer.
3169 + The standard initialization file, intended more for reference
3170 + (in most cases) than actual use; see [162]Section 5.1.
3173 + A sample customization file.
3175 + [164]ckermit70.txt
3176 + Supplement to [165]Using C-Kermit for version 7.0. Available on
3177 + the Kermit website as:
3178 + [166]http://www.columbia.edu/kermit/ckermit70.html
3180 + [167]ckermit80.txt
3181 + Supplement to [168]Using C-Kermit for version 8.0. Available on
3182 + the Kermit website as:
3183 + [169]http://www.columbia.edu/kermit/ckermit80.html
3186 + The general C-Kermit hints and tips ("beware") file. Available
3187 + on the Kermit website as:
3188 + [171]http://www.columbia.edu/kermit/ckcbwr.html
3191 + The Unix-specific C-Kermit hints and tips file. Available on
3192 + the Kermit website as:
3193 + [173]http://www.columbia.edu/kermit/ckubwr.html
3196 + Unix C-Kermit Installation Instructions (this file). Available
3197 + on the Kermit website as:
3198 + [175]http://www.columbia.edu/kermit/ckuins.html
3201 + C-Kermit compile-time configuration options. Available on the
3202 + Kermit website as:
3203 + [177]http://www.columbia.edu/kermit/ckccfg.html
3206 + The C-Kermit program logic manual. Available on the Kermit
3208 + [179]http://www.columbia.edu/kermit/ckcplm.html
3211 + Certificate Authority certificates for secure connections (see
3214 + 5.3. Installing the Kermit Files
3216 + There is an "install" target in the [182]makefile that you can use if
3217 + you wish. However, since every site has its own layout and
3218 + requirements, it is often better to install the Kermit files by hand.
3219 + You don't have to use the makefile install target to install C-Kermit.
3220 + This is especially true since not all sites build C-Kermit from
3221 + source, and therefore might not even have the makefile. But you should
3222 + read this section in any case.
3224 + If your computer already has an older version of C-Kermit
3225 + installed, you should rename it (e.g. to "kermit6" or "kermit7") so
3226 + in case you have any trouble with the new version, the old one is
3229 + In most cases, you need to be root to install C-Kermit, if only to
3230 + gain write access to directories in which the binary and manual page
3231 + are to be copied. The C-Kermit binary should be installed in a
3232 + directory that is in the users' PATH, but that is not likely to be
3233 + overwritten when you install a new version of the operating system. A
3234 + good candidate would be the /usr/local/bin/ directory, but the
3235 + specific choice is site dependent. Example (assuming the appropriate
3236 + Kermit binary is stored in your current directory as "wermit", e.g.
3237 + because you just built it from source and that's the name the makefile
3240 +mv wermit /usr/local/bin/kermit
3241 +chmod 755 /usr/local/bin/kermit
3243 + or (only after you finish reading this section!) simply:
3247 + IMPORTANT: IF C-KERMIT IS TO BE USED FOR DIALING OUT, you must also do
3248 + something to give it access to the dialout devices and lockfile
3249 + directories. The 'install' target does not attempt to set Kermit's
3250 + owner, group, and permissions to allow dialing out. This requires
3251 + privileges, open eyes, and human decision-making. Please read
3252 + [183]Sections 10 and [184]11 below, make the necessary decisions, and
3253 + then implement them by hand as described in those sections.
3255 + You should also install the man page, which is called ckuker.nr, in
3256 + the man page directory for local commands, such as /usr/man/man1/,
3257 + renamed appropriately, e.g. to kermit.1. This is also taken care of by
3260 + Optionally, the text files listed in the [185]previous section can be
3261 + placed in a publicly readable directory. Suggested directory names
3264 +/usr/local/doc/kermit/
3265 +/usr/local/lib/kermit/
3266 +/usr/share/lib/kermit/
3269 + (or any of these without the "/kermit"). Upon startup, C-Kermit checks
3270 + the following environment variables whose purpose is to specify the
3271 + directory where the C-Kermit text files are, in the following order:
3276 + If either of these is defined, C-Kermit checks for the existence of
3277 + the ckubwr.txt file (Unix C-Kermit Hints and Tips). If not found, it
3278 + checks the directories listed above (both with and without the
3279 + "/kermit") plus several others to see if they contain the ckubwr.txt
3280 + file. If found, various C-Kermit messages can refer the user to this
3283 + Finally, if you want to put the source code files somewhere for people
3284 + to look at, you can do that too.
3286 + 5.4. The Makefile Install Target
3288 + The makefile "install" target does almost everything for you if you
3289 + give it the information it needs by setting the variables described
3290 + below. You can use this target if:
3292 + * You downloaded the [186]complete C-Kermit archive and built
3293 + C-Kermit from source; or:
3294 + * You downloaded an [187]individual C-Kermit binary and the
3295 + [188]C-Kermit text-file archive, and your computer has a "make"
3298 + Here are the parameters you need to know:
3301 + Name of the binary you want to install as "kermit". Default:
3305 + (lower case) If you define this variable, its value is
3306 + prepended to all the following xxxDIR variables (8.0.211 and
3310 + If you want to install the Kermit files in a directory
3311 + structure like /opt/kermit/bin/, /opt/kermit/doc/,
3312 + /opt/kermit/src/, then define DESTIR as the root of this
3313 + structure; for example, /opt/kermit. The DESTDIR string should
3314 + not end with a slash. By default, DESTDIR is not defined. If it
3315 + is defined, but the directory does not exist, the makefile
3316 + attempts to create it, which might require you to be root. Even
3317 + so, this can fail if any segments in the path except the last
3318 + one do not already exist. WARNING: If the makefile creates any
3319 + directories, it gives them a mode of 755, and the default owner
3320 + and group. Modify these by hand if necessary.
3323 + Directory in which to install the Kermit binary (and the
3324 + standard C-Kermit initialization file, if it is found, as a
3325 + Kerbang script). If DESTDIR is defined, BINDIR must start with
3326 + a slash. BINDIR must not end with a slash. If DESTDIR is
3327 + defined, BINDIR is a subdirectory of DESTDIR. If BINDIR does
3328 + not exist, the makefile attempts to create it as with DESTDIR.
3329 + Default: /usr/local/bin.
3332 + Directory in which to install the C-Kermit manual page as
3333 + "kermit" followed by the manual-chapter extension (next item).
3334 + Default: /usr/man/man1. If MANDIR is defined, the directory
3335 + must already exist.
3338 + Extension for the manual page. Default: 1 (digit one).
3341 + Directory in which to install the C-Kermit source code. If
3342 + DESTDIR is defined, this is a subdirectory of DESTDIR. Default:
3346 + For secure builds only: Directory in which to install the
3347 + ca_certs.pem file. This must be the verification directory used
3348 + by programs that use the SSL libraries at your site. Default:
3349 + none. Possibilities include: /usr/local/ssl, /opt/ssl,
3350 + /usr/lib/ssl, . . . If CERTDIR is defined, the directory
3351 + must already exist.
3354 + Directory in which to install the C-Kermit text files. If
3355 + DESTDIR is defined, this is a subdirectory of DESTDIR. Default:
3356 + None. If INFODIR is defined but does not exist, the makefile
3357 + attempts to create it, as with DESTDIR.
3362 + Installs "wermit" as /usr/local/bin/kermit with permissions
3363 + 755, the default owner and group, and no special privileges.
3364 + The manual page is installed as /usr/man/man1/kermit.1. Text
3365 + files are not copied anywhere, nor are the sources.
3367 + make MANDIR= install
3368 + Just like "make install" but does not attempt to install the
3371 + make DESTDIR=/opt/kermit BINDIR=/bin SRCDIR=/src INFODIR=/doc install
3372 + Installs the Kermit binary "wermit" as /opt/kermit/bin/kermit,
3373 + puts the source code in /opt/kermit/src, and puts the text
3374 + files in /opt/kermit/doc, creating the directories if they
3375 + don't already exist, and puts the man page in the default
3378 + make BINDIR=/usr/local/bin CERTDIR=/usr/local/ssl install
3379 + Installs the Kerberized Kermit binary "wermit" as
3380 + /usr/local/bin/kermit, puts the CA Certificates file in
3381 + /usr/local/ssl/, and the man page in the normal place.
3383 + For definitive information, see the makefile. The following is
3384 + excerpted from the 8.0.211 makefile:
3386 +# The following symbols are used to specify library and header file locations
3387 +# Redefine them to the values used on your system by:
3388 +# . editing this file
3389 +# . defining the values on the command line
3390 +# . defining the values in the environment and use the -e option
3392 +prefix = /usr/local
3393 +srproot = $(prefix)
3394 +sslroot = $(prefix)
3395 +manroot = $(prefix)
3397 +K4LIB=-L/usr/kerberos/lib
3398 +K4INC=-I/usr/kerberos/include
3399 +K5LIB=-L/usr/kerberos/lib
3400 +K5INC=-I/usr/kerberos/include
3401 +SRPLIB=-L$(srproot)/lib
3402 +SRPINC=-I$(srproot)/include
3403 +SSLLIB=-L$(sslroot)/ssl/lib
3404 +SSLINC=-I$(sslroot)/ssl/include
3409 +BINDIR = $(prefix)/bin
3410 +MANDIR = $(manroot)/man/man1
3415 + __________________________________________________________________________
3417 +6. INSTALLING UNIX C-KERMIT FROM DOS-FORMAT DISKETTES
3419 + [ [189]Top ] [ [190]Contents ] [ [191]Next ] [ [192]Previous ]
3421 + This section is obsolete. We don't distribute C-Kermit on diskettes
3422 + any more because (a)there is no demand, and (b) it no longer fits.
3424 + If you received a DOS-format diskette containing a binary executable
3425 + C-Kermit program plus supporting text files, be sure to chmod +x the
3426 + executable before attempting to run it.
3428 + In version 5A(190) and later, all the text files on the C-Kermit
3429 + DOS-format diskettes are in Unix format: LF at the end of each line
3430 + rather than CRLF. This means that no conversions are necessary when
3431 + copying to your Unix file system, and that all the files on the
3432 + diskette, text and binary, can be copied together. The following
3433 + comments apply to the DOS-format diskettes furnished with version
3434 + 5A(189) and earlier or to other DOS-format diskettes you might have
3435 + obtained from other sources.
3437 + If you have received C-Kermit on MS-DOS format diskettes (such as
3438 + those distributed by Columbia University), you should make sure that
3439 + your DOS-to-Unix conversion utility (such as "dosread") both: (1)
3440 + changes line terminators in all files from carriage-return linefeed
3441 + (CRLF) to just linefeed (LF) (such as "dosread -a") and remove any
3442 + Ctrl-Z's, and (2) that all filenames are converted from uppercase to
3443 + lowercase. If these conversions were not done, you can use the
3444 + following shell script on your Unix system to do them:
3449 +# Shell script to convert C-Kermit DOS-format files into Unix format.
3450 +# Lowercases the filenames, strips out carriage returns and Ctrl-Z's.
3452 +x=$1 # the name of the source directory
3453 +y=$2 # the name of the target directory if [ $# -lt 2 ]; then
3454 + echo "usage: $0 source-directory target-directory"
3458 + echo "Converting files from $1 to $2"
3460 + echo "$0: cannot cd to $1"
3464 + j=`echo $i | tr 'A-Z' 'a-z'`
3465 + echo $x/$i =\> $y/$j
3466 + tr -d '\015\032' < $i > $y/$j
3470 + Cut out this shell script, save it as "convert.sh" (or any other name
3471 + you prefer), then "chmod +x convert.sh". Then, create a new, empty
3472 + directory to put the converted files in, and then "convert.sh /xxx
3473 + /yyy" where /xxx is the name of the directory where the PC-format
3474 + files are, and /yyy is the name of the new, empty directory. The
3475 + converted files will appear in the new directory.
3476 + __________________________________________________________________________
3478 +7. CHECKING THE RESULTS
3480 + [ [193]Top ] [ [194]Contents ] [ [195]Next ] [ [196]Previous ]
3482 + First some quick checks for problems that can be easily corrected by
3483 + recompiling with different options:
3485 + DIRECTORY listing is garbage
3486 + Permissions, size, and date are random garbage (but the
3487 + filenames are correct) in a C-Kermit DIRECTORY listing. On some
3488 + platforms, the lstat() function is present but simply doesn't
3489 + work; try adding -DNOLSTAT to CFLAGS and rebuild. If that
3490 + doesn't fix it, also add -DNOLINKBITS. If it's still not fixed,
3491 + remove -DNOLSTAT and -DNOLINKBITS and add -DNOSYMLINK.
3494 + When you make a connection with C-Kermit and transfer files
3495 + using the fullscreen (curses) file-transfer display, and then
3496 + get the C-Kermit> prompt back afterwards, do characters echo
3497 + when you type them? If not, the curses library has altered the
3498 + buffering of /dev/tty. Try rebuilding with KFLAGS=-DCK_NEWTERM.
3499 + If it already has -DCK_NEWTERM in CFLAGS, try removing it. If
3500 + that doesn't help, then rebuild with -DNONOSETBUF (yes, two
3501 + NO's). If none of this works (and you can't fix the code), then
3502 + either don't use the fullscreen display, or rebuild with
3505 + Ctrl-L or any SCREEN command crashes C-Kermit:
3506 + Rebuild with -DNOTERMCAP.
3508 + No prompt after CONNECT:
3509 + After escaping back from CONNECT mode, does your C-Kermit>
3510 + prompt disappear? (Yet, typing "?" still produces a command
3511 + list, etc) In that case, add -DCKCONINTB4CB to CFLAGS and
3514 + Here is a more thorough checklist can use to tell whether your version
3515 + of C-Kermit was built correctly for your Unix system, with hints on
3516 + how to fix or work around problems:
3518 + a. Start C-Kermit (usually by typing "./wermit" in the directory
3519 + where you ran the makefile). Do you see the C-Kermit> prompt? If
3520 + not, C-Kermit incorrectly deduced that it was running in the
3521 + background. The test is in conbgt() in [197]ckutio.c. If you can
3522 + fix it for your system, please send in the fix (Hint: read about
3523 + "PID_T" below). Otherwise, you can force C-Kermit to foreground
3524 + mode by starting it with the -z command line option, as in "kermit
3525 + -z", or giving the interactive command SET BACKGROUND OFF.
3526 + b. When you type characters at the C-Kermit prompt, do they echo
3527 + immediately? If not, something is wrong with concb() and probably
3528 + the other terminal mode settings routines in [198]ckutio.c. Be
3529 + sure you have used the most appropriate make entry.
3530 + c. At the C-Kermit> prompt, type "send ./?". C-Kermit should list all
3531 + the files in the current directory. If not, it was built for the
3532 + wrong type of Unix file system. Details below. In the meantime,
3533 + try SET WILDCARD-EXPANSION SHELL as a workaround.
3534 + d. CD to a directory that contains a variety of files, symlinks, and
3535 + subdirectories and give a DIRECTORY command at the C-Kermit>
3536 + prompt. Do the permissions, size, and date appear correct? If not
3537 + see [199]Section 4.0.
3538 + e. Assuming your platform supports long file names, create a file
3539 + with a long name in your current directory, e.g.:
3541 +$ touch thisisafilewithaveryveryveryveryveryveryveryverylooooooooongname
3543 + (you might need to make it longer than this, perhaps as long as
3544 + 257 or even 1025 characters).
3545 + Check with ls to see if your version of Unix truncated the name.
3546 + Now start C-Kermit and type "send thisis<ESC>". Does Kermit
3547 + complete the name, showing the same name as ls did? If not, wrong
3548 + filesystem. Read on.
3549 + f. Make sure that Kermit has the maximum path length right. Just type
3550 + SHOW FILE and see what it says about this. If it is too short,
3551 + there could be some problems at runtime. To correct, look in
3552 + [200]ckcdeb.h to see how the symbol CKMAXPATH is set and make any
3553 + needed adjustments.
3554 + g. Send a file to your new Kermit program from a different Kermit
3555 + program that is known to work. Is the date/timestamp of the new
3556 + file identical to the original? If not, adjustments are needed in
3557 + zstrdt() in [201]ckufio.c.
3558 + h. Go to another computer (Computer B) from which you can send files
3559 + to C-Kermit. Connect Computer B to the computer (A) where you are
3560 + testing C-Kermit. Then:
3561 + i. Send a file from B to A. Make sure it transferred OK and was
3562 + created with the the right name.
3563 + j. Send a file from B to A, specifying an "as-name" that is very,
3564 + very long (longer than the maximum name length on computer A).
3565 + Check to make sure that the file was received OK and that its name
3566 + was truncated to Computer A's maximum length. If not, check the
3567 + MAXNAMLEN definition in [202]ckufio.c.
3568 + k. Tell C-Kermit on Computer A to "set receive pathnames relative"
3569 + and then send it a file from Computer B specifying an as-name that
3570 + contains several directory segments:
3572 +send foo dir1/dir2/dir3/foo
3574 + Check to make sure that dir1/dir2/dir3/foo was created in Computer
3575 + A's current directory (i.e. that three levels of directories were
3577 + l. Repeat step k, but make each path segment in the pathname longer
3578 + than Computer A's maximum name length. Make sure each directory
3579 + name, and the final filename, were truncated properly.
3580 + m. Type Ctrl-C (or whatever your Unix interrupt character is) at the
3581 + prompt. Do you get "^C..." and a new prompt? If instead, you get a
3582 + core dump (this shouldn't happen any more) "rm core" and then
3583 + rebuild with -DNOCCTRAP added to your CFLAGS. If it did work, then
3584 + type another Ctrl-C. If this does the same thing as the first one,
3585 + then Ctrl-C handling is OK. Otherwise, the SIGINT signal is either
3586 + not getting re-armed (shouldn't happen) or is being masked off
3587 + after the first time it is caught, in which case, if your Unix is
3588 + POSIX-based, try rebuilding C-Kermit with -DCK_POSIX_SIG.
3589 + n. Type Ctrl-Z (or whatever your Unix suspend character is) to put
3590 + C-Kermit in the background. Did it work? If nothing happened, then
3591 + (a)your version of Unix does not support job control, or (b) your
3592 + version of C-Kermit was probably built with -DNOJC. If your
3593 + session became totally frozen, then you are probably running
3594 + C-Kermit on a Unix version that supports job control, but under a
3595 + shell that doesn't. If that's not the case, look in the congm()
3596 + and psuspend() routines in [203]ckutio.c and see if you can figure
3597 + out what's wrong. If you can't, rebuild with -DNOJC.
3598 + o. Give a SET LINE command for a dialout device, e.g. "set line
3599 + /dev/tty00". If you got some kind of permission or access denied
3600 + message, go read [204]Section 10 and then come back here.
3601 + p. After giving a successful SET LINE command, type "show comm" to
3602 + see the communication parameters. Do they make sense?
3603 + q. Type "set speed ?" and observe the list of available speeds. Is it
3604 + what you expected? If not, see [205]Section 2) of the
3605 + [206]Configurations Options document.
3606 + r. Give a SET SPEED command to change the device's speed. Did it
3607 + work? (Type "show comm" again to check.)
3608 + s. Try dialing out: SET MODEM TYPE , SET LINE , SET SPEED , DIAL . If
3609 + it doesn't work, keep reading. After dialing, can you REDIAL?
3610 + t. If your version was built with TCP/IP network support, try the
3612 + u. Transfer some files in remote mode on incoming asynchronous serial
3613 + (direct or modem) connections, and on incoming network (telnet,
3614 + rlogin, terminal server) connections. If you get lots of errors,
3615 + try different SET FLOW settings on the remote Kermit program.
3616 + v. Establish a serial connection from C-Kermit to another computer
3617 + (direct or dialed) and transfer some files. If you have network
3618 + support, do the same with a network connection.
3619 + w. If your version was built with fullscreen file transfer display
3620 + support, check that it works during local-mode file transfer.
3621 + Also, check C-Kermit's operation afterwards: is the echoing funny?
3622 + etc etc. If there are problems, see [207]Section 4.
3623 + x. If your version was built with script programming language
3624 + support, TAKE the ckedemo.ksc file to give it a workout.
3625 + y. Does C-Kermit interlock correctly with UUCP-family programs (cu,
3626 + tip, uucp, etc)? If not, read the section [208]DIALING OUT AND
3627 + COORDINATING WITH UUCP below.
3628 + z. Modem signals... Give a SET LINE command to a serial device and
3629 + then type the SHOW MODEM command. If it says "Modem signals
3630 + unavailable in this version of Kermit", then you might want to
3631 + look at the ttgmdm() routine in [209]ckutio.c and add the needed
3632 + code -- if indeed your version of Unix provides a way to get modem
3633 + signals (some don't; e.g. modem signals are a foreign concept to
3634 + POSIX, requiring politically incorrect workarounds).
3635 + aa. If it says "Modem signals unavailable", then it is likely that the
3636 + API for getting modem signals is provided, but it doesn't actually
3637 + do anything (e.g. ioctl(ttyfd,TIOCMGET,&x) returns EINVAL).
3638 + ab. In any case, it still should be able to manipulate the DTR signal.
3639 + To test, SET LINE , SET MODEM NONE, and HANGUP. The DTR light
3640 + should go out momentarily. If it doesn't, see if you can add the
3641 + needed code for your system to the tthang() routine in
3643 + ac. If your version of Kermit has the SET FLOW RTS/CTS command, check
3644 + to see if it works: give Kermit this command, set your modem for
3645 + RTS/CTS, transfer some files (using big packet and window sizes)
3646 + and watch the RTS and CTS lights on the modem. If they go on and
3647 + off (and Kermit does not get packet errors), then it works. If
3648 + your version of Kermit does not have this command, but your
3649 + version of Unix does support hardware flow control, take a look at
3650 + the tthflow() command in [211]ckutio.c and see if you can add the
3651 + needed code (see the section on [212]HARDWARE FLOW CONTROL below).
3652 + (And please [213]send back any added code, so that others can
3653 + benefit from it and it can be carried forward into future
3655 + ad. If C-Kermit starts normally and issues its prompt, echoing is
3656 + normal, etc, but then after returning from a CONNECT session, the
3657 + prompt no longer appears, try rebuilding with -DCKCONINTB4CB.
3658 + ae. (8.0.206 or later) Type some commands at the C-Kermit prompt. Can
3659 + you use the Up-arrow and Down-arrow keys on your keyboard to
3660 + access Kermit's command history? If not, and you're a programmer,
3661 + take a look at the USE_ARROWKEYS sections of ckucmd.c.
3662 + __________________________________________________________________________
3664 +8. REDUCING THE SIZE OF THE EXECUTABLE PROGRAM IMAGE
3666 + [ [214]Top ] [ [215]Contents ] [ [216]Next ] [ [217]Previous ]
3668 + Also see: [218]C-Kermit Configuration Options
3670 + a. Many of C-Kermit's options and features can be deselected at
3671 + compile time. The greatest savings at the least sacrifice in
3672 + functionality is to disable the logging of debug information by
3673 + defining NODEBUG during compilation. See the [219]Configurations
3674 + Options document for further information.
3675 + b. Use shared libraries rather than static linking. This is the
3676 + default on many Unix systems anyway. However, executables built
3677 + for dynamic linking with shared libraries are generally not
3678 + portable away from the machine they were built on, so this is
3679 + recommended if the binary is for your use only.
3680 + c. Most Unix systems have a "strip" command to remove symbol table
3681 + information from an executable program image. "man strip" for
3682 + further information. The same effect can be achieved by including
3683 + "-s" among the link flags when building C-Kermit.
3684 + d. SCO, Interactive, and some other Unix versions have an "mcs"
3685 + command. "mcs -d wermit" can be used to delete the contents of the
3686 + ".comment" section from the executable program image.
3687 + e. Many modern optimizers can be instructed to optimize for space
3688 + rather than execution efficiency. Check the CFLAGS in the makefile
3689 + target, adjust as desired.
3690 + __________________________________________________________________________
3694 + [ [220]Top ] [ [221]Contents ] [ [222]Next ] [ [223]Previous ]
3700 + 9.1.2. [226]ANSI C
3701 + 9.1.3. [227]Other Standards
3702 +9.2. [228]Library Issues
3703 +9.3. [229]Unix File System Peculiarities
3704 +9.4. [230]Hardware Flow Control
3705 +9.5. [231]Terminal Speeds
3706 +9.6. [232]Millisecond Sleeps
3707 +9.7. [233]Nondestructive Input Buffer Peeking
3708 +9.8. [234]Other System-Dependent Features
3709 +9.9. [235]Terminal Interruption
3711 + There are several major varieties of Unix: Bell Laboratories Seventh
3712 + Edition, AT&T System V, Berkeley Standard Distribution (BSD), and
3713 + POSIX. Each has many, many subvarieties and descendents, and there are
3714 + also hybrids that exhibit symptoms of two or more varieties, plus
3715 + special quirks of their own.
3717 + Seventh edition versions of C-Kermit include the compile-time option
3718 + -DV7 in the CFLAGS string in the makefile target. Various V7-based
3719 + implementations are also supported: -DCOHERENT, -DMINIX, etc.
3721 + AT&T-based versions of Unix Kermit include the compile-time option
3722 + -DATTSV (standing for AT∓T Unix System V). This applies to System
3723 + III and to System V up to and including Release 2. For System V
3724 + Release 3, the flag -DSVR3 should be used instead (which also implies
3725 + -DATTSV). This is because the data type of signal() and several other
3726 + functions was changed between SVR2 and SVR3. For System V Release 4,
3727 + include -DSVR4 because of changes in UUCP lockfile conventions; this
3728 + also implies -DSVR3 and -DATTSV.
3730 + For BSD, the flag -BSDxx must be included, where xx is the BSD version
3731 + number, for example BSD4 (for version 4.2 or later, using only 4.2
3732 + features), -DBSD41 (for BSD 4.1 only), -DBSD43 (for 4.3), -DBSD29 (BSD
3733 + 2.9 for DEC PDP-11s). -DBSD44 is for 4.4BSD, which is the basis of
3734 + FreeBSD, NetBSD, OpenBSD, BSDI, and Mac OS X, and which contains many
3735 + POSIX features, and has little relation to 4.3BSD and earlier.
3737 + For POSIX, include the flag -DPOSIX. POSIX defines a whole new set of
3738 + terminal i/o functions that are not found in traditional AT&T or
3739 + Berkeley implementations, and also defines the symbol _POSIX_SOURCE,
3740 + which is used in many system and library header files, mainly to
3741 + disable non-POSIX (i.e. useful) features.
3743 + Note (circa 1997): In order to enable serial speeds higher than 38400
3744 + bps, it is generally necessary to add -DPOSIX (among other things),
3745 + since the older terminal APIs can not accommodate the new speeds --
3746 + out o' bits. But this often also means wholesale conversion to POSIX
3747 + APIs. In general, just try adding -DPOSIX and then see what goes
3748 + wrong. Be wary of features disappearing: when _POSIX_SOURCE is
3749 + defined, all sorts of things that were perfectly OK before suddenly
3750 + become politically incorrect -- like reading modem signals, doing
3751 + hardware flow control, etc. POSIX was evidently not designed with
3752 + serial communication in mind!
3754 + Case in point: In UnixWare 7.0, #define'ing POSIX causes strictness
3755 + clauses in the header files to take effect. These prevent <sys/time.h>
3756 + from defining the timeval and timezone structs, which are needed for
3757 + all sorts of things (like select()). Thus, if we want the high serial
3758 + speeds, we have to circumvent the POSIX clauses.
3760 + Similarly in SCO OpenServer R5.0.4 where, again, we must use the POSIX
3761 + APIs to get at serial speeds higher than 38400, but then doing so
3762 + removes hardware flow control -- just when we need it most! In cases
3763 + like this, dirty tricks are the only recourse (search for SCO_OSR504
3764 + in [236]ckutio.c for examples).
3766 + For reasons like this, Unix implementations tend to be neither pure
3767 + AT&T nor pure BSD nor pure POSIX, but a mixture of two or more of
3768 + these, with "compatibility features" allowing different varieties of
3769 + programs to be built on the same computer. In general, Kermit tries
3770 + not to mix and match but to keep a consistent repertoire throughout.
3771 + However, there are certain Unix implementations that only work when
3772 + you mix and match. For example, the Silicon Graphics IRIX operating
3773 + system (prior to version 3.3) is an AT&T Unix but with a BSD file
3774 + system. The only way you can build Kermit successfully for this
3775 + configuration is to include -DSVR3 plus the special option -DLONGFN,
3776 + meaning "pretend I was built with -DBSDxx when it's time to compile
3777 + file-related code". See the "iris" makefile target.
3778 + ________________________________________________________________________
3782 + [ [237]Top ] [ [238]Section Contents ] [ [239]Contents ] [ [240]Next ]
3784 + SUBSECTION CONTENTS
3788 +9.1.3. [243]Other Standards
3790 + In edits 166-167 (1988-89), C-Kermit was heavily modified to try to
3791 + keep abreast of new standards while still remaining compatible with
3792 + old versions of C and Unix. There are two new standards of interest:
3793 + ANSI C (as described in Kernighan and Ritchie, "The C Programming
3794 + Language", Second Edition, Prentice Hall, 1988) and POSIX.1 (IEEE
3795 + Standard 1003.1 and ISO/IEC 9945-1, 1990, "Portable Operating System
3796 + Interface"). These two standards have nothing to do with each other:
3797 + you can build C-Kermit with a non-ANSI compiler for a POSIX system, or
3798 + for a non-POSIX system with with an ANSI compiler.
3802 + POSIX.1 defines a repertoire of system functions and header files for
3803 + use by C language programs. Most notably, the ioctl() function is not
3804 + allowed in POSIX; all ioctl() functions have been replaced by
3805 + device-specific functions like tcsetattr(), tcsendbreak(), etc.
3807 + Computer systems that claim some degree of POSIX compliance have made
3808 + some attempt to put their header files in the right places and give
3809 + them the right names, and to provide system library functions with the
3810 + right names and calling conventions. Within the header files,
3811 + POSIX-compliant functions are supposed to be within #ifdef
3812 + _POSIX_SOURCE..#endif conditionals, and non-POSIX items are not within
3813 + these conditionals.
3815 + If Kermit is built with neither -D_POSIX_SOURCE nor -DPOSIX, the
3816 + functions and header files of the selected version of Unix (or VMS,
3817 + etc) are used according to the CFLAGS Kermit was built with.
3819 + If Kermit is built with -D_POSIX_SOURCE but not -DPOSIX, then one of
3820 + the -DBSD or -DATTSV flags (or one that implies them) must also be
3821 + defined, but it still uses only the POSIX features in the system
3822 + header files. This allows C-Kermit to be built on BSD or AT&T systems
3823 + that have some degree of POSIX compliance, but still use BSD or AT&T
3824 + specific features.
3826 + The dilimma is this: it is often necessary to define _POSIX_SOURCE to
3827 + get at new or modern features, such as high serial speeds and the APIs
3828 + to deal with them. But defining _POSIX_SOURCE also hides other APIs
3829 + that Kermit needs, for example the ones dealing with modem signals
3830 + (others are listed just below). Thus all sorts of hideous contortions
3831 + are often required to get a full set of features.
3833 + The POSIX standard does not define anything about uucp lockfiles.
3834 + "make posix" uses NO (repeat, NO) lockfile conventions. If your
3835 + POSIX-compliant Unix version uses a lockfile convention such as
3836 + HDBUUCP (see below), use the "posix" entry, but include the
3837 + appropriate lockfile option in your KFLAGS on the "make" command line,
3840 +make posix "KFLAGS=-DHDBUUCP"
3842 + POSIX.1 also lacks certain other features that Kermit needs. For
3845 + * There is no defined way for an application to do wildcard matching
3846 + of filenames. Kermit uses the inode in the directory structure,
3847 + but POSIX.1 does not include this concept. (Later POSIX revisions
3848 + include functions named (I think) glob() and fnmatch(), but these
3849 + functions are not yet in Kermit, and might not be appropriate in
3851 + * There is no POSIX mechanism for sensing or controlling modem
3852 + signals, nor to enable RTS/CTS or other hardware flow control.
3853 + * There is no select() for multiplexing i/o, and therefore no
3855 + * There is no way to check if characters are waiting in a
3856 + communications device (or console) input buffer, short of trying
3857 + to read them -- no select(), ioctl(fd,FIONREAD,blah), rdchk(),
3858 + etc. This is bad for CONNECT mode and bad for sliding windows.
3859 + * No way to do a millisecond sleep (no nap(), usleep(), select(),
3861 + * There is no popen().
3863 + So at this point, there cannot be one single fully functional POSIX
3864 + form of C-Kermit unless it also has "extensions", as do Linux, QNX,
3867 + More on POSIX (quoting from a newsgroup posting by Dave Butenhof):
3869 + Standards tend to look at themselves as "enabling". So POSIX
3870 + standards say that, in order to use POSIX functions, a program must
3871 + define some macro that will put the development environment in
3872 + "POSIX mode". For the ancient POSIX 1003.1-1990, the symbol is
3873 + _POSIX_SOURCE. For recent revisions, it's _POSIX_C_SOURCE with an
3874 + appropriate value. POSIX 1003.1-1996 says that, to use its features
3875 + in a portable manner, you must define _POSIX_C_SOURCE=199506L
3876 + before including any header files.
3878 + But for Solaris, or Digital Unix, the picture is different. POSIX
3879 + is one important but small part of the universe. Yet POSIX
3880 + unconditionally and unambiguously REQUIRES that, when
3881 + _POSIX_C_SOURCE=199506L, ALL of the functions and definitions
3882 + required by the standard, and NO others (except in specific
3883 + restricted namespaces, specifically "_" followed by an uppercase
3884 + letter or "__" followed by a lowercase letter) shall be visible.
3885 + That kinda puts a cramp on BSD and SVID support, because those
3886 + require names that are not in the "protected" POSIX namespaces.
3887 + It's ILLEGAL to make those symbols visible, unless you've done
3888 + something else that's beyond the scope of POSIX to allow the system
3889 + to infer that you didn't really mean it.
3891 + In most cases, you should just compile, with no standards-related
3892 + macros defined. The system will make available every interface and
3893 + definition that isn't incompatible with the "main stream". There
3894 + may indeed be cases where two standards cross, and you really can't
3895 + use both together. But, in general, they play nicely together as
3896 + long as you don't do anything rash -- like telling the system that
3897 + it's not allowed to let them.
3899 + In the area of threads, both Solaris and Digital Unix support
3900 + incompatible thread APIs. We have POSIX and DCE, they have POSIX
3901 + and UI. The nasty areas are in the _r routines and in some aspects
3902 + of signal behavior. You cannot compile a single source file that
3903 + uses both semantics. That's life. It sounds as if Solaris defaults
3904 + to the UI variants, but allows you to define this
3905 + _POSIX_THREAD_SEMANTICS to get around it. We default to POSIX, and
3906 + allow you to define _PTHREAD_USE_D4 (automatically defined by the
3907 + cc "-threads" switch) to select the DCE thread variants. That
3908 + default, because you're operating outside of any individual
3909 + standard, is really just a marketing decision.
3910 + ______________________________________________________________________
3914 + [ [244]Top ] [ [245]Contents ] [ [246]Section Contents ] [
3915 + [247]Subsection Contents ] [ [248]Next ] [ [249]Previous ]
3917 + The major difference between ANSI C and earlier C compilers is
3918 + function prototyping. ANSI C allows function arguments to be checked
3919 + for type agreement, and (when possible) type coercion in the event of
3920 + a mismatch. For this to work, functions and their arguments must be
3921 + declared before they are called. The form for function declarations is
3922 + different in ANSI C and non-ANSI C (ANSI C also accepts the earlier
3923 + form, but then does not do type checking).
3925 + As of edit 167, C-Kermit tries to take full advantage of ANSI C
3926 + features, especially function prototyping. This removes many bugs
3927 + introduced by differing data types used or returned by the same
3928 + functions on different computers. ANSI C features are automatically
3929 + enabled when the symbol __STDC__ is defined. Most ANSI C compilers,
3930 + such as GNU CC and the new DEC C compiler define this symbol
3933 + On the downside, ANSI C compilation increases the
3934 + administrative/bureacratic burden, spewing out countless unneeded
3935 + warnings about mismatched types, especially when we are dealing with
3936 + signed and unsigned characters, requiring casts everywhere to shut up
3937 + the mindless complaints -- there is no use for signed chars in Kermit
3938 + (or probably anywhere else). Some compilers, mercifully, include a
3939 + "treat all chars as unsigned" option, and when available it should be
3940 + used -- not only to stop the warnings, but also to avoid unhelpful
3941 + sign extension on high-bit characters.
3943 + To force use of ANSI C prototypes, include -DCK_ANSIC on the cc
3944 + command line. To disable the use of ANSI prototypes, include -DNOANSI.
3945 + ______________________________________________________________________
3947 + 9.1.3. Other Standards
3949 + [ [250]Top ] [ [251]Contents ] [ [252]Section Contents ] [
3950 + [253]Subsection Contents ] [ [254]Next ] [ [255]Previous ]
3952 + As the years go by, standards with-which-all-must-comply continue to
3953 + pile up: AES, XPG2, XPG3, XPG4, FIPS 151-2, successive generations of
3954 + POSIX, OSF/1, X/Open, Spec 1170, UNIX95, Open Group UNIX98, ISO/IEC
3955 + 9945 parts 1-4, ISO 9899, 88Open, OS 99, Single Unix Specification
3956 + (SUS, [256]IEEE 1003.1-2001, not to mention "mature standards" like
3957 + V7, 4.2/4.3BSD, System V R3 and R4 (SVID2 and SVID3), 4.4BSD (the
3958 + basis for BSDI, OpenBSD, NetBSD, FreeBSD, Mac OS X etc), /usr/group,
3959 + plus assorted seismic pronouncements of the neverending series of
3960 + ephemeral corporate consortia, not to mention the libc-vs-glibc
3961 + turmoil in the Linux arena and who knows what else.
3963 + None of these standards simplifies life for portable applications like
3964 + C-Kermit -- each one is simply one more environment to support (or
3965 + circumvent, as in many cases these standards do more harm than good by
3966 + denying access to facilities we need, e.g. as noted in above in
3968 + ________________________________________________________________________
3970 + 9.2. Library Issues
3972 + [ [258]Top ] [ [259]Contents ] [ [260]Section Contents ] [
3973 + [261]Subsection Contents ] [ [262]Next ] [ [263]Previous ]
3975 + On most modern platforms, applications are -- and often must be --
3976 + dynamically linked. This has numerous advantages (smaller executables,
3977 + ability to patch a library and thereby patch all applications that use
3978 + it, etc), but also causes some headaches: most commonly, the library
3979 + ID built into the executable at link time does not match the ID of the
3980 + corresponding library on the target system, and so the loader refuses
3981 + to let the application run.
3983 + This problem only gets worse over time. In the Linux and *BSD world,
3984 + we also have totally different libraries (each with their own names
3985 + and numbering systems) that cover the same territory; for example,
3986 + curses vs ncurses, libc versus glibc. Combinations proliferate and any
3987 + given Unix computer might have any combination. For this reason it is
3988 + becoming increasingly difficult to produce a "Linux binary" for a
3989 + given architecture (e.g. PC or Alpha). There has to be a separate
3990 + binary for (at least) every combination of curses vs ncurses and libc
3993 + In such cases, the best advice is for every user to build C-Kermit
3994 + from source code on the system where it will run. Too bad most
3995 + commercial Unix vendors have stopped including C compilers with the
3997 + ________________________________________________________________________
3999 + 9.3. Unix File System Peculiarities
4001 + [ [264]Top ] [ [265]Contents ] [ [266]Section Contents ] [ [267]Next ]
4004 + Normally, including a BSD, System-V, POSIX, or DIRENT flag in the make
4005 + entry selects the right file system code. But some versions of Unix
4006 + are inconsistent in this regard, and building in the normal way either
4007 + gives compiler or linker errors, or results in problems at runtime,
4008 + typically failure to properly expand wildcard file specifications when
4009 + you do something like "send *.*", or failure to recognize long
4010 + filenames, as in "send filewithaveryveryveryveryverylongname".
4012 + C-Kermit is supposed to know about all the various styles of Unix file
4013 + systems, but it has to be told which one to use when you build it,
4014 + usually in the makefile target CFLAGS as shown below, but you might
4015 + also have to add something like -I/usr/include/bsd to CFLAGS, or
4016 + something like -lbsd to LIBS.
4018 + C-Kermit gives you the following CFLAGS switches to adapt to your file
4019 + system's peculiarities:
4021 +-DDIRENT - #include <dirent.h>
4022 +-DSDIRENT - #include <sys/dirent.h>
4023 +-DNDIR - #include <ndir.h>
4024 +-DXNDIR - #include <sys/ndir.h>
4025 +-DRTU - #include "/usr/lib/ndir.h", only if NDIR and XNDIR not defined.
4026 +-DSYSUTIMH - #include <sys/utime.h> for setting file creation dates.
4027 +-DUTIMEH - #include <utime.h> for setting file creation dates.
4029 + (Note, RTU should only be used for Masscomp RTU systems, because it
4030 + also selects certain other RTU-specific features.)
4032 + If none of these is defined, then <sys/dir.h> is used. IMPORTANT: If
4033 + your system has the file /usr/include/dirent.h then be sure to add
4034 + -DDIRENT to your makefile target's CFLAGS. "dirent" should be used in
4035 + preference to any of the others, because it supports all the features
4036 + of your file system, and the others probably don't.
4038 + Having selected the appropriate directory header file, you might also
4039 + need to tell Kermit how to declare the routines and variables it needs
4040 + to read the directory. This happens most commonly on AT&T System-V
4041 + based UNIXes, particularly System V R3 and earlier, that provide long
4042 + file and directory names (longer than 14 characters). Examples include
4043 + certain releases of HP-UX, DIAB DNIX, older versions of Silicon
4044 + Graphics IRIX, and perhaps also MIPS. In this case, try adding
4045 + -DLONGFN to your makefile target.
4047 + Another problem child is <sys/file.h>. Most Unix C-Kermit versions
4048 + need to #include this file from within [269]ckufio.c and
4049 + [270]ckutio.c, but some not only do not need to include it, but MUST
4050 + not include it because (a) it doesn't exist, or (b) it has already
4051 + been included by some other header file and it doesn't protect itself
4052 + against multiple inclusion, or (c) some other reason that prevents
4053 + successful compilation. If you have compilation problems that seem to
4054 + stem from including this file, then add the following switch to CFLAGS
4055 + in your makefile target:
4059 + There are a few odd cases where <sys/file.h> must be included in one
4060 + of the cku[ft]io.c files, but not the other. In that case, add the
4061 + aforementioned switch, but go into the file that needs <sys/file.h>
4062 + and add something like this:
4064 +#ifdef XXX /* (where XXX is a symbol unique to your system) */
4068 + before the section that includes <sys/file.h>.
4070 + Kermit's SEND command expands wildcard characters "?" and "*" itself.
4071 + Before version 5A, commands like "send *" would send all regular
4072 + (non-directory) files, including "hidden files" (whose names start
4073 + with "."). In version 5A, the default behavior is to match like the
4074 + Bourne shell or the ls command, and not include files whose names
4075 + start with dot. Such files can still be sent if the dot is included
4076 + explicitly in the SEND command: "send .oofa, send .*". To change back
4077 + to the old way and let leading wildcard characters match dot files,
4078 + include the following in your CFLAGS:
4082 + (In C-Kermit 6.0, there is also a command to control this at runtime.)
4084 + Complaints about data-type mismatches:
4086 + * If you get compile-time complaints about data type mismatches for
4087 + process-ID related functions like getpid(), add -DPID_T=pid_t.
4088 + * If you get compile-time complaints about data type mismatches for
4089 + user ID related functions like getuid(), add -DUID_T=uid_t.
4090 + * If you get compile-time complaints about data type mismatches for
4091 + user-ID related functions like getgid(), add -DGID_T=gid_t.
4092 + * If you get compile-time complaints about data type mismatches for
4093 + getpwuid(), add -DPWID_T=uid_t (or whatever it should be).
4095 + File creation dates: C-Kermit attempts to set the creation date/time
4096 + of an incoming file according to the date/time given in the file's
4097 + attribute packet, if any. If you find that the dates are set
4098 + incorrectly, you might need to build Kermit with the -DSYSUTIMEH flag,
4099 + to tell it to include <sys/utime.h>. If that doesn't help, look at the
4100 + code in zstrdt() in [271]ckufio.c.
4101 + ________________________________________________________________________
4103 + 9.4. Hardware Flow Control
4105 + [ [272]Top ] [ [273]Contents ] [ [274]Section Contents ] [ [275]Next ]
4108 + Hardware flow control is a problematic concept in many popular Unix
4109 + implementations. Often it is lacking altogether, and when available,
4110 + the application program interface (API) to it is inconsistent from
4111 + system to system. Here are some examples:
4113 + a. POSIX does not support hardware flow control.
4114 + b. RTS/CTS flow control support MIGHT be available for System V R3
4115 + and later if /usr/include/termiox.h exists (its successful
4116 + operation also depends on the device driver, and the device
4117 + itself, not to mention the cable, etc, actually supporting it). If
4118 + your SVR3-or-later Unix system does have this file, add:
4122 + to your CFLAGS. If the file is in /usr/include/sys instead, add:
4126 + Note that the presence of this file does not guarantee that
4127 + RTS/CTS will actually work -- that depends on the device-driver
4128 + implementation (reportedly, many Unix versions treat
4129 + hardware-flow-control related ioctl's as no-ops).
4130 + c. Search ("grep -i") through /usr/include/*.h and
4131 + /usr/include/sys/*.h for RTS or CTS and see what turns up. For
4132 + example, in SunOS 4.x we find "CRTSCTS". Figuring out how to use
4133 + it is another question entirely! In IBM AIX RS/6000 3.x, we have
4134 + to "add" a new "line discipline" (and you won't find uppercase RTS
4135 + or CTS symbols in the header files).
4136 + d. NeXTSTEP and IRIX, and possibly others, support hardware flow
4137 + control, but do not furnish an API to control it, and thus on
4138 + these systems Kermit has no command to select it -- instead, a
4139 + special device name must be used. (NeXTSTEP: /dev/cufa instead of
4140 + /dev/cua; IRIX: /dev/ttyf00)
4142 + See the routine tthflow() in [277]ckutio.c for details. If you find
4143 + that your system offers hardware flow control selection under program
4144 + control, you can add this capability to C-Kermit as follows:
4146 + a. See if it agrees with one of the methods already used in
4147 + tthflow(). if not, add new code, appropriately #ifdef'd.
4148 + b. Add -DCK_RTSCTS to the compiler CFLAGS in your makefile target or
4149 + define this symbol within the appropriate #ifdefs in
4152 + To illustrate the difficulties with RTS/CTS, here is a tale from Jamie
4153 + Watson <jw@adasoft.ch>, who added the RTS/CTS code for the RS/6000,
4154 + about his attempts to do the same for DEC ULTRIX:
4156 + "The number and type of hardware signals available to/from a serial
4157 + port vary between different machines and different types of serial
4158 + interfaces on each machine. This means that, for example, there are
4159 + virtually no hardware signals in or out available on the DECsystem
4160 + 3000/3100 series; on the DECsystem 5000/2xx series all modem
4161 + signals in/out are present on both built-in serial ports; on the
4162 + DECsystem 5100 some ports have all signals and some only have some;
4163 + and so on... It looks to me as if this pretty well rules out any
4164 + attempt to use hardware flow control on these platforms, even if we
4165 + could figure out how to do it. The confusion on the user level
4166 + about whether or not it should work for any given platform or port
4167 + would be tremendous. And then it isn't clear how to use the
4168 + hardware signals even in the cases where the device supports them."
4169 + ________________________________________________________________________
4171 + 9.5. Terminal Speeds
4173 + [ [279]Top ] [ [280]Contents ] [ [281]Section Contents ] [ [282]Next ]
4176 + The allowable speeds for the SET SPEED command are defined in
4177 + [284]ckcdeb.h. If your system supports speeds that are not listed in
4178 + "set speed ?", you can add definitions for them to ckcdeb.h.
4180 + Then if the speed you are adding is one that was never used before in
4181 + Kermit, such as 921600, you'll also need to add the appropriate
4182 + keywords to spdtab[] in [285]ckuus3.c, and the corresponding case to
4183 + ttsspd() in [286]ckutio.c.
4184 + ________________________________________________________________________
4186 + 9.6. Millisecond Sleeps
4188 + [ [287]Top ] [ [288]Contents ] [ [289]Section Contents ] [ [290]Next ]
4191 + There is no standard for millisecond sleeps, but at least five
4192 + different functions have appeared in various Unix versions that can be
4193 + used for this purpose: nap() (mostly in System V), usleep() (found at
4194 + least in SunOS and NeXT OS), select() (found in 4.2BSD and later, and
4195 + part of any TCP/IP sockets library), nanosleep(), and sginap(). If you
4196 + have any of these available, pick one (in this order of preference, if
4197 + you have more than one):
4199 +-DSELECT: Include this in CFLAGS if your system has the select() function.
4200 +-DNAP: Include this in CFLAGS if your system has the nap() function.
4201 +-USLEEP: Include this in CFLAGS if your system has the usleep() function.
4203 + NOTE: The nap() function is assumed to be a function that puts the
4204 + process to sleep for the given number of milliseconds. If your
4205 + system's nap() function does something else or uses some other units
4206 + of time (like the NCR Tower 32, which uses clock-ticks), do not
4209 + Reportedly, all versions of System V R4 for Intel-based computers, and
4210 + possibly also SVR3.2, include nap() as a kernel call, but it's not in
4211 + the library. To include code to use it via syscall(3112,x), without
4212 + having to include Xenix compatibility features, include the following
4213 + compile-time option:
4216 + ________________________________________________________________________
4218 + 9.7. Nondestructive Input Buffer Peeking
4220 + [ [292]Top ] [ [293]Contents ] [ [294]Section Contents ] [ [295]Next ]
4223 + Some AT&T Unix versions have no way to check if input is waiting on a
4224 + tty device, but this is a very important feature for Kermit. Without
4225 + it, sliding windows might not work very well (or at all), and you also
4226 + have to type your escape character to get Kermit's attention in order
4227 + to interrupt a local-mode file transfer. If your system offers an
4228 + FIONREAD ioctl, the build procedure should pick that up automatically
4229 + and use it, which is ideal.
4231 + If your system lacks FIONREAD but has a select() function, this can be
4232 + used instead. If the build procedure fails to include it (SHOW
4233 + FEATURES will list SELECT), then you can add it to your CFLAGS:
4237 + Conversely, if the build procedure tries to use select() when it
4238 + really is not there, add:
4242 + Note: select() is not part of System V nor of POSIX, but it has been
4243 + added to various System-V- and POSIX-based systems as an extension.
4245 + Some System-V variations (SCO Xenix/UNIX/ODT and DIAB DNIX) include a
4246 + rdchk() function that can be used for buffer peeking. It returns 0 if
4247 + no characters are waiting and 1 if characters are waiting (but unlike
4248 + FIONREAD, it does not tell the actual number). If your system has
4251 +-DRDCHK: Include this in CFLAGS if your system has the rdchk() function.
4253 + Otherwise, if your version of Unix has the poll() function (and the
4254 + /usr/include/poll.h file) -- which appears to be a standard part of
4255 + System V going back to at least SVR3, include:
4258 + ________________________________________________________________________
4260 + 9.8. Other System-Dependent Features
4262 + [ [297]Top ] [ [298]Contents ] [ [299]Section Contents ] [ [300]Next ]
4265 + Systems with <termios.h> might have the symbol IEXTEN defined. This is
4266 + used to turn "extended features" in the tty device driver on and off,
4267 + such as Ctrl-O to toggle output flushing, Ctrl-V to quote input
4270 + In most Unix implementations, it should be turned off during Kermit
4271 + operation, so if [302]ckutio.c finds this symbol, it uses it. This is
4272 + necessary, at least, on BSDI. On some systems, however, IEXTEN is
4273 + either misdefined or misimplemented. The symptom is that CR, when
4274 + typed to the command processor, is echoed as LF, rather than CRLF.
4275 + This happens (at least) on Convex/OS 9.1. The solution is to add the
4276 + following symbol to the makefile target's CFLACS:
4280 + However, in at least one Unix implementation, QNX 4.21, IEXTEN must be
4281 + set before hardware flow control can be used.
4283 + In edits 177 and earlier, workstation users noticed a "slow screen
4284 + writing" phenomenon during interactive command parsing. This was
4285 + traced to a setbuf() call in [303]ckutio.c that made console (stdout)
4286 + writes unbuffered. This setbuf() call has been there forever, and
4287 + could not be removed without some risk. Kermit's operation was tested
4288 + on the NeXT in edit 178 with the setbuf() call removed, and the
4289 + slow-writing symptom was cured, and everything else (command parsing,
4290 + proper wakeup on ?, ESC, Ctrl-U, and other editing characters,
4291 + terminal emulation, remote-mode and local-mode file transfer, etc)
4292 + seemed to work as well as or better than before. In subsequent edits,
4293 + this change was made to many other versions too, with no apparent ill
4294 + effects. To remove the setbuf() call for your version of Kermit, add:
4298 + Later reports indicate that adding -DNOSETBUF has other beneficial
4299 + effects, like cutting down on swapping when Kermit is run on
4300 + workstations with small memories. But BEWARE: on certain small Unix
4301 + systems, notably the AT&T 6300 and 3B1 (the very same ones that
4302 + benefit from NOSETBUF), NOSETBUF seems to conflict with CK_CURSES. The
4303 + program builds and runs OK, but after once using the curses display,
4304 + echoing is messed up. In this case, we use a System-V specific
4305 + variation in the curses code, using newterm() to prevent System V from
4306 + altering the buffering. See makefile entries for AT&T 6300 and 3B1.
4308 + The Unix version of C-Kermit includes code to switch to file
4309 + descriptor zero (stdin) for remote-mode file transfer. This code is
4310 + necessary to prevent Kermit from giving the impression that it is
4311 + "idle" during file transfers, which, at some sites, can result in the
4312 + job being logged out in the middle of an active file transfer by
4313 + idle-job monitors.
4315 + However, this feature can interfere with certain setups; for example,
4316 + there is a package which substitutes a pty/tty pair for /dev/tty and
4317 + sets file descriptor 0 to be read-only, preventing Kermit from sending
4318 + packets. Or... When a Unix shell is invoked under the PICK
4319 + environment, file descriptor 0 is inoperative.
4321 + To remove this feature and allow Kermit to work in such environments,
4322 + add the compile-time option:
4326 + On some versions of Unix, earlier releases of C-Kermit were reported
4327 + to render a tty device unusable after a hangup operation. Examples
4328 + include IBM AIX on the RT PC and RS/6000. A typical symptom of this
4329 + phenomenon is that the DIAL command doesn't work, but CONNECTing to
4330 + the device and dialing manually do work. A further test is to SET DIAL
4331 + HANGUP OFF, which should make dialing work once by skipping the
4332 + pre-dial hangup. However, after the connection is broken, it can't be
4333 + used any more: subsequent attempts to DIAL the same device don't work.
4334 + The cure is usually to close and reopen the device as part of the
4335 + hangup operation. To do this, include the following compile-time
4340 + Similarly, there is a section of code in ttopen(), which does another
4341 + close(open()) to force the O_NDELAY mode change. On some systems, the
4342 + close(open()) is required to make the mode change take effect, and
4343 + apparently on most others it does no harm. But reportedly on at least
4344 + one System V R4 implementation, and on SCO Xenix 3.2, the
4345 + close(open()) operation hangs if the device lacks carrier, EVEN THOUGH
4346 + the CLOCAL characteristic has just been set to avoid this very
4347 + problem. If this happens to you, add this to your CFLAGS:
4351 + or, equivalently, in your KFLAGS on the make command line. It stands
4352 + for NO Close(Open()) To Force Mode Change.
4354 + C-Kermit renames files when you give a RENAME command and also
4355 + according to the current SET FILE COLLISION option when receiving
4356 + files. The normal Unix way to rename a file is via two system calls:
4357 + link() and unlink(). But this leaves open a window of vulnerability.
4358 + Some Unix systems also offer an atomic rename(oldname,newname)
4359 + function. If your version of Unix has this function, add the following
4364 + C-Kermit predefines the RENAME for several Unix versions in
4365 + [304]ckcdeb.h (SVR4, SUNOS41, BSD44, AIXRS, etc). You can tell if
4366 + rename() is being used if the SHOW FEATURES command includes RENAME in
4367 + the compiler options list. If the predefined RENAME symbol causes
4368 + trouble, then add NORENAME to your CFLAGS. Trouble includes:
4370 + a. Linker complains that _rename is an unresolved symbol.
4371 + b. Linking works, but Kermit's RENAME command doesn't work (which
4372 + happens because older versions of rename() might have their
4373 + arguments reversed).
4375 + If rename() is not used, then Kermit uses link()/unlink(), which is
4376 + equivalent except it is not atomic: there is a tiny interval in which
4377 + some other process might "do something" to one of the files or links.
4379 + Some Unix systems (Olivetti X/OS, Amdahl UTS/V, ICL SVR3, etc) define
4380 + the S_ISREG and S_ISDIR macros incorrectly. This is compensated for
4381 + automatically in [305]ckufio.c. Other systems might have this same
4382 + problem. If you get a compile-time error message regarding S_ISREG
4383 + and/or S_ISDIR, add the following to your CFLAGS:
4387 + Finally, here's a symbol you should NEVER define:
4391 + It's used for commenting out blocks of code. If for some reason you
4392 + find that your compiler has COMMENT defined, then add -UCOMMENT to
4393 + CFLAGS or KFLAGS! Similarly, some header files have been known to
4394 + define COMMENT, in which case you must add "#undef COMMENT" to each
4395 + C-Kermit source module, after all the #includes.
4396 + ________________________________________________________________________
4398 + 9.9. Terminal Interruption
4400 + [ [306]Top ] [ [307]Contents ] [ [308]Section Contents ] [ [309]Next ]
4403 + When C-Kermit enters interactive command mode, it sets a Control-C
4404 + (terminal keyboard interrupt = SIGINT) trap to allow it to return to
4405 + the command prompt whenever the user types Control-C (or whatever is
4406 + assigned to be the interrupt character). This is implemented using
4407 + setjmp() and longjmp(). On some systems, depending on the machine
4408 + architecture and C compiler and who knows what else, you might get
4409 + "Memory fault (coredump)" or "longjmp botch" instead of the desired
4410 + effect (this should not happen in 5A(190) and later). In that case,
4411 + add -DNOCCTRAP to your CFLAGS and rebuild the program.
4413 + Job control -- the ability to "suspend" C-Kermit on a Unix system by
4414 + typing the "susp" character (normally Ctrl-Z) and then resume
4415 + execution later (with the "fg" command) -- is a tricky business.
4416 + C-Kermit must trap suspend signals so it can put the terminal back
4417 + into normal mode when you suspend it (Kermit puts the terminal into
4418 + various strange modes during interactive command parsing, CONNECT, and
4419 + file transfer). Supporting code is compiled into C-Kermit
4420 + automatically if <signal.h> includes a definition for the SIGTSTP
4421 + signal. HOWEVER... some systems define this signal without supporting
4422 + job control correctly. You can build Kermit to ignore SIGTSTP signals
4423 + by including the -DNOJC option in CFLAGS. (You can also do this at
4424 + runtime by giving the command SET SUSPEND OFF.)
4426 + NOTE: As of version 5A(190), C-Kermit makes another safety check.
4427 + Even if job control is available in the operating system (according
4428 + to the numerous checks made in congm()), it will still disable the
4429 + catching of SIGTSTP signals if SIGTSTP was set to SIG_IGN at the
4430 + time C-Kermit was started.
4432 + System V R3 and earlier systems normally do not support job control.
4433 + If you have an SVR3 system that does, include the following option in
4438 + On systems that correctly implement POSIX signal handling, signals can
4439 + be handled more reliably than in Bell, Berkeley, or AT&T Unixes. On
4440 + systems (such as QNX) that are "strictly POSIX", POSIX signal handling
4441 + *must* be used, otherwise no signal will work more than once. If you
4442 + have POSIX-based system and you find that your version of Kermit
4443 + responds to Ctrl-C (SIGINT) or Ctrl-Z (SIGTSTP) only once, then you
4444 + should add the following option to your CFLAGS:
4448 + But be careful; some POSIX implementations, notably 4.4BSD, include
4449 + POSIX signal handling symbols and functions as "stubs" only, which do
4450 + nothing. Look in <signal.h> for sigsetjmp and siglongjmp and read the
4452 + __________________________________________________________________________
4454 +10. DIALING OUT AND COORDINATING WITH UUCP
4456 + [ [311]Top ] [ [312]Contents ] [ [313]Next ] [ [314]Previous ]
4458 + NOTE: Red Hat Linux 7.2 and later include a new API that allows
4459 + serial-port arbitration by non-setuid/gid programs. This API has
4460 + not yet been added to C-Kermit. If C-Kermit is to be used for
4461 + dialing out on Red Hat 7.2 or later, it must still be installed as
4462 + described in this section and the next.
4464 + The short version:
4466 + In order for C-Kermit to be able to dial out from your Unix
4467 + computer, you need to give it the same owner, group, and
4468 + permissions as your other dialout programs, such as cu, tip,
4469 + minicom, uucp, seyon, etc.
4473 + Make sure your dialout line is correctly configured for dialing out
4474 + (as opposed to login). The method for doing this is different for each
4475 + kind of Unix. Consult your system documentation for configuring lines
4476 + for dialing out (for example, Sun SPARCstation IPC users should read
4477 + the section "Setting up Modem Software" in the Desktop SPARC Sun
4478 + System and Network Manager's Guide, or the Terminals and Modems
4479 + section of the HP manual, "Configuring HP-UX for Peripherals" (e.g.
4480 + /usr/sbin/sam => Peripheral Devices => Terminals and Modems => Add
4483 + Unlike most other multiuser, multitasking operating systems, Unix
4484 + allows multiple users to access the same serial device at the same
4485 + time, even though there is no earthly reason why two users should do
4486 + this. When they do, user A will read some of the incoming characters,
4487 + and user B will read the others. In all likelihood, neither user will
4488 + see them all. Furthermore, User B can hang up User A's call, etc.
4490 + Rather than change Unix to enforce exclusive access to serial devices
4491 + such as ttys, Unix developers chose instead to use a "lock file". Any
4492 + process that wants to open a tty device should first check to see if a
4493 + file of a certain name exists, and if so, not to open the device. If
4494 + the file does not exist, the process creates the file and then opens
4495 + the device. When the process closes the device, it destroys the
4496 + lockfile. This procedure was originated for use with Unix's UUCP, CU,
4497 + and TIP programs, and so these lockfiles are commonly called "UUCP
4498 + lockfiles" (UUCP = Unix-to-Unix Copy Program).
4500 + As you can imagine, this method is riddled with pitfalls:
4502 + * If a process does not observe the prevailing lockfile convention,
4503 + then it can interfere with other "polite" processes. And in fact,
4504 + very few Unix applications or commands handle lockfiles at all; an
4505 + original design goal of Unix was that "everything is a file", and
4506 + countless utilities operate on files directly (by opening them) or
4507 + indirectly through redirection of standard i/o, without creating
4508 + or looking for lockfiles.
4509 + * If a process crashes while it has the device open, the lockfile is
4510 + left behind, preventing further processes from using the device.
4511 + * Various versions of Unix use different names for the lockfiles,
4512 + put them in different directories, with different owners and
4513 + groups and permissions, and specify their contents differently.
4514 + * On a given platform, the lockfile conventions may change from one
4515 + Unix release to the next (for example, SunOS 4.0 to 4.1) or, in
4516 + the case of Linux, across different distributions.
4517 + * The same tty device might have more than one name, and most
4518 + lockfile conventions don't allow for this. Similarly for symbolic
4521 + In an attempt to address the problem of "stale" lockfiles, most UUCP
4522 + implementations put the PID (Process ID) of the creating process in
4523 + the lockfile. Thus, another process that wants to open the
4524 + corresponding device can check not only for the lockfile itself, but
4525 + also can check the PID for validity. But this doesn't work well
4528 + * PIDs are stored in diverse formats that change with every new
4529 + release (short, integer, long, or string in any of various
4530 + formats). If the reading program does not follow the same
4531 + convention as the writing program, it can diagnose a valid PID to
4532 + be invalid, and therefore not honor the lock.
4533 + * PIDs recycle. If the lockfile was created by PID 1234, which later
4534 + crashed without removing the lockfile, and then a new process 1234
4535 + exists a the time the lockfile is checked, the lockfile will be
4536 + improperly taken as valid, and access to the device denied
4539 + Several techniques address the problem of multiple names for the same
4542 + * Multiple lockfiles. For example, if the user opens a device
4543 + through a symlink, a lockfile is created for both the symlink name
4544 + and the true name (obtained from readlink()). However, when
4545 + multiple drivers are installed for the same device (e.g. /dev/cua,
4546 + /dev/cufa, etc), this approach won't work unless all applications
4547 + *know* all the different names for the same device and make
4548 + lockfiles for all of them, which is obviously not practical.
4549 + * Lockfiles whose names are not based on the device name. These
4550 + lockfiles generally have names like LK.inode/major/minor, where
4551 + inode, major, and minor are numbers, which will always be the same
4552 + for any physical device, no matter what its name. This form of
4553 + lockfile is used in System V R4 and its derivatives, such as
4554 + Solaris, UnixWare, etc. If lockfiles must be used (as opposed to,
4555 + say, kernel-based locks), this would seem to be the most effective
4558 + Most versions of Unix were not designed to accommodate third-party
4559 + communications software; thus vendors of these Unix products feel no
4560 + compunction about changing lockfile conventions from release to
4561 + release, since they also change their versions of the cu, uucp, tip,
4562 + etc, programs at the same time to match. And since the source code to
4563 + these programs might not be published, it is difficult for makers of
4564 + third-party products like C-Kermit to find out what the new
4565 + conventions are. It also forces release of new versions of C-Kermit
4566 + whenever the OS vendor makes a change like this.
4568 + Some Unix vendors have taken a small step to simplify communications
4569 + application development for their products: the inclusion of lockfile
4570 + routines in the standard system C runtime libraries to shield the
4571 + application from the details of lockfile management (IBM AIX is an
4572 + example). When such routines are used, communications applications do
4573 + not need modification when lockfile conventions change (although they
4574 + will need recompiling if the routines are statically linked into the
4575 + application). In the AIX example, the simple function calls ttylock(),
4576 + ttyunlock(), and ttylocked() replace hundreds of lines of ugly code in
4577 + C-Kermit that attempts to keep pace with every release of every Unix
4578 + product over the last 20 years. Inclusion of ttylock() code occurs
4583 + is included in the CFLAGS.
4585 + If such routines are available, they should be used. The rest of this
4586 + section applies when they are not.
4588 + To fit in with UUCP and other Unix-based communication software,
4589 + C-Kermit must have the same idea as your system's uucp, cu, and tip
4590 + programs about what the UUCP lock directory is called, what the
4591 + lockfile itself is called, and what its contents should be. In most
4592 + cases, C-Kermit preprocessor flags create the appropriate
4593 + configuration at compile time if the appropriate makefile target was
4594 + used (see [315]ckutio.c). The following CFLAGS options can be used to
4595 + override the built-in configuration:
4598 + Tells Kermit that the UUCP lock directory is
4599 + /usr/spool/uucp/LCK.
4602 + Tells Kermit to use the BSD 4.3 acucntrl() program to turn off
4603 + getty (login) on the line before using it, and restore getty
4607 + Include this if your system uses Honey DanBer UUCP, in which
4608 + the lockfile directory and format are relatively standardized.
4610 + -DLOCK_DIR=\\\"/xxx/yyy\\\"
4611 + Gives the lock directory name explicitly. The triple quoting is
4612 + necessary. For example:
4614 +CFLAGS= -DBSD4 -DLOCK_DIR=\\\"/usr/local/locks\\\" -DNODEBUG
4616 + (NOTE: The triple quoting assumes this is a "top-level" make
4617 + entry, and not a make entry that calls another one.)
4619 + -DLFDEVNO The lockfile name uses the tty device inode and major and
4621 + numbers: LK.dev.maj.min, as in Sys V R4, e.g. LK.035.044.008.
4623 + When the LK.inode.major.minor form is used, a single lockfile is
4624 + enough. Otherwise, a single lockfile rarely suffices. For example, in
4625 + Linux, it is common to have a /dev/modem symbolic link to an actual
4626 + dialout device, like /dev/cua0 or /dev/ttyS0, whose purpose is to hide
4627 + the details of the actual driver from the user. So if one user opens
4628 + /dev/modem, a lockfile called LCK..modem is created, which does not
4629 + prevent another user from simulataneously opening the same device by
4632 + On SCO Unix platforms, we have a slightly different problem: the same
4633 + device is, by convention, known by "lowercase" and "uppercase" names,
4634 + depending on whether it has modem control. So by convention,
4635 + communications programs are supposed to create the lockfiles based on
4636 + the lowercase name. But some programs don't follow this convention. In
4637 + HP-UX, we have several different names for each serial device. And so
4640 + For this reason, on platforms where the LK.inode.major.minor form is
4641 + not used, C-Kermit also creates a secondary lockfile (which is simply
4642 + a link to the first) if:
4644 + a. The given device name is a symbolic link. The secondary link is
4645 + based on the device's real name.
4646 + b. On SCO: The device name is not a symbolic link, but it contains
4647 + uppercase letters. The primary link is based on the lowercase
4648 + name; the secondary link is based on the name that was given.
4649 + c. On HP-UX: The device name starts with "cu". The primary link is
4650 + based on the name that was given; the secondary link is based on
4651 + the corresponding "ttyd" device, e.g. "LCK..cua0p0" and
4654 + NOTE: symlinks are not handled in HP-UX.
4656 + Honey DanBer (HDB) UUCP, which is becoming increasingly popular, has
4657 + two characteristics:
4659 + a. Lockfiles are kept in /usr/spool/locks/ (usually).
4660 + b. A lockfile contains the process id (pid) in ASCII, rather than as
4663 + Non-HDB selections assume the lockfile contains the pid in int form
4664 + (or, more precisely, in PID_T form, where PID_T is either int or
4665 + pid_t, depending on your system's C library and header files). (b), by
4666 + the way, is subject to interpretation: the numeric ASCII string may or
4667 + may not be terminated by a newline, it may or may not have leading
4668 + spaces (or zeros), and the number of leading spaces or zeros can
4669 + differ, and the differences can be significant.
4671 + Even if you build the program with the right lockfile option, you can
4672 + still have problems when you try to open the device. Here are the
4673 + error messages you can get from SET LINE, and what they mean:
4675 + a. "Timed out, no carrier." This one is not related to lockfiles. It
4676 + means that you have SET CARRIER ON xx, where xx is the number of
4677 + seconds to wait for carrier, and carrier did not appear within xx
4678 + seconds. Solution: SET CARRIER AUTO or OFF.
4679 + b. "Sorry, access to lock denied." Kermit has been configured to use
4680 + lockfiles, but (a)the lockfile directory is write-protected
4681 + against you, or (b) it does not exist. The "access to lock denied"
4682 + message will tell you the reason. If the directory does not exist,
4683 + check to make sure Kermit is using the right name. Just because
4684 + version n of your Unix used a certain lockfile directory is no
4685 + gurantee that version n.1 does not use a different one.
4686 + Workaround: ask the system administrator to install a symbolic
4687 + link from the old name to the new name. Other solutions: (see
4689 + c. "Sorry, access to tty device denied." The tty device that you
4690 + specified in your SET LINE command is read/write protected against
4691 + you. Solution: (see below)
4692 + d. "Sorry, device is in use." The tty device you have specified is
4693 + currently being used by another user. A prefatory message gives
4694 + you an "ls -l" listing of the lockfile, which should show the
4695 + username of the person who created it, plus a message "pid = nnn"
4696 + to show you the process id of the user's program. Solutions: try
4697 + another device, wait until the other user is finished, ask the
4698 + other user to hurry up, or ask the system manager for help.
4699 + e. "Sorry, can't open connection: reason". The device cannot be
4700 + opened for some other reason, which is listed.
4701 + f. "sh: /usr/lib/uucp/acucntrl: not found". This means your Kermit
4702 + program was built with the -DACUCNTRL switch, but your computer
4703 + system does not have the BSD 4.3 acucntrl program. Solution:
4704 + install the acucntrl program if you have it, or rebuild Kermit
4705 + without the -DACUCNTRL switch.
4707 + There are two solutions for problems (b) and (c), both of which
4708 + involve intervention by your Unix system administrator (superuser):
4710 + a. Have the superuser change the permission of the lockfile directory
4711 + and to the tty devices so that everyone on the system has
4712 + read/write permission.
4714 +su% chmod 777 /usr/spool/locks (or whatever the path is)
4715 +su% chmod 666 /dev/ttyXX
4717 + One risk here is that people can write lots of junk into the
4718 + lockfile directory, delete other people's files in the lockfile
4719 + directory, and intercept other people's data as it goes in and out
4720 + of the tty device. The major danger here would be intercepting a
4721 + privileged password. Of course, any user could write a short,
4722 + ordinary, unprivileged program to do exactly the same thing if the
4723 + tty device was world read/writeable. The other risk as that
4724 + telephone calls are not controlled -- anybody on your system can
4725 + make them, without having to belong to any particular group, and
4726 + this could run up your phone bill.
4727 + b. Use groups to regulate access. Normally the lockfile directory and
4728 + and the dialout devices will have the same group (such as uucp).
4729 + If so, then put everybody who's allowed to dial out into that
4730 + group, and make sure that the lockfile directory and the tty
4731 + devices have group read AND write permission. Example:
4733 +su% chmod 770 /usr/spool/locks (or whatever the path is)
4734 +su% chmod 660 /dev/ttyXX
4736 + User whatever tool is available on your platform to add users to
4737 + the appropropriate group (e.g. edit the /etc/group file).
4738 + c. Have the superuser change Kermit to run setuid and/or setgid to
4739 + the owner and/or group of the lockfile directory and the tty
4740 + devices if necessary), typically uucp (see [316]next section), but
4741 + NOT root. Example:
4743 +su% chown uucp kermit - or - chgrp uucp kermit
4744 +su% chmod u+s kermit (setuid) - or - chmod g+s kermit (setgid)
4746 + and then make sure the lockfile directory, and the tty devices,
4747 + have owner (setuid) and/or group (setgid) write permission. For
4750 +su% chmod o+rwx /usr/spool/uucp
4751 +su% chown uucp /dev/ttyXX ; chmod 600 /dev/ttyXX
4753 + In some cases, the owner and group must be distinct; the key point
4754 + is that read/write access is required to both the UUCP lockfile
4755 + directory and the tty itself.
4757 + If you make C-Kermit setuid or setgid to root, it refuses to run:
4759 +Fatal: C-Kermit setuid to root!
4763 +crw-r----- 1 uucp uucp 5, 67 Feb 11 06:23 /dev/cua3
4764 +drwxrwxr-x 3 root uucp 1024 Feb 11 06:22 /var/lock
4766 + requires suid uucp to get read/write access on /dev/cua3 and sgid to
4767 + get read/write access on /var/lock (since you can't set Kermit's uid
4770 + The reason Kermit can't be setuid or setgid to root has to do with
4771 + the fact that some Unix OS's can't switch user or group IDs in that
4772 + case. Unfortunately, the prohibition against making Kermit setuid
4773 + or setgid to root means that Unix C-Kermit can't be used to make
4774 + rlogin connections by non-root users. (The rlogin port is
4775 + privileged, which is why the regular rlogin command is setuid root
4776 + -- which is safe because the rlogin program never has to create or
4777 + access files like Kermit does.)
4779 + For the lockfile mechanism to achieve its desired purpose --
4780 + prevention of access to the same tty device by more than one process
4781 + at a time -- ALL programs on a given computer that open, read or
4782 + write, and close tty devices must use the SAME lockfile conventions.
4783 + Unfortunately, this is often not the case. Here is a typical example
4784 + of how this can go wrong: In SunOS 4.0 and earler, the lockfile
4785 + directory was /usr/spool/uucp; in 4.1 it was changed to
4786 + /var/spool/locks in the quest for political correctness. Consequently,
4787 + any third-party programs (such as C-Kermit) that were not modified to
4788 + account for this change, recompiled, and reinstalled, did not use the
4789 + same lockfiles as uucp, tip, etc, and so the entire purpose of the
4790 + lockfile is defeated.
4792 + What if your Unix system does not have UUCP installed? For example,
4793 + you have a Unix workstation, and you do not use uucp, cu, or tip, or
4794 + UUCP was not even supplied with your version of Unix (QNX is an
4795 + example). In this case, you have two choices:
4797 + a. If there may be more than one person running Kermit at the same
4798 + time, competing for the same tty device, then create a special
4799 + lockfile directory just for Kermit, for example,
4800 + /usr/spool/kermit, and make sure you have read/write access to it.
4801 + Then add the following to your makefile target CFLAGS, as shown
4804 +-DLOCK_DIR=\\\"/usr/spool/kermit\\\"
4806 + b. If you are the only user on your workstation, and no other
4807 + processes will ever be competing with Kermit for the dialout tty
4808 + device, then add -DNOUUCP to your makefile target's CFLAGS and
4810 + __________________________________________________________________________
4812 +11. RUNNING UNIX C-KERMIT SETUID OR SETGID
4814 + [ [317]Top ] [ [318]Contents ] [ [319]Next ] [ [320]Previous ]
4816 + Even if you don't intend to run C-Kermit setuid, somebody else might
4817 + come along and chown and chmod it after it has been built. You should
4818 + be sure that it is built correctly to run setuid on your system. For
4819 + POSIX and AT&T Unix based versions, you don't have to do anything
4822 + For 4.2 and 4.3 BSD-based Unix versions, you normally need not add
4823 + anything special to the makefile. The program assumes that the
4824 + setreuid() and setregid() functions are available, without which we
4825 + cannot switch back and forth between real and effective uids. If
4826 + "make" complains that _setreuid or _setregid is/are not defined, add
4827 + -DNOSETREU to CFLAGS. In this case it is very likely (but not certain)
4828 + that you cannot protect ttys and lockfiles against people and have
4829 + them run Kermit setuid.
4831 + If make does not complain about this, you should find out whether your
4832 + BSD version (4.3 or other systems like SunOS 4.x that claim to include
4833 + BSD 4.3 compatibility) includes the saved-setuid feature (see long
4834 + notes under edit 146 in ckc178.upd). If it does, then add -DSAVEDUID
4837 + IMPORTANT NOTE: Most Unix system documentation will not give you
4838 + the required information. To determine whether your Unix system
4839 + supplies the the saved-original-effective-user/group-id feature,
4840 + use the ckuuid.c program. Read and follow the instructions in the
4841 + comments at the beginning.
4843 + C-Kermit for 4.4BSD-based systems automatically use sete[ug]id(). See
4846 + If you have a version of Unix that is not BSD-based, but which
4847 + supplies the setreuid() and setregid() functions, and these are the
4848 + only way to switch between real and effective uid, add -DSETREUID to
4849 + your makefile target.
4851 + WARNING: There are two calls to access() in [322]ckufio.c, by which
4852 + Kermit checks to see if it can create an output file. These calls
4853 + will not work correctly when (a)you have installed C-Kermit setuid
4854 + or setgid on a BSD-based Unix system, and (b) the
4855 + saved-original-effective-uid/gid feature is not present, and (c)
4856 + the access() function always checks what it believes to be the real
4857 + ID rather than the effective ID. This is the case, for example, in
4858 + Olivetti X/OS and in NeXTSTEP. In such cases, you can force correct
4859 + operation of access() calls by defining the symbol SW_ACC_ID at
4860 + compile time in CFLAGS.
4862 + If you have a version of Unix that does not allow a process to switch
4863 + back and forth between its effective and real user and group ids
4864 + multiple times, you probably should not attempt to run Kermit setuid,
4865 + because once having given up its effective uid or gid (which it must
4866 + do in order to transfer files, fork a shell, etc) it can never get it
4867 + back, and so it can not use the original effective uid or gid to
4868 + create or delete uucp lockfiles. In this case, you'll either have to
4869 + set the permissions on your lockfile directory to make them publicly
4870 + read/writable, or dispense with locking altogether.
4872 + MORAL: Are you thoroughly sickened and/or frightened by all that you
4873 + have just read? You should be. What is the real answer? Simple. Serial
4874 + devices -- such as ttys and magnetic tapes -- in Unix should be opened
4875 + with exclusive access only, enforced by the Unix kernel. Shared access
4876 + has no conceivable purpose, legitimate or otherwise, except by
4877 + privileged system programs such as getty. The original design dates
4878 + from the late 1960s, when Unix was developed for laboratory use under
4879 + a philosophy of trust by people within shouting distance of each other
4880 + -- but even then, no useful purpose was served by this particular form
4881 + of openness; it was probably more of a political statement. Since the
4882 + emergence of Unix from the laboratory into the commercial market, we
4883 + have seen every vestige of openness -- but this one -- stripped away.
4884 + I'd like to see some influential Unix maker take the bold step of
4885 + making the simple kernel change required to enforce exclusive access
4886 + to serial devices. (Well, perhaps not so simple when bidirectionality
4887 + must also be a goal -- but then other OS's like VMS solved this
4888 + problem decades ago.)
4889 + __________________________________________________________________________
4891 +12. CONFIGURING UNIX WORKSTATIONS
4893 + [ [323]Top ] [ [324]Contents ] [ [325]Next ] [ [326]Previous ]
4895 + On desktop workstations that are used by only the user at the console
4896 + keyboard, C-Kermit is always used in local mode. But as delivered,
4897 + C-Kermit runs in remote mode by default. To put it in local mode at
4898 + startup, you can put a SET LINE command in your .mykermrc.
4900 + You can also build C-Kermit to start up in local mode by default. To
4901 + do this, include the following in the CFLAGS in your makefile target:
4903 +-DDFTTY=\\\"/dev/ttyxx\\\"
4905 + where ttyxx is the name of the device you will be using for
4906 + communications. Presently there is no way of setting the default modem
4907 + type at compile time, so use this option only for direct lines.
4909 + C-Kermit does not work well on certain workstations if it is not run
4910 + from within a terminal window. For example, you cannot start C-Kermit
4911 + on a NeXT by launching it directly from NeXTstep. Similarly for Sun
4912 + workstations in the Open Windows environment. Run Kermit in a terminal
4914 + __________________________________________________________________________
4916 +13. BIZARRE BEHAVIOR AT RUNTIME
4918 + [ [327]Top ] [ [328]Contents ] [ [329]Next ] [ [330]Previous ]
4920 + See the "beware file",
4922 + [331]ckubwr.txt, for hints about runtime misbehavior. This section
4923 + lists some runtime problems that can be cured by rebuilding C-Kermit.
4925 + The program starts, but there is no prompt, and certain operations
4926 + don't work (you see error messages like "Kermit command error in
4927 + background execution"). This is because Kermit thinks it is running in
4928 + the background. See conbgt() in [332]ckutio.c. Try rebuilding Kermit
4933 + added to your CFLAGS. If that doesn't help, find out the actual data
4934 + type for pids (look in types.h or similar file) and use it in place of
4935 + "pid_t", for example:
4939 + Unexplainable and inappropriate error messages ("Sockets not supported
4940 + on this device", etc) have been traced in at least one case to a lack
4941 + of agreement between the system header files and the actual kernel.
4942 + This happened because the GNU C compiler (gcc) was being used. gcc
4943 + wants to have ANSI-C-compliant header files, and so part of the
4944 + installation procedure for gcc is (or was) to run a shell script
4945 + called "fixincludes", which translates the system's header files into
4946 + a separate set of headers that gcc likes. So far so good. Later, a new
4947 + version of the operating system is installed and nobody remembers to
4948 + run fixincludes again. From that point, any program compiled with gcc
4949 + that makes use of header files (particularly ioctl.h) is very likely
4950 + to misbehave. Solution: run fixincludes again, or use your system's
4951 + regular C compiler, libraries, and header files instead of gcc.
4952 + __________________________________________________________________________
4954 +14. CRASHES AND CORE DUMPS
4956 + [ [333]Top ] [ [334]Contents ] [ [335]Next ] [ [336]Previous ]
4958 + If C-Kermit constitently dumps core at the beginning of a file
4959 + transfer, look in SHOW FEATURES for CKREALPATH. If found, rebuild with
4960 + -DNOREALPATH and see if that fixes the problem (some UNIXes have
4961 + realpath() but it doesn't work).
4963 + Total failure of the Kermit program can occur because of bad memory
4964 + references, bad system calls, or problems with dynamic memory
4965 + allocation. First, try to reproduce the problem with debugging turned
4966 + on: run Kermit with the -d command-line option (for example, "wermit
4967 + -d") and then examine the resulting debug.log file. The last entry
4968 + should be in the vicinity of the crash. In VMS, a crash automatically
4969 + produces a "stack dump" which shows the routine where the crash
4970 + occurs. In some versions of Unix, you can get a stack dump with "adb"
4971 + -- just type "adb wermit core" and then give the command "$c", then
4972 + Ctrl-D to quit (note: replace "wermit" by "kermit" or by the full
4973 + pathname of the executable that crashed if it is not in the current
4974 + directory). Or use gdb to get a backtrace, etc.
4976 + In edit 186, one implementation, UNISYS 5000/95 built with "make
4977 + sys5r3", has been reported to run out of memory very quickly (e.g.
4978 + while executing a short initialization file that contains a SET DIAL
4979 + DIRECTORY command). Debug logs show that malloc calls are failing,
4980 + reason unknown. For this and any other implementation that gives error
4981 + messages about "malloc failure" or "memory allocation failure",
4982 + rebuild the program *without* the -DDYNAMIC CFLAGS definition, for
4985 +make sys5r3 KFLAGS=-UDYNAMIC
4987 + As of edit 169, C-Kermit includes a malloc() debugging package which
4988 + you may link with the Kermit program to catch runtime malloc errors.
4989 + See the makefile entries for sunos41md and nextmd for examples of how
4990 + to select malloc debugging. Once you have linked Kermit with the
4991 + malloc debugger, it will halt with an informative message if a
4992 + malloc-related error occurs and, if possible, dump core. For this
4993 + reason, malloc-debugging versions of Kermit should be built without
4994 + the "-s" link option (which removes symbols, preventing analysis of
4995 + the core dump). You have several ways to track down the malloc error:
4996 + Analyze the core dump with adb. Or reproduce the problem with "log
4997 + debug" and then look at the code around the last debug.log entry. If
4998 + you have gcc, build the program with "-g" added to CFLAGS and then
4999 + debug it with gdb, e.g.
5004 +.. set other breakpoints or watchpoints
5007 + Watchpoints are especially useful for finding memory leaks, but they
5008 + make the program run about a thousand times slower than usual, so
5009 + don't set them until the last possible moment. When a watchpoint is
5010 + hit, you can use the "where" command to find out which C-Kermit source
5011 + statement triggered it.
5013 + If you have the Pure Software Inc "Purify" product, see the sunos41cp
5014 + makefile entry for an example of how to use it to debug C-Kermit.
5015 + __________________________________________________________________________
5019 + [ [337]Top ] [ [338]Contents ] [ [339]Next ] [ [340]Previous ]
5021 + "Syslogging" means recording selected in the system log via the Unix
5022 + syslog() facility, which is available in most Unix versions.
5023 + Syslogging is not done unless C-Kermit is started with:
5027 + on the command-line, where n is a number greater than 0 to indicate
5028 + the level of syslogging. See [341]Section 4.2 of the [342]IKSD
5029 + Administrator's Guide for details.
5031 + Obviously you can't depend on users to include --syslog:3 (or
5032 + whatever) on the command line every time they start C-Kermit, so if
5033 + you want certain kinds of records to be recorded in the system log,
5034 + you can build C-Kermit with forced syslogging at the desired level,
5037 +make linux KFLAGS=-DSYSLOGLEVEL=2
5039 + Levels 2 and 3 are the most likely candidates for this treatment.
5040 + Level 2 forces logging of all successful dialout calls (e.g. for
5041 + checking against or phone bills), and level 3 records all connections
5042 + (SET LINE or SET HOST / TELNET / RLOGIN, etc) so you can see who is
5043 + connecting out from your system, and to where.
5045 + Level 2 and 3 records are equivalent to those in the connection log;
5046 + see the [343]C-Kermit 7.0 Supplement) for a detailed description of
5047 + the connection log.
5048 + __________________________________________________________________________
5050 +16. BUILDING SECURE VERSIONS OF C-KERMIT 8.0
5052 + [ [344]Top ] [ [345]Contents ] [ [346]Next ] [ [347]Previous ]
5054 + C-Kermit 7.0 and later may be built with Kerberos(TM) and/or SRP(TM)
5055 + (Secure Remote Password) and/or SSL/TLS security for strong
5056 + authentication and encryption of Internet connections. These security
5057 + methods require external libraries that, in their binary forms, are
5058 + restricted from export by USA law. See the [348]Kermit Security
5059 + Reference) for details. C-Kermit binaries themselves are likewise
5060 + restricted; the C-Kermit binaries that are available for public
5061 + download on the Internet are not allowed to contain the security
5064 + Sample makefile entries are provided for Linux and many other
5065 + operating systems. A list of secure makefile entries is included in
5066 + the Makefile. Complete instructions on building C-Kermit 8.0 with MIT
5067 + Kerberos; Secure Remote Password; and/or OpenSSL can be found in the
5068 + [349]Kermit Security Reference.
5070 + C-Kermit 8.0 comes with a current list of Certificate Authority
5071 + certificates, including one for the Kermit Project that can be used
5072 + for authentication to Columbia's [350]Internet Kermit Service (IKSD).
5073 + You can use C-Kermit 7.0 or later to access Columbia's IKSD securely
5074 + by installing the Kermit Project certificate in
5075 + /usr/local/ssl/cert.pem (or the appropriate location based upon the
5076 + installation of OpenSSL on your system). You can find a copy of the
5077 + certificates file at:
5079 +[351]ftp://kermit.columbia.edu/kermit/c-kermit/ca_certs.pem
5080 + __________________________________________________________________________
5082 +17. INSTALLING C-KERMIT AS AN SSH SERVER SUBSYSTEM
5084 + [ [352]Top ] [ [353]Contents ] [ [354]Previous ]
5086 + This requires C-Kermit 8.0.206 or later and an SSH v2 server. If you
5087 + list C-Kermit as a Subsystem in the SSH v2 server configuration file
5088 + (as, for example, SFTP is listed), users can make SSH connections
5089 + direct to a Kermit server as explained here:
5091 +[355]http://www.columbia.edu/kermit/skermit.html
5093 + The name and location of the SSH server configuration file depends on
5094 + your platform, which SSH product(s) you have, etc. C-Kermit itself
5095 + must be referred to in this file as "kermit-sshsub". On the host,
5096 + install the C-Kermit 8.0.211 binary in the normal way. Then, in the
5097 + same directory as the C-Kermit binary, make a symbolic link:
5099 +ln -s kermit kermit-sshsub
5101 + (Note: the "make install" makefile target does this for you.) Then in
5102 + the sshd configuration file, add a line:
5104 +Subsystem kermit /some/path/kermit-sshsub
5106 + (where /some/path is the fully specified directory where the symlink
5107 + is.) This is similar to the line that sets up the SFTP susbsystem.
5110 +Subsystem sftp /usr/local/libexec/sftp-server
5111 +Subsystem kermit /usr/local/bin/kermit-sshsub
5113 + The mechanics might vary for other SSH servers; "man sshd" for
5114 + details. The method shown here is used because the OpenSSH server does
5115 + not permit the subsystem invocation to include command-line options.
5116 + C-Kermit would have no way of knowing that it should enter Server mode
5117 + if it were not called by a special name.
5119 + [ [356]Top ] [ [357]Contents ] [ [358]C-Kermit Home ] [ [359]C-Kermit
5120 + 8.0 Overview ] [ [360]Kermit Home ]
5121 + _________________________________________________________________
5124 + C-Kermit 8.0 Unix Installation Instructions / The Kermit Project /
5125 + Columbia University / 10 April 2004
5129 + 1. http://www.columbia.edu/kermit/ckuins.html#contents
5130 + 2. http://www.columbia.edu/kermit/ckermit.html
5131 + 3. http://www.columbia.edu/kermit/index.html
5132 + 4. http://www.columbia.edu/kermit/ckuins.html
5133 + 5. http://www.columbia.edu/kermit/ckuins.html#x0
5134 + 6. http://www.columbia.edu/kermit/ckuins.html#x1
5135 + 7. http://www.columbia.edu/kermit/ckuins.html#x2
5136 + 8. http://www.columbia.edu/kermit/ckuins.html#x3
5137 + 9. http://www.columbia.edu/kermit/ckuins.html#x4
5138 + 10. http://www.columbia.edu/kermit/ckuins.html#x5
5139 + 11. http://www.columbia.edu/kermit/ckuins.html#x6
5140 + 12. http://www.columbia.edu/kermit/ckuins.html#x7
5141 + 13. http://www.columbia.edu/kermit/ckuins.html#x8
5142 + 14. http://www.columbia.edu/kermit/ckuins.html#x9
5143 + 15. http://www.columbia.edu/kermit/ckuins.html#x10
5144 + 16. http://www.columbia.edu/kermit/ckuins.html#x11
5145 + 17. http://www.columbia.edu/kermit/ckuins.html#x12
5146 + 18. http://www.columbia.edu/kermit/ckuins.html#x13
5147 + 19. http://www.columbia.edu/kermit/ckuins.html#x14
5148 + 20. http://www.columbia.edu/kermit/ckuins.html#x15
5149 + 21. http://www.columbia.edu/kermit/ckuins.html#x16
5150 + 22. http://www.columbia.edu/kermit/ckuins.html#x16
5151 + 23. http://www.columbia.edu/kermit/ckuins.html#top
5152 + 24. http://www.columbia.edu/kermit/ckuins.html#contents
5153 + 25. http://www.columbia.edu/kermit/ckuins.html#x1
5154 + 26. http://www.columbia.edu/kermit/ckccfg.html
5155 + 27. http://www.columbia.edu/kermit/ckcbwr.html
5156 + 28. http://www.columbia.edu/kermit/ckubwr.html
5157 + 29. http://www.columbia.edu/kermit/ckcplm.html
5158 + 30. http://www.columbia.edu/kermit/ckuins.html#x2
5159 + 31. http://www.columbia.edu/kermit/x3
5160 + 32. http://www.columbia.edu/kermit/ckuins.html#x4
5161 + 33. http://www.columbia.edu/kermit/ckuins.html#top
5162 + 34. http://www.columbia.edu/kermit/ckuins.html#contents
5163 + 35. http://www.columbia.edu/kermit/ckuins.html#x2
5164 + 36. http://www.columbia.edu/kermit/ckuins.html#x0
5165 + 37. ftp://kermit.columbia.edu/kermit/archives/cku211.tar.Z
5166 + 38. ftp://kermit.columbia.edu/kermit/archives/cku211.tar.gz
5167 + 39. ftp://kermit.columbia.edu/kermit/archives/cku211.tar
5168 + 40. http://www.columbia.edu/kermit/ckuins.html#x7
5169 + 41. http://www.columbia.edu/kermit/ckuins.html#x5
5170 + 42. http://www.columbia.edu/kermit/ckuins.html#x5
5171 + 43. http://www.columbia.edu/kermit/ckuins.html#x16
5172 + 44. http://www.columbia.edu/kermit/ckuins.html#top
5173 + 45. http://www.columbia.edu/kermit/ckuins.html#contents
5174 + 46. http://www.columbia.edu/kermit/ckuins.html#x3
5175 + 47. http://www.columbia.edu/kermit/ckuins.html#x1
5176 + 48. http://www.columbia.edu/kermit/ckuins.html#x5
5177 + 49. http://www.columbia.edu/kermit/ckuins.html#X10
5178 + 50. http://www.columbia.edu/kermit/ckuins.html#x11
5179 + 51. http://www.columbia.edu/kermit/ckuins.html#x10
5180 + 52. http://www.columbia.edu/kermit/ckuins.html#x3
5181 + 53. http://www.columbia.edu/kermit/ck80packages.html
5182 + 54. http://www.columbia.edu/kermit/ckuins.html#x10
5183 + 55. http://www.columbia.edu/kermit/ckuins.html#top
5184 + 56. http://www.columbia.edu/kermit/ckuins.html#contents
5185 + 57. http://www.columbia.edu/kermit/ckuins.html#x4
5186 + 58. http://www.columbia.edu/kermit/ckuins.html#x2
5187 + 59. ftp://kermit.columbia.edu/kermit/bin/
5188 + 60. http://www.columbia.edu/kermit/ck80binaries.html
5189 + 61. http://www.columbia.edu/kermit/ckuins.html#x7
5190 + 62. http://www.columbia.edu/kermit/ckuins.html#build
5191 + 63. http://www.columbia.edu/kermit/ckuins.html#x5
5192 + 64. http://www.columbia.edu/kermit/ckuins.html#x4
5193 + 65. http://www.columbia.edu/kermit/ckuins.html#x4
5194 + 66. mailto:kermit@columbia.edu
5195 + 67. http://www.columbia.edu/kermit/ckuins.html#top
5196 + 68. http://www.columbia.edu/kermit/ckuins.html#contents
5197 + 69. http://www.columbia.edu/kermit/ckuins.html#x5
5198 + 70. http://www.columbia.edu/kermit/ckuins.html#x3
5199 + 71. http://www.columbia.edu/kermit/ckuins.html#x8
5200 + 72. http://www.columbia.edu/kermit/ckuins.html#x9
5201 + 73. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
5202 + 74. ftp://kermit.columbia.edu/kermit/c-kermit/ckpker.mk
5203 + 75. ftp://kermit.columbia.edu/kermit/c-kermit/ckubsd.mak
5204 + 76. http://www.columbia.edu/kermit/ckuins.html#x5
5205 + 77. mailto:kermit-support@columbia.edu
5206 + 78. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
5207 + 79. http://www.columbia.edu/kermit/ckuins.html#x7
5208 + 80. mailto:kermit-support@columbia.edu
5209 + 81. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
5210 + 82. http://www.columbia.edu/kermit/ckuins.html#x5.4
5211 + 83. http://www.columbia.edu/kermit/ckuins.html#x10
5212 + 84. http://www.columbia.edu/kermit/ckuins.html#x11
5213 + 85. http://www.columbia.edu/kermit/ckuins.html#x5
5214 + 86. http://www.columbia.edu/kermit/iksd.html
5215 + 87. http://www.columbia.edu/kermit/ckuins.html#top
5216 + 88. http://www.columbia.edu/kermit/ckuins.html#contents
5217 + 89. http://www.columbia.edu/kermit/ckuins.html#x4.1
5218 + 90. http://www.columbia.edu/kermit/ckccfg.html
5219 + 91. http://www.columbia.edu/kermit/ckuins.html#x4.1
5220 + 92. http://www.columbia.edu/kermit/ckuins.html#x4.2
5221 + 93. http://www.columbia.edu/kermit/ckuins.html#x4.3
5222 + 94. http://www.columbia.edu/kermit/ckuins.html#x4.4
5223 + 95. http://www.columbia.edu/kermit/ckuins.html#x4.5
5224 + 96. http://www.columbia.edu/kermit/ckccfg.html
5225 + 97. http://www.columbia.edu/kermit/ckccfg.html#x8
5226 + 98. http://www.columbia.edu/kermit/iksd.html
5227 + 99. http://www.columbia.edu/kermit/iksd.html
5228 + 100. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
5229 + 101. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
5230 + 102. mailto:kermit-support@columbia.edu
5231 + 103. ftp://kermit.columbia.edu/kermit/c-kermit/ckcmai.c
5232 + 104. http://www.columbia.edu/kermit/ckuins.html#x15
5233 + 105. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5234 + 106. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
5235 + 107. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5236 + 108. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
5237 + 109. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.c
5238 + 110. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.c
5239 + 111. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5240 + 112. ftp://kermit.columbia.edu/kermit/c-kermit/ckcuni.c
5241 + 113. mailto:kermit-support@columbia.edu
5242 + 114. http://www.columbia.edu/kermit/ckuins.html#top
5243 + 115. http://www.columbia.edu/kermit/ckuins.html#contents
5244 + 116. http://www.columbia.edu/kermit/ckuins.html#x4
5245 + 117. http://www.columbia.edu/kermit/ckuins.html#x4.2
5246 + 118. http://www.columbia.edu/kermit/ckuins.html#x4.0
5247 + 119. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
5248 + 120. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
5249 + 121. http://www.columbia.edu/kermit/ckubwr.html
5250 + 122. ftp://kermit.columbia.edu/kermit/c-kermit/ckwart.c
5251 + 123. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.w
5252 + 124. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.c
5253 + 125. http://www.columbia.edu/kermit/ckuins.html#top
5254 + 126. http://www.columbia.edu/kermit/ckuins.html#contents
5255 + 127. http://www.columbia.edu/kermit/ckuins.html#x4
5256 + 128. http://www.columbia.edu/kermit/ckuins.html#x4.3
5257 + 129. http://www.columbia.edu/kermit/ckuins.html#x4.1
5258 + 130. http://www.columbia.edu/kermit/ckuins.html#x5
5259 + 131. http://www.columbia.edu/kermit/ckuins.html#top
5260 + 132. http://www.columbia.edu/kermit/ckuins.html#contents
5261 + 133. http://www.columbia.edu/kermit/ckuins.html#x4
5262 + 134. http://www.columbia.edu/kermit/ckuins.html#x4.4
5263 + 135. http://www.columbia.edu/kermit/ckuins.html#x4.2
5264 + 136. http://www.columbia.edu/kermit/ckuins.html#top
5265 + 137. http://www.columbia.edu/kermit/ckuins.html#contents
5266 + 138. http://www.columbia.edu/kermit/ckuins.html#x4
5267 + 139. http://www.columbia.edu/kermit/ckuins.html#x4.5
5268 + 140. http://www.columbia.edu/kermit/ckuins.html#x4.3
5269 + 141. ftp://kermit.columbia.edu/kermit/c-kermit/ckpker.mk
5270 + 142. http://www.columbia.edu/kermit/ckuins.html#top
5271 + 143. http://www.columbia.edu/kermit/ckuins.html#contents
5272 + 144. http://www.columbia.edu/kermit/ckuins.html#x4
5273 + 145. http://www.columbia.edu/kermit/ckuins.html#x4.4
5274 + 146. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
5275 + 147. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
5276 + 148. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.w
5277 + 149. http://www.columbia.edu/kermit/ckuins.html#top
5278 + 150. http://www.columbia.edu/kermit/ckuins.html#contents
5279 + 151. http://www.columbia.edu/kermit/ckuins.html#x6
5280 + 152. http://www.columbia.edu/kermit/ckuins.html#x4
5281 + 153. http://www.columbia.edu/kermit/ckuins.html#x5.1
5282 + 154. http://www.columbia.edu/kermit/ckuins.html#x5.2
5283 + 155. http://www.columbia.edu/kermit/ckuins.html#x5.3
5284 + 156. http://www.columbia.edu/kermit/ckuins.html#x5.4
5285 + 157. http://www.columbia.edu/kermit/
5286 + 158. http://www.columbia.edu/kermit/ckuins.html#x5.4
5287 + 159. http://www.columbia.edu/kermit/ckuins.html#x5.3
5288 + 160. ftp://kermit.columbia.edu/kermit/c-kermit/COPYING.TXT
5289 + 161. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit.ini
5290 + 162. http://www.columbia.edu/kermit/ckuins.html#x5.1
5291 + 163. ftp://kermit.columbia.edu/kermit/c-kermit/ckermod.ini
5292 + 164. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit70.txt
5293 + 165. http://www.columbia.edu/kermit/ck60manual
5294 + 166. http://www.columbia.edu/kermit/ckermit70.html
5295 + 167. ftp://kermit.columbia.edu/kermit/c-kermit/ckermit80.txt
5296 + 168. http://www.columbia.edu/kermit/ck60manual
5297 + 169. http://www.columbia.edu/kermit/ckermit80.html
5298 + 170. ftp://kermit.columbia.edu/kermit/c-kermit/ckcbwr.txt
5299 + 171. http://www.columbia.edu/kermit/ckcbwr.html
5300 + 172. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
5301 + 173. http://www.columbia.edu/kermit/ckubwr.html
5302 + 174. ftp://kermit.columbia.edu/kermit/c-kermit/ckuins.txt
5303 + 175. http://www.columbia.edu/kermit/ckuins.html
5304 + 176. ftp://kermit.columbia.edu/kermit/c-kermit/ckccfg.txt
5305 + 177. http://www.columbia.edu/kermit/ckccfg.html
5306 + 178. ftp://kermit.columbia.edu/kermit/c-kermit/ckcplm.txt
5307 + 179. http://www.columbia.edu/kermit/ckcplm.html
5308 + 180. ftp://kermit.columbia.edu/kermit/c-kermit/ca_certs.pem
5309 + 181. http://www.columbia.edu/kermit/ckuins.html#x16"
5310 + 182. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
5311 + 183. http://www.columbia.edu/kermit/ckuins.html#x?
5312 + 184. http://www.columbia.edu/kermit/ckuins.html#x11
5313 + 185. http://www.columbia.edu/kermit/ckuins.html#x5.2
5314 + 186. http://www.columbia.edu/kermit/ckermit.html#download
5315 + 187. http://www.columbia.edu/kermit/ck80binaries.html
5316 + 188. http://www.columbia.edu/kermit/ckermit.html#download
5317 + 189. http://www.columbia.edu/kermit/ckuins.html#top
5318 + 190. http://www.columbia.edu/kermit/ckuins.html#contents
5319 + 191. http://www.columbia.edu/kermit/ckuins.html#x7
5320 + 192. http://www.columbia.edu/kermit/ckuins.html#x5
5321 + 193. http://www.columbia.edu/kermit/ckuins.html#top
5322 + 194. http://www.columbia.edu/kermit/ckuins.html#contents
5323 + 195. http://www.columbia.edu/kermit/ckuins.html#x8
5324 + 196. http://www.columbia.edu/kermit/ckuins.html#x6
5325 + 197. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5326 + 198. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5327 + 199. http://www.columbia.edu/kermit/ckuins.html#x4.0
5328 + 200. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
5329 + 201. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
5330 + 202. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
5331 + 203. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5332 + 204. http://www.columbia.edu/kermit/ckuins.html#x10
5333 + 205. http://www.columbia.edu/kermit/ckccfg.html#x2
5334 + 206. http://www.columbia.edu/kermit/ckccfg.html
5335 + 207. http://www.columbia.edu/kermit/ckuins.html#x4
5336 + 208. http://www.columbia.edu/kermit/ckuins.html#x10
5337 + 209. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5338 + 210. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5339 + 211. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5340 + 212. http://www.columbia.edu/kermit/ckuins.html#x9.4
5341 + 213. mailto:kermit-support@columbia.edu
5342 + 214. http://www.columbia.edu/kermit/ckuins.html#top
5343 + 215. http://www.columbia.edu/kermit/ckuins.html#contents
5344 + 216. http://www.columbia.edu/kermit/ckuins.html#x9
5345 + 217. http://www.columbia.edu/kermit/ckuins.html#x7
5346 + 218. http://www.columbia.edu/kermit/ckccfg.html
5347 + 219. http://www.columbia.edu/kermit/ckccfg.html
5348 + 220. http://www.columbia.edu/kermit/ckuins.html#top
5349 + 221. http://www.columbia.edu/kermit/ckuins.html#contents
5350 + 222. http://www.columbia.edu/kermit/ckuins.html#x10
5351 + 223. http://www.columbia.edu/kermit/ckuins.html#x8
5352 + 224. http://www.columbia.edu/kermit/ckuins.html#x9.1
5353 + 225. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
5354 + 226. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
5355 + 227. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
5356 + 228. http://www.columbia.edu/kermit/ckuins.html#x9.2
5357 + 229. http://www.columbia.edu/kermit/ckuins.html#x9.3
5358 + 230. http://www.columbia.edu/kermit/ckuins.html#x9.4
5359 + 231. http://www.columbia.edu/kermit/ckuins.html#x9.5
5360 + 232. http://www.columbia.edu/kermit/ckuins.html#x9.6
5361 + 233. http://www.columbia.edu/kermit/ckuins.html#x9.7
5362 + 234. http://www.columbia.edu/kermit/ckuins.html#x9.8
5363 + 235. http://www.columbia.edu/kermit/ckuins.html#x9.9
5364 + 236. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5365 + 237. http://www.columbia.edu/kermit/ckuins.html#top
5366 + 238. http://www.columbia.edu/kermit/ckuins.html#x9
5367 + 239. http://www.columbia.edu/kermit/ckuins.html#contents
5368 + 240. http://www.columbia.edu/kermit/ckuins.html#x9.2
5369 + 241. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
5370 + 242. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
5371 + 243. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
5372 + 244. http://www.columbia.edu/kermit/ckuins.html#top
5373 + 245. http://www.columbia.edu/kermit/ckuins.html#contents
5374 + 246. http://www.columbia.edu/kermit/ckuins.html#x9
5375 + 247. http://www.columbia.edu/kermit/ckuins.html#x9.1
5376 + 248. http://www.columbia.edu/kermit/ckuins.html#x9.1.3
5377 + 249. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
5378 + 250. http://www.columbia.edu/kermit/ckuins.html#top
5379 + 251. http://www.columbia.edu/kermit/ckuins.html#contents
5380 + 252. http://www.columbia.edu/kermit/ckuins.html#x9
5381 + 253. http://www.columbia.edu/kermit/ckuins.html#x9.1
5382 + 254. http://www.columbia.edu/kermit/ckuins.html#x9.2
5383 + 255. http://www.columbia.edu/kermit/ckuins.html#x9.1.2
5384 + 256. http://www.opengroup.org/onlinepubs/007904975/
5385 + 257. http://www.columbia.edu/kermit/ckuins.html#x9.1.1
5386 + 258. http://www.columbia.edu/kermit/ckuins.html#top
5387 + 259. http://www.columbia.edu/kermit/ckuins.html#contents
5388 + 260. http://www.columbia.edu/kermit/ckuins.html#x9
5389 + 261. http://www.columbia.edu/kermit/ckuins.html#x9.1
5390 + 262. http://www.columbia.edu/kermit/ckuins.html#x9.3
5391 + 263. http://www.columbia.edu/kermit/ckuins.html#x9.1
5392 + 264. http://www.columbia.edu/kermit/ckuins.html#top
5393 + 265. http://www.columbia.edu/kermit/ckuins.html#contents
5394 + 266. http://www.columbia.edu/kermit/ckuins.html#x9
5395 + 267. http://www.columbia.edu/kermit/ckuins.html#x9.4
5396 + 268. http://www.columbia.edu/kermit/ckuins.html#x9.2
5397 + 269. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
5398 + 270. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5399 + 271. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
5400 + 272. http://www.columbia.edu/kermit/ckuins.html#top
5401 + 273. http://www.columbia.edu/kermit/ckuins.html#contents
5402 + 274. http://www.columbia.edu/kermit/ckuins.html#x9
5403 + 275. http://www.columbia.edu/kermit/ckuins.html#x9.5
5404 + 276. http://www.columbia.edu/kermit/ckuins.html#x9.3
5405 + 277. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5406 + 278. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
5407 + 279. http://www.columbia.edu/kermit/ckuins.html#top
5408 + 280. http://www.columbia.edu/kermit/ckuins.html#contents
5409 + 281. http://www.columbia.edu/kermit/ckuins.html#x9
5410 + 282. http://www.columbia.edu/kermit/ckuins.html#x9.6
5411 + 283. http://www.columbia.edu/kermit/ckuins.html#x9.4
5412 + 284. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
5413 + 285. ftp://kermit.columbia.edu/kermit/c-kermit/ckuus3.c
5414 + 286. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5415 + 287. http://www.columbia.edu/kermit/ckuins.html#top
5416 + 288. http://www.columbia.edu/kermit/ckuins.html#contents
5417 + 289. http://www.columbia.edu/kermit/ckuins.html#x9
5418 + 290. http://www.columbia.edu/kermit/ckuins.html#x9.7
5419 + 291. http://www.columbia.edu/kermit/ckuins.html#x9.5
5420 + 292. http://www.columbia.edu/kermit/ckuins.html#top
5421 + 293. http://www.columbia.edu/kermit/ckuins.html#contents
5422 + 294. http://www.columbia.edu/kermit/ckuins.html#x9
5423 + 295. http://www.columbia.edu/kermit/ckuins.html#x9.8
5424 + 296. http://www.columbia.edu/kermit/ckuins.html#x9.6
5425 + 297. http://www.columbia.edu/kermit/ckuins.html#top
5426 + 298. http://www.columbia.edu/kermit/ckuins.html#contents
5427 + 299. http://www.columbia.edu/kermit/ckuins.html#x9
5428 + 300. http://www.columbia.edu/kermit/ckuins.html#x9.9
5429 + 301. http://www.columbia.edu/kermit/ckuins.html#x9.7
5430 + 302. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5431 + 303. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5432 + 304. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
5433 + 305. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
5434 + 306. http://www.columbia.edu/kermit/ckuins.html#top
5435 + 307. http://www.columbia.edu/kermit/ckuins.html#contents
5436 + 308. http://www.columbia.edu/kermit/ckuins.html#x9
5437 + 309. http://www.columbia.edu/kermit/ckuins.html#x10
5438 + 310. http://www.columbia.edu/kermit/ckuins.html#x9.8
5439 + 311. http://www.columbia.edu/kermit/ckuins.html#top
5440 + 312. http://www.columbia.edu/kermit/ckuins.html#contents
5441 + 313. http://www.columbia.edu/kermit/ckuins.html#x11
5442 + 314. http://www.columbia.edu/kermit/ckuins.html#x9
5443 + 315. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5444 + 316. http://www.columbia.edu/kermit/ckuins.html#x11
5445 + 317. http://www.columbia.edu/kermit/ckuins.html#top
5446 + 318. http://www.columbia.edu/kermit/ckuins.html#contents
5447 + 319. http://www.columbia.edu/kermit/ckuins.html#x12
5448 + 320. http://www.columbia.edu/kermit/ckuins.html#x10
5449 + 321. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5450 + 322. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
5451 + 323. http://www.columbia.edu/kermit/ckuins.html#top
5452 + 324. http://www.columbia.edu/kermit/ckuins.html#contents
5453 + 325. http://www.columbia.edu/kermit/ckuins.html#x13
5454 + 326. http://www.columbia.edu/kermit/ckuins.html#x11
5455 + 327. http://www.columbia.edu/kermit/ckuins.html#top
5456 + 328. http://www.columbia.edu/kermit/ckuins.html#contents
5457 + 329. http://www.columbia.edu/kermit/ckuins.html#x14
5458 + 330. http://www.columbia.edu/kermit/ckuins.html#x12
5459 + 331. ftp://kermit.columbia.edu/kermit/c-kermit/ckubwr.txt
5460 + 332. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
5461 + 333. http://www.columbia.edu/kermit/ckuins.html#top
5462 + 334. http://www.columbia.edu/kermit/ckuins.html#contents
5463 + 335. http://www.columbia.edu/kermit/ckuins.html#x15
5464 + 336. http://www.columbia.edu/kermit/ckuins.html#x13
5465 + 337. http://www.columbia.edu/kermit/ckuins.html#top
5466 + 338. http://www.columbia.edu/kermit/ckuins.html#contents
5467 + 339. http://www.columbia.edu/kermit/ckuins.html#x16
5468 + 340. http://www.columbia.edu/kermit/ckuins.html#x14
5469 + 341. http://www.columbia.edu/kermit/iksd.html#x4.2
5470 + 342. http://www.columbia.edu/kermit/iksd.html
5471 + 343. http://www.columbia.edu/kermit/ckermit2.html
5472 + 344. http://www.columbia.edu/kermit/ckuins.html#top
5473 + 345. http://www.columbia.edu/kermit/ckuins.html#contents
5474 + 346. http://www.columbia.edu/kermit/ckuins.html#x17
5475 + 347. http://www.columbia.edu/kermit/ckuins.html#x15
5476 + 348. http://www.columbia.edu/kermit/security.html
5477 + 349. http://www.columbia.edu/kermit/security80.html
5478 + 350. http://www.columbia.edu/kermit/cuiksd.html
5479 + 351. ftp://kermit.columbia.edu/kermit/c-kermit/ca_certs.pem
5480 + 352. http://www.columbia.edu/kermit/ckuins.html#top
5481 + 353. http://www.columbia.edu/kermit/ckuins.html#contents
5482 + 354. http://www.columbia.edu/kermit/ckuins.html#x16
5483 + 355. http://www.columbia.edu/kermit/skermit.html
5484 + 356. http://www.columbia.edu/kermit/ckuins.html#top
5485 + 357. http://www.columbia.edu/kermit/ckuins.html#contents
5486 + 358. http://www.columbia.edu/kermit/ckermit.html
5487 + 359. http://www.columbia.edu/kermit/ck80.html
5488 + 360. http://www.columbia.edu/kermit/index.html
5490 +++ ckermit-212/ckubwr.txt
5493 + C-Kermit 8.0 Unix Hints and Tips
5496 + [1]The Kermit Project, [2]Columbia University
5498 + As of: C-Kermit 8.0.211 10 April 2004
5499 + This page last updated: Fri Apr 16 16:13:14 2004 (New York USA Time)
5501 + IF YOU ARE READING A PLAIN-TEXT version of this document, note it
5502 + is a plain-text dump of a Web page. You can visit the original (and
5503 + possibly more up-to-date) Web page here:
5505 + [3]http://www.columbia.edu/kermit/ckubwr.html
5507 + Since the material in this file has been accumulating since 1985,
5508 + some (much) of it might be dated. [4]Feedback from experts on
5509 + particular OS's and platforms is always welcome.
5511 + [ [5]C-Kermit ] [ [6]Installation Instructions ] [ [7]TUTORIAL ]
5512 + ________________________________________________________________________
5516 + 1. [8]INTRODUCTION
5517 + 2. [9]PREBUILT C-KERMIT BINARIES
5518 + 3. [10]PLATFORM-SPECIFIC NOTES
5519 + 4. [11]GENERAL UNIX-SPECIFIC LIMITATIONS AND BUGS
5520 + 5. [12]INITIALIZATION AND COMMAND FILES
5521 + 6. [13]COMMUNICATION SPEED SELECTION
5522 + 7. [14]COMMUNICATIONS AND DIALING
5523 + 8. [15]HARDWARE FLOW CONTROL
5524 + 9. [16]TERMINAL CONNECTION AND KEY MAPPING
5525 + 10. [17]FILE TRANSFER
5526 + 11. [18]EXTERNAL FILE TRANSFER PROTOCOLS
5528 + 13. [20]MISCELLANEOUS USER REPORTS
5529 + 14. [21]THIRD-PARTY DRIVERS
5531 + Quick Links: [ [22]Linux ] [ [23]*BSD ] [[24]Mac OS X] [ [25]AIX ] [
5532 + [26]HP-UX ] [ [27]Solaris ] [ [28]SCO ] [ [29]DEC/Compaq ]
5533 + ________________________________________________________________________
5537 + [ [30]Top ] [ [31]Contents ] [ [32]Next ]
5541 + 1.1. [33]Documentation
5542 + 1.2. [34]Technical Support
5543 + 1.3. [35]The Year 2000
5546 + THIS IS WHAT USED TO BE CALLED the "beware file" for the Unix version
5547 + of C-Kermit, previously distributed as ckubwr.txt and, before that, as
5548 + ckuker.bwr, after the fashion of old Digital Equipment Corporation
5549 + (DEC) software releases that came with release notes (describing what
5550 + had changed) and a "beware file" listing known bugs, limitations,
5551 + "non-goals", and things to watch out for. The C-Kermit beware file has
5552 + been accumulating since 1985, and it applies to many different
5553 + hardware platforms and operating systems, and many versions of them,
5554 + so it is quite large. Prior to C-Kermit 8.0, it was distributed only
5555 + in plain-text format. Now it is available as a Web document with
5556 + links, internal cross references, and so on, to make it easier to use.
5558 + This document applies to Unix C-Kermit in general, as well as to
5559 + specific Unix variations like [37]Linux, [38]AIX, [39]HP-UX,
5560 + [40]Solaris, and so on, and should be read in conjunction with the
5561 + [41]platform-independent C-Kermit beware file, which contains similar
5562 + information, but applying to all versions of C-Kermit (VMS, Windows,
5563 + OS/2, AOS/VS, VOS, etc, as well as to Unix).
5565 + There is much in this document that is (only) of historical interest.
5566 + The navigation links should help you skip directly to the sections
5567 + that are relevant to you. Numerous offsite Web links are supposed to
5568 + lead to further information but, as you know, Web links go stale
5569 + frequently and without warning. If you can supply additional,
5570 + corrected, updated, or better Web links, please feel free to [42]let
5573 + 1.1. Documentation
5575 + [ [43]Top ] [ [44]Contents ] [ [45]Next ]
5577 + C-Kermit 6.0 is documented in the book [46]Using C-Kermit, Second
5578 + Edition, by Frank da Cruz and Christine M. Gianone, Digital Press,
5579 + Burlington, MA, USA, ISBN 1-55558-164-1 (1997), 622 pages. This
5580 + remains the definitive C-Kermit documentation. Until the third edition
5581 + is published (sorry, there is no firm timeframe for this), please also
5584 + [47]Supplement to Using C-Kermit, Second Edition, For C-Kermit 7.0
5585 + Thorough documentation of features new to version 7.0.
5587 + [48]Supplement to Using C-Kermit, Second Edition, For C-Kermit 8.0
5588 + Thorough documentation of features new to version 8.0.
5590 + 1.2. Technical Support
5592 + [ [49]Top ] [ [50]Contents ] [ [51]Section Contents ] [ [52]Next ] [
5595 + For information on how to get technical support, please visit:
5597 + [54]http://www.columbia.edu/kermit/support.html
5599 + 1.3. The Year 2000
5601 + [ [55]Top ] [ [56]Contents ] [ [57]Section Contents ] [ [58]Next ] [
5604 + The Unix version of C-Kermit, release 6.0 and later, is "Year 2000
5605 + compliant", but only if the underlying operating system is too.
5606 + Contact your Unix operating system vendor to find out which operating
5607 + system versions, patches, hardware, and/or updates are required.
5608 + (Quite a few old Unixes are still in operation in the new millenium,
5609 + but with their date set 28 years in the past so at least the non-year
5610 + parts of the calendar are correct.)
5612 + As of C-Kermit 6.0 (6 September 1996), post-millenium file dates are
5613 + recognized, transmitted, received, and reproduced correctly during the
5614 + file transfer process in C-Kermit's File Attribute packets. If
5615 + post-millenium dates are not processed correctly on the other end,
5616 + file transfer still takes place, but the modification or creation date
5617 + of the received file might be incorrect. The only exception would be
5618 + if the "file collision update" feature is being used to prevent
5619 + unnecessary transfer of files that have not changed since the last
5620 + time a transfer took place; in this case, a file might be transferred
5621 + unnecessarily, or it might not be transferred when it should have
5622 + been. Correct operation of the update feature depends on both Kermit
5623 + programs having the correct date and time.
5625 + Of secondary importance are the time stamps in the transaction and/or
5626 + debug logs, and the date-related script programming constructs, such
5627 + as \v(date), \v(ndate), \v(day), \v(nday), and perhaps also the
5628 + time-related ones, \v(time) and \v(ntime), insofar as they might be
5629 + affected by the date. The \v(ndate) is a numeric-format date of the
5630 + form yyyymmdd, suitable for both lexical and numeric comparison and
5631 + sorting: e.g. 19970208 or 20011231. If the underlying operating system
5632 + returns the correct date information, these variables will have the
5633 + proper values. If not, then scripts that make decisions based on these
5634 + variables might not operate correctly.
5636 + Most date-related code is based upon the C Library asctime() string,
5637 + which always has a four-digit year. In Unix, the one bit of code in
5638 + C-Kermit that is an exception to this rule is several calls to
5639 + localtime(), which returns a pointer to a tm struct, in which the year
5640 + is presumed to be expressed as "years since 1900". The code depends on
5641 + this assumption. Any platforms that violate it will need special
5642 + coding. As of this writing, no such platforms are known.
5644 + Command and script programming functions that deal with dates use
5645 + C-Kermit specific code that always uses full years.
5649 + [ [60]Top ] [ [61]Contents ] [ [62]Section Contents ] [ [63]Previous ]
5651 + C-Kermit 7.0 and later support Unicode (ISO 10646), ISO 8859-15 Latin
5652 + Alphabet 9, PC Code Page 858, Windows Code Pages 1250 and 1251, and
5653 + perhaps other character sets, that encode the Euro symbol, and can
5654 + translate among them as long as no intermediate character-set is
5655 + involved that does not include the Euro.
5656 + ________________________________________________________________________
5658 + 2. PREBUILT C-KERMIT BINARIES
5660 + [ [64]Top ] [ [65]Contents ] [ [66]Next ] [ [67]Previous ]
5662 + It is often dangerous to run a binary C-Kermit (or any other) program
5663 + built on a different computer. Particularly if that computer had a
5664 + different C compiler, libraries, operating system version, processor
5665 + features, etc, and especially if the program was built with shared
5666 + libraries, because as soon as you update the libraries on your system,
5667 + they no longer match the ones referenced in the binary, and the binary
5668 + might refuse to load when you run it, in which case you'll see error
5669 + messages similar to:
5671 + Could not load program kermit
5672 + Member shr4.o not found or file not an archive
5673 + Could not load library libcurses.a[shr4.o]
5674 + Error was: No such file or directory
5676 + (These samples are from AIX.) To avoid this problem, we try to build
5677 + C-Kermit with statically linked libraries whenever we can, but this is
5678 + increasingly impossible as shared libraries become the norm.
5680 + It is often OK to run a binary built on an earlier OS version, but it
5681 + is rarely possible (or safe) to run a binary built on a later one, for
5682 + example to run a binary built under Solaris 8 on Solaris 2.6.
5683 + Sometimes even the OS-or-library patch/ECO level makes a difference.
5685 + A particularly insidious problem occurs when a binary was built on a
5686 + version of the OS that has patches from the vendor (e.g. to
5687 + libraries); in many cases you won't be able to run such a binary on an
5688 + unpatched version of the same platform.
5690 + When in doubt, build C-Kermit from the source code on the computer
5691 + where it is to be run (if possible!). If not, ask us for a binary
5692 + specific to your configuration. We might have one, and if we don't, we
5693 + might be able to find somebody who will build one for you.
5694 + ________________________________________________________________________
5696 + 3. NOTES ON SPECIFIC UNIX VERSIONS
5698 + [ [68]Top ] [ [69]Contents ] [ [70]Next ] [ [71]Previous ]
5702 + 3.0. [72]C-KERMIT ON PC-BASED UNIXES
5703 + 3.1. [73]C-KERMIT AND AIX
5704 + 3.2. [74]C-KERMIT AND HP-UX
5705 + 3.3. [75]C-KERMIT AND LINUX
5706 + 3.4. [76]C-KERMIT AND NEXTSTEP
5707 + 3.5. [77]C-KERMIT AND QNX
5708 + 3.6. [78]C-KERMIT AND SCO
5709 + 3.7. [79]C-KERMIT AND SOLARIS
5710 + 3.8. [80]C-KERMIT AND SUNOS
5711 + 3.9. [81]C-KERMIT AND ULTRIX
5712 + 3.10. [82]C-KERMIT AND UNIXWARE
5713 + 3.11. [83]C-KERMIT AND APOLLO SR10
5714 + 3.12. [84]C-KERMIT AND TANDY XENIX 3.0
5715 + 3.13. [85]C-KERMIT AND OSF/1 (DIGITAL UNIX) (TRU64 UNIX)
5716 + 3.14. [86]C-KERMIT AND SGI IRIX
5717 + 3.15. [87]C-KERMIT AND THE BEBOX
5718 + 3.16. [88]C-KERMIT AND DG/UX
5719 + 3.17. [89]C-KERMIT AND SEQUENT DYNIX
5720 + 3.18. [90]C-KERMIT AND {FREE,OPEN,NET}BSD
5721 + 3.19. [91]C-KERMIT AND MAC OS X
5722 + 3.20. [92]C-KERMIT AND COHERENT
5724 + The following sections apply to specific Unix versions. Most of them
5725 + contain references to FAQs (Frequently Asked Questions), but these
5726 + tend to be ephemeral. For possibly more current information see:
5728 + [93]http://www.faqs.org
5729 + [94]http://aplawrence.com/Unixart/newtounix.html
5731 + One thread that runs through many of them, and implicitly perhaps
5732 + through all, concerns the problems that occur when trying to dial out
5733 + on a serial device that is (also) enabled for dialing in. The
5734 + "solutions" to this problem are many, varied, diverse, and usually
5735 + gross, involving configuring the device for bidirectional use. This is
5736 + done in a highly OS-dependent and often obscure manner, and the
5737 + effects (good or evil) are also highly dependent on the particular OS
5738 + (and getty variety, etc). Many examples are given in the
5739 + [95]OS-specific sections below.
5741 + An important point to keep in mind is that C-Kermit is a
5742 + cross-platform, portable software program. It was not designed
5743 + specifically and only for your particular Unix version, or for that
5744 + matter, for Unix in particular at all. It also runs on VMS, AOS/VS,
5745 + VOS, and other non-Unix platforms. All the Unix versions of C-Kermit
5746 + share common i/o modules, with compile-time #ifdef constructions used
5747 + to account for the differences among the many Unix products and
5748 + releases. If you think that C-Kermit is behaving badly or missing
5749 + something on your particular Unix version, you might be right -- we
5750 + can't claim to be expert in hundreds of different OS / version /
5751 + hardware / library combinations. If you're a programmer, take a look
5752 + at the source code and [96]send us your suggested fixes or changes. Or
5753 + else just [97]send us a report about what seems to be wrong and we'll
5754 + see what we can do.
5755 + ________________________________________________________________________
5757 + 3.0. C-KERMIT ON PC-BASED UNIXES
5759 + [ [98]Top ] [ [99]Contents ] [ [100]Section Contents ] [ [101]Next ]
5761 + Also see: [102]http://www.pcunix.com/.
5765 + 3.0.1. [103]Interrupt Conflicts
5766 + 3.0.2. [104]Windows-Specific Hardware
5767 + 3.0.3. [105]Modems
5768 + 3.0.4. [106]Character Sets
5769 + 3.0.5. [107]Keyboard, Screen, and Mouse Access
5770 + 3.0.6. [108]Laptops
5772 + 3.0.1. Interrupt Conflicts
5774 + [ [109]Top ] [ [110]Contents ] [ [111]Section Contents ] [ [112]Next ]
5776 + PCs are not the best platform for real operating systems like Unix.
5777 + The architecture suffers from numerous deficiencies, not the least of
5778 + which is the stiflingly small number of hardware interrupts (either 7
5779 + or 15, many of which are preallocated). Thus adding devices, using
5780 + multiple serial ports, etc, is always a challenge and often a
5781 + nightmare. The free-for-all nature of the PC market and the lack of
5782 + standards combined with the diversity of Unix OS versions make it
5783 + difficult to find drivers for any particular device on any particular
5786 + Of special interest to Kermit users is the fact that there is no
5787 + standard provision in the PC architecture for more than 2
5788 + communication (serial) ports. COM3 and COM4 (or higher) will not work
5789 + unless you (a) find out the hardware address and interrupt for each,
5790 + (b) find out how to provide your Unix version with this information,
5791 + and (c) actually set up the configuration in the Unix startup files
5792 + (or whatever other method is used). Watch out for interrupt conflicts,
5793 + especially when using a serial mouse, and don't expect to be able to
5794 + use more than two serial ports.
5796 + The techniques for resolving interrupt conflicts are different for
5797 + each operating system (Linux, NetBSD, etc). In general, there is a
5798 + configuration file somewhere that lists COM ports, something like
5801 + com0 at isa? port 0x3f8 irq 4 # DOS COM1
5802 + com1 at isa? port 0x2f8 irq 3 # DOS COM2
5804 + The address and IRQ values in this file must agree with the values in
5805 + the PC BIOS and with the ports themselves, and there must not be more
5806 + than one device with the same interrupt. Unfortunately, due to the
5807 + small number of available interrupts, installing new devices on a PC
5808 + almost always creates a conflict. Here is a typical tale from a Linux
5809 + user (Fred Smith) about installing a third serial port:
5811 + ...problems can come from a number of causes. The one I fought with
5812 + for some time, and finally conquered, was that my modem is on an
5813 + add-in serial port, cua3/IRQ5. By default IRQ5 has a very low
5814 + priority, and does not get enough service in times when the system
5815 + is busy to prevent losing data. This in turn causes many resends.
5816 + There are two 'fixes' that I know of, one is to relax hard disk
5817 + interrupt hogging by using the correct parameter to hdparm, but I
5818 + don't like that one because the hdparm man page indicates it is
5819 + risky to use. The other one, the one I used, was to get 'irqtune'
5820 + and use it to give IRQ5 the highest priority instead of nearly the
5821 + lowest. Completely cured the problem.
5823 + Here's another one from a newsgroup posting:
5825 + After much hair pulling, I've discovered why my serial port won't
5826 + work. Apparently my [PC] has three serial devices (two comm ports
5827 + and an IR port), of which only two at a time can be active. I
5828 + looked in the BIOS setup and noticed that the IR port was
5829 + activated, but didn't realize at the time that this meant that COM2
5830 + was thereby de-activated. I turned off the IR port and now the
5831 + serial port works as advertised.
5832 + ________________________________________________________________________
5834 + 3.0.2. Windows-Specific Hardware
5836 + [ [113]Top ] [ [114]Contents ] [ [115]Section Contents ] [ [116]Next ]
5839 + To complicate matters, the PC platform is becoming increasingly and
5840 + inexorably Windows-oriented. More and more add-on devices are "Windows
5841 + only" -- meaning they are incomplete and rely on proprietary
5842 + Windows-based software drivers to do the jobs that you would expect
5843 + the device itself to do. PCMCIA, PCI, or "Plug-n-Play" devices are
5844 + rarely supported on PC-based Unix versions such as SCO; Winmodems,
5845 + Winprinters, and the like are not supported on any Unix variety (with
5846 + [118]a few exceptions). The self-proclaimed Microsoft PC 97 (or later)
5847 + standard only makes matters worse since its only purpose to ensure
5848 + that PCs are "optimized to run Windows 95 and Windows NT 4.0 and
5849 + future versions of these operating systems".
5851 + With the exception noted (the Lucent modem, perhaps a handful of
5852 + others by the time you read this), drivers for "Win" devices are
5853 + available only for Windows, since the Windows market dwarfs that of
5854 + any particular Unix brand, and for that matter all Unixes (or for that
5855 + matter, all non-Windows operating systems) combined. If your version
5856 + of Unix (SCO, Linux, BSDI, FreeBSD, etc) does not support a particular
5857 + device, then C-Kermit can't use it either. C-Kermit, like any Unix
5858 + application, must access all devices through drivers and not directly
5859 + because Unix is a real operating system.
5861 + Don't waste time thinking that you, or anybody else, could write a
5862 + Linux (or other Unix) driver for a Winmodem or other "Win" device.
5863 + First of all, these devices generally require realtime control, but
5864 + since Unix is a true multitasking operating system, realtime device
5865 + control is not possible outside the kernel. Second, the specifications
5866 + for these devices are secret and proprietary, and each one (and each
5867 + version of each one) is potentially different. Third, a Winmodem
5868 + driver would be enormously complex; it would take years to write and
5869 + debug, by which time it would be obsolete.
5871 + A more recent generation of PCs (circa 1999-2000) is marketed as
5872 + "Legacy Free". One can only speculate what that could mean. Most
5873 + likely it means it will ONLY run the very latest versions of Windows,
5874 + and is made exclusively of Winmodems, Winprinters, Winmemory, and
5875 + Win-CPU-fans (Legacy Free is a concept [119]pioneered by Microsoft).
5877 + Before you buy a new PC or add-on equipment, especially serial ports,
5878 + internal modems, or printers, make sure they are compatible with your
5879 + version of Unix. This is becoming an ever-greater challenge; only a
5880 + huge company like Microsoft can afford to be constantly cranking out
5881 + and/or verifying drivers for the thousands of video boards, sound
5882 + cards, network adapters, SCSI adapters, buses, etc, that spew forth in
5883 + an uncontrolled manner from all corners of the world on a daily basis.
5884 + With very few exceptions, makers of PCs assemble the various
5885 + components and then verify them only with Windows, which they must do
5886 + since they are, no doubt, preloading the PC with Windows. To find a
5887 + modern PC that is capable of running a variety of non-Windows
5888 + operating systems (e.g. Linux, SCO OpenServer, Unixware, and Solaris)
5889 + is a formidable challenge requiring careful study of each vendor's
5890 + "compatibility lists" and precise attention to exact component model
5891 + numbers and revision levels.
5892 + ________________________________________________________________________
5896 + [ [120]Top ] [ [121]Contents ] [ [122]Section Contents ] [ [123]Next ]
5899 + External modems are recommended:
5901 + * They don't need any special drivers.
5902 + * You can use the lights and speaker to troubleshoot dialing.
5903 + * You can share them among all types of computers.
5904 + * You can easily turn them off and on when power-cycling seems
5906 + * They are more likely to have manuals.
5908 + Internal PC modems (even when they are not Winmodems, which is
5909 + increasingly unlikely in new PCs) are always trouble, especially in
5910 + Unix. Even when they work for dialing out, they might not work for
5911 + dialing in, etc. Problems that occur when using an internal modem can
5912 + almost always be eliminated by switching to an external one. Even when
5913 + an internal modem is not a Winmodem or Plug-n-Play, it is often a
5914 + no-name model of unknown quality -- not the sort of thing you want
5915 + sitting directly on your computer's bus. (Even if it does not cause
5916 + hardware problems, it probably came without a command list, so no Unix
5917 + software will know how to control it.) For more about Unix compatible
5920 + [125]http://www.idir.net/~gromitkc/winmodem.html
5922 + Remember that PCs, even now -- more than two decades after they were
5923 + first introduced -- are not (in general) capable of supporting more
5924 + than 2 serial devices. Here's a short success story from a recent
5925 + newsgroup posting: "I have a Diamond SupraSonic II dual modem in my
5926 + machine. What I had to end up doing is buying a PS/2 mouse and port
5927 + and install it. Had to get rid of my serial mouse. I also had to
5928 + disable PnP in my computer bios. I was having IRQ conflicts between my
5929 + serial mouse and 'com 3'. Both modems work fine for me. My first modem
5930 + is ttyS0 and my second is ttyS1." Special third-party multiport boards
5931 + such as [126]DigiBoard are available for certain Unix platforms
5932 + (typically SCO, maybe Linux) that come with special platform-specific
5934 + ________________________________________________________________________
5936 + 3.0.4. Character Sets
5938 + [ [127]Top ] [ [128]Contents ] [ [129]Section Contents ] [ [130]Next ]
5941 + PCs generally have PC code pages such as CP437 or CP850, and these are
5942 + often used by PC-based Unix operating systems, particularly on the
5943 + console. These are supported directly by C-Kermit's SET FILE
5944 + CHARACTER-SET and SET TERMINAL CHARACTER-SET commands. Some PC-based
5945 + Unix versions, such as recent Red Hat Linux releases, might also
5946 + support Microsoft Windows code pages such as CP1252, or even Latin
5947 + Alphabet 1 itself (perhaps displayed with CP437 glyphs). (And work is
5948 + in progress to support Unicode UTF8 in Linux.)
5950 + Certain Windows code pages are not supported directly by C-Kermit, but
5951 + since they are ISO Latin Alphabets with nonstandard "extensions" in
5952 + the C1 control range, you can substitute the corresponding Latin
5953 + alphabet (or other character set) in any C-Kermit character-set
5956 + Windows Code Page Substitution
5958 + CP 1051 HP Roman-8
5960 + Other Windows code pages are mostly (or totally) incompatible with
5961 + their Latin Alphabet counterparts (e.g. CP1250 and Latin-2), and
5962 + several of these are already supported by C-Kermit 7.0 and later
5963 + (1250, 1251, and 1252).
5964 + ________________________________________________________________________
5966 + 3.0.5. Keyboard, Screen, and Mouse Access
5968 + [ [132]Top ] [ [133]Contents ] [ [134]Section Contents ] [ [135]Next ]
5971 + Finally, note that as a real operating system, Unix (unlike Windows)
5972 + does not provide the intimate connection to the PC keyboard, screen,
5973 + and mouse that you might expect. Unix applications can not "see" the
5974 + keyboard, and therefore can not be programmed to understand F-keys,
5975 + Editing keys, Arrow keys, Alt-key combinations, and the like. This is
5978 + a. Unix is a portable operating system, not only for PCs;
5979 + b. Unix sessions can come from anywhere, not just the PC's own
5980 + keyboard and screen; and:
5981 + c. even though it might be possible for an application that actually
5982 + is running on the PC's keyboard and screen to access these devices
5983 + directly, there are no APIs (outside of X) for this.
5984 + ________________________________________________________________________
5988 + [ [137]Top ] [ [138]Contents ] [ [139]Section Contents ] [
5991 + (To be filled in . . .)
5992 + ________________________________________________________________________
5994 + 3.1. C-KERMIT AND AIX
5996 + [ [141]Top ] [ [142]Contents ] [ [143]Section Contents ] [ [144]Next ]
6001 + 3.1.1. [146]AIX: General
6002 + 3.1.2. [147]AIX: Network Connections
6003 + 3.1.3. [148]AIX: Serial Connections
6004 + 3.1.4. [149]AIX: File Transfer
6005 + 3.1.5. [150]AIX: Xterm Key Map
6007 + For additional information see:
6008 + * [151]http://www.emerson.emory.edu/services/aix-faq/
6009 + * [152]http://www.faqs.org/faqs/by-newsgroup/comp/comp.unix.aix.html
6010 + * [153]http://www.cis.ohio-state.edu/hypertext/faq/usenet/aix-faq/to
6012 + * [154]http://aixpdslib.seas.ucla.edu/
6013 + * [155]http://www.rootvg.net (AIX history)
6014 + * [156]ftp://rtfm.mit.edu/pub/usenet/news.answers/aix-faq/part1
6015 + * [157]ftp://mirrors.aol.com/pub/rtfm/usenet-by-hierarchy/comp/unix/
6018 + and/or read the [158]comp.unix.aix newsgroup.
6019 + ______________________________________________________________________
6021 + 3.1.1. AIX: General
6023 + [ [159]Top ] [ [160]Contents ] [ [161]Section Contents ] [ [162]Next ]
6025 + About AIX version numbers: "uname -a" tells the two-digit version
6026 + number, such as 3.2 or 4.1. The three-digit form can be seen with the
6027 + "oslevel" command (this information is unavailable at the API level
6028 + and is reportedly obtained by scanning the installed patch list).
6029 + Supposedly all three-digit versions within the same two-digit version
6030 + (e.g. 4.3.1, 4.3.2) are binary compatible; i.e. a binary built on any
6031 + one of them should run on all others, but who knows. Most AIX
6032 + advocates tell you that any AIX binary will run on any AIX version
6033 + greater than or equal to the one under which it was built, but
6034 + experience with C-Kermit suggests otherwise. It is always best to run
6035 + a binary built under your exact same AIX version, down to the third
6036 + decimal place, if possible. Ideally, build it from source code
6037 + yourself. Yes, this advice would be easier to follow if AIX came with
6039 + ______________________________________________________________________
6041 + 3.1.2. AIX: Network Connections
6043 + [ [163]Top ] [ [164]Contents ] [ [165]Section Contents ] [ [166]Next ]
6046 + File transfers into AIX 4.2 or 4.3 through the AIX Telnet or Rlogin
6047 + server have been observed to fail (or accumulate huge numbers of
6048 + correctable errors, or even disconnect the session), when exactly the
6049 + same kind of transfers into AIX 4.1 work without incident, as do such
6050 + transfers into all non-AIX platforms on the same kind of connections
6051 + (with a few exceptions noted elsewhere in this document). AIX 4.3.3
6052 + seems to be particularly fragile in this regard; the weakness seems to
6053 + be in its pseudoterminal (pty) driver. High-speed streaming transfers
6054 + work perfectly, however, if the AIX Telnet server and pty driver are
6055 + removed from the picture; e.g, by using "set host * 3000" on AIX.
6057 + The problem can be completely cured by replacing the IBM Telnet server
6058 + with [168]MIT's Kerberos Telnet server -- even if you don't actually
6059 + use the Kerberos part. Diagnosis: AIX pseudoterminals (which are
6060 + controlled by the Telnet server to give you a login terminal for your
6061 + session) have quirks that not even IBM knows about. The situation with
6062 + AIX 5.x is not known, but if it has the same problem, the same cure is
6065 + Meanwhile, the only remedy when going through the IBM Telnet server is
6066 + to cut back on Kermit's performance settings until you find a
6067 + combination that works:
6069 + * SET STREAMING OFF
6070 + * SET WINDOW-SIZE small-number
6071 + * SET { SEND, RECEIVE } PACKET-LENGTH small-number
6072 + * SET PREFIXING { CAUTIOUS, ALL }
6074 + In some cases, severe cutbacks are required, e.g. those implied by the
6075 + ROBUST command. Also be sure that the AIX C-Kermit on the remote end
6076 + has "set flow none" (which is the default). NOTE: Maybe this one can
6077 + also be addressed by starting AIX telnetd with the "-a" option. The
6078 + situation with SSH connections is not known, but almost certainly the
6081 + When these problems occur, the system error log contains:
6084 + IDENTIFIER: 0873CF9F
6086 + Resource Name: pts/1
6092 + EXCESSIVE LOAD ON PROCESSOR
6094 + Recommended Actions
6095 + REDUCE SYSTEM LOAD.
6096 + REDUCE SERIAL PORT BAUD RATE
6098 + Before leaving the topic of AIX pseudoterminals, it is very likely
6099 + that Kermit's PTY and SSH commands do not work well either, for the
6100 + same reason that Telnet connections into AIX don't work well. A brief
6101 + test with "pty rlogin somehost" got a perfectly usable terminal
6102 + (CONNECT) session, but file-transfer problems like those just
6105 + Reportedly, telnet from AIX 4.1-point-something to non-Telnet ports
6106 + does not work unless the port number is in the /etc/services file;
6107 + it's not clear from the report whether this is a problem with AIX
6108 + Telnet (in which case it would not affect Kermit), or with the sockets
6109 + library (in which case it would). The purported fix is IBM APAR
6112 + C-Kermit SET HOST or TELNET from one AIX 3.1 (or earlier) system to
6113 + another won't work right unless you set your local terminal type to
6114 + something other than AIXTERM. When your terminal type is AIXTERM, AIX
6115 + TELNET sends two escapes whenever you type one, and the AIX telnet
6116 + server swallows one of them. This has something to do with the "hft"
6117 + device. This behavior seems to be removed in AIX 3.2 and later.
6118 + ______________________________________________________________________
6120 + 3.1.3. AIX: Serial Connections
6122 + [ [169]Top ] [ [170]Contents ] [ [171]Section Contents ] [ [172]Next ]
6125 + In AIX 3, 4, or 5, C-Kermit won't be able to "set line /dev/tty0" (or
6126 + any other dialout device) if you haven't installed "cu" or "uucp" on
6127 + your system, because installing these is what creates the UUCP
6128 + lockfile directory. If SET LINE commands always result in "Sorry,
6129 + access to lock denied", even when C-Kermit has been given the same
6130 + owner, group, and permissions as cu:
6132 + -r-sr-xr-x 1 uucp uucp 67216 Jul 27 1999 cu
6134 + and even when you run it as root, then you must go back and install
6135 + "cu" from your AIX installation media.
6137 + According to IBM's "From Strength to Strength" document (21 April
6138 + 1998), in AIX 4.2 and later "Async supports speeds on native serial
6139 + ports up to 115.2kbps". However, no API is documented to achieve
6140 + serial speeds higher than 38400 bps. Apparently the way to do this --
6141 + which might or might not work only on the IBM 128-port multiplexer --
6144 + cxma-stty fastbaud /dev/tty0
6146 + which, according to "man cxma-stty":
6148 + fastbaud Alters the baud rate table, so 50 baud becomes 57600 baud.
6149 + -fastbaud Restores the baud rate table, so 57600 baud becomes 50
6152 + Presumably (but not certainly) this extrapolates to 110 "baud" becomes
6153 + 76800 bps, and 150 becomes 115200 bps. So to use high serial speeds in
6154 + AIX 4.2 or 4.3, the trick would be to give the "cxma-stty fastbaud"
6155 + command for the desired tty device before starting Kermit, and then
6156 + use "set speed 50", "set speed 110", or "set speed 150" to select
6157 + 56700, 76800, or 115200 bps. It is not known whether cxma-stty
6158 + requires privilege.
6160 + According to one report, "Further investigation with IBM seems to
6161 + indicate that the only hardware capable of doing this is the 128-port
6162 + multiplexor with one (or more) of the 16 port breakout cables
6163 + (Enhanced Remote Async Node 16-Port EIA-232). We are looking at about
6164 + CDN$4,000 in hardware just to hang a 56kb modem on there. Of course,
6165 + we can then hang 15 more, if we want. This hardware combo is described
6166 + to be good to 230.4kbps."
6168 + Another report says (quote from AIX newsgroup, March 1999):
6170 + The machine type and the adapter determine the speed that one can
6171 + actually run at. The older microchannel machines have much slower
6172 + crystal frequencies and may not go beyond 76,800. A feature put
6173 + into AIX 421 allows one to key in non-POSIX baud rates and if the
6174 + uart can support that speed, it will get set. this applies also to
6175 + 43p's and beyond. 115200 is the max for the 43P's native serial
6176 + port. As crytal frequencies continue to increase, the built-in
6177 + serial ports speeds will improve. To use 'uucp' or 'ate' at the
6178 + higher baud rates, configure the port for the desired speed, but
6179 + set the speed of uucp or ate to 50. Any non-POSIX speeds set in the
6180 + ttys configuration will the be used. In the case of the 128-port
6181 + adapters or the ISA 8-port or PCI 8-port adapter, there are only a
6182 + few higher baud rates.
6184 + a. Change the port to enable high baud rates:
6189 + b. chdev -l ttyX -a fastbaud=enable
6190 + + For the 128 ports original style rans, only 57600 bps is
6192 + + For the new enhanced RANs, up to 230Kbps is supported.
6194 + In AIX 2.2.1 on the RT PC with the 8-port multiplexer, SET SPEED 38400
6195 + gives 9600 bps, but SET SPEED 19200 gives 19200 (on the built-in S1
6198 + Note that some RS/6000s (e.g. the IBM PowerServer 320) have
6199 + nonstandard rectangular 10-pin serial ports; the DB-25 connector is
6200 + NOT a serial port; it is a parallel printer port. IBM cables are
6201 + required for the serial ports, (The IBM RT PC also had rectangular
6202 + serial ports -- perhaps the same as these, perhaps different.)
6204 + If you dial in to AIX through a modem that is connected directly to an
6205 + AIX port (e.g. on the 128-port multiplexer) and find that data is
6206 + lost, especially when uploading files to the AIX system (and system
6207 + error logs report buffer overruns on the port):
6209 + 1. Make sure the port and modem are BOTH configured for hardware
6210 + (RTS/CTS) flow control. The port is configured somewhere in the
6211 + system configuration, outside of Kermit.
6212 + 2. Tell C-Kermit to "set flow keep"; experimentation shows that SET
6213 + FLOW RTS/CTS has no effect when used in remote mode (i.e. on
6214 + /dev/tty, as opposed to a specify port device).
6215 + 3. Fixes for bugs in the original AIX 4.2 tty (serial i/o) support
6216 + and other AIX bugs are available from IBM at:
6217 + [174]http://service.software.ibm.com/rs6000/
6218 + Downloads -> Software Fixes -> Download FixDist gets an
6219 + application for looking up known problems.
6221 + Many problems reported with bidirectional terminal lines on AIX 3.2.x
6222 + on the RS/6000. Workaround: don't use bidirectional terminal lines, or
6223 + write a shell-script wrapper for Kermit that turns getty off on the
6224 + line before starting Kermit, or before Kermit attempts to do the SET
6225 + LINE. (But note: These problems MIGHT be fixed in C-Kermit 6.0 and
6226 + later.) The commands for turning getty off and on (respectively) are
6227 + /usr/sbin/pdisable and /usr/sbin/penable.
6228 + ______________________________________________________________________
6230 + 3.1.4. AIX: File Transfer
6232 + [ [175]Top ] [ [176]Contents ] [ [177]Section Contents ] [ [178]Next ]
6235 + Evidently AIX 4.3 (I don't know about earlier versions) does not allow
6236 + open files to be overwritten. This can cause Kermit transfers to fail
6237 + when FILE COLLISION is OVERWRITE, where they might work on other Unix
6238 + varieties or earlier AIX versions.
6240 + Transfer of binary -- and maybe even text -- files can fail in AIX if
6241 + the AIX terminal has particular port can have character-set
6242 + translation done for it by the tty driver. The following advice from a
6243 + knowledgeable AIX user:
6245 + [This feature] has to be checked (and set/cleared) with a separate
6246 + command, unfortunately stty doesn't handle this. To check:
6249 + input map: none installed
6250 + output map: none installed
6252 + If it says anything other than "none installed" for either one, it
6253 + is likely to cause a problem with kermit. To get rid of installed
6256 + $ setmaps -t NOMAP
6258 + However, I seem to recall that with some versions of AIX before
6259 + 3.2.5, only root could change the setting. I'm not sure what
6260 + versions - it might have only been under AIX 3.1 that this was
6261 + true. At least with AIX 3.2.5 an ordinary user can set or clear the
6264 + On the same problem, another knowledgeable AIX user says:
6266 + The way to get information on the NLS mapping under AIX (3.2.5
6267 + anyway) is as follows. From the command line type:
6269 + lsattr -l tty# -a imap -a omap -E -H
6271 + Replace the tty number for the number sign above. This will give a
6272 + human readable output of the settings that looks like this;
6274 + # lsattr -l tty2 -a imap -a omap -E -H
6275 + attribute value description user_settable
6277 + imap none INPUT map file True
6278 + omap none OUTPUT map file True
6280 + If you change the -H to a -O, you get output that can easily be
6281 + processed by another program or a shell script, for example:
6283 + # lsattr -l tty2 -a imap -a omap -E -O
6287 + To change the settings from the command line, the chdev command is
6288 + used with the following syntax.
6290 + chdev -l tty# -a imap='none' -a omap='none'
6292 + Again substituting the appropriate tty port number for the number
6293 + sign, "none" being the value we want for C-Kermit. Of course, the
6294 + above can also be changed by using the SMIT utility and selecting
6295 + devices - tty. (...end quote)
6296 + ______________________________________________________________________
6298 + 3.1.5. AIX: Xterm Key Map
6300 + [ [180]Top ] [ [181]Contents ] [ [182]Section Contents ] [
6303 + Here is a sample configuration for setting up an xterm keyboard for
6304 + VT220 or higher terminal emulation on AIX, courtesy of Bruce Momjian,
6305 + Drexel Hill, PA. Xterm can be started like this:
6307 + xterm $XTERMFLAGS +rw +sb +ls $@ -tm 'erase ^? intr ^c' -name vt220 \
6308 + -title vt220 -tn xterm-220 "$@" &
6310 +---------------------------------------------------------------------------
6311 + XTerm*VT100.Translations: #override \n\
6312 + <Key>Home: string(0x1b) string("[3~") \n \
6313 + <Key>End: string(0x1b) string("[4~") \n
6314 + vt220*VT100.Translations: #override \n\
6315 + Shift <Key>F1: string("[23~") \n \
6316 + Shift <Key>F2: string("[24~") \n \
6317 + Shift <Key>F3: string("[25~") \n \
6318 + Shift <Key>F4: string("[26~") \n \
6319 + Shift <Key>F5: string("[K~") \n \
6320 + Shift <Key>F6: string("[31~") \n \
6321 + Shift <Key>F7: string("[31~") \n \
6322 + Shift <Key>F8: string("[32~") \n \
6323 + Shift <Key>F9: string("[33~") \n \
6324 + Shift <Key>F10: string("[34~") \n \
6325 + Shift <Key>F11: string("[28~") \n \
6326 + Shift <Key>F12: string("[29~") \n \
6327 + <Key>Print: string(0x1b) string("[32~") \n\
6328 + <Key>Cancel: string(0x1b) string("[33~") \n\
6329 + <Key>Pause: string(0x1b) string("[34~") \n\
6330 + <Key>Insert: string(0x1b) string("[2~") \n\
6331 + <Key>Delete: string(0x1b) string("[3~") \n\
6332 + <Key>Home: string(0x1b) string("[1~") \n\
6333 + <Key>End: string(0x1b) string("[4~") \n\
6334 + <Key>Prior: string(0x1b) string("[5~") \n\
6335 + <Key>Next: string(0x1b) string("[6~") \n\
6336 + <Key>BackSpace: string(0x7f) \n\
6337 + <Key>Num_Lock: string(0x1b) string("OP") \n\
6338 + <Key>KP_Divide: string(0x1b) string("Ol") \n\
6339 + <Key>KP_Multiply: string(0x1b) string("Om") \n\
6340 + <Key>KP_Subtract: string(0x1b) string("OS") \n\
6341 + <Key>KP_Add: string(0x1b) string("OM") \n\
6342 + <Key>KP_Enter: string(0x1b) string("OM") \n\
6343 + <Key>KP_Decimal: string(0x1b) string("On") \n\
6344 + <Key>KP_0: string(0x1b) string("Op") \n\
6345 + <Key>KP_1: string(0x1b) string("Oq") \n\
6346 + <Key>KP_2: string(0x1b) string("Or") \n\
6347 + <Key>KP_3: string(0x1b) string("Os") \n\
6348 + <Key>KP_4: string(0x1b) string("Ot") \n\
6349 + <Key>KP_5: string(0x1b) string("Ou") \n\
6350 + <Key>KP_6: string(0x1b) string("Ov") \n\
6351 + <Key>KP_7: string(0x1b) string("Ow") \n\
6352 + <Key>KP_8: string(0x1b) string("Ox") \n\
6353 + <Key>KP_9: string(0x1b) string("Oy") \n
6355 + ! <Key>Up: string(0x1b) string("[A") \n\
6356 + ! <Key>Down: string(0x1b) string("[B") \n\
6357 + ! <Key>Right: string(0x1b) string("[C") \n\
6358 + ! <Key>Left: string(0x1b) string("[D") \n\
6365 + ________________________________________________________________________
6367 + 3.2. C-KERMIT AND HP-UX
6369 + [ [184]Top ] [ [185]Contents ] [ [186]Section Contents ] [ [187]Next ]
6374 + 3.2.0. [189]Common Problems
6375 + 3.2.1. [190]Building C-Kermit on HP-UX
6376 + 3.2.2. [191]File Transfer
6377 + 3.2.3. [192]Dialing Out and UUCP Lockfiles in HP-UX
6378 + 3.2.4. [193]Notes on Specific HP-UX Releases
6379 + 3.2.5. [194]HP-UX and X.25
6383 + For further information, read the [195]comp.sys.hp.hpux newsgroup.
6385 + C-Kermit is included as part of the HP-UX operating system by contract
6386 + between Hewlett Packard and Columbia University for HP-UX 10.00 and
6387 + later. Each level of HP-UX includes a freshly built C-Kermit binary in
6388 + /bin/kermit, which should work correctly. Binaries built for regular
6389 + HP-UX may be used on Trusted HP-UX and vice-versa, except for use as
6390 + IKSD because of the different authentication methods.
6392 + Note that HP does not update C-Kermit versions for any but its most
6393 + current HP-UX release. So, for example, HP-UX 10.20 has C-Kermit 6.0;
6394 + 11.00 has C-Kermit 7.0, and 11.22 has 8.0. Of course, as with all
6395 + software, older Kermit versions have bugs (such as buffer overflow
6396 + vulnerabilities) that are fixed in later versions. From time to time,
6397 + HP discovers one of these (long-ago fixed) bugs and issues a security
6398 + alert for the older OS's, recommending some draconian measure to avoid
6399 + the problem. The true fix in each situation is to install the current
6400 + release of C-Kermit.
6402 + 3.2.0. Common Problems
6404 + [ [196]Top ] [ [197]Contents ] [ [198]Section Contents ] [ [199]Next ]
6406 + Some HP workstations have a BREAK/RESET key. If you hit this key while
6407 + C-Kermit is running, it might kill or suspend the C-Kermit process.
6408 + C-Kermit arms itself against these signals, but evidently the
6409 + BREAK/RESET key is -- at least in some circumstances, on certain HP-UX
6410 + versions -- too powerful to be caught. (Some report that the first
6411 + BREAK/RESET shows up as SIGINT and is caught by C-Kermit's former
6412 + SIGINT handler even when SIGINT is currently set to SIG_IGN; the
6413 + second kills Kermit; other reports suggest the first BREAK/RESET sends
6414 + a SIGTSTP (suspend signal) to Kermit, which it catches and suspends
6415 + itself. You can tell C-Kermit to ignore suspend signals with SET
6416 + SUSPEND OFF. You can tell C-Kermit to ignore SIGINT with SET COMMAND
6417 + INTERRUPTION OFF. It is not known whether these commands also grant
6418 + immunity to the BREAK/RESET key (one report states that with SET
6419 + SUSPEND OFF, the BREAK/RESET key is ignored the first four times, but
6420 + kills Kermit the 5th time). In any case:
6422 + 1. If this key is mapped to SIGINT or SIGTSTP, C-Kermit catches or
6423 + ignores it, depending on which mode (CONNECT, command, etc) Kermit
6425 + 2. If it causes HP-UX to kill C-Kermit, there is nothing C-Kermit can
6428 + When HP-UX is on the remote end of the connection, it is essential
6429 + that HP-UX C-Kermit be configured for Xon/Xoff flow control (this is
6430 + the default, but in case you change it and then experience
6431 + file-transfer failures, this is a likely reason).
6432 + ________________________________________________________________________
6434 + 3.2.1. Building C-Kermit on HP-UX
6436 + [ [200]Top ] [ [201]Contents ] [ [202]Section Contents ] [ [203]Next ]
6439 + This section applies mainly to old (pre-10.20) HP-UX version on
6440 + old, slow, and/or memory-constrained hardware.
6442 + During the C-Kermit 6.0 Beta cycle, something happened to ckcpro.w
6443 + (or, more precisely, the ckcpro.c file that is generated from it)
6444 + which causes HP optimizing compilers under HP-UX versions 7.0 and 8.0
6445 + (apparently on all platforms) as well as under HP-UX 9.0 on Motorola
6446 + platforms only, to blow up. In versions 7.0 and 8.0 the problem has
6447 + spread to other modules.
6449 + The symptoms vary from the system grinding to a halt, to the compiler
6450 + crashing, to the compilation of the ckcpro.c module taking very long
6451 + periods of time, like 9 hours. This problem is handled by compiling
6452 + the modules that tickle it without optimization; the new C-Kermit
6453 + makefile takes care of this, and shows how to do it in case the same
6454 + thing begins happening with other modules.
6456 + On HP-UX 9.0, a kernel parameter, maxdsiz (maximum process data
6457 + segment size), seems to be important. On Motorola systems, it is 16MB
6458 + by default, whereas on RISC systems the default is much bigger.
6459 + Increasing maxdsiz to about 80MB seems to make the problem go away,
6460 + but only if the system also has a lot of physical memory -- otherwise
6461 + it swaps itself to death.
6463 + The optimizing compiler might complain about "some optimizations
6464 + skipped" on certain modules, due to lack of space available to the
6465 + optimizer. You can increase the space (the incantation depends on the
6466 + particular compiler version -- see the [205]makefile), but doing so
6467 + tends to make the compilations take a much longer time. For example,
6468 + the "hpux0100o+" makefile target adds the "+Onolimit" compiler flag,
6469 + and about an hour to the compile time on an HP-9000/730. But it *does*
6470 + produce an executable that is about 10K smaller :-)
6472 + In the makefile, all HP-UX entries automatically skip optimization of
6473 + problematic modules.
6474 + ________________________________________________________________________
6476 + 3.2.2. File Transfer
6478 + [ [206]Top ] [ [207]Contents ] [ [208]Section Contents ] [ [209]Next ]
6481 + Telnet connections into HP-UX versions up to and including 11.11 (and
6482 + possibly 11.20) tend not to lend themselves to file transfer due to
6483 + limitations, restrictions, and/or bugs in the HP-UX Telnet server
6484 + and/or pseudoterminal (pty) driver.
6486 + In C-Kermit 6.0 (1996) an unexpected slowness was noted when
6487 + transferring files over local Ethernet connections when an HP-UX
6488 + system (9.05 or 10.00) was on the remote end. The following experiment
6489 + was conducted to determine the cause. C-Kermit 6.0 was used; the
6490 + situation is slightly better using C-Kermit 7.0's streaming feature
6491 + and HP-UX 10.20 on the far end.
6493 + The systems were HP-UX 10.00 (on 715/33) and SunOS 4.1.3 (on
6494 + Sparc-20), both on the same local 10Mbps Ethernet, packet length 4096,
6495 + parity none, control prefixing "cautious", using only local disks on
6496 + each machine -- no NFS. In the C-Kermit 6.0 (ACK/NAK) case, the window
6497 + size was 20; in the streaming case there is no window size (i.e. it is
6498 + infinite). The test file was C-Kermit executable, transferred in
6499 + binary mode. Conditions were relatively poor: the Sun and the local
6500 + net heavily loaded; the HP system is old, slow, and
6501 + memory-constrained.
6503 + C-Kermit 6.0... C-Kermit 7.0...
6504 + Local Remote ACK/NAK........ Streaming......
6505 + Client Server Send Receive Send Receive
6506 + Sun HP 36 18 64 18
6508 + HP Sun 77 83 118 92
6509 + Sun Sun 60 60 153 158
6511 + So whenever HP is the remote we have poor performance. Why?
6513 + * Changing file display to CRT has no effect (so it's not the curses
6514 + library on the client side).
6515 + * Changing TCP RECV-BUFFER or SEND-BUFFER has little effect.
6516 + * Telling the client to make a binary-mode connection (SET TELNET
6517 + BINARY REQUESTED, which successfully negotiates a binary
6518 + connection) has no effect on throughput.
6520 + BUT... If I start HP-UX C-Kermit as a TCP service:
6525 + and then from the client "set host xxx 3000", I get:
6527 + C-Kermit 6.0... C-Kermit 7.0...
6528 + Local Remote ACK/NAK........ Streaming......
6529 + Client Server Send Receive Send Receive
6530 + Sun HP 77 67 106 139
6532 + HP Sun 57 85 155 105
6533 + Sun Sun 57 50 321 314
6535 + Therefore the HP-UX telnet server or pty driver seems to be adding
6536 + more overhead than the SunOS one, and most others. When going through
6537 + this type of connection (a remote telnet server) there is little
6538 + Kermit can do improve matters, since the telnet server and pty driver
6539 + are between the two Kermits, and neither Kermit program can have any
6540 + influence over them (except putting the Telnet connection in binary
6541 + mode, but that doesn't help).
6543 + (The numbers for the HP-HP transfers are lower than the others since
6544 + both Kermit processes are running on the same slow 33MHz CPU.)
6546 + Matters seem to have deteriorated in HP-UX 11. Now file transfers over
6547 + Telnet connections fail completely, rather than just being slow. In
6548 + the following trial, a Telnet connection was made from Kermit 95 to
6549 + HP-UX 11.11 on an HP-9000/785/B2000 over local 10Mbps Ethernet running
6550 + C-Kermit 8.00 in server mode (under the HP-UX Telnet server):
6552 + Text........ Binary......
6553 + Stream Pktlen GET SEND GET SEND
6554 + On 4000 Fail Fail Fail Fail
6555 + Off 4000 Fail Fail Fail Fail
6556 + Off 2000 OK Fail OK Fail
6557 + On 2000 OK Fail OK Fail
6558 + On 3000 Fail Fail Fail Fail
6559 + On 2500 Fail Fail Fail Fail
6560 + On 2047 OK Fail OK Fail
6561 + On 2045 OK Fail OK Fail
6562 + Off 500 OK OK OK OK
6563 + On 500 OK Fail OK Fail
6564 + On 240 OK Fail OK Fail
6566 + As you can see, downloads are problematic unless the receiver's Kermit
6567 + packet length is 2045 or less, but uploads work only with streaming
6568 + disabled and the packet length restricted to 500. To force file
6569 + transfers to work on this connection, the desktop Kermit must be told
6573 + set receive packet-length 2000
6574 + set send packet-length 500
6576 + However, if a connection is made between the same two programs on the
6577 + same two computers over the same network, but this time a direct
6578 + socket-to-socket connection bypassing the HP-UX Telnet server and pty
6579 + driver (tell HP-UX C-Kermit to "set host /server * 3000 /raw"; tell
6580 + desktop client program to "set host blah 3000 /raw"), everything works
6581 + perfectly with the default Kermit settings (streaming, 4K packets,
6582 + liberal control-character unprefixing, 8-bit transparency, etc):
6584 + Text........ Binary......
6585 + Stream Pktlen GET SEND GET SEND
6586 + On 4000 OK OK OK OK
6588 + And in this case, transfer rates were approximately 900,000 cps. To
6589 + verify that the behavior reported here is not caused by the new Kermit
6590 + release, the same experiment was performed on a Telnet connection from
6591 + the same PC over the same network to the old 715/33 running HP-UX
6592 + 10.20 and C-Kermit 8.00. Text and binary uploads and downloads worked
6593 + perfectly (albeit slowly) with all the default settings -- streaming,
6595 + ________________________________________________________________________
6597 + 3.2.3. Dialing Out and UUCP Lockfiles in HP-UX
6599 + [ [211]Top ] [ [212]Contents ] [ [213]Section Contents ] [ [214]Next ]
6602 + HP workstations do not come with dialout devices configured; you have
6603 + to do it yourself (as root). First look in /dev to see what's there;
6604 + for example in HP-UX 10.00 or later:
6609 + If you find a tty0p0 device but no cua0p0, you'll need to creat one if
6610 + you want to dial out; the tty0p0 does not work for dialing out. It's
6611 + easy: start SAM; in the main Sam window, double-click on Peripheral
6612 + Device, then in the Peripheral Devices window, double-click on
6613 + Terminals and Modems. In the Terminals and Modems dialog, click on
6614 + Actions, then choose "Add modem" and fill in the blanks. For example:
6615 + Port number 0, speed 57600 (higher speeds tend not to work reliably),
6616 + "Use device for calling out", do NOT "Receive incoming calls" (unless
6617 + you know what you are doing), leave "CCITT modem" unchecked unless you
6618 + really have one, and do select "Use hardware flow control (RTS/CTS)".
6619 + Then click OK. This creates cua0p0 as well as cul0p0 and ttyd0p0
6621 + If the following sequence:
6623 + set line /dev/cua0p0 ; or other device
6624 + set speed 115200 ; or other normal speed
6626 + produces the message "?Unsupported line speed". This means either that
6627 + the port is not configured for dialout (go into SAM as described above
6628 + and make sure "Use device for calling out" is selected), or else that
6629 + speed you have given (such as 460800) is supported by the operating
6630 + system but not by the physical device (in which case, use a lower
6631 + speed like 57600).
6633 + In HP-UX 9.0, serial device names began to change. The older names
6634 + looked like "/dev/cua00", "/dev/tty01", etc (sometimes with only one
6635 + digit). The newer names have two digits with the letter "p" in
6636 + between. HP-UX 8.xx and earlier have the older form, HP-UX 10.00 and
6637 + later have the newer form. HP-UX 9.xx has the newer form on Series 800
6638 + machines, and the older form on other hardware models. The situation
6639 + is summarized in the following table (the Convio 10.0 column applies
6640 + to HP-UX 10 and 11).
6642 + Converged HP-UX Serial I/O Filenames : TTY Mux Naming
6643 + ---------------------------------------------------------------------
6644 + General meaning Old Form S800 9.0 Convio 10.0
6645 + ---------------------------------------------------------------------
6646 + tty* hardwired ports tty<YY> tty<X>p<Y> tty<D>p<p>
6647 + diag:mux<X> diag:mux<D>
6648 + ---------------------------------------------------------------------
6649 + ttyd* dial-in modems ttyd<YY> ttyd<X>p<Y> ttyd<D>p<p>
6650 + diag:ttyd<X>p<Y> diag:ttyd<D>p<p>
6651 + ---------------------------------------------------------------------
6652 + cua* auto-dial out cua<YY> cua<X>p<Y> cua<D>p<p>
6654 + ---------------------------------------------------------------------
6655 + cul* dial-out cul<YY> cul<X>p<Y> cul<D>p<p>
6657 + ---------------------------------------------------------------------
6658 + <X>= LU (Logical Unit) <D>= Devspec (decimal card instance)
6659 + <Y> or <YY> = Port <p>= Port
6661 + For dialing out, you should use the cua or cul devices. When
6662 + C-Kermit's CARRIER setting is AUTO or ON, C-Kermit should pop back to
6663 + its prompt automatically if the carrier signal drops, e.g. when you
6664 + log out from the remote computer or service. If you use the tty<D>p<d>
6665 + (e.g. tty0p0) device, the carrier signal should be ignored. The
6666 + tty<D>p<d> device should be used for direct connections where the
6667 + carrier signal does not follow RS-232 conventions (use the cul device
6668 + for hardwired connections through a true null modem). Do not use the
6669 + ttyd<D>p<d> device for dialing out.
6671 + Kermit's access to serial devices is controlled by "UUCP lockfiles",
6672 + which are intended to prevent different users using different software
6673 + programs (Kermit, cu, etc, and UUCP itself) from accessing the same
6674 + serial device at the same time. When a device is in use by a
6675 + particular user, a file with a special name is created in:
6677 + /var/spool/locks (HP-UX 10.00 and later)
6678 + /usr/spool/uucp (HP-UX 9.xx and earlier)
6680 + The file's name indicates the device that is in use, and its contents
6681 + indicates the process ID (pid) of the process that is using the
6682 + device. Since serial devices and the locks directory are not both
6683 + publicly readable and writable, Kermit and other communication
6684 + software must be installed setuid to the owner (bin) of the serial
6685 + device and setgid to the group (daemon) of the /var/spool/locks
6686 + directory. Kermit's setuid and setgid privileges are enabled only when
6687 + opening the device and accessing the lockfiles.
6689 + Let's say "unit" means a string of decimal digits (the interface
6690 + instance number) followed (in HP-UX 10.00 and later) by the letter "p"
6691 + (lowercase), followed by another string of decimal digits (the port
6692 + number on the interface), e.g.:
6694 + "0p0", "0p1", "1p0", etc (HP-UX 10.00 and later)
6695 + "0p0", "0p1", "1p0", etc (HP-UX 9.xx on Series 800)
6696 + "00", "01", "10", "0", etc (HP-UX 9.xx not on Series 800)
6697 + "00", "01", "10", "0", etc (HP-UX 8.xx and earlier)
6699 + Then a normal serial device (driver) name consists of a prefix ("tty",
6700 + "ttyd", "cua", "cul", or possibly "cuad" or "culd") followed by a
6701 + unit, e.g. "cua0p0". Kermit's treatment of UUCP lockfiles is as close
6702 + as possible to that of the HP-UX "cu" program. Here is a table of the
6703 + lockfiles that Kermit creates for unit 0p0:
6705 + Selection Lockfile 1 Lockfile 2
6706 + /dev/tty0p0 LCK..tty0p0 (none)
6707 +* /dev/ttyd0p0 LCK..ttyd0p0 (none)
6708 + /dev/cua0p0 LCK..cua0p0 LCK..ttyd0p0
6709 + /dev/cul0p0 LCK..cul0p0 LCK..ttyd0p0
6710 + /dev/cuad0p0 LCK..cuad0p0 LCK..ttyd0p0
6711 + /dev/culd0p0 LCK..culd0p0 LCK..ttyd0p0
6712 + <other> LCK..<other> (none)
6714 + (* = Dialin device, should not be used.)
6716 + In other words, if the device name begins with "cu", a second lockfile
6717 + for the "ttyd" device, same unit, is created, which should prevent
6718 + dialin access on that device.
6720 + The <other> case allows for symbolic links, etc, but of course it is
6721 + not foolproof since we have no way of telling which device is really
6724 + When C-Kermit tries to open a dialout device whose name ends with a
6725 + "unit", it searches the lockfile directory for all possible names for
6726 + the same unit. For example, if user selects /dev/cul2p3, Kermit looks
6727 + for lockfiles named:
6736 + If any of these files are found, Kermit opens them to find out the ID
6737 + (pid) of the process that created them; if the pid is still valid, the
6738 + process is still active, and so the SET LINE command fails and the
6739 + user is informed of the pid so s/he can use "ps" to find out who is
6742 + If the pid is not valid, the file is deleted. If all such files (i.e.
6743 + with same "unit" designation) are successfully removed, then the SET
6744 + LINE command succeeds; up to six messages are printed telling the user
6745 + which "stale lockfiles" are being removed.
6747 + When the "set line" command succeeds in HP-UX 10.00 and later,
6748 + C-Kermit also creates a Unix System V R4 "advisory lock" as a further
6749 + precaution (but not guarantee) against any other process obtaining
6750 + access to the device while you are using it.
6752 + If the selected device was in use by "cu", Kermit can't open it,
6753 + because "cu" has changed its ownership, so we never get as far as
6754 + looking at the lockfiles. In the normal case, we can't even look at
6755 + the device to see who the owner is because it is visible only to its
6756 + (present) owner. In this case, Kermit says (for example):
6758 + /dev/cua0p0: Permission denied
6760 + When Kermit releases a device it has successfully opened, it removes
6761 + all the lockfiles that it created. This also happens whenever Kermit
6762 + exits "under its own power".
6764 + If Kermit is killed with a device open, the lockfile(s) are left
6765 + behind. The next Kermit program that tries to assign the device, under
6766 + any of its various names, will automatically clean up the stale
6767 + lockfiles because the pids they contain are invalid. The behavior of
6768 + cu and other communication programs under these conditions should be
6771 + Here, by the way, is a summary of the differences between the HP-UX
6772 + port driver types from John Pezzano of HP:
6774 + There are three types of device files for each port.
6776 + The ttydXXX device file is designed to work as follows:
6778 + 1. The process that opens it does NOT get control of the port until
6779 + CD is asserted. This was intentional (over 15 years ago) to allow
6780 + getty to open the port but not control it until someone called in.
6781 + If a process wants to use the direct or callout device files
6782 + (ttyXXX and culXXX respectively), they will then get control and
6783 + getty would be blocked. This eliminated the need to use uugetty
6784 + (and its inherent problems with lock files) for modems. You can
6785 + see this demonstrated by the fact that "ps -ef" shows a ? in the
6786 + tty column for the getty process as getty does not have the port
6788 + 2. Once CD is asserted, the port is controlled by getty (or the
6789 + process handling an incoming call) if there was no process using
6790 + the port. The ? in the "ps" command now shows the port. At this
6791 + point, the port accepts data.
6793 + Therefore you should use either the callout culXXX device file
6794 + (immediate control but no data until CD is asserted) or the direct
6795 + device file ttyXXX which gives immediate control and immediate data
6796 + and which ignores by default modem control signals.
6798 + The ttydXXX device should be used only for callin and my
6799 + recommendation is to use it only for getty and uugetty.
6800 + ________________________________________________________________________
6802 + 3.2.4 Notes on Specific HP-UX Releases
6806 + 3.2.4.1. [216]HP-UX 11
6807 + 3.2.4.2. [217]HP-UX 10
6808 + 3.2.4.3. [218]HP-UX 9
6809 + 3.2.4.4. [219]HP-UX 8
6810 + 3.2.4.5. [220]HP-UX 7 and Earlier
6814 + [ [221]Top ] [ [222]Contents ] [ [223]Section Contents ] [ [224]Next ]
6816 + As noted in [225]Section 3.2.2, the HP-UX 11 Telnet server and/or
6817 + pseudoterminal driver are a serious impediment to file transfer over
6818 + Telnet connections into HP-UX. If you have a Telnet connection into
6819 + HP-UX 11, tell your desktop Kermit program to:
6822 + set receive packet-length 2000
6823 + set send packet-length 500
6825 + File transfer speeds over connections from HP-UX 11 (dialed or Telnet)
6826 + are not impeded whatsoever, and can go at whatever speed is allowed by
6827 + the connection and the Kermit partner on the far end.
6829 + PA-RISC binaries for HP-UX 10.20 or later should run on any PA-RISC
6830 + system, S700 or S800, as long as the binary was not built under a
6831 + later HP-UX version than the host operating system. HP-UX 11.00 and
6832 + 11.11 are only for PA-RISC systems. HP-UX 11.20 is only for IA64
6833 + (subsequent HP-UX releases will be for both PA-RISC and IA64). To
6834 + check binary compatibility, the following C-Kermit 8.0 binaries were
6835 + run successfully on an HP-9000/785 with HP-UX 11.11:
6837 + * Model 7xx HP-UX 10.20
6838 + * Model 8xx HP-UX 10.20
6839 + * Model 7xx HP-UX 11.00
6840 + * Model 8xx HP-UX 11.00
6841 + * Model 7xx HP-UX 11.11
6842 + * Model 8xx HP-UX 11.11
6844 + Binaries built under some of the earlier HP-UX releases, such as 9.05,
6845 + might also work, but only if built for the same hardware family (e.g.
6847 + ________________________________________________________________________
6851 + [ [226]Top ] [ [227]Contents ] [ [228]Section Contents ] [ [229]Next ]
6854 + Beginning in HP-UX 10.10, libcurses is linked to libxcurses, the new
6855 + UNIX95 (X/Open) version of curses, which has some serious bugs; some
6856 + routines, when called, would hang and never return, some would dump
6857 + core. Evidently libxcurses contains a select() routine, and whenever
6858 + C-Kermit calls what it thinks is the regular (sockets) select(), it
6859 + gets the curses one, causing a segmentation fault. There is a patch
6860 + for this from HP, PHCO_8086, "s700_800 10.10 libcurses patch", "shared
6861 + lib curses program hangs on 10.10", "10.10 enhanced X/Open curses core
6862 + dumps due to using wrong select call", 96/08/02 (you can tell if the
6863 + patch is installed with "what /usr/lib/libxcurses.1"; the unpatched
6864 + version is 76.20, the patched one is 76.20.1.2). It has been verified
6865 + that C-Kermit works OK with the patched library, but results are not
6866 + definite for HP-UX 10.20 or higher.
6868 + To ensure that C-Kermit works even on non-patched HP-UX 10.10 systems,
6869 + separate makefile entries are provided for HP-UX 10.00/10.01, 10.10,
6870 + 10.20, etc, in which the entries for 10.10 and above link with
6871 + libHcurses, which is "HP curses", the one that was used in
6872 + 10.00/10.01. HP-UX 11.20 and later, however, link with libcurses, as
6873 + libHcurses disappeared in 11.20.
6874 + ________________________________________________________________________
6878 + [ [231]Top ] [ [232]Contents ] [ [233]Section Contents ] [ [234]Next ]
6881 + HP-UX 9.00 and 9.01 need patch PHNE_10572 (note: this replaces
6882 + PHNE_3641) for hptt0.o, asio0.o, and ttycomn.o in libhp-ux.a. Contact
6883 + Hewlett Packard if you need this patch. Without it, the dialout device
6884 + (tty) will be hung after first use; subsequent attempts to use will
6885 + return an error like "device busy". (There are also equivalent patches
6886 + for s700 9.03 9.05 9.07 (PHNE_10573) and s800 9.00 9.04 (PHNE_10416).
6888 + When C-Kermit is in server mode, it might have trouble executing
6889 + REMOTE HOST commands. This problem happens under HP-UX 9.00 (Motorola)
6890 + and HP-UX 9.01 (RISC) IF the C-Shell is the login shell AND with the
6891 + C-Shell Revision 70.15. Best thing is to install HP's Patch PHCO_4919
6892 + for Series 300/400 and PHCO_5015 for the Series 700/800. PHCO_5015 is
6893 + called "s700_800 9.X cumulative csh(1) patch with memory leak fix"
6894 + which works for HP-UX 9.00, 9.01, 9.03, 9.04, 9.05 and 9.07. At least
6895 + you need C-Shell Revision 72.12!
6897 + C-Kermit works fine -- including its curses-based file-transfer
6898 + display -- on the console terminal, in a remote session (e.g. when
6899 + logged in to the HP 9000 on a terminal port or when telnetted or
6900 + rlogin'd), and in an HP-VUE hpterm window or an xterm window.
6901 + ________________________________________________________________________
6905 + [ [236]Top ] [ [237]Contents ] [ [238]Section Contents ] [ [239]Next ]
6908 + To make C-Kermit work on HP-UX 8.05 on a model 720, obtain and install
6909 + HP-UX patch PHNE_0899. This patch deals with a lot of driver issues,
6910 + particularly related to communication at higher speeds.
6914 + On HP-UX 8 DON'T install 'tty patch' PHKL_4656, install PHKL_3047
6915 + instead! Yesterday I tried this latest tty patch PHKL_4656 and had
6916 + terrible problems. This patch should fix RTS/CTS problems. With
6917 + text transver all looks nice. But when I switched over to binary
6918 + files the serial interface returned only rubish to C-Kermit. All
6919 + sorts of protocol, CRC and packed errors I had. After several tests
6920 + and after uninstalling that patch, all transvers worked fine. MB's
6921 + of data without any errors. So keep your fingers away from that
6922 + patch. If anybody needs the PHKL_3047 patch I have it here. It is
6923 + no longer availabel from HP's patch base.
6924 + ________________________________________________________________________
6926 + 3.2.4.5. HP-UX 7 and Earlier
6928 + [ [241]Top ] [ [242]Contents ] [ [243]Section Contents ] [
6931 + When transferring files into HP-UX 5 or 6 over a Telnet connection,
6932 + you must not use streaming, and you must not use a packet length
6933 + greater than 512. However, you can use streaming and longer packets
6934 + when sending files from HP-UX on a Telnet connection. In C-Kermit 8.0,
6935 + the default receive packet length for HP-UX 5 and 6 was changed to 500
6936 + (but you can still increase it with SET RECEIVE PACKET-LENGTH if you
6937 + wish, e.g. for non-Telnet connections). Disable streaming with SET
6940 + The HP-UX 5.00 version of C-Kermit does not include the fullscreen
6941 + file-transfer because of problems with the curses library.
6943 + If HP-UX 5.21 with Wollongong TCP/IP is on the remote end of a Telnet
6944 + connection, streaming transfers to HP-UX invariably fail. Workaround:
6945 + SET STREAMING OFF. Packets longer than about 1000 should not be used.
6946 + Transfers from these systems, however, can use streaming and/or longer
6949 + Reportedly, "[there is] a bug in C-Kermit using HP-UX version 5.21 on
6950 + the HP-9000 series 500 computers. It only occurs when the controlling
6951 + terminal is using an HP-27140 six-port modem mux. The problem is not
6952 + present if the controlling terminal is logged into an HP-27130
6953 + eight-port mux. The symptom is that just after dialing successfully
6954 + and connecting Kermit locks up and the port is unusable until both
6955 + forks of Kermit and the login shell are killed." (This report predates
6956 + C-Kermit 6.0 and might no longer apply.)
6957 + ________________________________________________________________________
6959 + 3.2.5. HP-UX and X.25
6961 + [ [245]Top ] [ [246]Contents ] [ [247]Section Contents ] [
6964 + Although C-Kermit presently does not include built-in support for
6965 + HP-UX X.25 (as it does for the Sun and IBM X.25 products), it can
6966 + still be used to make X.25 connections as follows: start Kermit and
6967 + then telnet to localhost. After logging back in, start padem as you
6968 + would normally do to connect over X.25. Padem acts as a pipe between
6969 + Kermit and X.25. In C-Kermit 7.0, you might also be able to avoid the
6970 + "telnet localhost" step by using:
6972 + C-Kermit> pty padem address
6974 + This works if padem uses standard i/o (who knows?).
6975 + ________________________________________________________________________
6977 + 3.3. C-KERMIT AND LINUX
6979 + [ [249]Top ] [ [250]Contents ] [ [251]Section Contents ] [ [252]Next ]
6984 + 3.3.1. [254]Problems Building C-Kermit for Linux
6985 + 3.3.2. [255]Problems with Serial Devices in Linux
6986 + 3.3.3. [256]Terminal Emulation in Linux
6987 + 3.3.4. [257]Dates and Times
6988 + 3.3.5. [258]Startup Errors
6989 + 3.3.6. [259]The Fullscreen File Transfer Display
6993 + For further information, read the [260]comp.os.linux.misc,
6994 + [261]comp.os.linux.answers, and other Linux-oriented newsgroups, and
6997 + The Linux Document Project (LDP)
6998 + [262]http://www.tldp.org/
7001 + [263]http://www.tldp.org/FAQ/Linux-FAQ.html
7003 + The Linux HOWTOs (especially the Serial HOWTO)
7005 + [264]http://www.tldp.org/HOWTO/Serial-HOWTO.html
7007 + [265]http://tldp.org/HOWTO/Modem-HOWTO.html
7009 + [266]ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO
7011 + [267]ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO
7013 + [268]http://www.tldp.org/HOWTO/
7015 + [269]http://www.tldp.org/hmirrors.html
7017 + Linux Vendor Tech Support Pages:
7019 + [270]http://www.redhat.com/apps/support/
7021 + [271]http://www.debian.org/support
7023 + [272]http://www.slackware.com/support/
7025 + [273]http://www.caldera.com/support/
7027 + [274]http://www.suse.com/support/
7029 + [275]http://www.mandrake.com/support/
7031 + [276]http://www.turbolinux.com/support/
7033 + Linux Winmodem Support
7034 + [277]http://www.linmodems.org/
7036 + Also see general comments on PC-based Unixes in [278]Section 3.0.
7038 + What Linux version is it? -- "uname -a" supplies only kernel
7039 + information, but these days it's the distribution that matters: Red
7040 + Hat 7.3, Debian 2.2, Slackware 8.0, etc. Unfortunately there's no
7041 + consistent way to get the distribution version. Usually it's in a
7042 + distribution-specific file:
7044 + Red Hat: /etc/issue or /etc/redhat-release
7045 + Debian: /etc/debian_version
7046 + Slackware: /etc/slackware-version (at least in later versions)
7048 + Did you know: DECnet is available for Linux? See:
7050 + [279]http://linux.dreamtime.org/decnet/
7052 + (But there is no support for it in C-Kermit -- anybody interested in
7053 + adding it, please [280]let us know).
7055 + Before proceeding, let's handle the some of the most frequently asked
7056 + question in the Linux newsgroups:
7058 + 1. Neither C-Kermit nor any other Linux application can use
7059 + Winmodems, except in the [281]rare cases where Linux drivers have
7060 + been written for them. See [282]Section 3.0.2 for details.
7061 + 2. "Why does it take such a long time to make a telnet connection to
7062 + (or from) my Linux PC?" (this applies to C-Kermit and to regular
7063 + Telnet). Most telnet servers these days perform reverse DNS
7064 + lookups on the client (for security and/or logging reasons). If
7065 + the Telnet client's address cannot be found by the server's local
7066 + DNS server, the DNS request goes out to the Internet at large, and
7067 + this can take quite some time. The solution to this problem is to
7068 + make sure that both client and host are registered in DNS, and
7069 + that the registrations are exported. C-Kermit itself performs
7070 + reverse DNS lookups unless you tell it not to; this is to allow
7071 + C-Kermit to let you know which host it is actually connected to in
7072 + case you have made a connection to a host pool (multihomed host).
7073 + You can disable C-Kermit's reverse DNS lookup with SET TCP
7074 + REVERSE-DNS-LOOKUP OFF.
7075 + 3. (Any question that has the word "Telnet" in it...) The knee-jerk
7076 + reaction is "don't use Telnet, use SSH!" There's nothing wrong
7077 + with Telnet. In fact it's far superior to SSH as a protocol in
7078 + terms of features and extensibility, not to mention platform
7079 + neutrality. The issue lurking behind the knee-jerk reaction is
7080 + security. SSH is thought to be secure, whereas Telnet is thought
7081 + to be insecure. This is true for clear-text Telnet (because
7082 + passwords travel in the clear across the network), but apparently
7083 + few people realize that [283]secure Telnet clients and servers
7084 + have been available for years, and these are more secure than SSH
7085 + (for reasons explained [284]HERE.
7086 + 4. (Any question that has the word "FTP" in it...) The knee-jerk
7087 + reaction being "Don't use FTP, use SCP!" (or SFTP). Same answer as
7088 + above, but moreso. SCP and SFTP are not only not platform neutral,
7089 + they're diversity-hostile. They transfer files only in binary
7090 + mode, which mangles text files across different platforms, to the
7091 + same degree the platform's text-file record format and character
7092 + set differ. An extreme example would be an Variable-Block format
7093 + EBCDIC text file on an IBM mainframe, binary transfer of which to
7094 + Unix would do you little good indeed. FTP was designed with
7095 + diversity in mind and secure versions are available.
7096 + ________________________________________________________________________
7098 + 3.3.1. Problems Building C-Kermit for Linux
7100 + [ [285]Top ] [ [286]Contents ] [ [287]Section Contents ] [ [288]Next ]
7102 + Modern Linux distributions like Red Hat give you a choice at
7103 + installation whether to include "developer tools". Obviously, you
7104 + can't build C-Kermit or any other C program from source code if you
7105 + have not installed the developer tools. But to confuse matters, you
7106 + might also have to choose (separately) to install the "curses" or
7107 + "ncurses" terminal control library; thus it is possible to install the
7108 + C compiler and linker, but omit the (n)curses library and headers. If
7109 + curses is not installed, you will not be able to build a version of
7110 + C-Kermit that supports the fullscreen file-transfer display, in which
7111 + case you'll need to use the "linuxnc" makefile target (nc = No Curses)
7112 + or else install ncurses before building.
7114 + There are all sorts of confusing issues caused by the many and varied
7115 + Linux distributions. Some of the worst involve the curses library and
7116 + header files: where are they, what are they called, which ones are
7117 + they really? Other vexing questions involve libc5 vs libc6 vs glibc vs
7118 + glibc2 (C libraries), gcc vs egcs vs lcc (compilers), plus using or
7119 + avoiding features that were added in a certain version of Linux or a
7120 + library or a distribution, and are not available in others. As of
7121 + C-Kermit 8.0, these questions should be resolved by the "linux"
7122 + makefile target itself, which does a bit of looking around to see
7123 + what's what, and then sets the appropriate CFLAGS.
7124 + ________________________________________________________________________
7126 + 3.3.2. Problems with Serial Devices in Linux
7128 + [ [289]Top ] [ [290]Contents ] [ [291]Section Contents ] [ [292]Next ]
7131 + Also see: "man setserial", "man irqtune".
7132 + And: [294]Sections 3.0, [295]6, [296]7, and [297]8 of this
7135 + NOTE: Red Hat Linux 7.2 and later include a new API that allows
7136 + serial-port arbitration by non-setuid/gid programs. This API has
7137 + not yet been added to C-Kermit. If C-Kermit is to be used for
7138 + dialing out on Red Hat 7.2 or later, it must still be installed as
7139 + described in in Sections [298]10 and [299]11 of the
7140 + [300]Installation Instructions.
7142 + Don't expect it to be easy. Queries like the following are posted to
7143 + the Linux newsgroups almost daily:
7145 + Problem of a major kind with my Compaq Presario 1805 in the sense
7146 + that the pnpdump doesn't find the modem and the configuration tells
7147 + me that the modem is busy when I set everything by hand!
7149 + I have <some recent SuSE distribution>, kernel 2.0.35. Using the
7150 + Compaq tells me that the modem (which is internal) is on COM2, with
7151 + the usual IRQ and port numbers. Running various Windows diagnostics
7152 + show me AT-style commands exchanged so I have no reason to beleive
7153 + that it is a Winmodem. Also, the diagnostics under Win98 tell me
7154 + that I am talking to an NS 16550AN.
7156 + [Editor's note: This does not necessarily mean it isn't a Winmodem.]
7158 + Under Linux, no joy trying to talk to the modem on /dev/cua1
7159 + whether via minicom, kppp, or chat; kppp at least tells me that
7160 + tcgetattr() failed.
7162 + Usage of setserial:
7164 + setserial /dev/cua1 port 0x2F8 irq 3 autoconfig
7165 + setserial -g /dev/cua1
7167 + tells me that the uart is 'unknown'. I have tried setting the UART
7168 + manullay via. setserial to 16550A, 16550, and the other one (8550?)
7169 + (I didn't try 16540). None of these manual settings resulted in any
7172 + A look at past articles leads me to investigate PNP issues by
7173 + calling pnpdump but pnpdump returns "no boards found". I have
7174 + looked around on my BIOS (Phoenix) and there is not much evidence
7175 + of it being PNP aware. However for what it calls "Serial port A",
7176 + it offers a choice of Auto, Disabled or Manual settings (currently
7177 + set to Auto), but using the BIOS interface I tried to change to
7178 + 'manual' and saw the default settings offered to be were 0x3F8 and
7179 + IRQ 4 (COM1). The BIOS menus did not give me any chance to
7180 + configure COM2 or any "modem". I ended up not saving any BIOS
7181 + changes in the course of my investigations.
7183 + You can also find out a fair amount about your PC's hardware
7184 + configuration in the text files in /proc, e.g.:
7186 + -r--r--r-- 1 root 0 Sep 4 14:00 /proc/devices
7187 + -r--r--r-- 1 root 0 Sep 4 14:00 /proc/interrupts
7188 + -r--r--r-- 1 root 0 Sep 4 14:00 /proc/ioports
7189 + -r--r--r-- 1 root 0 Sep 4 14:00 /proc/pci
7191 + From the directory listing they look like empty files, but in fact
7192 + they are text files that you "cat":
7195 + Bus 0, device 14, function 0:
7196 + Serial controller: US Robotics/3Com 56K FaxModem Model 5610 (rev 1).
7198 + I/O at 0x1050 [0x1057].
7200 +$ setserial -g /dev/ttyS4
7201 +/dev/ttyS4, UART: 16550A, Port: 0x1050, IRQ: 10
7203 +$ cat /proc/ioports
7204 +1050-1057 : US Robotics/3Com 56K FaxModem Model 5610
7205 + 1050-1057 : serial(auto)
7207 +$ cat /proc/interrupts
7209 + 0: 7037515 XT-PIC timer
7210 + 1: 2 XT-PIC keyboard
7211 + 2: 0 XT-PIC cascade
7212 + 4: 0 XT-PIC serial
7214 + 9: 209811 XT-PIC usb-uhci, eth0
7215 + 14: 282015 XT-PIC ide0
7218 + Watch out for PCI, PCMCIA and Plug-n-Play devices, Winmodems, and the
7219 + like (see cautions in [301]Section 3.0 Linux supports Plug-n-Play
7220 + devices to some degree via the isapnp and pnpdump programs; read the
7221 + man pages for them. (If you don't have them, look on your installation
7222 + CD for isapnptool or download it from sunsite or a sunsite mirror or
7223 + other politically correct location du jour).
7225 + PCI modems do not use standard COM port addresses. The I/O address and
7226 + IRQ are assigned by the BIOS. All you need to do to get one working,
7227 + find out the I/O address and interrupt number with (as root) "lspci -v
7228 + | more" and then give the resulting address and interrupt number to
7231 + Even when you have a real serial port, always be wary of interrupt
7232 + conflicts and similar PC hardware configuration issues: a PC is not a
7233 + real computer like other Unix workstations -- it is generally pieced
7234 + together from whatever random components were the best bargain on the
7235 + commodity market the week it was built. Once it's assembled and boxed,
7236 + not even the manufacturer will remember what it's made of or how it
7237 + was put together because they've moved on to a new model. Their job is
7238 + to get it (barely) working with Windows; for Linux and other OS's you
7241 + "set line /dev/modem" or "set line /dev/ttyS2", etc, results in an
7242 + error, "/dev/modem is not a tty". Cause unknown, but obviously a
7243 + driver issue, not a Kermit one (Kermit uses "isatty()" to check that
7244 + the device is a tty, so it knows it will be able to issue all the
7245 + tty-related ioctl's on it, like setting the speed & flow control). Try
7246 + a different name (i.e. driver) for the same port, e.g. "set line
7247 + /dev/cua2" or whatever.
7249 + To find what serial ports were registered at the most recent system
7250 + boot, type (as root): "grep tty /var/log/dmesg".
7252 + "set modem type xxx" (where xxx is the name of a modem) followed by
7253 + "set line /dev/modem" or "set
7254 + line /dev/ttyS2", etc, hangs (but can be interrupted with Ctrl-C).
7255 + Experimentation shows that if the modem is configured to always assert
7256 + carrier (&C0) the same command does not hang. Again, a driver issue.
7257 + Use /dev/cua2 (or whatever) instead. (Or not -- hopefully none of
7258 + these symptoms occurs in C-Kermit 7.0 or later.)
7260 + "set line /dev/cua0" reports "Device is busy", but "set line
7261 + /dev/ttyS0" works OK.
7263 + In short: If the cua device doesn't work, try the corresponding ttyS
7264 + device. If the ttyS device doesn't work, try the corresponding cua
7265 + device -- but note that Linux developers do not recommend this, and
7266 + are phasing out the cua devices. From /usr/doc/faq/howto/Serial-HOWTO:
7268 + 12.4. What's The Real Difference Between the /dev/cuaN And /dev/ttySN
7270 + The only difference is the way that the devices are opened. The
7271 + dialin devices /dev/ttySN are opened in blocking mode, until CD
7272 + is asserted (ie someone connects). So, when someone wants to
7273 + use the /dev/cuaN device, there is no conflict with a program
7274 + watching the /dev/ttySN device (unless someone is connected of
7275 + course). The multiple /dev entries, allow operation of the same
7276 + physical device with different operating characteristics. It
7277 + also allows standard getty programs to coexist with any other
7278 + serial program, without the getty being retrofitted with
7279 + locking of some sort. It's especially useful since standard
7280 + Unix kernel file locking, and UUCP locking are both advisory
7281 + and not mandatory.
7283 + It was discovered during development of C-Kermit 7.0 that rebuilding
7284 + C-Kermit with -DNOCOTFMC (No Close/Open To Force Mode Change) made the
7285 + aforementioned problem with /dev/ttyS0 go away. It is not yet clear,
7286 + however, what its affect might be on the /dev/cua* devices. As of 19
7287 + March 1998, this option has been added to the CFLAGS in the makefile
7288 + entries for Linux ("make linux").
7290 + Note that the cua device is now "deprecated", and new editions of
7291 + Linux will phase (have phased) it out in favor of the ttyS device. See
7292 + (if it's still there):
7294 + [302]http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Mar_98/1441.html
7296 + (no, of course it isn't; you'll have to use your imagination). One
7297 + user reported that C-Kermit 7.0, when built with egcs 1.1.2 and run on
7298 + Linux 2.2.6 with glibc 2.1 (hardware unknown but probably a PC) dumps
7299 + core when given a "set line /dev/ttyS1" command. When rebuilt with
7300 + gcc, it works fine.
7302 + All versions of Linux seem to have the following deficiency: When a
7303 + modem call is hung up and CD drops, Kermit can no longer read the
7304 + modem signals; SHOW COMMUNICATIONS says "Modem signals not available".
7305 + The TIOCMGET ioctl() returns -1 with errno 5 ("I/O Error").
7307 + The Linux version of POSIX tcsendbreak(), which is used by C-Kermit to
7308 + send regular (275msec) and long (1.5sec) BREAK signals, appears to
7309 + ignore its argument (despite its description in the man page and info
7310 + topic), and always sends a regular 275msec BREAK. This has been
7311 + observed in Linux versions ranging from Debian 2.1 to Red Hat 7.1.
7312 + ________________________________________________________________________
7314 + 3.3.3. Terminal Emulation in Linux
7316 + [ [303]Top ] [ [304]Contents ] [ [305]Section Contents ] [ [306]Next ]
7319 + C-Kermit is not a terminal emulator. For a brief explanation of why
7320 + not, see [308]Section 3.0.5. For a fuller explanation, [309]ClICK
7323 + In Unix, terminal emulation is supplied by the Window in which you run
7324 + Kermit: the regular console screen, which provides Linux Console
7325 + "emulation" via the "console" termcap entry, or under X-Windows in an
7326 + xterm window, which gives VTxxx emulation. An xterm that includes
7327 + color ANSI and VT220 emulation is available with Xfree86:
7329 + [310]http://dickey.his.com/xterm/xterm.html
7331 + Before starting C-Kermit in an xterm window, you might need to tell
7332 + the xterm window's shell to "stty sane".
7334 + To set up your PC console keyboard to send VT220 key sequences when
7335 + using C-Kermit as your communications program in an X terminal window
7336 + (if it doesn't already), create a file somewhere (e.g. in /root/)
7337 + called .xmodmaprc, containing something like the following:
7339 + keycode 77 = KP_F1 ! Num Lock => DEC Gold (PF1)
7340 + keycode 112 = KP_F2 ! Keypad / => DEC PF1
7341 + keycode 63 = KP_F3 ! Keypad * => DEC PF3
7342 + keycode 82 = KP_F4 ! Keypad - => DEC PF4
7343 + keycode 111 = Help ! Print Screen => DEC Help
7344 + keycode 78 = F16 ! Scroll Lock => DEC Do
7345 + keycode 110 = F16 ! Pause => DEC Do
7346 + keycode 106 = Find ! Insert => DEC Find
7347 + keycode 97 = Insert ! Home => DEC Insert
7348 + keycode 99 = 0x1000ff00 ! Page Up => DEC Remove
7349 + keycode 107 = Select ! Delete => DEC Select
7350 + keycode 103 = Page_Up ! End => DEC Prev Screen
7351 + keycode 22 = Delete ! Backspace sends Delete (127)
7353 + Then put "xmodmap filename" in your .xinitrc file (in your login
7356 + xmodmap /root/.xmodmaprc
7358 + Of course you can move things around. Use the xev program to find out
7361 + Console-mode keys are mapped separately using loadkeys, and different
7362 + keycodes are used. Find out what they are with showkey.
7364 + For a much more complete VT220/320 key mapping for [311]Xfree86 xterm,
7366 + ________________________________________________________________________
7368 + 3.3.4. Dates and Times
7370 + [ [313]Top ] [ [314]Contents ] [ [315]Section Contents ] [ [316]Next ]
7373 + If C-Kermit's date-time (e.g. as shown by its DATE command) differs
7374 + from the system's date and time:
7376 + a. Make sure the libc to which Kermit is linked is set to GMT or is
7377 + not set to any time zone. Watch out for mixed libc5/libc6 systems;
7378 + each must be set indpendently.
7379 + b. If you have changed your TZ environment variable, make sure it is
7380 + exported. This is normally done in /etc/profile or /etc/TZ.
7381 + ________________________________________________________________________
7383 + 3.3.5. Startup Errors
7385 + [ [318]Top ] [ [319]Contents ] [ [320]Section Contents ] [ [321]Next ]
7388 + C-Kermit should work on all versions of Linux current through March
7389 + 2003, provided it was built on the same version you have, with the
7390 + same libraries and header files (just get the source code and "make
7391 + linux"). Binaries tend not to travel well from one Linux machine to
7392 + another, due to their many differences. There is no guarantee that a
7393 + particular C-Kermit binary will not stop working at a later date,
7394 + since Linux tends to change out from under its applications. If that
7395 + happens, rebuild C-Kermit from source. If something goes wrong with
7396 + the build process, look on the [323]C-Kermit website for a newer
7397 + version. If you have the latest version, then [324]report the problem
7400 + Inability to transfer files in Red Hat 7.2: the typical symptom would
7401 + be if you start Kermit and tell it to RECEIVE, it fails right away
7402 + with "?/dev/tty: No such device or address" or "?Bad file descriptor".
7403 + One report says this is because of csh, and if you change your shell
7404 + to bash or other shell, it doesn't happen. Another report cite bugs in
7405 + Red Hat 7.2 Telnetd "very seldom (if ever) providing a controlling
7406 + tty, and lots of other people piled on saying they have the same
7407 + problem.") A third theory is that this happens only when Linux has
7408 + been installed without "virtual terminal support".
7410 + A search of RedHat's errata pages shows a bug advisory (RHBA-2001-153)
7411 + issued 13 November 2001, but updated 6 December, about this same
7412 + symptom (but with tcsh and login.) Seems that login was not always
7413 + assigning a controlling TTY for the session, which would make most use
7414 + of "/dev/tty" somewhat less than useful.
7416 + [325]http://www.redhat.com/support/errata/RHBA-2001-153.html
7418 + Quoting: "Due to terminal handling problems in /bin/login, tcsh would
7419 + not find the controlling terminal correctly, and a shell in single
7420 + user mode would exhibit strange terminal input characteristics. This
7421 + update fixes both of these problems."
7423 + Since the Red Hat 5.1 release (circa August 1998), there have been
7424 + numerous reports of prebuilt Linux executables, and particularly the
7425 + Kermit RPM for Red Hat Linux, not working; either it won't start at
7426 + all, or it gives error messages about "terminal type unknown" and
7427 + refuses to initialize its curses support. The following is from the
7428 + [326]Kermit newsgroup:
7430 + From: rchandra@hal9000.buf.servtech.com
7431 + Newsgroups: comp.protocols.kermit.misc
7432 + Subject: Red Hat Linux/Intel 5.1 and ncurses: suggestions
7433 + Date: 22 Aug 1998 15:54:46 GMT
7434 + Organization: Verio New York
7435 + Keywords: RedHat RPM 5.1
7437 + Several factors can influence whether "linux" is recognized as a
7438 + terminal type on many Linux systems.
7440 + 1. Your program, or the libraries it linked with (if statically
7441 + linked), or the libraries it dynamically links with at runtime,
7442 + are looking for an entry in /etc/termcap that isn't there. (not
7443 + likely, but possible... I believe but am not certain that this is
7444 + a very old practice in very old [n]curses library implementations
7445 + to use a single file for all terminal descriptions.)
7446 + 2. Your program, or the libraries...are looking for a terminfo file
7447 + that just plain isn't there. (also not so likely, since many
7448 + people in other recent message threads said that other programs
7450 + 3. Your program, or the libraries...are looking for a terminfo file
7451 + that is stored at a pathname that isn't expected by your program,
7452 + the libraries--and so on. I forgot if I read this in the errata
7453 + Web page or where exactly I discovered this (Netscape install?
7454 + Acrobat install?), but it may just be that one libc (let's say for
7455 + sake of argument, libc5, but I don't know this to be true) expects
7456 + your terminfo to be in /usr/share/terminfo, and the other (let's
7457 + say libc6/glibc) expects /usr/lib/terminfo. I remember that the
7458 + specific instructions in this bugfix/workaround were to do the
7459 + following or equivalent:
7461 + ln -s ../share/terminfo ./terminfo
7463 + ln -s /usr/share/terminfo /usr/lib/terminfo
7465 + So what this says is that the terminfo database/directory structure
7466 + can be accessed by either path. When something goes to reference
7467 + /usr/lib/terminfo, the symlink redirects it to essentially
7468 + /usr/share/terminfo, which is where it really resides on your
7469 + system. I personally prefer wherever possible to use relative
7470 + symlinks, because they still hold, more often than break, across
7471 + mount points, particularly NFS mounts, where the directory
7472 + structure may be different on the different systems.
7474 + Evidently the terminfo file moved between Red Hat 5.0 and 5.1, but Red
7475 + Hat did not include a link to let applications built prior to 5.1 find
7476 + it. Users reported that installing the link fixes the problem.
7477 + ________________________________________________________________________
7479 + 3.3.6. The Fullscreen File Transfer Display
7481 + [ [327]Top ] [ [328]Contents ] [ [329]Section Contents ] [
7484 + Starting with ncurses versions dated 1998-12-12 (about a year before
7485 + ncurses 5.0), ncurses sets the terminal for buffered i/o, but
7486 + unfortunately is not able to restore it upon exit from curses (via
7487 + endwin()). Thus after a file transfer that uses the fullscreen file
7488 + transfer display, the terminal no longer echos nor responds
7489 + immediately to Tab, ?, and other special command characters. The same
7490 + thing happens on other platforms that use ncurses, e.g. FreeBSD.
7493 + * Use SET XFER DISPLAY BRIEF, CRT, SERIAL, or NONE instead of
7495 + * Rebuild with KFLAGS=-DNONOSETBUF (C-Kermit 8.0)
7497 + In Red Hat 7.1, when using C-Kermit in a Gnome terminal window, it was
7498 + noticed that when the fullscreen file transfer display exits (via
7499 + endwin()), the previous (pre-file-transfer-display) screen is
7500 + restored. Thus you can't look at the completed display to see what
7501 + happened. This is a evidently a new feature of xterm. I can only
7502 + speculate that initscreen() and endwin() must send some kind of
7503 + special escape sequences that command xterm to save and restore the
7504 + screen. To defeat this effect, tell Linux you have a vt100 or other
7505 + xterm-compatible terminal that is not actually an xterm, or else tell
7506 + Kermit to SET TRANSFER DISPLAY to something besides FULLSCREEN.
7507 + ________________________________________________________________________
7509 + 3.4. C-KERMIT AND NEXTSTEP
7511 + [ [331]Top ] [ [332]Contents ] [ [333]Section Contents ] [ [334]Next ]
7514 + Run C-Kermit in a Terminal, Stuart, or xterm window, or when logged in
7515 + remotely through a serial port or TELNET connection. C-Kermit does not
7516 + work correctly when invoked directly from the NeXTSTEP File Viewer or
7517 + Dock. This is because the terminal-oriented gtty, stty, & ioctl calls
7518 + don't work on the little window that NeXTSTEP pops up for non-NeXTSTEP
7519 + applications like Kermit. CBREAK and No-ECHO settings do not take
7520 + effect in the command parser -- commands are parsed strictly line at a
7521 + time. "set line /dev/cua" works. During CONNECT mode, the console
7522 + stays in cooked mode, so characters are not transmitted until carriage
7523 + return or linefeed is typed, and you can't escape back. If you want to
7524 + run Kermit directly from the File Viewer, then launch it from a shell
7525 + script that puts it in the desired kind of window, something like this
7528 + Terminal -Lines 24 -Columns 80 -WinLocX 100 -WinLocY 100 $FONT $FONTSIZE \
7529 + -SourceDotLogin -Shell /usr/local/bin/kermit &
7531 + C-Kermit does not work correctly on a NeXT with NeXTSTEP 3.0 to which
7532 + you have established an rlogin connection, due to a bug in NeXTSTEP
7533 + 3.0, which has been reported to NeXT.
7535 + The SET CARRIER command has no effect on the NeXT -- this is a
7536 + limitation of the NeXTSTEP serial-port device drivers.
7538 + Hardware flow control on the NeXT is selected not by "set flow
7539 + rts/cts" in Kermit (since NeXTSTEP offers no API for this), but
7540 + rather, by using a specially-named driver for the serial device:
7541 + /dev/cufa instead /dev/cua; /dev/cufb instead of /dev/cub. This is
7542 + available only on 68040-based NeXT models (the situation for Intel
7543 + NeXTSTEP implementations is unknown).
7545 + NeXT-built 68030 and 68040 models have different kinds of serial
7546 + interfaces; the 68030 has a Macintosh-like RS-422 interface, which
7547 + lacks RTS and CTS signals; the 68040 has an RS-423 (RS-232 compatible)
7548 + interface, which supports the commonly-used modem signals. WARNING:
7549 + the connectors look exactly the same, but the pins are used in
7550 + completely DIFFERENT ways -- different cables are required for the two
7551 + kinds of interfaces.
7553 + IF YOU GET LOTS OF RETRANSMISSIONS during file transfer, even when
7554 + using a /dev/cuf* device and the modem is correctly configured for
7555 + RTS/CTS flow control, YOU PROBABLY HAVE THE WRONG KIND OF CABLE.
7557 + On the NeXT, Kermit reportedly (by TimeMon) causes the kernel to use a
7558 + lot of CPU time when using a "set line" connection. That's because
7559 + there is no DMA channel for the NeXT serial port, so the port must
7560 + interrupt the kernel for each character in or out.
7562 + One user reported trouble running C-Kermit on a NeXT from within
7563 + NeXT's Subprocess class under NeXTstep 3.0, and/or when rlogin'd from
7564 + one NeXT to another: Error opening /dev/tty:, congm: No such device or
7565 + address. Diagnosis: Bug in NeXTSTEP 3.0, cure unknown.
7566 + ________________________________________________________________________
7568 + 3.5. C-KERMIT AND QNX
7570 + [ [336]Top ] [ [337]Contents ] [ [338]Section Contents ] [ [339]Next ]
7573 + See also: The [341]comp.os.qnx newsgroup.
7575 + Support for QNX 4.x was added in C-Kermit 5A(190). This is a
7576 + full-function implementation, thoroughly tested on QNX 4.21 and later,
7577 + and verified to work in both 16-bit and 32-bit versions. The 16-bit
7578 + version was dropped in C-Kermit 7.0 since it can no longer be built
7579 + successfully (after stripping most most features, I succeeded in
7580 + getting it to compile and link without complaint, but the executable
7581 + just beeps when you run it); for 16-bit QNX 4.2x, use C-Kermit 6.0 or
7582 + earlier, or else [342]G-Kermit.
7584 + The 32-bit version (and the 16-bit version prior to C-Kermit 7.0)
7585 + supports most of C-Kermit's advanced features including TCP/IP, high
7586 + serial speeds, hardware flow-control, modem-signal awareness, curses
7589 + BUG: In C-Kermit 6.0 on QNX 4.22 and earlier, the fullscreen file
7590 + transfer display worked fine the first time, but was fractured on
7591 + subsequent file transfers. Cause and cure unknown. In C-Kermit 7.0 and
7592 + QNX 4.25, this no longer occurs. It is not known if it would occur in
7593 + C-Kermit 7.0 or later on earlier QNX versions.
7595 + Dialout devices are normally /dev/ser1, /dev/ser2, ..., and can be
7596 + opened explicitly with SET LINE. Reportedly, "/dev/ser" (no unit
7597 + number) opens the first available /dev/sern device.
7599 + Like all other Unix C-Kermit implementations, QNX C-Kermit does not
7600 + provide any kind of terminal emulation. Terminal specific functions
7601 + are provided by your terminal, terminal window (e.g. QNX Terminal or
7602 + xterm), or emulator.
7604 + QNX C-Kermit, as distributed, does not include support for UUCP
7605 + line-locking; the QNX makefile entries (qnx32 and qnx16) include the
7606 + -DNOUUCP switch. This is because QNX, as distributed, does not include
7607 + UUCP, and its own communications software (e.g. qterm) does not use
7608 + UUCP line locking. If you have a UUCP product installed on your QNX
7609 + system, remove the -DNOUUCP switch from the makefile entry and
7610 + rebuild. Then check to see that Kermit's UUCP lockfile conventions are
7611 + the same as those of your UUCP package; if not, read the [343]UUCP
7612 + lockfile section of the [344]Installation Instructions and make the
7613 + necessary changes to the makefile entry (e.g. add -DHDBUUCP).
7615 + QNX does, however, allow a program to get the device open count. This
7616 + can not be a reliable form of locking unless all applications do it,
7617 + so by default, Kermit uses this information only for printing a
7618 + warning message such as:
7620 + C-Kermit>set line /dev/ser1
7621 + WARNING - "/dev/ser1" looks busy...
7623 + However, if you want to use it as a lock, you can do so with:
7625 + SET QNX-PORT-LOCK { ON, OFF }
7627 + This is OFF by default; if you set in ON, C-Kermit will fail to open
7628 + any dialout device when its open count indicates that another process
7629 + has it open. SHOW COMM (in QNX only) displays the setting, and if you
7630 + have a port open, it also shows the open count.
7632 + As of C-Kermit 8.0, C-Kermit's "open-count" form of line locking works
7633 + only in QNX4, not in QNX6 (this might change in a future C-Kermit
7635 + ________________________________________________________________________
7637 + 3.6. C-KERMIT AND SCO
7639 + [ [345]Top ] [ [346]Contents ] [ [347]Section Contents ] [ [348]Next ]
7644 +3.6.1. [350]SCO XENIX
7645 +3.6.2. [351]SCO UNIX and OSR5
7646 +3.6.3. [352]Unixware
7647 +3.6.4. [353]Open UNIX 8
7651 + * The comp.unix.sco.* newsgroups.
7652 + * [354]Section 3.10 below for Unixware.
7653 + * The following FAQs:
7655 + The comp.sco.misc FAQ:
7656 + [355]http://aplawrence.com/SCOFAQ/
7658 + Caldera (SCO) comp.unix.sco.programmer FAQ:
7659 + [356]http://www.zenez.com/cgi-bin/scoprogfaq/faq.pl
7661 + The UnixWare 7/OpenUNIX 8 FAQ:
7662 + [357]http://www.zenez.com/cgi-bin/scouw7faq/faq.pl
7663 + [358]http://zenez.pcunix.com/cgi-bin/scouw7faq/faq.pl
7665 + High Speed Modems for SCO Unix:
7666 + [359]http://pcunix.com/Unixart/modems.html
7669 + [360]http://www.freebird.org/faq/
7671 + The UnixWare 1.x and 2.0 Programmer FAQ
7672 + [361]http://www.freebird.org/faq/developer.html
7674 + Caldera Support Knowledge Base
7675 + [362]http://support.caldera.com/caldera
7677 + [363]http://stage.caldera.com/ta/
7678 + Caldera (SCO) Technical Article Search Center
7680 + [364]http://aplawrence.com/newtosco.html
7681 + New to SCO (Tony Lawrence)
7683 + The same comments regarding terminal emulation and key mapping apply
7684 + to SCO operating systems as to all other Unixes. C-Kermit is not a
7685 + terminal emulator, and you can't use it to map F-keys, Arrow keys,
7686 + etc. The way to do this is with xmodmap (xterm) or loadkeys (console).
7687 + For a brief explanation, see [365]Section 3.0.5. For a fuller
7688 + explanation, [366]ClICK HERE.
7690 + Also see general comments on PC-based Unixes in [367]Section 3.0.
7694 + [ [368]Top ] [ [369]Contents ] [ [370]Section Contents ] [ [371]Next ]
7696 + Old Xenix versions... Did you know: Xenix 3.0 is *older* than Xenix
7699 + In Xenix 2.3.4 and probably other Xenix versions, momentarily dropping
7700 + DTR to hang up a modem does not work. DTR goes down but does not come
7701 + up again. Workaround: Use SET MODEM HANGUP-METHOD MODEM-COMMAND.
7702 + Anybody who would like to fix this is welcome to take a look at
7703 + tthang() in [372]ckutio.c. Also: modem signals can not be read in
7704 + Xenix, and the maximum serial speed is 38400.
7706 + There is all sorts of confusion among SCO versions, particularly when
7707 + third- party communications boards and drivers are installed,
7708 + regarding lockfile naming conventions, as well as basic functionality.
7709 + As far as lockfiles go, all bets are off if you are using a
7710 + third-party multiport board. At least you have the source code.
7711 + Hopefully you also have a C compiler :-)
7713 + Xenix 2.3.0 and later claim to support RTSFLOW and CTSFLOW, but this
7714 + is not modern bidirectional hardware flow control; rather it
7715 + implements the original RS-232 meanings of these signals for
7716 + unidirectional half-duplex line access: If both RTSFLOW and CTSFLOW
7717 + bits are set, Xenix asserts RTS when it wants to send data and waits
7718 + for CTS assertion before it actually starts sending data (also,
7719 + reportedly, even this is broken in Xenix 2.3.0 and 2.3.1).
7720 + ________________________________________________________________________
7722 + 3.6.2. SCO UNIX AND OSR5
7724 + [ [373]Top ] [ [374]Contents ] [ [375]Section Contents ] [ [376]Next ]
7727 + SCO systems tend to use different names (i.e. drivers) for the same
7728 + device. Typically /dev/tty1a refers to a terminal device that has no
7729 + modem control; open, read, write, and close operations do not depend
7730 + on carrier. On the other hand, /dev/tty1A (same name, but with final
7731 + letter upper case), is the same device with modem control, in which
7732 + carrier is required (the SET LINE command does not complete until
7733 + carrier appears, read/write operations fail if there is no carrier,
7736 + SCO OpenServer 5.0.5 and earlier do not support the reading of modem
7737 + signals. Thus "show comm" does not list modem signals, and C-Kermit
7738 + does not automatically pop back to its prompt when the modem hangs up
7739 + the connection (drops CD). The ioctl() call for this is simply not
7740 + implmented, at least not in the standard drivers. OSR5.0.6 attempts to
7741 + deal with modem signals but fails; however OSR5.0.6a appears to
7742 + function properly.
7744 + Dialing is likely not to work well in SCO OpenServer 5.0.x because
7745 + many of the serial-port APIs simply do not operate when using the
7746 + standard drivers. For example, if DTR is dropped by the recommended
7747 + method (setting speed to 0 for half a seconds, then restoring the
7748 + speed), DTR and RTS go down but never come back up. When in doubt SET
7749 + MODEM HANGUP-METHOD MODEM-COMMAND or SET DIAL HANGUP OFF.
7751 + On the other hand, certain functions that might not (do not) work
7752 + right or at all when using SCO drivers (e.g. high serial speeds,
7753 + hardware flow control, and/or reading of modem signals) might work
7754 + right when using third-party drivers. (Example: hardware flow control
7755 + works, reportedly, only on uppercase device like tty1A -- not tty1a --
7756 + and only when CLOCAL is clear when using the SCO sio driver, but there
7757 + are no such restrictions in, e.g., [378]Digiboard drivers).
7759 + One user reports that he can't transfer large files with C-Kermit
7760 + under SCO OSR5.0.0 and 5.0.4 -- after the first 5K, everything falls
7761 + apart. Same thing without Kermit -- e.g. with ftp over a PPP
7762 + connection. Later, he said that replacing SCO's SIO driver with FAS,
7763 + an alternative communications driver, made the problem go away:
7765 + [379]ftp://ftp.fu-berlin.de/pub/unix/driver/fas
7767 + With regard to bidirectional serial ports on OpenServer 5.0.4, the
7768 + following advice appeared on an SCO-related newsgroup:
7770 + No amount of configuration information is going to help you on
7771 + 5.0.4 unless it includes the kludge for the primary problem. With
7772 + almost every modem, the 5.0.4 getty will barf messages and may or
7773 + may not connect. There are 2 solutions and only one works on 5.0.4.
7774 + Get the atdialer binary from a 5.0.0 system and substitute it for
7775 + the native 5.0.4 atdialer. The other solution is to upgrade to
7776 + 5.0.5. And, most of all, on any OpenServer products, do NOT run the
7777 + badly broken Modem Manager. Configure the modems in the time
7778 + honored way that dates back to Xenix.
7780 + Use SCO-provided utilities for switching the directionality of a modem
7781 + line, such as "enable" and "disable" commands. For example, to dial
7782 + out on tty1a, which is normally set up for logins:
7785 + kermit -l /dev/tty1a
7788 + If a tty device is listed as an ACU in /usr/lib/uucp/Devices and is
7789 + enabled, getty resets the ownership and permissions to uucp.uucp and
7790 + 640 every time the device is released. If you want to use the device
7791 + only for dialout, and you want to specify other owners or permissions,
7792 + you should disable it in /usr/lib/uucp/Devices; this will prevent
7793 + getty from doing things to it. You should also changes the device's
7794 + file modes in /etc/conf/node.d/sio by changing fields 5-7 for the
7795 + desired device(s); this determines how the devices are set if you
7796 + relink the kernel.
7798 + One SCO user of C-Kermit 5A(190) reported that only one copy of Kermit
7799 + can run at a time when a Stallion Technologies multiport boards are
7800 + installed. Cause, cure, and present status unknown (see [380]Section
7801 + 14 for more info regarding Stallion).
7803 + Prior to SCO OpenServer 5.0.4, the highest serial port speed supported
7804 + by SCO was 38400. However, in some SCO versions (e.g. OSR5) it is
7805 + possible to map rarely-used lower speeds (like 600 and 1800) to higher
7806 + ones like 57600 and 115200. To find out how, go to
7807 + [381]http://www.sco.com/ and search for "115200". In OSR5.0.4, serial
7808 + speeds up to 921600 are supported through the POSIX interface;
7809 + C-Kermit 6.1.193 or later, when built for OSR5.0.4 using /bin/cc (NOT
7810 + the UDK, which hides the high-speed definitions from CPP), supports
7811 + these speeds, but you might be able to run this binary on earlier
7812 + releases to get the high serial speeds, depending on various factors,
7813 + described by Bela Lubkin of SCO:
7815 + Serial speeds under SCO Unix / Open Desktop / OpenServer
7816 + ========================================================
7817 + Third party drivers (intelligent serial boards) may provide any speeds
7818 + they desire; most support up to 115.2Kbps.
7820 + SCO's "sio" driver, which is used to drive standard serial ports with
7821 + 8250/16450/16550 and similar UARTs, was limited to 38400bps in older
7822 + releases. Support for rates through 115.2Kbps was added in the
7823 + following releases:
7825 + SCO OpenServer Release 5.0.0 (requires supplement "rs40b")
7826 + SCO OpenServer Release 5.0.2 (requires supplement "rs40a" or "rs40b")
7827 + SCO OpenServer Release 5.0.4 or later
7828 + SCO Internet FastStart Release 1.0.0 or later
7830 + SCO supplements are at [382]ftp://ftp.sco.com/; the "rs40" series are
7831 + under directory /Supplements/internet
7833 + Kermit includes the high serial speeds in all OSR5 builds, but that
7834 + does not necessarily mean they work. For example, on our in-house
7835 + 5.0.5 system, SET SPEED 57600 or higher seems to succeed (no error
7836 + occurs) but when we read the speed back the driver says it is 50.
7837 + Similarly, 76800 becomes 75, and 115200 becomes 110. Testing shows the
7838 + resulting speed is indeed the low one we read back, not the high one
7839 + we asked for. Moral: Use speeds higher than 38400 with caution on SCO
7842 + Reportedly, if you have a script that makes a TCP/IP SET HOST (e.g.
7843 + Telnet) connection to SCO 3.2v4.2 with TCP/IP 1.2.1, and then does the
7849 + this causes a pseudoterminal (pty) to be consumed on the SCO system;
7850 + if you do it enough times, it will run out of ptys. An "exit" command
7851 + is being sent to the SCO shell, and a HANGUP command is executed
7852 + locally, so the chances are good that both sides are trying to close
7853 + the connection at once, perhaps inducing a race condition in which the
7854 + remote pty is not released. It was speculated that this would be fixed
7855 + by applying SLS net382e, but it did not. Meanwhile, the workaround is
7856 + to insert a "pause" between the SCRIPT and HANGUP commands. (The
7857 + situation with later SCO releases is not known.)
7859 + SCO UNIX and OpenServer allow their console and/or terminal drivers to
7860 + be configured to translate character sets for you. DON'T DO THIS WHEN
7861 + USING KERMIT! First of all, you don't need it -- Kermit itself already
7862 + does this for you. And second, it will (a) probably ruin the
7863 + formatting of your screens (depending on which emulation you are
7864 + using); and (b) interfere with all sorts of other things -- legibility
7865 + of non-ASCII text on the terminal screen, file transfer, etc. Use:
7869 + to turn off this feature.
7871 + Note that there is a multitude of SCO entries in the makefile, many of
7872 + them exhibiting an unusually large number of compiler options. Some
7873 + people actually understand all of this. Reportedly, things are
7874 + settling down with SCO OpenServer 5.x and Unixware 7 (and Open UNIX 8
7875 + and who knows what the next one will be -- Linux probably) -- the SCO
7876 + UDK compiler is said to generate binaries that will run on either
7877 + platform, by default, automatically. When using gcc or egcs, on the
7878 + other hand, differences persist, plus issues regarding the type of
7879 + binary that is generated (COFF, ELF, etc), and where and how it can
7880 + run. All of this could stand further clarification by SCO experts.
7881 + ________________________________________________________________________
7885 + [ [383]Top ] [ [384]Contents ] [ [385]Section Contents ] [ [386]Next ]
7888 + Unixware changed hands several times before landing at SCO, and so has
7889 + its [388]own section in this document. (Briefly: AT&T UNIX Systems
7890 + Laboratories sold the rights to the UNIX name and to System V R4 (or
7891 + R5?) to Novell; later Novell spun its UNIX division off into a new
7892 + company called Univel, which eventually was bought by SCO, which later
7893 + was bought by Caldera, which later sort of semi-spun-off SCO...)
7894 + ________________________________________________________________________
7896 + 3.6.4. Open UNIX 8
7898 + [ [389]Top ] [ [390]Contents ] [ [391]Section Contents ] [
7901 + SCO was bought by Caldera in 2000 or 2001 and evolved Unixware 7.1
7902 + into Caldera Open UNIX 8.00. It's just like Unixware 7.1 as far as
7903 + Kermit is concerned (the Unixware 7.1 makefile target works for Open
7904 + UNIX 8.00, and in fact a Unixware 7.1 Kermit binary built on Unixware
7905 + 7.1 runs under OU8; a separate OU8 makefile target exists simply to
7906 + generate an appropriate program startup herald). Open Unix is now
7907 + defunct; subsequent releases are called UnixWare again (e.g. UnixWare
7909 + ________________________________________________________________________
7911 + 3.7. C-KERMIT AND SOLARIS
7913 + [ [393]Top ] [ [394]Contents ] [ [395]Section Contents ] [ [396]Next ]
7918 +3.7.1. [398]Serial Port Configuration
7919 +3.7.2. [399]Serial Port Problems
7920 +3.7.3. [400]SunLink X.25
7921 +3.7.4. [401]Sun Workstation Keyboard Mapping
7922 +3.7.5. [402]Solaris 2.4 and Earlier
7926 + * The [403]comp.unix.solaris newsgroup
7927 + * [404]http://access1.sun.com/
7928 + * [405]http://docs.sun.com/
7929 + * [406]http://www.sunhelp.com/
7930 + * [407]http://www.wins.uva.nl/pub/solaris/solaris2/
7931 + * [408]http://www.wins.uva.nl/cgi-bin/sfaq.cgi
7932 + * [409]ftp://ftp.wins.uva.nl/pub/solaris
7933 + * [410]http://www.science.uva.nl/pub/solaris/solaris2.html
7935 + And about serial communications in particular, see "Celeste's Tutorial
7936 + on Solaris 2.x Modems and Terminals":
7938 + [411]http://www.stokely.com/
7942 + [412]http://www.stokely.com/unix.sysadm.resources/faqs.sun.html
7944 + For PC-based Solaris, also see general comments on PC-based Unixes in
7945 + [413]Section 3.0. Don't expect Solaris or any other kind of Unix to
7946 + work right on a PC until you resolve all interrupt conflicts. Don't
7947 + expect to be able to use COM3 or COM4 (or even COM2) until you have
7948 + configured their addresses and interrupts.
7949 + ________________________________________________________________________
7951 + 3.7.1. Serial Port Configuration
7953 + [ [414]Top ] [ [415]Contents ] [ [416]Section Contents ] [
7954 + [417]Section Contents ] [ [418]Next ]
7956 + Your serial port can't be used -- or at least won't work right --
7957 + until it is enabled in Solaris. For example, you get a message like
7958 + "SERIAL: Operation would block" when attempting to dial. This probably
7959 + indicates that the serial port has not been enabled for use with
7960 + modems. You'll need to follow the instructions in your system setup or
7961 + management manual, such as (e.g.) the Desktop SPARC Sun System &
7962 + Network Manager's Guide, which should contain a section "Setting up
7963 + Modem Software"; read it and follow the instructions. These might (or
7964 + might not) include running a program called "eeprom", editing some
7965 + system configuration file (such as, for example:
7967 + /platform/i86pc/kernel/drv/asy.conf
7969 + and then doing a configuration reboot, or running some other programs
7970 + like drvconfig and devlinks. "man eeprom" for details.
7972 + Also, on certain Sun models like IPC, the serial port hardware might
7973 + need to have a jumper changed to make it an RS-232 port rather than
7976 + eeprom applies only to real serial ports, not to "Spiff" devices
7977 + (serial port expander), in which case setup with Solaris' admintool is
7980 + Another command you might need to use is pmadm, e.g.:
7982 + pmadm -d -p zsmon -s tty3
7983 + pmadm -e -p zsmon -s tty3
7985 + You can use the following command to check if a process has the device
7988 + fuser -f /dev/term/3
7990 + In some cases, however (according to Sun support, May 2001) "It is
7991 + still possible that a zombie process has hold of the port EVEN IF
7992 + there is no lock file and the fuser command comes up empty. In that
7993 + case, the only way to resolve the problem is by rebooting."
7995 + If you can't establish communication through a serial port to a device
7996 + that is not asserting CD (Carrier Detect), try setting the environment
7997 + variable "ttya-ignore-cd" to "true" (replace "ttya" with the port
7999 + ________________________________________________________________________
8001 + 3.7.2. Serial Port Problems
8003 + [ [419]Top ] [ [420]Contents ] [ [421]Section Contents ] [ [422]Next ]
8006 + Current advice from Sun is to always the /dev/cua/x devices for
8007 + dialing out, rather than the /dev/term/x. Nevertheless, if you have
8008 + trouble dialing out with one, try the other.
8010 + Reportedly, if you start C-Kermit and "set line" to a port that has a
8011 + modem connected to it that is not turned on, and then "set flow
8012 + rts/cts", there might be some (unspecified) difficulties closing the
8013 + device because the CTS signal is not coming in from the modem.
8014 + ________________________________________________________________________
8016 + 3.7.3. SunLink X.25
8018 + [ [424]Top ] [ [425]Contents ] [ [426]Section Contents ] [ [427]Next ]
8021 + The built-in SunLink X.25 support for Solaris 2.3/2.4./25 and SunLink
8022 + 8.01 or 9.00 works OK provided the X.25 system has been installed and
8023 + initialized properly. Packet sizes might need to be reduced to 256,
8024 + maybe even less, depending on the configuration of the X.25
8025 + installation. On one connection where C-Kermit 6.0 was tested, very
8026 + large packets and window sizes could be used in one direction, but
8027 + only very small ones would work in the other.
8029 + In any case, according to Sun, C-Kermit's X.25 support is superfluous
8030 + with SunLink 8.x / Solaris 2.3. Quoting an anonymous Sun engineer:
8032 + ... there is now no need to include any X.25 code within kermit. As
8033 + of X.25 8.0.1 we support the use of kermit, uucp and similar
8034 + protocols over devices of type /dev/xty. This facility was there in
8035 + 8.0, and should also work on the 8.0 release if patch 101524 is
8036 + applied, but I'm not 100% sure it will work in all cases, which is
8037 + why we only claim support from 8.0.1 onwards.
8039 + When configuring X.25, on the "Advanced Configuration->Parameters"
8040 + screen of the x25tool you can select a number of XTY devices. If
8041 + you set this to be > 1, press Apply, and reboot, you will get a
8042 + number of /dev/xty entries created.
8044 + Ignore /dev/xty0, it is a special case. All the others can be used
8045 + exactly as if they were a serial line (e.g. /dev/tty) connected to
8046 + a modem, except that instead of using Hayes-style commands, you use
8049 + From kermit you can do a 'set line' command to, say, /dev/xty1,
8050 + then set your dialing command to be "CALL 12345678", etc. All the
8051 + usual PAD commands will work (SET, PAR, etc).
8053 + I know of one customer in Australia who is successfully using this,
8054 + with kermit scripts, to manage some X.25-connected switches. He
8055 + used standard kermit, compiled for Solaris 2, with X.25 8.0 xty
8057 + ________________________________________________________________________
8059 + 3.7.4. Sun Workstation Keyboard Mapping
8061 + [ [429]Top ] [ [430]Contents ] [ [431]Section Contents ] [ [432]Next ]
8064 + Hints for using a Sun workstation keyboard for VT emulation when
8065 + accessing VMS, from the [434]comp.os.vms newsgroup:
8067 + From: Jerry Leichter <leichter@smarts.com>
8068 + Newsgroups: comp.os.vms
8069 + Subject: Re: VT100 keyboard mapping to Sun X server
8070 + Date: Mon, 19 Aug 1996 12:44:21 -0400
8072 + > I am stuck right now using a Sun keyboard (type 5) on systems
8074 + > and Solaris. I would like to use EVE on an OpenVMS box with
8076 + > the Sun. Does anyone know of a keyboard mapping (or some other
8078 + > which will allow the Sun keyboard to approximate a VT100/VT220?
8080 + You can't get it exactly - because the keypad has one fewer key -
8081 + but you can come pretty close. Here's a set of keydefs I use:
8096 + keycode 57=KP_Decimal
8099 + keycode 30=KP_Separator
8101 + keycode 78=KP_Subtract
8106 + keycode 97=KP_Enter
8108 + Put this in a file - I use "keydefs" in my home directory and feed
8111 + xmodmap - <$HOME/keydefs
8113 + This takes care of the arrow keys and the "calculator" key cluster.
8114 + The "+" key will play the role of the DEC "," key. The Sun "-" key
8115 + will be like the DEC "-" key, though it's in a physically different
8116 + position - where the DEC PF4 key is. The PF4 key is ... damn, I'm
8117 + not sure where "key 105" is. I *think* it may be on the leftmost
8118 + key of the group of four just above the "calculator" key cluster.
8120 + I also execute the following (this is all in my xinitrc file):
8122 + xmodmap -e 'keysym KP_Decimal = KP_Decimal'
8123 + xmodmap -e 'keysym BackSpace = Delete BackSpace' \
8124 + -e 'keysym Delete = BackSpace Delete'
8125 + xmodmap -e 'keysym KP_Decimal = Delete Delete KP_Decimal'
8126 + xmodmap -e 'add mod1 = Meta_R'
8127 + xmodmap -e 'add mod1 = Meta_L'
8129 + Beware of one thing about xmodmap: Keymap changes are applied to
8130 + the *whole workstation*, not just to individual windows. There is,
8131 + in fact, no way I know of to apply them to individual windows.
8132 + These definitions *may* confuse some Unix programs (and/or some
8135 + If you're using Motif, you may also need to apply bindings at the
8136 + Motif level. If just using xmodmap doesn't work, I can try and dig
8137 + that stuff up for you.
8138 + ________________________________________________________________________
8140 + 3.7.5. Solaris PPP Connections
8142 + [ [435]Top ] [ [436]Contents ] [ [437]Section Contents ] [ [438]Next ]
8145 + The following is a report from a user of C-Kermit 8.0 on Solaris 8 and
8146 + 9, who had complained that while Kermit file transfers worked
8147 + perfectly on direct (non-PPP) dialout connections, they failed
8148 + miserably on PPP connections. We suggested that the PPP dialer
8149 + probably was not setting the port and/or modem up in the same way that
8152 + I want to get back on this and tell you what the resolution was.
8153 + You pointed me in the direction of flow control, which turned out
8156 + Some discussion on the comp.unix.solaris newsgroup led to some
8157 + comments from Greg Andrews about the need to use the uucp driver to
8158 + talk to the modem (/dev/cua/a). I had to remind Greg that no matter
8159 + what the manpages for the zs and se drivers say, the ppp that Sun
8160 + released with Solaris 8 7/01, and has in Solaris 9, is a setuid
8161 + root program, and simply trying to make a pppd call from user space
8162 + specifying /dev/cua/a would fail because of permissions. Greg
8163 + finally put the question to the ppp people, who came back with
8164 + information that is not laid out anywhere in the docs available for
8165 + Solaris users. Namely, put /dev/cua/a in one of the priviledged
8166 + options files in the /etc/ppp directory. That, plus resetting the
8167 + OBP ttya-ignore-cd flag (this is Sun hardware) to false, seems to
8168 + have solved the problems.
8170 + While I note that I had installed Kermit suid to uucp to use
8171 + /dev/cua/a on this particular box, it seems to run fine through
8172 + /dev/term/a. Not so with pppd.
8174 + With this change in place, I seem to be able to upload and download
8175 + through telnet run on Kermit with the maximum length packets. I
8176 + note that the window allocation display does show STREAMING, using
8177 + telnet. Running ssh on Kermit, I see the standard 1 of 30 windows
8178 + display, and note that there appears to be a buffer length limit
8179 + between 1000 and 2000 bytes. Run with 1000, and it's tick-tock,
8180 + solid as a rock. With 2000 I see timeout errors and RTS/CTS action
8183 + Kermit's packet-length and other controls let you make adjustments
8184 + like this to get around whatever obstacles might be thrown up -- in
8185 + this case (running Kermit over ssh), the underling Solaris PTY driver.
8186 + ________________________________________________________________________
8188 + 3.7.6. Solaris 2.4 and Earlier
8190 + [ [440]Top ] [ [441]Contents ] [ [442]Section Contents ] [
8193 + C-Kermit can't be compiled successfully under Solaris 2.3 using
8194 + SUNWspro cc 2.0.1 unless at least some of the following patches are
8195 + applied to cc (it is not known which one(s), if any, fix the problem):
8197 + * 100935-01 SparcCompiler C 2.0.1: bad code generated when addresses
8198 + of two double arguments are involved
8199 + * 100961-05 SPARCcompilers C 2.0.1: conditional expression with
8200 + function returning structure gives wrong value
8201 + * 100974-01 SparcWorks 2.0.1: dbx jumbo patch
8202 + * 101424-01 SPARCworks 2.0.1 maketool SEGV's instantly on Solaris
8205 + With unpatched cc 2.0.1, the symptom is that certain modules generate
8206 + truncated object files, resulting in many unresolved references at
8209 + The rest of the problems in this section have to do with
8210 + bidirectional terminal ports and the Solaris Port Monitor. A bug in
8211 + C-Kermit 5A ticked a bug in Solaris. The C-Kermit bug was fixed in
8212 + version 6.0, and the Solaris bug was fixed in 2.4 (I think, or
8215 + Reportedly, "C-Kermit ... causes a SPARCstation running Solaris 2.3 to
8216 + panic after the modem connects. I have tried compiling C-Kermit with
8217 + Sun's unbundled C compiler, with GCC Versions 2.4.5 and 2.5.3, with
8218 + make targets 'sunos51', 'sunos51tcp', 'sunos51gcc', and even 'sys5r4',
8219 + and each time it compiles and starts up cleanly, but without fail, as
8220 + soon as I dial the number and get a 'CONNECT' message from the modem,
8224 + kermit: Data fault
8225 + kernel read fault at addr=0x45c, pme=0x0
8226 + Sync Error Reg 80 <INVALID>
8228 + panic: Data Fault.
8232 + The same modem works fine for UUCP/tip calling." Also (reportedly),
8233 + this only happens if the dialout port is configured as in/out via
8234 + admintool. If it is configured as out-only, no problem. This is the
8235 + same dialing code that works on hundreds of other System-V based Unix
8236 + OS's. Since it should be impossible for a user program to crash the
8237 + operating system, this problem must be chalked up to a Solaris bug.
8238 + Even if you SET CARRIER OFF, CONNECT, and dial manually by typing
8239 + ATDTnnnnnnn, the system panics as soon as the modem issues its CONNECT
8240 + message. (Clearly, when you are dialing manually, C-Kermit does not
8241 + know a thing about the CONNECT message, and so the panic is almost
8242 + certainly caused by the transition of the Carrier Detect (CD) line
8243 + from off to on.) This problem was reported by many users, all of whom
8244 + say that C-Kermit worked fine on Solaris 2.1 and 2.2. If the
8245 + speculation about CD is true, then a possible workaround might be to
8246 + configure the modem to leave CD on (or off) all the time. Perhaps by
8247 + the time you read this, a patch will have been issued for Solaris 2.3.
8249 + The following is from Karl S. Marsh, Systems & Networks Administrator,
8250 + AMBIX Systems Corp, Rochester, NY:
8252 + Environment: Solaris 2.3 Patch 101318-45 C-Kermit 5A(189) (and
8253 + presumably this applies to 188 and 190 also). eeprom setting:
8255 + ttya-rts-dtr-off=false
8256 + ttya-ignore-cd=false
8257 + ttya-mode=19200,8,n,8,-
8259 + To use C-Kermit on a bidirectional port in this environment, do not
8260 + use admintool to configure the port. Use admintool to delete any
8261 + services running on the port and then quit admintool and issue the
8262 + following command:
8264 + pmadm -a -p zsmon -s ttyb -i root -fu -v 1 -m "`ttyadm -b -d /dev/term/b \
8265 + -l conttyH -m ldterm,ttcompat -s /usr/bin/login -S n`"
8267 + [NOTE: This was copied from a blurry fax, so please check it
8271 + -p = pmtag (zsmon)
8272 + -s = service tag (ttyb)
8273 + -i = id to be associated with service tag (root)
8274 + -fu = create utmp entry
8275 + -v = version of ttyadm
8276 + -m = port monitor-specific portion of the port monitor administrative file
8277 + entry for the service
8278 + -b = set up port for bidirectional use
8279 + -d = full path name of device
8280 + -l = which ttylabel in the /etc/ttydefs file to use
8281 + -m = a list of pushable STREAMS modules
8282 + -s = pathname of service to be invoked when connection request received
8283 + -S = software carrier detect on or off (n = off)
8285 + "This is exactly how I was able to get Kermit to work on a
8286 + bi-directional port without crashing the system."
8288 + On the Solaris problem, also see SunSolve Bug ID 1150457 ("Using
8289 + C-Kermit, get Bad Trap on receiving prompt from remote system").
8290 + Another user reported "So, I have communicated with the Sun tech
8291 + support person that submitted this bug report [1150457]. Apparently,
8292 + this bug was fixed under one of the jumbo kernel patches. It would
8293 + seem that the fix did not live on into 101318-45, as this is EXACTLY
8294 + the error that I see when I attempt to use kermit on my system."
8296 + Later (Aug 94)... C-Kermit dialout successfully tested on a Sun4m with
8297 + a heavily patched Solaris 2.3. The patches most likely to have been
8300 + * 101318-50: SunOS 5.3: Jumbo patch for kernel (includes libc,
8302 + * 101720-01: SunOS 5.3: ttymon - prompt not always visible on a
8304 + * 101815-01: SunOS 5.3: Data fault in put() NULL queue passed from
8306 + * 101328-01: SunOS 5.3: Automation script to properly setup tty
8307 + ports prior to PCTS execution
8309 + Still later (Nov 94): another user (Bo Kullmar in Sweden) reports that
8310 + after using C-Kermit to dial out on a bidirectional port, the port
8311 + might not answer subsequent incoming calls, and says "the problem is
8312 + easy enough to fix with the Serial Port Manager; I just delete the
8313 + service and install it again using the graphical interface, which
8314 + underneath uses commands like sacadm and pmadm." Later Bo reports, "I
8315 + have found that if I run Kermit with the following script then it
8316 + works. This script is for /dev/cua/a, "-s a" is the last a in
8322 + surun pmadm -e -p zsmon -s a
8323 + ________________________________________________________________________
8325 + 3.8. C-KERMIT AND SUNOS
8327 + [ [444]Top ] [ [445]Contents ] [ [446]Section Contents ] [ [447]Next ]
8330 + For additional information, see "Celeste's Tutorial on SunOS 4.1.3+
8331 + Modems and Terminals":
8333 + [449]http://www.stokely.com/
8335 + For FAQs, etc, from Sun, see:
8336 + * [450]http://access1.sun.com/
8338 + For history of Sun models and SunOS versions, see (should be all the
8340 + * [451]http://www.ludd.luth.se/~bear/project/sun/sun.hardware.txt
8341 + * [452]ftp://ftp.netcom.com/pub/ru/rubicon/sun.hdwr.ref
8342 + * [453]ftp://ftp.intnet.net/pub/SUN/Sun-Hardware-Ref
8344 + Sun SPARCstation users should read the section "Setting up Modem
8345 + Software" in the Desktop SPARC Sun System & Network Manager's Guide.
8346 + If you don't set up your serial ports correctly, Kermit (and other
8347 + communications software) won't work right.
8349 + Also, on certain Sun models like IPC, the serial port hardware might
8350 + need to have a jumper changed to make it an RS-232 port rather than
8353 + Reportedly, C-Kermit does not work correctly on a Sun SPARCstation in
8354 + an Open Windows window with scrolling enabled. Disable scrolling, or
8355 + else invoke Kermit in a terminal emulation window (xterm, crttool,
8356 + vttool) under SunView (this might be fixed in later SunOS releases).
8358 + On the Sun with Open Windows, an additional symptom has been reported:
8359 + outbound SunLink X.25 connections "magically" translate CR typed at
8360 + the keyboard into LF before transmission to the remote host. This
8361 + doesn't happen under SunView.
8363 + SET CARRIER ON, when used on the SunOS 4.1 version of C-Kermit
8364 + (compiled in the BSD universe), causes the program to hang
8365 + uninterruptibly when SET LINE is issued for a device that is not
8366 + asserting carrier. When Kermit is built in the Sys V universe on the
8367 + same computer, there is no problem (it can be interrupted with
8368 + Ctrl-C). This is apparently a limitation of the BSD-style tty driver.
8370 + SunOS 4.1 C-Kermit has been observed to dump core when running a
8371 + complicated script program under cron. The dump invariably occurs in
8372 + ttoc(), while trying to output a character to a TCP/IP TELNET
8373 + connection. ttoc() contains a write() call, and when the system or the
8374 + network is very busy, the write() call can get stuck for long periods
8375 + of time. To break out of deadlocks caused by stuck write() calls,
8376 + there is an alarm around the write(). It is possible that the core
8377 + dump occurs when this alarm signal is caught. (This one has not been
8378 + observed recently -- possibly fixed in edit 190.)
8380 + On Sun computers with SunOS 4.0 or 4.1, SET FLOW RTS/CTS works only if
8381 + the carrier signal is present from the communication device at the
8382 + time when C-Kermit enters packet mode or CONNECT mode. If carrier is
8383 + not sensed (e.g. when dialing), C-Kermit does not attempt to turn on
8384 + RTS/CTS flow control. This is because the SunOS serial device driver
8385 + does not allow characters to be output if RTS/CTS is set (CRTSCTS) but
8386 + carrier (and DSR) are not present. Workaround (maybe): SET CARRIER OFF
8387 + before giving the SET LINE command, establish the connection, then SET
8390 + It has also been reported that RTS/CTS flow control under SunOS 4.1
8391 + through 4.1.3 works only on INPUT, not on output, and that there is a
8392 + patch from Sun to correct this problem: Patch-ID# T100513-04, 20 July
8393 + 1993 (this patch might apply only to SunOS 4.1.3). It might also be
8394 + necessary to configure the eeprom parameters of the serial port; e.g.
8395 + do the following as root at the shell prompt:
8397 + eeprom ttya-ignore-cd=false
8398 + eeprom ttya-rts-dtr-off=true
8400 + There have been reports of file transfer failures on Sun-3 systems
8401 + when using long packets and/or large window sizes. One user says that
8402 + when this happens, the console issues many copies of this message:
8404 + chaos vmunix: zs1: ring buffer overflow
8406 + This means that SunOS is not scheduling Kermit frequently enough to
8407 + service interrupts from the zs serial device (Zilog 8350 SCC serial
8408 + communication port) before its input silo overflows. Workaround: use
8409 + smaller packets and/or a smaller window size, or use "nice" to
8410 + increase Kermit's priority. Use hardware flow control if available, or
8411 + remove other active processes before running Kermit.
8413 + SunLink X.25 support in C-Kermit 5A(190) was built and tested
8414 + successfully under SunOS 4.1.3b and SunLink X.25 7.00.
8415 + ________________________________________________________________________
8417 + 3.9. C-KERMIT AND ULTRIX
8419 + [ [454]Top ] [ [455]Contents ] [ [456]Section Contents ] [ [457]Next ]
8422 + See also: The [459]comp.unix.ultrix and [460]comp.sys.dec newsgroups.
8424 + There is no hardware flow control in Ultrix. That's not a Kermit
8425 + deficiency, but an Ultrix one.
8427 + When sending files to C-Kermit on a Telnet connection to a remote
8428 + Ultrix system, you must SET PREFIXING ALL (or at least prefix more
8429 + control characters than are selected by SET PREFIXING CAUTIOUS).
8431 + Reportedly, DEC ULTRIX 4.3 is immune to C-Kermit's disabling of
8432 + SIGQUIT, which is the signal that is generated when the user types
8433 + Ctrl-\, which kills the current process (i.e. C-Kermit) and dumps
8434 + core. Diagnosis and cure unknown. Workaround: before starting C-Kermit
8435 + -- or for that matter, when you first log in because this applies to
8436 + all processes, not just Kermit -- give the following Unix command:
8440 + Certain operations driven by RS-232 modem signal do not work on
8441 + DECstations or other DEC platforms whose serial interfaces use MMP
8442 + connectors (DEC version of RJ45 telephone jack with offset tab). These
8443 + connectors convey only the DSR and DTR modem signals, but not carrier
8444 + (CD), RTS, CTS, or RI. Use SET CARRIER OFF to enable communication, or
8445 + "hotwire" DSR to CD.
8447 + The maximum serial speed on the DECstation 5000 is normally 19200, but
8448 + various tricks are available (outside Kermit) to enable higher rates.
8449 + For example, on the 5000/200, 19200 can be remapped (somehow,
8450 + something to do with "a bit in the SIR", whatever that is) to 38400,
8451 + but in software you must still refer to this speed as 19200; you can't
8452 + have 19200 and 38400 available at the same time.
8454 + 19200, reportedly, is also the highest speed supported by Ultrix, but
8455 + NetBSD reportedly supports speeds up to 57600 on the DECstation,
8456 + although whether and how well this works is another question.
8458 + In any case, given the lack of hardware flow control in Ultrix, high
8459 + serial speeds are problematic at best.
8460 + ________________________________________________________________________
8462 + 3.10. C-KERMIT AND UNIXWARE
8464 + [ [461]Top ] [ [462]Contents ] [ [463]Section Contents ] [ [464]Next ]
8468 + * The Freebird Project (Unixware software repository)
8469 + [466]http://www.freebird.org/
8470 + * The UnixWare FAQ: [467]http://www.freebird.org/faq/
8471 + * The following newsgroups:
8472 + + [468]comp.unix.unixware.misc
8473 + + [469]comp.unix.sco.misc.
8475 + Also see general comments on PC-based Unixes in [470]Section 3.0. By
8476 + the way, this section is separate from the SCO (Caldera) section
8477 + because at the time this section was started, Unixware was owned by a
8478 + company called Univel. Later it was sold to Novell, and then to SCO.
8479 + Still later, SCO was sold to Caldera.
8481 + In Unixware 2.0 and later, the preferred serial device names (drivers)
8482 + are /dev/term/00 (etc), rather than /dev/tty00 (etc). Note the
8483 + following correspondence of device names and driver characteristics:
8485 + New name Old name Description
8486 + /dev/term/00 /dev/tty00 ???
8487 + /dev/term/00h /dev/tty00h Modem signals and hardware flow control
8488 + /dev/term/00m /dev/tty00m Modem signals(?)
8489 + /dev/term/00s /dev/tty00s Modem signals and software flow control
8490 + /dev/term/00t /dev/tty00t ???
8492 + Lockfile names use device.major.minor numbers, e.g.:
8494 + /var/spool/locks/LK.7679.003.005
8496 + The minor number varies according to the device name suffix (none, h,
8497 + m, s, or t). Only the device and major number are compared, and thus
8498 + all of the different names for the same physical device (e.g. all of
8499 + those shown in the table above) interlock effectively.
8501 + Prior to UnixWare 7, serial speeds higher than 38400 are not
8502 + supported. In UnixWare 7, we also support 57600 and 115200, plus some
8503 + unexpected ones like 14400, 28800, and 76800, by virtue of a strange
8504 + new interface, evidently peculiar to UnixWare 7, discovered while
8505 + digging through the header files: tcsetspeed(). Access to this
8506 + interface is allowed only in POSIX builds, and thus the UnixWare 7
8507 + version of C-Kermit is POSIX-based, unlike C-Kermit for Unixware 1.x
8508 + and 2.x (since the earlier UnixWare versions did not support high
8509 + serial speeds, period).
8511 + HOWEVER, turning on POSIX features engages all of the "#if
8512 + (!_POSIX_SOURCE)" clauses in the UnixWare header files, which in turn
8513 + prevent us from having modem signals, access to the hardware flow
8514 + control APIs, select(), etc -- in short, all the other things we need
8515 + in communications software, especially when high speeds are used. Oh
8516 + the irony. And so C-Kermit must be shamelessly butchered -- as it has
8517 + been so many times before -- to allow us to have the needed features
8518 + from the POSIX and non-POSIX worlds. See the UNIXWAREPOSIX sections of
8521 + After the butchery, we wind up with Unixware 2.x having full
8522 + modem-signal capability, but politically-correct Unixware 7.x lacking
8523 + the ability to automatically detect a broken connection when carrier
8526 + Meanwhile the Unixware tcsetspeed() function allows any number at all
8527 + (any long, 0 or positive) as an argument and succeeds if the number is
8528 + a legal bit rate for the serial device, and fails otherwise. There is
8529 + no list anywhere of legal speeds. Thus the SET SPEED keyword table
8530 + ("set speed ?" to see it) is hardwired based on trial and error with
8531 + all known serial speeds, the maximum being 115200. However, to allow
8532 + for the possibility that other speeds might be allowed in the future
8533 + (or with different port drivers), the SET SPEED command for UnixWare 7
8534 + only allows you to specify any number at all; a warning is printed if
8535 + the number is not in the list, but the number is accepted anyway; the
8536 + command succeeds if tcsetspeed() accepts the number, and fails
8539 + In C-Kermit 8.0 testing, it was noticed that the POSIX method for
8540 + hanging up the phone by dropping DTR (set speed 0, pause, restore
8541 + speed) did not actually drop DTR. The APIs do not return any error
8542 + indication, but nothing happens. I changed tthang() to skip the
8543 + special case I had made for Unixware and instead follow the normal
8544 + path: if TIOCSDTR is defined use that, otherwise blah blah... It turns
8545 + out TIOCSDTR *is* defined, and it works.
8547 + So in Unixware (at least in 2.1.3) we can read modem signals, hangup
8548 + by toggling DTR, and so on, BUT... But once the remote hangs up and
8549 + Carrier drops, the API for reading modem signals ceases to function;
8550 + although the device is still open, the TIOCMGET ioctl always raises
8551 + errno 6 = ENXIO, "No such device or address".
8555 + Using C-Kermit 6.0 on the UnixWare 1.1 Application Server, one user
8556 + reported a system panic when the following script program is executed:
8558 + set line /dev/tty4
8563 + The panic does not happen if a PAUSE is inserted:
8565 + set line /dev/tty4
8571 + This is using a Stallion EasyIO card installed as board 0 on IRQ 12 on
8572 + a Gateway 386 with the Stallion-supplied driver. The problem was
8573 + reported to Novell and Stallion and (reportedly) is now fixed.
8574 + ________________________________________________________________________
8576 + 3.11. C-KERMIT AND APOLLO SR10
8578 + [ [472]Top ] [ [473]Contents ] [ [474]Section Contents ] [ [475]Next ]
8581 + Reportedly, version 5A(190), when built under Apollo SR10 using "make
8582 + sr10-bsd", compiles, links, and executes OK, but leaves the terminal
8583 + unusable after it exits -- the "cs7" or "cs8" (character size)
8584 + parameter has become cs5. The terminal must be reset from another
8585 + terminal. Cause and cure unknown. Suggested workaround: Wrap Kermit in
8586 + a shell script something like:
8590 + ________________________________________________________________________
8592 + 3.12. C-KERMIT AND TANDY XENIX 3.0
8594 + [ [477]Top ] [ [478]Contents ] [ [479]Section Contents ] [ [480]Next ]
8597 + C-Kermit 7.0 was too big to be built on Tandy Xenix, even in a minimum
8598 + configuration; version 6.0 is the last one that fits.
8600 + Reportedly, in C-Kermit 6.0, if you type lots of Ctrl-C's during
8601 + execution of the initialization file, ghost Kermit processes will be
8602 + created, and will compete for the keyboard. They can only be removed
8603 + via "kill -9" from another terminal, or by rebooting. Diagnosis --
8604 + something strange happening with the SIGINT handler while the process
8605 + is reading the directory (it seems to occur during the SET PROMPT
8606 + [\v(dir)] ... sequence). Cure: unknown. Workaround: don't interrupt
8607 + C-Kermit while it is executing its init file on the Tandy 16/6000.
8608 + ________________________________________________________________________
8610 + 3.13. C-KERMIT AND OSF/1 (DIGITAL UNIX) (TRU64 UNIX)
8612 + [ [482]Top ] [ [483]Contents ] [ [484]Section Contents ] [ [485]Next ]
8615 + While putting together and testing C-Kermit 8.0, it was discovered
8616 + that binaries built for one version of Tru64 Unix (e.g. 4.0G) might
8617 + exhibit very strange behavior if run on a different version of Tru64
8618 + Unix (e.g. 5.1A). The typical symptom was that a section of the
8619 + initialization file would be skipped, notably locating the dialing
8620 + and/or network directory as well as finding and executing the
8621 + customization file, ~/.mykermrc. This problem also is reported to
8622 + occur on Tru64 Unix 5.0 (Rev 732) even when running a C-Kermit binary
8623 + that was built there. However, the Tru64 5.1A binary works correctly
8624 + on 5.0. Go figure.
8626 + When making Telnet connections to a Digital Unix or Tru64 system, and
8627 + your Telnet client forwards your user name, the Telnet server
8628 + evidently stuffs the username into login's standard input, and you
8634 + This is clearly going to play havoc with scripts that look for
8635 + "login:". Workaround (when Kermit is your Telnet client): SET LOGIN
8636 + USER to nothing, to prevent Kermit from sending your user ID.
8638 + Before you can use a serial port on a new Digital Unix system, you
8639 + must run uucpsetup to enable or configure the port. Evidently the
8640 + /dev/tty00 and 01 devices that appear in the configuration are not
8641 + usable; uucpsetup turns them into /dev/ttyd00 and 01, which are. Note
8642 + that uucpsetup and other uucp-family programs are quite primitive --
8643 + they only know about speeds up to 9600 bps and their selection of
8644 + modems dates from the early 1980s. None of this affects Kermit, though
8645 + -- with C-Kermit, you can use speeds up to 115200 bps (at least in
8646 + DU4.0 and later) and modern modems with hardware flow control and all
8649 + Reportedly, if a modem is set for &S0 (assert DSR at all times), the
8650 + system resets or drops DTR every 30 seconds; reportedly DEC says to
8653 + Digital Unix 3.2 evidently wants to believe your terminal is one line
8654 + longer than you say it is, e.g. when a "more" or "man" command is
8655 + given. This is has nothing to do with C-Kermit, but tends to annoy
8656 + those who use Kermit or other terminal emulators to access Digital
8657 + Unix systems. Workaround: tell Unix to "stty rows 23" (or whatever).
8659 + Reportedly, there is some bizarre behavior when trying to use a
8660 + version of C-Kermit built on one Digital Unix 4.0 system on another
8661 + one, possibly due to differing OS or library revision levels; for
8662 + example, the inability to connect to certain TCP/IP hosts. Solution:
8663 + rebuild C-Kermit from source code on the system where you will be
8666 + Digital Unix tgetstr() causes a segmentation fault. C-Kermit 7.0 added
8667 + #ifdefs to avoid calling this routine in Digital Unix. As a result,
8668 + the SCREEN commands always send ANSI escape sequences -- even though
8669 + curses knows your actual terminal type.
8671 + Reportedy the Tru64 Unix 4.0E 1091 Telnet server does not tolerate
8672 + streaming transfers into itself, at least not when the sending Kermit
8673 + is on the same local network. Solution: tell one Kermit or the other
8674 + (or both) to "set streaming off". This might or might be the case with
8675 + earlier and/or later Tru64, Digital Unix, and OSF/1 releases.
8676 + ________________________________________________________________________
8678 + 3.14. C-KERMIT AND SGI IRIX
8680 + [ [487]Top ] [ [488]Contents ] [ [489]Section Contents ] [ [490]Next ]
8684 + * The [492]comp.sys.sgi.misc and [493]comp.sys.sgi.admin newsgroups.
8685 + [494]The SGI website
8687 + + [495]http://www-viz.tamu.edu/~sgi-faq/
8688 + + [496]ftp://viz.tamu.edu/pub/sgi/faq/
8690 + About IRIX version numbers: "uname -a" tells the "two-digit" version
8691 + number, such as "5.3" or "6.5". The three-digit form can be seen with
8692 + "uname -R". (this information is unavailable at the simple API level).
8693 + Supposedly all three-digit versions within the same two-digit version
8694 + (e.g. 6.5.2, 6.5.3) are binary compatible; i.e. a binary built on any
8695 + one of them should run on all others. The "m" suffix denotes just
8696 + patches; the "f" suffix indicates that features were added.
8698 + An IRIX binary built on lower MIPS model (Instruction Set
8699 + Architecture, ISA) can run on higher models, but not vice versa:
8701 + MIPS1 R3000 and below
8704 + MIPS4 R5000 and above
8706 + Furthermore, there are different Application Binary Inferfaces (ABIs):
8708 + COFF 32 bits, IRIX 5.3, 5.2, 5.1, 4.x and below
8709 + o32 ELF 32 bits, IRIX 5.3, 6.0 - 6.5
8710 + N32 ELF 32 bits, IRIX 6.2 - 6.5
8711 + N64 ELF 64 bits, IRIX 6.2 - 6.5
8713 + Thus a prebuilt IRIX binary works on a particular machine only if (a)
8714 + the machine's IRIX version (to one decimal place) is equal to or
8715 + greater than the version under which the binary was built; (b) the
8716 + machine's MIPS level is greater or equal to that of the binary; and
8717 + (c) the machine supports the ABI of the binary. If all three
8718 + conditions are not satisfied, of course, you can build a binary
8719 + yourself from source code since, unlike some other Unix vendors, SGI
8720 + does supply a C compiler and libraries.
8722 + SGI did not supply an API for hardware flow control prior to IRIX 5.2.
8723 + C-Kermit 6.1 and higher for IRIX 5.2 and higher supports hardware flow
8724 + control in the normal way, via "set flow rts/cts".
8726 + For hardware flow control on earlier IRIX and/or C-Kermit versions,
8727 + use the ttyf* (modem control AND hardware flow control) devices and
8728 + not the ttyd* (direct) or ttym* (modem control but no hardware flow
8729 + control) ones, and obtain the proper "hardware handshaking" cable from
8730 + SGI, which is incompatible with the ones for the Macintosh and NeXT
8731 + even though they look the same ("man serial" for further info) and
8732 + tell Kermit to "set flow keep" and "set modem flow rts/cts".
8734 + Serial speeds higher than 38400 are available in IRIX 6.2 and later,
8735 + on O-class machines (e.g. Origin, Octane) only, and are supported by
8736 + C-Kermit 7.0 and later. Commands such as "set speed 115200" may be
8737 + given on other models (e.g. Iris, Indy, Indigo) but will fail because
8738 + the OS reports an invalid speed for the device.
8740 + Experimentation with both IRIX 5.3 and 6.2 shows that when logged in
8741 + to IRIX via Telnet, that remote-mode C-Kermit can't send files if the
8742 + packet length is greater than 4096; the Telnet server evidently has
8743 + this restriction (or bug), since there is no problem sending long
8744 + packets on serial or rlogin connections. However, it can receive files
8745 + with no problem if the packet length is greater than 4096. As a
8746 + workaround, the FAST macro for IRIX includes "set send packet-length
8747 + 4000". IRIX 6.5.1 does not have this problem, so evidently it was
8748 + fixed some time after IRIX 6.2. Tests show file-transfer speeds are
8749 + better (not worse) with 8K packets than with 4K packets from IRIX
8752 + Reportedly some Indys have bad serial port hardware. IRIX 5.2, for
8753 + example, needs patch 151 to work around this; or upgrade to a later
8754 + release. Similarly, IRIX 5.2 has several problems with serial i/o,
8755 + flow control, etc. Again, patch or upgrade.
8757 + Reportedly on machines with IRIX 4.0, Kermit cannot be suspended by
8758 + typing the suspend ("swtch") character if it was started from csh,
8759 + even though other programs can be suspended this way, and even though
8760 + the Z and SUSPEND commands still work correctly. This is evidently
8761 + because IRIX's csh does not deliver the SIGTSTP signal to Kermit. The
8762 + reason other programs can be suspended in the same environment is
8763 + probably that they do not trap SIGTSTP themselves, so the shell is
8764 + doing the suspending rather than the application.
8766 + Also see notes about IRIX 3.x in the [497]C-Kermit for Unix
8767 + Installation Instructions.
8769 + If you have problems making TCP/IP connections in versions of IRIX
8770 + built with GCC 2.95.2, see the bugs section of:
8772 + [498]http://freeware.sgi.com/Installable/gcc-2.95.2.html.
8774 + Reportedly, if you allow gcc to compile C-Kermit on Irix you should be
8775 + aware that there might be problems with some of the network code. The
8777 + [499]http://freeware.sgi.com/Installable/gcc-2.95.2.html; scroll down
8778 + to the "known bugs" section at the end of the document.
8779 + ________________________________________________________________________
8781 + 3.15. C-KERMIT AND THE BEBOX
8783 + [ [500]Top ] [ [501]Contents ] [ [502]Section Contents ] [ [503]Next ]
8786 + See also: The [505]comp.sys.be newsgroup.
8788 + The BeBox has been discontinued and BeOS repositioned for PC
8789 + platforms. The POSIX parts of BeOS are not finished, nor is the
8790 + sockets library, therefore a fully functional version of C-Kermit is
8791 + not possible. In version 6.0 of C-Kermit, written for BeOS DR7, it was
8794 + * set line /dev/serial2 (and probably the other serial ports)
8795 + * set speed 115200 (and at least some of the lower baud rates)
8797 + * set modem type hayes (and likely others, too)
8798 + * dial phone-number
8799 + * set send packet-length 2048 (other lengths for both send and
8801 + * set receive packet length 2048
8802 + * set file type binary (text mode works, too) (with remote kermit
8803 + session in server mode)
8806 + * get bedrop.jpg bedrop.jpg2
8809 + The following do not work:
8810 + * kermit does not detect modem hangup
8811 + * !/RUN/PUSH [commandline command]
8812 + * Running kermit in remote mode
8813 + * Using other protocols (x/y/zmodem)
8814 + * TCP networking interface (Be's TCP/IP API has a ways to go, still)
8816 + C-Kermit does not work on BeOS DR8 because of changes in the
8817 + underlying APIs. Unfortunately not enough changes were made to allow
8818 + the regular POSIX-based C-Kermit to work either. Note: the lack of a
8819 + fork() service requires the select()-based CONNECT module, but there
8820 + is no select(). There is a select() in DR8, but it doesn't work.
8822 + C-Kermit 7.0 was built for BeOS 4.5 and works in remote mode. It does
8823 + not include networking support since the APIs are still not there. It
8824 + is not known if dialing out works, but probably not. Be experts are
8825 + welcome to lend a hand.
8826 + ________________________________________________________________________
8828 + 3.16. C-KERMIT AND DG/UX
8830 + [ [506]Top ] [ [507]Contents ] [ [508]Section Contents ] [ [509]Next ]
8833 + Somebody downloaded the C-Kermit 6.0 binary built under DG/UX 5.40 and
8834 + ran it under DG/UX 5.4R3.10 -- it worked OK except that file dates for
8835 + incoming files were all written as 1 Jan 1970. Cause and cure unknown.
8836 + Workaround: SET ATTRIBUTE DATE OFF. Better: Use a version of C-Kermit
8837 + built under and for DG/UX 5.4R3.10.
8838 + ________________________________________________________________________
8840 + 3.17. C-KERMIT AND SEQUENT DYNIX
8842 + [ [511]Top ] [ [512]Contents ] [ [513]Section Contents ] [ [514]Next ]
8845 + Reportedly, when coming into a Sequent Unix (DYNIX) system through an
8846 + X.25 connection, Kermit doesn't work right because the Sequent's
8847 + FIONREAD ioctl returns incorrect data. To work around, use the
8848 + 1-character-at-a-time version of myread() in ckutio.c (i.e. undefine
8849 + MYREAD in ckutio.c and rebuild the program). This is unsatisfying
8850 + because two versions of the program would be needed -- one for use
8851 + over X.25, and the other for serial and TCP/IP connections.
8852 + ________________________________________________________________________
8854 + 3.18. C-KERMIT AND {FREE,OPEN,NET}BSD
8856 + [ [516]Top ] [ [517]Contents ] [ [518]Section Contents ] [ [519]Next ]
8859 + Some NebBSD users have reported difficulty escaping back from CONNECT
8860 + mode, usually when running NetBSD on non-PC hardware. Probably a
8863 + NetBSD users have also reported that C-Kermit doesn't pop back to the
8864 + prompt if the modem drops carrier. This needs to be checked out &
8865 + fixed if possible.
8867 + (All the above seems to work properly in C-Kermit 7.0 and later.)
8868 + ________________________________________________________________________
8870 + 3.19. C-KERMIT AND MAC OS X (Rhapsody, Darwin, Jaguar, Panther)
8872 + [ [521]Top ] [ [522]Contents ] [ [523]Section Contents ] [ [524]Next ]
8875 + Mac OS X is Apple's 4.4BSD Unix variety, closely related to FreeBSD,
8876 + but different. "uname -a" is singularly uninformative, as in Linux,
8877 + giving only the Darwin kernel version number. As far as I can tell,
8878 + there is no way to find out the Mac OS X version number, such as 10.3
8879 + (in Linux you can find the distribution version in a
8880 + distribution-dependent file). Here are some points to be aware of:
8882 + * The biggest gotcha for Kermit users is that Mac OS X does not
8883 + support serial ports and, as far as I can tell, doesn't support
8884 + its built-in modem either, for anything other than making Internet
8885 + connections. Macintoshes capable of running Mac OS X, such as the
8886 + G5, some without serial ports and without any APIs to support
8887 + them, and also without the UUCP family of programs (including cu),
8888 + nor any standard for serial-port lockfile directory.
8889 + * At least early versions of Mac OS X came without Curses, Termlib,
8890 + or Terminfo libraries. Later versions seem to have ncurses. Kermit
8891 + uses curses for its file-transfer display. See elsewhere about
8892 + curses-vs-ncurses confusion.
8893 + * In the HFS+ file system, filenames are case-folded. Thus
8894 + "makefile" and "Makefile" are the same file. The UFS file system
8895 + is, like normal Unix, case-sensitive.
8896 + * Files that are composed of a resource fork and a data fork... I
8897 + doubt that C-Kermit does anything useful with them. There is no
8898 + code in C-Kermit for traditional two-forked Macintosh files, but
8899 + it could be added if there is any demand.
8900 + * In case you want to transfer a traditional Macintosh text file (or
8901 + data fork of a file that is plain text), you can use these
8902 + C-Kermit commands:
8905 +set file character-set apple-quickdraw
8906 +send /text filename
8908 + * File or pathnames that include spaces must be enclosed in either
8909 + doublequotes or curly braces in C-Kermit commands.
8910 + * Mac OS X has its own package format for applications, called
8911 + "fink". Various fink packages for C-Kermit are floating around
8912 + that are not standard releases. For example, there's a C-Kermit
8913 + 8.0.201 package in which C-Kermit was modifed (at least) to use a
8914 + UUCP lockfile directory that does not exist on vanilla Mac OS X
8917 + Mac OS X and Serial Ports
8919 + Apple is in the forefront of companies that believe serial ports have
8920 + no use in the modern world and so has simply eliminated all traces of
8921 + them from its machines and OS. But of course serial ports are still
8922 + needed to connect not only to external modems, but also to the control
8923 + ports of hubs, routers, terminal servers, PBXs, and similar devices,
8924 + not to mention barcode readers, POS systems and components, automated
8925 + factory-floor equipment, and scientific, medical, and lab equipment
8926 + (to name a few). Among workers in these areas, there is a need to add
8927 + serial ports back onto this platform, which is being filled by
8928 + third-party products such as the [526]Keyspan USB Serial Adapter. To
8929 + use the Keyspan device, you must install the accompanying device
8930 + drivers, which wind up giving you serial ports with names like
8931 + /dev/cu.USA19H3b1P1.1.
8933 + To configure your Mac OS X system to allow C-Kermit to use these (or
8934 + any other) serial devices:
8937 + chgrp xxxx /var/spool/lock
8938 + chmod g+w /var/spool/lock
8939 + chgrp xxxx /dev/cu.*
8940 + (where xxxx is the name of the group for users to whom serial-port
8941 + access is to be granted). Use "admin" or other existing group, or
8942 + create a new group if desired. NB:
8944 + In the absence of official guidance from Apple or anyone else, we
8945 + choose /var/spool/lock as the lockfile directory because this
8946 + directory (a) already exists on vanilla Mac OS X installations, and
8947 + (b) it is the directory used for serial-port lockfiles on many
8949 + 2. Put all users who need access to the serial port in the same
8951 + 3. Make sure the serial device files that are to be used by C-Kermit
8952 + have group read-write permission and (if you care) lack world
8953 + read-write permission, e.g.:
8954 + chmod g+rw,o-rw /dev/cu.*
8956 + If you do the above, then there's no need to become root to use
8957 + Kermit, or to make Kermit suid or sgid. Just do this:
8960 +mv wermit /usr/local/bin/kermit
8962 + (or whatever spot is more appropriate). For greater detail about
8963 + installation (man page, etc), [527]CLICK HERE.
8965 + Back when Macs had serial ports, they were not RS-232 (the standard
8966 + for connecting computers with nearby modems) but rather RS-422 or -423
8967 + (a standard for connecting serial devices over longer distances).
8968 + Macintosh serial ports do not support modems well because they do not
8969 + have enough wires (or more properly in the case RS-422/423, wire
8970 + pairs) to convey a useful subset of modem signals. The Keyspan USB
8971 + adapter gives you two Mini-Din8 RS-422 ports, that are no better (or
8972 + worse) for communicating with modems or serial devices than a real Mac
8973 + Din-8 port was. In essense, you get Data In, Data Out, and two modem
8974 + signals. It looks to me as if the signals chosen by Keyspan are RTS
8975 + and CTS. This gives you hardware flow control, but at the expense of
8976 + Carrier Detect. Thus to use C-Kermit with a Keyspan USB serial port,
8977 + you must tell C-Kermit to:
8979 +set modem type none ; (don't expect a modem)
8980 +set carrier-watch off ; (ignore carrier signal)
8981 +set port /dev/cu.USA19H3b1P1.1 ; (open the port)
8982 +set flow rts/cts ; (this is the default)
8983 +set speed 57600 ; (or whatever)
8984 +connect ; (or whatever)
8986 + Use Ctrl-\C in the normal manner to escape back to the C-Kermit>
8987 + prompt. Kermit can't pop back to its prompt automatically when Carrier
8988 + drops because there is no Carrier signal.
8990 + Instructions for the built-in modem remain to be written.
8993 + * [528]Unix tips for Mac OS X (Jerry Stratton)
8994 + ________________________________________________________________________
8996 + 3.20. C-KERMIT AND COHERENT
8998 + [ [529]Top ] [ [530]Contents ] [ [531]Section Contents ] [
9003 + [533]http://www.uni-giessen.de/faq/archiv/coherent-faq.general/msg00
9006 + Mark Williams COHERENT was perhaps the first commercial Unix-based
9007 + operating system for PCs, first appearing about 1983 or -84 for the
9008 + PC/XT (?), and popular until about 1993, when Linux took over.
9009 + C-Kermit, as of version 8.0, is still current for COHERENT 386 4.2
9010 + (i.e. only for i386 and above). Curses is included, but lots of other
9011 + features are omitted due to lack of the appropriate OS features, APIs,
9012 + libraries, hardware, or just space: e.g. TCP/IP, floating-point
9013 + arithmetic, learned scripts. Earlier versions of COHERENT ran on 8086
9014 + and 80286, but these are to small to build or run C-Kermit, but
9015 + G-Kermit should be OK (as might be ancient versions of C-Kermit).
9017 + You can actually build a version with floating point support -- just
9018 + take -DNOFLOAT out of CFLAGS and add -lm to LIBS; NOFLOAT is the
9019 + default because COHERENT tends to run on old PCs that don't have
9020 + floating-point hardware. You can also add "-f" to CFLAGS to have it
9021 + link in the floating-point emulation library. Also I'm not sure why
9022 + -DNOLEARN is included, since it depends on select(), which COHERENT
9024 + ________________________________________________________________________
9026 + 4. GENERAL UNIX-SPECIFIC HINTS, LIMITATIONS, AND BUGS
9028 + [ [534]Top ] [ [535]Contents ] [ [536]Next ] [ [537]Previous ]
9030 + 4.1. Modem Signals
9032 + There seems to be an escalating demand for the ability to control
9033 + "dumb serial devices" (such as "smartcard readers", barcode readers,
9034 + etc) by explicitly manipulating modem signals, particularly RTS. This
9035 + might have been easy to do in DOS, where there is no operating system
9036 + standing between the application and the serial device, but it is
9037 + problematic in Unix, where modem signals are controlled by the serial
9038 + device driver. If the driver does not provide an API for doing this,
9039 + then the application can't do it. If it does provide an API, expect it
9040 + to be totally different on each Unix platform, since there is no
9041 + standard for this.
9045 + Beginning with C-Kermit 6.0, the default C-Kermit prompt includes your
9046 + current (working) directory; for example:
9048 + [/usr/olga] C-Kermit>
9050 + (In C-Kermit 7.0 the square braces were replaced by round parentheses
9051 + to avoid conflicts with ISO 646 national character sets.)
9053 + If that directory is on an NFS-mounted disk, and NFS stops working or
9054 + the disk becomes unavailable, C-Kermit will hang waiting for NFS
9055 + and/or the disk to come back. Whether you can interrupt C-Kermit when
9056 + it is hung this way depends on the specific OS. Kermit has called the
9057 + operating systems's getcwd() function, and is waiting for it to
9058 + return. Some versions of Unix (e.g. HP-UX 9.x) allow this function to
9059 + be interrupted with SIGINT (Ctrl-C), others (such as HP-UX 8.x) do
9060 + not. To avoid this effect, you can always use SET PROMPT to change
9061 + your prompt to something that does not involve calling getcwd(), but
9062 + if NFS is not responding, C-Kermit will still hang any time you give a
9063 + command that refers to an NFS-mounted directory. Also note that in
9064 + some cases, the uninterruptibility of NFS-dependent system or library
9065 + calls is considered a bug, and sometimes there are patches. For HP-UX,
9069 + HP-UX 10.20 libc PHCO_8764 PHCO_14891/PHCO_16723
9070 + HP-UX 10.10 libc PHCO_8763 PHCO_14254/PHCO_16722
9071 + HP-UX 9.x libc PHCO_7747 S700 PHCO_13095
9072 + HP-UX 9.x libc PHCO_6779 S800 PHCO_11162
9074 + 4.3. C-Kermit as Login Shell
9076 + You might have reason to make C-Kermit the login shell for a specific
9077 + user, by entering the pathname of Kermit (possibly with command-line
9078 + switches, such as -x to put it in server mode) into the shell field of
9079 + the /etc/passwd file. This works pretty well. In some cases, for
9080 + "ultimate security", you might want to use a version built with
9081 + -DNOPUSH (see the [538]Configurations Options document for this, but
9082 + even if you don't, then PUSHing or shelling out from C-Kermit just
9083 + brings up a new copy of C-Kermit (but warning: this does not prevent
9084 + the user from explicitly running a shell; e.g. "run /bin/sh"; use
9085 + NOPUSH to prevent this).
9087 + 4.4. C-Kermit versus screen and splitvt
9089 + C-Kermit file transfers will probably not work if attemped through the
9090 + "splitvt" or GNU "screen" programs because the screen optimization (or
9091 + at least, line wrapping, control-character absorption) done by this
9092 + package interferes with Kermit's packets.
9094 + The same can apply to any other environment in which the user's
9095 + session is captured, monitored, recorded, or manipulated. Examples
9096 + include the 'script' program (for making a typescript of a session),
9097 + the Computronics PEEK package and pksh (at least versions of it prior
9098 + to 1.9K), and so on.
9100 + You might try the following -- what we call "doomsday Kermit" --
9101 + settings to push packets through even the densest and most obstructive
9102 + connections, such as "screen" and "splitvt" (and certain kinds of 3270
9103 + protocol emulators): Give these commands to BOTH Kermit programs:
9106 + SET CONTROL PREFIX ALL
9107 + SET RECEIVE PACKET-LENGTH 70
9108 + SET RECEIVE START 62
9110 + SET SEND PAUSE 100
9113 + If it works, it will be slow.
9115 + 4.5. C-Kermit versus DOS Emulators
9117 + On Unix workstations equipped with DOS emulators like SoftPC, watch
9118 + out for what these emulators do to the serial port drivers. After
9119 + using a DOS emulator, particularly if you use it to run DOS
9120 + communications software, you might have to reconfigure the serial
9121 + ports for use by Unix.
9123 + 4.6. C-Kermit versus Job Control
9125 + Interruption by Ctrl-Z makes Unix C-Kermit try to suspend itself with
9126 + kill(0,SIGTSTP), but only on platforms that support job control, as
9127 + determined by whether the symbol SIGTSTP is defined (or on POSIX or
9128 + SVR4 systems, if syconf(_SC_JOB_CONTROL) or _POSIX_JOB_CONTROL in
9129 + addition to SIGTSTP). However, if Kermit is running under a login
9130 + shell (such as the original Bourne shell) that does not support job
9131 + control, the user's session hangs and must be logged out from another
9132 + terminal, or hung up on. There is no way Kermit can defend itself
9133 + against this. If you use a non-job control shell on a computer that
9134 + supports job control, give a command like "stty susp undef" to fix it
9135 + so the suspend signal is not attached to any particular key, or give
9136 + the command SET SUSPEND OFF to C-Kermit, or build C-Kermit with
9139 + 4.7. Dates and Times
9141 + Unix time conversion functions typically apply locale rules to return
9142 + local time in terms of any seasonal time zone change in effect for the
9143 + given date. The diffdate function assumes that the same timezone rules
9144 + are in effect for both dates, but a date with timezone information
9145 + will be converted to the local time zone in effect at the given time,
9146 + e.g., a GMT specification will produce either a Standard Time or
9147 + Daylight Savings Time, depending on which applies at the given time.
9148 + An example using the 2001 seasonal change from EDT (-0400) to EST
9151 + C-Kermit> DATE 20011028 05:01:02 GMT ; EDT
9153 + C-Kermit> DATE 20011028 06:01:02 GMT ; EST
9157 + but the implicit change in timezone offset is not recognized:
9159 + C-Kermit> echo \fdiffdate(20011028 05:01:02 GMT, 20011028 06:01:02 GMT)
9163 + Date/time arithmetic, offsets, delta times, and timezone support are
9164 + new to C-Kermit 8.0, and might be expected to evolve and improve in
9165 + subsequent releases.
9167 + On some platforms, files downloaded with HTTP receive the current
9168 + timestamp, rather than the HTTP "Last Modified" time (this can be
9169 + fixed by including utime.h, e.g. in SunOS and Tru64...).
9171 + 4.8. Pseudoterminals
9173 + The SSH and PTY commands work by assigning a pseudoterminal and
9174 + reading and writing from it. Performance varies according to the
9175 + specific platform ranging from very fast to very flow.
9177 + SSH and PTY commands can fail if (a) all pseudoterminals are in use;
9178 + or (b) you do not have read/write access to the pseudoterminal that
9179 + was assigned. An example of (b) was reported with the Zipslack
9180 + Slackware Linux distribution, in which the pseudoterminals were
9181 + created with crw-r--r-- permission, instead of crw-rw-rw-.
9183 + 4.9. Miscellaneous
9185 + * Reportedly, the Unix C-Kermit server, under some conditions, on
9186 + certain particular systems, fails to log out its login session
9187 + upon receipt of a BYE command. Before relying on the BYE command
9188 + working, test it a few times to make sure it works on your system:
9189 + there might be system configuration or security mechanisms to
9190 + prevent an inferior process (like Kermit) from killing a superior
9191 + one (like the login shell).
9192 + * On AT&T 7300 (3B1) machines, you might have to "stty nl1" before
9193 + starting C-Kermit. Do this if characters are lost during
9194 + communications operations.
9195 + * Under the bash shell (versions prior to 1.07 from CWRU), "pushing"
9196 + to an inferior shell and then exiting back to Kermit leaves Kermit
9197 + in the background such that it must be explicitly fg'd. This is
9198 + reportedly fixed in version 1.07 of bash (and definitely in modern
9200 + ________________________________________________________________________
9202 + 5. INITIALIZATION AND COMMAND FILES
9204 + [ [539]Top ] [ [540]Contents ] [ [541]Next ] [ [542]Previous ]
9206 + C-Kermit's initialization file for Unix is .kermrc (lowercase, starts
9207 + with period) in your home directory, unless Kermit was built with the
9208 + system-wide initialization-file option (see the [543]C-Kermit for Unix
9209 + Installation Instructions).
9211 + C-Kermit identifies your home directory based on the environment
9212 + variable, HOME. Most Unix systems set this variable automatically when
9213 + you log in. If C-Kermit can't find your initialization file, check
9214 + your HOME variable:
9216 + echo $HOME (at the Unix prompt)
9220 + echo \$(HOME) (at the C-Kermit prompt)
9222 + If HOME is not defined, or is defined incorrectly, add the appropriate
9223 + definition to your Unix .profile or .login file, depending on your
9226 + setenv HOME full-pathname-of-your-home-directory (C-Shell, .login file)
9230 + HOME=full-pathname-of-your-home-directory (sh, ksh, .profile file)
9233 + NOTE: Various other operations depend on the correct definition of
9234 + HOME. These include the "tilde-expansion" feature, which allows you to
9235 + refer to your home directory as "~" in filenames used in C-Kermit
9240 + as well as the \v(home) variable.
9242 + Prior to version 5A(190), C-Kermit would look for its initialization
9243 + file in the current directory if it was not found in the home
9244 + directory. This feature was removed from 5A(190) because it was a
9245 + security risk. Some people, however, liked this behavior and had
9246 + .kermrc files in all their directories that would set up things
9247 + appropriately for the files therein. If you want this behavior, you
9248 + can accomplish it in various ways, for example:
9250 + * Create a shell alias, for example:
9251 + alias kd="kermit -Y ./.kermrc"
9252 + * Create a .kermrc file in your home directory, whose contents are:
9255 + Suppose you need to pass a password from the Unix command line to a
9256 + C-Kermit script program, in such a way that it does not show up in
9257 + "ps" or "w" listings. Here is a method (not guaranteed to be 100%
9258 + secure, but definitely more secure than the more obvious methods):
9260 + echo mypassword | kermit myscript
9262 + The "myscript" file contains all the commands that need to be executed
9263 + during the Kermit session, up to and including EXIT, and also includes
9264 + an ASK or ASKQ command to read the password from standard input, which
9265 + has been piped in from the Unix 'echo' command, but it must not
9266 + include a CONNECT command. Only "kermit myscript" shows up in the ps
9268 + ________________________________________________________________________
9270 + 6. COMMUNICATION SPEED SELECTION
9272 + [ [544]Top ] [ [545]Contents ] [ [546]Next ] [ [547]Previous ]
9274 + Version-7 based Unix implementations, including 4.3 BSD and earlier
9275 + and Unix systems based upon BSD, use a 4-bit field to record a serial
9276 + device's terminal speed. This leaves room for 16 speeds, of which the
9277 + first 14 are normally:
9279 + 0, 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
9282 + The remaining two are usually called EXTA and EXTB, and are defined by
9283 + the particular Unix implementation. C-Kermit determines which speeds
9284 + are available on your system based on whether symbols for them are
9285 + defined in your terminal device header files. EXTA is generally
9286 + assumed to be 19200 and EXTB 38400, but these assumptions might be
9287 + wrong, or they might not apply to a particular device that does not
9288 + support these speeds. Presumably, if you try to set a speed that is
9289 + not legal on a particular device, the driver will return an error, but
9290 + this can not be guaranteed.
9292 + On these systems, it is usually not possible to select a speed of
9293 + 14400 bps for use with V.32bis modems. In that case, use 19200 or
9294 + 38400 bps, configure your modem to lock its interface speed and to use
9295 + RTS/CTS flow control, and tell C-Kermit to SET FLOW RTS/CTS and SET
9296 + DIAL SPEED-MATCHING OFF.
9298 + The situation is similar, but different, in System V. SVID Third
9299 + Edition lists the same speeds, 0 through 38400.
9301 + Some versions of Unix, and/or terminal device drivers that come with
9302 + certain third-party add-in high-speed serial communication interfaces,
9303 + use the low "baud rates" to stand for higher ones. For example, SET
9304 + SPEED 50 gets you 57600 bps; SET SPEED 75 gets you 76800; SET SPEED
9307 + SCO ODT 3.0 is an example where a "baud-rate-table patch" can be
9308 + applied that can rotate the tty driver baud rate table such that
9309 + 600=57600 and 1800=115k baud. Similarly for Digiboard
9310 + multiport/portservers, which have a "fastbaud" setting that does this.
9311 + Linux has a "setserial" command that can do it, etc.
9313 + More modern Unixes support POSIX-based speed setting, in which the
9314 + selection of speeds is not limited by a 4-bit field. C-Kermit 6.1
9315 + incorporates a new mechanism for finding out (at compile time) which
9316 + serial speeds are supported by the operating system that does not
9317 + involve editing of source code by hand; on systems like Solaris 5.1,
9318 + IRIX 6.2, and SCO OSR5.0.4, "set speed ?" will list speeds up to
9319 + 460800 or 921600. In C-Kermit 7.0 and later:
9321 + 1. If a symbol for a particular speed (say B230400 for 230400 bps)
9322 + appears in whatever header file defines acceptable serial speeds
9323 + (e.g. <termbits.h> or <sys/termios.h> or <sys/ttydev.h>, etc), the
9324 + corresponding speed will appear in C-Kermit's "set speed ?" list.
9325 + 2. The fact that a given speed is listed in the header files and
9326 + appears in C-Kermit's list does not mean the driver will accept
9327 + it. For example, a computer might have some standard serial ports
9328 + plus some add-on ones with different drivers that accept a
9329 + different repertoire of speeds.
9330 + 3. The fact that a given speed is accepted by the driver does not
9331 + guarantee the underlying hardware can accept it.
9333 + When Kermit is given a "set speed" command for a particular device,
9334 + the underlying system service is called to set the speed; its return
9335 + code is checked and the SET SPEED command fails if the return code
9336 + indicates failure. Regardless of the system service return status, the
9337 + device's speed is then read back and if it does not match the speed
9338 + that was requested, an error message is printed and the command fails.
9340 + Even when the command succeeds, this does not guarantee successful
9341 + operation at a particular speed, especially a high one. That depends
9342 + on electricity, information theory, etc. How long is the cable, what
9343 + is its capacitance, how well is it shielded, etc, not to mention that
9344 + every connection has two ends and its success depends on both of them.
9345 + (With the obvious caveats about internal modems, is the cable really
9346 + connected, interrupt conflicts, etc etc etc).
9348 + Note, in particular, that there is a certain threshold above which
9349 + modems can not "autobaud" -- i.e. detect the serial interface speed
9350 + when you type AT (or whatever else the modem's recognition sequence
9351 + might be). Such modems need to be engaged at a lower speed (say 2400
9352 + or 9600 or even 115200 -- any speed below their autobaud threshold)
9353 + and then must be given a modem-specific command (which can be found in
9354 + the modem manual) to change their interface speed to the desired
9355 + higher speed, and then the software must also be told to change to the
9356 + new, higher speed.
9358 + For additional information, read [548]Section 9.5 of the Installation
9359 + Instructions, plus any platform-specific notes in [549]Section 3
9361 + ________________________________________________________________________
9363 + 7. COMMUNICATIONS AND DIALING
9365 + [ [550]Top ] [ [551]Contents ] [ [552]Next ] [ [553]Previous ]
9367 + 7.1. Serial Ports and Modems
9369 + If you SET LINE to a serial port modem-control device that has nothing
9370 + plugged in to it, or has a modem connected that is powered off, and
9371 + you have not given a prior SET MODEM TYPE or SET CARRIER-WATCH OFF
9372 + command, the SET LINE command is likely to hang. In most cases, you
9373 + can Ctrl-C out. If not, you'll have to kill C-Kermit from another
9376 + Similarly, if you give a SET MODEM TYPE HAYES (or USR, or any other
9377 + modem type besides DIRECT, NONE, or UNKNOWN) and then SET LINE to an
9378 + empty port, the subsequent close (implicit or explicit) is liable to
9379 + hang or even crash (through no fault of Kermit's -- the hanging or
9380 + crashing is inside a system call such as cfsetospeed() or close()).
9382 + The SET CARRIER-WATCH command works as advertised only if the
9383 + underlying operating system and device drivers support this feature;
9384 + in particular only if a read() operation returns immediately with an
9385 + error code if the carrier signal goes away or, failing that, if
9386 + C-Kermit can obtain the modem signals from the device driver (you can
9387 + tell by giving a "set line" command to a serial device, and then a
9388 + "show communications" command -- if modem signals are not listed,
9389 + C-Kermit won't be able to detect carrier loss, the WAIT command will
9390 + not work, etc). Of course, the device itself (e.g. modem) must be
9391 + configured appropriately and the cables convey the carrier and other
9392 + needed signals, etc.
9394 + If you dial out from Unix system, but then notice a lot of weird
9395 + character strings being stuck into your session at random times
9396 + (especially if they look like +++ATQ0H0 or login banners or prompts),
9397 + that means that getty is also trying to control the same device.
9398 + You'll need to dial out on a device that is not waiting for a login,
9399 + or else disable getty on the device.
9401 + As of version 7.0, C-Kermit makes explicit checks for the Carrier
9402 + Detect signal, and so catches hung-up connections much better than 6.0
9403 + and earlier. However, it still can not be guaranteed to catch every
9404 + ever CD on-to-off transition. For example, when the HP-UX version of
9405 + C-Kermit is in CONNECT mode on a dialed connection and CARRIER-WATCH
9406 + ON or AUTO, and you turn off the modem, HP-UX is stuck in a read()
9407 + that never returns. (C-Kermit does not pop back to its prompt
9408 + automatically, but you can still escape back.)
9410 + If, on the other hand, you log out from the remote system, and it
9411 + hangs up, and CD drops on the local modem, C-Kermit detects this and
9412 + pops back to the prompt as it should. (Evidently there can be a
9413 + difference between CD and DSR turning off at the same time, versus CD
9414 + turning off while DSR stays on; experimentation with &S0/&S1/&S2 on
9415 + your modem might produce the desired results).
9417 + When Unix C-Kermit exits, it closes (and must close) the
9418 + communications device. If you were dialed out, this will most likely
9419 + hang up the connection. If you want to get out of Kermit and still use
9420 + Kermit's communication device, you have several choices:
9422 + 1. Shell out from Kermit or suspend Kermit, and refer to the device
9423 + literally (as in "term -blah -blah < /dev/cua > /dev/cua").
9424 + 2. Shell out from Kermit and use the device's file descriptor which
9425 + Kermit makes available to you in the \v(ttyfd) variable.
9426 + 3. Use C-Kermit's REDIRECT command.
9427 + 4. Use C-Kermit new EXEC /REDIRECT command.
9429 + If you are having trouble dialing:
9431 + 1. Make sure the dialout line is configured correctly. More about
9433 + 2. Make sure all necessary patches are installed for your operating
9435 + 3. If you can't dial on a "bidirectional" line, then configure it for
9436 + outbound-only (remove the getty) and try again. (The mechanisms --
9437 + if any -- for grabbing bidirectional lines for dialout vary wildly
9438 + among Unix implementations and releases, and C-Kermit -- which
9439 + runs on well over 300 different Unix variations -- makes no effort
9440 + to keep up with them; the recommended method for coping with this
9441 + situation is to wrap C-Kermit in a shell script that takes the
9442 + appropriate actions.)
9443 + 4. Make sure C-Kermit's SET DIAL and SET MODEM parameters agree with
9444 + the modem you are actually using -- pay particular attention to
9445 + SET DIAL SPEED-MATCHING.
9446 + 5. If MODEM HANGUP-METHOD is set to RS232-SIGNAL, change it to
9447 + MODEM-COMMAND. Or vice-versa.
9448 + 6. Try SET DIAL HANGUP OFF before the DIAL command. Also, SET DIAL
9449 + DISPLAY ON to watch what's happening. See [554]Section 8 of the
9450 + [555]Installation Instructions.
9451 + 7. Read pages 50-67 of [556]Using C-Kermit.
9452 + 8. As a last resort, don't use the DIAL command at all; SET CARRIER
9453 + OFF and CONNECT to the modem and dial interactively, or write a
9454 + script program to dial the modem.
9456 + Make sure your dialout line is correctly configured for dialing out
9457 + (as opposed to login). The method for doing this is different for each
9458 + kind of Unix system. Consult your system documentation for configuring
9459 + lines for dialing out (for example, Sun SparcStation IPC users should
9460 + read the section "Setting up Modem Software" in the Desktop SPARC Sun
9461 + System & Network Manager's Guide; HP-9000 workstation users should
9462 + consult the manual Configuring HP-UX for Peripherals, etc).
9464 + Symptom: DIAL works, but a subsequent CONNECT command does not.
9465 + Diagnosis: the modem is not asserting Carrier Detect (CD) after the
9466 + connection is made, or the cable does not convey the CD signal. Cure:
9467 + Reconfigure the modem, replace the cable. Workaround: SET CARRIER OFF
9468 + (at least in System-V based Unix versions).
9470 + For Berkeley-Unix-based systems (4.3BSD and earlier), Kermit includes
9471 + code to use LPASS8 mode when parity is none, which is supposed to
9472 + allow 8-bit data and Xon/Xoff flow control at the same time. However,
9473 + as of edit 174, this code is entirely disabled because it is
9474 + unreliable: even though the host operating system might (or might not)
9475 + support LPASS8 mode correctly, the host access protocols (terminal
9476 + servers, telnet, rlogin, etc) generally have no way of finding out
9477 + about it and therefore render it ineffective, causing file transfer
9478 + failures. So as of edit 174, Kermit once again uses rawmode for 8-bit
9479 + data, and so there is no Xon/Xoff flow control during file transfer or
9480 + terminal emulation in the Berkeley-based versions (4.3 and earlier,
9483 + Also on Berkeley-based systems (4.3 and earlier), there is apparently
9484 + no way to configure a dialout line for proper carrier handling, i.e.
9485 + ignore carrier during dialing, require carrier thereafter, get a fatal
9486 + error on any attempt to read from the device after carrier drops (this
9487 + is handled nicely in System V by manipulation of the CLOCAL flag). The
9488 + symptom is that carrier loss does not make C-Kermit pop back to the
9489 + prompt automatically. This is evident on the NeXT, for example, but
9490 + not on SunOS, which supports the CLOCAL flag. This is not a Kermit
9491 + problem, but a limitation of the underlying operating system. For
9492 + example, the cu program on the NeXT doesn't notice carrier loss
9493 + either, whereas cu on the Sun does.
9495 + On certain AT&T Unix systems equipped with AT&T modems, DIAL and
9496 + HANGUP don't work right. Workarounds: (1) SET DIAL HANGUP OFF before
9497 + attempting to dial; (2) If HANGUP doesn't work, SET LINE, and then SET
9498 + LINE <device> to totally close and reopen the device. If all else
9499 + fails, SET CARRIER OFF.
9501 + C-Kermit does not contain any particular support for AT&T DataKit
9502 + devices. You can use Kermit software to dial in to a DataKit line, but
9503 + C-Kermit does not contain the specialized code required to dial out
9504 + from a DataKit line. If the Unix system is connected to DataKit via
9505 + serial ports, dialout should work normally (e.g. set line /dev/ttym1,
9506 + set speed 19200, connect, and then see the DESTINATION: prompt, from
9507 + which you can connect to another computer on the DataKit network or to
9508 + an outgoing modem pool, etc). But if the Unix system is connected to
9509 + the DataKit network through the special DataKit interface board, then
9510 + SET LINE to a DataKit pseudodevice (such as /dev/dk031t) will not work
9511 + (you must use the DataKit "dk" or "dkcu" program instead). In C-Kermit
9512 + 7.0 and later, you can make Kermit connections "though" dk or dkcu
9513 + using "set line /pty".
9515 + In some BSD-based Unix C-Kermit versions, SET LINE to a port that has
9516 + nothing plugged in to it with SET CARRIER ON will hang the program (as
9517 + it should), but it can't be interrupted with Ctrl-C. The interrupt
9518 + trap is correctly armed, but apparently the Unix open() call cannot be
9519 + interrupted in this case. When SET CARRIER is OFF or AUTO, the SET
9520 + LINE will eventually return, but then the program hangs
9521 + (uninterruptibly) when the EXIT or QUIT command (or, presumably,
9522 + another SET LINE command) is given. The latter is probably because of
9523 + the attempt to hang up the modem. (In edit 169, a timeout alarm was
9524 + placed around this operation.)
9526 + With SET DIAL HANGUP OFF in effect, the DIAL command might work only
9527 + once, but not again on the same device. In that case, give a CLOSE
9528 + command to close the device, and then another SET LINE command to
9529 + re-open the same device. Or rebuild your version of Kermit with the
9530 + -DCLSOPN compile-time switch.
9532 + The DIAL command says "To cancel: Type your interrupt character
9533 + (normally Ctrl-C)." This is just one example of where program messages
9534 + and documentation assume your interrupt character is Ctrl-C. But it
9535 + might be something else. In most (but not necessarily all) cases, the
9536 + character referred to is the one that generates the SIGINT signal. If
9537 + Ctrl-C doesn't act as an interrupt character for you, type the Unix
9538 + command "stty -a" or "stty all" or "stty everything" to see what your
9539 + interrupt character is. (Kermit could be made to find out what the
9540 + interrupt character is, but this would require a lot of
9541 + platform-dependent coding and #ifdefs, and a new routine and interface
9542 + between the platform-dependent and platform-independent parts of the
9545 + In general, the hangup operation on a serial communication device is
9546 + prone to failure. C-Kermit tries to support many, many different kinds
9547 + of computers, and there seems to be no portable method for hanging up
9548 + a modem connection (i.e. turning off the RS-232 DTR signal and then
9549 + turning it back on again). If HANGUP, DIAL, and/or Ctrl-\H do not work
9550 + for you, and you are a programmer, look at the tthang() function in
9551 + ckutio.c and see if you can add code to make it work correctly for
9552 + your system, and send the code to the address above. (NOTE: This
9553 + problem has been largely sidestepped as of edit 188, in which Kermit
9554 + first attempts to hang up the modem by "escaping back" via +++ and
9555 + then giving the modem's hangup command, e.g. ATH0, when DIAL
9556 + MODEM-HANGUP is ON, which is the default setting.)
9558 + Even when Kermit's modem-control software is configured correctly for
9559 + your computer, it can only work right if your modem is also configured
9560 + to assert the CD signal when it is connected to the remote modem and
9561 + to hang up the connection when your computer drops the DTR signal. So
9562 + before deciding Kermit doesn't work with your modem, check your modem
9563 + configuration AND the cable (if any) connecting your modem to the
9564 + computer -- it should be a straight-through modem cable conducting the
9565 + signals FG, SG, TD, RD, RTS, CTS, DSR, DTR, CD, and RI.
9567 + Many Unix systems keep aliases for dialout devices; for example,
9568 + /dev/acu might be an alias for /dev/tty00. But most of these Unix
9569 + systems also use UUCP lockfile conventions that do not take this
9570 + aliasing into account, so if one user assigns (e.g.) /dev/acu, then
9571 + another user can still assign the same device by referring to its
9572 + other name. This is not a Kermit problem -- Kermit must follow the
9573 + lockfile conventions used by the vendor-supplied software (cu, tip,
9576 + The SET FLOW-CONTROL KEEP option should be given *before* any
9577 + communication (dialing, terminal emulation, file transfer,
9578 + INPUT/OUTPUT/TRANSMIT, etc) is attempted, if you want C-Kermit to use
9579 + all of the device's preexisting flow-control related settings. The
9580 + default flow-control setting is XON/XOFF, and it will take effect when
9581 + the first communication-related command is given, and a subsequent SET
9582 + FLOW KEEP command will not necessarily know how to restore *all* of
9583 + the device's original flow-control settings.
9585 + 7.2. Network Connections
9587 + C-Kermit tries to use the 8th bit for data when parity is NONE, and
9588 + this generally works on real Unix terminal (tty) devices, but it often
9589 + does not work when the Unix system is accessed over a network via
9590 + telnet or rlogin protocols, including (in many cases) through terminal
9591 + servers. For example, an Encore computer with Annex terminal servers
9592 + only gives a 7-bit path if the rlogin protocol is selected in the
9593 + terminal server but it gives the full 8 bits if the proprietary RDP
9596 + If file transfer does not work through a host to which you have
9597 + rlogin'd, use "rlogin -8" rather than "rlogin". If that doesn't work,
9598 + tell both Kermit programs to "set parity space".
9600 + The Encore TELNET server does not allow long bursts of input. When you
9601 + have a TELNET connection to an Encore, tell C-Kermit on the Encore to
9602 + SET RECEIVE PACKET-LENGTH 200 or thereabouts.
9603 + ________________________________________________________________________
9605 + 8. HARDWARE FLOW CONTROL
9607 + [ [557]Top ] [ [558]Contents ] [ [559]Next ] [ [560]Previous ]
9609 + SET FLOW RTS/CTS is available in Unix C-Kermit only when the
9610 + underlying operating system provides an Application Program Interface
9611 + (API) for turning this feature on and off under program control, which
9612 + turns out to be a rather rare feature among Unix systems. To see if
9613 + your Unix C-Kermit version supports hardware flow control, type "set
9614 + flow ?" at the C-Kermit prompt, and look for "rts/cts" among the
9615 + options. Other common situations include:
9617 + 1. The API is available, so "set flow rts/cts" appears as a valid
9618 + C-Kermit command, but it doesn't do anything because the device
9619 + driver (part of the operating system) was never coded to do
9620 + hardware flow control. This is common among System V R4
9621 + implementations (details below).
9622 + 2. The API is not available, so "set flow rts/cts" does NOT appear as
9623 + a valid C-Kermit command, but you can still get RTS/CTS flow
9624 + control by selecting a specially named device in your SET LINE
9625 + command. Examples:
9626 + + NeXTSTEP: /dev/cufa instead of /dev/cua, /dev/cufb instead of
9627 + /dev/cub (68040 only; "man zs" for further info).
9628 + + IRIX: /dev/ttyf2 instead of /dev/ttyd2 or /dev/ttym2 ("man 7
9630 + 3. The API is available, doesn't work, but a workaround as in (2) can
9632 + 4. The API is available, but Kermit doesn't know about it. In these
9633 + cases, you can usually use an stty command to enable RTS/CTS on
9634 + the device, e.g. "stty crtscts" or "stty ctsflow", "stty rtsflow",
9635 + before starting Kermit, and then tell Kermit to SET FLOW KEEP.
9636 + 5. No API and no special device drivers. Hardware flow control is
9637 + completely unavailable.
9639 + System V R4 based Unixes are supposed to supply a <termiox.h> file,
9640 + which gives Kermit the necessary interface to command the terminal
9641 + driver to enable/disable hardware flow control. Unfortunately, but
9642 + predictably, many implementations of SVR4 whimsically place this file
9643 + in /usr/include/sys rather than /usr/include (where SVID clearly
9644 + specifies it should be; see SVID, Third Edition, V1, termiox(BA_DEV).
9645 + Thus if you build C-Kermit with any of the makefile entries that
9646 + contain -DTERMIOX or -DSTERMIOX (the latter to select
9647 + <sys/termiox.h>), C-Kermit will have "set flow rts/cts" and possibly
9648 + other hardware flow-control related commands. BUT... That does not
9649 + necessarily mean that they will work. In some cases, the underlying
9650 + functions are simply not coded into the operating system.
9652 + WARNING: When hardware flow control is available, and you enable in
9653 + Kermit on a device that is not receiving the CTS signal, Kermit can
9654 + hang waiting for CTS to come up. This is most easily seen when the
9655 + local serial port has nothing plugged in to it, or is connected to an
9656 + external modem that is powered off.
9657 + ________________________________________________________________________
9659 + 9. TERMINAL CONNECTION AND KEY MAPPING
9661 + [ [561]Top ] [ [562]Contents ] [ [563]Next ] [ [564]Previous ]
9663 + C-Kermit is not a terminal emulator. Refer to page 147 of [565]Using
9664 + C-Kermit, 2nd Edition: "Most versions of C-Kermit -- Unix, VMS,
9665 + AOS/VS, VOS, etc -- provide terminal connection without emulation.
9666 + These versions act as a 'semitransparent pipe' between the remote
9667 + computer and your terminal, terminal emulator, console driver, or
9668 + window, which in turn emulates (or is) a specific kind of terminal."
9669 + The environment in which you run C-Kermit is up to you.
9671 + If you are an X Windows user, you should be aware of an alternative to
9672 + xterm that supports VT220 emulation, from Thomas E. Dickey:
9674 + [566]http://dickey.his.com/xterm/xterm.html
9676 + Unix C-Kermit's SET KEY command currently can not be used with keys
9677 + that generate "wide" scan codes or multibyte sequences, such as
9678 + workstation function or arrow keys, because Unix C-Kermit does not
9679 + have direct access to the keyboard.
9681 + However, many Unix workstations and/or console drivers provide their
9682 + own key mapping feature. With xterm, for example, you can use
9683 + 'xmodmap' ("man xmodmap" for details); here is an xterm mapping to map
9684 + the Sun keyboard to DEC VT200 values for use with VT-terminal oriented
9685 + applications like VMS EVE:
9700 + keycode 57=KP_Decimal
9703 + keycode 30=KP_Separator
9705 + keycode 78=KP_Subtract
9710 + keycode 97=KP_Enter
9712 + Users of Linux consoles can use loadkeys ("man dumpkeys loadkeys
9713 + keytables" for details. The format used by loadkeys is compatible with
9714 + that used by Xmodmap, although it is not definitely certain that the
9715 + keycodes are compatible for different keyboard types (e.g. Sun vs HP
9717 + ________________________________________________________________________
9721 + [ [567]Top ] [ [568]Contents ] [ [569]Next ] [ [570]Previous ]
9723 + If uploads (or downloads) fail immediately, give the CAUTIOUS command
9724 + to Kermit and try again. If they still fail, then try SET PREFIXING
9725 + ALL. If they still fail, try SET PARITY SPACE. If they still fail, try
9728 + If reception (particularly of large files and/or binary files) begins
9729 + successfully but then fail constently after a certain amount of bytes
9730 + have been sent, check:
9732 + * Your ulimit ("ulimit -a")
9733 + * The amount of available space on the target disk ("df ." or "df -k
9735 + * Your personal disk quota (platform- and site-dependent)
9736 + * The maximum file size on the receiver's file system (e.g. 2GB in
9737 + old verions the Linux VFS file system, and/or in applications that
9738 + have not been recoded to use new "large file" APIs).
9739 + * If it's an NFS-mounted disk (if so, try uploading to a local disk)
9740 + * Is there an "idle limit" on the receiving end?
9742 + If none of these seem to explain it, then the problem is not size
9743 + related, but reflects some clash between the file contents and the
9744 + characteristics of the connection, in which case follow the
9745 + instructions in the first paragraph of this section.
9747 + Suppose two copies of Kermit are receiving files into the same
9748 + directory, and the files have the same name, e.g. "foo.bar". Whichever
9749 + one starts first opens an output file called "foo.bar". The second one
9750 + sees there is already a foo.bar file, and so renames the existing
9751 + foo.bar to foo.bar.~1~ (or whatever). When the first file has been
9752 + received completely, Kermit goes to change its modification time and
9753 + permissions to those given by the file sender in the Attribute packet.
9754 + But in Unix, the APIs for doing this take a filename, not a file
9755 + descriptor. Since the first Kermit's file has been renamed, and the
9756 + second Kermit is using the original name, the first Kermit changes the
9757 + modtime and permissions of the second Kermit's file, not its own.
9758 + Although there might be a way to work around this in the code, e.g.
9759 + using inode numbers to keep track of which file is which, this would
9760 + be tricky and most likely not very portable. It's better to set up
9761 + your application to prevent such things from happening, which is easy
9762 + enough using the script language, filename templates, etc.
9764 + Suppose you start C-Kermit with a command-line argument to send or
9765 + receive a file (e.g. "kermit -r") and then type Ctrl-\c immediately
9766 + afterwards to escape back and initiate the other end of the transfer,
9767 + BUT your local Kermit's escape character is not Ctrl-\. In this case,
9768 + the local Kermit passes the Ctrl-\ to the remote system, and if this
9769 + is Unix, Ctrl-\ is likely to be its SIGQUIT character, which causes
9770 + the current program to halt and dump core. Well, just about the first
9771 + thing C-Kermit does when it starts is to disable the SIGQUIT signal.
9772 + However, it is still possible for SIGQUIT to cause Kermit to quit and
9773 + dump core if it is delivered while Kermit is being loaded or started,
9774 + before the signal can be disabled. There's nothing Kermit itself can
9775 + do about this, but you can prevent it from happening by disabling
9776 + SIGQUIT in your Unix session. The command is usually something like:
9780 + Unix C-Kermit does not reject incoming files on the basis of size.
9781 + There appears to be no good (reliable, portable) way to determine in
9782 + advance how much disk space is available, either on the device, or
9783 + (when quotas or other limits are involved) to the user.
9785 + Unix C-Kermit discards all carriage returns from incoming files when
9788 + If C-Kermit has problems creating files in writable directories when
9789 + it is installed setuid or setgid on BSD-based versions of Unix such as
9790 + NeXTSTEP 3.0, it probably needs to be rebuilt with the -DSW_ACC_ID
9791 + compilation switch.
9793 + If you SET FILE DISPLAY FULLSCREEN, and C-Kermit complains "Sorry,
9794 + terminal type not supported", it means that the terminal library
9795 + (termcap or termlib) that C-Kermit was built with does not know about
9796 + a terminal whose name is the current value of your TERM environment
9797 + variable. If this happens, but you want to have the fullscreen file
9798 + transfer display, EXIT from C-Kermit and set a Unix terminal type from
9799 + among the supported values that is also supported by your terminal
9800 + emulator, or else have an entry for your terminal type added to the
9801 + system termcap and/or terminfo database.
9803 + If you attempt to suspend C-Kermit during local-mode file transfer and
9804 + then continue it in the background (via bg), it will block for "tty
9805 + output" if you are using the FULLSCREEN file transfer display. This is
9806 + apparently a problem with curses. Moving a local-mode file transfer
9807 + back and forth between foreground and background works correctly,
9808 + however, with the SERIAL, CRT, BRIEF, or NONE file transfer displays.
9810 + If C-Kermit's command parser no longer echoes, or otherwise acts
9811 + strangely, after returning from a file transfer with the fullscreen
9812 + (curses) display, and the curses library for your version of Unix
9813 + includes the newterm() function, then try rebuilding your version of
9814 + C-Kermit with -DCK_NEWTERM. Similarly if it echoes doubly, which might
9815 + even happen during a subsequent CONNECT session. If rebuilding with
9816 + -DCK_NEWTERM doesn't fix it, then there is something very strange
9817 + about your system's curses library, and you should probably not use
9818 + it. Tell C-Kermit to SET FILE DISPLAY CRT, BRIEF, or anything else
9819 + other than FULLSCREEN, and/or rebuild without -DCK_CURSES, and without
9820 + linking with (termlib and) curses. Note: This problem seemed to have
9821 + escalated in C-Kermit 7.0, and -DCK_NEWTERM had to be added to many
9822 + builds that previously worked without it: Linux, AIX 4.1, DG/UX, etc.
9823 + In the Linux case, it is obviously because of changes in the (n)curses
9824 + library; the cause in the other cases is not known.
9826 + C-Kermit creates backup-file names (such as "oofa.txt.~1~") based on
9827 + its knowledge of the maximum filename length on the platform where it
9828 + is running, which is learned at compile time, based on MAXNAMLEN or
9829 + equivalent symbols from the system header files. But suppose C-Kermit
9830 + is receiving files on a Unix platform that supports long filenames,
9831 + but the incoming files are being stored on an NFS-mounted file system
9832 + that supports only short names. NFS maps the external system to the
9833 + local APIs, so C-Kermit has no way of knowing that long names will be
9834 + truncated. Or that C-Kermit is running on a version of Unix that
9835 + supports both long-name and short-name file systems simultaneously
9836 + (such as HP-UX 7.00). This can cause unexpected behavior when creating
9837 + backup files, or worse. For example, you are sending a group of files
9838 + whose names are differentiated only by characters past the point at
9839 + which they would be truncated, each file will overwrite the previous
9841 + ________________________________________________________________________
9843 + 11. EXTERNAL FILE TRANSFER PROTOCOLS
9845 + [ [571]Top ] [ [572]Contents ] [ [573]Next ] [ [574]Previous ]
9849 + 11.1. [575]C-Kermit as an External Protocol
9850 + 11.2. [576]Invoking External Protocols from C-Kermit
9852 + Unix C-Kermit can be used in conjunction with other communications
9853 + software in various ways. C-Kermit can be invoked from another
9854 + communications program as an "external protocol", and C-Kermit can
9855 + also invoke other communication software to perform external
9858 + This sort of operation makes sense only when you are dialing out from
9859 + your Unix system (or making a network connection from it). If the Unix
9860 + system is the one you have dialed in to, you don't need any of these
9861 + tricks. Just run the desired software on your Unix system instead of
9862 + Kermit. When dialing out from a Unix system, the difficulty is getting
9863 + two programs to share the same communication device in spite of the
9864 + Unix UUCP lockfile mechanism, which would normally prevent any
9865 + sharing, and preventing the external protocol from closing (and
9866 + therefore hanging up) the device when it exits back to the program
9869 + 11.1. C-KERMIT AS AN EXTERNAL PROTOCOL
9871 + [ [577]Top ] [ [578]Contents ] [ [579]Section Contents ] [ [580]Next ]
9873 + (This section deleted; see [581]Using C-Kermit, 2nd Ed, Chapter 14.)
9875 + "pcomm" is a general-purpose terminal program that provides file
9876 + transfer capabilities itself (X- and YMODEM variations) and the
9877 + ability to call on external programs to do file transfers (ZMODEM and
9878 + Kermit, for example). You can tell pcomm the command to send or
9879 + receive a file with an external protocol:
9881 + ZMODEM sz filename rz
9882 + Kermit kermit -s filename kermit -r
9884 + pcomm runs external programs for file transfer by making stdin and
9885 + stdout point to the modem port, and then exec-ing "/bin/sh -c xxx"
9886 + (where xxx is the appropriate command). However, C-Kermit does not
9887 + treat stdin and stdout as the communication device unless you instruct
9892 + Kermit kermit -l 0 -s filename kermit -l 0 -r
9894 + The "-l 0" option means to use file descriptor 0 for the communication
9897 + In general, any program can pass any open file descriptor to C-Kermit
9898 + for the communication device in the "-l" command-line option. When
9899 + Kermit is given a number as the argument to the "-l" option, it simply
9900 + uses it as a file descriptor, and it does not attempt to close it upon
9903 + Here's another example, for Seyon (a Linux communication program).
9904 + First try the technique above. If that works, fine; otherwise... If
9905 + Seyon does not give you a way to access and pass along the file
9906 + descriptor, but it starts up the Kermit program with its standard i/o
9907 + redirected to its (Seyon's) communications file descriptor, you can
9908 + also experiment with the following method, which worked here in brief
9909 + tests on SunOS. Instead of having Seyon use "kermit -r" or "kermit -s
9910 + filename" as its Kermit protocol commands, use something like this
9911 + (examples assume C-Kermit 6.0):
9913 + For serial connections:
9915 + kermit -YqQl 0 -r <-- to receive
9916 + kermit -YqQl 0 -s filename(s) <-- to send one or more files
9918 + For Telnet connections:
9920 + kermit -YqQF 0 -r <-- to receive
9921 + kermit -YqQF 0 -s filename(s) <-- to send one or more files
9923 + Command line options:
9925 + Y - skip executing the init file
9926 + Q - use fast file transfer settings (default in 8.0)
9927 + l 0 - transfer files using file descriptor 0 for a serial connection
9928 + F 0 - transfer files using file descriptor 0 for a Telnet connection
9929 + q - quiet - no messages
9933 + 11.2. INVOKING EXTERNAL PROTOCOLS FROM C-KERMIT
9935 + [ [582]Top ] [ [583]Contents ] [ [584]Section Contents ] [
9938 + (This section is obsolete, but not totally useless. See Chapter 14
9939 + of [586]Using C-Kermit, 2nd Edition).
9941 + After you have opened a communication link with C-Kermit's SET LINE
9942 + (SET PORT) or SET HOST (TELNET) command, C-Kermit makes its file
9943 + descriptor available to you in the \v(ttyfd) variable so you can pass
9944 + it along to other programs that you RUN from C-Kermit. Here, for
9945 + example, C-Kermit runs itself as an external protocol:
9947 + C-Kermit>set modem type hayes
9948 + C-Kermit>set line /dev/acu
9949 + C-Kermit>set speed 2400
9950 + C-Kermit>dial 7654321
9952 + C-Kermit>echo \v(ttyfd)
9954 + C-Kermit>run kermit -l \v(ttyfd)
9956 + Other programs that accept open file descriptors on the command line
9957 + can be started in the same way.
9959 + You can also use your shell's i/o redirection facilities to assign
9960 + C-Kermit's open file descriptor (ttyfd) to stdin or stdout. For
9961 + example, old versions of the Unix ZMODEM programs, sz and rz, when
9962 + invoked as external protocols, expect to find the communication device
9963 + assigned to stdin and stdout with no option for specifying any other
9964 + file descriptor on the sz or rz command line. However, you can still
9965 + invoke sz and rz as exterior protocols from C-Kermit if your current
9966 + shell ($SHELL variable) is ksh (the Korn shell) or bash (the
9967 + Bourne-Again shell), which allows assignment of arbitrary file
9968 + descriptors to stdin and stdout:
9970 + C-Kermit> run rz <&\v(ttyfd) >&\v(ttyfd)
9974 + C-Kermit> run sz oofa.zip <&\v(ttyfd) >&\v(ttyfd)
9976 + In version 5A(190) and later, you can use C-Kermit's REDIRECT command,
9977 + if it is available in your version of C-Kermit, to accomplish the same
9978 + thing without going through the shell:
9980 + C-Kermit> redirect rz
9984 + C-Kermit> redirect sz oofa.zip
9986 + A complete set of rz,sz,rb,sb,rx,sx macros for Unix C-Kermit is
9987 + defined in the file ckurzsz.ini. It automatically chooses the best
9988 + redirection method (but is redundant since C-Kermit 6.0, which now has
9989 + built-in support for external protocols via its SET PROTOCOL command).
9991 + Note that external protocols can be used on C-Kermit SET LINE or SET
9992 + HOST connections only if they operate through standard input and
9993 + standard output. If they open their own connections, Kermit can't
9994 + redirect them over its own connection.
9995 + ________________________________________________________________________
9999 + [ [587]Top ] [ [588]Contents ] [ [589]Next ] [ [590]Previous ]
10001 + As of version 7.0, C-Kermit supports a wide range of security options
10002 + for authentication and encryption: Kerberos 4, Kerberos 5 / GSSAPI,
10003 + SSL/TLS, and SRP. See the separate [591]security document for details.
10004 + ________________________________________________________________________
10006 + 13. MISCELLANEOUS USER REPORTS
10008 + [ [592]Top ] [ [593]Contents ] [ [594]Next ] [ [595]Previous ]
10010 +Date: Thu, 12 Mar 92 1:59:25 MEZ
10011 +From: Walter Mecky <walter@rent-a-guru.de>
10012 +Subject: Help.Unix.sw
10013 +To: svr4@pcsbst.pcs.com, source@usl.com
10016 +RELEASE: Dell SVR4 V2.1 (is USL V3.0)
10018 +PATHNAME: /usr/lib/libc.so.1
10019 + /usr/ccs/lib/libc.a
10020 +ABSTRACT: Function ttyname() does not close its file descriptor
10022 + ttyname(3C) opens /dev but never closes it. So if it is called
10023 + often enough the open(2) in ttyname() fails. Because the broken
10024 + ttyname() is in the shared lib too all programs using it can
10025 + fail if they call it often enough. One important program is
10026 + uucico which calls ttyname for every file it transfers.
10028 + Here is a little test program if your system has the bug:
10030 +#include <stdlib.h>
10031 +#include <stdio.h>
10034 + while (ttyname(0) != NULL)
10036 + perror("ttyname");
10037 + printf("i=%d\n", i);
10040 + If this program runs longer than some seconds you don't have the bug.
10042 + WORKAROUND: None FIX: Very easy if you have source code.
10044 + Another user reports some more explicit symptoms and recoveries:
10046 +> What happens is when invoking ckermit we get one of the following
10048 +> You must set line
10050 +> No more processes.
10051 +> One of the following three actions clears the peoblem:
10052 +> shutdown -y -g0 -i6
10053 +> kill -9 the ttymon with the highest PID
10054 +> Invoke sysadm and disable then enable the line you want to use.
10055 +> Turning off respawn of sac -t 300 and going to getty's and uugetty's
10058 +> Also C-Kermit reports "?timed out closing /dev/ttyxx".
10059 +> If this happens all is well.
10061 +------------------------------
10063 + (Note: the following problem also occurs on SGI and probably many
10064 + other Unix systems):
10066 + From: James Spath <spath@jhunix.hcf.jhu.edu>
10067 + To: Info-Kermit-Request@cunixf.cc.columbia.edu
10068 + Date: Wed, 9 Sep 1992 20:20:28 -0400
10069 + Subject: C-Kermit vs uugetty (or init) on Sperry 5000
10071 + We have successfully compiled the above release on a Unisys/Sperry
10072 + 5000/95. We used the sys5r3 option, rather than sys5r2 since we have
10073 + VR3 running on our system. In order to allow dialout access to
10074 + non-superusers, we had to do "chmod 666 /dev/tty###, where it had been
10075 + -rw--w--w- (owned by uucp), and to do "chmod +w /usr/spool/locks". We
10076 + have done text and binary file transfers through local and remote
10079 + The problem concerning uucp ownership and permissions is worse than I
10080 + thought at first. Apparently init or uugetty changes the file
10081 + permissions after each session. So I wrote the following C program to
10082 + open a set of requested tty lines. I run this for any required
10083 + outgoing line prior to a Kermit session.
10085 + ------ cut here -------
10086 +/* opentty.c -- force allow read on tty lines for modem i/o */
10087 +/* idea from: restrict.c -- System 5 Admin book Thomas/Farrow p. 605 */
10088 +/* /jes jim spath {spath@jhunix.hcj.jhu.edu } */
10089 +/* 08-Sep-92 NO COPYRIGHT. */
10090 +/* this must be suid to open other tty lines */
10092 +/* #define DEBUG */
10093 +#define TTY "/dev/tty"
10094 +#define LOK "/usr/spool/locks/LCK..tty"
10095 +#include <stdio.h>
10097 +/* allowable lines: */
10098 +#define TOTAL_LINES 3
10099 +static char allowable[TOTAL_LINES][4] = { "200", "201", "300" };
10100 +static int total=TOTAL_LINES;
10104 +#define TTY_UNDEF 0
10105 +#define TTY_LOCK 1
10106 +#define TTY_OKAY 2
10109 +int argc; char *argv[]; {
10110 + char device[512];
10111 + char lockdev[512];
10114 + fprintf(stderr, "usage: open 200 [...]\n");
10116 + while (--argc > 0 && (*++argv) != NULL ) {
10118 + fprintf(stderr, "TRYING: %s%s\n", TTY, *argv);
10120 + sprintf(device, "%s%s", TTY, *argv);
10121 + sprintf(lockdev, "%s%s", LOK, *argv);
10122 + allow = TTY_UNDEF; i = 0;
10123 + while (i <= total) { /* look at all defined lines */
10125 + fprintf(stderr, "LOCKFILE? %s?\n", lockdev);
10127 + if (access(lockdev, 00) == 0) {
10132 + fprintf(stderr, "DOES:%s==%s?\n", allowable[i], *argv);
10134 + if (strcmp(allowable[i], *argv) == 0)
10139 + fprintf(stderr, "allow=%d\n", allow);
10143 + fprintf (stderr, "open: not allowed on %s\n", *argv);
10146 + fprintf (stderr, "open: device locked: %s\n", lockdev);
10149 + /* attempt to change mode on device */
10150 + if (chmod (device, 00666) < 0)
10151 + fprintf (stderr, "open: cannot chmod on %s\n", device);
10154 + fprintf (stderr, "open: FAULT\n");
10159 + ________________________________________________________________________
10161 + 14. THIRD-PARTY DRIVERS
10163 + [ [596]Top ] [ [597]Contents ] [ [598]Next ] [ [599]Previous ]
10165 + Unix versions, especially those for PCs (SCO, Unixware, etc) might be
10166 + augmented by third-party communication-board drivers from Digiboard,
10167 + Stallion, etc. These can sometimes complicate matters for Kermit
10168 + considerably since Kermit has no way of knowing that it is going
10169 + through a possibly nonstandard driver. Various examples are listed in
10170 + the earlier sections of this document; search for Stallion, Digiboard,
10171 + etc. Additionally:
10173 + * The Stallion Technologies EasyConnection serial board driver does
10174 + not always report the state of DSR as low. From Stallion (October
10175 + 1997): "Unfortunately, this is a bug in our driver. We have
10176 + implemented all of the other TIOMC functions, eg DTR, DCD, RTS and
10177 + CTS, but not DSR. Our driver should report the actual state of DSR
10178 + on those of our cards that have a DSR signal. That the driver
10179 + always reports DSR as not asserted (0), is a bug in the driver.
10180 + The driver should be either reporting the state of DSR correctly
10181 + on those cards that support DSR or as always asserted (1) on those
10182 + cards that do not have a DSR signal. This will be fixed in a
10183 + future version of our drivers; at this time I cannot say when this
10184 + will be." And later, "As far as I can tell, we don't support the
10185 + termios/termiox ioctls that relate specifically to DSR and RI; all
10186 + the rest are supported. This will, as I mentioned earlier, be
10187 + fixed in the next release of our ATA software."
10188 + - World Wide Escalation Support, Stallion Technologies, Toowong
10189 + QLD, [600]support@stallion.oz.au.
10191 + Later (December 1997, from the same source):
10193 + * We have now released a new version of the ATA software, version
10194 + 5.4.0. This version fixes the problem with the states of the DSR
10195 + and RI signals and how they were being reported by the driver.
10196 + This is the problem that you reported in October. The DSR signal
10197 + is reported correctly on those cards that support the DSR signal,
10198 + such as the early revision of the EasyIO card and the
10199 + EasyConnection 8D4 panel, and as always asserted on those cards
10200 + that do not support the DSR signal in the hardware. The new driver
10201 + is available from our Web site, [601]www.stallion.com, in the
10202 + /drivers/ata5/UnixWare directory.
10204 + [ [602]Top ] [ [603]Contents ] [ [604]C-Kermit Home ] [ [605]C-Kermit
10205 + 8.0 Overview ] [ [606]Kermit Home ]
10206 + _________________________________________________________________
10208 + C-Kermit 8.0 Unix Hints and Tips / [607]The Kermit Project /
10209 + [608]Columbia University / [609]kermit@columbia.edu
10213 + 1. http://www.columbia.edu/kermit/
10214 + 2. http://www.columbia.edu/
10215 + 3. http://www.columbia.edu/kermit/ckubwr.html
10216 + 4. mailto:kermit-support@columbia.edu
10217 + 5. http://www.columbia.edu/kermit/ckermit.html
10218 + 6. http://www.columbia.edu/kermit/ckuins.html
10219 + 7. http://www.columbia.edu/kermit/ckututor.html
10220 + 8. http://www.columbia.edu/kermit/ckubwr.html#x1
10221 + 9. http://www.columbia.edu/kermit/ckubwr.html#x2
10222 + 10. http://www.columbia.edu/kermit/ckubwr.html#x3
10223 + 11. http://www.columbia.edu/kermit/ckubwr.html#x4
10224 + 12. http://www.columbia.edu/kermit/ckubwr.html#x5
10225 + 13. http://www.columbia.edu/kermit/ckubwr.html#x6
10226 + 14. http://www.columbia.edu/kermit/ckubwr.html#x7
10227 + 15. http://www.columbia.edu/kermit/ckubwr.html#x8
10228 + 16. http://www.columbia.edu/kermit/ckubwr.html#x9
10229 + 17. http://www.columbia.edu/kermit/ckubwr.html#x10
10230 + 18. http://www.columbia.edu/kermit/ckubwr.html#x11
10231 + 19. http://www.columbia.edu/kermit/ckubwr.html#x12
10232 + 20. http://www.columbia.edu/kermit/ckubwr.html#x13
10233 + 21. http://www.columbia.edu/kermit/ckubwr.html#x14
10234 + 22. http://www.columbia.edu/kermit/ckubwr.html#x3.3
10235 + 23. http://www.columbia.edu/kermit/ckubwr.html#x3.18
10236 + 24. http://www.columbia.edu/kermit/ckubwr.html#x3.19
10237 + 25. http://www.columbia.edu/kermit/ckubwr.html#x3.1
10238 + 26. http://www.columbia.edu/kermit/ckubwr.html#x3.2
10239 + 27. http://www.columbia.edu/kermit/ckubwr.html#x3.7
10240 + 28. http://www.columbia.edu/kermit/ckubwr.html#x3.6
10241 + 29. http://www.columbia.edu/kermit/ckubwr.html#x3.13
10242 + 30. http://www.columbia.edu/kermit/ckubwr.html#top
10243 + 31. http://www.columbia.edu/kermit/ckubwr.html#contents
10244 + 32. http://www.columbia.edu/kermit/ckubwr.html#x2
10245 + 33. http://www.columbia.edu/kermit/ckubwr.html#x1.1
10246 + 34. http://www.columbia.edu/kermit/ckubwr.html#x1.2
10247 + 35. http://www.columbia.edu/kermit/ckubwr.html#x1.3
10248 + 36. http://www.columbia.edu/kermit/ckubwr.html#x1.4
10249 + 37. http://www.columbia.edu/kermit/ckubwr.html#x3.3
10250 + 38. http://www.columbia.edu/kermit/ckubwr.html#x3.1
10251 + 39. http://www.columbia.edu/kermit/ckubwr.html#x3.2
10252 + 40. http://www.columbia.edu/kermit/ckubwr.html#x3.7
10253 + 41. http://www.columbia.edu/kermit/ckcbwr.html
10254 + 42. mailto:kermit-support@columbia.edu
10255 + 43. http://www.columbia.edu/kermit/ckubwr.html#top
10256 + 44. http://www.columbia.edu/kermit/ckubwr.html#contents
10257 + 45. http://www.columbia.edu/kermit/ckubwr.html#x1.2
10258 + 46. http://www.columbia.edu/kermit/ck60manual.html
10259 + 47. http://www.columbia.edu/kermit/ckermit70.html
10260 + 48. http://www.columbia.edu/kermit/ckermit80.html
10261 + 49. http://www.columbia.edu/kermit/ckubwr.html#top
10262 + 50. http://www.columbia.edu/kermit/ckubwr.html#contents
10263 + 51. http://www.columbia.edu/kermit/ckubwr.html#x1
10264 + 52. http://www.columbia.edu/kermit/ckubwr.html#x1.3
10265 + 53. http://www.columbia.edu/kermit/ckubwr.html#x1.1
10266 + 54. http://www.columbia.edu/kermit/support.html
10267 + 55. http://www.columbia.edu/kermit/ckubwr.html#top
10268 + 56. http://www.columbia.edu/kermit/ckubwr.html#contents
10269 + 57. http://www.columbia.edu/kermit/ckubwr.html#x1
10270 + 58. http://www.columbia.edu/kermit/ckubwr.html#x1.4
10271 + 59. http://www.columbia.edu/kermit/ckubwr.html#x1.2
10272 + 60. http://www.columbia.edu/kermit/ckubwr.html#top
10273 + 61. http://www.columbia.edu/kermit/ckubwr.html#contents
10274 + 62. http://www.columbia.edu/kermit/ckubwr.html#x1
10275 + 63. http://www.columbia.edu/kermit/ckubwr.html#x1.3
10276 + 64. http://www.columbia.edu/kermit/ckubwr.html#top
10277 + 65. http://www.columbia.edu/kermit/ckubwr.html#contents
10278 + 66. http://www.columbia.edu/kermit/ckubwr.html#x3
10279 + 67. http://www.columbia.edu/kermit/ckubwr.html#x1
10280 + 68. http://www.columbia.edu/kermit/ckubwr.html#top
10281 + 69. http://www.columbia.edu/kermit/ckubwr.html#contents
10282 + 70. http://www.columbia.edu/kermit/ckubwr.html#x4
10283 + 71. http://www.columbia.edu/kermit/ckubwr.html#x2
10284 + 72. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10285 + 73. http://www.columbia.edu/kermit/ckubwr.html#x3.1
10286 + 74. http://www.columbia.edu/kermit/ckubwr.html#x3.2
10287 + 75. http://www.columbia.edu/kermit/ckubwr.html#x3.3
10288 + 76. http://www.columbia.edu/kermit/ckubwr.html#x3.4
10289 + 77. http://www.columbia.edu/kermit/ckubwr.html#x3.5
10290 + 78. http://www.columbia.edu/kermit/ckubwr.html#x3.6
10291 + 79. http://www.columbia.edu/kermit/ckubwr.html#x3.7
10292 + 80. http://www.columbia.edu/kermit/ckubwr.html#x3.8
10293 + 81. http://www.columbia.edu/kermit/ckubwr.html#x3.9
10294 + 82. http://www.columbia.edu/kermit/ckubwr.html#x3.10
10295 + 83. http://www.columbia.edu/kermit/ckubwr.html#x3.11
10296 + 84. http://www.columbia.edu/kermit/ckubwr.html#x3.12
10297 + 85. http://www.columbia.edu/kermit/ckubwr.html#x3.13
10298 + 86. http://www.columbia.edu/kermit/ckubwr.html#x3.14
10299 + 87. http://www.columbia.edu/kermit/ckubwr.html#x3.15
10300 + 88. http://www.columbia.edu/kermit/ckubwr.html#x3.16
10301 + 89. http://www.columbia.edu/kermit/ckubwr.html#x3.17
10302 + 90. http://www.columbia.edu/kermit/ckubwr.html#x3.18
10303 + 91. http://www.columbia.edu/kermit/ckubwr.html#x3.19
10304 + 92. http://www.columbia.edu/kermit/ckubwr.html#x3.20
10305 + 93. http://www.faqs.org/
10306 + 94. http://aplawrence.com/Unixart/newtounix.html
10307 + 95. http://www.columbia.edu/kermit/x3
10308 + 96. mailto:kermit-support@columbia.edu
10309 + 97. http://www.columbia.edu/kermit/support.html
10310 + 98. http://www.columbia.edu/kermit/ckubwr.html#top
10311 + 99. http://www.columbia.edu/kermit/ckubwr.html#contents
10312 + 100. http://www.columbia.edu/kermit/ckubwr.html#x3
10313 + 101. http://www.columbia.edu/kermit/ckubwr.html#x3.1
10314 + 102. http://www.pcunix.com/
10315 + 103. http://www.columbia.edu/kermit/ckubwr.html#x3.0.1
10316 + 104. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2
10317 + 105. http://www.columbia.edu/kermit/ckubwr.html#x3.0.3
10318 + 106. http://www.columbia.edu/kermit/ckubwr.html#x3.0.4
10319 + 107. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5
10320 + 108. http://www.columbia.edu/kermit/ckubwr.html#x3.0.6
10321 + 109. http://www.columbia.edu/kermit/ckubwr.html#top
10322 + 110. http://www.columbia.edu/kermit/ckubwr.html#contents
10323 + 111. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10324 + 112. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2
10325 + 113. http://www.columbia.edu/kermit/ckubwr.html#top
10326 + 114. http://www.columbia.edu/kermit/ckubwr.html#contents
10327 + 115. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10328 + 116. http://www.columbia.edu/kermit/ckubwr.html#x3.0.3
10329 + 117. http://www.columbia.edu/kermit/ckubwr.html#x3.0.1
10330 + 118. http://www.linmodems.org/
10331 + 119. http://www.microsoft.com/hwdev/platform/PCdesign/LR/default.asp
10332 + 120. http://www.columbia.edu/kermit/ckubwr.html#top
10333 + 121. http://www.columbia.edu/kermit/ckubwr.html#contents
10334 + 122. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10335 + 123. http://www.columbia.edu/kermit/ckubwr.html#x3.0.4
10336 + 124. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2
10337 + 125. http://www.idir.net/~gromitkc/winmodem.html
10338 + 126. http://www.digi.com/
10339 + 127. http://www.columbia.edu/kermit/ckubwr.html#top
10340 + 128. http://www.columbia.edu/kermit/ckubwr.html#contents
10341 + 129. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10342 + 130. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5
10343 + 131. http://www.columbia.edu/kermit/ckubwr.html#x3.0.3
10344 + 132. http://www.columbia.edu/kermit/ckubwr.html#top
10345 + 133. http://www.columbia.edu/kermit/ckubwr.html#contents
10346 + 134. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10347 + 135. http://www.columbia.edu/kermit/ckubwr.html#x3.0.6
10348 + 136. http://www.columbia.edu/kermit/ckubwr.html#x3.0.4
10349 + 137. http://www.columbia.edu/kermit/ckubwr.html#top
10350 + 138. http://www.columbia.edu/kermit/ckubwr.html#contents
10351 + 139. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10352 + 140. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5
10353 + 141. http://www.columbia.edu/kermit/ckubwr.html#top
10354 + 142. http://www.columbia.edu/kermit/ckubwr.html#contents
10355 + 143. http://www.columbia.edu/kermit/ckubwr.html#x3
10356 + 144. http://www.columbia.edu/kermit/ckubwr.html#x3.2
10357 + 145. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10358 + 146. http://www.columbia.edu/kermit/ckubwr.html#x3.1.1
10359 + 147. http://www.columbia.edu/kermit/ckubwr.html#x3.1.2
10360 + 148. http://www.columbia.edu/kermit/ckubwr.html#x3.1.3
10361 + 149. http://www.columbia.edu/kermit/ckubwr.html#x3.1.4
10362 + 150. http://www.columbia.edu/kermit/ckubwr.html#x3.1.5
10363 + 151. http://www.emerson.emory.edu/services/aix-faq/
10364 + 152. http://www.faqs.org/faqs/by-newsgroup/comp/comp.unix.aix.html
10365 + 153. http://www.cis.ohio-state.edu/hypertext/faq/usenet/aix-faq/top.html
10366 + 154. http://aixpdslib.seas.ucla.edu/
10367 + 155. http://www.rootvg.net (AIX history)/
10368 + 156. ftp://rtfm.mit.edu/pub/usenet/news.answers/aix-faq/part1
10369 + 157. ftp://mirrors.aol.com/pub/rtfm/usenet-by-hierarchy/comp/unix/aix
10370 + 158. news:comp.unix.aix
10371 + 159. http://www.columbia.edu/kermit/ckubwr.html#top
10372 + 160. http://www.columbia.edu/kermit/ckubwr.html#contents
10373 + 161. http://www.columbia.edu/kermit/ckubwr.html#x3.1
10374 + 162. http://www.columbia.edu/kermit/ckubwr.html#x3.1.2
10375 + 163. http://www.columbia.edu/kermit/ckubwr.html#top
10376 + 164. http://www.columbia.edu/kermit/ckubwr.html#contents
10377 + 165. http://www.columbia.edu/kermit/ckubwr.html#x3.1
10378 + 166. http://www.columbia.edu/kermit/ckubwr.html#x3.1.3
10379 + 167. http://www.columbia.edu/kermit/ckubwr.html#x3.1.1
10380 + 168. http://www.columbia.edu/kermit/security.html#servers
10381 + 169. http://www.columbia.edu/kermit/ckubwr.html#top
10382 + 170. http://www.columbia.edu/kermit/ckubwr.html#contents
10383 + 171. http://www.columbia.edu/kermit/ckubwr.html#x3.1
10384 + 172. http://www.columbia.edu/kermit/ckubwr.html#x3.1.4
10385 + 173. http://www.columbia.edu/kermit/ckubwr.html#x3.1.2
10386 + 174. http://service.software.ibm.com/rs6000/
10387 + 175. http://www.columbia.edu/kermit/ckubwr.html#top
10388 + 176. http://www.columbia.edu/kermit/ckubwr.html#contents
10389 + 177. http://www.columbia.edu/kermit/ckubwr.html#x3.1
10390 + 178. http://www.columbia.edu/kermit/ckubwr.html#x3.1.5
10391 + 179. http://www.columbia.edu/kermit/ckubwr.html#x3.1.3
10392 + 180. http://www.columbia.edu/kermit/ckubwr.html#top
10393 + 181. http://www.columbia.edu/kermit/ckubwr.html#contents
10394 + 182. http://www.columbia.edu/kermit/ckubwr.html#x3.1
10395 + 183. http://www.columbia.edu/kermit/ckubwr.html#x3.1.4
10396 + 184. http://www.columbia.edu/kermit/ckubwr.html#top
10397 + 185. http://www.columbia.edu/kermit/ckubwr.html#contents
10398 + 186. http://www.columbia.edu/kermit/ckubwr.html#x3
10399 + 187. http://www.columbia.edu/kermit/ckubwr.html#x3.3
10400 + 188. http://www.columbia.edu/kermit/ckubwr.html#x3.1
10401 + 189. http://www.columbia.edu/kermit/ckubwr.html#x3.2.0
10402 + 190. http://www.columbia.edu/kermit/ckubwr.html#x3.2.1
10403 + 191. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2
10404 + 192. http://www.columbia.edu/kermit/ckubwr.html#x3.2.3
10405 + 193. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4
10406 + 194. http://www.columbia.edu/kermit/ckubwr.html#x3.2.5
10407 + 195. news:comp.sys.hp.hpux
10408 + 196. http://www.columbia.edu/kermit/ckubwr.html#top
10409 + 197. http://www.columbia.edu/kermit/ckubwr.html#contents
10410 + 198. http://www.columbia.edu/kermit/ckubwr.html#x3.2
10411 + 199. http://www.columbia.edu/kermit/ckubwr.html#x3.2.1
10412 + 200. http://www.columbia.edu/kermit/ckubwr.html#top
10413 + 201. http://www.columbia.edu/kermit/ckubwr.html#contents
10414 + 202. http://www.columbia.edu/kermit/ckubwr.html#x3.2
10415 + 203. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2
10416 + 204. http://www.columbia.edu/kermit/ckubwr.html#x3.2.0
10417 + 205. ftp://kermit.columbia.edu/kermit/f/makefile
10418 + 206. http://www.columbia.edu/kermit/ckubwr.html#top
10419 + 207. http://www.columbia.edu/kermit/ckubwr.html#contents
10420 + 208. http://www.columbia.edu/kermit/ckubwr.html#x3.2
10421 + 209. http://www.columbia.edu/kermit/ckubwr.html#x3.2.3
10422 + 210. http://www.columbia.edu/kermit/ckubwr.html#x3.2.1
10423 + 211. http://www.columbia.edu/kermit/ckubwr.html#top
10424 + 212. http://www.columbia.edu/kermit/ckubwr.html#contents
10425 + 213. http://www.columbia.edu/kermit/ckubwr.html#x3.2
10426 + 214. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4
10427 + 215. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2
10428 + 216. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.1
10429 + 217. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.2
10430 + 218. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.3
10431 + 219. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.4
10432 + 220. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.5
10433 + 221. http://www.columbia.edu/kermit/ckubwr.html#top
10434 + 222. http://www.columbia.edu/kermit/ckubwr.html#contents
10435 + 223. http://www.columbia.edu/kermit/ckubwr.html#x3.2
10436 + 224. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.2
10437 + 225. http://www.columbia.edu/kermit/ckubwr.html#x3.2.2
10438 + 226. http://www.columbia.edu/kermit/ckubwr.html#top
10439 + 227. http://www.columbia.edu/kermit/ckubwr.html#contents
10440 + 228. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4
10441 + 229. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.3
10442 + 230. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.1
10443 + 231. http://www.columbia.edu/kermit/ckubwr.html#top
10444 + 232. http://www.columbia.edu/kermit/ckubwr.html#contents
10445 + 233. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4
10446 + 234. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.4
10447 + 235. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.2
10448 + 236. http://www.columbia.edu/kermit/ckubwr.html#top
10449 + 237. http://www.columbia.edu/kermit/ckubwr.html#contents
10450 + 238. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4
10451 + 239. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.5
10452 + 240. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.3
10453 + 241. http://www.columbia.edu/kermit/ckubwr.html#top
10454 + 242. http://www.columbia.edu/kermit/ckubwr.html#contents
10455 + 243. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4
10456 + 244. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4.4
10457 + 245. http://www.columbia.edu/kermit/ckubwr.html#top
10458 + 246. http://www.columbia.edu/kermit/ckubwr.html#contents
10459 + 247. http://www.columbia.edu/kermit/ckubwr.html#x3.2
10460 + 248. http://www.columbia.edu/kermit/ckubwr.html#x3.2.4
10461 + 249. http://www.columbia.edu/kermit/ckubwr.html#top
10462 + 250. http://www.columbia.edu/kermit/ckubwr.html#contents
10463 + 251. http://www.columbia.edu/kermit/ckubwr.html#x3
10464 + 252. http://www.columbia.edu/kermit/ckubwr.html#x3.4
10465 + 253. http://www.columbia.edu/kermit/ckubwr.html#x3.2
10466 + 254. http://www.columbia.edu/kermit/ckubwr.html#x3.3.1
10467 + 255. http://www.columbia.edu/kermit/ckubwr.html#x3.3.2
10468 + 256. http://www.columbia.edu/kermit/ckubwr.html#x3.3.3
10469 + 257. http://www.columbia.edu/kermit/ckubwr.html#x3.3.4
10470 + 258. http://www.columbia.edu/kermit/ckubwr.html#x3.3.5
10471 + 259. http://www.columbia.edu/kermit/ckubwr.html#x3.3.6
10472 + 260. news:comp.os.linux.misc
10473 + 261. news:comp.os.linux.answers
10474 + 262. http://www.tldp.org/
10475 + 263. http://www.tldp.org/FAQ/Linux-FAQ.html
10476 + 264. http://www.tldp.org/HOWTO/Serial-HOWTO.html
10477 + 265. http://tldp.org/HOWTO/Modem-HOWTO.html
10478 + 266. ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO
10479 + 267. ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO
10480 + 268. http://www.tldp.org/HOWTO/
10481 + 269. http://www.tldp.org/hmirrors.html
10482 + 270. http://www.redhat.com/apps/support/
10483 + 271. http://www.debian.org/support
10484 + 272. http://www.slackware.com/support/
10485 + 273. http://www.caldera.com/support/
10486 + 274. http://www.suse.com/support/
10487 + 275. http://www.mandrake.com/support/
10488 + 276. http://www.turbolinux.com/support/
10489 + 277. http://www.linmodems.org/
10490 + 278. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10491 + 279. http://linux.dreamtime.org/decnet/
10492 + 280. mailto:kermit-support@columbia.edu
10493 + 281. http://www.linmodems.org/
10494 + 282. http://www.columbia.edu/kermit/ckubwr.html#x3.0.2
10495 + 283. http://www.columbia.edu/kermit/security.html#servers
10496 + 284. http://www.columbia.edu/kermit/sshclient.html
10497 + 285. http://www.columbia.edu/kermit/ckubwr.html#top
10498 + 286. http://www.columbia.edu/kermit/ckubwr.html#contents
10499 + 287. http://www.columbia.edu/kermit/ckubwr.html#x3
10500 + 288. http://www.columbia.edu/kermit/ckubwr.html#x3.3.2
10501 + 289. http://www.columbia.edu/kermit/ckubwr.html#top
10502 + 290. http://www.columbia.edu/kermit/ckubwr.html#contents
10503 + 291. http://www.columbia.edu/kermit/ckubwr.html#x3.3
10504 + 292. http://www.columbia.edu/kermit/ckubwr.html#x3.3.3
10505 + 293. http://www.columbia.edu/kermit/ckubwr.html#x3.3.1
10506 + 294. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10507 + 295. http://www.columbia.edu/kermit/ckubwr.html#x6
10508 + 296. http://www.columbia.edu/kermit/ckubwr.html#x7
10509 + 297. http://www.columbia.edu/kermit/ckubwr.html#x8
10510 + 298. http://www.columbia.edu/kermit/ckuins.html#x10
10511 + 299. http://www.columbia.edu/kermit/ckuins.html#x11
10512 + 300. http://www.columbia.edu/kermit/ckuins.html
10513 + 301. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10514 + 302. http://linuxwww.db.erau.edu/mail_archives/linux-kernel/Mar_98/1441.html
10515 + 303. http://www.columbia.edu/kermit/ckubwr.html#top
10516 + 304. http://www.columbia.edu/kermit/ckubwr.html#contents
10517 + 305. http://www.columbia.edu/kermit/ckubwr.html#x3.3
10518 + 306. http://www.columbia.edu/kermit/ckubwr.html#x3.3.4
10519 + 307. http://www.columbia.edu/kermit/ckubwr.html#x3.3.2
10520 + 308. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5
10521 + 309. http://www.columbia.edu/kermit/ckfaq.html#term
10522 + 310. http://dickey.his.com/xterm/xterm.html
10523 + 311. http://dickey.his.com/xterm/xterm.html
10524 + 312. ftp://kermit.columbia.edu/kermit/f/xmodmap.txt
10525 + 313. http://www.columbia.edu/kermit/ckubwr.html#top
10526 + 314. http://www.columbia.edu/kermit/ckubwr.html#contents
10527 + 315. http://www.columbia.edu/kermit/ckubwr.html#x3.3
10528 + 316. http://www.columbia.edu/kermit/ckubwr.html#x3.3.5
10529 + 317. http://www.columbia.edu/kermit/ckubwr.html#x3.3.3
10530 + 318. http://www.columbia.edu/kermit/ckubwr.html#top
10531 + 319. http://www.columbia.edu/kermit/ckubwr.html#contents
10532 + 320. http://www.columbia.edu/kermit/ckubwr.html#x3.3
10533 + 321. http://www.columbia.edu/kermit/ckubwr.html#x3.3.6
10534 + 322. http://www.columbia.edu/kermit/ckubwr.html#x3.3.4
10535 + 323. http://www.columbia.edu/kermit/ckermit.html
10536 + 324. mailto:kermit-support@columbia.edu
10537 + 325. http://www.redhat.com/support/errata/RHBA-2001-153.html
10538 + 326. news:comp.protocols.kermit.misc
10539 + 327. http://www.columbia.edu/kermit/ckubwr.html#top
10540 + 328. http://www.columbia.edu/kermit/ckubwr.html#contents
10541 + 329. http://www.columbia.edu/kermit/ckubwr.html#x3.3
10542 + 330. http://www.columbia.edu/kermit/ckubwr.html#x3.3.5
10543 + 331. http://www.columbia.edu/kermit/ckubwr.html#top
10544 + 332. http://www.columbia.edu/kermit/ckubwr.html#contents
10545 + 333. http://www.columbia.edu/kermit/ckubwr.html#x3
10546 + 334. http://www.columbia.edu/kermit/ckubwr.html#x3.5
10547 + 335. http://www.columbia.edu/kermit/ckubwr.html#x3.3
10548 + 336. http://www.columbia.edu/kermit/ckubwr.html#top
10549 + 337. http://www.columbia.edu/kermit/ckubwr.html#contents
10550 + 338. http://www.columbia.edu/kermit/ckubwr.html#x3
10551 + 339. http://www.columbia.edu/kermit/ckubwr.html#x3.6
10552 + 340. http://www.columbia.edu/kermit/ckubwr.html#x3.4
10553 + 341. news:comp.os.qnx
10554 + 342. http://www.columbia.edu/kermit/gkermit.html
10555 + 343. http://www.columbia.edu/kermit/ckuins.html#x10
10556 + 344. http://www.columbia.edu/kermit/ckuins.html
10557 + 345. http://www.columbia.edu/kermit/ckubwr.html#top
10558 + 346. http://www.columbia.edu/kermit/ckubwr.html#contents
10559 + 347. http://www.columbia.edu/kermit/ckubwr.html#x3
10560 + 348. http://www.columbia.edu/kermit/ckubwr.html#x3.7
10561 + 349. http://www.columbia.edu/kermit/ckubwr.html#x3.5
10562 + 350. http://www.columbia.edu/kermit/ckubwr.html#x3.6.1
10563 + 351. http://www.columbia.edu/kermit/ckubwr.html#x3.6.2
10564 + 352. http://www.columbia.edu/kermit/ckubwr.html#x3.6.3
10565 + 353. http://www.columbia.edu/kermit/ckubwr.html#x3.6.4
10566 + 354. http://www.columbia.edu/kermit/ckubwr.html#x3.10
10567 + 355. http://aplawrence.com/SCOFAQ/
10568 + 356. http://www.zenez.com/cgi-bin/scoprogfaq/faq.pl
10569 + 357. http://www.zenez.com/cgi-bin/scouw7faq/faq.pl
10570 + 358. http://zenez.pcunix.com/cgi-bin/scouw7faq/faq.pl
10571 + 359. http://pcunix.com/Unixart/modems.html
10572 + 360. http://www.freebird.org/faq/
10573 + 361. http://www.freebird.org/faq/developer.html
10574 + 362. http://support.caldera.com/caldera
10575 + 363. http://stage.caldera.com/ta/
10576 + 364. http://aplawrence.com/newtosco.html
10577 + 365. http://www.columbia.edu/kermit/ckubwr.html#x3.0.5
10578 + 366. http://www.columbia.edu/kermit/ckfaq.html#term
10579 + 367. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10580 + 368. http://www.columbia.edu/kermit/ckubwr.html#top
10581 + 369. http://www.columbia.edu/kermit/ckubwr.html#contents
10582 + 370. http://www.columbia.edu/kermit/ckubwr.html#x3.6
10583 + 371. http://www.columbia.edu/kermit/ckubwr.html#x3.6.1
10584 + 372. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
10585 + 373. http://www.columbia.edu/kermit/ckubwr.html#top
10586 + 374. http://www.columbia.edu/kermit/ckubwr.html#contents
10587 + 375. http://www.columbia.edu/kermit/ckubwr.html#x3.6
10588 + 376. http://www.columbia.edu/kermit/ckubwr.html#x3.6.3
10589 + 377. http://www.columbia.edu/kermit/ckubwr.html#x3.6.1
10590 + 378. http://www.digi.com/
10591 + 379. ftp://ftp.fu-berlin.de/pub/unix/driver/fas
10592 + 380. http://www.columbia.edu/kermit/ckubwr.html#x14
10593 + 381. http://www.sco.com/
10594 + 382. ftp://ftp.sco.com/
10595 + 383. http://www.columbia.edu/kermit/ckubwr.html#top
10596 + 384. http://www.columbia.edu/kermit/ckubwr.html#contents
10597 + 385. http://www.columbia.edu/kermit/ckubwr.html#x3.6
10598 + 386. http://www.columbia.edu/kermit/ckubwr.html#x3.6.4
10599 + 387. http://www.columbia.edu/kermit/ckubwr.html#x3.6.2
10600 + 388. http://www.columbia.edu/kermit/ckubwr.html#x3.10
10601 + 389. http://www.columbia.edu/kermit/ckubwr.html#top
10602 + 390. http://www.columbia.edu/kermit/ckubwr.html#contents
10603 + 391. http://www.columbia.edu/kermit/ckubwr.html#x3.6
10604 + 392. http://www.columbia.edu/kermit/ckubwr.html#x3.6.3
10605 + 393. http://www.columbia.edu/kermit/ckubwr.html#top
10606 + 394. http://www.columbia.edu/kermit/ckubwr.html#contents
10607 + 395. http://www.columbia.edu/kermit/ckubwr.html#x3
10608 + 396. http://www.columbia.edu/kermit/ckubwr.html#x3.8
10609 + 397. http://www.columbia.edu/kermit/ckubwr.html#x3.6
10610 + 398. http://www.columbia.edu/kermit/ckubwr.html#x3.7.1
10611 + 399. http://www.columbia.edu/kermit/ckubwr.html#x3.7.2
10612 + 400. http://www.columbia.edu/kermit/ckubwr.html#x3.7.3
10613 + 401. http://www.columbia.edu/kermit/ckubwr.html#x3.7.4
10614 + 402. http://www.columbia.edu/kermit/ckubwr.html#x3.7.5
10615 + 403. news:comp.unix.solaris
10616 + 404. http://access1.sun.com/
10617 + 405. http://docs.sun.com/
10618 + 406. http://www.sunhelp.com/
10619 + 407. http://www.wins.uva.nl/pub/solaris/solaris2/
10620 + 408. http://www.wins.uva.nl/cgi-bin/sfaq.cgi
10621 + 409. ftp://ftp.wins.uva.nl/pub/solaris
10622 + 410. http://www.science.uva.nl/pub/solaris/solaris2.html
10623 + 411. http://www.stokely.com/
10624 + 412. http://www.stokely.com/unix.sysadm.resources/faqs.sun.html
10625 + 413. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10626 + 414. http://www.columbia.edu/kermit/ckubwr.html#top
10627 + 415. http://www.columbia.edu/kermit/ckubwr.html#contents
10628 + 416. http://www.columbia.edu/kermit/ckubwr.html#x3
10629 + 417. http://www.columbia.edu/kermit/ckubwr.html#x3.7
10630 + 418. http://www.columbia.edu/kermit/ckubwr.html#x3.7.2
10631 + 419. http://www.columbia.edu/kermit/ckubwr.html#top
10632 + 420. http://www.columbia.edu/kermit/ckubwr.html#contents
10633 + 421. http://www.columbia.edu/kermit/ckubwr.html#x3.7
10634 + 422. http://www.columbia.edu/kermit/ckubwr.html#x3.7.3
10635 + 423. http://www.columbia.edu/kermit/ckubwr.html#x3.7.1
10636 + 424. http://www.columbia.edu/kermit/ckubwr.html#top
10637 + 425. http://www.columbia.edu/kermit/ckubwr.html#contents
10638 + 426. http://www.columbia.edu/kermit/ckubwr.html#x3.7
10639 + 427. http://www.columbia.edu/kermit/ckubwr.html#x3.7.4
10640 + 428. http://www.columbia.edu/kermit/ckubwr.html#x3.7.2
10641 + 429. http://www.columbia.edu/kermit/ckubwr.html#top
10642 + 430. http://www.columbia.edu/kermit/ckubwr.html#contents
10643 + 431. http://www.columbia.edu/kermit/ckubwr.html#x3.7
10644 + 432. http://www.columbia.edu/kermit/ckubwr.html#x3.7.5
10645 + 433. http://www.columbia.edu/kermit/ckubwr.html#x3.7.3
10646 + 434. news:comp.os.vms
10647 + 435. http://www.columbia.edu/kermit/ckubwr.html#top
10648 + 436. http://www.columbia.edu/kermit/ckubwr.html#contents
10649 + 437. http://www.columbia.edu/kermit/ckubwr.html#x3.7
10650 + 438. http://www.columbia.edu/kermit/ckubwr.html#x3.7.6
10651 + 439. http://www.columbia.edu/kermit/ckubwr.html#x3.7.4
10652 + 440. http://www.columbia.edu/kermit/ckubwr.html#top
10653 + 441. http://www.columbia.edu/kermit/ckubwr.html#contents
10654 + 442. http://www.columbia.edu/kermit/ckubwr.html#x3.7
10655 + 443. http://www.columbia.edu/kermit/ckubwr.html#x3.7.5
10656 + 444. http://www.columbia.edu/kermit/ckubwr.html#top
10657 + 445. http://www.columbia.edu/kermit/ckubwr.html#contents
10658 + 446. http://www.columbia.edu/kermit/ckubwr.html#x3
10659 + 447. http://www.columbia.edu/kermit/ckubwr.html#x3.9
10660 + 448. http://www.columbia.edu/kermit/ckubwr.html#x3.7
10661 + 449. http://www.stokely.com/
10662 + 450. http://access1.sun.com/
10663 + 451. http://www.ludd.luth.se/~bear/project/sun/sun.hardware.txt
10664 + 452. ftp://ftp.netcom.com/pub/ru/rubicon/sun.hdwr.ref
10665 + 453. ftp://ftp.intnet.net/pub/SUN/Sun-Hardware-Ref
10666 + 454. http://www.columbia.edu/kermit/ckubwr.html#top
10667 + 455. http://www.columbia.edu/kermit/ckubwr.html#contents
10668 + 456. http://www.columbia.edu/kermit/ckubwr.html#x3
10669 + 457. http://www.columbia.edu/kermit/ckubwr.html#x3.10
10670 + 458. http://www.columbia.edu/kermit/ckubwr.html#x3.8
10671 + 459. news:comp.unix.ultrix
10672 + 460. news:comp.sys.dec
10673 + 461. http://www.columbia.edu/kermit/ckubwr.html#top
10674 + 462. http://www.columbia.edu/kermit/ckubwr.html#contents
10675 + 463. http://www.columbia.edu/kermit/ckubwr.html#x3
10676 + 464. http://www.columbia.edu/kermit/ckubwr.html#x3.11
10677 + 465. http://www.columbia.edu/kermit/ckubwr.html#x3.9
10678 + 466. http://www.freebird.org/
10679 + 467. http://www.freebird.org/faq/
10680 + 468. news:comp.unix.unixware.misc
10681 + 469. news:comp.unix.sco.misc
10682 + 470. http://www.columbia.edu/kermit/ckubwr.html#x3.0
10683 + 471. ftp://kermit.columbia.edu/kermit/f/ckutio.c
10684 + 472. http://www.columbia.edu/kermit/ckubwr.html#top
10685 + 473. http://www.columbia.edu/kermit/ckubwr.html#contents
10686 + 474. http://www.columbia.edu/kermit/ckubwr.html#x3
10687 + 475. http://www.columbia.edu/kermit/ckubwr.html#x3.12
10688 + 476. http://www.columbia.edu/kermit/ckubwr.html#x3.10
10689 + 477. http://www.columbia.edu/kermit/ckubwr.html#top
10690 + 478. http://www.columbia.edu/kermit/ckubwr.html#contents
10691 + 479. http://www.columbia.edu/kermit/ckubwr.html#x3
10692 + 480. http://www.columbia.edu/kermit/ckubwr.html#x3.13
10693 + 481. http://www.columbia.edu/kermit/ckubwr.html#x3.11
10694 + 482. http://www.columbia.edu/kermit/ckubwr.html#top
10695 + 483. http://www.columbia.edu/kermit/ckubwr.html#contents
10696 + 484. http://www.columbia.edu/kermit/ckubwr.html#x3
10697 + 485. http://www.columbia.edu/kermit/ckubwr.html#x3.14
10698 + 486. http://www.columbia.edu/kermit/ckubwr.html#x3.12
10699 + 487. http://www.columbia.edu/kermit/ckubwr.html#top
10700 + 488. http://www.columbia.edu/kermit/ckubwr.html#contents
10701 + 489. http://www.columbia.edu/kermit/ckubwr.html#x3
10702 + 490. http://www.columbia.edu/kermit/ckubwr.html#x3.15
10703 + 491. http://www.columbia.edu/kermit/ckubwr.html#x3.13
10704 + 492. news:comp.sys.sgi.misc
10705 + 493. news:comp.sys.sgi.admin
10706 + 494. http://www.sgi.com/
10707 + 495. http://www-viz.tamu.edu/~sgi-faq/
10708 + 496. ftp://viz.tamu.edu/pub/sgi/faq/
10709 + 497. http://www.columbia.edu/kermit/ckuins.html
10710 + 498. http://freeware.sgi.com/Installable/gcc-2.95.2.html
10711 + 499. http://freeware.sgi.com/Installable/gcc-2.95.2.html
10712 + 500. http://www.columbia.edu/kermit/ckubwr.html#top
10713 + 501. http://www.columbia.edu/kermit/ckubwr.html#contents
10714 + 502. http://www.columbia.edu/kermit/ckubwr.html#x3
10715 + 503. http://www.columbia.edu/kermit/ckubwr.html#x3.16
10716 + 504. http://www.columbia.edu/kermit/ckubwr.html#x3.14
10717 + 505. news:comp.sys.be
10718 + 506. http://www.columbia.edu/kermit/ckubwr.html#top
10719 + 507. http://www.columbia.edu/kermit/ckubwr.html#contents
10720 + 508. http://www.columbia.edu/kermit/ckubwr.html#x3
10721 + 509. http://www.columbia.edu/kermit/ckubwr.html#x3.17
10722 + 510. http://www.columbia.edu/kermit/ckubwr.html#x3.15
10723 + 511. http://www.columbia.edu/kermit/ckubwr.html#top
10724 + 512. http://www.columbia.edu/kermit/ckubwr.html#contents
10725 + 513. http://www.columbia.edu/kermit/ckubwr.html#x3
10726 + 514. http://www.columbia.edu/kermit/ckubwr.html#x3.18
10727 + 515. http://www.columbia.edu/kermit/ckubwr.html#x3.16
10728 + 516. http://www.columbia.edu/kermit/ckubwr.html#top
10729 + 517. http://www.columbia.edu/kermit/ckubwr.html#contents
10730 + 518. http://www.columbia.edu/kermit/ckubwr.html#x3
10731 + 519. http://www.columbia.edu/kermit/ckubwr.html#x3.19
10732 + 520. http://www.columbia.edu/kermit/ckubwr.html#x3.17
10733 + 521. http://www.columbia.edu/kermit/ckubwr.html#top
10734 + 522. http://www.columbia.edu/kermit/ckubwr.html#contents
10735 + 523. http://www.columbia.edu/kermit/ckubwr.html#x3
10736 + 524. http://www.columbia.edu/kermit/ckubwr.html#x3.20
10737 + 525. http://www.columbia.edu/kermit/ckubwr.html#x3.18
10738 + 526. http://www.keyspan.com/products/usb/adapter/
10739 + 527. http://www.columbia.edu/kermit/ckuins.html
10740 + 528. http://cerebus.sandiego.edu/~jerry/UnixTips/
10741 + 529. http://www.columbia.edu/kermit/ckubwr.html#top
10742 + 530. http://www.columbia.edu/kermit/ckubwr.html#contents
10743 + 531. http://www.columbia.edu/kermit/ckubwr.html#x3
10744 + 532. http://www.columbia.edu/kermit/ckubwr.html#x3.19
10745 + 533. http://www.uni-giessen.de/faq/archiv/coherent-faq.general/msg00000.html
10746 + 534. http://www.columbia.edu/kermit/ckubwr.html#top
10747 + 535. http://www.columbia.edu/kermit/ckubwr.html#contents
10748 + 536. http://www.columbia.edu/kermit/ckubwr.html#x5
10749 + 537. http://www.columbia.edu/kermit/ckubwr.html#x3
10750 + 538. http://www.columbia.edu/kermit/ckccfg.html
10751 + 539. http://www.columbia.edu/kermit/ckubwr.html#top
10752 + 540. http://www.columbia.edu/kermit/ckubwr.html#contents
10753 + 541. http://www.columbia.edu/kermit/ckubwr.html#x6
10754 + 542. http://www.columbia.edu/kermit/ckubwr.html#x4
10755 + 543. http://www.columbia.edu/kermit/ckuins.html
10756 + 544. http://www.columbia.edu/kermit/ckubwr.html#top
10757 + 545. http://www.columbia.edu/kermit/ckubwr.html#contents
10758 + 546. http://www.columbia.edu/kermit/ckubwr.html#x7
10759 + 547. http://www.columbia.edu/kermit/ckubwr.html#x5
10760 + 548. http://www.columbia.edu/kermit/ckuins.html#9.5
10761 + 549. http://www.columbia.edu/kermit/ckubwr.html#x3
10762 + 550. http://www.columbia.edu/kermit/ckubwr.html#top
10763 + 551. http://www.columbia.edu/kermit/ckubwr.html#contents
10764 + 552. http://www.columbia.edu/kermit/ckubwr.html#x8
10765 + 553. http://www.columbia.edu/kermit/ckubwr.html#x6
10766 + 554. http://www.columbia.edu/kermit/ckuins.html#x8
10767 + 555. http://www.columbia.edu/kermit/ckuins.html
10768 + 556. http://www.columbia.edu/kermit/ck60manual.html
10769 + 557. http://www.columbia.edu/kermit/ckubwr.html#top
10770 + 558. http://www.columbia.edu/kermit/ckubwr.html#contents
10771 + 559. http://www.columbia.edu/kermit/ckubwr.html#x9
10772 + 560. http://www.columbia.edu/kermit/ckubwr.html#x7
10773 + 561. http://www.columbia.edu/kermit/ckubwr.html#top
10774 + 562. http://www.columbia.edu/kermit/ckubwr.html#contents
10775 + 563. http://www.columbia.edu/kermit/ckubwr.html#x10
10776 + 564. http://www.columbia.edu/kermit/ckubwr.html#x8
10777 + 565. http://www.columbia.edu/kermit/ck60manual.html
10778 + 566. http://dickey.his.com/xterm/xterm.html
10779 + 567. http://www.columbia.edu/kermit/ckubwr.html#top
10780 + 568. http://www.columbia.edu/kermit/ckubwr.html#contents
10781 + 569. http://www.columbia.edu/kermit/ckubwr.html#x11
10782 + 570. http://www.columbia.edu/kermit/ckubwr.html#x9
10783 + 571. http://www.columbia.edu/kermit/ckubwr.html#top
10784 + 572. http://www.columbia.edu/kermit/ckubwr.html#contents
10785 + 573. http://www.columbia.edu/kermit/ckubwr.html#x12
10786 + 574. http://www.columbia.edu/kermit/ckubwr.html#x10
10787 + 575. http://www.columbia.edu/kermit/ckubwr.html#x11.1
10788 + 576. http://www.columbia.edu/kermit/ckubwr.html#x11.2
10789 + 577. http://www.columbia.edu/kermit/ckubwr.html#top
10790 + 578. http://www.columbia.edu/kermit/ckubwr.html#contents
10791 + 579. http://www.columbia.edu/kermit/ckubwr.html#x11
10792 + 580. http://www.columbia.edu/kermit/ckubwr.html#x11.2
10793 + 581. http://www.columbia.edu/kermit/ck60manual.html
10794 + 582. http://www.columbia.edu/kermit/ckubwr.html#top
10795 + 583. http://www.columbia.edu/kermit/ckubwr.html#contents
10796 + 584. http://www.columbia.edu/kermit/ckubwr.html#x11
10797 + 585. http://www.columbia.edu/kermit/ckubwr.html#x11.1
10798 + 586. http://www.columbia.edu/kermit/ck60manual.html
10799 + 587. http://www.columbia.edu/kermit/ckubwr.html#top
10800 + 588. http://www.columbia.edu/kermit/ckubwr.html#contents
10801 + 589. http://www.columbia.edu/kermit/ckubwr.html#x13
10802 + 590. http://www.columbia.edu/kermit/ckubwr.html#x11
10803 + 591. http://www.columbia.edu/kermit/security.html
10804 + 592. http://www.columbia.edu/kermit/ckubwr.html#top
10805 + 593. http://www.columbia.edu/kermit/ckubwr.html#contents
10806 + 594. http://www.columbia.edu/kermit/ckubwr.html#x14
10807 + 595. http://www.columbia.edu/kermit/ckubwr.html#x12
10808 + 596. http://www.columbia.edu/kermit/ckubwr.html#top
10809 + 597. http://www.columbia.edu/kermit/ckubwr.html#contents
10810 + 598. http://www.columbia.edu/kermit/ckubwr.html#x15
10811 + 599. http://www.columbia.edu/kermit/ckubwr.html#x14
10812 + 600. mailto:support@stallion.oz.au
10813 + 601. http://www.stallion.com/
10814 + 602. http://www.columbia.edu/kermit/ckubwr.html#top
10815 + 603. http://www.columbia.edu/kermit/ckubwr.html#contents
10816 + 604. http://www.columbia.edu/kermit/ckermit.html
10817 + 605. http://www.columbia.edu/kermit/ck80.html
10818 + 606. http://www.columbia.edu/kermit/index.html
10819 + 607. http://www.columbia.edu/kermit/index.html
10820 + 608. http://www.columbia.edu/
10821 + 609. mailto:kermit@columbia.edu
10823 +++ ckermit-212/ckermit.ini
10825 +COMMENT - Standard C-Kermit initialization file
10827 +; For C-Kermit Version: 8.0
10830 +; .kermrc (UNIX, OS-9, Aegis)
10831 +; CKERMIT.INI (OS/2, VMS, OpenVMS, AOS/VS, Atari ST, Commodore Amiga)
10832 +; ckermit.ini (Stratus VOS)
10833 +; K95.INI (Kermit 95 -- but this big version is not used there)
10834 +; K2.INI (Kermit/2 -- but ditto)
10837 +; Frank da Cruz, Christine M. Gianone, Jeffrey Altman
10838 +; Columbia University, New York, NY 10025-7799, USA
10840 +; This is the standard and recommended C-Kermit 8.0 initialization file. To
10841 +; override settings or definitions made in this file, to add new settings or
10842 +; definitions, or to make any other desired customizations, create a separate,
10843 +; personal customization file called:
10845 +; .mykermrc (UNIX, OS-9, Aegis, BeBox, Plan 9)
10846 +; CKERMOD.INI (OS/2, VMS, OpenVMS, AOS/VS, Atari ST, Commodore Amiga)
10847 +; ckermod.ini (VOS)
10849 +; You can also define the customization filename in an environment
10850 +; variable (logical name in VMS), CKERMOD, which takes precedence over
10851 +; the names shown above.
10853 +; WHAT THIS FILE DOES:
10855 +; . Defines your default dialing directory name:
10856 +; .kdd for UNIX, OS-9 and Aegis; CKERMIT.KDD for other operating systems.
10857 +; You can override this with the environment variable K_DIAL_DIRECTORY
10858 +; . Defines your default network directory name:
10859 +; .knd for UNIX, OS-9 and Aegis; CKERMIT.KND for other operating systems.
10860 +; You can override this with the environment variable K_NET_DIRECTORY
10861 +; . Defines your default services directory name:
10862 +; .ksd for UNIX, OS-9 and Aegis; CKERMIT.KSD for other operating systems.
10863 +; You can override this with environment variable K_SERVICE_DIRECTORY.
10864 +; . Defines your customization file name (name given above)
10865 +; . Performs system-dependent setups for UNIX, VMS, OS/2, etc.
10866 +; . Defines VTPRINT macros for use with K95, MS-DOS Kermit, etc.
10867 +; . If you have a services directory, all the macros needed to use it are
10868 +; defined. If you don't have a services directory, the macros are not
10869 +; defined and Kermit starts faster.
10870 +; . Executes your personal customization file, if you have one.
10871 +; NOTE: Your customization file is NOT executed by Kermit itself; it is
10872 +; executed by this file.
10874 +; In UNIX, with C-Kermit 7.0 and later, you can store this file with a name
10875 +; other than .kermrc, and it will not be executed automatically, but, if you
10876 +; give this file execute permission, you can execute directly because of the
10877 +; "kerbang line" at the top, whenever you want all of the above actions to
10878 +; occur. The kerbang line must reflect the actual full path of the Kermit
10879 +; 7.0-or-later executable.
10881 +; C-Kermit 6.0 is documented in the book "Using C-Kermit", 2nd Edition,
10882 +; by Frank da Cruz and Christine M. Gianone, 1997, Digital Press /
10883 +; Butterworth-Heinemann, ISBN 1-55558-164-1. New features of subsequent
10884 +; versions are documented at the Kermit website:
10885 +; http://www.columbia.edu/kermit/
10887 +; Everything after this point depends on the script programming language.
10888 +; The CHECK command terminates this command file immediately if the script
10889 +; programming language (IF command) is not configured.
10891 +set take error on ; This makes CHECK quit if no script language.
10892 +check if ; Do we have an IF command? If not, quit now.
10893 +set take error off ; Back to normal.
10895 +local _sd _servicedir _xp ; Declare local variables.
10897 +COMMENT - C-Kermit version 6.0 or later required.
10900 +asg _xp \v(xprogram)
10901 +if not def _xp asg _xp \v(program)
10902 +if not equal "\m(_xp)" "C-Kermit" -
10903 + stop 1 \v(cmdfile): This initialization file is only for C-Kermit.
10904 +echo Executing \v(cmdfile) for \v(system)...
10905 +if < \v(version) 60000 -
10906 + stop 1 \v(cmdfile): C-Kermit 6.0 or later required.
10908 +forward \v(system) ; First do system-dependent items...
10910 +:unknown ; Should not happen
10911 +Stop 1 Error: System type unknown!
10913 +:Aegis ; Apollo Aegis and
10914 +:UNIX ; UNIX, all versions
10916 + \v(home).mykermrc ; Customization filename
10917 +if remote forward COMMON ; Skip local-mode items if "-R"
10919 + \v(home).kdd ; C-Kermit dialing directory
10921 + \v(home).knd ; C-Kermit network directory
10923 + \v(home).ksd ; C-Kermit services directory
10924 +forward COMMON ; End of UNIX section
10928 + \v(home).mykermrc ; Customization filename
10929 +if remote forward COMMON
10931 + \v(home).kdd ; C-Kermit dialing directory
10933 + \v(home).knd ; C-Kermit network directory
10935 + \v(home).ksd ; C-Kermit services directory
10936 +else set file display crt
10937 +forward COMMON ; End of OS-9 section
10939 +:VMS ; VMS and OpenVMS
10944 +echo This initialization file is not for use with K95.
10945 +forward COMMON ; End of OS/2 section
10947 +:AOS/VS ; Data General AOS/VS
10948 +set window 1 ; Sliding windows don't work
10949 +set file char dg-international ; File character-set
10950 +set xfer char latin1 ; Transfer character-set
10951 +set file display crt ; File transfer fisplay
10952 +def cli push ; Escape to CLI
10953 +def reset - ; Macro to reset DG DASHER terminal
10954 + run write [!ascii 236 306 301]
10955 +forward COMMON ; End of AOS/VS section
10957 +:Amiga ; Commodore Amiga
10958 +def cls echo \27[H\27[2J ; CLS command to clear the screen
10959 +set file char latin1 ; Use Latin Alphabet 1 for file transfer
10960 +set xfer char latin1 ; ...
10961 +forward COMMON ; End of Amiga section
10963 +:Atari_ST ; Atari ST
10964 +def cls echo \27H\27J ; Clear screen a`la VT52
10965 +set server display on ; Show file xfer display in server mode too
10966 +set server timeout 15 ; Nonzero required for ^C interruption!
10967 +forward COMMON ; End of Atari ST section
10969 +:Macintosh ; Apple Macintosh
10970 +set server display on ; Show file xfer display in server mode too.
10973 +:Stratus_VOS ; Stratus VOS
10974 +asg _myinit \v(home)ckermod.ini
10975 +if remote forward COMMON
10976 +asg _dialdir \v(home)ckermit.kdd
10977 +asg _netdir \v(home)ckermit.knd
10978 +asg _servicedir \v(home)ckermit.ksd
10979 +forward COMMON ; End of Stratus VOS section
10981 +:COMMON ; For all systems
10983 +; Define macros that are useful when running C-Kermit in remote mode.
10984 +; These macros serve no purpose on local-mode-only versions such as
10985 +; OS/2, Macintosh, Amiga, and Atari ST Kermit, so we skip defining them
10986 +; for those systems.
10988 +if not = 0 \findex(\v(system),WIN32:OS/2:Macintosh:Amiga:Atari_ST) -
10991 +; VTPRINT macro. Print a file on your PC's local printer.
10993 +def VTPRINT echo \27[5i, type \%1, echo \27[4i
10994 +; or if your printer needs a formfeed to force the page out:
10995 +; def VTPRINT def echo \27[5i, type \%1, echo \12\27[4i
10997 +; Macros for host-initiated file transfer using APC:
10998 +; NOT NEEDED ANY MORE because of autodownload/autoupload.
10999 +; Remove the following FORWARD command to reinstate these definitions:
11003 +; Get customization and directory file names. Environment variables take
11004 +; precedence, so you do not have to edit this file to change these filenames.
11006 +if def \$(CKERMOD) assign _myinit \$(CKERMOD)
11007 +if not def _myinit assign _myinit \v(home)CKERMOD.INI
11009 +if remote forward CUSTOM ; Skip all this if -R given on command line
11011 +if def \$(K_NET_DIRECTORY) assign _netdir \$(K_NET_DIRECTORY)
11012 +if not def _netdir assign _netdir \v(home)CKERMIT.KND
11014 +if def \$(K_DIAL_DIRECTORY) assign _dialdir \$(K_DIAL_DIRECTORY)
11015 +if not def _dialdir assign _dialdir \v(home)CKERMIT.KDD
11017 +CHECK DIAL ; Is there a DIAL command?
11019 + echo DIAL disabled
11025 + xif exist \m(_netdir) {
11026 + set net directory \m(_netdir)
11027 + echo { Network directory is \m(_netdir) }
11031 +if eq "\v(name)" "telnet" forward CUSTOM
11033 +xif exist \m(_dialdir) {
11034 + set dial directory \m(_dialdir)
11035 + echo { Dial directory is \m(_dialdir) }
11038 +COMMENT - Services directory
11040 +if def \$(K_SERVICE_DIRECTORY) assign _servicedir \$(K_SERVICE_DIRECTORY)
11041 +if not def _servicedir assign _servicedir \v(home)CKERMIT.KSD
11043 +; If no services directory is found skip all the big macro definitions and
11044 +; go straight to the bottom, where we execute the customization file.
11046 +if not exist \m(_servicedir) forward custom
11048 +echo { Services directory is \m(_servicedir)}
11050 +def MAX_SVCS 200 ; Adjust this if you have more entries
11051 +define _sd 0 ; Assume no services directory
11052 +open read \m(_servicedir) ; Try to open services directory file
11054 + declare \&d[\m(MAX_SVCS)] ; It's open, declare directory array
11055 + for \%i 1 \m(MAX_SVCS) 1 { ; Read the lines into the array
11060 + xif > \%i \m(MAX_SVCS) {
11061 + echo Too many entries in services directory
11062 + echo { Maximum is \m(MAX_SVCS).}
11063 + echo { Change definition of MAX_SVCS in \v(cmdfile) to allow more. }
11064 + echo { Services directory disabled.}
11066 + asg \&d[0] \feval(\%i - 1)
11072 + def access echo { Services directory not available.}
11073 + asg list \m(access)
11077 + for \%i 1 \&d[0] 1 {
11078 + if eq {\%1} {\fsubstr(\&d[\%i],1,\flen(\%1))} break
11080 + if not > \%i \&d[0] return \&d[\%i]
11083 + xif > \v(argc) 1 {
11085 + if def \v(return) echo \v(return)
11086 + else echo \%1: Not found
11088 + echo \&d[0] items in services directory:
11089 + for \%i 1 \&d[0] 1 { echo \fcont(\&d[\%i]) }
11092 + def SPLIT { asg _word1 \%1, asg _word2 \%2 }
11093 + def DOACCESS { ; (Used internally by ACCESS macro)
11094 + do \%5 \%6 \%7 \%8 \%9 ; Do the connection macro
11096 + split \%3 ; Get words from \%3
11097 + asg \%3 \m(_word1)
11098 + asg \%2 \m(_word2)
11099 + do \%3 \%4 {\%1} \%2 ; Login macro, userid, password, prompt
11102 + if not defined \%1 end 1 access what? ; Check service
11103 + do find \%1 ; Look it up
11104 + if success doaccess {\%2} \v(return) ; OK, try it
11105 + else end 1 "\%1" not in services directory ; Not found
11106 + if fail end 1 ; DOACCESS failed?
11107 + xif eq \v(cmdlevel) 1 {
11109 + echo ACCESS: Login succeeded - CONNECTing...
11117 +:CONNECTION ; Macros for making connections
11119 +COMMENT - SERIAL macro. Arguments:
11120 +; \%1 = device name
11124 + if < \v(argc) 3 ; All arguments given?
11125 + end 1 Usage: SERIAL device speed ; No.
11126 + set line \%1 ; OK, try to SET LINE.
11127 + if failure - ; If this failed,
11128 + end 1 Can't open device: \%1 ; print message and quit.
11129 + set speed \%2 ; Try to set the speed.
11130 + if fail end 1 Unsupported speed: \%2 ; Failed.
11131 + echo Connection successful. ; Succeeded.
11134 +COMMENT - NET macro. Arguments:
11135 +; \%1 = network type
11136 +; \%2 = host name or address
11139 + if < \v(argc) 3 end 1 Usage: NET network host
11140 + set network type \%1
11141 + if fail end 1 unsupported network: \%1
11142 + set login user ; Don't send user ID.
11144 + if fail end 1 Can't reach host: \%2
11145 + echo Connection successful.
11148 +COMMENT - CALL macro. Arguments:
11150 +; \%1 = modem type
11151 +; \%2 = device name
11153 +; \%4 = phone number
11156 + if < \v(argc) 5 - ; All arguments present?
11157 + end 1 Usage: CALL modem device speed number
11158 + xif not equal {\v(modem)} {\%1} { ; Set modem type
11160 + if fail end 1 unknown modem type: \%1
11162 + xif not equal {\v(line)} {\%2} { ; Communication device
11164 + if fail end 1 can't open device: \%2
11166 + xif not equal {\v(speed)} {\%3} { ; Communication speed
11168 + if fail end 1 unsupported speed: \%3
11170 + dial \%4 ; Dial the number
11171 + if fail end 1 Can't place call: \%4
11172 + end 0 Connection successful.
11175 +COMMENT - TCPCALL macro. Arguments:
11177 +; \%1 = server name:port
11178 +; \%2 = modem type
11179 +; \%3 = phone number
11182 + if < \v(argc) 4 - ; All arguments present?
11183 + end 1 Usage: TCPCALL server[:port] modem number
11184 + set net type tcp/ip ; Which network to use
11185 + if fail end 1 unsupported network: tcp/ip
11186 + set host \%1 ; Access server and port
11187 + if fail end 1 can't access server \%1
11188 + set modem \%2 ; Set modem type
11189 + if fail end 1 unknown modem type: \%2
11190 + dial \%3 ; Dial the number
11191 + if fail end 1 Can't place call: \%3
11192 + end 0 Connection successful.
11195 +COMMENT - SPRINT macro. Arguments:
11196 +; \%1 = Service name or address
11199 + if < \v(argc) 2 end 1 Usage: \%0 service
11200 + set input timeout proceed
11202 + input 10 TERMINAL=
11203 + if fail end 1 No terminal prompt
11206 + if fail end 1 No atsign prompt
11208 + input 10 CONNECTED
11209 + if fail end 1 Can't access \%1 from SprintNet
11212 +COMMENT - ULOGIN macro. For logging into systems where user ID is required
11213 +; but there is no password. Arguments:
11214 +; \%1 = UNIX user ID
11217 + if < \v(argc) 2 end 1 Usage: \%0 userid
11218 + set input timeout proceed ; Handle timeouts ourselves
11219 + set case on ; Case is important in UNIX
11220 + minput 5 login: Username: {User ID:} {User Name:}
11221 + out \%1\13 ; Send username, carriage return
11225 +COMMENT - VMSLOGIN macro. Arguments:
11226 +; \%1 = VMS user ID
11227 +; \%2 = Password. If password not supplied, it is prompted for.
11228 +; \%3 = System prompt. If omitted a default is supplied.
11231 + if < \v(argc) 2 end 1 Usage: \%0 userid [ password [ prompt ] ]
11232 + while not defined \%2 {
11233 + askq \%2 { \%1's password: }
11235 + set parity none ; Set communication parameters
11237 + set handshake none
11238 + set input timeout proceed ; Handle timeouts ourselves
11239 + in 5 Username: ; Is prompt already there?
11241 + for \%i 1 3 1 { ; Try 3 times to get it.
11242 + out \13 ; Send carriage return
11243 + in 5 Username: ; Look for prompt
11244 + if success break ; Success, go log in
11246 + if > \%i 3 end 1 No Username prompt
11248 + out \%1\13 ; Send username, carriage return
11249 + inp 5 Password: ; Wait 5 sec for this prompt
11250 + if fail end 1 No password prompt
11251 + pause ; Wait a sec
11252 + out \%2\13 ; Send password
11253 + xif not emulation { ; No emulator built in?
11254 + set input echo off ; Protect terminal from this
11255 + minput 10 {\27Z} {\27[c} {\27[0c} ; Get terminal ID query
11256 + xif success { ; Got one
11257 + output \27[\?1c ; Send VT100 terminal ID
11258 + in 2 \27[6n ; Screen dimension query?
11259 + if succ out \27[\v(rows);\v(cols)R ; Send dimensions
11261 + set input echo on ; Echo input again
11263 + if not def \%3 - ; If we were not given a prompt
11264 + asg \%3 {\v(prompt)} ; use the SET LOGIN PROMPT value
11265 + if not def \%3 - ; If we still don't have a prompt
11266 + asg \%3 {\13$\32} ; use this one as the default
11267 + reinp 0 \%3 ; Did we INPUT the prompt already?
11268 + if fail inp 60 \%3 ; No, look now.
11272 +COMMENT - UNIXLOGIN macro. Arguments:
11273 +; \%1 = UNIX user ID
11274 +; \%2 = Password. If password not supplied, it is prompted for.
11275 +; \%3 = System prompt. If omitted a default is supplied.
11277 +define UNIXLOGIN {
11279 + if < \v(argc) 2 -
11280 + end 1 Usage: \%0 userid [ password [ prompt ] ]
11281 + while not defined \%2 {
11282 + askq \%2 { \%1's password: }
11284 + set input echo on
11285 + set parity none ; Set communication parameters.
11287 + set handshake none
11288 + set input timeout proceed ; Handle timeouts ourselves
11289 + set case on ; Case is important in UNIX
11290 + def \%m 10 ; Waiting time for INPUT
11292 + minput \%m login: {ssword:} {Password for \%1:}
11297 + if > \%i 5 end 1 {No response from host}
11298 + xif = \v(minput) 1 { ; Have username prompt
11299 + output \%1\13 ; Send username
11300 + minput 5 {ssword:} {ssword for \%1:} ; Wait for password prompt
11301 + if fail end 1 {No password prompt}
11303 + pause ; Wait a sec
11304 + out \%2\13 ; Send password
11305 + if not def \%3 - ; If we were not given a prompt
11306 + asg \%3 {\v(prompt)} ; use the SET LOGIN PROMPT value
11307 + if not def \%3 - ; If we still don't have a prompt
11308 + asg \%3 {\10$ } ; use this one as the default
11309 + reinp 0 \%3 ; Did we INPUT the prompt already?
11310 + if fail inp 60 \%3 ; No, look now.
11314 +COMMENT - VMLINELOGIN macro. Arguments:
11318 +define VMLINELOGIN {
11319 + if < \v(argc) 2 -
11320 + end 1 Usage: \%0 userid [ password ]
11321 + while not defined \%2 {
11322 + askq \%2 { \%1's password: }
11324 + set parity mark ; Set communication parameters
11326 + set handshake xon
11328 + set input timeout quit ; Don't bother with IF FAILURE
11329 + input 10 BREAK KEY ; Look for BREAK KEY prompt
11330 + pause 1 ; Wait a second
11331 + output \B ; Send BREAK
11332 + input 10 .\17, output logon \%1\13 ; Now log in
11333 + input 10 .\17, output \%2\13 ; Send password
11334 + input 10 .\17, output \13 ; Send carriage return
11335 + input 10 .\17, output \13 ; Send another one
11339 +COMMENT - VMFULLOGIN macro. Arguments:
11343 +define VMFULLOGIN {
11344 + if < \v(argc) 2 -
11345 + end 1 Usage: \%0 userid [ password ]
11346 + while not defined \%2 {
11347 + askq \%2 { \%1's password: }
11349 + set input timeout quit ; Quit if INPUT fails
11350 + set parity even ; Set communication parameters
11352 + set handshake none
11353 + set flow xon/xoff
11354 + out \13 ; Send carriage return
11355 + inp 5 TERMINAL TYPE: ; Get terminal-type prompt
11356 + out vt-100\13 ; Just send "vt-100"
11357 + inp 20 RUNNING ; Get RUNNING message
11358 + pau 1 ; Wait one second
11359 + out \%1\9\%2\13 ; Send user ID, tab, password
11360 + out \13\13 ; Two more carriage returns
11364 +COMMENT - CISLOGIN macro. Arguments:
11365 +; \%1 = CompuServe User ID
11370 + if < \v(argc) 2 -
11371 + end 1 Usage: \%0 userid [ password [ prompt ] ]
11372 + while not defined \%2 {
11373 + askq \%2 { \%1's password: }
11375 + set terminal bytesize 7 ; No 8-bit characters
11376 + set input timeout quit ; Skip the IF FAILURE's
11377 + output \13 ; Send initial carriage return
11378 + input 5 Host Name: ; Look for Host Name prompt
11379 + output cis\13 ; Send "cis" and carriage return
11380 + input 5 User ID: ; Look for User ID prompt
11381 + output \%1\13 ; Send ID and carriage return
11382 + input Password: ; Look for Password prompt
11383 + output \%2\13 ; Send password and CR
11384 + if not def \%3 asg \%3 \v(prompt)
11385 + if not def \%3 asg \%3 {CompuServe Information Service}
11390 +COMMENT - DOWLOGIN macro. Arguments:
11391 +; \%1 = Dow Jones Password
11394 + while not defined \%1 { ; Get password
11395 + askq \%1 { Dow Jones password: }
11397 + set input timeout proceed
11398 + input 20 SERVICE PLEASE\?\?\?\? ; Look for Dow prompt
11399 + if fail end 1 No service prompt
11400 + out djnr\13 ; Select DJNR
11401 + input 10 @@@@@@@@ ; Get password prompt
11402 + if fail end 1 No password prompt
11403 + pause 1 ; Wait a second, then...
11404 + output \%1\13 ; send password and CR
11405 + input 30 ENTER QUERY ; Get DJNR query prompt
11406 + if fail end 1 No main query prompt
11410 +COMMENT - DJNRSPRINT macro: Log in to Dow Jones via SprintNet.
11412 +def djnrsprint sprint dow, if success dowlogin
11414 +COMMENT - NOLOGIN macro. Does nothing. Use when login not required.
11416 +def nologin comment
11418 +:CUSTOM ; Customization file
11420 +; In VMS and OpenVMS, allow for system-wide site customizations
11422 +xif equal "\v(system)" "VMS" {
11423 + xif exist CKERMIT_INI:CKERMIT.SYS {
11424 + echo Executing CKERMIT_INI:CKERMIT.SYS
11425 + take CKERMIT_INI:CKERMIT.SYS
11429 +; Execute user's personal customization file
11431 +xif exist \m(_myinit) { ; If it exists,
11432 + echo Executing \m(_myinit)... ; print message,
11433 + take \m(_myinit) ; and TAKE the file.
11436 +; Finish up with traditional greeting.
11438 +if < \v(ntime) 43200 echo Good Morning!
11439 + else if < \v(ntime) 61200 echo Good Afternoon!
11440 + else echo Good Evening.
11442 +End ; of C-Kermit 8.0 initialization file.
11444 +++ ckermit-212/ckc211.txt
11446 +C-KERMIT CHANGE LOG (Changes since 8.0.200 of 12 Dec 2001)
11448 +Chronological order: Go to the bottom to find the newest edits.
11452 +Known bugs (+ = fixed after release):
11454 + + 1. tilde_expand() can call getcwd() with NULL arg.
11455 + + 2. getexedir() called too early (fatal in combination with (1)).
11456 + + 3. Kermit "get blah" where blah is a symlink; server refuses to send it.
11457 + Should not do this if GET not recursive.
11458 + ? 4. Dave Sneddon's report about VMS fore/background confusion.
11459 + + 5. FTP GET path/file doesn't work - path not stripped - but MGET works.
11460 + + 6. IRIX 5.3 compilation problems (have patches from Marcus Herbert)
11461 + X 7. Filename completion bug (see below) (deferred).
11462 + + 8. QNX6 herald and other problems.
11466 +Merged Jeff's changes, 20 Dec 2001:
11468 + . Changed all occurrences of "ttnproto == NP_TELNET" to "IS_TELNET()" to
11469 + account for the difference between SSH and Telnet. ckuscr.c,
11470 + ckuus[3457].c, ckcnet.h, ckcfns.c, ckudia.c, ckutio.c, ckucon.c, ckucns.c.
11472 + . Moved SSH pty failure warnings. ckuusr.c.
11474 + . Security adjustments to FTP module, plus fix an error message. ckcftp.c.
11476 + . Adjustment of some security-related #ifdefs. ckcdeb.h, ckuus2.c, ckctel.c.
11478 + . Guard against calling getpwnam() with a NULL arg in tilde_expand() ckufio.c.
11480 + . Moved getexedir() call to later, where it's safe. ckcmai.c.
11482 +Added SSH ADD and many SSH SET commands from Jeff's spec. Fixed SHOW SSH
11483 +to not dump core if variables weren't set. ckcker.h, ckuus[r3].c, 20 Dec 2001.
11485 +C-Kermit in server mode, client says "get foo" where foo is a symlink.
11486 +Server says "no files meet selection criteria" instead of sending the file.
11487 +It should only refuse to follow symlinks if it's a recursive get. Fixed
11488 +in sgetinit(): ckcpro.w, 21 Dec 2001.
11490 +More work on SSH and SET/SHOW SSH commands. ckuus[r3].c, 21 Dec 2001.
11492 +Undid Jeff's replacement of the SSH pseudoterminal allocation failure
11493 +message, because now it comes out any time an SSH command has to be
11494 +reparsed (in the non-SSHBUILTIN case). ckuusr.c, 21 Dec 2001.
11496 +More SSH and SET SSH command work back & forth with Jeff, plus Jeff added
11497 +SET HOST /NET:SSH. ckcmai.c, ckuus[r37].c, ckcdeb.h, ckuusr.h, 22 Dec 2001.
11499 +Added SSH OPEN switches. ckuusr.c, 22 Dec 2001.
11501 +Added SSH CLEAR, HELP SSH, and HELP SET SSH. ckuus[r2].c, 23 Dec 2001.
11504 + . SET TCP commands now apply to SSH
11505 + . SSH V2 REKEY and FORWRD-{LOCAL,REMOTE}-PORT commands now implemented
11506 + . Missing DLLs automatically disable appropriate authentication mechanisms.
11507 +ckuusr.c ckcnet.c ckuus3.c ckcmai.c ckcnet.h ckuus4.c, 26 Dec 2001.
11510 + . Remove SET SSH KEEPALIVES.
11511 + . Add help text for SSH AGENT { ADD, DELETE, LIST }.
11512 +ckuus[23].c, 28 Dec 2001.
11514 +Added parsing for SSH AGENT { ADD, DELETE, LIST }. ckuusr.c, 28 Dec 2001.
11517 + . Fixed a crash that can happen when making an SSH connection.
11518 + . Filled in SSH AGENT actions.
11519 + . Changed default for strict host key check (to ASK) and help text.
11520 + . uploaded new binaries include ~kermit/os2test/beta/ssh-agent.exe
11521 + . Read man ssh-agent on ftp.kermit.columbia.edu for details on what it does.
11522 +ckuus[r23].c, 28 Dec 2001.
11524 +"ftp get path/filename" didn't work; the FTP client did not strip the path
11525 +from the local copy of the filename when doing a GET, even though it did
11526 +for MGET. Diagnosis: in doftpget(), the "if (!getone && !skipthis)" statement
11527 +lacked an "else" part for the getone case. ckcftp.c, 28 Dec 2001.
11529 +A while back Jeff reported that in FTP MGET, if you cancel a file with 'x',
11530 +all the rest of the files arrive truncated to 0 bytes. I tried this on both
11531 +Unix and Windows and couldn't reproduce it.
11533 +In the last-minute flurry to release C-Kermit 8.0, I thought I noticed the FTP
11534 +client failing to update the fullscreen file-transfer display. But it seems
11535 +to work right, at least in Unix. When downloading a big file with FTP, all
11536 +the display fields are updated as expected. But smaller files might go by too
11537 +fast for the display to do anything. HOWEVER, in K95 the file transfer
11538 +display does not update itself until the end of the file, even if the file
11539 +takes a long time to transfer. This happens in both the Console and GUI
11540 +versions. A thread thing? (Jeff says no.) Yet the same display works fine
11541 +on Telnet connections.
11543 +In IRIX 5.3, the select()-based CONNECT module had to include <sys/time.h>
11544 +or else it blew up with "struct timeval" unknown. Since there already was
11545 +a SYSTIMEH CFLAG, I added the #include within #ifdef SYSTIMEH..#endif and
11546 +rebuilt with KFLAGS=-DSYSTIMEH, only to discover that the irix5* targets
11547 +didn't bother to propogate KFLAGS. Fixed in ckucns.c, makefile, 30 Dec 2001.
11549 +Increased IRIX5x Olimit from 2400 to 3000 because of ckuus[34].c. Added
11550 +-ansi, since (Marcus Herbert reported) we were not actually getting ANSI-C
11551 +compilation even though CK_ANSIC was defined. But now that we are, we get
11552 +warnings in <netinet/tcp.h>, which is included by ckcnet.h:
11554 + bit-field 'th_off' type required to be int, unsigned int, or signed int.
11558 +Tough. makefile, 30 Dec 2001.
11560 +But adding -ansi to the IRIX 5x targets also make compilation bomb whenever we
11561 +referenced fdopen() or popen(), which evidently don't have prototypes in any
11562 +of the header files. Luckily we already have CFLAGS for this occasion too:
11563 +DCLFDOPEN and DCLPOPEN. Added these to the irix51 target. Also had to copy
11564 +the fdopen()-popen() prototype section to ckuusx.c, which has a new reference
11565 +to fdopen() in a workaround for the curses console buffering bug. makefile,
11566 +ckuusx.c, 30 Dec 2001.
11568 +The QNX6 version did not receive a proper herald (it announced itself as
11569 +"unknown version". Reshuffled #ifdefs in ckuver.h, added display of QNX6
11570 +and NEUTRINO symbols to ckuus5.c, 30 Dec 2001.
11572 +Lucas Hart sent in a patch for the VMS problem. Apparently it was even worse
11573 +than Dave Sneddon had reported: 8.0 couldn't run at all under Batch. ckvtio.c,
11576 +A major obstacle to the usability of the FTP client is that certain commands
11577 +don't behave as FTP users expect: CD, DIR, DELETE, MKDIR, etc, which are local
11578 +rather remote, and there are no LCD (etc), USER, or ACCOUNT commands. We
11579 +could fix this by adding an FTP command-language personality, but file
11580 +management commands can also be remote or local on connections to Kermit
11583 +SET LOCUS { LOCAL, REMOTE, AUTO }
11584 + Sets the locus for unprefixed file management commands.
11585 + When LOCAL, a REMOTE (or R) prefix is required for
11586 + to send file management commands to a remote server (e.g. RCD, RDIR).
11587 + When REMOTE, an L prefix is required to issue local file management
11588 + commands (e.g. LCD, LDIR). The word LOCAL can't be used as a prefix
11589 + since it is used for declaring local variables.
11591 +This applies to all types of connections, and thus is orthogonal to SET
11592 +GET-PUT-REMOTE, which selects between Kermit and FTP for remote file-transfer
11593 +and management commands.
11595 +The default LOCUS is AUTO, which means we switch to REMOTE whenever an FTP
11596 +connection is made, and to LOCAL whenever a non-FTP connection is made,
11597 +and switch back accordingly whenever a connnection is closed.
11599 +Implementation (31 Dec 2001):
11600 + . None of this is compiled if LOCUS is not defined.
11601 + . Added XYLOCUS (SET LOCUS) and LOCUS definitions: ckuusr.h.
11602 + . Override by defining NOLOCUS (which inhibits definition of LOCUS).
11603 + . Added LOCUS to SET keyword table: ckuusr.c.
11604 + . Added locus & autolocus variables: ckuusr.c.
11605 + . Added SET LOCUS parsing and variable setting: ckuus3.c.
11606 + . Added display of LOCUS setting to SHOW COMMAND: ckuus5.c.
11607 + . Added automatic locus setting to setlin(): ckuus7.c.
11608 + . Added automatic locus setting to ftpopen() and ftpclose(): ckcftp.c.
11610 +How to catch all the places where a Kermit connection is closed? Turns out
11611 +we've done this before, when we added the connection log. So I made
11612 +dologend() take care of locus switching. But dologend() was not compiled in
11613 +if certain symbols were defined, such as NOLOCAL, or not defined, such as
11614 +CKLOGDIAL. So I (a) rearranged the #ifdefs so that even if these would
11615 +otherwise have obliviated dologend(), now they leave a piece of it for
11616 +locus-setting; (b) moved the prototype out of #ifdefs; and (c) took all calls
11617 +to it out of #ifdefs. ckcker.h, ckcfn2.c, ckcmai.c, ckucns.c, ckucon.c,
11618 +ckuus[r347x].c, 31 Dec 2001.
11620 +Added locus checking to the following commands: DIRECTORY, CD/CWD, CDUP,
11621 +DELETE, PWD, MKDIR, RMDIR, RENAME. ckuusr.c, 31 Dec 2001.
11623 +Added LDIRECTORY, LCD/LCWD, LCDUP, LDELETE, LPWD, LMKDIR, LRMDIR,
11624 +LRENAME. ckuusr.[ch], 31 Dec 2001.
11626 +Added USER and ACCOUNT commands, which are the same as FTP USER and FTP
11627 +ACCOUNT. ckuusr.[ch], ckcftp.c, 31 Dec 2001.
11629 +Since automatic locus switching could be a big surprise for most people, I
11630 +printed message any time it changed. ckcftp.c, ckuus[37].c, 31 Dec 2001.
11632 +Added help text for the new L commands and filled in missing HELP text for
11633 +SET GET-PUT-REMOTE, CDUP, MKDIR, and RMDIR. ckuus2.c, 31 Dec 2001.
11635 +Changed help text of CD, DIR, etc, for LOCUS. Changed the help text for
11636 +RCD, RPWD, RDEL, RDIR, etc, to mention that they also work with FTP servers.
11637 +Updated HELP REMOTE for this too. ckuus2.c, 31 Dec 2001.
11639 +Made sure code builds with NOLOCAL, NOLOGDIAL, and NOLOCUS (it does).
11641 +The IKSD command, when given with a /USER: switch, sends the user ID to the
11642 +IKSD. But the SET HOST /USER: command does not, when making a connection to a
11643 +Kermit service. This makes it impossible to script IKSD interactions using
11644 +only client commands. Furthermore, even if you include a /PASSWORD switch
11645 +with the IKSD command, it does not send the password. I added code near the
11646 +bottom of setlin() to do this. If we have a connection to a Kermit service
11647 +and a /USER: switch was given, then we attempt a REMOTE LOGIN. If a
11648 +/PASSWORD: switch was not given then if the username is "ftp" or "anonymous",
11649 +we automatically supply a password of user@host; otherwise we prompt for a
11650 +password. If a /USER: switch was not given, it acts like before. It all
11651 +works, but it might not be the best way (or place) to do it. setlin():
11652 +ckuus7.c, 31 Dec 2001.
11654 + NOTE: The above change doesn't help with IKSD /USER:anonymous,
11655 + the server prompts for password anyway, not sure why.
11657 + NOTE 2: What about secure authentication? We have to test to see
11658 + if user was already authenticated before sending the login packet.
11660 +Added /opt/kermit and /opt/kermit/doc to info_dir[] list (for Solaris).
11661 +ckuus5.c, 31 Dec 2001.
11663 +From Jeff: new Help text for SET TERM FONT (K95 GUI). ckuus2.c, 1 Jan 2002.
11665 +More work on help text for file management commands -- e.g. we can't lump
11666 +the L-commands together with the unprefixed ones; they need separate entries.
11667 +Also: added missing HELP REMOTE PWD, improved the default case (in which
11668 +help text had been omitted for a valid command). ckuus2.c, 1 Jan 2002.
11670 +It seems VMS C-Kermit was pretty much ignoring the -B (force background) and
11671 +-z (force foreground) command-line options. Fixed in congm(): ckvtio.c,
11674 +Tested the SET LOCUS business with VMS C-Kermit, which does not have a
11675 +built-in FTP client. Of course in this case there is no automatic locus
11676 +switching, but SET LOCUS REMOTE works nicely on IKSD connections.
11679 + . #ifdef adjustments for LOCUS changes.
11680 + . SSH KEY CREATE /TYPE:SRP.
11681 + . Fix \v(serial) to not be 8N2 by default if speed is 0.
11682 + . Don't let doexit() run if sysinit() hasn't been called first.
11683 +ckuus[r247x].c, 2 Jan 2002.
11685 +Made SET BACKGROUND { ON, OFF } do exactly the same as -B and -z options.
11686 +ckuus3.c, 2 Jan 2002.
11688 +Updated user-visible copyright dates to 2002 (but still need to do all the
11689 +source-module comments). ckcmai.c, ckuus[25].c, 2 Jan 2002.
11691 +Rearranged #include <sys/time.h> in ckucns.c that was done for IRIX 5.3,
11692 +to avoid conflicts in SV/68 R3v6. 3 Jan 2002.
11694 +From Dave Sneddon: Code changes in VMS sysinit() and congm() to work around
11695 +problems in batch, SPAWN'd, etc, and change CTTNAM from TT: to SYS$INPUT:.
11696 +ckcdeb.h, ckvtio.c, 3 Jan 2002.
11699 + . Fixed typo in definition of CTTNAM for VMS. ckcdeb.h
11700 + . Moved macro definitions for SSHBUILTIN from ckuus3.c to ckuusr.h
11701 + so they can be referenced in ckuus7.c
11702 + . Added SSH functionality to SET HOST:
11703 + SET HOST /NET:SSH /CONNECT hostname [port] /switches
11704 + . Fixed SET NET TYPE so it won't reject SSH if SSH is installed.
11705 + . Changes to allow IKSD to continue functioning. Somehow this minor change
11706 + to ckcmai.c got lost in one of the back and forth exchanges.
11707 + . HELP TEXT for UCS2 kverb
11708 + . Fix a problem in K95 where multiple threads could be attempting to
11709 + send a telnet negotiation simultaneously.
11710 +ckcmai.c ckcdeb.h ckuus2.c ckuus3.c ckuusr.c ckuusr.h ckuus7.c ckctel.c
11711 +ck_crp.c ckuat2.h ckuath.c, 4 Jan 2002.
11715 + Peter Runestig complaining that the Telnet Forward X code was corrupting
11716 + data. This resulted in a very thorough examination of the telnet module
11717 + code and a discovery of some rather significant problems. The root of the
11718 + problems is the lack of thread safety. To correct this problem the
11719 + following was done.
11721 + All code (regardless of module) which outputs telnet commands is placed
11722 + into a mutex region to ensure that competing output threads do not result
11723 + in interleaving their output. This could happen for instance when the
11724 + forward-x thread is forwarding data and the user changes the window size
11725 + or sends an AYT or BREAK. Next the buffer used for input and output
11726 + processing were identical. This means that output data could be treated
11727 + as input or vice versa. Ugh....
11729 + I also spent some more time cleaning up setlin(). Mostly reorganizing the
11730 + code into single if (...) blocks so that breaking it up will be easier.
11732 +ckctel.c ckuus7.c, 4 Jan 2002.
11734 +Updated internal copyright notices. All modules, 5 Jan 2002.
11737 + More of same, plus new makefile target and changes from Spike Gronim
11738 + for freebsd44+srp+openssl.
11739 +ckcdeb.h ckcnet.c ckctel.c ckuus7.c ck_ssl.c makefile, 5 Jan 2002.
11741 +Some minor updates and fixes to SSH and SET SSH help text.
11742 +ckuus2.c, 6 Jan 2002.
11744 +Added SET RGB-COLORS for GUI. ckuusr.[ch], ckuus3.c, 6 Jan 2002.
11746 +From Jeff: More Telnet changes, Debug semaphores for K95, etc: ckcdeb.h,
11747 +ckuusr.h, ckuus[r35x].c, ckctel.[ch], ckuath.c, 7 Jan 2002.
11749 +Added --xpos:n --ypos:n, SET GUI WINDOW POSITION x y, and changed SET
11750 +RGB-COLORS to SET GUI RGBCOLOR. Action needs to be filled in (in setguiwin()
11751 +in ckuus3.c), and gui_xpos and gui_ypos need to be defined in cko???.c.
11752 +ckuusr.h, ckuus[r3y].c, 7 Jan 2002.
11754 +Added --fontname:name --fontsize:name (and facename as synonym for fontname).
11755 +ckuusr.h, ckuus[7y].c, 7 Jan 2002.
11757 +Moved GUI (not OS/2) SET TERM FONT code in ckuus7.c to its own routine,
11758 +setguifont(), in ckuus3.c, and made GUI SET TERM FONT call this routine,
11759 +and also made SET GUI FONT call the same routine. ckuus[37].c, 7 Jan 2002.
11761 +Added --termtype:, --height:, --width:, --user:. Also added symbols for
11762 +--telnet:, --ssh:, --ftp:, --[remote-]charset, and --password:, but didn't
11763 +fill them in. --password: is probably not a good idea (but we allow it for
11764 +FTP); the others involve a lot of code-shuffling and reconciliation, which
11765 +I'll try to do when I get a chance (especially the connection ones, which
11766 +can be done as part of the setlin() restructuring). ckuusr.h, ckuusy.c,
11769 +Also I tried commenting out the #ifndef KUI..#endif's around SET TERMINAL
11770 +CHARACTER-SET (easier said than done because a crucial #endif was mislabeled).
11771 +Let's see if it compiles & works... ckuus7.c, 8 Jan 2002
11773 +Added FTP [ OPEN ] /NOINIT, meaning don't send REST, STRU, and MODE commands
11774 +upon making an FTP connection. This allows connection to servers that close
11775 +the connection (or worse) when given these commands (e.g. Linux 2.4 TUX 2.0
11776 +FTP server). ckcftp.c, 8 Jan 2002.
11778 +Looked at adding caller ID support for the ANSWER command:
11780 + . SET ANSWER CALLER-ID { ON, OFF }
11781 + . SET ANSWER RINGS <number>
11782 + . \v(callid_xxx) xxx = { date, time, name, nmbr, mesg }
11783 + . CKD_CID modem capability
11784 + . Set CKD_CID for modems that have it.
11785 + . A quick survey shows:
11786 + - USR V.90: No (but Jeff says some USRs have it).
11788 + - Lucent Venus: No
11789 + - USR: #CID=1 (the ones that have it -- X2?)
11790 + - Diamond Supra: #CID=1
11791 + - Rockwell 56K: #CID=1
11793 + - Zoltrix: +VCID=1
11794 + - Conexant: +VCID=1
11795 + . Since there are different commands to enable caller ID reporting,
11796 + we need a new field in struct MDMINF.
11797 + . SHOW MODEM and SHOW DIAL would need updating.
11800 +This is all way too much for now so I just did the setting of the \v(callid_*)
11801 +variables. These are reset at the beginning of an ANSWER command, and then
11802 +set by the ANSWER command if they come in; thus they persist from the time
11803 +they are collected until another ANSWER command is given. To take advantage
11804 +of autoanswer, the user has to enable it in the modem (all the modems I found
11805 +that support it have it disabled by default), and also has to set the number
11806 +of rings to at least 2. This can be done with (depending on the modem):
11808 + set modem command autoanswer on ATS0=2#CID=1\{13}
11809 + set modem command autoanswer on ATS0=2+VCID=1\{13}
11813 + set modem command autoanswer on ATS0=1#CID=0\{13}
11814 + set modem command autoanswer on ATS0=1+VCID=0\{13}
11816 +The variables can be accessed only after the call is answered. Therefore the
11817 +only way to refuse a call is to answer it, inspect the variables, and then
11818 +hang it up if desired. Future Kermit releases can do this more nicely (as
11819 +sketched out above.) Also while I was in the dialing code, I added result
11820 +code VCON (= VOICE), used by several of the newer modems. These changes are
11821 +untested. The SET ANSWER command is written but commented out. ckuusr.h,
11822 +ckcker.h, ckuus[r3].c, ckudia.c, 8 Jan 2002.
11824 +From Jeff: fixes to --termtype:, --height:, --width:, --user:, and filling in
11825 +of --rcharset:, which required extracting code from settrm() into a separate
11826 +parse-method-independent remote character-set setting routine. ckuus[7y].c,
11829 +From Jeff: More work on TERMINAL CHARACTER-SET code reorganization, and
11830 +reinstatement of SET TERMINAL CHARACTER-SET in K95G. Also, fix char/CHAR
11831 +warnings in Telnet module. ckuus7.c, ckctel.c, 9 Jan 2002.
11833 +Made SET TERM CHARACTER-SET visible for all builds, including K95G, and filled
11834 +in HELP text for it. ckuus[27].c, 9 Jan 2002.
11836 +Added help text for new extended options. ckuusy.c, 9 Jan 2002.
11838 +Commented out the return(-2) statement at the end of xgnbyte() to make the
11839 +"Statement not reached" errors go away, after checking to make sure that there
11840 +was no path that could fall through to the end. I'm 99.99% sure there isn't,
11841 +but that doesn't mean that some compilers might not still complain. ckcfns.c,
11844 +From Jeff: fix typo in the K95 extended-option help text; add more
11845 +semaphores to network i/o. ckuusy.c, ckcnet.c, 10 Jan 2002.
11847 +Undid ansiisms in set{lcl,rem}charset() declarations. ckuus7.c, 10 Jan 2002.
11849 +Removed a duplicated clause from the install target. makefile, 10 Jan 2002.
11851 +From Jeff: more semaphores. ckcnet.c, 11 Jan 2002.
11853 +Moved references to tmpusrid and tmpstring out of NOSPL #ifdefs -- they can
11854 +be used with NOSPL. setlin(): ckuus7.c, 13 Jan 2002.
11856 +Made a dummy dologend() routine outside of #ifndef NOICP, so we don't have
11857 +to enclose every reference to dologend in #ifdefs. (I had added a bunch of
11858 +calls to dologend() throughout the code to handle automatic LOCUS switching.)
11859 +ckuus3.c, 13 Jan 2002.
11861 +Moved "extern int nettype" outside of NOICP #ifdefs in ckuus4.c for NOICP
11862 +builds. 13 Jan 2002.
11864 +Moved a misplaced #ifdef in the VERSION command. ckuusr.c, 13 Jan 2002.
11866 +Did 81 different feature-selection builds on Linux (RH 7.0), all OK after the
11867 +changes listed above for today. 13 Jan 2002.
11869 +Added prototypes for set{rem,lcl}charset(). ckcxla.h, 13 Jan 2002.
11871 +Added ckcxla.h to dependencies for ckuusy.c. ckvker.com, 13 Jan 2002.
11873 +Made a correction to the HELP SET LOCUS text and supplied a missing comma
11874 +for HELP REMOTE. ckuus2.c, 13 Jan 2002.
11876 +Built OK on HP-UX 11.11 (K&R and ANSI), Solaris 8 (cc), Solaris 2.5.1 (gcc),
11877 +SunOS 4.1.3 (cc and gcc), VMS 7.1 (DEC C, net and nonet), Unixware 7.1.1,
11878 +Tru64 4.0G, HP-UX 10.20 (K&R), AIX 4.3.3, FreeBSD 2.2.8, Slackware 8.0, IRIX
11879 +6.5.13f, IRIX 5.3 (??? Can't tell -- the computer ran out of swap space -- but
11880 +it was OK a few days ago), VMS 5.5-2 (VAX C, UCX + nonet)... HP-UX 9.05, ...
11882 +Some corrections to comments in HP targets from PeterE. makefile, 14 Jan 2002.
11884 +Corrections to prototypes for set{rem,lcl}charset() (VOID, not void) from Jeff.
11885 +ckcxla.h, 14 Jan 2002.
11887 +Builds, cont'd... SINIX 5.42, Red Hat Linux 5.2 on i386, SuSE 7.0 on S/390,
11888 +Red Hat 7.1 on IA64, QNX 4.25, HP-UX 5.21/WinTCP, ...,
11890 +Dell Coleman <dell@aleph.tum.com> noticed that in AIX, the COPY command always
11891 +says "Source and destination are the same file" when the destination file
11892 +doesn't exist. This is because in AIX, realpath() fails with ENOENT (errno
11893 +2). The zfnqfp() code already accounts for this, but evidently not well
11894 +enough. So I did what I should have done long ago. zfnqfp() was originally
11895 +accomplished with do-it-yourself code. Later I added support for realpath(),
11896 +and partitioned the routine into mutually exclusive compile-time sections:
11897 +#ifdef CKREALPATH realpath()... #else do-it-yourself... #endif. But if
11898 +realpath() failed, there was no recourse to the do-it-yourself code. Today I
11899 +replaced the #else with the #endif, so the do-it-yourself part is always
11900 +included and is executed if the realpath() call fails. Built and tested on
11901 +AIX 4.3.3 and Solaris 2.5.1, as well as on Linux with and without the
11902 +realpath() code included. zfnqfp(): ckufio.c, 16 Jan 2002.
11904 +Separated K95 and C-Kermit test version numbers, so C-Kermit can be RC.02
11905 +while K95 is Beta.01. ckcmai.c, 16 Jan 2002.
11907 +Inhibited 0-length writes by conol() and conoll(), since they cause big
11908 +trouble with the AIX 4.3.3 pty driver, e.g. when you have an SSH connection
11909 +into AIX and run C-Kermit there. ckutio.c, 16 Jan 2002.
11911 +Suppressed "Switching LOCUS..." messages from FTP client when it was invoked
11912 +from the command line. ckcfns.c, 17 Jan 2002.
11914 +Dave Sneddon noticed that FOPEN /APPEND gets "?Write access denied" in VMS
11915 +if the file exists. This is apparently because VMS zchko() does the wrong
11916 +thing. Commenting out the call zchko() in the VMS case gets past this but
11917 +then the appended part of the file has different attributes than the orignal
11920 + abc <- original line (horizontal, normal)
11921 + d <- appended line (vertical)
11925 +VMS fopen() takes an optional 4th argument: a series of RMS keyword=value
11926 +pairs. Kermit doesn't give any. Experimentation shows that appending to
11927 +a Stream_LF works fine. That'll be a restriction for now, until somebody
11928 +sends in code to get the RMS attributes of the original file and feed them
11929 +to fopen(). Also need code to fix VMS zhcko() to say whether it's OK to
11930 +append to a file. ckuus7.c, 17 Jan 2002.
11932 +Somebody suggested I could get a working Kermit for Neutrino 2+ by doing the
11933 +QNX6 build on Neutrino itself. I verified that this can't be done -- at least
11934 +not by me -- since Netutrino 2+ doesn't have a compiler, and we already know
11935 +the version cross-built for it on QNX4 doesn't work. 17 Jan 2002.
11937 +From Jeff: SET SSH GSSAPI KEY-EXCHANGE { ON, OFF } parsing, SHOW SSH.
11938 +ckuus3.c, 18 Jan 2002.
11940 +PeterE suggested that SET ESCAPE allow 8-bit escape characters because of the
11941 +difficulty in entering Ctrl-\ on European keyboards and the hardship (e.g. to
11942 +EMACS and VI users) of sacrificing another C0 control character. Like
11943 +everything these days, this turns out to be rather a bigger deal than it would
11944 +seem. The SET ESCAPE parser calls setcc(), which accepts control characters
11945 +in various formats (literal, ^X notation, or numbers), and gives an error
11946 +return if the value is not 0-31 or 127. This is changed easily enough to also
11947 +allow numbers between 128 and 255. But who else calls setcc()? The commands
11948 +for setting Kermit packet start and end characters. No big deal, this gives
11949 +people a bit more flexibility in case they need it, but it won't be
11950 +documented. setcc(): ckuus7.c, 18 Jan 2002.
11952 +Since code to display the escape character is scattered all over the place,
11953 +and some of it indexes into an array based on the character value (which would
11954 +now dump core if the escape character was > 128), I put the code in one place,
11955 +a new shoesc() routine in ckuusx.c (which needs to be outside #ifndef NOICP,
11956 +since the CONNECT modules use it even in command-line only builds). Also
11957 +discovered that this code was indexing into the nm[] array with tt_escape to
11958 +get "enabled" or "disabled", which is no longer appropriate, so fixed this
11959 +too. ckuusr.h, ckuus[5x].c, 18 Jan 2002.
11961 +Made SHOW ESCAPE, SHOW TERM, and the various CONNECT modules call shoesc(),
11962 +and updated HELP SET ESC. ckuus[25].c, ckucns.c, ck[cuvd9]con.c, 18 Jan 2002.
11964 +After all that, it occurred to me that this is a really bad idea for K95,
11965 +with all the confusion about Console code pages, OEM code pages, Windows
11966 +code pages, and Unicode. But I tried "echo \161" at the K95 prompt and got
11967 +the expected 8-bit character in both the Console version and the GUI, so
11968 +maybe it's OK after all.
11970 +Removed the automatic IKSD login code from setlin() since it complicates
11971 +interactive anonymous login. ckuus7.c, 20 Jan 2002.
11973 +An #ifdef clause from Matthew Clarke to avoid "redeclaration of free" error
11974 +when building a curses version of C-Kermit for AIX 2.2.1 on RT PC. ckuusx.c,
11977 +Took care of one detail I omitted when adding the 8-bit escape character:
11978 +not stripping the 8th bit before comparing the keyboard char with the escape
11979 +char. ck[uv]con.c, ckucns.c, 24 Jan 2002.
11981 +Started to go through Jeff's changes of the last week but he had run trim -t
11982 +on them, which untabifies, so the diffs were huge. Retabifying Jeff's files
11983 +only makes matters worse. So instead of comparing each old and new source
11984 +file in EMACS windows with M-X Compare-Windows like I usually do (which can't
11985 +be told to ignore whitespace), I had to work from the diff -c -b listings.
11986 +In ascending order of size of diffs:
11988 +ckcker.h: Add I_AM_SSHSUB definition.
11989 +ckuusr.h: XXLINK and VN_PERSONAL, etc, definitions.
11990 +ckuusy.c: Support for "I Am SSHSUB" invocation.
11991 +ckuus5.c: Support for new K95 directory structure.
11992 +ckcmai.c: Init endianness earlier (K95 TYPE was broken), "I Am SSHSUB" support.
11993 +ckuus7.c: Security #ifdefs, SSH OPEN /PASSWORD, SSHSUB support
11994 +ckcftp.c: <-- SAVE TIL LAST
11995 +ckuus6.c: Add LINK command for K95 on NT.
11996 +ckuus4.c: Support for new K95 directory structure; SSHSUB support
11997 +ckuus3.c: Support for new K95 directory structure; some SSH changes
11998 +ckuus2.c: Changes to SSH related help text, add HELP LINK text
11999 +ckuusr.c: LINK command, SSH OPEN /PASSWORD: /SUBSYSTEM: switches,
12000 + Pattern-management fixes.
12001 +ckctel.c, ck_ssl.c, ckuath.c, ckcnet.c:
12002 + Took Jeff's without looking.
12003 +ckuusx.c, ckucns.c, ckucon.c, ckwart.c:
12004 + My changes from weeks ago that were never picked up.
12006 +Built OK on Solaris with gcc and on SunOS with (K&R non-ANSI) cc.
12009 +Meanwhile, Jeff had made various changes in response to Jaya Natarajan at IBM,
12010 +whose basic complaint was that numerous failure conditions were not being
12011 +detected if the fullscreen file-transfer display was active. Jeff found that
12012 +this was because big blocks of code were skipped in that case and changed the
12013 +code not to do that, which fixed the reported problems. But later Jaya said
12014 +that "ftp mget file1 file2" acted like "ftp mget *", so it seemed that Jeff's
12015 +fixes broke file selection. After taking Jeff's fixes for ckcftp.c, however,
12016 +I still could not reproduce the problem. ckcftp.c, 31 Jan 2002. <-- Later,
12017 +it turned out the problem was with IBM's custom FTP server.
12019 +Fixed updates that I missed yesterday in ckcftp.c, ckuusr.c. Moved misplaced
12020 +#ifdef in ckuusy.c breaking nonet builds. Added #ifdefs to sysinit() for
12021 +nonet builds in ckutio.c. Ran through build-in-many-configurations script
12022 +in Linux, all builds OK. 1 Feb 2002.
12024 +Moved shoesc() definition outside of NOXFER to fix NOXFER builds.
12025 +ckuusx.c, 1 Feb 2002.
12027 +Added MYCUSTOM definition alongside KERMRC and changed KERMCL to be the
12028 +same as CKMAXPATH, instead of some random hardwired number. ckuusr.h,
12031 +Changed ckcdeb.h to define DIRSEP and ISDIRSEP(), and put #ifndef
12032 +[IS]DIRSEP..#endif around all [IS]DIRSEP definitions in ck[udso]fio.c, so we
12033 +can finally put away the many repeated #ifdef chains when we get around to it.
12036 +Make VMS zkermini() return 1 on success, 0 on failure, rather than 0 always.
12037 +ckvfio.c, 1 Feb 2002.
12039 +Added code to doinit(), just before it goes to execute the init file. If the
12040 +init file name we are about to open is empty or fails zchki(), substitute the
12041 +customization filename. For now this code is in #ifdef USE_CUSTOM..#endif,
12042 +which is not defined by default. It does the trick in Unix and VMS. Also
12043 +included code from Jeff for K95, but this needs verification and testing.
12044 +Also used DIRSEP and ISDIRSEP() throughout doinit() instead of the long #ifdef
12045 +chains. ckuus5.c, 1 Feb 2002.
12047 +Moved shoesc() prototype from ckuusr.h to ckcker.h so modules that need it
12048 +don't have to include ckuusr.h just for this one thing (example: ckvcon.c).
12051 +Defined USE_CUSTOM by default, except if NOCUSTOM is defined. ckuusr.h,
12054 +Fixed kermit-sshsub code to really enter server mode, and to print
12055 +"KERMIT READY TO SERVE..." so scripts can wait for it. Also bumped the
12056 +C-Kermit test ID to RC.03 and the K95 one to Beta.02. ckcpro.w, ckcmai.c,
12059 +I was thinking about adding SET COMMAND BUFFER-SIZE to let people allocate
12060 +as big a buffer as they wanted at runtime, mainly for defining huge macros.
12061 +Moved the SCMD_blah definitions from ckuusr.h to ckuus3.c, since they aren't
12062 +used anywhere else. But stopped there since the rest turns out to be a rather
12063 +big deal. ckuusr.h, ckuus3.c, 2 Feb 2002.
12065 +From Jeff, 3 Feb 2002:
12066 + . Fix an out-of-order modem name in the SET MODEM TYPE table: ckudia.c.
12067 + . Use SET LOGIN USER and PASSWORD if present. ckcftp.c.
12069 +Cody Gould noticed that array declarations had become case sensitive, and
12070 +upper case didn't work. Diagnosis: misplaced case conversion in xarray().
12071 +Fixed in ckuus5.c, 4 Feb 2002.
12073 +SHOW VAR dumps core on \v(sexpression) or \v(svalue) -- failure to check for
12074 +NULL pointer. I wonder why this didn't happen before (answer: because I was
12075 +doing it on SunOS; now I'm doing it on Solaris). ckuus4.c, 6 Feb 2002.
12077 +I've had several requests for "show var name name name...". I added this to
12078 +doshow(), such that SHOW VAR works exactly as it did before (if you don't give
12079 +it an arg, it lists all variables; if you give it an arg, it appends "*" to it
12080 +and lists all matching variables) but now you can also give more than one arg
12081 +and it works the same way with each one as it did before if you gave it a
12082 +single item (i.e., "*" is appended, so "show var os cmd" shows all variables
12083 +whose names begin with "os" or "cmd". You can also freely use pattern
12084 +notation, including anchors. Hmmm, no, actually it's different in that now
12085 +each includes an implied * before AND after, so "show var version" shows all
12086 +variables whose name contain "version" rather than all variables whose names
12087 +start with it. ckuus5.c, 6 Feb 2002.
12089 +Cody Gould reported that WRITE FILE blah blah \fexec(anything) ... got a
12090 +spurious "File or Log not open" error. This turns out to be a rather
12091 +pervasive problem -- whenever you use \fexec() it calls the parser recursively
12092 +and this can run roughshod over global variables, such as our innocent little
12093 +x, y, and s. The fix in this case was to put x and y on the stack. The same
12094 +thing probably needs doing in about 10,000 other places. Too bad C isn't
12095 +Algol. ckuusr.c, 6 Feb 2002.
12097 +Minor fix to SHO VAR -- the "^" anchor wasn't working (e.g. "show var ^os").
12098 +ckuus5.c, 6 Feb 2002.
12100 +Fixes from Jeff for FTP file-transfer character-set translation in K95 and
12101 +in WIKSD, plus updated K95 SSH help text. ckcftp.c, ckcfns.c, ckuus2.c,
12104 +Server has its date set in the past. Client says "remote dir". Server sends
12105 +A packet containing old date. If client has FILE COLLISION UPDATE, it
12106 +rejects the directory listing. Changed gattr() to only reject real files
12107 +(introduced by F packet), not X-packet material like directory listings.
12108 +ckcfn3.c, 7 Feb 2002.
12110 +Up-down arrow keys for command recall. People have been asking for it for
12111 +years but now it's actually important because of PDAs that don't have Ctrl
12112 +keys. Would have been trivial except that we use getchar() rather than
12113 +coninc() for reading from the keyboard in Unix so conchk() doesn't help. In
12114 +fact there are lots of other places where conchk() is used this way and works
12115 +only by accident. The only reason we never noticed a problem before is that
12116 +characters don't usually arrive from the keyboard that fast. But when an
12117 +arrow key sends "ESC [ A" all once, the stdin buffer gets some extra stuff in
12118 +it, which getchar() will return next time, but which coninc()/conchk() will
12119 +never see. So I added a new cmdconchk() routine which, if the keyboard is
12120 +being read with getchar() rather than coninc(), looks at the stdin buffer.
12121 +Unfortunately, however, there is no API for this, nor is there any standard
12122 +way to access the stdin buffer directly. So first I did it for Solaris. Then
12123 +to make it portable requires a survey of the headers for every platform. I
12124 +found four major variations:
12127 + {Free,Open,Net}BSD, BSDI
12129 + SunOS, Solaris, HP-UX 5-6, AIX, VMS, SINIX, IRIX 5.3-6.5, DGUX
12130 + 4.2BSD, 4.3BSD, OSF/1..Tru64, QNX4, Unixware 1.0-2.1.0
12132 + HP-UX 7-11, SCO: OSR5.0.6a, Unixware 2.1.3-7.x, OU8, UNIX 3.2v4.x
12133 + Subtract read from end pointer (_IO_file_flags defined):
12134 + Linux (tested on RH 5.2 thru 7.1)
12136 +The Linux method is new and different to account for multibyte characters.
12137 +All the others assume character == byte.
12139 +For docs: ANSI only, 7-bit only; both application and cursor modes are
12140 +accepted. Only up and down arrow are handled; left and right arrows cause
12141 +a beep. ckucmd.c, 8 Feb 2002.
12143 +Build-all: Discovered that changing CTTNAM from TT: to SYS$INPUT: in VMS
12144 +(which was done on 3 Jan 2002 to work around problems starting Kermit in
12145 +batch, spawn'd, etc) breaks Kermit on VMS 5.5/VAX (concb() fails with "lacks
12146 +sufficient privilege"; if you enable all privs Kermit starts but then spews
12147 +out a constant stream of BEL characters). If you put dftty back to "TT:",
12148 +everything is fine -- I have no idea why, so I used #ifdef VMSV70 to decide,
12149 +which is totally crude. Next I had to find where the boundary really is: VAX
12150 +vs Alpha? VAX C vs DEC C? Or between VMS releases? Built on:
12151 + . VMS 6.2 Alpha (DEC C) - OK with TT:
12152 + . VMS 6.2 Alpha (DEC C) - OK with SYS$INPUT: <-- keep this one
12153 + . VMS 7.1 VAX (DEC C)
12154 +So the final condition is #ifdef VMSV60. ckvker.com, ckvtio.c, ckuus5.c.
12156 +QNX 6 needed some attention too:
12157 + . Whoever did the makefile target made the default port "/dev/ser1".
12159 +But I gave up on getting arrow keys to work -- it should be just like *BSD,
12160 +but for some reason gcc complains that struct FILE has no _r member, even
12161 +though it does (getchar uses it).
12163 +Checked stdio.h on Mac OS X and it looks like the *BSDs.
12165 +--- C-Kermit 8.0.201 ---
12167 +Removed -g from solaris2xg+krb5+krb4+openssl+shadow makefile target -- it
12168 +was producing a 15MB binary! makefile, 14 Feb 2002.
12170 +Fixed a couple thinkos in "make install": $(DESTDIR) should not have been
12171 +included in the tests for whether INFODIR or SRCDIR were desired. makefile,
12174 +(tarball refreshed 16 Feb 2002)
12176 +--- C-Kermit 8.0.201 ---
12178 +From Jeff: Better seeding of \frandom(): ckcmai.c, ckuus4.c, 18 Feb 2002.
12180 +From Jeff: Make arrow keys work in WIKSD, but now also unconditionally
12181 +compile arrow-key code in all versions. ckucmd.c, 18 Feb 2002.
12183 +From Jeff: ckuath.c, ck_ssl.c, ckcnet.c (didn't look). 18 Feb 2002.
12185 +Added ORIENTATION command, that lists the various important directories, and
12186 +\flongpathname() and \fshortpathname(), which do path format conversions in
12187 +Windows, and are just synonynyms for \fpathname() elsewhere. The new functions
12188 +need building and testing in Windows. ckuusr.h, ckuus[r24].c, 18 Feb 2002.
12190 +Changed PWD for Windows only to show both short and long paths (but only if
12191 +they are different; otherwise it behaves as before). ckuusr.c, 18 Feb 2002.
12193 +Changed default Windows prompt to show long pathname. ckuus5.c, 18 Feb 2002.
12195 +Updated INTRO command to mention FTP, HTTP, and SSH. ckuus2.c, 18 Feb 2002.
12197 +From Jeff: fixes for typos in GetLongPathName() code: ckuus[r4].c, 22 Feb 2002.
12199 +From Jeff: net/auth updates: ckcnet.c, ckuath.c, 22 Feb 2002.
12201 +Added -DUSE_FILE__CNT to NCR MPRAS targets, George Gilmer: makefile,
12204 +From Jeff: Add support for GetLongPathName() in Win95 and NT: ckcdeb.h,
12205 +ckuus[r4].c, 24 Feb 2002.
12207 +From Jeff: More fixes for FTP SIGINT, plus fix [M]PUT /MOVE. ckcftp.c,
12210 +Fixed an unguarded reference to inserver, gtword(): ckucmd.c, 24 Feb 2002.
12212 +Adapted RETRIEVE for use with FTP connections; this one was missed when
12213 +adapting GET, REGET, MOVE, etc. ckuus6.c, ckcftp.c, 24 Feb 2002.
12215 +Added special COPYRIGHT command text for the free version of WIKSD.
12216 +ckcmai.c, ckuusr.c, 24 Feb 2002.
12218 +C-Kermit, when in CONNECT mode and given the <Esc-Char>U sequence, would
12219 +unconditionally close the connection if it was a network connection. This
12220 +is bad when Telnetting to a modem server. I added to code to prevent this
12221 +in the RFC2117 TELNET COMPORT case but I'm not sure how to exend this to the
12222 +general case (or whether it would be a good idea). ckucns.c, 24 Feb 2002.
12224 +During file transfer, chktimo() calls ttgspd() for every packet, which clearly
12225 +doesn't make sense on network connections, especially since on Telnet COMPORT
12226 +connections it results in a network speed query for every packet. Rearranged
12227 +the code so this happens only on true serial-port connections. ckcfn2.c,
12230 +From Jeff: Fix reversed ANSI/non-ANSI function declarations clauses in
12231 +ckcftp.c, 26 Feb 2002.
12233 +Changed Unix CONNECT module to call kstart() only when it has a chance of
12234 +doing anything (i.e. a Kermit packet has been partially detected, or the
12235 +packet start character just came in), rather than unconditionally on every
12236 +incoming character. ckucns.c, 8 Mar 2002.
12238 +FTP PUT /SERVER-RENAME:, /RENAME-TO:, /MOVE-TO: were sticky. Patch: In
12239 +ckcftp.c, near the top of doftpput(), add the lines marked with "+":
12241 + makestr(&filefile,NULL); /* No filename list file yet. */
12242 ++ makestr(&srv_renam,NULL); /* Clear /SERVER-RENAME: */
12243 ++ makestr(&snd_rename,NULL); /* PUT /RENAME */
12244 ++ makestr(&snd_move,NULL); /* PUT /MOVE */
12245 + putpath[0] = NUL; /* Initialize for syncdir(). */
12247 +ckcftp.c, 26 Mar 2002.
12249 +\fday() and \fnday() were broken for dates prior to 17 Nov 1858. Fixed in
12250 +fneval(): ckuus4.c, 28 Mar 2002.
12253 + . New calling convenion for demoscrn(): ckucmd.c, ckuusx.c
12254 + . Fix for host-initiated 80/132 col screen mode change. ckuus7.c.
12255 + . New \v(desktop) variable: K95 user desktop directory, ckuusr.h, ckuus4.c
12256 + . New \v(rfc2717_signature) var: Telnet Com Port, ckuusr.h, ckuus4.c
12257 + . Uncomment "not-reached" return(-2) in xgnbyte(): ckcfns.c
12258 + . New dates: ckcmai.c.
12259 + . Telnet Com Port fixes: ckutio.c
12260 + . SET PRINTER fixes for K95: ckuus3.c
12261 + . Session limit adjustments: ckuus3.c
12262 + . New directory layout for K95 (TAKE, ORIENT): ckuusr.c
12263 + . Fixes for Telnet Com Port, recycling SSH connections: ckuusr.c
12265 +From me, not picked up by Jeff previously:
12266 + . kstart() speedup: ckucns.c.
12272 +From Jeff, 4 Apr 2002:
12273 + . More fixes for Telnet Com Port: ckuus4.c, ckudia.c, ckutio.c, ckcnet.c:
12274 + . network connections will check for carrier detect if SET
12275 + CARRIER-WATCH is ON. This could have a potential conflict if
12276 + the option is negotiated and the carrier is off, but the site
12278 + . modem hangup message generated since the dial module did not
12279 + believe that network modems could be reset with a DTR drop.
12280 + . Version number adjustments: 8.0.203, 1.1.99: ckcmai.c.
12281 + . Security: ck_ssl.[ch], ckuath.c.
12283 +---C-Kermit 8.0.203---
12285 +From Jeff, 6 Apr 2002:
12286 + . Fix typo in HELP REMOTE HOST: ckuus2.c.
12287 + . More Telnet Com Port fixes: ckctel.c, ckcnet.c, ckudia.c, ckutio.c
12289 +From Jeff, 9 Apr 2002:
12290 + . Fix autodownload problem: ckcfn[2s].c.
12292 +Chiaki Ishikawa reported that in Linux (two different kinds), if you choose
12293 +hardware parity, CONNECT, then escape back, the speed can change. I tracked
12294 +this down to the following statement in ttvt():
12296 + tttvt.c_cflag &= ~(IGNPAR); /* Don't discard incoming bytes */
12298 +Somehow execution of this statement corrupted the speed words of the termios
12299 +struct, which are entirely separate words that are nowhere near the c_cflag
12300 +member. Anyway, the statement is wrong; it should be:
12302 + tttvt.c_cflag |= IGNPAR; /* Don't discard incoming bytes */
12304 +Fixing it cured the problem; don't ask me why. ckutio.c, 9 Apr 2002.
12307 + fixes the problem reported by robi@hastdeer.com.au. The request to
12308 + enter server mode was received while we were entering server mode.
12309 + But the server was waiting for the response to REQ_STOP sent to the
12310 + client. Therefore, we weren't quite in server mode yet and the
12311 + request to enter server mode was rejected. A check for the sstate
12312 + value solves the problem. ckctel.c, 10 Apr 2002.
12314 +Chiaki Ishikawa (CI) discovered the real cause for the speed changing problem.
12315 +I was setting the IGNPAR bit in the wrong flag word: it should have been
12316 +c_iflag instead of c_oflag, silly me. Fixed in ttvt() and ttpkt(): ckutio.c.
12317 +I also did a thorough census of all the termio[s] flags to ensure each was
12318 +applied to the right flag word -- they were, IGNPAR in the HWPARITY case was
12319 +the only mistake. CI also discovered that the speed words in the Linux
12320 +termios struct are not used at all -- the speeds are encoded in an
12321 +undocumented field of c_cflag, which explains the problem. 10 Apr 2002.
12323 +Any use of \{nnn} character notation in a macro definition, loop, or other
12324 +braced block caused an "unbalanced braces" parse error. The backslash in this
12325 +case is not quoting the open brace; it's introducing a balanced braced
12326 +quantity. Special-cased in getncm(): ckuus5.c, 12 Apr 2002.
12328 +The semantics of "if defined \v(xxx)" were changed in 8.0 to avoid obnoxious
12329 +error messages when xxx was not a built-in variable (see notes of 19 Nov
12330 +2000), such that "if defined \v(xxx)" would always succeed if there were such
12331 +a variable, even if it had no value. The behavior that is documented in the
12332 +book (and also in ckermit70.html) and that we had in versions 6 and 7, was
12333 +that IF DEFINED \v(xxx) would fail if \v(xxx) was defined but had an empty
12334 +value OR if it was not defined, and would succeed only if it was defined and
12335 +had a value. Fixed in boolexp(): ckuus6.c, 12 Apr 2002.
12337 +What about \function()s? IF DEF \fblah() presently succeeds if the function
12338 +exists; you don't even have to give arguments. I think this behavior is more
12339 +useful than if I required valid arguments and then evaluated the function --
12340 +you can do that anyway with 'if not eq "\fxxx(a,b)" "" ...' Of course this
12341 +argument applies to "if def \v(xxx)" too, except that the current behavior is
12342 +consistent with the 7.0 behavior, so there is no need for a change.
12344 +Kent Martin discovered that if a macro contains a LOCAL statement for a
12345 +variable whose name is the same as, or a unique left substring of, the macro's
12346 +name, then undefining the local variable makes the macro disappear:
12348 + define DateDiff {
12349 + echo {DateDiff(\%1) executing...}
12355 + do DateDiff {3} <-- This fails (A)
12359 + do DateDiff {4} <-- So does this (B)
12361 +The first part of the problem is that "assign date {}" called delmac with
12362 +exact=0, so delmac evidently deleted first macro whose name started with
12363 +"date" -- and since the only one was DateDiff, that's the one that was
12364 +deleted. Fixing this (change "delmac(vnp,0)" to "delmac(vnp,1)" in dodef())
12365 +got us past A. The second part was making the same fix to the delmac()
12366 +call in popclvl(). ckuus[56].c, 13 Apr 2002.
12368 +The INPUT command ignored the parity setting, thus SET PARITY EVEN,
12369 +INPUT 10 "login:" didn't work. Fixed in doinput(): ckuus4.c. Also fixed a
12370 +bogus #ifdef COMMENT section that messed up the block structure of the module
12371 +and therefore EMACS's indenting. 18 Apr 2002.
12373 +Added sco32v500net+ssl and Added sco32v505net+ssl targets, from Scott Rochford
12374 +at Dell (not sure yet if they work). Makefile, 19 Apr 2002.
12376 +From Jeff, 22 Apr 2002:
12377 + . Added "darkgray" color and made "dgray" an invisible synonym: ckuus3.c.
12378 + . Fix carrier sense on Telnet Com Port immediately after dial: ckudia.c.
12379 + . Change krb5_des_blah() arg list: ckutio.c.
12380 + . Fix ttgmdm() for Telnet Com Port: ckutio.c.
12381 + . Fix tthang() return code: ckutio.c.
12382 + . Add aix43gcc+openssl target: makefile.
12384 +From Jeff, 25 Apr 2002:
12385 + . Fix SET GUI keyword table: ckuus[37].c.
12386 + . A final fix to Telnet Com Port: ckctel.c, ckcnet.c.
12388 +From Jeff, 26 Apr 2002:
12389 + . Another final fix to Telnet Com Port: ckctel.c, ckudia.c.
12391 +From Jeff, 27 Apr 2002:
12392 + . separate the wait mechanism for TELNET SB COMPORT synchronous messages
12393 + from the asynchronous TELNET SB COMPORT MODEMSTATUS messages: ckctel.[ch]
12394 + . fix debug messages in Certificate verify functions: ck_ssl.c, ckcftp.c.a
12396 +Frank, 27 Apr 2002:
12397 + . Fixed VMS zgetfs() to fail when file doesn't exist: ckvfio.c.
12398 + . Fixed UNIX zgetfs() to check for null or empty arg: ckufio.c.
12399 + . Added #include <time.h> for time() call: ckcmai.c.
12400 + . Add casts to args in tn_wait() calls: ckctel.c.
12402 +SINIX-P 5.42 (Pyramid architecture) makefile target from Igor Sobrado.
12403 +makefile (no source-code changes), 1 May 2002.
12405 +From Jeff, 5 May 2002,
12406 + . Fix some "unknown host" messages: ckcftp.c.
12407 + . Add more casts to tnc_wait() calls: ckudia.c.
12408 + . Improvements to SHOW SSH, SHOW GUI: ckuus3.c.
12409 + . Fixes to SET COMMAND { WIDTH, HEIGHT }: ckuus3.c.
12410 + . Updates to ck_ssl.[ch], ckctel.c, ckcnet.c.
12412 +Fixed the erroneous setting of ssh_cas during switch parsing rather than
12413 +after cmcfm() in setlin(): ckuus7.c, 5 May 2002.
12415 +setlin() decomposition (2300 lines), Part One:
12417 + . Copied a big chunk from the end of setlin(), beginning with net directory
12418 + lookup, but only the network-specific and common parts, to a new routine,
12419 + cx_net(), 900 lines.
12421 + . Extracted many repetitious lines of error-message code from cx_net()
12422 + to a new routine, cx_fail(). Error messages are stored in slmsg, and
12423 + also printed but only if we were not called from a GUI dialog (and
12424 + QUIET wasn't set, etc etc). Any adjutments in this policy can now be
12425 + made in one place.
12427 + . I put a call to cx_net() in setlin() just before all the code it replaced.
12428 + It works for TELNET and SET HOST /TELNET.
12430 + . Built with mkwatsol-k5k4ssl; after a couple fixes it builds OK and makes
12431 + Kerberized connections OK.
12433 + . Copied the serial-port and common parts of the setlin() post-cmcfm()
12434 + code to another new routine, cx_serial(), about 275 lines. Fixed
12435 + messages not to come out when called from GUI dialog, etc. Inserted
12436 + a call to cx_serial() at the appropriate spot in setlin(). Tested
12437 + serial connections on watsun with "set line /dev/ttyh6", works OK.
12439 + . Removed all the code from setlin() that was copied to cx_*(). This slims
12440 + setlin() down to 1120 lines. Tested regular Telnet, Kerberized Telnet, and
12441 + serial connections again, all OK. The Unix version of the SSH command is
12444 +setlin() deconstruction, Part Two:
12446 +Now that we have the common network and serial connection pieces moved out of
12447 +setlin(), we still need to move out the little code snippets for each network
12448 +type that take place between command confirmation and the common code we just
12449 +replaced. As far as I can tell, this needs doing only for SSH. The code
12450 +labeled "Stash everything" copied to cx_ssh() but I didn't remove the original
12451 +code since I can't test this. I think I'm done -- maybe I'm overlooking
12452 +something but I don't know what... First we need to test the heck out of it
12453 +in all command-line versions (K95 and C-Kermit). Then to use this from
12454 +the GUI, see the calling sequences for cx_serial(), cx_net(), and cx_ssh():
12456 + . For serial or TAPI connections, the GUI should call cx_serial().
12457 + . For SSH connections, it should call cx_ssh() and then cx_net().
12458 + . For all other network connections, just calls cx_net().
12460 +ckuus7.c, Cinco de Mayo de 2002.
12462 +New ckuus7.c from Jeff, 8 May 2002. Merge cx_ssh() into cx_net(). Also: I
12463 +had made line[] an automatic variable, since the global line[] buffer is used
12464 +by almost every parsing routine in C-Kermit to hold string fields between
12465 +parsing and execution but Jeff says he found that some code somewhere depended
12466 +on line[] containing the hostname after setlin() was finished.
12468 +From Jeff, 10 May 2002:
12469 + . Fix SET SSH STRICT-HOST-CHECKING parse: ckuus3.c.
12470 + . Add prototypes for cx_net() and cx_serial(): ckuusr.h.
12471 + . Add ANSI versions of cx_net() and cx_serial() declarations and supply a
12472 + missing parameter in the cx_serial() invocation, change SSHCMD cx_net()
12473 + invocation to new form.
12475 +From Jeff, 16 May 2002:
12476 + . ANSI strictness changes: ck_ssl.[ch]
12477 + . New DIALER command: ckuusr.[ch]
12478 + . Correction to how -0 turns off autodownload: ckuusy.c
12479 + . Prototypes for GUI menu action functions: ckuusr.h.
12480 + . Replace setting of GUI-action variables by function calls: ckuus[3457x].c
12481 + . Fix FTP -z switch parsing: ckcftp.c.
12482 + . Fix SET HOST testing of setlin() return code: ckuus3.c
12484 +From Jeff, 18 May 2002:
12485 + . Allow half-size GUI fonts: ckuus[35y].c.
12487 +Fixed setguifont() to parse fractional font sizes and round to nearest half
12488 +point. ckuus3.c, 18 May 2002.
12490 +For GUI, wrote front ends for getyesno(), readtext(), and readpass():
12492 + . uq_ok() prints text and gets Yes/No, OK/Cancel, or just OK response.
12493 + This replaces getyesno() and can also be used for alert or help boxes.
12495 + . uq_txt() prints text and gets a single text response. Replaces
12496 + readtext() and readpass().
12498 + . uq_mtxt() is like uq_txt() but allows multiple text fields. Replaces
12499 + any combination of readtext() and readpass().
12501 +Obviously the #ifdef KUI portions of the uq_blah() routines need filling in.
12502 +ckuusr.h, ckuus3.c, 18 May 2002.
12504 +Converted selected getyesno() calls to uq_ok(): ckcftp.c, ckuus3.c, ckuus6.c.
12505 +Some were not converted because it was inappropriate, e.g. DELETE /ASK; others
12506 +because they're in Jeff's code. The most interesting conversions are in the
12507 +DIAL command when DIAL CONFIRMATION is ON. Here there is a dialog for each
12508 +phone number asking if it's OK (ug_ok()) and if not, asking for a replacement
12509 +(uq_txt()); seems to work fine in C-Kermit. All the candidates for uq_mtxt()
12510 +are in Jeff's code. 18 May 2002.
12512 +From Jeff: Convert remaining getyesno/readtext/readpass calls to uq_blah()
12513 +so they can be GUI dialogs. ckuus[37].c, ckcftp.c, ckuath.c, ck_ssl.c,
12516 +Added KCD command = CD to symbolic directory name (EXEDIR, COMMON, APPDATA,
12517 +TMPDIR, etc etc). ckuusr.h, ckuus[r25].c, 21 May 2002.
12519 +From Jeff, 28 May 2002:
12520 + . --title: commandline option: ckuusr.h, ckuusy.c
12521 + . Fix some #includes, move some declarations: ckcfns.c
12522 + . Change K95 version from Dev.00 to Beta.01
12523 + . ASK[Q] /GUI: ckuus6.c.
12524 + . Various GUI screen updates and #ifdefs: ckuus7.c
12525 + . Add missing cx_net() calls to new setlin() for file SuperLAT..: ckuus7.c
12526 + . Updated uq_*() routines for GUI dialogs: ckuus3.c.
12528 +Added GETOK switches (/TIMEOUT for all; /POPUP and /GUI for K95G):
12529 +ckuus6.c, 29 May 2002.
12531 +Added HELP SET GUI text. ckuus2.c, 29 May 2002.
12534 + . Another K95-specific #include for ckcfns.c.
12535 + . More items for K95G Actions menu.
12536 + . Change K95G Locus switching to call setlocus() rather than set variable.
12537 + . Ditto for several other variables now settable from Actions menu.
12538 + . Fix SET HOST /NET:SSH status code so IF SUCCESS works.
12539 + . Fix SHOW SSH port-forwarding.
12540 +ckcfns.c, ckuus[r367].c, ckcftp.c, ckcmai.c, 30 May 2002.
12542 +Changed SET LOCUS to have a new value, ASK, corresponding to new autolocus
12543 +value of 2, K95G only. Changed setlocus() to not do anything if the new and
12544 +old loci are the same, otherwise to invoke a GUI dialog in K95G if autolocus
12545 +is 2, and also to handle any text messages. Changed SHOW COMMAND to show ASK
12546 +value for SET LOCUS. Rewrote HELP SET LOCUS. ckuusr.[ch], ckuus[23].c,
12547 +ckcftp.c, 30 May 2002.
12549 +Add a missing space to Locus popup, and fix Jeff's version of the code to
12550 +compile in C-Kermit. ckuusr.c, 31 May 2002.
12552 +From Jeff, for K95 GUI, 6 June 2002:
12553 + . Force some GUI popups to be in foreground: ckuus3.c.
12554 + . Fix SHOW TERM font display: ckuus5.c.
12555 + . Update K95 version numbers and date (4 June 2002): ckcmai.c.
12556 + . Add note about encrypted private keys vs scripts to HELP SET AUTH: ckuus2.c.
12557 + . Fix SET HOST for DECnet: ckuus7.c.
12561 +From Jeff, 7 June 2002:
12562 + . Fix some #ifdefs for Unix builds (locus, dial, etc): ckuus7.c
12563 + . Add gui_resize_scale_font() prototype: ckuus3.c
12564 + . Add some missing SET GUI commands: ckuus3.c
12565 + . Update version numbers: ckcmai.c
12569 +From Jeff, 11 June 2002:
12570 + . Conditionalize Locus-switching popup text for GUI/Console: ckuusr.c.
12571 + . Fix the SRP_installed_as_server() function. The new API returns TRUE even
12572 + if the SRP config and password files cannot be found. Went back to the old
12573 + API. This bug affects C-Kermit 8 when built with SRP as well as 1.1.21
12574 + through 2.0.1. Since iksdnt.exe has not been shipped yet I fixed it and
12575 + uploaded a new non-beta build of it. ckuath.c.
12577 +From Jeff, 12 June 2002:
12578 + . Fix SSH AGENT ADD: ckuusr.c.
12579 + . Fix --facename: option to not fail if name unknown: ckuusy.c.
12580 + . Fixes for OpenSSL 0.9.7 and OpenBSD 3.1: ck_ssl.c.
12581 + . Fix SET AUTH TLS VERIFY NO to prevent a dialog but still a warning if
12582 + SET AUTH TLS VERBOSE ON is set: ck_ssl.c.
12583 + . Fix FTP code to verify the hostname as specified by the user and not
12584 + the hostname discovered by the reverse DNS lookup. For example,
12585 + FTP OPEN kermit.columbia.edu
12586 + should produce a dialog because that name is not in the certificate
12587 + even though ftp.kermit.columbia.edu (the reverse DNS name) is: ckcftp.c.
12589 +Add support for Solaris 9 and NetBSD 1.6. makefile, ckuver.h, ckcdeb.h,
12592 +Discovered that Solaris 9 wants to hide the members of struct FILE, and
12593 +enforces this for 64-bit builds. They offer some functions like __fbufsize()
12594 +to get the info, but not the info we need for reading escape sequences (the
12595 +_cnt member). Let's hear it for political correctness. Created new solaris9g
12596 +(32-bit) and solaris9g64 (64-bit) targets. Sorry, no arrow keys in 64-bit
12597 +mode. Also no more direct access to sys_errlist[]; must use strerror().
12598 +makefile, ckucmd.c, 13 Jun 2002.
12600 +Added solaris9g+openssl+zlib+pam+shadow, which in turn required adding
12601 +solaris2xg32+openssl+zlib+pam+shadow, needed for gcc 3.1 in which you have
12602 +to specify 32-bit. Fails for some mysterious reason in link step
12603 +(can't find libssl.so.0.9.6 even though it's there). makefile, 13 Jun 2002.
12605 +Solaris 8 empty socket problems again -- tthang() times out, subsequent
12606 +tcsetattr() calls do horrible things. Added a bandaid to ttclos(): don't
12607 +call tcsetattr() any more if hangup timed out. ckutio.c, 14 June 2002.
12609 +Gerry B reported the bandaid got us bit farther but Kermit still disappears.
12610 +Added code to reassert the alarm signal handler, since it is likely that
12611 +Solaris has become stricter about this since last time I looked. (Later
12612 +Gerry reported back that this did the trick -- C-Kermit now exits normally
12613 +and releases the lockfile). ttclos(): ckutio.c, 17 Jun 2002.
12615 +If you use Kermit to copy a file to a destination file that already exists and
12616 +is longer than the source file, the destination file is not truncated. I had
12617 +mistakenly assumed that setting O_CREAT in the open() call in zcopy() would
12618 +create a new copy of the file. Fixed by also setting O_TRUNC. ckufio.c,
12621 +Updated HELP INPUT and MINPUT text to explain 0 and -1 timeout values, and
12622 +HELP DIAL to explain about entering CONNECT mode automatically. ckuus2.c,
12625 +Got rid of client-side "Press the X or E key to cancel" message when giving
12626 +a REMOTE command if QUIET is set or if XFER DISPLAY is NONE. ckuus7.c,
12629 +From Jeff 25 Jun 2002:
12630 + . Add SUN terminal type: ckuusr.h, ckuus[57].c.
12631 + . Add GUI file transfer display: ckcker.h, ckuus[47x].c.
12632 + . Changes to allow C-Kermit to build with OpenSSL 0.9.7. Current
12633 + C-Kermit code is designed to compile with 0.9.6 and earlier. To
12634 + compile with 0.9.7 you must specify -DOPENSSL_097. This avoids
12635 + missing symbols in the DES library. The functions in OpenSSL were
12636 + renamed in 0.9.7 to avoid link time conflicts with Kerberos 4.
12637 + ckufio.c ck_crp.c ckuath.c ck_ssl.h ck_ssl.c, makefile.
12639 +From Jeff 26 Jun 2002:
12640 + . apparently the SSL Passphrase Callback function was not converted
12641 + from readpass() to uq_txt()
12642 + . FTP Authentication failure errors were not being reported to the
12643 + user. So a failure would appear to be a successful completion
12644 + unless FTP DEBUG was ON. Now the message is reported unless
12645 + the QUIET flag is set.
12646 +ck_ssl.c, ckcftp.c.
12648 +SET TRANSFER MODE MANUAL didn't work for FTP; fixed in putfile() and getfile():
12649 +ckcftp.c, 1 Jul 2002.
12651 +Changed debug log for FTP to log "FTP SENT" and "FTP RECD" for protocol
12652 +messages, just like we do for Telnet, to make it easy to grep them out of
12653 +the log. ckcftp.c, 1 Jul 2002.
12655 +In FTP MGET /UPDATE, equal times spuriously caused download. doftpget() was
12656 +misinterpreting chkmodtime()'s return code. ckcftp.c, 3 Jul 2002.
12658 +In FTP MGET /RECOVER, recovery is skipped if the local file is newer than
12659 +the remote. This would seem to make sense, but when a download is
12660 +interrupted, the partial file never gets the date of the remote file, so
12661 +the partial file is always newer, and recovery never works. Fixed in
12662 +recvrequest() by commenting out the date check. ckcftp.c, 3 Jul 2002.
12664 +A better way to fix the previous problem is to always set the file date from
12665 +the server and then only allow /RECOVER to work when the dates are equal.
12666 +But that's not possible because MDTM is not implemented universally, and it
12667 +conflicts with how Kermit currently works, namely that FTP DATES are OFF by
12668 +default. Also, checking dates prevents [M]GET /RECOVER from working with
12669 +files that were incompletely downloaded by some other FTP client.
12671 +In FTP MGET /RECOVER <wildcard> <wildcard> ..., the first file in each group
12672 +is always downloaded. Diagnosis: Kermit sends "TYPE A" prior to NLST (as it
12673 +must). Then when it sends its first SIZE command, it's still in ASCII mode,
12674 +so the server sends the "ASCII size" rather than the binary size, which does
12675 +not agree with the size of the local file (which was downloaded in binary
12676 +mode), so recovery is always attempted even when the files are identical. The
12677 +TYPE A command is sent by initconn(). After the remote_files() call, we have
12678 +to change the type back to the prevailing type before sending the first SIZE
12679 +command. Fixed in cmdlinget() and doftpget(): ckcftp.c, 3 Jul 2002.
12681 +In FTP MGET /EXCEPT:<pattern> used with SET XFER DISPLAY brief, files that
12682 +are skipped just say ERROR instead of saying why they were skipped. Fixed
12683 +in doftpget(): ckcftp.c, 3 Jul 2002.
12685 +Added EXIT to top-level HELP text. ckuus2.c, 13 Jul 2002.
12687 +Strip braces in REINPUT n {string}. ckuusr.c, 13 Jul 2002.
12689 +Added /QUIET switch to ASK-class commands. This means not to print any error
12690 +messages when an ASK-class command times out waiting for a response. Made
12691 +sure that when a timeout occurs, the command fails. Also made sure the
12692 +c-Kermit prompt doesn't write over the ASK prompt if ASK times out. Also
12693 +fixed ASK, when it times out, not to return -9, which it did in one case,
12694 +which causes a command-stack dump. ckuus[267].c, ckucmd.c, 13 Jul 2002.
12696 +Fixed SET FILE INCOMPLETE help text, which said that both KEEP and AUTO were
12697 +the default. ckuus2.c, 13 Jul 2002.
12699 +If you SET FTP DEB ON and then turn it OFF, the MGET temp file is still kept.
12700 +Fixed by getting rid of ftp_knf variable and using ftp_deb to control whether
12701 +temp file is deleted (ftp_knf was being set from ftp_deb anyway, but then
12702 +wasn't being reset by SET FTP DEB OFF). ckcftp.c, 13 Jul 2002.
12704 +If an FTP transfer was in progress but the FTP connection drops and automatic
12705 +locus switching is enabled, the locus does not change; thus (for example) a
12706 +subsequent DELETE command makes Kermit send a REMOTE DELETE packet on stdout.
12707 +Fixed in lostpeer(): ckcftp.c, 13 Jul 2002.
12709 +For docs: FTP CD with no arg might not be accepted by the server; e.g. the
12710 +Kermit FTP server says "501 Invalid number of arguments".
12712 +The FTP module never handled SET INCOMPLETE. Fixed in doftprecv2(). ckcftp.c,
12715 +When FTP DATES is ON, we set an incoming file's date only if the file was
12716 +received successfully. Changed the code to set the file's date even if it was
12717 +received only partially (assuming we can get the date from server). ckcftp.c,
12720 +Suppose we were doing FTP MGET /UPDATE from a server directory of 100,000
12721 +files. Kermit would send a SIZE command for every file unconditionally. On
12722 +some connections, e.g. to the Red Hat Rawhide server, each one could take up
12723 +to 30 seconds. That would be 3 million seconds = 34 days. Don't send a SIZE
12724 +command during the selection phase unless a /SMALLER or /LARGER selector was
12725 +given. Once the file is selected, send a SIZE command only if one hadn't been
12726 +sent for that file already. ckcftp.c, 13 Jul 2002.
12728 +Made [M]GET and [M]PUT /UPDATE switch imply FTP DATES ON, since they didn't
12729 +work unless it was. ckcftp.c, 13 Jul 2002.
12731 +Added FTP [M]GET /DATES-DIFFER, which is like /UPDATE except it selects files
12732 +that are newer or older, rather than only newer. This allows updates from
12733 +sources where files might be rolled back to earlier versions. It's a bit
12734 +dangerous if you use it without knowing what it's for, since it allows older
12735 +files to overwrite newer ones. (Code is also in place for [M]PUT
12736 +/DATES-DIFFER, and it works, but I commented it out because it's either
12737 +useless or dangerous since when uploading, you can't set the the file dates
12738 +when they are arrive on the server.) ckcftp.c, 13 Jul 2002.
12740 +Changed chkmodtime() to remember if MDTM fails on a particular connection
12741 +because it's an unknown command (500, 502, or 202), and if so, not to ask
12742 +again. ckcftp.c, 13 Jul 2002.
12744 +With this last change, I think it's safe to change the default for FTP DATES
12745 +from OFF to ON. ckcftp.c, 13 Jul 2002.
12747 +Increased max number of /EXCEPT: patterns from 8 to 64 for file transfer (not
12748 +necessarily for other things). This is now a compile-time symbol NSNDEXCEPT.
12749 +ckcker.h, ckcmai.c, ckclib.c, ckcfns.c, ckcftp.c, ckuus[rx].c. 13 Jul 2002.
12751 +Fixed FTP MGET to not send SIZE command when there is a name collision and
12752 +FILE COLLISION is DISCARD, even if /SMALLER or /LARGER were also specified.
12753 +ckcftp.c, 15 Jul 2002.
12755 +MGET fails if no files were transferred, even if the reason is that no files
12756 +met the selection critieria: /COLLISION:DISCARD, /UPDATE, /SMALLER, etc.
12757 +Changed MGET to succeed in that case. domget(): ckcftp.c, 16 Jul 2002.
12759 +Big problems with canceling MGET; Ctrl-C cancels the current file, but we
12760 +don't break out of the file loop, we just go on to the next file. Worse, if
12761 +we're executing a command file that has a series of MGETs, Ctrl-C doesn't
12762 +break us out of the command file. Fixed by making failftprecv() and
12763 +failftprecv2() "chain" to the main SIGINT handler, trap(). This is fine in
12764 +Unix, but I'd be really surprised if it works in K95 so I put it in #ifndef
12765 +OS2. Ditto for MPUT: Added the same treatment to failftpsend() and
12766 +failftpsend2(). Ditto for cmdcancel(). To adapt to K95, search for "TEST ME
12767 +IN K95" (5 places). ckcftp.c, 16 Jul 2002.
12769 +Fixed previous fix to account for the fact that failftpblah() can be called
12770 +not only upon Ctrl-C, but also if transfer interrupted with X or Z.
12771 +ckcftp.c, 16 Jul 2002.
12773 +Yesterday's fixes revealed another problem: Interrupt MGET with Ctrl-C, start
12774 +another MGET, and the file list is total garbage. Diagnosis: secure_getc()
12775 +and secure_getbyte() use internal static buffer pointers. The only way they
12776 +ever get reset is when the data connection is closed by the server, so if you
12777 +interrupt a GET, the pointers are not reset and the next network read (e.g. of
12778 +an NLST response) returns whatever junk was lying around in the old buffer.
12779 +ckcftp.c, 17 Jul 2002.
12781 +FTP MGET temp file is kept only if FTP DEBUG is ON. Changed FTP module to
12782 +also keep it if the regular debug log is active. ckcftp.c, 17 Jul 2002.
12784 +Fixed version test in ckermit.ini: should be 6 digits, not 5. 17 Jul 2002.
12786 +Changed C-Kermit version number to 8.0.205 so scripts can test for the
12787 +recent changes. ckcmai.c, 18 Jul 2002.
12791 +SET FILE COLLISION UPDATE would unset FTP DATES due to a typo in the recent
12792 +changes. ckcftp.c, 21 Jul 2002.
12794 +FTP [M]GET /DATES-DIFFER really should have been a collision option. Added
12795 +this option (implemented for FTP only) to both SET FTP COLLISION and the
12796 +FTP [M]GET /COLLISION: table, so this way if you have lots of [M]GETs, you
12797 +don't have to put /DATES-DIFFER on each one. ckcker.h, ckcftp.c, 21 Jul 2002.
12799 +"FTP MGET a* b* c*" would fail to get any c*'s if no b*'s existed.
12800 +ckcftp.c, 21 Jul 2002.
12802 +From Jeff, 22 Jul 2002:
12803 + . Beginnings of Ann Arbor Ambassador terminal emulation for K95;
12804 + ckuus[57].c, ckuusr.h.
12805 + . Bump K95 version number to 2.0.2: ckcmai.c
12807 +Added -DCK_PAM -DCK_SHADOW to all Solaris targets, 2.6 and above. makefile,
12810 +Discovered that CK_SCRIPTS path search for TAKE files was #ifdef'd out
12811 +except for K95. Fixed in ckuusr.c, 25 Jul 2002.
12813 +From Jeff: changes to support K95 italics: ckuus[57].c, 25 Jul 2002.
12815 +Fixed path search for TAKE to not search the CK_SCRIPTS path if the filespec
12816 +contains any directory or path parts. Added a new function to check for
12817 +this: int hasnopath(filespec) in ckucmd.c: 26 Jul 2002.
12819 +Update HP-UX build instructions from PeterE: makefile, 26 Jul 2002.
12821 +Commented out "const" from struct pam_message declarations because it
12822 +causes "initialization type mismatch" warnings. ckufio.c, 26 Jul 2002.
12824 +Suppose you have a network directory containing a listing for host "foo":
12826 + foo tcp/ip foo.bar.com
12828 +Then in K95 you give a command "set host /network-type:ssh foo". This
12829 +results in the directory lookup replacing the "ssh" network type with TCP/IP,
12830 +and making a Telnet connection. Fix attempted at about line 8625 of ckuus7.c
12831 +in cx_net(); needs testing in K95. 26 Jul 2002.
12833 +FTP Password: prompt in Unix was not allowing editing. The code looked right;
12834 +I put in some debugging and suddenly it worked. Took out the debugging and
12835 +it still worked. Maybe I dreamed it. Anyway, I fixed the "FTP SENT" debug
12836 +log entry to not record the password, and removed a redundant section above
12837 +to log the same thing, but prior to any charset conversion. ckcftp.c,
12840 +From Jeff, 28 Jul 2002:
12841 + . Fix typo in initxlist(): ckcmai.c.
12842 + . Fix typo in Friday's set-host fix: ckuus7.c.
12843 + . Move parsing of --height/width command-line args after prescan(): ckuusy.c.
12845 +Added invisible top-level SITE and PASSIVE commands for FTP as a convenience
12846 +for habituated FTP client users. ckuusr.[ch], ckcftp.c, 28 Jul 2002.
12848 +A while back a user asked if it was possible to MGET a bunch of files from
12849 +an FTP server and have them all appended to each other upon arrival. The
12850 +obvious way to do this would have been:
12852 + mget /collision:append /as-name:bigfile *.*
12854 +But to make this work, I had to get rid of the "as-name must contain
12855 +variables" check in the MGET parser. doftpget(): ckcftp.c, 28 Jul 2002.
12857 +Verified that it was possible to do the same thing (GET a bunch of files
12858 +and append them all into one result file) with Kermit protocol. It works
12859 +fine but in this case there is no /COLLISION switch; you have to SET FILE
12860 +COLLISION APPEND first. 30 Jul 2002.
12862 +Changed COPY /APPEND to allow wild source to single destination file, e.g.
12863 +"copy /append *.* bigfile". ckuus6.c, 30 Jul 2002.
12865 +From Mark Berryman: a replacement for zchkpath(), the VMS routine that checks
12866 +whether a file is in the current directory; the old one (that I wrote) was
12867 +a hack that only worked sometimes. Martin Vorlaender verified Mark's code in
12868 +the situation where mine was breaking (server running in captive account).
12869 +ckvfio.c, 30 Jul 2002.
12871 +PeterE reported a problem with SWITCH case labels that start with '#':
12872 +The problem is that the SWITCH variable contents in this case happens to be
12875 + CMD(M)[_forward # Stand: 24.07.2002<CR>]
12877 +so the GOTO target is null. The solution would be for SWITCH to put the GOTO
12878 +(_FORWARD) target in quotes. But GOTO does not strip quotes or braces from
12879 +around its target. Fixed in ckuusr.c, 30 Jul 2002.
12881 +Fixed the SWITCH macro definition to put the _FORWARD target in quotes.
12882 +ckuus5.c, 30 Jul 2002.
12884 +PeterE also reported that an empty SWITCH case label did not work. There's no
12885 +particular reason why it should, but after a brief look, it wasn't that hard
12886 +so I did it. It required commenting out the check for empty labels and fixing
12887 +the comparison in dogoto(). Now it's possible to read lines from a file and
12888 +use each line as a SWITCH variable, with patterns as case labels, including an
12889 +empty label to match empty lines, #* labels to match comment lines, etc.
12890 +ckuus[r6].c, 30 Jul 2002.
12892 +PeterE also reported the value of \%* acquiring a trailing blank when
12893 +referenced inside a SWITCH statment. This happens because \%* is formed using
12894 +\fjoin() on the \&_[] array based on its dimension, and at some point the
12895 +dimension is spuriously increased by one. As a workaround, I made \fjoin()
12896 +ignore trailing empty \&_[] array elements and oddly enough this also fixed
12897 +the growing dimensions problem. The many script torture tests reveal no ill
12898 +effects, so it seems like a keeper. ckuus4.c, 30 Jul 2002.
12900 +Some of Peter's sample scripts made C-Kermit 8.0.201 dump core, but no more.
12902 +Fixed "delete xxx" to print an error message and fail if if xxx does not exist.
12903 +Ditto for when xxx is a directory. ckuus6.c, 30 Jul 2002.
12905 +Patches to SSL modules from Jeff based on yesterday's advisory. ck_ssl.[ch],
12908 +Fixed some typos affecting the filename collision action during command-line
12909 +FTP [M]GET. ckcftp.c, 31 Jul 2002.
12911 +Fixed SHOW FTP to handle FTP COLLISION DATES-DIFFER. ckcftp.c, 31 Jul 2002.
12913 +A while back someone pointed out that SET CONTROL UNPREFIX ALL and SET
12914 +PREFIXING NONE gave different results. Fixed them to use the same code.
12915 +Also made "set prefixing none" visible. ckuus3.c, 4 Aug 2002.
12917 +Added SET CD HOME <path>, to let the user specify which directory is intended
12918 +when "CD" or "KCD" is given by itself. This is because in Windows, some
12919 +applications set up their own HOME environment variable that isn't necessarily
12920 +where the user wants "cd" to go, but redefining HOME can interfere with the
12921 +application (example: Windows EMACS). SET CD HOME was done by adding a myhome
12922 +variable, initially a NULL pointer, and then changing homepath() to use it if
12923 +it is set. zhome() is not affected. Also the homepath() prototype had been
12924 +missing from header files. ckcmai.c, ckuusr.h, ckuus[2345].c, 4 Aug 2002.
12926 +PeterE got another core dump with his SWITCH statement. Found a place where
12927 +an out-of-bounds array reference could occur if the switch variable was
12928 +empty. ckuus6.c, 5 Aug 2002.
12930 +PeterE noticed that if the switch variable contained a comma, spurious matches
12931 +could occur with the label pattern. The real problem turns out to be what
12932 +happens when the SWITCH variable doesn't match any of the case labels and
12933 +there is no DEFAULT label. Fixed by having dogoto() in the SWITCH (_FORWARD)
12934 +case pop the command stack before returning failure, i.e. by moving the
12935 +"if (stopflg) return(0);" statement down a few lines. ckuus6.c, 5 Aug 2002.
12937 +PeterE noticed that a SWITCH case label of :* did not match an empty SWITCH
12938 +variable. Fixed in doswitch(): ckuus6.c, 6 Aug 2002.
12940 +In testing the previous fix, I found it only worked sometimes. Inspection
12941 +of the debug log showed that a statement like:
12943 + if (y == -3) s = "{}";
12945 +was assigning "{" rather than "{}" to s. Replacing the string constant by a
12946 +buffer containing the same string fixed it. The reason (guessed correctly by
12947 +PeterE) was the following sequence:
12949 + y = cmfld("Variable name","",&s,xxstring);
12950 + if (y == -3) s = "{}";
12951 + len = ckstrncpy(tmpbuf,brstrip(s),TMPBUFSIZ);
12953 +brstrip() (by design and as documented) affects the string in place. But in
12954 +this case the string is a constant, not data in a buffer, so all further uses
12955 +of "{}" get the wrong string (at least in optimized builds). The only real
12956 +cure is to change brstrip() to make a copy of its argument if it has to do
12957 +anything to it. This will slow down some scripts, but it's too risky to
12958 +leave it as it was. ckclib.c, 6 Aug 2002.
12960 +The previous change required an audit of the C-Kermit code to make sure that
12961 +no references to brstrip() depended the result buffer being persistent, or the
12962 +result pointer indicating a position in the source buffer. Oops, it turns out
12963 +that thousands of places rely on brstrip() working in place. Therefore the
12964 +change had to be undone. There's no good way to write a dummy-proof brstrip();
12965 +programmers either have be sure they're not calling it with a pointer to a
12966 +string constant, or else they have to copy the result back to the right place
12967 +each time. Better to leave it as it was and audit the code to fix any calls
12968 +that refer to string constants (turns out there were only two). Restored the
12969 +original fix to doswitch() (replacing the string constant by a buffer holding
12970 +the same string), plus minor fixes to ckcftp.c, ckuus[r36].c, 6 Aug 2002.
12972 +We need file dialogs in several situations in the K95 GUI. I added a "user
12973 +query" routine for this, uq_file(), in ckuus3.c, filling it in only for Unix.
12974 +Then I added code to call it from rcvfil() when (a) it's an autodownload, and
12975 +(b) SET TERM AUTODOWNLOAD is ASK (I just added this option; it needs to be set
12976 +to see it in action -- maybe it should be the default for KUI, in which case
12977 +initialize "int autodl = ?" to TAD_ASK in ckcmai.c). Works fine, except of
12978 +course it interferes with the file-transfer display, but that won't be a
12979 +problem in K95G. ckuusr.h, ckuus[37].c, ckcfns.c, ckucns.c, 6 Aug 2002.
12981 +Another place we need a file dialog is when Kermit is a URL interpreter. The
12982 +problem is: how can we let the user decide whether Kermit should ask? There
12983 +really isn't any way. Either it always asks or it never does. In this case I
12984 +think it makes sense to always ask if it's KUI, otherwise never. I added the
12985 +code for ftp: URLs to to doftprecv2(), which I tested successfully in Unix
12986 +before putting it into #ifdef KUI..#endif. Also added code for http[s] to
12987 +ckuusy.c in #ifdef KUI..#endif, not tested.
12989 +Still need this added for K95G Actions->Capture. The clearest example is the
12990 +FTP one. Just search for KUI in the FTP module.
12992 +Some minor adjustments to yesterday's work, mainly just comments, plus
12993 +generate the full pathname for the default file. ckuus3.c, ckcftp.c,
12996 +Note: for some reason cmofi() is not supplying the default value if user
12997 +enters an empty name... (but that won't affect the Windows version).
12999 +Added /USER: and /PASSWORD: switches to SET TCP { HTTP-PROXY, SOCKS-SERVER }.
13000 +ckuus3.c, 7 Aug 2002.
13002 +New 'uninstall' target from PeterE, works by having the 'install' target
13003 +write an UNINSTALL shell script. makefile, 8 Aug 2002.
13005 +Added some debugging statements to the VMS communications i/o module to try
13006 +to track down a problem that occurs when the controlling terminal is a LAT
13007 +device. ckvtio.c, 10 Aug 2002.
13009 +Fixed the non-K95 uq_file() to respect the given default name, but still show
13010 +the fully qualified absolute pathname for the default in the dialog. The
13011 +reason to not use the fully qualifed name as the default in the cmxxx() calls
13012 +is that this can easily result in a whole directory tree being created due to
13013 +directory aliases, symlinks, etc. So when you get a file by referring to its
13014 +URL (e.g. ftp://kermit.columbia.edu/kermit/READ.ME), uq_file() converts the
13015 +READ.ME part to (e.g.) /home/fdc/tmp/READ.ME but gives just "READ.ME" as the
13016 +default when parsing the name. This way the user knows where it will go and
13017 +gets an opportunity to change it, and if the default is accepted, it goes into
13018 +the current directory. uq_file(): ckuus3.c, 10 Aug 2002.
13020 +Found the spot for calling uq_file() for kermit:// URL downloads. Added
13021 +prefatory text to filename prompts for Kermit and FTP downloads. ckcfns.c,
13022 +ckcftp.c, 10 Aug 2002.
13024 +Now with kermit:// or ftp:// URL downloads there's no way to disable the
13025 +prompting. I could easily make SET TERMINAL AUTODOWNLOAD ASK cover these
13026 +cases too (even though "terminal" has nothing to do with FTP or URL
13027 +downloads). OK, I did this, but now prompting is disabled by default.
13028 +ckcftp.c, ckcfns.c. 10 Aug 2002.
13030 +Enabled file prompting (adl_ask) by default in K95G, disabled it by default
13031 +everywhere else. So now FTP and Kermit URL downloads as well as terminal-mode
13032 +Kermit (but not Zmodem) downloads are prompted for if TERMINAL AUTODOWNLOAD is
13033 +ASK, which is it by default only in K95G. But this will happen only if
13034 +uq_file() is filled in for K95G; otherwise everything should work as before.
13035 +ckcmai.c, 10 Aug 2002.
13038 + . Need a better command to control this.
13039 + . FTP URL downloads are almost instantaneous, whereas Kermit URL downloads
13040 + take a really long time to set up (logging in takes at least 10 seconds).
13042 +From Jeff, 13 Aug 2002:
13043 + . Increase K95 version to 2.1.0: ckcmai.c.
13044 + . SET TCP { HTTP-PROXY, SOCKS-SERVER } /USER: /PASSWORD: actions: ckuus3.c.
13046 +From PeterE: a new install target that's only about half as a big as the
13047 +previous one, yet still generates an UNINSTALL script. makefile, 13 Aug 2002.
13049 +Vace wanted to be able to give the FTP client an offset for the server time,
13050 +in case the server's time (or timezone) is set incorrectly. I added this by
13051 +building on all the date/time parsing/arithmetic code -- notably delta times
13052 +-- that was done for C-Kermit 8.0. The new command is SET FTP
13053 +SERVER-TIME-OFFSET delta-time; shows up in SHOW FTP and HELP SET FTP.
13054 +ckcftp.c, 13 Aug 2002.
13056 +Fixed HELP ASK and HELP GETOK text. ckuus2.c, 14 Aug 2002.
13058 +Fixed GETOK to accept /GUI switch even in K95.EXE and C-Kermit, just like ASK
13059 +does (in which case, it just ignores it). ckuus6.c, 14 Aug 2002.
13061 +SET XFER CHAR TRANSPARENT no longer disables character-set translation because
13062 +file-scanning turns it back on. The "new way" to disable character-set
13063 +translation is SET XFER TRANSLATION OFF. This needlessly confuses users who
13064 +expect the old way to still work. So I fixed SET XFER CHAR TRANSPARENT to set
13065 +XFER TRANSLATION OFF, and SET XFER CHAR anything-else to set it back ON.
13066 +ckuus3.c, 15 Aug 2002.
13068 +Fixed SET TERM AUTODOWNLOAD { ON, OFF } to turn off the ASK flag (adl_ask).
13069 +ckuus7.c, 16 Aug 2002.
13071 +Added FEAT query to FTP client from draft-ietf-ftpext-mlst-13.txt. FEAT is
13072 +sent along with REST 0, MODE S, and STRU F if /NOINIT is not included in the
13073 +FTP OPEN command. Parsing the FEAT result is handled by turning the "auth"
13074 +argument to getreply() into a function code: GRF_AUTH to parse AUTH reply;
13075 +GRF_FEAT to parse FEAT reply. For GRF_FEAT, getreply() fills in a flag array,
13076 +sfttab[] (server feature table); sfttab[0] > 0 means server responded to the
13077 +FEAT query, in which case individual elements are set > 0 for each supported
13078 +feature. ckcftp.c, 18 Aug 2002.
13080 +If server sends a feature list, display it if FTP DEBUG is on, then set mdtmok
13081 +and sizeok (the flags that say whether it's OK to send MDTM and SIZE commands)
13082 +accordingly. If user gives an [M]PUT /RECOVER command and server has
13083 +announced it doesn't support REST, print a warning but try anyway (maybe
13084 +change this later). Responses about other features that we use such as AUTH
13085 +and PBSZ are ignored for now -- i.e. we try them anyway. And of course
13086 +responses for features we don't care about (LANG, TVFS, PROT) are ignored.
13087 +ckcftp.c, 18 Aug 2002.
13089 +If the server says it supports MLST, use MLSD instead of NLST to get the file
13090 +list. This is done in remote_files() with some simple string-twiddling. Then
13091 +replace the relevant (but not all) SIZE commands with code to first check if
13092 +we already got the size from the MLSD response and use that instead rather
13093 +than asking again. Same deal for MDTM. ckcftp.c, 18 Aug 2002.
13095 +Checked that this works when giving pathnames in the MGET filespec. Checked
13096 +to make sure everything works as before with servers that don't support FEAT
13097 +or MLSD. Checked to make sure FTP OPEN blah /NOINIT worked with servers that
13098 +do support FEAT and MLSD. Checked that FTP CHECK works. It's all OK.
13100 +Tested only with Ipswitch server; need to find and test with others.
13102 +The stack of temp files needed for MGET /RECURSIVE is annoying because what
13103 +if we run out of file descriptors... But the spec doesn't provide a way to
13104 +request a recursive listing.
13106 +Supplied a missing comma in HELP SET CD text. ckuus2.c, 19 Aug 2002.
13108 +Generalized parsing of MLST/MLSD file facts and values. Got file type from
13109 +server and had MGET skip non-regular files. ckcftp.c, 19 Aug 2002.
13111 +Kirk Turner-Rustin <ktrustin@owu.edu> reported that if Unix C-Kermit has a SET
13112 +HOST PTY connection (e.g. SSH) open, local window size changes are not
13113 +propogated through the connection to the host. I imagine that must be because
13114 +the SIGWINCH signal is caught by Kermit and its children don't see it; maybe
13115 +if I pass it along to the child fork, all will be OK. Began by exporting
13116 +"slavepid" from the pty module and changing its name to pty_fork_pid. Moved
13117 +the SIGWINCH handler, winchh(), from ckctel.c to ckutio.c. Armed it from Unix
13118 +sysinit() so it's always armed. This way window changes affect Unix C-Kermit
13119 +no matter what mode it's in: tt_rows, tt_cols, cmd_rows, and cmd_cols are all
13120 +kept in sync. Then if we're not in remote mode (i.e. we have a ttyfd), we
13121 +call tn_snaws() and rlog_snaws() (which should be ok since they return right
13122 +away if the appropriate kind of connection is not open) and then if
13123 +(pty_fork_pid > -1), a SIGWINCH signal is sent to it. ckupty.c, ckctel.c,
13124 +ckutio.c, 20 Aug 2002.
13126 +All this works fine except the PTY part; in other words, the original problem
13127 +is not fixed. The "kill(pty_fork_pid,SIGWINCH)" call executes without error
13128 +but has no effect because the size of the PTY never changed. To make this
13129 +work I had to add an ioctl() to change the size of the PTY before sending it
13130 +the SIGWINCH. Compiles and works ok on Linux and Solaris; Kirk also confirmed
13131 +it for AIX 4.3.3. ckutio.c, 20 Aug 2002.
13133 +Fixed xlookup() to work for uppercase keywords. ckucmd.c, 20 Aug 2002.
13135 +Fixed FTP parsefeat() and parsefacts() to use xlookup() instead of lookup(),
13136 +since abbreviated keywords are not allowed. ckcftp.c, 20 Aug 2002.
13138 +Adjusted some lines from yesterday's window-size code for platforms I hadn't
13139 +tried yet. ckutio.c, 21 Aug 2002.
13141 +EXIT from K95 when it has an FTP connection open and it pops up the
13142 +Locus dialog. Made it not do this if it knows it's in the act of EXITing.
13143 +ckuus[rx].c, 22 Aug 2002.
13145 +In K95, FTP GET in ASCII mode results in a file with Unix line terminators
13146 +even though the protocol is correct:
13149 + 150 Opening ASCII mode data connection for smjulie.txt (1878 bytes).
13151 +The source file is a regular Unix text file with LF at the end of each line.
13152 +It's incredible that nobody noticed this before. It only came to light when
13153 +somebody tried to open a downloaded text file with Notepad, which doesn't
13154 +handle Unix-format files (Wordpad and Emacs have no problems with them). The
13155 +problem was in doftprecv2() in the FTT_ASC section. There was no conditional
13156 +code for Unix vs Windows. In all cases, the code discarded incoming CR's in
13157 +ASCII mode. I put the CR-discarding code in #ifdef UNIX..#endif. ckcftp.c,
13160 +Removed super-verbose debugging from gtword(): ckucmd.c, 23 Aug 2002.
13162 +Gregory Bond reported a problem with "if defined \$(BLAH) ..." inside of a
13163 +SWITCH statement. It wasn't really the SWITCH that was doing it, it was the
13164 +fact that he had enclosed the SWITCH case in braces, which made it an
13165 +"immediate macro" (XXMACRO). The XXMACRO code parsed the macro definition
13166 +(the part inside the braces) with cmtxt(...,xxstring), which should have been
13167 +cmtxt(...,NULL) to defer the evaluation of the interior of the macro until it
13168 +was executed. This is better illustrated with the following example:
13170 + { echo START, for \%i 1 3 1 { echo \%i }, echo STOP }
13172 +which totally fell on its face prior to the fix. Also fixed ?-help for
13173 +immediate macros, which was broken too. ckuusr.c, 23 Aug 2002.
13175 +RFC959 says STOU does not take an argument. But every FTP server I've
13176 +encountered but one accepts the arg and constructs the unique name from it,
13177 +which is better than making up a totally random name for the file, which is
13178 +what RFC959 calls for. Especially because there is no way for the client to
13179 +find out the name chosen by the server (because RFC 959 and 1123 are
13180 +contradictory, plus no servers follow either one of them for this anyway). So
13181 +we try STOU with the argument first, which works with most servers, and if it
13182 +fails, we retry it without the arg, for the benefit of the one picky server
13183 +that is not "liberal in what it accepts" UNLESS the first STOU got a 502 code
13184 +("not implemented") which means STOU is not accepted, period (which happens
13185 +with ProFTPD). ckcftp.c, 25 Aug 2002.
13187 +Added SET FTP ANONYMOUS-PASSWORD (plus help text and show value). ckcftp.c,
13190 +Made FTP command "not available" if NOFTP is defined. ckuusr.c, 25 Aug 2002.
13192 +Forced client to send a TYPE command upon initial connection, since given
13193 +the variable quality of FTP servers, it's not safe to assume the server is
13194 +in ASCII or any other particular mode. ckcftp.c, 25 Aug 2002.
13196 +SET FTP CHARACTER-SET-TRANSLATION ON is completely broken in K95, although it
13197 +works fine in C-Kermit. Furthermore it is broken in both the GUI and Console
13198 +versions, so it's not a Unicode vs OEM console-character-set issue.
13200 +Added Concurrent PowerMAX OS target from Tom Horsley. makefile, ckuver.h,
13203 +Minor fixes to FTP module from Jeff. ckcftp.c, 27 Aug 2002.
13205 +New Makefile target for Mac OS X 10.2, needs -DNDSYSERRLIST added, from
13206 +William Bader. 2 Sep 2002.
13208 +SET OPT DIR /DOTFILES didn't work for server listings. A few years ago when
13209 +I front-ended zxpand() with nzxpand(), I missed a couple places where
13210 +traverse() needed to refer to xmatchdot (nzxpand's argument flag) rather than
13211 +global matchdot. Fixed in traverse(): ckufio.c, 2 Sep 2002.
13213 +From Jeff, 4 Sep 2002:
13214 + . setautodl(x) -> setautodl(x,y): ckuusr.h, ckuus[7y].c
13215 + . Add another parameter to popup_readblah(): ckuus6.c
13216 + . Sort out some confusion in scanfile() where a parameter was also used as a
13217 + local flag. ckuusx.c.
13218 + . Protect restoring of saved terminal idle parameters with a flag that says
13219 + they were actually saved. ckuusr.c.
13220 + . Rework uq_text() and uq_mtxt(). ckuus3.c.
13221 + . Fix FTP charset translation for little-endian hardware: ckcftp.c.
13223 +The latter still doesn't work in Linux:
13225 + (/home/fdc/kermit/) C-Kermit>set ftp server-character-set latin1-iso
13226 + (/home/fdc/kermit/) C-Kermit>set file character-set utf8
13227 + (/home/fdc/kermit/) C-Kermit>get latin1.txt
13229 +Results in "????????: file not found". But it works fine on the Sun.
13231 +Jeff's patch removed a little-endian byte-swap (LEBS) from doftpsend2(). But
13232 +the real problem was that LEBS was not being done consistently throughout the
13233 +module. There were similar xgnbyte()/xpnbyte() loops elsewhere in the code,
13234 +and all of them needed to work the same way. Undoing Jeff's fix and then
13235 +adding the LEBS to the loop in getreply() makes downloads work right, but the
13236 +messages are still messed up (they come out in Chinese :-) Begin by moving all
13237 +byte-swapping operations that occur in ckcftp.c itself into a new function,
13238 +bytswap(). It's either right to do it all the time, or to do it never; this
13239 +way we can turn it on and off in one place.
13241 +xp/gnbyte() include behavior that depends on what Kermit is doing: W_SEND,
13242 +etc. xpnbyte() tests W_KERMIT, which is a combination of W_SEND, W_RECV, etc.
13243 +Defined a new symbol W_XFER, which is like W_KERMIT but includes W_FTP. These
13244 +are all the "whats" in which character sets might need to be converted.
13245 +Changed the W_KERMIT reference in xpnbyte() to W_XFER. Fixed the inderminate
13246 +"what" state after an FTP command by moving "what = W_COMMAND;" from before
13247 +the main parse loop to inside it (this didn't matter before the addition of
13248 +FTP but now it does). ckcker.h, ckcftp.c, ckuus5.c, 6 Sep 2002.
13250 +Finally I changed xlatec() to be consistent with all the other xgnbyte() /
13251 +xpnbyte() usage throughout the FTP module and, poof, everything worked in
13252 +Linux (and still works on the Sun). We still need some work in Windows (where
13253 +the file character-set is not necessarily the console character set for
13254 +messages) but we can tackle that next. ckcftp.c, 6 Sep 2002.
13256 +Checking yesterday's work:
13258 +Kermit file transfers with charset translation work fine in both directions.
13260 +FTP GET with charset translation works fine on both BE and LE
13262 +Fixed a typo in yesterday's changes that made FTP PUT with charset translation
13263 +always upload 0-length files. ckcftp.c, 7 Sep 2002.
13265 +FTP PUT (after the typo was fixed) with charset translation works fine on BE,
13266 +but on LE the message comes out in Chinese and the resulting file gets ? or
13267 +nothing for all for the accented letters:
13271 + BE OK OK OK OK xx
13272 + LE no OK OK OK xx
13274 +xx = C-Kermit CONNECT mode with translation doesn't seem to do anything, not
13275 +only in today's code, but also in the 8.0 release version: "set term char
13276 +latin1 utf8" -- SHOW CHAR shows the right stuff, but no translation is done.
13277 +Ditto for the 7.0 release. That can't be right...
13279 +But one problem at a time -- what's wrong with LE FTP uploads? Note that
13280 +XLATE works on the same machine, so it's obviously confusion in xgnbyte()
13281 +about "what". Suppose we make xgnbyte() ALWAYS return bytes in BE order.
13282 +This makes sense because xgnbyte() is almost always used to feed xpnbyte(),
13283 +and xpnbyte() requires its bytes to come in BE order. This means that all
13284 +code that uses xgnbyte()/xpnbyte() loops can be simplifed, which I did for
13285 +the FTP module. ckcfns.c, ckcftp.c, 7 Sep 2002.
13287 +Of course Kermit protocol uses xgnbyte() too, but only for filling
13288 +packets, and packets never contain UCS2 and even if they did, it would have
13289 +to be big-endian, so no changes needed for getpkt(). Now we have:
13296 +Now let's look at the remaining xgnbyte() calls in the rest of the code:
13299 + xlate() uses it of course. I simplified the general-case loop.
13300 + Works OK on both Sun and Linux.
13303 + typegetline() uses it. I commented out the byte swap. Seems OK.
13305 +Built and tested on Linux, Solaris, and SunOS. I'm sure I must have broken
13306 +something, but the main things are better than they were. Kermit and FTP
13307 +transfers need testing in K95, as well as the TYPE command (there's a bunch of
13308 +special K95 code in there). C-Kermit charset translation during CONNECT is
13309 +still broken, or else I forgot how to use it, but that's a separate issue
13310 +since xgnbyte()/xpnbyte() are not involved. And we still need to do something
13311 +in FTP getreply() for K95 to convert messages to the console character set for
13312 +display, rather than the file character set (should be trivial). Also there's
13313 +still a lot of extra debugging and commented-out junk in ckcftp.c to be
13314 +cleaned up after more testing.
13316 +During yesterday's testing, I noticed that REMOTE SET { FILE, XFER }
13317 +CHARACTER-SET didn't work. The server accepted these commands but they didn't
13318 +seem to do anything. In fact, they did work, but they were undone later by
13319 +code in sfile() that restored the global settings in case they had been
13320 +temporarily overridden by autoswitching or whatever. The solution is to
13321 +"unsave" the saved values whenever a global setting is performed explicitly.
13322 +Tested successfully against Sun and Linux servers. Also the server end of
13323 +REMOTE SET needed updating for Unicode. ckcfn[s3].c, ckuus3.c, 8 Sep 2002.
13325 +Cleaned commented-out cruft and extra debugging from ckcftp.c. 8 Sep 2002.
13327 +Kermit autodownload with ASK file dialog: if user supplied an absolute
13328 +pathname, it was treated like a relative one. Fixed the invocation of
13329 +uq_file() in rcvfil() to temporarily override the RECEIVE PATHNAMES setting.
13330 +ckcfns.c, 10 Sep 2002.
13332 +Added SET TERMINAL ROLL KEYSTROKES { SEND, RESTORE-AND-SEND, IGNORE }, parse
13333 +only. Needs implementation (search for tt_rkeys and rollkeytab in ckuus7.c).
13334 +ckuusr.h, ckuus[27].c, 10 Sep 2002.
13336 +If FILE INCOMPLETE is DISCARD and a file is being received by IKSD but IKSD
13337 +gets a Telnet LOGOUT command, the partial file is not deleted. In fact this
13338 +happens any time doexit() is called for any reason during file reception,
13339 +e.g. because of SIGHUP. Added code to doclean() to check if a download
13340 +output file was open, and if so, to delete it after closing it if keep==0.
13341 +ckuusx.c, 10 Sep 2002.
13343 +Added a brief one-line message after remote-mode file transfer saying
13344 +what (or how many) file(s) were transferred, where they went, and whether
13345 +the transfer was successful -- kind of an automatic WHERE command, useful
13346 +with autodownloads so you know what happened. ckcpro.w, 11 Sep 2002.
13348 +The Unix and VMS C-Kermit CONNECT modules have botched remote-charset to
13349 +local-UTF8 translation ever since the Unicode was first added in v7.0. Fixed
13350 +in ckucns.c, ckucon.c, ckvcon.c, 11 Sep 2002.
13352 +On to pattern-matching... The matchdot business should apply only for (Unix)
13353 +filename matching, not for general string matching. Fixed in ckmatch():
13354 +ckclib.c, 11 Sep 2002.
13356 +A bigger problem occurs in filename matching. Somehow the dirsep == fence
13357 +business interferes with matching {foo,bar,baz} segments. For example, I have
13358 +a filename "foo" and I want to match it with the pattern "{foo,bar}". Somehow
13359 +the segment pattern becomes "*/foo" and doesn't match the string. Where does
13360 +the '/' get tacked on? I don't even know how to explain this, but the short
13361 +story was that ckmatch(), under certain circumstances, would back up to before
13362 +the beginning of the filename string, which just happened to contain a "/"
13363 +(and before that a ".") because of who was calling it. Obviously this is not
13364 +how to write a pattern matching function... Ensuring that it never backs up
13365 +beyond the beginning of a string fixed the immediate problem and does not seem
13366 +to have broken any other matching scenarios (I have 150 of them in my test
13367 +script). ckclib.c, 11 Sep 2002.
13369 +There's still a problem though. Suppose the a client sends "dir {{.*,*}}" to
13370 +a server. This asks for a directory listing of all files that begin with
13371 +dot as well as all files. Still doesn't work because we don't normally show
13372 +dot-files, but in this case it SHOULD work because ".*" was explicitly
13373 +requested. Staring at the ckmatch() code revealed how to fix this, and I did,
13374 +but that was only half the problem. The other half was that the list of
13375 +files being fed to ckmatch() did not include the dotfiles in the first place.
13376 +The cure here is to change nzxpand() to prescan the pattern to see if it
13377 +includes a leading dot, and if so to set the "xmatchdot" flag itself, even
13378 +if it wasn't set by the caller. ckclib.c, ckufio.c, 11 Sep 2002.
13380 +Now that {foo,bar,...} patterns work better, I added a quick hack to the
13381 +DIRECTORY command to allow multiple filespecs to be given, in which case we
13382 +combine them into a {file1,file2,...} pattern before calling nzxpand(). Works
13383 +fine but it's a hack because you don't get file lists upon "?" in the second
13384 +and subsequent filespec fields, but I doubt anyone will notice. So now,
13385 +finally, people can do "dir .* *" like they do in Unix (except with ls) to get
13386 +a listing of all files in a directory without having to know about or use the
13387 +/DOTFILES switch. This was NOT done for the server end of RDIR because of
13388 +ambiguity of spaces as separators versus filename characters.) domydir():
13389 +ckuus6.c, ckuus[r2].c, 11 Sep 2002.
13391 +Added a CONTINUE command. In a script, this does whatever CONTINUE did before
13392 +(e.g. in a FOR or WHILE loop). At the prompt, it calls popclvl(), which gives
13393 +a more natural way to continue a script that has "shelled out" to the prompt.
13394 +ckuusr.[ch], 11 Sep 2002.
13396 +Added help text for CONTINUE. ckuus2.c, 12 Sep 2002.
13398 +From Jeff, 16 Sep 2002:
13399 + . SET TERM ROLL KEYSTROKES for K95: ckuusr.h, ckuus7.c
13400 + . Remove the doexit() call from the Telnet TELOPT_LOGOUT handler: ckctel.c
13402 +Fixed an FTP debug message to be consistent with Kermit ones.
13403 +ckcftp.c, 16 Sep 2002.
13405 +Added SET/SHOW TRANSFER REPORT to turn the post-transfer report off and on.
13406 +ckuusr.h, ckuus[234].c, 16 Sep 2002.
13408 +Fixed Solaris (and maybe some other SVORPOSIX builds) to find out their full
13409 +hostname rather than just short form (e.g. watsol.cc.columbia.edu rather than
13410 +just watsol). ckhost(): ckuusx.c, 16 Sep 2002.
13412 +"cat somefile | kermit -Ts -" is supposed to send stdin in text mode, but
13413 +K95's file transfer display reports BINARY. Looked at C-Kermit code; it seems
13414 +fine. Looked at packet and debug logs; C-Kermit was indeed sending in text
13415 +mode and announcing it correctly. K95 gattr() is doing the right thing:
13417 + gattr file type[AMJ]=3
13418 + gattr attribute A=text=0
13419 + gattr sets tcharset TC_TRANSP[A]
13421 +Same thing happens when C-Kermit is receiving. Yet when I send an actual
13422 +file, rather than stdin, it's received in text mode. The only difference is
13423 +that stdin does not have a Length attribute in its A-packet, so in this case
13424 +the receiver skips any calls to screen() that show the length or percent done.
13425 +Aha, so maybe it's just a display problem -- scrft() is not being called to
13426 +repaint the file type if the size was not known. Fixed in opena() by
13427 +removing the IF clause from "if (fsize > -1L) xxscreen(SCR_FS,0,fsize,"");".
13428 +ckcfn3.c, 18 Sep 2002.
13430 +K95 user has a listfile containing some regular filenames and then some
13431 +filenames that include paths and has all kinds of problems with MGET /LISTFILE
13432 +(pieces of different names concatenated to each other, etc). Setting up the
13433 +same scenario here, I don't see the same problems but I do see "Refused: Name"
13434 +when we go to get a path/name file. This happens because (a) we had already
13435 +got a top-level file with a certain name, (b) a file in a subdirectory has the
13436 +same name, (c) we are stripping the path before calling zchki(), and (d)
13437 +FTP COLLISION is set to DISCARD. How do we make FTP not strip the path?
13439 +This is an interesting question... The answer depends on where the user
13440 +wants the file to go. Normally if you tell an FTP client to "get foo/bar",
13441 +you want the file "bar" to be downloaded to the current directory.
13443 +Anyway, it turns out the FTP module uses paths locally during MGET only if
13444 +/RECURSIVE was specified. So:
13446 + mget /listfile:blah /recursive
13448 +should have made this work, but it didn't because in the /LISTFILE case,
13449 +we have effectively turned an MGET into a series of GETs, where the code to
13450 +check whether to strip the path didn't check the recursive flag because how
13451 +could a GET (as opposed to an MGET) be recursive? Adding this exception to
13452 +the if-condition got us a bit farther but now when we try to open the output
13453 +file in doftprecv2(), zopeno() fails because the name contains a dirsep.
13454 +We have to call zmkdir() first but that wasn't happening because some other
13455 +flag wasn't set right in this case. Finally zmkdir was called, but with
13456 +the wrong string. After fixing that, it works. Now we should be able
13457 +to use /RECURSIVE to force the pathname to be used on the local end.
13458 +ckcftp.c, 19 Sep 2002.
13460 +Checked FTP filename conversion issues. FTP FILENAMES AUTO is supposed to
13461 +mean LITERAL if "wearealike" OR server is UNIX or Windows, otherwise
13462 +CONVERTED, but there were places where this rule was not applied consistently,
13463 +fixed now. ckcftp.c, 21 Sep 2002.
13465 +Added SET FTP DISPLAY, which is like SET TRANSFER DISPLAY but applies only to
13466 +FTP, mainly because I tended to type it all the time. Now if you have dual
13467 +sessions, each session can have its own transfer display style. ckcftp.c,
13468 +ckuusr.h, ckuus[347].c, 21 Sep 2002.
13470 +Back to FTP MLSD. We're supposed to match the pattern locally, not rely on
13471 +the server to filter its list according to the client's pattern. Thus we must
13472 +also allow an empty argument to MGET and must not send a filespec with MLSD.
13473 +Actually this is tricky -- how is the client supposed to know whether to send
13474 +a filespec. For example, if the user's command is "mget foo*bar", and the
13475 +server supports MLSD, then what should the client do? The client does not
13476 +know the wildcard syntax on the server, so for all the client knows, this
13477 +might be a valid directory name, in which case it should be sent. On the
13478 +other hand, the user might intend it as a wildcard, in which case it should
13479 +NOT be sent. But the FTP client can't read the user's mind. This is another
13480 +serious flaw in the Elz/Hethmon draft. Anyway, I got the local matching
13481 +business working for MLSD as long as the user's MGET arg is really a pattern
13482 +and not a directory name. To be continued... ckcftp.c, 21 Sep 2002.
13484 +Added FTP { ENABLE, DISABLE } { FEAT, MLST }. If we always send FEAT, we
13485 +usually get a complaint. If we send FEAT and MLST is negotiated, there is a
13486 +good chance it is misimplemented or will have undesirable side effects, such
13487 +as sending huge file lists. NOTE: /NOINIT on the FTP OPEN command also
13488 +disables both of these. ckcftp.c, 22 Sep 2002.
13490 +Fixed mkstemp() code in FTP remote_files(). mktemp() does not open the file,
13491 +mkstemp() does open it; previously we had been opening it again and never
13492 +closing the first instance so every MGET would create another open file
13493 +descriptor. ckcftp.c, 22 Sep 2002.
13495 +Added debug messages for temp-file creation and lines read from the temp file.
13496 +ckcftp.c, 22 Sep 2002.
13498 +Eliminated sending of some extraneous TYPE commands, but there's still room
13499 +for improvement. ckcftp.c, 22 Sep 2002.
13501 +Moved definition of build date to top of ckcmai.c. 22 Sep 2002.
13503 +Added recursion to MGET with MLSD... It's all done in remote_files().
13504 +Temp-file pointers are on a stack (max size 128). When parsing MLSD lines
13505 +from the temp file and we see "type=dir", we create the local directory by
13506 +calling zmkdir(), change to the remote by sending CWD, increment the depth,
13507 +and call ourselves. When reading from a temp file, upon EOF we close and
13508 +dispose of the temp file, return -3 if currently at top level, otherwise we
13509 +free the tmpfile name, decrement the depth, send CDUP to the server, "cd .."
13510 +locally, and go back and read the next line from the previous but now current
13511 +temp file. Conceptually simple but needed hours of debugging -- what must
13512 +be static, what must be on the stack... Seems OK now but still needs some
13513 +heavy testing. ckcftp.c, 22 Sep 2002.
13515 +Added FTP { ENABLE, DISABLE } { SIZE, MDTM } and add help text for FTP
13516 +ENABLE and DISABLE. ckcftp.c, 23 Sep 2002.
13518 +Don't allow restart if SIZE disabled. ckcftp.c, 23 Sep 2002.
13520 +Make sure all implicit SIZE commands are surpressed if SIZE disabled.
13521 +ckcftp.c, 23 Sep 2002.
13523 +If an explicit FTP MODTIME command is sent when MDTM is DISABLED, and it
13524 +succeeds, re-ENABLE MDTM. Ditto for SIZE. ckcftp.c, 23 Sep 2002.
13526 +If an explicit FTP FEATURES command is sent during an FTP session, redo the
13527 +features database from it. ckcftp.c, 23 Sep 2002.
13529 +After further discussion with Robert Elz, I realized I had to expose the
13530 +underlying MGET mechanisms to the user; the draft isn't going to change, and
13531 +the new spec will result in undesirable effects if the client tries to "do the
13532 +right thing" by magic in all situations; thus the user must have some new
13535 + MGET [ /MLST, /NLST, /MATCH:xxx ] [ filespec [ filespec [ ... ] ] ]
13537 +These switches let the user force the use of MLSD or NLST when there's a
13538 +choice, and to force local use of a pattern rather than sending it to the
13539 +server, and even to send a directory name to the server at the same time as
13540 +specifying a pattern for local matching, and of course by default we try to do
13541 +the right thing in all scenarios. Symbols only; not coded yet. ckuusr.h,
13544 +Added the three new switches to MGET, plus /MLST is an invisible synonym for
13545 +/MLSD. If /NLST or /MLSD is given it, it forces the corresponding FTP protocol
13546 +directive. ckcftp.c, 25 Sep 2002.
13548 +Now for the tricky part: now we have two separate concepts for what to send to
13549 +the server: a filename or wildcard to be interpreted by the server (NLST only)
13550 +or a directory from which to get a list of all the files (NLST or MLSD),
13551 +possibly together with a pattern to be used by the client to match filenames
13552 +returned by the server. This required giving remote_files() an additional
13553 +argument. Now it uses "pattern" (if any) strictly for local pattern matching
13554 +(because now it is the /MATCH: switch argument, not the MGET filespec), and
13555 +"arg" (the MGET filespec) is what it sends to the server, maybe (see the
13556 +comments in the code for the actual details); either or both these can be
13557 +null. ckcftp.c, 25 Sep 2002.
13559 +Discovered that "mget foo", where foo is a directory name, never worked.
13560 +Fixed in remote_files(): ckcftp.c, 25 Sep 2002.
13562 +Going through every combination of NLST, MLSD, /MATCH:, and MGET arg and
13563 +debugging each case until OK... Then also with the panix.com NetBSD server
13564 +(lukemftpd 1.0) which also supports MLSD.... 11 test cases all debugged and
13565 +tested OK. ckcftp.c, 26 Sep 2002.
13567 +Added /NODOTFILES switch to FTP MGET, to control what happens with dot-files
13568 +if the server includes their names in the list (as lukemftpd does). There's
13569 +no point in adding a /DOTFILES switch because what could it possibly do?
13570 +ckcftp.c, 26 Sep 2002.
13572 +Changed a bunch of "skipthis++" to "continue" in doftpget(), to avoid
13573 +error messages when skipping files that user said she wanted to skip.
13574 +ckcftp.c, 26 Sep 2002.
13576 +Added help text for the new MGET switches. ckcftp.c, 26 Sep 2002.
13578 +Don't switch LOCUS when making an FTP connection until logged in.
13579 +ckcftp.c, 26 Sep 2002.
13581 +Fixed LDIR to run Kermit's built-in DIRECTORY code rather than the external
13582 +directory program. ckuusr.c, 26 Sep 2002.
13584 +Protect iswild() against NULL args. ckufio.c, 26 Sep 2002.
13586 +From Jeff: SET GUI WINDOW RUN-MODE { MAXIMIZE, MINIMIZE, RESTORE },
13587 +plus variables for GUI Window X position, GUI Window Y position, GUI
13588 +Window X resolution, GUI Window Y resolution, GUI Window Run mode.
13589 +ckuusr.h, ckuus[24].c, 27 Sep 2002.
13591 +From Ronan Flood: updated FreeBSD 1.0 makefile entry, plus an #ifdef to protect
13592 +sysconf() calls. makefile, ckutio.c, 28 Sep 2002.
13594 +Change ftp_auth() to return(0) if an AUTH command gets a 500 response, so it
13595 +doesn't keep sending other kinds of AUTH commands. ckcftp.c, 29 Sep 2002.
13597 +Changes from Jeff to yesterday's changes. ckcftp.c, 30 Sep 2002.
13599 +From Jeff: SSH command-line personality. Uses same command line as the Telnet
13600 +personality. ckcker.h, ckcmai.c, ckuus[4y].c, 3 Oct 2002.
13602 +From Jeff, 7 Oct 2002:
13603 + . SET PRINTER CHARACTER-SET. ckuxla.c, ckuusr.h, ckuus[25].c
13604 + . Promotion of K95 to Beta.01. ckcmai.c
13605 + . Promotion of SET GUI { MENUBAR, TOOLBAR } to visible. ckuus3.c
13607 +Changed the URL parser as follows: if the username and/or password fields are
13608 +present but empty, as in:
13610 + ftp://@ftp.xyzcorp.com/somepath
13611 + or: ftp://:@ftp.xyzcorp.com/somepath
13612 + but not: ftp://:ftp.xyzcorp.com/somepath
13614 +the pointer for these items becomes a pointer to an empty string, rather than
13615 +a NULL pointer. Then when we go to open the connection, if the username
13616 +string pointer points to an empty string, we prompt for the username (and/or
13617 +password). ckuusy.c 9 Oct 2002.
13619 +Jason Heskett reported an interesting bug involving a core dump when an
13620 +ON_EXIT macro is defined that executes another macro. Sometimes. He was able
13621 +to send a short command file that always crashed. Diagnosis: ON_EXIT, when it
13622 +is called, pokes itself out of the macro table by setting its own entry in the
13623 +macro name list to an empty string. But this interferes with any macro
13624 +lookups that are done while executing ON_EXIT's body and also evidently some
13625 +code is not happy with empty macro names... To fix: replace "on_exit" with
13626 +"on_exxx", so the replacement keyword is (a) nonempty, and (b) doesn't wreck
13627 +the alphabetical sorting of the table. ckuusx.c, 9 Oct 2002.
13629 +Added makefile targets for FreeBSD 4.6 and 5.0. Built and tested on 4.6;
13630 +don't know about 5.0. ckuver.h, makefile, 9 Oct 2002.
13632 +Added targets for AIX 5.2 and 5.3; totally untested. ckuver.h, makefile,
13635 +Built current source on Unixware 7.1.3 (make uw7); it's fine. 9 Oct 2002.
13637 +Promoted C-Kermit to 8.0.206 Beta.01 in hopes of a simultaneous release
13638 +with K95 2.1. ckcmai.c, 9 Oct 2002.
13640 +From Jeff: Change KERMITFONT definitions to use the new (Unicode 3.1) code
13641 +points for the terminal graphics characters (such as VT100 horizontal scan
13642 +lines), rather than private-use codes. ckcuni.c, 10 Oct 2002.
13644 +Jason Heskett also complained that REMOTE CD would print the name of the new
13645 +directory returned by the server even if he SET QUIET ON. This is a tricky
13646 +one. Which server replies should the QUIET settings apply to? If I give a
13647 +REMOTE DIRECTORY command, it means I want to see the directory listing,
13648 +period. But if I give a REMOTE CD command, I get an "unsolicited" response
13649 +message that SET QUIET ON should suppress. Adding message suppression to
13650 +rcv_shortreply() is close, but not totally right; for example, it also
13651 +suppresses the response to REMOTE PWD, which is not helpful. The only right
13652 +way to do this is to suppress for REMOTE CD only, which can be done only by
13653 +setting a (new) global flag, rcdactive. ckuus[r57].c, ckcpro.w, 10 Oct 2002.
13655 +Ditto for REMOTE LOGIN response message ("Logged in"). ckuus7.c, 11 Oct 2002.
13657 +From Jeff: SET GUI WINDOW FONT { NAME, SIZE }. ckuusr.h, ckuus4.c, 11 Oct 2002.
13659 +Quick preliminary 8.0.206 build-all:
13666 + OK VMS 7.1 Alpha + TCP/IP
13667 + OK VMS 7.1 Alpha nonet
13668 + OK VMS 5.5 VAX + TCP/IP
13669 + OK VMS 5.5 VAX nonet
13670 + OK Unixware 7.1.3
13673 + OK NetBSD 1.5.2 MVME (Gerry B)
13676 +Sinix build got stuck on ckuusr.c even though we're not optimizing on Sinix
13677 +any more. Rebooting the machine fixed it.
13679 +Fixed some #ifdefs for VMS in new incomplete-file deletion code in doclean().
13680 +ckuusx.c, 11 Oct 2002.
13682 +Moved uq_blah() prototypes from ckuusr.h to ckcker.h because these routines
13683 +are called in modules that don't (and shouldn't have to) include ckuusr.h.
13686 +Jeff verified secure builds on Linux and Solaris.
13688 +Custom-build workout: 80 different feature-selection combinations:
13689 + . Fixed yesterday's change for NOSPL: ckcfns.c.
13690 + . Fixed conflict between NORECALL and USE_ARROWKEYS: ckucmd.c.
13691 + . Moved setseslog() from ckuus5.c to ckuusx.c to avoid link-time foulups.
13692 + . Fixed an unguarded reference to zmkdir() in ckcftp.c.
13693 + . Protected rmsg() by #ifndef NOXFER: ckuus7.c.
13694 + . Protected initxlist() by #ifndef NOXFER: ckcmai.c.
13695 + . Fixed unguarded references to g_url struct in xx_ftp(): ckuusy.c.
13696 + . Fixed unguarded references to tt_snaws() in winchh(): ckutio.c.
13698 +--- 8.0.206 Beta.01 11 Oct 2002 ---
13700 +From Jeff, 16 Oct 2002:
13701 + . Fix K95 RMDIR: ckcfn3.c.
13702 + . Makefile targets for Red Hat 7.2, 7.3, 8.0: ckuver.h, makefile.
13703 + . Added \v(log_xxx) for each kind of log for PeterE: ckuusr.h, ckuus4.c.
13704 + . Added SET TERM ATTRIBUTE DIM { ON, OFF }: ckuus[27].c.
13705 + . Change "const" to "CONST" in some PAM declarations. ckufio.c.
13707 +Added SET MATCH { DOTFILE, FIFO } { ON, OFF }. A FIFO special file is a named
13708 +pipe, used for interprocess communication. It must be opened at both ends, so
13709 +it's silly to match them by default; opening a FIFO and attempting to read
13710 +will block forever unless somebody is writing into the other end. Made the
13711 +MATCH FIFO default OFF in all cases. The dotfile default is the same as
13712 +always (OFF for UNIX, ON elsewhere); SET MATCH DOTFILE is simply a more
13713 +untuitive and findable command than SET WILD KERMIT /MATCH-DOT-FILES. Note
13714 +that SET MATCH DOTFILE undoes SET OPTIONS DIRECTORY /[NO]DOTFILES, and vice
13715 +versa. ckcmai.c, ckuusr.h, ckuus[23].c, ckufio.c. 17 Oct 2002.
13717 +Added client and server end of REMOTE SET MATCH { DOTFILE, FIFO } { ON, OFF }.
13718 +The new protocol codes are 330 and 331, respectively. ckuus[367].c, ckcfns.c,
13721 +Adjusted the "match dot if pattern starts with dot" heuristic in nzxpand()
13722 +to not kick in if the filespec is "./foo". This probably needs more work.
13723 +ckufio.c, 17 Oct 2002.
13725 +Fixed typo in transcribing Jeff's ckcfn3.c code from yesterday. 18 Oct 2002.
13727 +Moved some help text out of #ifdef ANYSSH that had nothing to do with SSH.
13728 +(Idea for a new EMACS feature: M-X list-ifdef-environment.)
13729 +ckuus2.c, 18 Oct 2002.
13731 +Removed "set file { permission, protection }" keywords, which led nowhere.
13732 +ckuus7.c, 18 Oct 2002.
13734 +Added -DSV68 to all SV/68 targets. Make ckgetfqhostname() just return its
13735 +argument in SV/68; it dumps core otherwise. In case this happens anywhere
13736 +else, add -DNOCKGETFQHOST to CFLAGS. makefile, ckcnet.c, 18 Oct 2002.
13738 +For PeterE, added SET { SEND, RECEIVE } PERMISSIONS { ON, OFF } so incoming and
13739 +outbound permission attributes can be set separately. ckuus[27].c, 18 Oct 2002.
13741 +Changed SHOW ATTRIBUTES to show In and Out permissions separately.
13742 +ckuus5.c, 18 Oct 2002.
13744 +Fixed REDO to display the command it's redoing and to add it to the bottom
13745 +of the recall buffer. ckuusr.c, 18 Oct 2002.
13747 +Discovered that DATE SATURDAY dumps core... Apparently it always did; this
13748 +case was not included in the date-time torture test script. The crash happens
13749 +because the DATE parsing code doesn't check for a NULL date-converion
13750 +error-message pointer. Fixed in ckuusr.c, 18 Oct 2002.
13752 +The reason DATE SATURDAY got a date-conversion error was that this path thru
13753 +the code left a result pointer unset. Fixed in cmcvtdate(): ckucmd.c,
13756 +DATE SUNDAY +1DAY returned incorrect results (for any day-of-week name, any
13757 +delta time), even though DATE TODAY +1DAY worked fine. Fixed in cmcvtdate():
13758 +ckucmd.c, 19 Oct 2002.
13760 +SET TAKE ECHO ON counted each line twice when GOTO was active. Fixed in
13761 +dogoto(): ckuus6.c, 19 Oct 2002.
13764 +"KERMIT READY TO GET...
13765 + RCVD: (2 files) Last: [/amd/prost/p/kd/jaltman/.src/ckonet.c] (OK)
13766 +the last file attempted may have been ckonet.c but it certainly was
13767 +not the last file received" (similarly for sending). Fixed by having two
13768 +pointers for each name; a preliminary pointer, which is set for each file at
13769 +the beginning of the transfer (when we have all the needed info), and a final
13770 +one that is set from the preliminary one only after the file was transferred
13771 +successfully. This corrects not only the automatic "wheremessage" at the end
13772 +of a remote-mode transfer, but also the WHERE and SHOW FILE command results.
13773 +ckuusx.c, ckcfn[s3].c, ckcpro.w, 19 Oct 2002.
13775 +From Jeff: Improve ORIENTATION message for K95 to say which directories are
13776 +for which INI files. ckuusr.c, 23 Oct 2002.
13778 +Removed Beta designation from herald. ckcmai.c, 23 Oct 2002.
13780 +Put final dates and ID strings in Unix and VMS build procedures.
13781 +Makefile, ckvker.com, 23 Oct 2002.
13783 +Build-all... #ifdef adjustments: ckcfns.c... 83 different feature-set
13784 +combinations build OK on Linux. 23 Oct 2002.
13786 +From Jeff: SET WIN95 HORIZONTAL-SCAN-LINE-SUBSTITUTIONS. ckuusr.h, ckuus7.c,
13789 +Fixed Heath-19 graphic character-set table to use new Unicode 3.1 values
13790 +if WIN95 HORIZ OFF. ckcuni.c, 24 Oct 2002.
13792 +Changed tx_usub() to return Unicode 3.1 values if WIN95 HORIZ OFF.
13793 +ckcuni.c, 24 Oct 2002. <-- No backed off on this.
13795 +Some problems during build-all:
13797 + . VMS 7.1 TGV 4.2: If I make a Telnet connection with it, then try to send
13798 + a file (itself. wermit.exe) over the connection, the connection drops
13799 + after about 20%, the thermometer zooms out to 100% and SUCCESS is reported.
13800 + This doesn't happen with UCX.
13802 + . VMS 7.3 TGV 4.3: ckcmai.c won't compile because of a complaint about the
13803 + declaration of select() (which ckcmai.c doesn't use) in
13804 + SYS$COMMON:[SYSLIB]DECC$RTLDEF.TLB. Ditto in VMS 7.2 TGV 4.3.
13805 + Adding NOSELECT to CFLAGS doesn't help. I don't think the VMS version
13806 + even uses select(). But the TGV 4.3 builds were OK in 8.0.201, so what
13807 + changed? I don't see anything in ckcnet.h that would have done it.
13809 +It builds OK with VMS 7.1 / TGV 4.2 but sending files on Telnet connections
13810 +fails in a strange way: the connection drops, but the thermomoter goes to 100%
13811 +and success is reported. I don't know why the connection is dropping (s_errno
13812 +is 32 == "broken pipe"), but the spurious success indication is because of
13813 +a double failure in sdata(): (1) The packet-sending loop index could go
13814 +negative without breaking the loop when streaming; (2) if spack() fails,
13815 +sdata() should return -2, not -1 (which means EOF). Also if any ttchk() in
13816 +sdata() returns < 0, sdata should return -2. I fixed this code (which has
13817 +been this way for YEARS) and now VMS C-Kermit properly fails when it gets
13818 +the spack() error, but ttchk() in this case still doesn't think the connection
13819 +is lost, but that must be our new problem with MultiNet. ckcfns.c,
13822 +The compilation failure in ckcmai.c is a clue... The problem was that I added
13823 +#ifdef VMS / #include <time.h> / #endif to shut up complaints about the time()
13824 +call. Evidently something in VMS <time.h> gives MultiNet a bad case of
13825 +indigestion; removing it fixes the compilation and the result works fine. The
13826 +transmission failures in the other case seem to be a coincidence -- something
13827 +to do with the U of Arizona (probably some obscure VMS quota on my IDs there,
13828 +or some kind of network connection throttling), since it doesn't happen
13829 +anywhere else. ckcmai.c, 27 Oct 2002.
13831 +Changed four occurrences of "void" to "VOID" in ckcftp.c, 27 Oct 2002.
13833 +Defined NOCKFQHOSTNAME for HPUXPRE65. Might also need this for HP-UX 7
13834 +and maybe 8. ckcnet.c, 27 Oct 2002.
13836 +From Jeff: PAM_CONST definition to clear up warnings caused by different
13837 +vendors' definitions of PAM structs. ckufio.c, 28 Oct 2002.
13839 +Unixware 2.1.0 build bombs immediately with "UX:make: ERROR: line too long"
13840 +(which line?) Not worth chopping up the makefile to fix but in a pinch it
13841 +could be done. 2.1.3 builds OK.
13843 +Did another 20-some platform builds, bringing the total to 83, plus a final
13844 +runthrough of the build-with-84-different-feature-set-combinations script on
13845 +Linux. Should be good to go!
13847 +--- 8.0.206 24 Oct 2002 ---
13849 +Finally got access to Linux on IA64 again. Builds OK but dumps core
13850 +immediately on startup. Adding -DNOCKGETFQHOST was necessary but not
13851 +sufficient. In this case, the very call to ckgetfqhostname() from ckhost()
13852 +(which is in ckuusx.c) was dumping core; thus I had to move the definition of
13853 +NOCKGETFQHOST from ckcnet.c to ckcdeb.h, add an #ifdef __ia64__ clause to it,
13854 +and protect the call to ckgetfqhostname() with it. Obviously there has to be
13855 +a better fix but this will have to for now. ckcnet.c, ckuusx.c, ckcdeb.h,
13858 +Link step fails in Mandrake 9.0 with undefined references to res_search,
13859 +dn_expand, and crypt. Turns out the linux makefile target tests for the
13860 +existence of libcrypt.a and libresolv.a, but in Mandrake 9.0 they exist
13861 +only as *.so. Changed linux target to look for both. makefile, 1 Nov 2002.
13863 +Vace reported that "ftp mget a b c" would get ALL files from the server's
13864 +directory if c did not exist. Diagnosis: off-by-one error in counting MGET
13865 +args processed. Naturally fixing this bug revealed another (this time
13866 +cosmetic) one, which resulted in spurious error messages when hitting MGET
13867 +args that have no match on the server. Fixed in ckcftp.c, 1 Nov 2002.
13869 +Rebuilt about 60 of the most important Unix binaries to pick up the fixes
13870 +31 Oct - 1 Nov 2002, and refreshed the FTP site with new sources, tarballs,
13871 +ZIP files, etc. Sat Nov 2 19:11:30 2002
13873 +From Martin Vorlaender and Jeff, SSL/TLS support for VMS:
13874 +ckuusr.h, ckuath.h, ckcnet.c, ckctel.c, ckuath.c, 10 Nov 2002.
13876 +Added PASV as invisible synonym for PASSIVE. ckcftp.c, 10 Nov 2002.
13878 +--- 8.0.206 24 Oct 2002 #2 ---
13880 +More work on SSL in VMS: Jeff + Martin Vorlaender: ck_ssl.c ckcmai.c ckcnet.c
13881 +ckctel.c ckuath.h ckvcon.c ckvtio.c ckvker.com 10-15 Nov 2002.
13883 +Discovered that ckvfio.c would not compile on VMS 6.1 with UCX 4.1 because
13884 +<conv$routines.h> was missing, which is explicitly included. Enclosed the
13885 +#include in #ifdef NOCONVROUTINES..#endif and rebuilt with
13886 +@[users.fdc.src]ckvker.com "" "" "NOCONVROUTINES". 16 Nov 2002.
13888 +Fixed the "ftp mget */data/*" problem with two small changes to doftpget():
13889 +ckcftp.c, 16 Nov 2002. Placed a copy of ckcftp.patch in ~kermit/f.
13891 +From Lucas Hart: Fixes for VAX C 2.x and CMU TCP/IP. "Can't guarantee that
13892 +the revised CKVOLD will work for all combinations of more recent
13893 +VMS/compiler/TCPIP releases, but I've tested it for compatibility on our AXP
13894 +VMS 6.2, UCX 4.0, DECC 5.6, your AXP VMS 7.1, DEC TCPIP 5.1, DECC 6.0 as well
13895 +as with VAX VMS 5.4, VAX C 3.2, CMU12 and VAX VMS 4.7, VAX C 2.4." ckvfio.c,
13896 +ckvtio.c, ckuus5.c, ckvker.com, ckvold.com, 17 Nov 2002.
13898 +From Jeff: More work on VMS SSL. Now it actually works, even in CONNECT mode,
13899 +except it hangs when it gets an error alert or the remote closes the
13900 +connection. ckcnet.c. ckvtio.c, 17 Nov 2002.
13902 +NOTE: Lucas's changes should go into the 8.0.206 source code but it's too
13903 +late since ckvtio.c (upon which he based his changes) is already full of
13906 +MGET in K95 in totally broken FOR SOME PEOPLE (mainly me) if the TMP (or TEMP)
13907 +value is too long. It works fine if you set these to C:\TMP. Diagnosis: (1)
13908 +we were malloc'ing only 16 bytes for the temp file name (I think this was my
13909 +fault -- I was only looking at the "ckXXXXXX" part and forgetting that this
13910 +was appended to the TMP path); (2) the Windows version of mktemp() wants you
13911 +to use the value pointed to by the pointer it returns, rather than assuming
13912 +the mktemp() arg will be modified in place. The code was changed to malloc a
13913 +longer string and to use the return value from mktemp() (if any) rather than
13914 +assuming that mktemp() modified its argument string (in K95 only -- not sure
13915 +about Unix platforms; the man pages differ on this, but at least this way if
13916 +some mktemp() version does NOT alter its argument, we still have a usable
13917 +filename (like /tmp/ckXXXXXX)). Of course this won't be good for recursive
13918 +MLSD downloads, but we can always issue patches for the Unix version later if
13919 +needed. The Linux and BSD versions use mkstemp() anyway. There is, however,
13920 +a danger of a memory leak in the Unix version if the user has defined a TMPDIR
13921 +or CK_TMP environment variable whose value is longer than 9 bytes. All this
13922 +is highly unlikely so we should be OK. ckcftp.c, 17 Nov 2002.
13924 +--- K95 2.1.1 and updated ck[uv]206.{tar,zip} but not C-Kermit binaries ---
13926 +From Jeff: Fixes for Telnet Com Port Control, update to a newer release of
13927 +OpenSSL: ck_ssl.c ck_ssl.h ckcdeb.h ckcftp.c ckcmai.c ckcnet.c ckctel.c
13928 +ckuath.c ckuath.h ckucns.c ckuus4.c ckuus5.c ckuusr.c ckuusr.h ckvcon.c
13929 +ckvfio.c ckvker.com ckvtio.c ckvvms.h, 25 Nov 2002.
13931 +--- K95 2.1.2 and C-Kermit 8.0 CDROM ---
13933 +From Jeff, 28 Nov 2002:
13934 + . Updated SSL modules: ck_ssl.[ch].
13935 + . Fixed cipher-list display in SHOW AUTH & FTP ssl_auth(): ckuus7.c. ckcftp.c
13936 + . Some minor tn_wait() fixes: ckctel.c.
13937 + . Preliminary SSL support for VMS CONNECT: ckvcon.c.
13939 +Bumped C-Kermit edit number to 207.
13941 +From Jeff, 29 Nov 2002: "[C-Kermit was dumping core on SCO OSR5 Telnet Com Port
13942 +connections because] the SCO compiler treats all characters as signed. This
13943 +was causing 'sprintf(buf,"02x ",ch);' to produce strings such as "ffffffc2"
13944 +instead of "c2" for values between 128 and 255. This wrote beyond the end of
13945 +a buffer and blew away the stack. Having fixed this I also noticed that
13946 +conect() did not properly check for carrier when TN CPC was negotiated. This
13947 +has now been fixed as well." ckucns.c, ckucon.c, ckctel.c, 29 Nov 2002.
13949 +From Jeff, 30 Nov 2002: Fix SSL for VMS and also carry forward the CPC fixes
13950 +to VMS. ckcnet.c, ckvtio.c, ckvcon.c, 30 Nov 2002.
13952 +Changed copyright dates that are displayed (but not yet all the internal
13953 +ones) from 2002 to 2003. ckcmai.c, 3 Jan 2003.
13955 +Fixed the FTP module's brief-format transaction log, which had the status
13956 +inverted: OK for FAILED and v.v. ckcftp.c 3 Jan 2003.
13958 +From Jeff, 4 Jan 2003:
13959 + . Make /MOVE-TO:xxx convert xxx to full pathname: ckuus[r67].c,
13960 + . Make SHOW OPTIONS ALL show both kinds of options: ckuus2.c.
13961 + . More command-line personalities: ckcmai.c, ckuusy.c.
13962 + . New NOSCROLL command for K95: ckuusr.[ch], ckuus2.c.
13963 + . New lockdown and other command-line options: ckuusr.h, ckuusy.c.
13964 + . SSL interface updated to OpenSSL 0.9.7: ck_ssl.c.
13965 + . SET TERM LINE-SPACING and CURSOR xxx NOBLINK: ckuus[27]c.
13966 + . Expanded SHOW GUI command: ckuus3.c
13967 + . New SHOW TABS code: ckuus5.c.
13969 +Updated SUPPORT (BUG), NEWS, and INTRO texts. ckuus[26].c. 5 Jan 2003.
13971 +Fixed FTP module to suppress "'FEAT': Command not understood" message
13972 +unless FTP DEBUG is ON. ckcftp.c, 6 Jan 2003.
13974 +Got a report that C-Kermit dumps core on Solaris when executing a certain
13975 +script. Seems to be related to changing vnambuf[] in zzstring() from an
13976 +automatic array to a malloc'd buffer (see notes from 29 Jun 2000). Changed
13977 +it to an automatic buffer except for K95. ckuus4.c, 6 Jan 2003.
13979 +Nope, that's not it. It evidently happens only after FTP PUT has been used.
13980 +Fixed solaris9g makefile target to include -funsigned-char and built a new
13981 +binary. Determined that building with gcc and -funsigned-char makes no
13982 +difference. makefile, 7 Jan 2003.
13984 +I did a preliminary audit, looking at the items in the left column: if used in
13985 +a given routine, are there any obvious mistakes:
13988 + doftpput->putfile->sendrequest->doftpsend2->secure_write
13989 +malloc OK OK OK OK OK
13990 +makestr OK OK OK OK OK
13991 +automatic arrays OK OK OK OK OK
13992 +[ck]str[n]cpy OK OK OK OK OK
13993 +[ck]str[n]cat OK OK OK OK OK
13994 +sprintf OK OK OK OK OK
13995 +nzltor OK OK OK OK OK
13996 +zfnqfp OK OK OK OK OK
13997 +memcpy OK OK OK OK OK
13998 +bcopy OK OK OK OK OK
14000 +secure_write sends the data directly on clear-text connections. On secure
14001 +connections, it calls secure_putbuf(), which calls secure_putbyte(), but we
14002 +aren't using those, so secure_write() is the end of the call chain for FTP
14003 +PUT. doftpsend2 has buf[] as an automatic array, which it reads file data
14004 +into using zxin (binary mode only), but this looks OK. Still, I changed it
14005 +read 1 less than the buffer size (fread) just in case. Also there was one
14006 +debug() statement that referred to an automatic array (fullname[]) before it
14007 +was initialized (but not used in this case), which I fixed. ckcftp.c,
14010 +FTP GET /RECURSIVE somepath/somefile still didn't work, despite what the
14011 +notes of 19 Sep 2001 say. There are so many paths through the code,
14012 +depending on switch values, GET vs MGET, etc, that a crucial spot was missed.
14013 +Fixed in doftpget(): ckcftp.c, 7 Jan 2003.
14015 +Back to the core dump... after two days of full-time debugging, I found the
14016 +culprit: the buffer-full test in the zzout() macro should have been ">="
14017 +rather than just ">", thus Kermit wrote 1 byte past the end of the malloc'd
14018 +FTP PUT output buffer, ucbuf. Why did it never happen in K95? Because, since
14019 +it's a secure build, FUDGE_FACTOR is defined there. But it's not defined in
14020 +Solaris or other clear-text builds. Although the crash wouldn't happen in
14021 +secure builds, the 1-byte leak might have caused errors in the data transfer.
14022 +In non-Solaris clear-text builds, like Linux, I suspect that malloc() tends
14023 +add something for safety (especially given the man page statement that it
14024 +allocates "at least" what you asked for). Another reason the problem escaped
14025 +notice is that zzout() is used only for text-mode PUTs (and then only when
14026 +there is no character-set translation), but most transfers these days are
14027 +binary and/or downloads. Anyway, in the course of debugging, a lot of small
14028 +cleanups were done: sizeof(blah) for all arrays was replaced by the same
14029 +symbolic size that was used to allocate the array, numeric array sizes were
14030 +replaced with symbolic ones, etc. The real fix is one character long.
14031 +ckcftp.c, 9 Jan 2003.
14033 +Got a report that "mget /recursive */somedir/*" downloaded the files into
14034 +the current directory, rather than re-creating the remote directory structure.
14035 +Fixed in doftpget(): ckcftp.c, 10 Jan 2003.
14037 +Unix C-Kermit did not allow file transfer if started under inetd and accessed
14038 +via Internet raw socket (or whatever). Diagnosis: isatty() and friends would
14039 +fail causing ttopen() to fail. Fixed by adding escape clauses for "-l 0"
14040 +situations (i.e. Kermit invoked with an already-open file descriptor) at the
14041 +appropriate places. ckcmai.c, ckutio.c, 14 Jan 2003.
14043 +From Jeff for K95 2.1.3
14044 + . Add test for startflags & 128 to trap() for ignoring BREAK.
14045 + . Fix for SHOW TRANSMIT.
14049 +FTP USER, FTP ACCOUNT, plus the various prompts and switches for FTP username,
14050 +password, and account all neglected to strip quotes, and in most cases quotes
14051 +are necessary to specify a username that contains spaces. ckcftp.c,
14054 +FTP MPUT f1 f2 f3... gets a parse error if any of the fn's do not match an
14055 +existing file. This is bad for scripts. In doftpput(), cmfdb() looks for
14056 +keywords (switches) or CMIFI. When it hits CMIFI, it exits from the initial
14057 +parse loop and then does additional cmifi()s in a loop until done. The most
14058 +obvious fix is to parse each field with cmfdb(CMIFI,CMFLD), i.e. fall back to
14059 +CMFLD if CMIFI doesn't match anything. Then if CMFLD was used, we don't add
14060 +the filespec to the list. This is a rather big change but it seems to work.
14061 +No error messages or failures happen for non-matching fields, but an error
14062 +message is printed (and the MPUT command fails) if none of the fields match
14063 +any files. This fix got in too late for 2.1.3; workaround: use C-Shell
14064 +like wildcard list (ftp mput "{*.abc,foo.*}"). ckcftp.c, 16 Jan 2003.
14066 +GREP did not pass its pattern through the expander, thus variables could
14067 +not be used for patterns. This must have been an oversight -- I can't find
14068 +anything in my notes about it. Fixed in dogrep(): ckuus6.c, 24 Jan 2003.
14070 +New makefile target for HP-UX 11.xx with OpenSSL from Tapani Tarvainen.
14071 +makefile, 31 Jan 2003.
14074 + . Avoid core dump when dereferencing tnc_get_signature(): ckuus4.c.
14075 + . Bump version numbers to 8.0.208, 2.1.4: ckcmai.c.
14077 +Added /NOLOGIN to FTP [OPEN]. ckcftp.c, 10 Feb 2003.
14079 +Don't dump core if FTP DEBUG is ON and FTP OPEN does not include a service.
14080 +openftp(): ckcftp.c, 10 Feb 2003.
14082 +HELP PATTERN text incorrectly identified commands and functions with
14083 +floating and anchored patterns. The corrected lists are:
14084 +Floating: GREP, TYPE /MATCH:, /EXCEPT: patterns, \farraylook(),
14085 +Anchored: IF MATCH, file-matching wildcards, \fsearch(), \frsearch()
14086 +ckuus2.c, 10 Feb 2003.
14088 +INPUT n \fpattern(xxx) did not work for case-independent comparisons.
14089 +Fixed in doinput(): ckuus4.c, 10 Feb 2003.
14091 +It seems \fpattern() didn't work with MINPUT at all. There was no code to
14092 +handle \fpattern() in the MINPUT parse loop, so it never worked. The code
14093 +had to be totally rewritten to use cmfld() in a loop, rather than cmtxt()
14094 +and then cksplit(). Furthermore, whenever any of the fields was an
14095 +\fjoin(), this had to be split. ckuusr.c, 10 Feb 2003.
14097 +Macro replacement via \m() and \fdefinition() does not work as advertised
14098 +(i.e. case sensitively) for associative array elements; e.g. \m(xxx<abc>) is
14099 +treated the same as \m(xxx<ABC>), contrary to section 7.10.10 of the C-Kermit
14100 +7.0 update notes, and to the fact that the two really do exist separately.
14101 +Fixed by adding a static function isaarray(s) which succeeds if s is an
14102 +associative array reference and fails otherwise, and then having \m()
14103 +and \fdef() call mxxlook() (case-sensitive lookup) if isaarray(), otherwise
14104 +(as before) mxlook()). ckuus4.c, 11 Feb 2003.
14106 +Fixed FTP OPEN to allow the /USER switch to override SET FTP AUTOLOGIN OFF,
14107 +just as /NOLOGIN overrides SET FTP AUTOLOGIN ON. ckcftp.c, 11 Feb 2003.
14109 +In K95, "set key \1234 \27H" (any SET KEY command in which the first char of
14110 +the definition was backslash, and the ONLY character after the backslash
14111 +quantity was an uppercase letter, that letter would be lowercased). Diagnosis:
14112 +xlookup() poking its argument (see notes from July 2000). Jeff sent a fix.
14113 +ckucmd.c, 15 Feb 2003.
14115 +Ran my S-Expression torture test to make sure Sexps still worked. They do,
14116 +except the bitwise & and | operators were broken, e.g. (& 7 2) and (| 1 2 4)
14117 +get "Invalid operand" errors. Jeff's code had added an early failure return
14118 +from the lookup loop when when a single-byte keyword matched a keyword that
14119 +started with the same byte but was more than one byte long. So "&" would hit
14120 +"&&" and fail instead of continuing its search (xlookup tables aren't sorted
14121 +so there can be no early return). Fixed in xlookup(): ckucmd.c, 16 Feb 2003.
14123 +Got rid of "krbmit" target from makefile. It's still there, but we don't
14124 +use it any more. All secure targets now use "xermit", and produce a binary
14125 +called wermit, just like the regular ones do (except the old ckucon.c ones).
14126 +Non-secure targets, since they don't define any of the security symbols,
14127 +wind up compiling and linking to (mostly) empty security modules. makefile,
14130 +Added \fcvtdate(xxx,3) to format its result in MDTM format (yyyymmddhhmmss,
14131 +all numeric, no spaces or punctuation). Of course these numeric strings
14132 +are too big to be 32-bit numbers and are useless for arithmetic, but they're
14133 +useful for lexical comparison, etc. ckuus[24].c, 16 Feb 2003.
14135 +The following FTP commands did not set FAILURE when they failed: RMDIR,
14136 +CD, CDUP, Fixed in the corresponding doftpblah() routines. ckcftp.c,
14139 +RENAME would sometimes not print an error message when it failed, e.g. in K95
14140 +when the destination file already existed. ckuus6.c, 17 Feb 2003.
14142 +Fixed COPY error messages, which did not come out in standard format when
14143 +/LIST was not included. ckuus6.c, 17 Feb 2003.
14145 +Fixed #ifdefs in ck_crp.c to allow nonsecure builds on old platforms like
14146 +System V/68 R3. 19 Feb 2003.
14148 +Similar treatment for ck_ssl.c. 20 Feb 2003.
14150 +From Jeff, 21 Feb 2003:
14151 + . AIX53 and AIX52 symbols for ckcdeb.h, makefile.
14152 + . New gcc targets for various AIX 4.x/5.x versions: makefile.
14153 + . Copyright date updates: ck_crp.c, ck_ssl.c.
14154 + . ENABLE/DISABLE QUERY broken because keyword table out of order: ckuusr.c.
14155 + . Fixed the use of HTTP proxies for HTTP [RE]OPEN for Unix: ckcnet.c.
14157 +Also for K95 only: Allow file transfer when K95 is invoked on the remote end
14158 +of a connection to a Pragma Systems Terminal Server connection; automatically
14159 +SET EXIT HANGUP OFF when invoked with open port handle ("k95 -l nnnn").
14161 +"cd a*" failed even when "a*" matched only one directory. Fixed in cmifi():
14162 +ckucmd.c, 21 Feb 2003.
14164 +In the Unix version, replace "extern int errno;" with "#include <errno.h>"
14165 +if __GLIBC__ is defined, since glibc now defines a thread-specific errno.
14166 +ckcdeb.h, 26 Feb 2003.
14168 +Added #ifdefs to skip compilation of ckuath.c in nonsecure builds. Tested
14169 +by building both secure and regular versions in Linux. ckuath.c, 26 Feb 2003.
14171 +Ran the build-in-84-different-configurations script on Linux to make sure it
14172 +still builds with all different combinations of feature selection options.
14173 +All OK. 26 Feb 2003.
14175 +Built on VMS. Needed to add a prototype for mxxlook*() to ckuusr.h; built
14176 +OK otherwise. 26 Feb 2003.
14178 +From Jeff: More #ifdef shuffling for nonsecure builds: ckuath.c, ck_ssl.c,
14181 +Added code to ensure \v(download) ends in a directory separator in Unix,
14182 +Windows, and OS/2. ckuus7.c, 27 Feb 2003.
14184 +Added code to K95 zfnqfp() to tack on directory separator when returning
14185 +a directory name. ckofio.c, 27 Feb 2003.
14187 +Somehow an old copy of ckuath.c popped to replace the new one. Put the new
14188 +one back. 28 Feb 2003.
14190 +From Jeff: Fix typo in my K95 zfnqfp() code from yesterday; fixes for handling
14191 +UNCs uniformly, no matter which way their slashes are leaning. ckofio.c,
14194 +At Jeff Mezei's suggestion, separate text and binary mode open sequences
14195 +for VMS session log. ckvfio.c, 28 Feb 2003.
14197 +Added freebsd48 target for FreeBSD 4.8. makefile, 1 Mar 2003.
14199 +Changed Mac OS X entries to include -DUSE_STRERROR. makefile, 2 Mar 2003.
14201 +Fixed GETOK /GUI to evaluate its text argument. ckuus6.c, 3 Mar 2003.
14203 +Jeff fixed the K95 Dialer QUICK dialog to (a) allow templates, and (b) have
14204 +a Save-As option. 3 Mar 2003.
14206 +Jeff fixed a problem with the Xmodem-CRC checksum being crunched whenever
14207 +there was a retransmission. 7 Mar 2003.
14209 +Added target/banner for Tru64 5.1B. makefile, ckuver.h, 5 Mar 2003.
14211 +In Unix, the zcopy() routine (used by the COPY command) reset the user's umask
14212 +to 0 for the remainder of the Kermit process lifetime. The bug was in
14213 +ckufio.c 8.0.194, 24 Oct 2002, and is fixed in ckufio.c 8.0.195, 6 Mar 2003.
14214 +Of course this happened after building 155 C-Kermit 8.0.208 binaries. (But
14215 +before officially releasing 8.0.208.)
14217 +In the VMS version, changed:
14219 + while ((n--) && xx_inc(2) > -1) ;
14221 + while ((n--) && xx_inc(2) >= 0) ;
14223 +to suppress the "...is being compared with a relational operator to a constant
14224 +whose value is not greater than zero" warning. ckvtio.c, 7 Mar 2002.
14226 +Added a debug call to dologend in hopes of catching overzealous Locus
14227 +switching, which seems to happen only in K95. ckuus3.c, 7 Mar 2002.
14229 +Rebuilt binaries for some of the more current Unix releases: AIX 4.3.3-5.1,
14230 +Solaris 7-9 , Red Hat 7.0-8.0, Slackware 8.1, Freebsd 4.7-4.8, NetBSD 1.6,
14231 +OpenBSD 3.2, Unixware 7.1.3, Open Unix 8, OSR5.0.6a, etc. A Unix binary with
14232 +COPY umask fix shows a 6 Mar 2003 date for "UNIX File support" in SHOW
14233 +VERSIONS; a binary without the fix shows 24 Oct 2002.
14235 +C-Kermit 8.0.208 dated 14 March 2003 released on 10 March 2003.
14239 +From Jeff 13 Mar 2003:
14240 + . Updated SSL module allows importation of tickets from host.
14241 + . freebsd50+openssl target: makefile.
14242 + . FTP PUT /PERMISSIONS error message for K95: ckcftp.c.
14244 +Fixed MINPUT to strip quotes or braces from around targets (this was broken
14245 +on Feb 10th). Thanks to Jason Heskett for discovering and reporting this
14246 +(killer) bug. ckuusr.c, 14 Mar 2003.
14248 +Changed version number to 209 Dev.00. ckcmai.c, 14 Mar 2003.
14250 +While debugging the alphapage script, I found that the command "minput 8 \6\13
14251 +\21\13 \13\27\4\13 \30\13" gets "?Not confirmed" in 8.0.208 and 8.0.209, but
14252 +not in 206 and earlier. This problem too was introduced on Feb 10th by
14253 +changing MINPUT parsing from cmtxt() followed by cksplit() to cmfld() in a
14254 +loop. cmfld() uses setatm() to return its result and of course setatm()
14255 +breaks on \13. Changing setatm() not to do this would break everything else.
14256 +But cmfld() has no arguments that let us tell it to do anything different in
14257 +this case. Changing the API would be a disaster. The only solution is to add
14258 +an "MINPUT ACTIVE" (minputactive) global variable that tells cmfld() to tell
14259 +setatm() not to break on CR. Now MINPUT with braced targets containing CR
14260 +and/or LF works in 209, 206, and 201 (but not 208). ckucmd.c, ckuusr.c,
14261 +ckuus5.c, 15 Mar 2003.
14263 +MINPUT n \fjoin(&a) works OK if all the members of \&a[] are text strings, but
14264 +if they are strings of control chars (as above), they don't get separated by
14265 +the spaces. For example in:
14267 + dcl \&a[] = "\4\5" "\6\7" xxx
14268 + minput 10 \fjoin(&a)
14270 +MINPUT gets two targets: "aaa" and "\4\5 \6\7 xxx". The bug was in the
14271 +cksplit() call in the \fjoin() case of MINPUT: it needed to specify an
14272 +include set consisting of all the control characters except NUL. ckuusr.c,
14275 +But there's still a problem:
14277 + dcl \&a[] = "\4\5\13\10" "\6\7" "xxx"
14279 +creates an array whose first member is "^D^E (one doublequote included). But
14280 +if braces are used instead, there's no problem. Same deal as MINPUT: cmfld()
14281 +breaks on CR or LF, thus the end quote is lost. If I set minputactive for
14282 +DECLARE initializers too, that fixes it. Is there any reason not to do this?
14283 +Can't think of any (famous last words)... ckuusr.c, 16 Mar 2003.
14285 +Since it has multiple applications, changed the flag's name from minputactive
14286 +to keepallchars. ckucmd.c, ckuus[r5].c, 16 Mar 2003.
14288 +\v(exedir) wasn't being set correctly (it included the program name as well
14289 +as the directory). Fixed in getexedir(): ckuus4.c, 16 Mar 2003.
14291 +SET CARRIER-WATCH <Esc> "auto matic" (spurious space in supplied keyword).
14292 +Cosmetic only; it still worked. Fixed in setdcd(): ckuus3.c, 16 Mar 2003.
14294 +"directory a b c" listed too many files -- all files whose names END WITH a,
14295 +b, or c, rather than the files whose names WERE a, b, or c. Diagnosis: The
14296 +filespec is changed into a pattern: {a,b,c}, which is the correct form. It is
14297 +passed to nzxpand(), which goes through the directory getting filenames and
14298 +sending each one to ckmatch() with the given pattern. ckmatch() receives the
14299 +correct pattern but then prepends a "*" -- that's not right. It's not just
14300 +in filename matching either. The following succeeds when it shouldn't:
14302 + if match xxxxc {{a,b,c}} <command>
14304 +Changing ckmatch() to not prepend the "*" to each segment fixes the command
14305 +above but breaks lots of others. Running through the "match" torture-test
14306 +script shows the problem occurs only when the {a,b,c} list is the entire
14307 +pattern, and not embedded within a larger pattern. Testing for this case
14308 +fixed the problem. ckmatch(): ckclib.c, 16 Mar 2003.
14310 +Fixed FTP MODTIME to not print anything if QUIET ON. ckcftp.c, 16 Mar 2003.
14312 +Picked up a new ckuath.c from Jeff, not sure what the changes are. 16 Mar 2003.
14314 +Did a few regular and secure builds to make sure I didn't wreck anything.
14316 +Changed version number to 209 (final). ckcmai.c, 16 Mar 2003.
14318 +Jason Heskett found another bug: if you define a macro FOO inside the
14319 +definition of another macro BAR, and FOO's definition includes an odd number
14320 +of doublequotes (such as 1), FOO's definition absorbs the rest of BAR's
14321 +definition. Example:
14332 + foo = {X"}, sho mac foo
14334 +Diagnosis: the TEST definition becomes:
14336 + def TEST .foo = {X"}, sho mac foo
14338 +and the macro reader is erroneously treating the doublequote as an open
14339 +quote, and then automatically closes the quote at the end of the definition.
14340 +The error is that a doublequote should be significant only at the beginning of
14341 +a field. But the macro reader isn't a command parser; it doesn't know what
14342 +a field is -- it's just looking for commas and skipping over quoted ones.
14343 +First we have to fix an oversight: SET COMMAND DOUBLEQUOTING OFF should have
14344 +worked here, but it wasn't tested in this case. Fixed in getncm(): ckuus5.c,
14347 +There are only certain cases where it makes sense to treat doublequotes as
14350 + . An open quote must be at the beginning or preceded by a space.
14351 + . A close quote is only at the end or else followed by a space.
14353 +This too was fixed in getncm(): ckuus5.c, 17 Mar 2003.
14355 +A fix from Jeff SSL/TLS FTP data decoding. ckcftp.c, 18 Mar 2003.
14357 +Tried building C-Kermit on a Cray Y-MP with UNICOS 9.0. "int suspend",
14358 +declared in ckcmai.c and used in many modules, conflicts with:
14360 + unistd.h:extern int suspend __((int _Category, int _Id));
14362 +The "=Dsuspend=xsuspend" trick doesn't work for this; there is no way around
14363 +the conflict other than to rename the variable: ckcmai.c, ckutio.c,
14364 +ckuus[35xy].c. 26 Mar 2003. VMS and K95 not affected.
14366 +OK that gets us past ckcmai.c... Then in ckutio.c I had to add a new #ifdef
14367 +around the LFDEVNO setting, because the Cray didn't have mkdev.h. Could not
14368 +find a Cray-specific manifest symbol, so I made a new makefile target (cray9)
14369 +that sets this symbol. Having done this I have no idea what kind of lockfile
14370 +would be created, but I also doubt if anybody dials out from a Cray. The
14371 +binary should run a C90, J90, or Y-MP. makefile, 26 Mar 2003.
14373 +Added a target for SCO OSR5.0.7. makefile, ckuver.h, 30 Mar 2003.
14375 +Changed since 208:
14376 +makefile ckuver.h ckcmai.c ckclib.c ckcftp.c ckucmd.c ckuus*.c ckutio.c.
14380 +From Mark Sapiro, a fix for the March 17th doubleqote fix, getncm(): ckuus5.c,
14383 +From Jeff, 29 Apr 2003:
14384 + . Corrected target for HP-UX 11.00 + OpenSSL: makefile,
14385 + . Do not allow WILL AUTH before WONT START_TLS: ckctel.h ckctel.c
14386 + . Add hooks for SFTP and SET/SHOW SFTP: ckcdeb.h ckuusr.h ckuusr.c ckuus3.c
14387 + . Add SKERMIT ckuusr.h ckuusr.c
14388 + . Add ADM-5 terminal emulation: ckuus7.c, ckuus5.c
14389 + . Uncomment and update HELP SET SSH V2 AUTO-REKEY: ckuus2.c
14390 + . Enable IF TERMINAL-MACRO and IF STARTED-FROM-DIALER for C-Kermit: ckuus6.c
14391 + . Fix conflicting NOSCROLL keyword definition: ckuusr.h
14392 + . Set ttname when I_AM_SSH: ckuusy.c
14393 + . Add extended arg parsing for SSH, Rlogin, Telnet: ckuusy.c, ckuus4.c
14394 + . Security updates: ckuath.c, ck_ssl.c
14395 + . Change K95 version number to 2.2.0: ckcmai.c
14396 + . Save K95 term i/o state before executing keyboard macro: ckuus4.c
14397 + . Add tests for SSH Subsystem active during INPUT/OUTPUT/CONNECT: ckuus[45].c
14398 + . Enable K95 SET SSH V2 AUTO-REKEY: ckuus3.c
14400 +SFTP and SET SFTP subcommands are implemented up to the case statements.
14402 +Files of mine that Jeff hadn't picked up:
14403 + ckuver.h ckcftp.c ckutio.c ckuusx.c (just minor changes for last build-all)
14405 +On 4 Jan 2003, SET RECEIVE MOVE-TO was changed to convert is argument to an
14406 +absolute path, which made it impossible to specify a relative path, then
14407 +move to different directories and have it apply relatively to each directory.
14408 +Changed this as follows:
14410 + . Parser uses cmtxt() rather than cmdir() so it won't fail at parse time.
14411 + . If path is absolute, we fail at parse time if directory doesn't exist.
14412 + . In reof() we run the the path through xxstring (again, in case deferred
14413 + evaluation of variables is desired) and then, if not null, use it.
14414 + . If the directory doesn't exist, rename() fails and reof() returns -4,
14415 + resulting in a protocol error (this is not a change). We do NOT create
14416 + the directory on the fly.
14418 +I also fixed SET SEND/RECEIVE RENAME-TO to parse with cmtxt() rather than
14419 +cmdir(), since it's parsing a text template, not a directory name, e.g.
14420 +"set receive rename-to file-\v(time)-v(date)-\v(pid)". This was totally
14421 +broken, since when I don't know. We don't call xxstring() in this parse, so
14422 +evaluation is always deferred -- I'd better not change this. ckuus7.c,
14423 +ckcfns.c, 1 May 2003.
14425 +From Jeff, Sat May 3 14:15:23 2003:
14426 + . Pick up the right isascii definition for K95: ckctel.c
14427 + . malloc... ckuath.c (new safe malloc routines for K95)
14428 + . Add author listing: ckuus5.c
14429 + . SSH Heartbeat support (K95 only): ckuus[23].c
14430 + . Prescan --height and --width to avoid window resizing at startup: ckuusy.c
14431 + . Add checks for fatal() or doexit() called from sysinit(): ckuusx.c
14432 + . Move some K95-specific definitions to ckoker.h: ckcdeb.h
14433 + . Add support for ON_CD macro in zchdir(): ckufio.c
14434 + . Add a command to let FTP client authenticate with SSLv2: ckcftp.c
14435 + . Fix parsing of FTP file facts like "UNIX.mode": ckcftp.c
14437 +ON_CD will need some explaining (to be done). It's implemented for Unix,
14438 +VMS, WIndows, and OS/2.
14440 +The FTP file facts fix came from first exposure to the new OpenBSD FTP
14441 +server: ftp://ftp7.usa.openbsd.org/pub/os/OpenBSD/3.3/i386/
14442 +The period in "UNIX.mode" caused an erroneous word break, adding junk to
14445 +About the malloc changes, Jeff says "K95 is not behaving well in low memory
14446 +environments. I'm not sure that C-Kermit does much better. The program does
14447 +not crash but it certainly does not behave the way the user expects it to.
14448 +I'm beginning to think that any malloc() error should be treated as fatal."
14450 +Not visible in these changes because it's in K95-specific modules: Jeff made
14451 +SET ATTRIBUTES OFF and SET ATTRIBUTES DATE OFF apply to XYZMODEM transfers.
14453 +From Jeff, 11 May 2003:
14454 + . Add support for SSH Keepalive to relevant SET command (K95): ckuus3.c
14455 + . Reduce max overlapped i/o requests from 30 to 7 (K95): ckuus7.c
14456 + . Don't call sysinit() in fatal(): ckuusx.c.
14457 + . Some new conditionalizations for SSL module: ck_ssl.c
14459 +The doublequote-parsing fixes from March and April broke the SWITCH statement,
14460 +which is implemented by internally defining, then executing, a macro. If I
14461 +drop back to the old dumb handling of doublequotes, everything is fixed except
14462 +the problem of March 17th. But can we really expect getncm() to pre-guess
14463 +what the parser is going to do? getncm()'s only job is to find command
14464 +boundaries, which are represented by commas. Commas, however, is needed IN
14465 +commands too. We take a comma literally if it is quoted with \, or is inside
14466 +a matched pair of braces, parens, or doublequotes. It is not unreasonable to
14467 +require a doublequote in a macro definition to be prefixed by \ when it is to
14468 +be taken literally. The proper response to Jason Heskett's complaint of March
14469 +17th should have been to leave the code alone and recommand an appropriate
14477 +And this is what I have done. Another reason for sticking with the old method
14478 +is that it's explainable. The "improved" method, even if it worked, would be
14479 +be impossible to explain. Btw, in testing this I noticed that the switch-test
14480 +script made 8.0.201 dump core. Today's version is fine. The problem with
14481 +quoted strings inside of IF {...} clauses and FOR and WHILE loops is fixed
14482 +too. Perhaps "unbroken" would be a better word. ckuus5.c, 11 May 2003.
14484 +Vace discovered that FTP MGET /EXCEPT:{... (with an unterminated /EXCEPT list)
14485 +could crash Kermit. Fixed in ckcftp.c, 11 May 2003.
14487 +CONTINUE should not affect SUCCESS/FAILURE status. ckuusr.c, 11 May 2003.
14489 +Fixed an oversight that goes back 15 years. While \{123} is allowed for
14490 +decimal codes, \x{12} and \o{123} were never handled. ckucmd.c, 11 May 2003.
14492 +Added support for Red Hat <baudboy.h> and /usr/sbin/lockdev. Supposedly this
14493 +allows Kermit to be installed without setuid or setgid bits and still be able
14494 +to lock and use the serial device. Compiles and starts, but not tested.
14495 +ckcdeb.h, makefile, ckutio.c, ckuus5.c, 16 May 2003.
14497 +From Jeff: FTP ASCII send data to host when FTP /SSL was in use was broken.
14498 +ftp_dpl is set to Clear when FTP /SSL is in use. This was causing the data to
14499 +be written to the socket with send() instead of the OpenSSL routines.
14500 +ckcftp.c, ckuath.c, 21 May 2003.
14502 +From Jeff: Stuff for Kerberos 524: ckcdeb.h. Fixes for FTP; "FTP ASCII send
14503 +data did not properly compute the end of line translations. On Unix (and
14504 +similar platforms) the end of line was correct for no character sets but
14505 +incorrect when character sets were specified. On Windows/OS2, the end of line
14506 +was correct when character sets were specified and incorrect when they were
14507 +not. On MAC, both were broken. Also, FTP Send Byte counts were incorrect
14508 +when character sets were specified." ckcftp.c. 17 Jun 2003.
14510 +From Jeff: fixes to HTTP /AGENT: and /USER: switch action: ckcnet.c ckuus3.c
14511 +ck_crp.c ckcftp.c ckuus2.c ckuusy.c ckuusr.c ckcnet.h, 21 Jun 2003.
14513 +From Jeff: Fix SET DIALER BACKSPACE so it can override a previous SET KEY
14514 +(e.g. from INI file): ckuus7.c. Some SSL/TLS updates: ck_ssl.c. HTTP support
14515 +for VMS and other VMS improvements (e.g. a way to not have to hardwire the
14516 +C-Kerit version number into the build script) from Martin Vorlaender:
14517 +ckcnet.h, ckuus[r3].c, ckcdeb.h, ckvtio.c, ckcnet.c, ckvker.com. Built on
14518 +Solaris (gcc/ansi) and SunOS (cc/k&r). The new VMS script tests the VMS
14519 +version and includes HTTP support only for VMS 6.2 or later. 2 Jul 2003.
14521 +Tried to build on our last VMS system but it seems to be dead. Looks like a
14522 +head crash (makes really loud noises, boot says DKA0 not recognized) (fooey, I
14523 +just paid good money to renew the VMS license). Tried building at another
14526 + Process Software MultiNet V4.3 Rev A-X,
14527 + Compaq AlphaServer ES40, OpenVMS AXP V7.3
14528 + Compaq C V6.4-008 on OpenVMS Alpha V7.3
14530 +Had to make a few corrections to ckvker.com. But still, compilation of
14531 +ckcnet.c bombs, indicating that the SELECT definition somehow got lost
14532 +somewhere since the 209 release (i.e. no SELECT type is defined so it falls
14533 +thru to "SELECT is required for this code"). But I don't see anything in
14534 +ckcdeb.h or ckcnet.[ch] that would explain this. Not ckvker.com either
14535 +(putting the old one back gives the same result). OK, I give up, maybe it's
14536 +just that I haven't tried building it on MultiNet recently. What about UCX?
14537 +Aha, builds fine there except for warnings about mlook, dodo, and parser in
14538 +ckvfio.c (because of ON_CD) -- I suppose I have #include <ckucmd.h>... (done)
14539 +Anyhow it builds OK and the HTTP code is active and almost works (HTTP OPEN
14540 +works; HTTP GET seems to succeed but creates an empty file every time). Tried
14541 +building under MultiNet at another installation; same bad result.
14543 +OK so why won't it build for MultiNet? Comparing ckcnet.c with the 209
14544 +version, not a single #ifdef or #include is changed. Tried building with
14545 +p3="NOHTTP" -- builds OK, aha. Where's the problem? Not ckcnet.h...
14546 +Not ckcdeb.h... OK I give up, will revisit this next time I get time to
14547 +do anything with the code.
14549 +Later Jeff said "Martin did not implement VMS networking for the HTTP code.
14550 +All he did was activate the #define HTTP which happens to work because his
14551 +connections are using SSL/TLS connections. http_inc(), http_tol(), etc have
14552 +no support for VMS networking regardless of whether it is UCX or MULTINET.
14553 +The vast majority of HTTP connections are not secured by SSL/TLS. It makes no
14554 +sense to support HTTP on VMS until someone is willing to either do the work or
14555 +pay have the work done to implement VMS networking in that code base." So the
14556 +fix is to not enable HTTP for VMS after all. Removed the CKHTTP definition
14557 +for VMS from ckcdeb.h, 6 Jul 2003.
14559 +Fixed ckvfio.c to #include <ckuusr.h> (instead of <ckucmd.h>) to pick up
14560 +missing prototypes. 6 Jul 2003.
14562 +From Arthur Marsh: solaris2xg+openssl+zlib+srp+pam+shadow and the corresponding
14563 +Solaris 7 target. makefile, 6 Jul 2003.
14565 +Remove duplicate #includes for <sys/stat.h>, <errno.h>, and <ctype.h> from
14566 +ckcftp.c. 6 Jul 2003.
14568 +Add -DUSE_MEMCPY to Motorola SV/68 targets because of shuffled #includes in
14569 +ckcftp.c. 8 Jul 2003.
14571 +From Jeff: Fix problems mixing SSL and SRP without Kerberos. Plus a few minor
14572 +#define comment changes and a reshuffling of #defines in ckcdeb.h to allow me
14573 +to build on X86 Windows without Kerberos. ckcdeb.h, ck_crp.c, ckuath.c,
14576 +From Jeff: updated ckuat2.h and ckuath.c, 29 Jul 2003.
14578 +Mats Peterson noticed that a very small Latin-1 file would be incorrectly
14579 +identified as UCS-2 by scanfile(). Fixed in ckuusx.c, 29 Jul 2003.
14581 +Fixed ACCESS macro definition to account for the fact that FIND is now a
14582 +built-in command. ckermit.ini, 30 Jul 2003.
14584 +From Jeff: Fix for typo in urlparse() (svc/hos): ckuusy.c, 18 Aug 2003.
14586 +From Jeff: Redhat9 makefile targets (needed for for OpenSSL 0.9.7):
14587 +makefile, 19 Aug 2003.
14589 +GREP /NOLIST and /COUNT did too much magic, with some undesirable fallout:
14590 +"GREP /NOLIST /COUNT:x args" printed "file:count" for each file. "GREP
14591 +/COUNT:x /NOLIST args" did not print "file:count", but neither did it set the
14592 +count variable. Removed the magic. Also one of the GREP switches,
14593 +/LINENUMBERS, was out of order. Fixed in ckuus6.c, 20 Aug 2003.
14595 +From Jeff: "Reorganizing code to enable building with different subsets of
14596 +options; a few typos corrected as well." ckcdeb.h, ckuver.h (for RH9),
14597 +ckcnet.c, ckuus7.c, ckuus3.c: 24 Aug 2003.
14599 +Scanfile misidentified a big PDF file as text because the first 800K of it
14600 +*was* text (most other PDF files were correctly tagged as binary). Fixed
14601 +by adding a check for the PDF signature at the beginning of the file.
14602 +scanfile(): ckuusx.c, 25 Aug 2003.
14604 +Ditto for PostScript files, but conservatively. Signature at beginning of
14605 +file must begin with "%!PS-Ado". If it's just "%!" (or something nonstandard
14606 +like "%%Creator: Windows PSCRIPT") we do a regular scan. Also added "*.ps"
14607 +to all binary filename patterns. ckuusx.c, 4 Sep 2003.
14609 +Ditto (but within #ifndef NOPCLSCAN) for PCL (<ESC>E) and PJL (<ESC>%) files,
14610 +but no binpatterns (note: ".PCL" is the extension for TOPS-20 EXEC scripts).
14611 +ckuusx.c, 4 Sep 2003.
14613 +Added comments about OpenSSL 0.9.7 to all linux+openssl targets.
14614 +makefile, 4 Sep 2003.
14616 +From Jeff: Added - #define ALLOW_KRB_3DES_ENCRYPT. When this symbol is defined
14617 +at compilation Kermit will allow non-DES session keys to be used during Telnet
14618 +Auth. These session keys can then be used for Telnet Encrypt. The reason
14619 +this is not compiled on by default is that the MIT Kerberos Telnet does not
14620 +follow the RFC for constructing keys for ENCRYPT DES when the keys are longer
14621 +than 8 bytes in length. ckuath.c, ckuus5.c, 4 Sep 2003.
14623 +"ftp mget a b c" succeeded if one or more of the files did not exist, even
14624 +with "set ftp error-action proceed". This is because the server's NLST file
14625 +list does not include any files that don't exist, so the client never even
14626 +tries to get them. Fortunately, the way the code is structured, this one was
14627 +easy to fix. ckcftp.c, 14 Sep 2003.
14629 +From Jeff: Corrected code in ckcnet.c to ensure that Reverse DNS Lookups are
14630 +not performed if tcp_rdns is OFF. Fixed ck_krb5_getrealm() to actually return
14631 +the realm of the credentials cache and not the default realm specified in the
14632 +krb5.conf file. Previously krb5_cc_get_principal() was not being called.
14633 +Fixed ck_krb5_is_tgt_valid() to test the TGT in the current ccache and not the
14634 +TGT constructed from the default realm. ckcnet.c, ckuath.c, 14 Sep 2003.
14636 +Marco Bernardi noticed that IF DIRECTORY could produce a false positive if
14637 +the argument directory had previously been referenced but then removed. This
14638 +is because of the clever isdir() cache that was added to speed up recursion
14639 +through big directory trees. Changed IF DIRECTORY to make a second check
14640 +(definitive but more expensive) if isdir() succeeds, and changed the
14641 +directory-deleting routine, ckmkdir(), to flush the directory cache (UNIX
14642 +only -- this also should be done in K95 but it's not critical). This was
14643 +done by adding a routine, clrdircache() to ckufio.c, which sets prevstat
14644 +to -1 and prevpath[0] to NUL. ckcfn3.c, ckuus6.c, ckufio.c, 18 Sep 2003.
14646 +Marco reported the second fix still didn't work for him (even though it did
14647 +for me). Rather than try to figure out why, I concluded that the directory
14648 +cache is just not safe: a directory found a second ago might have been deleted
14649 +or renamed not only by Kermit but by some other process. Why did I add this
14650 +in the first place? The log says:
14652 + Some debug logs showed that isdir() is often called twice in a row on the
14653 + same file. Rather than try to sort out clients, I added a 1-element cache
14654 + to Unix isdir(). ckufio.c, 24 Apr 2000.
14656 +Experimentation with DIR and DIR /RECURSIVE does not show this happening at
14657 +all. So I #ifdef'd out the directory cache (see #ifdef ISDIRCACHE in ckufio.c;
14658 +ISDIRCACHE is not defined) and backed off the previous changes: ckufio.c,
14659 +ckcfn3.c, ckuus6.c, 28 Sep 2003.
14661 +From Jeff: Replace the compile time ALLOW_KRB_3DES_ENCRYPT with a run-time
14662 +command SET TELNET BUG AUTH-KRB5-DES which defaults to ON: ckctel.[ch],
14663 +ckuus[234].c, ck_crp.c, ckuath.c. 4 Oct 2003.
14665 +Allow DIAL RETRIES to be any positive number, and catch negative ones.
14666 +Also added code to check for atoi() errors (e.g. truncation). At least on
14667 +some platforms (e.g. Solaris) atoi() is supposed to set errno, but it
14668 +doesn't. ckuus3.c, ckucmd.c, 4 Oct 2003.
14670 +Added /DEFAULT: to ASK-class commands (ASK, ASKQ, GETOK):
14672 + . For popups: no way to send defaults to popup_readtext() or popup_readpass().
14673 + . For GUI ASK[Q], pass default to gui_txt_dialog().
14674 + . For GUI GETOK, convert "yes" "ok" or "no" default to number for uq_ok().
14675 + . For Text GETOK, add default to cmkey().
14676 + . For Text ASK[Q], add default to cmtxt().
14677 + . For GETC, GETKEY, and READ: no changes.
14679 +GETOK, ASK, and ASKQ with /TIMEOUT: no longer fail when the timer goes off
14680 +if a /DEFAULT was supplied. The GUI functions (uq_blah) don't seem to
14681 +support timeouts. Only the text version has been tested. ckuus[26].c,
14684 +From Jeff: add /DEFAULT: for popups. ckuus6.c. 6 Oct 2003.
14686 +Change SET DIAL INTERVAL to be like SET DIAL RETRIES. ckuus[34].c, 6 Oct 2003.
14688 +Added target for HP-UX 10/11 + OpenSSL built with gcc, from Chris Cheney.
14689 +Makefile, 12 Oct 2003.
14691 +From Jeff, 6 Nov 2003:
14692 + . #ifdef adjustments: ckcftp.c, ckcdeb.h
14693 + . Fix spurious consumption of first byte(s) on Telnet connection: ckctel.c
14694 + . Another HP PJL test for scanfile: ckuusx.c.
14695 + . K95: Recognize DG4xx protected fields in DG2xx emulation: ckuus7.c.
14696 + . Add SSLeay version display to SHOW AUTH command: ckuus7.c
14697 + . Improved SET MOUSE CLEAR help text: ckuus2.c.
14698 + . Improved Kverbs help text: ckuus2.c (+ new IBM-3151 Kverbs).
14699 + . Some changes to ck_ssl.c, ckuath.c.
14701 +From PeterE, 10 Nov 2003:
14702 + . Improved HP-UX 10/11 makefile targets for OpenSSL.
14703 + . #ifdef fix for OpenSSL on HP-UX: ck_ssl.c.
14705 +Another new makefile from PeterE with improved and integrated HP-UX targets.
14708 +A couple fixes to the solaris9g+krb5+krb4+openssl+shadow+pam+zlib target
14709 +from Jeff. Added a solaris9g+openssl+shadow+pam+zlib target. makefile,
14712 +From Jeff, 30 Nov 2003:
14713 + . Fix SEND /MOVE-TO: ckuusr.c.
14714 + . Fix K95 SET TITLE to allow quotes/braces around text: ckuus7.c.
14715 + . Improved "set term autodownload ?" response: ckuus5.c.
14716 + . Fix SHOW FEATURES to specify the protocol for encryption: ckuus5.c
14717 + . Make {SEND, RECEIVE} {MOVE-TO, RENAME-TO} work for XYZMODEM (K95 only).
14719 +From Jeff: 7 Jan 2004:
14720 + . At one point Frank started to add a timer parameter to the
14721 + uq_txt() function but he only did it for the non-ANSI
14722 + compilers. I added it for the ANSI compilers, fixed the
14723 + prototypes and provided a default value easily changed
14724 + DEFAULT_UQ_TIMEOUT: ckcker.h, ckuus[36].c, ck_ssl.c, ckcftp.c, ckuath.c.
14725 + . Fixed SET TERMINAL DEBUG ON (typo in variable name): ckuus7.c.
14726 + . Fixed BEEP INFORMATION; previously it made no sound, now uses
14727 + MB_ICONQUESTION. ckuusx.c.
14729 +From Ian Beckwith <ian@nessie.mcc.ac.uk> (Debianization), 7 Jan 2004:
14730 + . Search dir/ckermit for docs, as well as dir/kermit in cmdini(): ckuus5.c.
14731 + . New linux+krb5+krb4+openssl+shadow+pam target (kitchen sink minus SRP,
14732 + which Debian does not distribute): makefile.
14733 + ? Mangles the DESTDIR support in makefile to install into a staging area:
14734 + makefile (I didn't take this one yet).
14736 +Updated copyright notices for 2004, all modules. 7 Jan 2004.
14738 +Added INPUT /NOMATCH, allowing INPUT to be used for a fixed amount of time
14739 +without attempting to match any text or patterns, so it's no longer
14740 +necessary to "input 600 STRING_THAT_WILL_NEVER_COME". If /NOMATCH is
14741 +included, INPUT succeeds if the timeout expires, with \v(instatus) = 1
14742 +(meaning "timed out"); fails upon interruption or i/o error. ckuusr.h,
14743 +ckuus[r24].c, 7 Jan 2004.
14745 +Added SET INPUT SCALE-FACTOR <float>. This scales all INPUT timeouts by the
14746 +given factor, allowing time-sensitive scripts to be adjusted to changing
14747 +conditions such as congested networks or different-speed modems without
14748 +having to change each INPUT-class command. This affects only those timeouts
14749 +that are given in seconds, not as wall-clock times. Although the scale
14750 +factor can have a fractional part, the INPUT timeout is still an integer.
14751 +Added this to SHOW INPUT, and added a \v(inscale) variable for it.
14752 +ckuusr.h, ckuus[r257].c, 7 Jan 2004.
14754 +undef \%a, \fverify(abc,\%a) returns 0, which makes it look as if \%a is a
14755 +string composed of a's, b's, and/or c's, when in fact it contains nothing.
14756 +Changed \fverify() to return -1 in this case. ckuus4.c, 12 Jan 2004.
14758 +\fcode(xxx) returned an empty string if its argument string was empty. This
14759 +makes it unsafe to use in arithmetic or boolean expressions. Changed it to
14760 +return 0 if its argument was missing, null, or empty. ckuus4.c, 12 Jan 2004.
14762 +Updated \verify() and \fcode() help text. ckuus2.c, 12 Jan 2004.
14764 +While setting up IKSD, Ian Beckwith noticed that including the --initfile:
14765 +option caused Kermit to start parsing its own Copyright string as if it were
14766 +the command line, and eventually crash. I couldn't reproduce on Solaris /
14767 +Sparc but I could in Linux / i386 (what Ian is using) -- a change from Jeff
14768 +on 28 Apr 2003 set the command-line arg pointer to a literal empty string in
14769 +prescan() about line 1740 of of ckuus4.c; the pointer is incremented next
14770 +time thru the loop, resulting in random memory being referenced. Fixed by
14771 +setting the pointer to NULL instead of "". ckuus4.c, 12 Jan 2004.
14773 +declare \&a[999999999999999] would dump core on some platforms. atoi()
14774 +or whatever would truncate the dimension to maxint. When we add 1 to the
14775 +result, we get a negative number, which is used as an index, loop test, etc.
14776 +Fixed both dodcl() and dclarray() to check for (n+1 < 0). ckuus[r5].c,
14779 +Unix zchki() would fail on /dev/tty, which is unreasonable. This prevented
14780 +FOPEN /READ from reading from the terminal. zchki() already allowed for
14781 +/dev/null, so I added /dev/tty to the list of specials. Ditto for FOPEN
14782 +/WRITE and zchko(). ckufio.c 13 Jan 2004.
14784 +Added untabify() routine to ckclib.[ch], 13 Jan 2004.
14785 +Added FREAD /TRIM and /UNTABIFY. ckuus[27].c, 13 Jan 2004.
14786 +Added \funtabify(). ckuusr.h, ckuus[24].c, 13 Jan 2004.
14788 +Dat Nguyen noticed that (setq u 'p') followed by (u) dumped core. This was
14789 +caused by an over-clever optimization that skipped mallocs for short
14790 +literals, but then went on later to try to free one that hadn't been
14791 +malloc'd. Fixed in dosexp(): ckuus3.c, 14 Jan 2004.
14793 +Catch another copyright date. ckuus5.c, 14 Jan 2004.
14795 +Fixed SWITCH to work even when SET COMMAND DOUBLEQUOTE OFF (from Mark
14796 +Sapiro). ckuus5.c, 15 Jan 2004.
14798 +Changed version to 8.0.211 so scripts can test for recently added features.
14799 +ckcmai.c, 15 Jan 2004.
14801 +Fixed a glitch in K95 "help set port". ckuus2.c, 20 Jan 2004.
14803 +Fix from Jeff: Connections to a TLS-aware protocol which require a reconnect
14804 +upon certificate verification failure could not reconnect if the connection
14805 +was initiated from the command line or via a URL. ckctel.c ckcmai.c
14806 +ckuusr.c ckuus7.c ckuusy.c, 20 Jan 2004.
14808 +From Alex Lewin: makefile target and #ifdef for Mac OS X 10.3 (Panther):
14809 +makefile, ckcnet.c, 7 Feb 2004.
14811 +Added KFLAGS to sco32v507 targets to make PTY and SSH commands work. The
14812 +same flags could probably also be added to earlier OSR5 targets but they
14813 +have not been tested there. makefile, 7 Feb 2004.
14815 +Checked a complaint that "LOCAL &a" did not make array \&a[] local. Indeed
14816 +it did not, and can not. You have to use the full syntax in the LOCAL
14817 +command, "LOCAL \&a[]", or else it doesn't know it's not a macro named &a.
14820 +Fixed some confusion in creating IKSD database file and temp-file names.
14821 +I was calling zfnqfp() without remembering that the path member of the
14822 +returned struct included the filename, so to get just the directory name,
14823 +I needed to strip the filename from the right. ckuusy.c, 2 Mar 2004.
14825 +New ckuath.c, ck_ssl.c from Jeff. 2 Mar 2004.
14827 +Updated Jeff's affiliation in VERSION command text. ckuusr.c, 2 Mar 2004.
14829 +Designation changed from Dev.00 to Beta.01. ckcmai.c, 2 Mar 2004.
14831 +Fixed zrename() syslogging -- it had success and failure reversed.
14832 +Beta.02: ckufio.c, 4 Mar 2004.
14834 +Problem: when accessing IKSD via a kermit:// or iksd:// URL, and a user ID
14835 +is given but no password, doxarg() set the password to "" instead of leaving
14836 +it NULL, but all the tests in dourl() are for NULL. Fixed in doxarg():
14837 +ckuusy.c, 5 Mar 2004.
14839 +The logic in dourl() about which macro to construct (login and connect,
14840 +login and get directory listing, or login and fetch a file) was a bit off,
14841 +so all three cases were not handled. ckcmai.c, 5 Mar 2004.
14843 +Trial Beta builds:
14844 + . HP-UX B.11.11 PA-RISC
14845 + . HP-UX B.11.23 IA64
14846 + . Tru64 4.0G Alpha
14847 + . Tru64 5.1B Alpha
14848 + . Debian 3.0 i386
14849 + . Red Hat ES 2.1 i386
14850 + . Slackware 9.1 i386
14851 + . VMS 7.3-1 Alpha + UCX 5.3
14852 + . VMS 7.3-1 Alpha no TCP/IP
14853 + . VMS 7.3 Alpha MultiNet 4.3 A-X
14854 + . SCO UnixWare 7.1.4 i386
14855 + . SCO OSR5.0.7 i386
14856 + . Solaris 9 Sparc
14858 +Fixed compiler warning in doxarg() caused by typo (NULL instead of NUL) in
14859 +the 5 March doxarg() edit. ckuusy.c, 9 Mar 2004.
14861 +IKSD (kermit://) command-line URLs did not work right if the client had
14862 +already preauthenticated with Kerberos or somesuch because they tried to log
14863 +in again with REMOTE LOGIN. The macros constructed in doxarg() needed to
14864 +check \v(authstate) before attempting REMOTE LOGIN. ckcmai.c, 10 Mar 2004.
14866 +Added ckuker.nr to x.sh (ckdaily upload) and updated ckuker.nr with current
14867 +version number and dates. 10 Mar 2004.
14869 +Replaced hardwired references to /usr/local in makefile with $(prefix)
14870 +(which defaults to /usr/local, but can be overridden on the command line),
14871 +suggested by Nelson Beebe for use with Configure. 10 Mar 2004.
14873 +From Nelson Beebe: In the Kermit makefile in the install target commands,
14876 + cp $(BINARY) $(DESTDIR)$(BINDIR)/kermit || exit 1;\
14878 +Could you please add this line before it:
14880 + rm -f $(DESTDIR)$(BINDIR)/kermit;\
14882 +Some sites (mine included) keep multiple versions of software around,
14883 +with hard links between $(prefix)/progname and $(prefix)/progname-x.y.z.
14884 +Failure to remove the $(prefix)/progname at "make install" time then
14885 +replaces the old $(prefix)/progname-x.y.z with the new one, destroying
14886 +an old version that the site wanted to be preserved. makefile, 10 Mar 2004.
14888 +Minor syntax and typo fixes (mostly prototypes): ckcdeb.h, ckcfns.c,
14889 +ckclib.c, ckufio.c, ckuusr.h, ckuusx.c, 10 Mar 2004. (I still have a few
14892 +Added CC=$(CC) CC2=$(CC2) to many (but not all) makefile targets that
14893 +reference other makefile targets. On some platforms (notably AIX, Solaris,
14894 +SunOS) there are specific targets for different compilers, so I skipped
14895 +those. makefile, 10 Mar 2004.
14897 +Added error checking to kermit:// URL macros, so they don't plow ahead
14898 +after the connection is closed. ckcmai.c, 11 Mar 2004.
14900 +Added FreeBSD 4.9 and 5.1 targets (only the herald is affected).
14901 +makefile, ckuver.h, 11 Mar 2004.
14903 +Added "LIBS=-lcrypt" to bsd44 targets since nowadays crypt is almost always
14904 +unbundled from libc. Also added explanatory notes. makefile, 11 Mar 2004.
14906 +Changed MANDIR to default to $(manroot)/man/man1, and manroot to default
14907 +to $(prefix). More adding of CC=$(CC) clauses: {Free,Net,Open}BSD, 4.4BSD.
14908 +makefile, 11 Mar 2004.
14910 +Miscellaneous cleanups: ckuusx.c, ckcnet.c, ckufio.c, 11 Mar 2004.
14912 +Corrected the check in the linux target to see if /usr/include/crypt.h
14913 +exists, and if so to define HAVE_CRYPT_H, which is used in ckcdeb.h to
14914 +#include <crypt.h> to get the prototype for crypt() and prevent bogus
14915 +conversions on its return type on 64-bit platforms (the previous test wasn't
14916 +quite right and the resulting symbol wasn't spelled right). makefile,
14919 +From Jeff, 14 Mar 2004:
14920 + . Initialize localuidbuf[] in tn_snenv(): ckctel.c.
14921 + . Remove remote-mode checks in hupok() for K95G only (why?): ckuus3.c.
14922 + . Add help text for new K95-only TYPE /GUI switches: ckuus2.c.
14923 + . TYPE /GUI parsing, ...: ckuusr.c.
14924 + . TYPE /GUI action, dotype(): ckuus6.c
14925 + . Change Jeff's affiliation: most modules.
14927 +20 Mar 2004: Looked into adding long file support, i.e. handling files more
14928 +than 2GB (or 4GB) long. Discovered very quickly this would be a major
14929 +project. Each platform has a different API, or environment, or transition
14930 +plan, or whatever -- a nightmare to handle in portable code. At the very
14931 +least we'll need to convert a lot of Kermit variables from long or unsigned
14932 +long to some new Kermit type, which in turn is #defined or typedef'd
14933 +appropriately for each platform (to off_t or size_t or whatever). Then we
14934 +have to worry about the details of open() vs fopen(); printf() formats (%lld
14935 +vs %Ld vs %"PRId64"...), platforms like HP-UX where you might have to use
14936 +different APIs for different file systems on the same computer, etc. We'll
14937 +need to confront this soon, but let's get a good stable 8.0.211 release out
14938 +first! Meanwhile, for future reference, here are a few articles:
14940 +General: http://freshmeat.net/articles/view/709/
14941 +Linux: http://www.ece.utexas.edu/~luo/linux_lfs.html
14942 +HP-UX: http://devrsrc1.external.hp.com/STK/partner/lg_files.pdf
14943 +Solaris: http://wwws.sun.com/software/whitepapers/wp-largefiles/largefiles.pdf
14945 +Looked into FTP timeouts. It appears I can just call empty() (which is
14946 +nothing more than a front end for select()) with the desired timeout before
14947 +any kind of network read. If it returns <= 0, we have a timeout. This is
14948 +not quite the same as using alarm() / signal() around a recv() (which could
14949 +get stuck) but alarm() / signal() are not not used in the FTP module and are
14950 +not naturally portable to Windows, but select() is already in use in the FTP
14951 +module for both Unix and Windows. This form of timeout could be used
14952 +portably for both command response and data reads. What about writes to the
14953 +command or data socket? They can get stuck for hours and hours without
14954 +returning too, but the select() approach won't help here -- we need the
14955 +actual send() or recv() to time out, or be wrapped in an alarm()/signal()
14956 +kind of mechanism. But if we can do that for sends, we can also do it for
14957 +receives. Better check with Jeff before I start programming anything.
14960 +Later: Decided to postpone the above two projects (ditto IPv6) until after
14961 +8.0.211 is released because both will have major impacts on portability.
14962 +Grumble: all i/o APIs should have been designed from the beginning with a
14963 +timeout parameter. To this day, hardly any have this feature.
14965 +3-4 Apr 2004: More 8.0.211 Beta.02+ test builds:
14969 + . Linux Debian 2.1
14973 + . Linux RH 9 (with 84 different combinations of feature selection)
14981 + . SCO UnixWare 2.1.3
14982 + . SCO UnixWare 7.1.4
14983 + . SCO OpenServer 5.0.7
14984 + . SCO XENIX 2.3.4 (no TCP)
14986 +Changes needed: None.
14988 +Problem: SCO XENIX 2.3.4 network build failed in the FTP module with
14989 +header-file syntax and conflicting-definitions trouble. I'm not going to
14990 +try to fix it; 8.0.209 built OK with FTP, so we'll just keep that one
14993 +Got access to VMS 8.1 on IA64. Building the nonet version of C-Kermit
14994 +required minor modifications to ckvvms.h, ckv[ft]io.c, and ckvcon.c, to
14995 +account for a third architecture. Also to SHOW FEATURES in ckuus5.c. Once
14996 +that was done, the UCX 5.5 version built OK too. Starts OK, makes Telnet
14997 +connection OK, sends files. Has some obvious glitches though -- "stat"
14998 +after a file transfer reports 0 elapsed time (in fact it was 00:09:48) and
14999 +1219174400 cps (when in fact it was 10364). This doesn't happen on the
15000 +Alpha. Btw, the IA64 binary is twice as big as the Alpha one. Changed
15001 +to Beta.03. 5 Apr 2004.
15003 +Fixed the ckdaily script to include the makefile and man page in the Zip
15004 +file (they were not included because the Zip file was intended mainly for
15005 +VMS users, but some Unix users prefer Zip to tar.gz). 6 Apr 2004.
15007 +Traced problems in VMS/IA64 statistics report to rftimer()/gftimer() in
15008 +ckvtio.c, which use sys$ and lib$ calls to figure elapsed time. These work
15009 +on VAX and Alpha but not IA64. Sent a report to the chief engineer of the
15010 +IA64 VMS port; he says it's probably a bug in VMS 8.1 (which is not a real
15011 +release); he'll make sure it's fixed in 8.2. As an experiment, tried
15012 +swapping in the Unix versions of these routines (which call gettimeofday()
15013 +etc). They seem work just fine (it hung a couple times but I think that's
15014 +because the underlying system hung too; trying it later on a new connection,
15015 +it was fine; however I noticed a BIG discrepancy in throughput between
15016 +sending and receiving). Moved definitions for VMS64BIT and VMSI64 to
15017 +ckcdeb.h so all modules can use them and added them to the SHOW FEATURES
15018 +display. Added VMSV80 definition to build procedure. Beta.03+. ckcdeb.h,
15019 +ckcuus5.c, ckcvvms.h, ckvtio.c, ckvker.com, 6 Apr 2004.
15021 +While doing the build-all, I noticed the VMS version did not build with
15022 +Multinet or older UCX versions, always with the same errors -- undeclared
15023 +variables, undefined symbols, all TCP/IP related. This didn't happen a
15024 +couple weeks ago... Somehow the order of #includes was messed up --
15025 +ckuusr.h depended on symbols that are defined in ckcnet.h, but ckcnet.h
15026 +was being included after ckuusr.h... this was compounded by two missing
15027 +commas in ckvker.com. 11 Apr 2004.
15029 +Removed Beta designation, released as 8.0.211, 10 Apr 2004.
15033 +I had somehow lost the edit to ckutio.c that changed the UUCP lockfile for
15034 +Mac OS X from /var/spool/uucp to /var/spool/lock. So I slipped it in and
15035 +re-uploaded version 8.0.211. You can tell the difference because SHOW
15036 +VERSIONS has a 17 Apr 2004 for the Communications I/O module. Also the 10.3
15037 +executable now has a designer banner: "Mac OS X 10.3". makefile, ckuver.h,
15038 +ckutio.c, ckuus[45].c, 17 Apr 2004.
15040 +***********************
15042 +++ ckermit-212/ckermit70.txt
15043 @@ -0,0 +1,17956 @@
15045 + [ [1]Contents ] [ [2]C-Kermit ] [ [3]Kermit Home ]
15047 + Supplement to Using C-Kermit, Second Edition
15051 +As of C-Kermit version: 7.0.196
15052 +This file last updated: 8 February 2000
15054 +Authors: Frank da Cruz and Christine M. Gianone
15055 +Address: The Kermit Project
15056 + Columbia University
15057 + 612 West 115th Street
15058 + New York NY 10025-7799
15060 +Fax: +1 (212) 662-6442
15061 +E-Mail: [4]kermit-support@columbia.edu
15062 +Web: [5]http://www.columbia.edu/kermit/
15063 +Or: [6]http://www.kermit-project.org/
15064 +Or: [7]http://www.columbia.nyc.ny.us/kermit/
15065 + _________________________________________________________________
15070 + Copyright © 1997, 2000, Frank da Cruz and Christine M. Gianone.
15071 + All rights reserved.
15074 + Copyright © 1995, 2000, Trustees of Columbia University in the
15075 + City of New York. All rights reserved.
15078 + Copyright © 1985, 2000,
15079 + Trustees of Columbia University in the City of New York. All
15080 + rights reserved. See the C-Kermit [8]COPYING.TXT file or the
15081 + copyright text in the [9]ckcmai.c module for disclaimer and
15084 + When Kerberos(TM) and/or SRP(TM) (Secure Remote Password) and/or SSL
15085 + protocol are included:
15086 + Portions Copyright © 1990, Massachusetts Institute of
15088 + Portions Copyright © 1991, 1993 Regents of the University of
15090 + Portions Copyright © 1991, 1992, 1993, 1994, 1995 by AT&T.
15091 + Portions Copyright © 1997, Stanford University.
15092 + Portions Copyright © 1995-1997, Eric Young
15093 + <eay@cryptosoft.com>.
15095 + For the full text of the third-party copyright notices, see
15097 + _________________________________________________________________
15099 + WHAT IS IN THIS FILE
15101 + This file lists changes made to C-Kermit since the second edition of
15102 + the book [11]Using C-Kermit was published and C-Kermit 6.0 was
15103 + released in November 1996. Use this file as a supplement to the second
15104 + edition of Using C-Kermit until the third edition is published some
15105 + time in 2000. If the "most recent update" shown above is long ago,
15106 + contact Columbia University to see if there is a newer release.
15108 + For further information, also see the [12]CKCBWR.TXT ("C-Kermit
15109 + beware") file for hints, tips, tricks, restrictions, frequently asked
15110 + questions, etc, plus the system-specific "beware file", e.g.
15111 + [13]CKUBWR.TXT for UNIX, [14]CKVBWR.TXT for VMS, etc, and also any
15112 + system-specific update files such as KERMIT95.HTM for Kermit 95 (in
15113 + the DOCS\MANUAL\ subdirectory of your K95 directory).
15115 + This Web-based copy of the C-Kermit 7.0 update notes supersedes the
15116 + plain-text CKERMIT2.TXT file. All changes after 19 January 2000
15117 + appear only here in the Web version. If you need an up-to-date
15118 + plain-text copy, use your Web browser to save this page as plain
15120 + _________________________________________________________________
15124 + In this document, filenames are generally shown in uppercase, but on
15125 + file systems with case-sensitive names such as UNIX, OS-9, and AOS/VS,
15126 + lowercase names are used: [15]ckubwr.txt, [16]ckermit70.txt, etc.
15127 + _________________________________________________________________
15131 + Several other files accompany this new Kermit release:
15134 + Discussion of Kermit's new authentication and encryption
15137 + + [17]Plain-text version
15138 + + [18]HTML (hypertext) version
15141 + How to install and manage an Internet Kermit Service Daemon.
15143 + + [19]Plain-text version
15144 + + [20]HTML (hypertext) version
15146 + Also see [21]cuiksd.htm for instructions for use.
15149 + A thorough presentation of Kermit's new advanced Telnet
15150 + features and controls.
15152 + + [22]Plain-text version
15153 + + [23]HTML (hypertext) version
15154 + _________________________________________________________________
15156 + THE NEW C-KERMIT LICENSE
15158 + The C-Kermit license was rewritten for version 7.0 to grant automatic
15159 + permission to packagers of free operating-system distributions to
15160 + include C-Kermit 7.0. Examples include Linux (GNU/Linux), FreeBSD,
15161 + NetBSD, etc. The new license is in the [24]COPYING.TXT file, and is
15162 + also displayed by C-Kermit itself when you give the VERSION or
15163 + COPYRIGHT command. The new C-Kermit license does not apply to
15165 + _________________________________________________________________
15169 + Thanks to Jeff Altman, who joined the Kermit Project in 1995, for much
15170 + of what you see in C-Kermit 7.0, especially in the networking and
15171 + security areas, and his key role in designing and implementing the
15172 + Internet Kermit Service Daemon. And special thanks to Lucas Hart for
15173 + lots of help with the VMS version; to Peter Eichhorn for continuous
15174 + testing on the full range of HP-UX versions and for a consolidated set
15175 + of HP-UX makefile targets; and to Colin Allen, Mark Allen, Roger
15176 + Allen, Ric Anderson, William Bader, Mitch Baker, Mitchell Bass, Nelson
15177 + Beebe, Gerry Belanger, Jeff Bernsten, Mark Berryman, John Bigg, Volker
15178 + Borchert, Jonathan Boswell, Tim Boyer, Frederick Bruckman, Kenneth
15179 + Cochran, Jared Crapo, Bill Delaney, Igor Sobrado Delgado, Clarence
15180 + Dold, Joe Doupnik, John Dunlap, Max Evarts, Patrick French, Carl
15181 + Friedberg, Carl Friend, Hirofumi Fujii, Andrew Gabriel, Gabe Garza,
15182 + Boyd Gerber, David Gerber, George Gilmer, Hunter Goatley, DJ Hagberg,
15183 + Kevin Handy, Andy Harper, Randolph Herber, Sven Holström, Michal
15184 + Jaegermann, Graham Jenkins, Dick Jones, Terry Kennedy, Robert D Keys,
15185 + Nick Kisseberth, Igor Kovalenko, David Lane, Adam Laurie, Jeff
15186 + Liebermann, Eric Lonvick, Hoi Wan Louis, Arthur Marsh, Gregorie
15187 + Martin, Peter Mauzey, Dragan Milicic, Todd Miller, Christian Mondrup,
15188 + Daniel Morato, Dat Nguyen, Herb Peyerl, Jean-Pierre Radley, Steve
15189 + Rance, Stephen Riehm, Nigel Roles, Larry Rosenman, Jay S Rouman, David
15190 + Sanderson, John Santos, Michael Schmitz, Steven Schultz, Bob Shair,
15191 + Richard Shuford, Fred Smith, Michael Sokolov, Jim Spath, Peter Szell,
15192 + Ted T'so, Brian Tillman, Linus Torvalds, Patrick Volkerding, Martin
15193 + Vorländer, Steve Walton, Ken Weaverling, John Weekley, Martin
15194 + Whitaker, Jim Whitby, Matt Willman, Joellen Windsor, Farrell Woods,
15195 + and many others for binaries, hosting, reviews, suggestions, advice,
15196 + bug reports, and all the rest over the 3+ year C-Kermit 7.0
15197 + development cycle. Thanks to Russ Nelson and the board of the Open
15198 + Software Initiative ([26]http://www.opensource.org) for their
15199 + cooperation in developing the new C-Kermit license and to the
15200 + proprietors of those free UNIX distributions that have incorporated
15201 + C-Kermit 7.0 for their cooperation and support, especially FreeBSD's
15203 + _________________________________________________________________
15205 + NOTE TO KERMIT 95 USERS
15207 + Kermit 95 and C-Kermit share the same command and scripting language,
15208 + the same Kermit file-transfer protocol implementation, and much else
15211 + Like the book [27]Using C-Kermit, this file concentrates on the
15212 + aspects of C-Kermit that are common to all versions: UNIX, VMS,
15213 + Windows, OS/2, VOS, AOS/VS, etc. Please refer to your Kermit 95
15214 + documentation for information that is specific to Kermit 95.
15216 + C-Kermit 7.0 corresponds to Kermit 95 1.1.19.
15217 + _________________________________________________________________
15219 + C-KERMIT VERSIONS AND VERSION NUMBERS
15221 + "C-Kermit" refers to all the many programs that are compiled in whole
15222 + or in part from common C-language source code, comprising:
15224 + * A Kermit file transfer protocol module
15225 + * A command parser and script execution module
15226 + * A modem-dialing module
15227 + * A network support module
15228 + * A character-set translation module.
15230 + and several others. These "system-independent" modules are combined
15231 + with system-dependent modules for each platform to provide the
15232 + required input/output functions, and also in some cases overlaid with
15233 + an alternative user interface, such as Macintosh Kermit's
15234 + point-and-click interface, and in some cases also a terminal emulator,
15237 + The C-Kermit version number started as 1.0, ... 3.0, 4.0, 4.1 and then
15238 + (because of confusion at the time with Berkeley UNIX 4.2), 4B, 4C, and
15239 + so on, with the specific edit number in parentheses, for example
15240 + 4E(072) or 5A(188). This scheme was used through 5A(191), but now we
15241 + have gone back to the traditional numbering scheme with decimal
15242 + points: major.minor.edit; for example 7.0.196. Internal version
15243 + numbers (the \v(version) variable), however, are compatible in
15244 + C-Kermit 5A upwards.
15246 + Meanwhile, C-Kermit derivatives for some platforms (Windows,
15247 + Macintosh) might go through several releases while C-Kermit itself
15248 + remains the same. These versions have their own platform-specific
15249 + version numbers, such as Kermit 95 1.1.1, 1.1.2, and so on.
15251 + C-Kermit Version History:
15253 + 1.0 1981-1982 Command-line only, 4.2 BSD UNIX only
15254 + 2.0 (*) (who remembers...)
15255 + 3.0 May 1984 Command-line only, supports several platforms
15256 + 4.0-4.1 Feb-Apr 1985 (*) First interactive and modular version
15258 + 4D(060) April 1986
15259 + 4E(066) August 1987 Long packets
15260 + 4E(068) January 1988
15261 + 4E(072) January 1989
15262 + 4F(095) August 1989 (*) Attribute packets
15263 + 5A(188) November 1992 Scripting, TCP/IP, sliding windows (1)
15264 + 5A(189) September 1993 Control-char unprefixing
15265 + 5A(190) October 1994 Recovery
15266 + 5A(191) April 1995 OS/2 only
15267 + 6.0.192 September 1996 Intelligent dialing, autodownload, lots more (2)
15268 + 6.1.193 1997-98 (*) Development only
15269 + 6.1.194 June 1998 K95 only - switches, directory recursion, more
15270 + 7.0.195 August 1999 IKSD + more (CU only as K95 1.1.18-CU)
15271 + 7.0.196 1 January 2000 Unicode, lots more
15273 + (*) Never formally released (4.0 was a total rewrite)
15274 + (1) Using C-Kermit, 1st Edition
15275 + (2) Using C-Kermit, 2nd Edition
15276 + _________________________________________________________________
15280 + I. [28]C-KERMIT DOCUMENTATION
15282 + II. [29]NEW FEATURES
15284 + (0) [30]INCOMPATIBILITIES WITH PREVIOUS RELEASES
15285 + (1) [31]PROGRAM AND FILE MANAGEMENT AND COMMANDS
15286 + 1.0. [32]Bug fixes
15287 + 1.1. [33]Command Continuation
15288 + 1.2. [34]Editor Interface
15289 + 1.3. [35]Web Browser and FTP Interface
15290 + 1.4. [36]Command Editing
15291 + 1.5. [37]Command Switches
15292 + 1.5.1. [38]General Switch Syntax
15293 + 1.5.2. [39]Order and Effect of Switches
15294 + 1.5.3. [40]Distinguishing Switches from Other Fields
15295 + 1.5.4. [41]Standard File Selection Switches
15296 + 1.5.5. [42]Setting Preferences for Different Commands
15297 + 1.6. [43]Dates and Times
15298 + 1.7. [44]Partial Completion of Keywords
15299 + 1.8. [45]Command Recall
15300 + 1.9. [46]EXIT Messages
15301 + 1.10. [47]Managing Keyboard Interruptions
15302 + 1.11. [48]Taming the Wild Backslash -- Part Deux
15303 + 1.11.1. [49]Background
15304 + 1.11.2. [50]Kermit's Quoting Rules
15305 + 1.11.3. [51]Passing DOS Filenames from Kermit to Shell Commands
15306 + 1.11.4. [52]Using Variables to Hold DOS Filenames
15307 + 1.11.5. [53]Passing DOS Filenames as Parameters to Macros
15308 + 1.11.6. [54]Passing DOS File Names from Macro Parameters to the
15310 + 1.11.7. [55]Passing DOS Filenames to Kermit from the Shell
15311 + 1.12. [56]Debugging
15313 + 1.14. [58]Automatic File-Transfer Packet Recognition at the Command Pr
15315 + 1.15. [59]The TYPE Command
15316 + 1.16. [60]The RESET Command
15317 + 1.17. [61]The COPY and RENAME Commands
15318 + 1.18. [62]The MANUAL Command
15319 + 1.19. [63]String and Filename Matching Patterns
15320 + 1.20. [64]Multiple Commands on One Line
15321 + 1.21. [65]What Do I Have?
15322 + 1.22. [66]Generalized File Input and Output
15323 + 1.22.1. [67]Why Another I/O System?
15324 + 1.22.2. [68]The FILE Command
15325 + 1.22.3. [69]FILE Command Examples
15326 + 1.22.4. [70]Channel Numbers
15327 + 1.22.5. [71]FILE Command Error Codes
15328 + 1.22.6. [72]File I/O Variables
15329 + 1.22.7. [73]File I/O Functions
15330 + 1.22.8. [74]File I/O Function Examples
15331 + 1.23. [75]The EXEC Command
15332 + 1.24. [76]Getting Keyword Lists with '?'
15333 + (2) [77]MAKING AND USING CONNECTIONS
15334 + 2.0. [78]SET LINE and SET HOST Command Switches
15336 + 2.1.1. [80]The Dial Result Message
15337 + 2.1.2. [81]Long-Distance Dialing Changes
15338 + 2.1.3. [82]Forcing Long-Distance Dialing
15339 + 2.1.4. [83]Exchange-Specific Dialing Decisions
15340 + 2.1.5. [84]Cautions about Cheapest-First Dialing
15341 + 2.1.6. [85]Blind Dialing (Dialing with No Dialtone)
15342 + 2.1.7. [86]Trimming the Dialing Dialog
15343 + 2.1.8. [87]Controlling the Dialing Speed
15344 + 2.1.9. [88]Pretesting Phone Number Conversions
15345 + 2.1.10. [89]Greater Control over Partial Dialing
15346 + 2.1.11. [90]New DIAL-related Variables and Functions
15347 + 2.1.12. [91]Increased Flexibility of PBX Dialing
15348 + 2.1.13. [92]The DIAL macro - Last-Minute Phone Number Conversions
15349 + 2.1.14. [93]Automatic Tone/Pulse Dialing Selection
15350 + 2.1.15. [94]Dial-Modifier Variables
15351 + 2.1.16. [95]Giving Multiple Numbers to the DIAL Command
15353 + 2.2.1. [97]New Modem Types
15354 + 2.2.2. [98]New Modem Controls
15355 + 2.3. [99]TELNET and RLOGIN
15356 + 2.3.0. [100]Bug Fixes
15357 + 2.3.1. [101]Telnet Binary Mode Bug Adjustments
15358 + 2.3.2. [102]VMS UCX Telnet Port Bug Adjustment
15359 + 2.3.3. [103]Telnet New Environment Option
15360 + 2.3.4. [104]Telnet Location Option
15361 + 2.3.5. [105]Connecting to Raw TCP Sockets
15362 + 2.3.6. [106]Incoming TCP Connections
15363 + 2.4. [107]The EIGHTBIT Command
15364 + 2.5. [108]The Services Directory
15365 + 2.6. [109]Closing Connections
15366 + 2.7. [110]Using C-Kermit with External Communication Programs
15367 + 2.7.0. [111]C-Kermit over tn3270 and tn5250
15368 + 2.7.1. [112]C-Kermit over Telnet
15369 + 2.7.2. [113]C-Kermit over Rlogin
15370 + 2.7.3. [114]C-Kermit over Serial Communication Programs
15371 + 2.7.4. [115]C-Kermit over Secure Network Clients
15372 + 2.7.4.1. [116]SSH
15373 + 2.7.4.2. [117]SSL
15374 + 2.7.4.3. [118]SRP
15375 + 2.7.4.4. [119]SOCKS
15376 + 2.7.4.5. [120]Kerberos and SRP
15377 + 2.8. [121]Scripting Local Programs
15378 + 2.9. [122]X.25 Networking
15379 + 2.9.1. [123]IBM AIXLink/X.25 Network Provider Interface for AIX
15380 + 2.9.2. [124]HP-UX X.25
15381 + 2.10. [125]Additional Serial Port Controls
15382 + 2.11. [126]Getting Access to the Dialout Device
15383 + 2.12. [127]The Connection Log
15384 + 2.13. [128]Automatic Connection-Specific Flow Control Selection
15385 + 2.14. [129]Trapping Connection Establishment and Loss
15386 + 2.15. [130]Contacting Web Servers with the HTTP Command
15387 + (3) [131]TERMINAL CONNECTION
15388 + 3.1. [132]CONNECT Command Switches
15389 + 3.2. [133]Triggers
15390 + 3.3. [134]Transparent Printing
15391 + 3.4. [135]Binary and Text Session Logs
15392 + (4) [136]FILE TRANSFER AND MANAGEMENT
15393 + 4.0. [137]Bug Fixes, Minor Changes, and Clarifications
15394 + 4.1. [138]File-Transfer Filename Templates
15395 + 4.1.1. [139]Templates in the As-Name
15396 + 4.1.2. [140]Templates on the Command Line
15397 + 4.1.3. [141]Post-Transfer Renaming
15398 + 4.2. [142]File-Transfer Pipes and Filters
15399 + 4.2.1. [143]Introduction
15400 + 4.2.1.1. [144]Terminology
15401 + 4.2.1.2. [145]Notation
15402 + 4.2.1.3. [146]Security
15403 + 4.2.2. [147]Commands for Transferring from and to Pipes
15404 + 4.2.2.1. [148]Sending from a Command
15405 + 4.2.2.2. [149]Receiving to a Command
15406 + 4.2.3. [150]Using File-Transfer Filters
15407 + 4.2.3.1. [151]The SEND Filter
15408 + 4.2.3.2. [152]The RECEIVE Filter
15409 + 4.2.4. [153]Implicit Use of Pipes
15410 + 4.2.5. [154]Success and Failure of Piped Commands
15411 + 4.2.6. [155]Cautions about Using Pipes to Transfer Directory Trees
15412 + 4.2.7. [156]Pipes and Encryption
15413 + 4.2.8. [157]Commands and Functions Related to Pipes
15414 + 4.2.8.1. [158]The OPEN !READ and OPEN !WRITE Commands
15415 + 4.2.8.2. [159]The REDIRECT Command
15416 + 4.2.8.3. [160]Receiving Mail and Print Jobs
15417 + 4.2.8.4. [161]Pipe-Related Functions
15418 + 4.3. [162]Automatic Per-File Text/Binary Mode Switching
15419 + 4.3.1. [163]Exceptions
15420 + 4.3.2. [164]Overview
15421 + 4.3.3. [165]Commands
15422 + 4.3.4. [166]Examples
15423 + 4.4. [167]File Permissions
15424 + 4.4.1. [168]When ATTRIBUTES PROTECTION is OFF
15425 + 4.4.1.1. [169]Unix
15426 + 4.4.1.2. [170]VMS
15427 + 4.4.2. [171]When ATTRIBUTES PROTECTION is ON
15428 + 4.4.2.1. [172]System-Specific Permissions
15429 + 4.4.2.1.1. [173]UNIX
15430 + 4.4.2.1.2. [174]VMS
15431 + 4.4.2.2. [175]System-Independent Permissions
15432 + 4.5. [176]File Management Commands
15433 + 4.5.1. [177]The DIRECTORY Command
15434 + 4.5.2. [178]The CD and BACK Commands
15435 + 4.5.2.1. [179]Parsing Improvements
15436 + 4.5.2.2. [180]The CDPATH
15437 + 4.5.3. [181]Creating and Removing Directories
15438 + 4.5.4. [182]The DELETE and PURGE Commands
15439 + 4.6. [183]Starting the Remote Kermit Server Automatically
15440 + 4.7. [184]File-Transfer Command Switches
15441 + 4.7.1. [185]SEND Command Switches
15442 + 4.7.2. [186]GET Command Switches
15443 + 4.7.3. [187]RECEIVE Command Switches
15444 + 4.8. [188]Minor Kermit Protocol Improvements
15445 + 4.8.1. [189]Multiple Attribute Packets
15446 + 4.8.2. [190]Very Short Packets
15447 + 4.9. [191]Wildcard / File Group Expansion
15448 + 4.9.1. [192]In UNIX C-Kermit
15449 + 4.9.2. [193]In Kermit 95
15450 + 4.9.3. [194]In VMS, AOS/VS, OS-9, VOS, etc.
15451 + 4.10. [195]Additional Pathname Controls
15452 + 4.11. [196]Recursive SEND and GET: Transferring Directory Trees
15453 + 4.11.1. [197]Command-Line Options
15454 + 4.11.2. [198]The SEND /RECURSIVE Command
15455 + 4.11.3. [199]The GET /RECURSIVE Command
15456 + 4.11.4. [200]New and Changed File Functions
15457 + 4.11.5. [201]Moving Directory Trees Between Like Systems
15458 + 4.11.6. [202]Moving Directory Trees Between Unlike Systems
15459 + 4.12. [203]Where Did My File Go?
15460 + 4.13. [204]File Output Buffer Control
15461 + 4.14. [205]Improved Responsiveness
15462 + 4.15. [206]Doubling and Ignoring Characters for Transparency
15463 + 4.16. [207]New File-Transfer Display Formats
15464 + 4.17. [208]New Transaction Log Formats
15465 + 4.17.1. [209]The BRIEF Format
15466 + 4.17.2. [210]The FTP Format
15467 + 4.18. [211]Unprefixing NUL
15468 + 4.19. [212]Clear-Channel Protocol
15469 + 4.20. [213]Streaming Protocol
15470 + 4.20.1. [214]Commands for Streaming
15471 + 4.20.2. [215]Examples of Streaming
15472 + 4.20.2.1. [216]Streaming on Socket-to-Socket Connections
15473 + 4.20.2.2. [217]Streaming on Telnet Connections
15474 + 4.20.2.3. [218]Streaming with Limited Packet Length
15475 + 4.20.2.4. [219]Streaming on Dialup Connections
15476 + 4.20.2.5. [220]Streaming on X.25 Connections
15477 + 4.20.3. [221]Streaming - Preliminary Conclusions
15478 + 4.21. [222]The TRANSMIT Command
15479 + 4.22. [223]Coping with Faulty Kermit Implementations
15480 + 4.22.1. [224]Failure to Accept Modern Negotiation Strings
15481 + 4.22.2. [225]Failure to Negotiate 8th-bit Prefixing
15482 + 4.22.3. [226]Corrupt Files
15483 + 4.22.4. [227]Spurious Cancellations
15484 + 4.22.5. [228]Spurious Refusals
15485 + 4.22.6. [229]Failures during the Data Transfer Phase
15486 + 4.22.7. [230]Fractured Filenames
15487 + 4.22.8. [231]Bad File Dates
15488 + 4.23. [232]File Transfer Recovery
15489 + 4.24. [233]FILE COLLISION UPDATE Clarification
15490 + 4.25. [234]Autodownload Improvements
15491 + (5) [235]CLIENT/SERVER
15493 + 5.1. [237]New Command-Line Options
15494 + 5.2. [238]New Client Commands
15495 + 5.3. [239]New Server Capabilities
15496 + 5.3.1. [240]Creating and Removing Directories
15497 + 5.3.2. [241]Directory Listings
15498 + 5.4. [242]Syntax for Remote Filenames with Embedded Spaces
15499 + 5.5. [243]Automatic Orientation Messages upon Directory Change
15500 + 5.6. [244]New Server Controls
15501 + 5.7. [245]Timeouts during REMOTE HOST Command Execution
15502 + (6) [246]INTERNATIONAL CHARACTER SETS
15503 + 6.0. [247]ISO 8859-15 Latin Alphabet 9
15504 + 6.1. [248]The HP-Roman8 Character Set
15505 + 6.2. [249]Greek Character Sets
15506 + 6.3. [250]Additional Latin-2 Character Sets
15507 + 6.4. [251]Additional Cyrillic Character Sets
15508 + 6.5. [252]Automatic Character-Set Switching
15509 + 6.6. [253]Unicode
15510 + 6.6.1. [254]Overview of Unicode
15511 + 6.6.2. [255]UCS Byte Order
15512 + 6.6.2. [256]UCS Transformation Formats
15513 + 6.6.3. [257]Conformance Levels
15514 + 6.6.4. [258]Relationship of Unicode with Kermit's Other Character Sets
15515 + 6.6.5. [259]Kermit's Unicode Features
15516 + 6.6.5.1. [260]File Transfer
15517 + 6.6.5.2. [261]The TRANSLATE Command
15518 + 6.6.5.3. [262]Terminal Connection
15519 + 6.6.5.4. [263]The TRANSMIT Command
15520 + 6.6.5.5. [264]Summary of Kermit Unicode Commands
15521 + 6.7. [265]Client/Server Character-Set Switching
15522 + (7) [266]SCRIPT PROGRAMMING
15523 + 7.0. [267]Bug Fixes
15524 + 7.1. [268]The INPUT Command
15525 + 7.1.1. [269]INPUT Timeouts
15526 + 7.1.2. [270]New INPUT Controls
15527 + 7.1.3. [271]INPUT with Pattern Matching
15528 + 7.1.4. [272]The INPUT Match Result
15529 + 7.2. [273]New or Improved Built-In Variables
15530 + 7.3. [274]New or Improved Built-In Functions
15531 + 7.4. [275]New IF Conditions
15532 + 7.5. [276]Using More than Ten Macro Arguments
15533 + 7.6. [277]Clarification of Function Call Syntax
15534 + 7.7. [278]Autodownload during INPUT Command Execution
15535 + 7.8. [279]Built-in Help for Functions.
15536 + 7.9. [280]Variable Assignments
15537 + 7.9.1. [281]Assignment Operators
15538 + 7.9.2. [282]New Assignment Commands
15539 + 7.10. [283]Arrays
15540 + 7.10.1. [284]Array Initializers
15541 + 7.10.2. [285]Turning a String into an Array of Words
15542 + 7.10.3. [286]Arrays of Filenames
15543 + 7.10.4. [287]Automatic Arrays
15544 + 7.10.5. [288]Sorting Arrays
15545 + 7.10.6. [289]Displaying Arrays
15546 + 7.10.7. [290]Other Array Operations
15547 + 7.10.8. [291]Hints for Using Arrays
15548 + 7.10.9. [292]Do-It-Yourself Arrays
15549 + 7.10.10. [293]Associative Arrays
15550 + 7.11. [294]OUTPUT Command Improvements
15551 + 7.12. [295]Function and Variable Diagnostics
15552 + 7.13. [296]Return Value of Macros
15553 + 7.14. [297]The ASSERT, FAIL, and SUCCEED Commands.
15554 + 7.15. [298]Using Alarms
15555 + 7.16. [299]Passing Arguments to Command Files
15556 + 7.17. [300]Dialogs with Timed Responses
15557 + 7.18. [301]Increased Flexibility of SWITCH Case Labels
15558 + 7.19. "[302]Kerbang" Scripts
15559 + 7.20. [303]IF and XIF Statement Syntax
15560 + 7.20.1. [304]The IF/XIF Distinction
15561 + 7.20.2. [305]Boolean Expressions (The IF/WHILE Condition)
15562 + 7.21. [306]Screen Formatting and Cursor Control
15563 + 7.22. [307]Evaluating Arithmetic Expressions
15564 + 7.23. [308]Floating-Point Arithmetic
15565 + 7.24. [309]Tracing Script Execution
15566 + 7.25. [310]Compact Substring Notation
15567 + 7.26. [311]New WAIT Command Options
15568 + 7.26.1. [312]Waiting for Modem Signals
15569 + 7.26.2. [313]Waiting for File Events
15570 + 7.27. [314]Relaxed FOR and SWITCH Syntax
15571 + (8) [315]USING OTHER FILE TRANSFER PROTOCOLS
15572 + (9) [316]COMMAND-LINE OPTIONS
15573 + 9.0. [317]Extended-Format Command-Line Options
15574 + 9.1. [318]Command Line Personalities
15575 + 9.2. [319]Built-in Help for Command Line Options
15576 + 9.3. [320]New Command-Line Options
15577 + (10) [321]C-KERMIT AND G-KERMIT
15579 +III. [322]APPENDICES
15581 +III.1. [323]Character Set Tables
15582 +III.1.1. [324]The Hewlett Packard Roman8 Character Set
15583 +III.1.2. [325]Greek Character Sets
15584 +III.1.2.1. [326]The ISO 8859-7 Latin / Greek Alphabet
15585 +III.1.2.2. [327]The ELOT 927 Character Set
15586 +III.1.2.3. [328]PC Code Page 869
15587 +III.2. [329]Updated Country Codes
15589 +IV. [330]ERRATA & CORRIGENDA: Corrections to "Using C-Kermit" 2nd Edition.
15590 +V. [331]ADDITIONAL COPYRIGHT NOTICES
15591 + _________________________________________________________________
15593 +I. C-KERMIT DOCUMENTATION
15595 + The user manual for C-Kermit is:
15597 + Frank da Cruz and Christine M. Gianone, [332]Using C-Kermit, Second
15598 + Edition, Digital Press / Butterworth-Heinemann, Woburn, MA, 1997,
15599 + 622 pages, ISBN 1-55558-164-1.
15601 + [333]CLICK HERE for reviews.
15603 + The present document is a supplement to Using C-Kermit 2nd Ed, not a
15604 + replacement for it.
15606 + US single-copy price: $52.95; quantity discounts available. Available
15607 + in bookstores or directly from Columbia University:
15609 + The Kermit Project
15610 + Columbia University
15611 + 612 West 115th Street
15612 + New York NY 10025-7799
15614 + Telephone: +1 (212) 854-3703
15615 + Fax: +1 (212) 662-6442
15617 + Domestic and overseas orders accepted. Price: US $44.95 (US, Canada,
15618 + and Mexico). Shipping: $4.00 within the USA; $15.00 to all other
15619 + countries. Orders may be paid by MasterCard or Visa, or prepaid by
15620 + check in US dollars. Add $65 bank fee for checks not drawn on a US
15621 + bank. Do not include sales tax. Inquire about quantity discounts.
15623 + You can also order by phone from the publisher, Digital Press /
15624 + [334]Butterworth-Heinemann, with MasterCard, Visa, or American
15627 + +1 800 366-2665 (Woburn, Massachusetts office for USA & Canada)
15628 + +44 1865 314627 (Oxford, England distribution centre for UK & Europe)
15629 + +61 03 9245 7111 (Melbourne, Vic, office for Australia & NZ)
15630 + +65 356-1968 (Singapore office for Asia)
15631 + +27 (31) 2683111 (Durban office for South Africa)
15633 + A [335]German-language edition of the First Edition is also available:
15635 + Frank da Cruz and Christine M. Gianone, C-Kermit - Einführung und
15636 + Referenz, Verlag Heinz Heise, Hannover, Germany (1994). ISBN
15637 + 3-88229-023-4. Deutsch von Gisbert W. Selke. Price: DM 88,00.
15638 + Verlag Heinz Heise GmbH & Co. KG, Helstorfer Strasse 7, D-30625
15639 + Hannover. Tel. +49 (05 11) 53 52-0, Fax. +49 (05 11) 53 52-1 29.
15641 + The [336]Kermit file transfer protocol is specified in:
15643 + Frank da Cruz, Kermit, A File Transfer Protocol, Digital Press,
15644 + Bedford, MA, 1987, 379 pages, ISBN 0-932376-88-6. US single-copy
15645 + price: $39.95. Availability as above.
15647 + News and articles about Kermit software and protocol are published
15648 + periodically in the journal, [337]Kermit News. Subscriptions are free;
15649 + contact Columbia University at the address above.
15651 + Online news about Kermit is published in the
15652 + [338]comp.protocols.kermit.announce and
15653 + [339]comp.protocols.kermit.misc newsgroups.
15654 + _________________________________________________________________
15658 + Support for the Bell Labs Plan 9 operating system was added to version
15659 + 6.0 too late to be mentioned in the book (although it does appear on
15662 + Specific changes and additions are grouped together by major topic,
15663 + roughly corresponding to the chapters of [340]Using C-Kermit.
15664 + _________________________________________________________________
15666 + 0. INCOMPATIBILITIES WITH PREVIOUS RELEASES
15668 + 1. C-Kermit 7.0 uses FAST Kermit protocol settings by default. This
15669 + includes "unprefixing" of certain control characters. Because of
15670 + this, file transfers that worked with previous releases might not
15671 + work in the new release (but it is more likely that they will
15672 + work, and much faster). If a transfer fails, you'll get a
15673 + context-sensitive hint suggesting possible causes and cures.
15674 + Usually SET PREFIXING ALL does the trick.
15675 + 2. C-Kermit 7.0 transfers files in BINARY mode by default. To restore
15676 + the previous behavior, put SET FILE TYPE TEXT in your C-Kermit
15677 + initialization file.
15678 + 3. No matter whether FILE TYPE is BINARY or TEXT by default, C-Kermit
15679 + 7.0 now switches between text and binary mode automatically on a
15680 + per-file basis according to various criteria, including (a) which
15681 + kind of platform is on the other end of the connection (if known),
15682 + (b) the version of Kermit on the other end, and (c) the file's
15683 + name (see [341]Section 4, especially [342]4.3). To disable this
15684 + automatic switching and restore the earlier behavior, put SET
15685 + TRANSFER MODE MANUAL in your C-Kermit initialization file. To
15686 + disable automatic switching for a particular transfer, include a
15687 + /TEXT or /BINARY switch with your SEND or GET command.
15688 + 4. The RESEND and REGET commands automatically switch to binary mode;
15689 + previously if RESEND or REGET were attempted when FILE TYPE was
15690 + TEXT, these commands would fail immediately, with a message
15691 + telling you they work only when the FILE TYPE is BINARY. Now they
15692 + simply do this for you. See [343]Section 4.23 for additional
15693 + (important) information.
15694 + 5. SET PREFIXING CAUTIOUS and MINIMAL now both prefix linefeed (10
15695 + and 138) in case rlogin, ssh, or cu are "in the middle", since
15696 + otherwise <LF>~ might appear in Kermit packets, and this would
15697 + cause rlogin, ssh, or cu to disconnect, suspend,escape back, or
15698 + otherwise wreck the file transfer. Xon and Xoff are now always
15699 + prefixed too, even when Xon/Xoff flow control is not in effect,
15700 + since unprefixing them has proven dangerous on TCP/IP connections.
15701 + 6. In UNIX, VMS, Windows, and OS/2, the DIRECTORY command is built
15702 + into C-Kermit itself rather than implemented by running an
15703 + external command or program. The built-in command might not behave
15704 + the way the platform-specific external one did, but many options
15705 + are available for customization. Of course the underlying
15706 + platform-specific command can still be accessed with "!", "@", or
15707 + "RUN" wherever the installation does not forbid. In UNIX, the "ls"
15708 + command can be accessed directly as "ls" in C-Kermit. See
15709 + [344]Section 4.5.1 for details.
15710 + 7. SEND ? prints a list of switches rather than a list of filenames.
15711 + If you want to see a list of filenames, use a (system-dependent)
15712 + construction such as SEND ./? (for UNIX, Windows, or OS/2), SEND
15713 + []? (VMS), etc. See [345]Sections 1.5 and [346]4.7.1.
15714 + 8. In UNIX, OS-9, and Kermit 95, the wildcard characters in previous
15715 + versions were * and ?. In C-Kermit 7.0 they are *, ?, [, ], {, and
15716 + }, with dash used inside []'s to denote ranges and comma used
15717 + inside {} to separate list elements. If you need to include any of
15718 + these characters literally in a filename, precede each one with
15719 + backslash (\). See [347]Section 4.9.
15720 + 9. SET QUIET { ON, OFF } is now on the command stack, just like SET
15721 + INPUT CASE, SET COUNT, SET MACRO ERROR, etc, as described on p.458
15722 + of [348]Using C-Kermit, 2nd Edition. This allows any macro or
15723 + command file to SET QUIET ON or OFF without worrying about saving
15724 + and restoring the global QUIET value. For example, this lets you
15725 + write a script that tries SET LINE on lots of devices until it
15726 + finds one free without spewing out loads of error messages, and
15727 + also without disturbing the global QUIET setting, whatever it was.
15728 + 10. Because of the new "." operator (which introduces assignments),
15729 + macros whose names begin with "." can not be invoked "by name".
15730 + However, they still can be invoked with DO.
15731 + 11. The syntax of the EVALUATE command has changed. See [349]Section
15732 + 7.9.2. To restore the previous syntax, use SET EVALUATE OLD.
15733 + 12. The \v(directory) variable now includes the trailing directory
15734 + separator; in previous releases it did not. This is to allow
15735 + constructions such as:
15736 + cd \v(dir)data.tmp
15737 + to work across platforms that might have different directory
15738 + notation, such as UNIX, Windows, and VMS.
15739 + 13. Prior to C-Kermit 7.0, the FLOW-CONTROL setting was global and
15740 + sticky. In C-Kermit 7.0, there is an array of default flow-control
15741 + values for each kind of connection, that are applied automatically
15742 + at SET LINE/PORT/HOST time. Thus a SET FLOW command given before
15743 + SET LINE/PORT/HOST is likely to be undone. Therefore SET FLOW can
15744 + be guaranteed to have the desired effect only if given after the
15745 + SET LINE/PORT/HOST command.
15746 + 14. Character-set translation works differently in the TRANSMIT
15747 + command when (a) the file character-set is not the same as the
15748 + local end of the terminal character-set, or (b) when the terminal
15749 + character-set is TRANSPARENT.
15750 + _________________________________________________________________
15752 + 1. PROGRAM AND FILE MANAGEMENT AND COMMANDS
15756 + The following patches were issued to correct bugs in C-Kermit 6.0.
15757 + These are described in detail in the 6.0 PATCHES file. All of these
15758 + fixes have been incorporated in C-Kermit 6.1 (never released except as
15759 + K95 1.1.16-17) and 7.0.
15761 + 0001 All UNIX C-Kermit mishandles timestamps on files before 1970
15762 + 0002 Solaris 2.5++ Compilation error on Solaris 2.5 with Pro C
15763 + 0003 All VMS CKERMIT.INI Fix for VMS
15764 + 0004 VMS/VAX/UCX 2.0 C-Kermit 6.0 can't TELNET on VAX/VMS with UCX 2.0
15765 + 0005 All C-Kermit Might Send Packets Outside Window
15766 + 0006 All MOVE from SEND-LIST does not delete original files
15767 + 0007 Solaris 2.5++ Higher serial speeds on Solaris 2.5
15768 + 0008 All C-Kermit application file name can't contain spaces
15769 + 0009 AT&T 7300 UNIXPC setuid and hardware flow-control problems
15770 + 0010 Linux on Alpha Patch to make ckutio.c compile on Linux/Alpha
15771 + 0011 OS-9/68000 2.4 Patch to make ck9con.c compile on OS-9/68000 2.4
15772 + 0012 MW Coherent 4.2 Patches for successful build on Coherent 4.2
15773 + 0013 SINIX-Y 5.43 "delay" variable conflicts with <sys/clock.h>
15774 + 0014 VMS/VAX/CMU-IP Subject: Patches for VAX/VMS 5.x + CMU-IP
15775 + 0015 All XECHO doesn't flush its output
15776 + 0016 VMS CD and other directory operations might not work
15777 + 0017 Linux 1.2.x++ Use standard POSIX interface for high serial speeds
15778 + 0018 UNIX SET WILDCARD-EXPANSION SHELL dumps core
15779 + 0019 All Hayes V.34 modem init string problem
15780 + 0020 All READ command does not fail if file not open
15781 + 0021 All Problems with long function arguments
15782 + 0022 All Certain \function()s can misbehave
15783 + 0023 All X MOD 0 crashes program
15784 + 0024 All Internal bulletproofing for lower() function
15785 + 0025 OpenBSD Real OpenBSD support for C-Kermit 6.0
15786 + 0026 All Incorrect checks for macro/command-file nesting depth
15787 + 0027 All ANSWER doesn't automatically CONNECT
15788 + 0028 All Overzealous EXIT warning
15789 + 0029 All OUTPUT doesn't echo when DUPLEX is HALF
15790 + 0030 All Minor problems with REMOTE DIRECTORY/DELETE/etc
15791 + 0031 All CHECK command broken
15792 + 0032 All Problem with SET TRANSMIT ECHO
15793 + 0033 UNIX, VMS, etc HELP SET SERVER says too much
15794 + 0034 All READ and !READ too picky about line terminators
15795 + 0035 All END from inside SWITCH doesn't work
15796 + 0036 All Problem telnetting to multihomed hosts
15797 + 0037 All Redirection failures in REMOTE xxx > file
15799 + REDIRECT was missing in many UNIX C-Kermit implementations; in version
15800 + 7.0, it should be available in all of them.
15801 + _________________________________________________________________
15803 + 1.1. Command Continuation
15805 + Comments that start with ";" or "#" can no longer be continued. In:
15807 + ; this is a comment -
15810 + the ECHO command will execute, rather than being taken as a
15811 + continuation of the preceding comment line. This allows easy
15812 + "commenting out" of commands from macro definitions.
15814 + However, the text of the COMMENT command can still be continued onto
15815 + subsequent lines:
15817 + comment this is a comment -
15820 + As of version 6.0, backslash is no longer a valid continuation
15821 + character. Only hyphen should be used for command continuation. This
15822 + is to make it possible to issue commands like "cd a:\" on DOS-like
15825 + As of version 7.0:
15827 + * You can quote a final dash to prevent it from being a continuation
15830 + This prints "foo-". The command is not continued.
15831 + * You can enter commands such as:
15832 + echo foo - ; this is a comment
15833 + interactively and they are properly treated as continued commands.
15834 + Previously this worked only in command files.
15835 + _________________________________________________________________
15837 + 1.2. Editor Interface
15839 + SET EDITOR name [ options ]
15840 + Lets you specify a text-editing program. The name can be a
15841 + fully specified pathname like /usr/local/bin/emacs19/emacs, or
15842 + it can be the name of any program in your PATH, e.g. "set
15843 + editor emacs". In VMS, it must be a DCL command like "edit",
15844 + "edit/tpu", "emacs", etc. If an environment variable EDITOR is
15845 + defined when Kermit starts, its value is the default editor.
15846 + You can also specify options to be included on the editor
15847 + command line. Returns to Kermit when the editor exits.
15849 + EDIT [ filename ]
15850 + If the EDIT command is given without a filename, then if a
15851 + previous filename had been given to an EDIT command, it is
15852 + used; if not, the editor is started without a file. If a
15853 + filename is given, the editor is started on that file, and the
15854 + filename is remembered for subsequent EDIT commands.
15857 + Displays the full pathname of your text editor, if any, along
15858 + with any command line options, and the file most recently
15859 + edited (and therefore the default filename for your next EDIT
15862 + Related variables: \v(editor), \v(editopts), \v(editfile).
15863 + _________________________________________________________________
15865 + 1.3. Web Browser and FTP Interface
15867 + C-Kermit includes an FTP command, which simply runs the FTP program;
15868 + C-Kermit does not include any built-in support for Internet File
15869 + Transfer Protocol, nor any method for interacting directly with an FTP
15870 + server. In version 7.0, however, C-Kermit lets you specify your FTP
15873 + SET FTP-CLIENT [ name [ options ] ]
15874 + The name is the name of the FTP executable. In UNIX, Windows,
15875 + or OS/2, it can be the filename of any executable program in
15876 + your PATH (e.g. "ftp.exe" in Windows, "ftp" in UNIX); elsewhere
15877 + (or if you do not have a PATH definition), it must be the fully
15878 + specified pathname of the FTP program. If the name contains any
15879 + spaces, enclose it braces. Include any options after the
15880 + filename; these depend the particular ftp client.
15882 + The Web browser interface is covered in the following subsections.
15883 + _________________________________________________________________
15885 + 1.3.1. Invoking your Browser from C-Kermit
15888 + Starts your preferred Web browser on the URL, if one is given,
15889 + otherwise on the most recently given URL, if any. Returns to
15890 + Kermit when the browser exits.
15892 + SET BROWSER [ name [ options ] ]
15893 + Use this command to specify the name of your Web browser
15894 + program, for example: "set browser lynx". The name must be in
15895 + your PATH, or else it must be a fully specified filename; in
15896 + VMS it must be a DCL command.
15899 + Displays the current browser, options, and most recent URL.
15901 + Related variables: \v(browser), \v(browsopts), \v(browsurl).
15903 + Also see [350]Section 2.15: Contacting Web Servers with the HTTP
15905 + _________________________________________________________________
15907 + 1.3.2. Invoking C-Kermit from your Browser
15909 + The method for doing this depends, of course, on your browser. Here
15910 + are some examples:
15912 + Netscape on UNIX (X-based)
15913 + In the Options->Applications section, set your Telnet
15916 + xterm -e /usr/local/bin/kermit/kermit -J %h %p
15918 + (replace "/usr/local/bin/kermit/kermit" by C-Kermit's actual
15919 + pathname). -J is C-Kermit's command-line option to "be like
15920 + Telnet"; %h and %p are Netscape placeholders for hostname and
15924 + As far as we know, this can be done only at compile time. Add
15925 + the following line to the Lynx userdefs.h file before building
15928 + #define TELNET_COMMAND "/opt/bin/kermit -J"
15930 + And then add lines like the following to the Lynx.cfg file:
15932 + DOWNLOADER:Kermit binary download:/opt/bin/kermit -i -V -s %s -a %s:TRUE
15933 + DOWNLOADER:Kermit text download:/opt/bin/kermit -s %s -a %s:TRUE
15935 + UPLOADER:Kermit binary upload:/opt/bin/kermit -i -r -a %s:TRUE
15936 + UPLOADER:Kermit text upload:/opt/bin/kermit -r -a %s:TRUE
15937 + UPLOADER:Kermit text get:/opt/bin/kermit -g %s:TRUE
15938 + UPLOADER:Kermit binary get:/opt/bin/kermit -ig %s:TRUE
15940 + But none of the above is necessary if you make C-Kermit your default
15941 + Telnet client, which you can do by making a symlink called 'telnet' to
15942 + the C-Kermit 7.0 binary. See [351]Section 9.1 for details.
15943 + _________________________________________________________________
15945 + 1.4. Command Editing
15947 + Ctrl-W ("Word delete") was changed in 7.0 to delete back to the
15948 + previous non-alphanumeric, rather than all the way back to the
15950 + _________________________________________________________________
15952 + 1.5. Command Switches
15954 + As of version 7.0, C-Kermit's command parser supports a new type of
15955 + field, called a "switch". This is an optional command modifier.
15957 + 1.5.1. General Switch Syntax
15959 + A switch is a keyword beginning with a slash (/). If it takes a value,
15960 + then the value is appended to it (with no intervening spaces),
15961 + separated by a colon (:) or equal sign (=). Depending on the switch,
15962 + the value may be a number, a keyword, a filename, a date/time, etc.
15965 + send oofa.txt ; No switches
15966 + send /binary oofa.zip ; A switch without a value
15967 + send /protocol:zmodem oofa.zip ; A switch with a value (:)
15968 + send /protocol=zmodem oofa.zip ; A switch with a value (=)
15969 + send /text /delete /as-name:x.x oofa.txt ; Several switches
15971 + Like other command fields, switches are separated from other fields,
15972 + and from each other, by whitespace, as shown in the examples just
15973 + above. You can not put them together like so:
15975 + send/text/delete/as-name:x.x oofa.txt
15977 + (as you might do in VMS or DOS, or as we might once have done in
15978 + TOPS-10 or TOPS0-20, or PIP). This is primarily due to ambiguity
15979 + between "/" as switch introducer versus "/" as UNIX directory
15980 + separator; e.g. in:
15982 + send /delete/as-name:foo/text oofa.txt
15984 + Does "foo/text" mean the filename is "foo" and the transfer is to be
15985 + in text mode, or does it mean the filename is "foo/text"? Therefore we
15986 + require whitespace between switches to resolve the ambiguity. (That's
15987 + only one of several possible ambiguities -- it is also conceivable
15988 + that a file called "text" exists in the path "/delete/as-name:foo/").
15990 + In general, if a switch can take a value, but you omit it, then either
15991 + a reasonable default value is supplied, or an error message is
15994 + send /print:-Plaserwriter oofa.txt ; Value included = print options
15995 + send /print oofa.txt ; Value omitted, OK
15996 + send /mail:kermit@columbia.edu oofa.txt ; Value included = address
15997 + send /mail oofa.txt ; Not OK - address required
15998 + ?Address required
16000 + Context-sensitive help (?) and completion (Esc or Tab) are available
16001 + in the normal manner:
16003 + C-Kermit> send /pr? Switch, one of the following:
16005 + C-Kermit> send /pro<ESC>tocol:? File-transfer protocol,
16006 + one of the following:
16007 + kermit xmodem ymodem ymodem-g zmodem
16008 + C-Kermit> send /protocol:k<TAB>ermit
16010 + If a switch takes a value and you use completion on it, a colon (:) is
16011 + printed at the end of its name to indicate this. If it does not take a
16012 + value, a space is printed.
16014 + Also, if you type ? in a switch field, switches that take values are
16015 + shown with a trailing colon; those that don't take values are shown
16017 + _________________________________________________________________
16019 + 1.5.2. Order and Effect of Switches
16021 + The order of switches should not matter, except that they are
16022 + evaluated from left to right, so if you give two switches with
16023 + opposite effects, the rightmost one is used:
16025 + send /text /binary oofa.zip ; Sends oofa.zip in binary mode.
16027 + Like other command fields, switches have no effect whatsoever until
16028 + the command is entered (by pressing the Return or Enter key). Even
16029 + then, switches affect only the command with which they are included;
16030 + they do not have global effect or side effects.
16031 + _________________________________________________________________
16033 + 1.5.3. Distinguishing Switches from Other Fields
16035 + All switches are optional. A command that uses switches lets you give
16036 + any number of them, including none at all. Example:
16038 + send /binary oofa.zip
16039 + send /bin /delete oofa.zip
16040 + send /bin /as-name:mupeen.zip oofa.zip
16043 + But how does Kermit know when the first "non-switch" is given? It has
16044 + been told to look for both a switch and for something else, the data
16045 + type of the next field (filename, number, etc). In most cases, this
16046 + works well. But conflicts are not impossible. Suppose, for example, in
16047 + UNIX there was a file named "text" in the top-level directory. The
16048 + command to send it would be:
16052 + But C-Kermit would think this was the "/text" switch. To resolve the
16053 + conflict, use braces:
16057 + or other circumlocutions such as "send //text", "send /./text", etc.
16059 + The opposite problem can occur if you give an illegal switch that
16060 + happens to match a directory name. For example:
16064 + There is no "/f" switch (there are several switches that begin with
16065 + "/f", so "/f" is ambiguous). Now suppose there is an "f" directory in
16066 + the root directory; then this command would be interpreted as:
16068 + Send all the files in the "/f" directory, giving each one an
16069 + as-name of "oofa.txt".
16071 + This could be a mistake, or it could be exactly what you intended;
16072 + C-Kermit has no way of telling the difference. To avoid situations
16073 + like this, spell switches out in full until you are comfortable enough
16074 + with them to know the minimum abbreviation for each one. Hint: use ?
16075 + and completion while typing switches to obtain the necessary feedback.
16076 + _________________________________________________________________
16078 + 1.5.4. Standard File Selection Switches
16080 + The following switches are used on different file-oriented commands
16081 + (such as SEND, DIRECTORY, DELETE, PURGE) to refine the selection of
16082 + files that match the given specification.
16085 + Select only those files having a date-time later than the one
16086 + given. See [352]Section 1.6 for date-time formats. Synonym:
16089 + /NOT-AFTER:date-time
16090 + Select only those files having a date-time not later than (i.e.
16091 + earlier or equal to) the one given. Synonym: /NOT-SINCE.
16093 + /BEFORE:date-time
16094 + Select only those files having a date-time earlier than the one
16097 + /NOT-BEFORE:date-time
16098 + Select only those files having a date-time not earlier than
16099 + (i.e. later or equal to) the one given.
16102 + UNIX and OS-9 only: The filespec is allowed to match files
16103 + whose names start with (dot) period. Normally these files are
16107 + (UNIX and OS-9 only) Don't show files whose names start with
16108 + dot (period). This is the opposite of /DOTFILES, and is the
16109 + default. Note that when a directory name starts with a period,
16110 + the directory and (in recursive operations) all its
16111 + subdirectories are skipped.
16113 + /LARGER-THAN:number
16114 + Only select files larger than the given number of bytes.
16116 + /SMALLER-THAN:number
16117 + Only select files smaller than the given number of bytes.
16120 + Specifies that any files whose names match the pattern, which
16121 + can be a regular filename, or may contain "*" and/or "?"
16122 + metacharacters (wildcards), are not to be selected. Example:
16124 + send /except:*.log *.*
16126 + sends all files in the current directory except those with a
16127 + filetype of ".log". Another:
16129 + send /except:*.~*~ *.*
16131 + sends all files except the ones that look like Kermit or EMACS
16132 + backup files (such as "oofa.txt.~17~") (of course you can also
16133 + use the /NOBACKUP switch for this).
16135 + The pattern matcher is the same one used by IF MATCH string
16136 + pattern ([353]Section 7.4), so you can test your patterns using
16137 + IF MATCH. If you need to match a literal * or ? (etc), precede
16138 + it by a backslash (\). If the pattern contains any spaces, it
16139 + must be enclosed in braces:
16141 + send /except:{Foo bar} *.*
16143 + The pattern can also be a list of up to 8 patterns. In this
16144 + case, the entire pattern must be enclosed in braces, and each
16145 + sub-pattern must also be enclosed in braces; this eliminates
16146 + the need for designating a separator character, which is likely
16147 + to also be a legal filename character on some platform or
16148 + other, and therefore a source of confusion. You may include
16149 + spaces between the subpatterns but they are not necessary. The
16150 + following two commands are equivalent:
16152 + send /except:{{ck*.o} {ck*.c}} ck*.?
16153 + send /except:{{ck*.o}{ck*.c}} ck*.?
16155 + If a pattern is to include a literal brace character, precede
16156 + it with "\". Also note the apparent conflict of this list
16157 + format and the string-list format described in [354]Section
16158 + 4.9.1. In case you want to include a wildcard string-list with
16159 + braces on its outer ends as an /EXCEPT: argument, do it like
16162 + send /except:{{{ckuusr.c,ckuus2.c,ckuus6.c}}} ckuus*.c
16163 + _________________________________________________________________
16165 + 1.5.5. Setting Preferences for Different Commands
16167 + Certain oft-used commands offer lots of switches because different
16168 + people have different requirements or preferences. For example, some
16169 + people want to be able to delete files without having to watch a list
16170 + of the deleted files scroll past, while others want to be prompted for
16171 + permission to delete each file. Different people prefer different
16172 + directory-listing styles. And so on. Such commands can be tailored
16173 + with the SET OPTIONS command:
16175 + SET OPTIONS command [ switch [ switch [ ... ] ] ]
16176 + Sets each switch as the default for the given command,
16177 + replacing the "factory default". Of course you can also
16178 + override any defaults established by the SET OPTIONS command by
16179 + including the relevant switches in the affected command any
16180 + time you issue it.
16183 + Lists the commands that allows option-setting, and the options
16184 + currently in effect, if any, for each. Switches that have
16185 + synonyms are shown under their primary name; for example. /LOG
16186 + and /VERBOSE are shown as /LIST.
16188 + Commands for which options may be set include DIRECTORY, DELETE,
16189 + PURGE, and TYPE. Examples:
16191 + SET OPTIONS DIRECTORY /PAGE /NOBACKUP /HEADING /SORT:DATE /REVERSE
16192 + SET OPTIONS DELETE /LIST /NOHEADING /NOPAGE /NOASK /NODOTFILES
16193 + SET OPTIONS TYPE /PAGE
16195 + Not necessarily all of a command's switches can be set as options. For
16196 + example, file selection switches, since these would normally be
16197 + different for each command.
16199 + Put the desired SET OPTIONS commands in your C-Kermit customization
16200 + file for each command whose default switches you want to change every
16201 + time you run C-Kermit.
16202 + _________________________________________________________________
16204 + 1.6. Dates and Times
16206 + Some commands and switches take date-time values, such as:
16208 + send /after:{8-Feb-2000 10:28:01}
16210 + Various date-time formats are acceptable. The rules for the date are:
16212 + * The year must have 4 digits.
16213 + * If the year comes first, the second field is the month.
16214 + * The day, month, and year may be separated by spaces, /, -, or
16216 + * The month may be numeric (1 = January) or spelled out or
16217 + abbreviated in English.
16219 + If the date-time string contains any spaces, it must be enclosed in
16220 + braces. Examples of legal dates:
16223 + 2000-Feb-8 8 February 2000
16224 + {2000 Feb 8} 8 February 2000
16225 + 2000/Feb/8 8 February 2000
16226 + 2000_Feb_8 8 February 2000
16227 + 2000-2-8 8 February 2000
16228 + 2000-02-08 8 February 2000
16229 + 8-Feb-2000 8 February 2000
16230 + 08-Feb-2000 8 February 2000
16231 + 12/25/2000 25 December 2000
16232 + 25/12/2000 25 December 2000
16234 + The last two examples show that when the year comes last, and the
16235 + month is given numerically, the order of the day and month doesn't
16236 + matter as long as the day is 13 or greater (mm/dd/yyyy is commonly
16237 + used in the USA, whereas dd/mm/yyyy is the norm in Europe). However:
16239 + 08/02/2000 Is ambiguous and therefore not accepted.
16241 + If a date is given, the time is optional and defaults to 00:00:00. If
16242 + the time is given with a date, it must follow the date, separated by
16243 + space, /, -, or underscore, and with hours, minutes, and seconds
16244 + separated by colon (:). Example:
16246 + 2000-Feb-8 10:28:01 Represents 8 February 2000, 10:28:01am
16248 + If a date is not given, the current date is used and a time is
16251 + Time format is hh:mm:ss or hh:mm or hh in 24-hour format, or followed
16252 + by "am" or "pm" (or "AM" or "PM") to indicate morning or afternoon.
16253 + Examples of times that are acceptable:
16256 + 3:23:56 3:23:56am
16257 + 3:23:56am 3:23:56am
16258 + 3:23:56pm 3:23:56pm = 15:23:56
16259 + 15:23:56 3:23:56pm = 15:23:56
16260 + 3:23pm 3:23:00pm = 15:23:00
16261 + 3:23PM 3:23:00pm = 15:23:00
16262 + 3pm 3:00:00pm = 15:00:00
16264 + Examples of legal date-times:
16266 + send /after:{8 Feb 2000 10:28:01}
16267 + send /after:8_Feb_2000_10:28:01
16268 + send /after:8-Feb-2000/10:28:01
16269 + send /after:2000/02/08/10:28:01
16270 + send /after:2000/02/08_10:28:01
16271 + send /after:2000/02/08_10:28:01am
16272 + send /after:2000/02/08_10:28:01pm
16273 + send /after:2000/02/08_10:28pm
16274 + send /after:2000/02/08_10pm
16275 + send /after:10:00:00pm
16276 + send /after:10:00pm
16280 + Finally, there is a special all-numeric format you can use:
16282 + yyyymmdd hh:mm:ss
16286 + 20000208 10:28:01
16288 + This is Kermit's standard date-time format (based on ISO 8601), and is
16289 + accepted (among other formats) by any command or switch that requires
16290 + a date-time, and is output by any function whose result is a calendar
16293 + There are no optional parts to this format and it must be exactly 17
16294 + characters long, punctuated as shown (except you can substitute
16295 + underscore for space in contexts where a single "word" is required).
16296 + The time is in 24-hour format (23:00:00 is 11:00pm). This is the
16297 + format returned by \fdate(filename), so you can also use constructions
16300 + send /after:\fdate(oofa.txt)
16302 + which means "all files newer than oofa.txt".
16304 + Besides explicit dates, you can also use the any of the following
16308 + Stands for the current date at 00:00:00.
16311 + Stands for the current date at the given time.
16314 + Stands for yesterday's date at 00:00:00. A time may also be
16318 + Stands for tomorrow's date at 00:00:00. A time may also be
16321 + + number { DAYS, WEEKS, MONTHS, YEARS } [ time ]
16322 + Is replaced by the future date indicated, relative to the
16323 + current date. If the time is omitted, 00:00:00 is used.
16324 + Examples: +3days, +2weeks, +1year, +37months.
16326 + - number { DAYS, WEEKS, MONTHS, YEARS } [ time ]
16328 + Is replaced by the past date indicated, relative to the current
16329 + date. If the time is omitted, 00:00:00 is used.
16331 + The time can be separated from the date shortcut by any of the same
16332 + separators that are allowed for explicit date-times: space, hyphen,
16333 + slash, period, or underscore. In switches and other space-delimited
16334 + fields, use non-spaces to separate date/time fields, or enclose the
16335 + date-time in braces, e.g.:
16337 + purge /before:-4days_12:00:00
16338 + purge /before:{- 4 days 12:00:00}
16340 + Of course you can also use variables:
16343 + purge /before:-\%ndays_12:00:00
16345 + Shortcut names can be abbreviated to any length that still
16346 + distinguishes them from any other name that can appear in the same
16347 + context, e.g. "TOD" for today, "Y" for yesterday. Also, the special
16348 + abbreviation "wks" is accepted for WEEKS, and "yrs" for "YEARS".
16350 + (To see how to specify dates relative to a specific date, rather than
16351 + the current one, see the [355]\fmjd() function description below.)
16353 + You can check date formats with the DATE command. DATE by itself
16354 + prints the current date and time in standard format: yyyymmdd
16355 + hh:mm:ss. DATE followed by a date and/or time (including shortcuts)
16356 + converts it to standard format if it can understand it, otherwise it
16357 + prints an error message.
16359 + The following variables and functions deal with dates and times; any
16360 + function argument designated as "date-time" can be in any of the
16361 + formats described above.
16364 + The first three letters of the English word for the current day
16365 + of the week, e.g. "Wed".
16368 + The first three letters of the English word for day of the week
16369 + of the given date. If a time is included, it is ignored.
16370 + Example: \fday(8 Feb 1988) = "Mon".
16373 + The numeric day of the week: 0 = Sunday, 1 = Monday, ..., 6 =
16376 + \fnday(date-time)
16377 + The numeric day of the week for the given date. If a time is
16378 + included, it is ignored. Example: \fnday(8 Feb 1988) = "1".
16381 + The current date as dd mmm yyyy, e.g. "08 Feb 2000" (as in this
16382 + example, a leading zero is supplied for day-of-month less than
16386 + The current date in numeric format: yyyymmdd, e.g. "20000208".
16389 + The current time as hh:mm:ss, e.g. "15:27:14".
16392 + The given free-format date and/or time (e.g. "3pm") returns the
16393 + time (without the date) converted to hh:mm:ss 24-hour format,
16394 + e.g. "15:00:00" (the date, if given, is ignored).
16397 + The current time as seconds since midnight, e.g. "55634".
16400 + The elapsed time of the most recent file-transfer operation in
16404 + The elapsed time for the most recent INPUT command to complete,
16408 + The given free-format date and/or time is converted to seconds
16409 + since midnight (the date, if given, is ignored). This function
16410 + replaces \ftod2secs(), which is now a synonym for \fntime().
16411 + Unlike \ftod2secs(), \fntime() allows a date to be included,
16412 + and it allows the time to be in free format (like 3pm), and it
16413 + allows the amount of time to be more than 24 hours. E.g.
16414 + \fntime(48:00:00) = 172800. Example of use:
16416 + set alarm \fntime(48:00:00) ; set alarm 48 hours from now.
16418 + \fn2time(seconds)
16419 + The given number of seconds is converted to hh:mm:ss format.
16422 + Returns the modification date-time of the given file in
16423 + standard format: yyyymmdd hh:mm:ss.
16425 + \fcvtdate(date-time)
16426 + Converts a free-format date and/or time to Kermit standard
16427 + format: yyyymmdd hh:mm:ss. If no argument is given, returns the
16428 + current date-time in standard format. If a date is given but no
16429 + time, the converted date is returned without a time. If a time
16430 + is given with no date, the current date is supplied. Examples:
16432 + \fcvtdate(4 Jul 2000 2:21:17pm) = 20000704 14:21:17
16433 + \fcvtdate() = 20000704 14:21:17 (on 4 Jul 2000 at 2:21:17pm).
16434 + \fcvtd(4 Jul 2000) = 20000704
16435 + \fcvtd(6pm) = 20000704 18:00:00 (on 4 Jul 2000 at 6:00pm).
16437 + \fdayofyear(date-time)
16439 + Converts a free-format date and/or time to yyyyddd, where ddd
16440 + is the 3-digit day of the year, and 1 January is Day 1. If a
16441 + time is included with the date, it is returned in standard
16442 + format. If a date is included but no time, the date is returned
16443 + without a time. If a time is given with no date, the time is
16444 + converted and the current date is supplied. If no argument is
16445 + given, the current date-time is returned. Synonym: \fdoy().
16448 + \fddayofyear(4 Jul 2000 2:21:17pm) = 2000185 14:21:17
16449 + \fdoy() = 2000185 14:21:17 (on 4 Jul 2000 at 2:21:17pm).
16450 + \fdoy(4 Jul 2000) = 2000185
16451 + \fdoy(6pm) = 2000185 18:00:00 (on 4 Jul 2000 at 6:00pm).
16453 + Note: The yyyyddd day-of-year format is often erroneously referred to
16454 + as a Julian date. However, a true Julian date is a simple counting
16455 + number, the number of days since a certain fixed day in the past.
16456 + [356]See \fmjd() below.
16458 + \fdoy2date(date-time)
16459 + Converts a date or date-time in day-of-year format to a
16460 + standard format date. A yyyyddd-format date must be supplied;
16461 + time is optional. The given date is converted to yyyymmdd
16462 + format. If a time is given, it is converted to 24-hour format.
16465 + \fdoy2date(2000185) = 20000704
16466 + \fdoy2(2000185 3pm) = 20000704 15:00:00
16469 + Converts free-format date and/or time to a Modified Julian Date
16470 + (MJD), the number of days since 17 Nov 1858 00:00:00. If a time
16471 + is given, it is ignored. Examples:
16473 + \fmjd(4 Jul 2000) = 50998
16474 + \fmjd(17 Nov 1858) = 0
16475 + \fmjd(16 Nov 1858) = -1
16478 + Converts an MJD (integer) to standard date format, yyyymmdd:
16480 + \fmjd2(50998) = 4 Jul 1998
16481 + \fmjd2(0) = 17 Nov 1858
16482 + \fmjd2(-1) = 16 Nov 1858
16483 + \fmjd2(-365) = 17 Nov 1857
16485 + MJDs are normal integers and, unlike DOYs, may be added, subtracted,
16486 + etc, with each other or with other integers, to obtain meaningful
16487 + results. For example, to find out the date 212 days ago:
16489 + echo \fmjd2date(\fmjd()-212)
16491 + Constructions such as this can be used in any command where a
16492 + date-time is required, e.g.:
16494 + send /after:\fmjd2date(\fmjd()-212)
16496 + to send all files that are not older than 212 days (this is equivalent
16497 + to "send /after:-212days").
16499 + MJDs also have other regularities not exhibited by other date formats.
16500 + For example, \fmodulus(\fmjd(any-date),7) gives the day of the week
16501 + for any date (where 4=Sun, 5=Mon, ..., 3=Sat). (However, it is easier
16502 + to use \fnday() for this purpose, and it gives the more conventional
16503 + result of 0=Sun, 1=Mon, ..., 6=Sat).
16505 + Note that if MJDs are to be compared, they must be compared
16506 + numerically (IF <, =, >) and not lexically (IF LLT, EQUAL, LGT),
16507 + whereas DOYs must be compared lexically if they include a time (which
16508 + contains ":" characters); however, if DOYs do not include a time, they
16509 + may also be compared numerically.
16511 + In any case, lexical comparison of DOYs always produces the
16512 + appropriate result, as does numeric comparison of MJDs.
16514 + The same comments apply to sorting. Also note that DOYs are fixed
16515 + length, but MJDs can vary in length. However, all MJDs between 3 April
16516 + 1886 and 30 Aug 2132 are 5 decimal digits long. (MJDs become 6 digits
16517 + long on 31 Aug 2132, and 7 digits long on 13 Oct 4596).
16518 + _________________________________________________________________
16520 + 1.7. Partial Completion of Keywords
16522 + Partial completion of keywords was added in C-Kermit 7.0. In prior
16523 + versions, if completion was attempted (by pressing the Esc or Tab key)
16524 + on a string that matched different keywords, you'd just get a beep.
16525 + Now Kermit completes up to the first character where the possibly
16526 + matching keywords differ and then beeps. For example:
16528 + C-Kermit> send /n<Tab>
16530 + which matches /NOT-BEFORE and /NOT-AFTER, now completes up to the
16533 + C-Kermit> send /n<Tab>ot-<Beep>
16535 + Partial completion works for filenames too (as it has for some years).
16536 + _________________________________________________________________
16538 + 1.8. Command Recall
16540 + C-Kermit has had a command history buffer for some time, which could
16541 + be scrolled interactively using control characters or (in Kermit 95
16542 + only) arrow keys. Version 7.0 adds a REDO command that allows the most
16543 + recent command matching a given pattern to be re-executed:
16545 + { REDO, RR, ^ } [ pattern ]
16546 + Search the command history list for the most recent command
16547 + that matches the given pattern, and if one is found, execute it
16550 + The pattern can be a simple string (like "send"), in which case the
16551 + last SEND command is re-executed. Or it can contain wildcard
16552 + characters "*" and/or "?", which match any string and any single
16553 + character, respectively (note that "?" must be preceded by backslash
16554 + to override its normal function of giving help), and in most C-Kermit
16555 + versions may also include [] character lists and {} string lists (see
16556 + [357]Section 4.9).
16558 + The match works by appending "*" to the end of the given pattern (if
16559 + you didn't put one there yourself). Thus "redo *oofa" becomes "redo
16560 + *oofa*" and therefore matches the most recent command that contains
16561 + "oofa" anywhere within the command. If you want to inhibit the
16562 + application of the trailing "*", e.g. to force matching a string at
16563 + the end of a command, enclose the pattern in braces:
16567 + matches the most recent command that ends with "oofa".
16569 + REDO commands themselves are not entered into the command history
16570 + list. If no pattern is given, the previous (non-REDO) command is
16571 + re-executed. The REDOne command is reinserted at the end of the
16572 + command history buffer, so the command scrollback character (Ctrl-P,
16573 + Ctrl-B, or Uparrow) can retrieve it.
16577 + C-Kermit> echo foo
16579 + C-Kermit> show alarm
16581 + C-Kermit> echo blah
16583 + C-Kermit> redo ; Most recent command
16585 + C-Kermit> redo s ; Most recent command starting with "s"
16587 + C-Kermit> redo echo f ; Most recent command starting with "echo f"
16589 + C-Kermit> redo *foo ; Most recent command that has "foo" in it
16591 + C-Kermit> <Ctrl-P> ; Scroll back
16592 + C-Kermit> echo foo ; The REDOne command is there
16593 + C-Kermit> redo {*foo} ; Most recent command that ends with "foo"
16597 + Since REDO, REDIAL, and REDIRECT all start the same way, and RED is
16598 + the designated non-unique abbreviation for REDIAL, REDO must be
16599 + spelled out in full. For convenience, RR is included as an invisible
16600 + easy-to-type synonym for REDO. You can also use the "^" character for
16603 + C-Kermit> ^ ; Most recent command
16604 + C-Kermit> ^ s ; Most recent command starting with "s"
16605 + C-Kermit> ^s ; Ditto (space not required after "^").
16606 + C-Kermit> ^*foo ; Most recent command that has "foo" in it.
16607 + C-Kermit> ^{*foo} ; Most recent command ends with "foo".
16609 + Unlike the manual command-history-scrolling keys, the REDO command can
16610 + be used in a script, but it's not recommended (since the command to be
16611 + REDOne might not be found, so if the REDO command fails, you can't
16612 + tell whether it was because REDO failed to find the requested command,
16613 + or because the command was found but it failed).
16614 + _________________________________________________________________
16616 + 1.9. EXIT Messages
16618 + The EXIT and QUIT commands now accept an optional message to be
16619 + printed. This makes the syntax of EXIT and QUIT just like END and
16622 + { EXIT, QUIT, END, STOP } [ status-code [ message ] ]
16624 + where status-code is a number (0 indicating success, nonzero
16625 + indicating failure). This is handy in scripts that are never supposed
16626 + to enter interactive mode:
16629 + if fail exit 1 Can't make connection - try again later.
16631 + Previously this could only be done in two steps:
16634 + xif fail { echo Can't make connection - try again later, exit 1 }
16636 + A status code must be included in order to specify a message. In the
16637 + case of EXIT and QUIT, the default status code is contained in the
16638 + variable \v(exitstatus), and is set automatically by various events
16639 + (file transfer failures, etc; it can also be set explicitly with the
16640 + SET EXIT STATUS command). If you want to give an EXIT or QUIT command
16641 + with a message, but without changing the exit status from what it
16642 + normally would have been, use the \v(exitstatus) variable, e.g.:
16644 + exit \v(existatus) Goodbye from \v(cmdfile).
16646 + The EXIT status is returned to the system shell or whatever other
16647 + process invoked C-Kermit, e.g. in UNIX:
16649 + C-Kermit> exit 97 bye bye
16654 + _________________________________________________________________
16656 + 1.10. Managing Keyboard Interruptions
16658 + When C-Kermit is in command or file-transfer mode (as opposed to
16659 + CONNECT mode), it can be interrupted with Ctrl-C. Version 7.0 adds the
16660 + ability to disarm the Ctrl-C interrupt:
16662 + SET COMMAND INTERRUPT { ON, OFF }
16663 + COMMAND INTERRUPT is ON by default, meaning the Ctrl-C can be
16664 + used to interrupt a command or a file transfer in progress. Use
16665 + OFF to disable these interruptions, and use it with great
16666 + caution for obvious reasons.
16668 + SET TRANSFER INTERRUPT { ON, OFF }
16669 + This can be used to disable keyboard interruption of file
16670 + transfer when C-Kermit is in local mode, or to re-enable it
16671 + after it has been disabled. This applies to the X, Z, E, and
16672 + similar keys as well as to the system interrupt character,
16673 + usually Ctrl-C. This is distinct from SET TRANSFER
16674 + CANCELLATION, which tells whether packet mode can be exited by
16675 + sending a special sequence of characters.
16677 + Several other commands can be interrupted by pressing any key while
16678 + they are active. Version 7.0 adds the ability to disable this form of
16679 + interruption also:
16681 + SET INPUT CANCELLATION { ON, OFF }
16682 + Whether an INPUT command in progress can be interrupted by
16683 + pressing a key. Normally ON. Setting INPUT CANCELLATION OFF
16684 + makes INPUT commands uninterruptible except by Ctrl-C (unless
16685 + COMMAND INTERRUPTION is also OFF).
16687 + SET SLEEP CANCELLATION { ON, OFF }
16688 + Whether a SLEEP, PAUSE, or WAIT command in progress can be
16689 + interrupted by pressing a key. Normally ON. Setting SLEEP
16690 + CANCELLATION OFF makes these commands uninterruptible except by
16691 + Ctrl-C (unless COMMAND INTERRUPTION is also OFF). Synonyms: SET
16692 + PAUSE CANCELLATION, SET WAIT CANCELLATION.
16694 + So to make certain a script is not interruptible by the user, include
16697 + SET TRANSFER INTERRUPT OFF
16698 + SET SLEEP CANCELLATION OFF
16699 + SET INPUT CANCELLATION OFF
16700 + SET COMMAND INTERRUPTION OFF
16702 + Make sure to turn them back on afterwards if interruption is to be
16705 + When a PAUSE, SLEEP, WAIT, or INPUT command is interrupted from the
16706 + keyboard, the new variable \v(kbchar) contains a copy of the (first)
16707 + character that was typed and caused the interruption, provided it was
16708 + not the command interrupt character (usually Ctrl-C). If these
16709 + commands complete successfully or time out without a keyboard
16710 + interruption, the \v(kbchar) variable is empty.
16712 + The \v(kbchar) variable (like any other variable) can be tested with:
16714 + if defined \v(kbchar) command
16716 + The command is executed if the variable is not empty.
16718 + The \v(kbchar) variable can be reset with WAIT 0 (PAUSE 0, SLEEP 0,
16720 + _________________________________________________________________
16722 + 1.11. Taming The Wild Backslash -- Part Deux
16724 + [358]Using C-Kermit, 2nd Edition, contains a brief section, "Taming
16725 + the Wild Backslash", on page 48, which subsequent experience has shown
16726 + to be inadequate for Kermit users intent on writing scripts that deal
16727 + with Windows, DOS, and OS/2 filenames, in which backslash (\) is used
16728 + as the directory separator. This section fills in the blanks.
16730 + 1.11.1. Background
16732 + The Kermit command language shares a certain unavoidable but annoying
16733 + characteristic with most other command languages that are capable of
16734 + string replacement, namely the necessity to "quote" certain characters
16735 + when you want them to be taken literally. This is a consequence of the
16738 + 1. One or more characters must be set aside to denote replacement,
16739 + rather than acting as literal text.
16740 + 2. We have only 96 printable characters to work with in ASCII, which
16741 + is still the only universally portable character set.
16742 + 3. There is no single printable character that is unused everywhere.
16743 + 4. Variables are not restricted to certain contexts, as they are in
16744 + formal programming languages like C and Fortran, but can appear
16745 + anywhere at all within a command, and therefore require special
16748 + Thus there can be conflicts. To illustrate, the standard UNIX shell
16749 + uses dollar sign ($) to introduce variables. So the shell command:
16753 + displays the value of the TERM variable, e.g. vt320. But suppose you
16754 + want to display a real dollar sign:
16756 + echo The price is $10.20
16758 + This causes the shell to evaluate the variable "$1", which might or
16759 + might not exist, and substitute its value, e.g.:
16761 + The price is 0.20
16763 + (in this case the $1 variable had no value.) This is probably not what
16764 + you wanted. To force the dollar sign to be taken literally, you must
16765 + apply a "quoting rule", such as "precede a character by backslash (\)
16766 + to force the shell to take the character literally":
16768 + echo The price is \$10.20
16769 + The price is $10.20
16771 + But now suppose you want the backslash AND the dollar sign to be taken
16774 + echo The price is \\$10.20
16776 + This doesn't work, since the first backslash quotes the second one,
16777 + thereby leaving the dollar sign unquoted again:
16779 + The price is \0.20
16781 + Quoting the dollar sign requires addition of a third backslash:
16783 + echo The price is \\\$10.20
16784 + The price is \$10.20
16786 + The first backslash quotes the second one, and the third backslash
16787 + quotes the dollar sign.
16789 + Every command language -- all UNIX shells, VMS DCL, DOS Batch, AOS/VS
16790 + CLI, etc etc -- has similar rules. UNIX shell rules are probably the
16791 + most complicated, since many printable characters -- not just one --
16792 + are special there: dollar sign, single quote, double quote, backslash,
16793 + asterisk, accent grave, number sign, ampersand, question mark,
16794 + parentheses, brackets, braces, etc -- practically every
16795 + non-alphanumeric character needs some form of quoting if it is to be
16796 + taken literally. And to add to the confusion, the UNIX shell offers
16797 + many forms of quoting, and many alternative UNIX shells are available,
16798 + each using slightly different syntax.
16799 + _________________________________________________________________
16801 + 1.11.2. Kermit's Quoting Rules
16803 + Kermit's basic quoting rules are simple by comparison (there are, of
16804 + course, additional syntax requirements for macro definitions, command
16805 + blocks, function calls, etc, but they are not relevant here).
16807 + The following characters are special in Kermit commands:
16810 + Introduces a variable, or the numeric representation of a
16811 + special character, or a function, or other item for
16812 + substitution. If the backslash is followed by a digit or by any
16813 + of the following characters:
16815 + x, o, d, m, s, f, v, $, %, &, :, {
16817 + this indicates a special substitution item; otherwise the
16818 + following character is to be taken literally (exceptions: \ at
16819 + end of line is taken literally; \n, \b, and \n are special
16820 + items in the OUTPUT command only).
16823 + (Only when at the beginning of a line or preceded by at least
16824 + one space or tab) Introduces a comment.
16827 + (Only when at the beginning of a line or preceded by at least
16828 + one space or tab) Just like semicolon; introduces a comment.
16830 + Question mark (?)
16831 + (Only at the command prompt - not in command files or macros)
16832 + Requests context-sensitive help.
16834 + To force Kermit to take any of these characters literally, simply
16835 + precede it by a backslash (\).
16837 + Sounds easy! And it is, except when backslash also has a special
16838 + meaning to the underlying operating system, as it does in DOS,
16839 + Windows, and OS/2, where it serves as the directory separator in
16840 + filenames such as:
16842 + D:\K95\KEYMAPS\READ.ME
16844 + Using our rule, we would need to refer to this file in Kermit commands
16847 + D:\\K95\\KEYMAPS\\READ.ME
16849 + But this would not be obvious to new users of Kermit software on DOS,
16850 + Windows, or OS/2, and it would be annoying to seasoned ones. Thus
16851 + MS-DOS Kermit and Kermit 95 go to rather extreme lengths to allow the
16852 + more natural notation, as in:
16854 + send d:\k95\keymaps\read.me
16856 + The reason this is tricky is that we also need to allow for variables
16857 + and other expressions introduced by backslash in the same command. For
16858 + example, suppose \%a is a variable whose value is "oofa" (without the
16859 + quotes). What does the following command do?
16863 + Does it send the file named "oofa" in the current directory of the D:
16864 + disk, or does it send a file named "%a" in the root directory of the
16865 + D: disk? This is the kind of trouble we get into when we attempt to
16866 + bend the rules in the interest of user friendliness. (The answer is:
16867 + if the variable \%a has definition that is the name of an existing
16868 + file, that file is sent; if a file d:\%a exists, it is sent; otherwise
16869 + if both conditions are true, the variable takes precedence, and the
16870 + literal filename can be forced by quoting: \\%a.)
16872 + In Kermit 95 (but not MS-DOS Kermit), we also bend the rules another
16873 + way by allowing you to use forward slash (/) rather than backslash (\)
16874 + as the directory separator:
16876 + send d:/k95/keymaps/read.me
16878 + This looks more natural to UNIX users, and in fact is perfectly
16879 + acceptable to the Windows 95/98/NT and OS/2 operating systems on the
16880 + API level. BUT (there is always a "but") the Microsoft shell,
16881 + COMMAND.COM, for Windows 95/98 and NT does not allow this notation,
16882 + and therefore it can not be used in any Kermit command -- such as RUN
16883 + -- that invokes the Windows command shell AND your command shell is
16884 + COMMAND.COM or any other shell that does not allow forward slash as
16885 + directory separator (some alternative shells do allow this).
16887 + NOTE: There exists a wide variety of alternative shells from third
16888 + parties that do not have this restriction. If you are using a shell
16889 + that accepts forward slash as a directory separator, you can stop
16890 + reading right now -- UNLESS (there is always an "unless") you want
16891 + your scripts to be portable to systems that have other shells. Also
16892 + note that some Windows shells might actually REQUIRE forward
16893 + slashes (instead of backslashes) as directory separators; we do not
16894 + treat this situation below, but the treatment is obvious -- use
16895 + slash rather backslash as the directory separator.
16896 + _________________________________________________________________
16898 + 1.11.3. Passing DOS Filenames from Kermit to Shell Commands
16900 + The following Kermit commands invoke the system command shell:
16902 + RUN (and its synonyms ! and @)
16906 + Each of these commands takes a shell command as an operand. These
16907 + shell commands are not, and can not be, parsed by Kermit since Kermit
16908 + does not know the syntax of shell commands, and so can't tell the
16909 + difference between a keyword, a filename, a variable, a switch, or
16910 + other item. Therefore the rules can not be bent since Kermit doesn't
16911 + know where or how to bend them. To illustrate (using the regular
16914 + run c:\\windows\\command\\chkdsk.exe
16918 + run c:/windows/command/chkdsk.exe
16920 + is not accepted by COMMAND.COM. But:
16922 + run c:\windows\command\chkdsk.exe
16924 + results in Kermit applying its quoting rules before sending the text
16925 + to the shell. Since "w" and "c" are not in the list of backslash-item
16926 + codes, the backslash means "take the following character literally".
16927 + Thus, by the time this filename gets to the Windows shell, it has
16930 + c:windowscommandchkdsk.exe
16932 + which is probably not what you wanted. (If "w" and "c" were in the
16933 + list, the results could be even stranger.) Even more confusing is the
16934 + case where a directory or filename starts with one or more digits:
16936 + run c:\123\lotus.exe
16938 + in which "\123" is the Kermit notation for ASCII character 123, which
16939 + happens to be left brace ({), resulting in "c:{lotus.exe".
16941 + So when passing filenames to a Windows shell, always use double
16942 + backslashes as directory separators, to ensure that the shell gets
16943 + single backslashes:
16945 + run c:\\windows\\command\\chkdsk.exe
16946 + run c:\\123\\lotus.exe
16948 + Similar problems might occur with the built-in EDIT, BROWSE, and FTP
16949 + commands. These commands result in Kermit building a shell command
16950 + internally to invoke the associated helper program; the form of this
16951 + command might conflict with the form demanded by certain alternative
16953 + _________________________________________________________________
16955 + 1.11.4. Using Variables to Hold DOS Filenames
16957 + Now to the next level. Suppose you want to write a script in which
16958 + filenames are parameters, and therefore are stored in variables.
16961 + define \%f c:\windows\command\chkdsk.exe
16965 + Obviously this won't work for the reasons just noted; the RUN command
16966 + requires directory separators be coded as double backslashes:
16968 + define \%f c:\\windows\\command\\chkdsk.exe
16972 + This will work; no surprises here. However, if you had used ASSIGN
16973 + rather than DEFINE, you might have been surprised after all; review
16974 + pages 348-349 of [359]Using C-Kermit (2nd Ed) for the difference
16975 + between DEFINE and ASSIGN.
16977 + We have said that any Kermit 95 or MS-DOS Kermit command that parses
16978 + filenames itself -- SEND, for example -- does not require double
16979 + backslashes since it knows it is parsing a filename. So since the
16982 + send c:\windows\command\chkdsk.exe
16984 + Should the following also work?
16986 + define \%f c:\windows\command\chkdsk.exe
16990 + Answer: No. Why? Because \%f is evaluated "recursively", to allow for
16991 + the possibility that its definition contains further variable
16992 + references. This is true of all "backslash-percent-letter" (or -digit)
16993 + variables, and also for array references. So \%f becomes
16994 + c:\windows\command\chkdsk.exe, which becomes
16995 + c:windowscommandchkdsk.exe.
16997 + The trick here is to use the "other" kind of variable, that is
16998 + evaluated only "one level deep" rather than recursively:
17000 + define filename c:\windows\command\chkdsk.exe
17002 + send \m(filename)
17004 + Similarly if you want to prompt the user for a filename:
17006 + ask filename { Please type a filename: }
17007 + Please type a filename: c:\windows\command\chkdsk.exe
17008 + send \m(filename)
17009 + _________________________________________________________________
17011 + 1.11.5. Passing DOS Filenames as Parameters to Macros
17013 + Suppose you want to pass a DOS filename containing backslashes as a
17014 + parameter to a Kermit macro. This raises two issues:
17016 + 1. Parameters to macros are "just text" and so are fully evaluated
17017 + before they are passed to the macro.
17018 + 2. Once inside the macro, the formal parameters \%1, \%2, ... \%9 are
17019 + the type of variable that is evaluated recursively.
17021 + Thus a DOS filename is ruined once in the act of parsing the macro
17022 + invocation, and again when referring to it from within the macro. To
17023 + illustrate, suppose "test" is a macro. Then in the invocation:
17025 + test c:\mydir\blah.txt
17027 + "c:mydirblah.txt" is assigned to \%1. However, if we double the
17030 + test c:\\mydir\\blah.txt
17032 + "c:\mydir\blah.txt" is assigned to \%1. But then when you refer to \%1
17033 + in the macro, it is evaluated recursively, resulting in
17034 + "c:mydirblah.txt". To illustrate:
17036 + define test echo \%1
17037 + test c:\mydir\blah.txt
17039 + test c:\\mydir\\blah.txt
17041 + test c:\\\\mydir\\\\blah.txt
17042 + c:\mydir\blah.txt
17044 + Let's address each part of the problem separately. First, inside the
17045 + macro. You can use the \fcontents() function to force a
17046 + backslash-percent variable (such as a macro argument) to be evaluated
17047 + one level deep instead of recursively, for example:
17049 + define test echo { The filename is "\fcontents(\%1)"}
17051 + test c:\mydir\blah.txt ; We don't expect this to work
17052 + The filename is "c:mydirblah.txt" ; and it doesn't.
17053 + test c:\\mydir\\blah.txt ; But this does...
17054 + The filename is "c:\mydir\blah.txt"
17056 + Thus if the filename arrives inside the macro with single backslashes,
17057 + the backslashes are preserved if you always refer to the parameter
17058 + through the \fcontents() function.
17060 + Now how to ensure that backslashes are not stripped or misinterpreted
17061 + when passing a filename to a macro? This brings us back to what we
17062 + learned in earlier sections:
17064 + 1. If it is a literal filename, either double the backslashes, or (if
17065 + the filename is to be used only within Kermit itself and not
17066 + passed to a DOS shell, or it is to be passed to an alternative
17067 + shell that accepts forward slash as a directory separator), use
17068 + forward slash instead of backslash as the directory separator.
17069 + 2. If it is a variable that contains a filename, make sure you use a
17070 + macro-style variable name, rather than a
17071 + backslash-percent-character name.
17075 + define test echo \fcontents(\%1)
17076 + define filename c:\mydir\blah.txt
17078 + test c:\\mydir\\blah.txt ; Literal filename with double backslashes
17079 + c:\mydir\blah.txt
17081 + test c:/mydir/blah.txt ; Literal filename with forward slashes
17082 + c:/mydir/blah.txt
17084 + test \m(filename) ; Variable
17085 + c:\mydir\blah.txt
17087 + But what if you don't like these rules and you still want to pass a
17088 + literal filename containing single backslashes to a macro? This is
17089 + possible too, but a bit tricky: turn command quoting off before
17090 + invoking the macro, and then turn it back on inside the macro.
17093 + define test set command quoting on, echo \fcontents(\%1)
17095 + set command quoting off
17096 + test c:\mydir\blah.txt
17097 + c:\mydir\blah.txt
17099 + Upon return from the macro, command quoting is back on (since the
17100 + macro turned it on).
17102 + Obviously this trick can not be used if the filename is stored in a
17103 + variable, since it prevents the variable from being evaluated.
17104 + _________________________________________________________________
17106 + 1.11.6. Passing DOS File Names from Macro Parameters to the DOS Shell
17108 + Now suppose you need to pass a DOS filename to a macro, and the macro
17109 + needs to pass it, in turn, to the Windows shell via (say) Kermit's RUN
17110 + command. This works too:
17112 + define xrun run \fcontents(\%1)
17113 + xrun c:\\windows\\command\\chkdsk.exe
17115 + (or you can use the SET COMMAND QUOTING OFF / ON technique described
17116 + above to avoid the double backslashes.) But..
17118 + xrun c:/windows/command/chkdsk.exe
17120 + does not work if the Windows shell does not recognize "/" as a
17121 + directory separator. If there is a chance that a filename might be
17122 + passed to the macro in this form, the macro will need to convert it to
17123 + a form acceptable to the shell:
17125 + define xrun run \freplace(\fcontents(\%1),/,\\)
17127 + Here we replace all occurrences (if any) of "/" in the argument with
17128 + "\" prior to issuing the RUN command. Of course, in order to specify
17129 + "\" as a literal character in the \freplace() argument list, we have
17131 + _________________________________________________________________
17133 + 1.11.7. Passing DOS Filenames to Kermit from the Shell
17135 + As noted in the manual, the \&@[] array contains Kermit's command-line
17136 + arguments. Suppose one of these arguments, say \&@[3], is a DOS
17137 + filename such as C:\FOO\BAR\BAZ\OOFA.TXT. (Note: In C-Kermit 7.0 and
17138 + K95 1.1.18 and later, command-line arguments after "=" or "--" are
17139 + also available in the top-level \%1..9 variables; see [360]Section
17142 + Of course you can eliminate any problems by using forward slashes
17143 + rather than backslashes in the filename, but sometimes this is not
17144 + possible, as when the Kermit command line is being generated by
17145 + another program than can only generate "native" format DOS filenames.
17147 + As noted in the manual, "\%x" variables and \&x[] arrays are always
17148 + evaluated "all the way" (recursively). If the contents of one of these
17149 + variables contains backslashes, this causes another level of
17152 + There is another kind of variable, which is evaluated only "one level
17153 + deep". You can use this to prevent interpretation of the backslashes
17154 + in the filenames. Example:
17156 + assign filename \fcontents(\&@[3]) ; Transfer contents
17158 + send \m(filename)
17162 + send \fcontents(\&@[3])
17163 + _________________________________________________________________
17167 + The debug log is produced when you give a "log debug" command. This is
17168 + normally done at the request of the Kermit help desk, for forwarding
17169 + to the Kermit developers for analysis as a last resort in
17170 + troubleshooting problems. (Last resort because it can grow quite huge
17171 + in a very short time.) In cases where timing information is critical
17172 + to understanding a problem, you can tell C-Kermit to put a timestamp
17173 + on each debug log line by giving the command:
17175 + SET DEBUG TIMESTAMP ON
17177 + At any time before or after activating the debug log (SET DEBUG
17178 + TIMESTAMP OFF turns off timestamping). Timestamps can be turned off
17179 + and on as desired while logging. Obviously, they increase the size and
17180 + growth rate of the log significantly, and so should be used sparingly.
17181 + Timestamps are of the form hh:mm:ss.xxx, where .xxx is thousands of a
17182 + second (but is included only on platforms that include this feature).
17183 + _________________________________________________________________
17187 + In UNIX C-Kermit and in K-95, you can now direct any log to a pipe.
17188 + This not only lets you send your logs to places other than disk files,
17189 + but also lets you customize them to any desired degree.
17191 + LOG { DEBUG, PACKETS, SESSION, TRANSACTION, CONNECTION } { file, pipe
17193 + A "pipe" is the name of a command, preceded by a vertical bar.
17194 + If the pipe contains any spaces, it must be enclosed in braces.
17196 + Here are some examples for UNIX (always remember the importance of
17197 + getting the UNIX shell quoting rules right):
17199 + LOG TRANSACTIONS |lpr
17200 + This sends the transaction log to the default UNIX printer,
17201 + rather than to a file (use "lp" rather than "lpr" if
17204 + LOG TRANSACTIONS {| myfilter > t.log}
17205 + For those who don't like the format of the transaction log, or
17206 + want to extract certain information from it; write your own
17209 + LOG SESSION {| lpr -Plaserwriter}
17210 + This sends the session log to a specific UNIX printer, rather
17211 + than to a file. Note the braces around the pipeline. These are
17212 + required because it contains spaces.
17214 + LOG DEBUG {| tail -100 > debug.log}
17215 + This causes the debug log file to contain only the final 100
17216 + lines. Suppose C-Kermit crashes under some unpredictable
17217 + circumstances, and you need a debug log to catch it in the act.
17218 + But the debug log can grow to huge proportions very quickly,
17219 + possibly filling up the disk. Piping the debug log through
17220 + "tail" results in keeping only the last 100 lines (or other
17221 + number of your choice).
17223 + LOG DEBUG {| grep "^TELNET" > debug.log}
17224 + This one shows how to log only Telnet negotiations. Piping the
17225 + debug log through grep or egrep lets you log only specific
17226 + information, rather than everything. "man grep" for further
17229 + LOG DEBUG {| gzip -c > debug.log.gz}
17230 + Creates a full debug log, but compressed by gzip to save space.
17232 + LOG PACKETS {| tr "\\01" "X" | cut -c9- > packet.log}
17233 + This one writes the regular packet log, but translates the
17234 + Ctrl-A that starts each packet to the letter "X" and removes
17235 + the s-nn-nn- notation from the beginning of each line. Note the
17236 + double backslash (normal Kermit quoting rules). "man tr" and
17237 + "man cut" for further info.
17239 + See [361]Section 2.12 for information about the new connection log.
17240 + _________________________________________________________________
17242 + 1.14. Automatic File-Transfer Packet Recognition at the Command Prompt
17244 + Beginning in version 7.0, C-Kermit can recognize Kermit (and in some
17245 + cases also Zmodem) file-transfer packets while at its command prompt.
17246 + This is convenient (for example), if you escaped back from a remote
17247 + Kermit program and told the local Kermit program to send a file, but
17248 + forgot to tell the remote Kermit program to receive it (and the local
17249 + Kermit did not have the "send a Kermit receive command" feature
17250 + available). This feature is controlled by the following command:
17252 + SET COMMAND AUTODOWNLOAD { ON, OFF }
17253 + When ON, which is the default, the command parser recognizes
17254 + Kermit packets when Kermit is in remote mode. An S packet makes
17255 + it go into receive mode, an I packet makes it go into server
17256 + mode. When OFF, packet recognition is disabled and the behavior
17257 + when a packet is received at the command prompt is as it was in
17258 + C-Kermit 6.1 and earlier (namely to print an error message).
17260 + COMMAND AUTODOWNLOAD is the command-mode equivalent of TERMINAL
17261 + AUTODOWNLOAD, which is effective during CONNECT mode.
17262 + _________________________________________________________________
17264 + 1.15. The TYPE Command
17266 + The TYPE command now accepts a selection of optional switches
17267 + ([362]Section 1.5), and also sets several variables.
17269 + Syntax: TYPE [ switches... ] filename
17274 + Line number of current line (during TYPE command; see /PREFIX)
17277 + Line count of file most recently TYPEd.
17280 + Match count of file most recently TYPEd (see /MATCH).
17285 + If /PAGE is included, Kermit pauses at the end of each
17286 + screenful and issues a "more?" prompt. You may press the space
17287 + bar to view the next page (screenful), or press "q" or "n" to
17288 + return to the C-Kermit prompt. If this switch is given, it
17289 + overrides the COMMAND MORE-PROMPTING setting for this command
17290 + only. If it is not given, paging is according to COMMAND
17294 + Do not pause at the end of each screenful; show the whole file
17295 + (or all selected lines) at once. If this switch is given, it
17296 + overrides the COMMAND MORE-PROMPTING setting for this command
17297 + only. If it is not given, paging is according to COMMAND
17301 + Only show the first n lines of the file (where n is a number).
17302 + If n is omitted, 10 is used.
17305 + Only show the last n lines of the file (where n is a number).
17306 + If nis omitted, 10 is used. Note: /HEAD and /TAIL can't be
17307 + combined; if you give both switches, only the most recent one
17311 + Only type lines from the file that match the given pattern (see
17312 + [363]Section 4.9.1 for pattern notation). UNIX users familiar
17313 + with grep should note a significant difference: there is no
17314 + implied "*" at the beginning and end of the pattern. Thus:
17316 + TYPE /MATCH:foo Lists lines whose entire contents are "foo".
17317 + TYPE /MATCH:foo* Lists lines that start with "foo".
17318 + TYPE /MATCH:*foo Lists lines that end with "foo".
17319 + TYPE /MATCH:*foo* Lists lines that have "foo" anywhere in them.
17321 + /HEAD and /TAIL apply after /MATCH, so "type /tail:20
17322 + /match:x*" shows the last 20 lines in the file that start with
17326 + Print the given string at the beginning of each line. The
17327 + string may be a constant, a variable, or a quoted variable. If
17328 + it's an unquoted variable, its value at the time the TYPE
17329 + command was given is used as a constant. If it is a quoted
17330 + variable, it is re-evaluated for each line; a useful variable
17331 + for this context is \v(ty_ln) (the line number of the current
17332 + line being typed). If the prefix is to include spaces, it must
17333 + be enclosed in braces. Examples:
17335 + type /prefix:{oofa.txt: } /match:*thing* oofa.txt
17336 + Prints all lines in oofa.txt that contain "thing" with
17337 + the filename itself as the prefix (similar to UNIX grep).
17339 + type /prefix:{\v(time). } oofa.txt
17340 + Prefixes each line of oofa.txt with the time at which the
17341 + TYPE command was given (one backslash)
17343 + type /prefix:{\\v(time). } oofa.txt
17344 + Prefixes each line of oofa.txt with the time at which
17345 + that line is being typed (two backslashes).
17347 + type /prefix:{\\v(ty_ln). } oofa.txt
17348 + Prefixes each line of oofa.txt with its line number.
17350 + type /prefix:{\\flpad(\\v(ty_ln),4). } oofa.txt
17351 + Same as the previous example, except the line number is
17352 + right-adjusted in a 4-column field.
17355 + Truncates each line at column n (which must be a number) prior
17356 + to printing it. This option can be used for long lines when you
17357 + don't want them to wrap. If nis omitted, your current screen
17361 + Counts lines and -- if /MATCH was included, matches -- but does
17362 + not print any lines from the file. The line and match count is
17363 + shown at the end, and the variables \v(ty_lc) and \v(ty_lm) are
17366 + SET OPTIONS TYPE { /PAGE, /NOPAGE, /WIDTH:n }
17367 + Sets the paging default for TYPE commands, which can be
17368 + overridden in any particular TYPE command by including the
17371 + If a TYPE command is given with no switch, and no SET OPTIONS TYPE
17372 + selection is in effect, paging is according to your COMMAND
17373 + MORE-PROMPTING setting (SHOW COMMAND).
17374 + _________________________________________________________________
17376 + 1.16. The RESET Command
17378 + The RESET command, added in 7.0, closes all open files and logs, but
17379 + does not affect the open connection (if any).
17380 + _________________________________________________________________
17382 + 1.17. The COPY and RENAME Commands
17384 + As of C-Kermit 7.0, in the UNIX version only, the COPY and RENAME
17385 + commands are built in and do not call the underlying platform's COPY
17386 + or RENAME command. This allows them to work in "NOPUSH" versions and
17387 + other circumstances where it can't access system commands, and it
17388 + allows file copying and renaming to be done portably in scripts. The
17389 + characteristics of the built-in COPY or RENAME include:
17390 + * It fails if the source file is a directory or is wild or lacks
17392 + * It fails if the source file is the destination file.
17393 + * It allows the destination file to be a directory, in which case
17394 + the source file is copied (or renamed) into it with the same name.
17395 + * It overwrites an existing destination file if its permission
17397 + * It sets the new file's permission according to umask but also
17398 + carries forward the source file's execute permission bits if the
17399 + destination file did not already exist.
17400 + * It fails if interrupted by Ctrl-C.
17401 + * Upon error, it prints an appropriate message.
17402 + * It returns standardized error codes that can be tested by IF
17405 + These commands now also accept the following switches:
17407 + /LIST (/LOG, /VERBOSE) = Print "file1 => file2 (OK)" (or error message).
17408 + /NOLIST (/NOLOG, /QUIET) = Don't print anything (except error messages).
17410 + /NOLIST is the default.
17412 + The same built-in code is used by the UNIX C-Kermit server to execute
17413 + REMOTE COPY commands (except in this case no switches are available).
17415 + The COPY command also accepts the following additional switches. When
17416 + any of these are given (and they can be used in any combination except
17417 + /SWAP and /APPEND), some of the checks listed above are relaxed, and
17418 + thus it might be possible to get into trouble in certain cases, e.g.
17419 + when the source and target files are the same file:
17421 + /APPEND = Append source file to destination file.
17422 + /SWAP-BYTES = Swap bytes (see [364]Section 6.6.5).
17423 + /FROMB64 = Decode the source file from Base64 encoding.
17424 + /TOB64 = Encode the target file in Base64.
17426 + Base64 is the encoding commonly used for enclosures in Internet email.
17427 + _________________________________________________________________
17429 + 1.18. The MANUAL Command
17431 + The MANUAL command can be used to access the appropriate Kermit manual
17432 + or other manual. The general syntax is:
17434 + MANUAL [ string ]
17435 + If the string is omitted, C-Kermit asks the underlying system
17436 + to access the C-Kermit manual using whatever method is
17437 + appropriate for the system.
17439 + The specific action depends on the system. In UNIX, a "man" command is
17440 + issued; "kermit" is the default argument but other manual topics may
17441 + be specified. If the "man" command allows index or string searching,
17442 + the appropriate syntax may be included.
17444 + In Kermit 95, the MANUAL command brings up the HTML online K95 manual.
17446 + In VMS and elsewhere, "man" is simply translated to "help", with a
17447 + default argument of "kermit"; other and/or additional arguments may be
17448 + included according to the definition of the system's "help" command.
17450 + Correct operation of the "man" command in C-Kermit depends on the
17451 + appropriate man page or help topic having been installed in the right
17452 + place with the right permissions and format.
17453 + _________________________________________________________________
17455 + 1.19. String and Filename Matching Patterns
17457 + A pattern is a string that includes special notation for matching
17458 + classes or sequences of characters. C-Kermit 7.0 / K95 1.1.19 supports
17459 + patterns in several places:
17461 + * Filenames ([365]Section 4.9)
17462 + * SWITCH case labels ([366]Section 7.18)
17463 + * The new IF MATCH statement ([367]Section 7.4)
17464 + * TYPE /MATCH ([368]Section 1.15)
17465 + * SET FILE TEXT-PATTERNS and BINARY-PATTERNS ([369]Section 4.3)
17466 + * The \fsearch() and \farraylook() functions ([370]Sections 7.3 and
17468 + * The \fpattern() function used with [M,RE]INPUT ([372]Section 7.1)
17470 + Patterns are also called wildcards, especially when used for filename
17471 + matching. C-Kermit's pattern syntax is explained in [373]Section
17472 + 4.9.1, and also by the HELP WILDCARDS command.
17473 + _________________________________________________________________
17475 + 1.20. Multiple Commands on One Line
17477 + As of C-Kermit 7.0, commands can be grouped together on one line by
17478 + separating the commands with commas and enclosing the list in braces.
17481 + C-Kermit> { echo One, echo Two, echo Three }
17482 + C-Kermit> do { echo One, echo Two, echo Three }
17484 + Command lists can be nested:
17486 + [ do ] { echo One, echo Two, if true { echo A, echo B}, echo Three }
17488 + and the END command works as it does in macros:
17490 + [ do ] { echo One, echo Two, if true end, echo Three }
17492 + The "one line" stricture is, of course, pliant to line-continuation
17493 + conventions, namely that lines ending in hyphen (-) or left brace ({)
17494 + are to be continued. Thus the first example can also be rendered:
17502 + (the "do" is optional).
17503 + _________________________________________________________________
17505 + 1.21. What Do I Have?
17507 + C-Kermit can be built for hundreds of different platforms with
17508 + practically countless configuration options. Certain commands might
17509 + not be available in certain configurations, etc. Even on the same
17510 + platform, different builds are possible: "maximum functionality",
17511 + "minimum size", "maximum performance", and so on. You can find out a
17512 + lot about the configuration of your C-Kermit program with the SHOW
17513 + FEATURES command. Of course, a lot of what it says, especially in the
17514 + bottom part, might seem like gibberish, but can be deciphered with a
17515 + Rosetta Stone (such as the C-Kermit source or the [374]ckccfg.txt
17516 + file). In any case, the output from SHOW FEATURES might easily explain
17517 + why some expected feature is missing, or some buffer is smaller than
17518 + expected. Here's a sample of the bottom section for the SunOS version:
17520 +C-Kermit 7.0.196, 1 Jan 2000
17522 +Major optional features included:
17523 + Network support (type SHOW NET for further info)
17524 + Telnet Kermit Option
17525 + Hardware flow control
17526 + External XYZMODEM protocol support
17527 + Latin-1 (West European) character-set translation
17528 + Latin-2 (East European) character-set translation
17529 + Cyrillic (Russian, Ukrainian, etc) character-set translation
17530 + Greek character-set translation
17531 + Hebrew character-set translation
17532 + Japanese character-set translation
17533 + Unicode character-set translation
17534 + Pseudoterminal control
17537 + Fullscreen file transfer display
17538 + Control-character unprefixing
17542 +Major optional features not included:
17543 + No Kerberos(TM) authentication
17544 + No SRP(TM) (Secure Remote Password) protocol
17545 + No Secure Sockets Layer (SSL) protocol
17546 + No Transport Layer Security (TLS) protocol
17548 + No X Windows forwarding
17554 + OS Release: 4.1.3_U1
17557 +Target: sunos41gsc
17558 +GCC version: 2.7.2
17559 +Compiled Dec 31 1999 10:38:54, options:
17560 + __GNUC__ __STDC__ _POSIX_JOB_CONTROL _SC_JOB_CONTROL ARRAYREFLEN=1024 BIGBUFOK
17561 + BROWSER BSD4 CK_ANSIC CK_APC CK_AUTODL CK_CURSES CK_DNS_SRV CK_ENVIRONMENT
17562 + CK_FAST CK_LOGIN CK_MKDIR CK_NAWS CK_PCT_BAR CK_PERMS CK_RECALL CK_RTSCTS
17563 + CK_SPEED CK_TIMERS CK_TMPDIR CK_TTGWSIZ CK_TTYFD CK_WREFRESH CKEXEC
17564 + CKFLOAT=double CKGHNLHOST ckmaxfiles=64 CKMAXOPEN=64 CKMAXPATH=1023 CKREALPATH
17565 + CKREGEX CKSYSLOG CKTUNING CMDBL=32763 CMDDEP=64 CONGSPD DCMDBUF DIRENT DYNAMIC
17566 + FNFLOAT FORDEPTH=32 GFTIMER HADDRLIST HDBUUCP IFDEBUG IKS_OPTION IKSDB
17567 + IKSDCONF INBUFSIZE=32768 INPBUFSIZ=4096 MAC_MAX=16384 MACLEVEL=128 MAXDDIR=32
17568 + MAXDNUMS=4095 MAXGETPATH=128 MAXTAKE=54 MAXWLD=102400 MSENDMAX=1024 NETCMD
17569 + NETCONN NETPTY NOKVERBS NOSETBUF OBUFSIZE=32768 PARSENSE PATTERNS PIPESEND
17570 + RENAME RLOGCODE SAVEDUID SELECT SIG_V SOL_SOCKET sparc STREAMING sun SUNOS4
17571 + SYSTIMEH TCPSOCKET TIMEH TLOG TNCODE TTLEBUF TTSPDLIST UIDBUFLEN=256 UNIX
17572 + UNPREFIXZERO USE_LSTAT USE_MEMCPY VNAML=4096 WHATAMI XFRCAN Z_MAXCHAN=46
17573 + z_maxchan=46 ZXREWIND
17575 + byte order: big endian
17577 + sizeofs: int=4 long=4 short=2 char=1 char*=4 float=4 double=8
17579 + floating-point: precision=16 rounding=1
17581 + Without going into detail about what all the notation means, notice a
17584 + * The Options section shows symbols ("macros") in effect during
17585 + compilation, together with their values (for those that have
17586 + values). The options are listed in alphabetical order to make any
17587 + particular option easier to find.
17588 + * MAXWLD is the maximum number of files that a wildcard can expand
17590 + * Anything starting with "NO" is a feature (or something other than
17591 + a feature) that has been deliberately "compiled out", or omitted.
17592 + * Important items for script writers include: CMDBL=32763 (the size
17593 + of the command buffer and therefore the maximum length for a macro
17594 + or variable definition; CMDDEP=64 (the limit on recursion depth);
17595 + FORDEPTH=32 (the nesting limit on FOR loops); INBUFSIZE=32768 (the
17596 + size of the INPUT command circular buffer); MAC_MAX=16384 (the
17597 + maximum number of macros), etc.
17599 + See the [375]ckccfg.txt file for details.
17600 + _________________________________________________________________
17602 + 1.22. Generalized File Input and Output
17604 + C-Kermit 7.0 adds a new generalized I/O system for stream files,
17605 + augmenting (and to some extent, overlapping with) the older OPEN,
17606 + READ, WRITE, and CLOSE commands. In the new file i/o system, which can
17607 + be used simultaneously with the old one, all commands are grouped
17608 + together under the new FILE keyword, and some related functions and
17609 + variables are added.
17611 + 1.22.1. Why Another I/O System?
17613 + The well-known LOG, OPEN, READ, WRITE, and CLOSE commands have the
17614 + following restrictions:
17616 + 1. Only one READ file and one WRITE file can be open at a time.
17617 + 2. The READ and WRITE commands are strictly line oriented.
17618 + 3. These commands can not be used with binary files.
17619 + 4. They do not support read/write access or random access.
17620 + 5. The syntax is a bit counterintuitive for programmers.
17622 + The new file i/o system allows multiple files to be open at once, in
17623 + any desired combination of modes (read/write/append) supported by the
17624 + operating system, for line, block (record), or character i/o, for
17625 + sequential or random access, using consistent syntax and conventions.
17627 + The new system, however, does not replace the old one, since the old
17628 + system still must be used for:
17630 + 1. The session, packet, debug, transaction, and connection logs.
17631 + 2. Reading and writing commands rather than files.
17632 + 3. Existing scripts.
17634 + The new system works only with regular files, not with commands or
17635 + pipes or mailboxes or pseudoterminals. No special provisions are made
17636 + in the FILE commands for handling devices or network connections, nor
17637 + for preventing you from trying to open them; if the underlying
17638 + operating system treats them like regular stream disk files, the FILE
17639 + commands (except, of course SEEK, REWIND, and COUNT) might work with
17640 + them. (In C programming terms, the FILE commands are, at present,
17641 + nothing more than a front end to fopen() / fread() / fwrite() /
17642 + fclose() and friends, which are a portable API to sequential files,
17643 + but this might change in the future for platforms like VMS and VOS
17644 + that have more complicated file systems.)
17649 + A number assigned to a file when it is opened, by which it must
17650 + be referred to in all input/output operations.
17652 + Read/Write Pointer
17653 + The current position in an open file, expressed as the 0-based
17654 + byte count from the beginning.
17655 + _________________________________________________________________
17657 + 1.22.2. The FILE Command
17659 + FILE keyword [ switches ] channel [ data ]
17660 + The keyword specifies the function: FILE OPEN, FILE READ, FILE
17661 + WRITE, FILE CLOSE, etc. For convenience (and for familiarity to
17662 + C programmers), the two-word FILE commands can be shortened to
17663 + the single words FOPEN, FREAD, FWRITE, FCLOSE, and so on.
17664 + Switches are optional, and modify or amplify the requested file
17667 + As in C, Fortran, and other programming languages, open files are
17668 + referred to by "channels", integers such as 0, 1, 2, 3, and so on. A
17669 + channel number is assigned when you open a file. The number of
17670 + available channels depends on the underlying operating system, and can
17671 + be seen in the variable:
17675 + or by giving the FILE LIST (FLIST) command. Channels are discussed in
17676 + greater detail in [376]Section 1.22.4.
17678 + FILE command errors can be caught with IF FAIL after the FILE command.
17679 + In addition, the \v(f_error) variable is set to the completion code of
17680 + the command: 0 if no error, or a negative number if there was an
17681 + error. The error codes are listed in [377]Section 1.22.5.
17683 + The command to open a file is:
17685 + FILE OPEN [ switches ] variable filename
17686 + Opens a file for the type of access specified by the switches,
17687 + or for read-only access if no switches are given. Upon success,
17688 + a channel number is assigned to this file and stored in the
17689 + given variable so you can refer to the open file in subsequent
17690 + i/o commands. If the file can not be opened, the FILE OPEN
17691 + command fails. Synonym: FOPEN.
17693 + The FILE OPEN switches are:
17696 + Open the file for read access. If no switches are given, /READ
17697 + is assumed. If the file does not exist or can't be opened for
17698 + read access, the FILE OPEN command fails.
17701 + Allow writing. If a file of the same name already exists, it is
17702 + overwritten unless /READ or /APPEND is also included. If a file
17703 + of the given name does not exist, it is created.
17706 + Equivalent to /WRITE, except that if the file exists, it is not
17707 + destroyed. The read/write pointer is set to the end of the
17708 + file, so unless you change it with FILE SEEK or REWIND (see
17709 + below), the first FILE WRITE command adds to the end of the
17710 + file, preserving what was there already. If /WRITE is also
17711 + given, it is ignored.
17714 + Open the file in "binary" mode, rather than text mode. This
17715 + switch is meaningless (but still can be used) in UNIX. In VMS,
17716 + Windows, and OS/2, it inhibits end-of-line processing and
17717 + conversion, and so should be used for binary files and/or files
17718 + that are to be accessed in record or character mode rather than
17721 + The variable for the channel number can be any kind of variable: the
17722 + \%x kind, a macro name, or an array element. But it must be a
17723 + variable, not a number -- C-Kermit assigns the channel number; you
17724 + can't tell it what number to use.
17728 + FILE OPEN \%c oofa.txt ; Open oofa.txt for reading.
17729 + IF FAIL exit 1 Can't open oofa.txt ; Always check to see if it worked.
17730 + ECHO oofa.txt: channel = \%c
17732 + If the file oofa.txt is opened successfully, a channel number is
17733 + assigned to the variable \%c. Here's another example using a macro
17734 + name for the channel number:
17736 + FILE OPEN channel oofa.txt ; Open oofa.txt for reading.
17737 + IF SUCCESS ECHO oofa.txt: channel = \m(channel)
17739 + Switches can be combined when it makes sense and the underlying
17740 + operating system allows it. For example, to open a file in binary mode
17741 + for reading and writing (sometimes called "update"):
17743 + FILE OPEN /READ /WRITE /BINARY \%c budget.db
17745 + Some combinations might be allowed, others not. For example /READ
17746 + /APPEND will usually not be allowed. /WRITE /APPEND is treated as
17749 + A major advantage of the new system over the older one is that you can
17750 + have multiple files open at once. Suppose, for example, that you want
17751 + to open all the files in a certain directory at once:
17753 + .\%n := \ffiles(/usr/olga*,&f) ; Get file list into array.
17754 + if ( > \%n \v(f_max) ) { ; Make sure there aren't too many.
17755 + exit 1 {\v(dir): \%n = Too many files}
17757 + declare \&c[\%n] ; Make array for channel numbers.
17758 + for \%i 1 \%n 1 { ; Loop to open every file...
17759 + file open \&c[\%i] \&f[\%i] ; Try to open this one
17760 + if fail exit 1 Open error: \&f[\%i] ; Check for failure
17763 + If this loop completes successfully, the \&c[] array will contain \%n
17764 + channel numbers of open files in elements 1 through \%n.
17766 + Any file that you open with FILE OPEN stays open until Kermit exits,
17767 + or you close it explicitly. The command to close a file is:
17769 + FILE CLOSE { ALL, channel }
17770 + If a channel number is given and the channel refers to an open
17771 + file, the file is closed and the channel is freed for reuse; if
17772 + the channel does not refer to an open file, an error message is
17773 + printed and the command fails. If ALL is specified instead of a
17774 + specific channel, all files opened with FILE OPEN are closed
17775 + and if all open files were closed successfully (even if no
17776 + files were open), the command succeeds; if any open file could
17777 + not be closed, the command fails; however, all open files that
17778 + could be closed are still closed. Synonym: FCLOSE.
17780 + FILE CLOSE might fail because, for example, the disk filled up or a
17781 + quota was exceeded. Example:
17783 + fopen /write \%c new.txt ; Open new.txt for writing.
17784 + if fail exit 1 ; Check for error.
17785 + fclose \%c ; Close the file we just opened.
17787 + This creates a 0-length file called new.txt.
17789 + Note that FILE OPEN /WRITE (without /READ or /APPEND) always creates a
17790 + new file, and therefore destroys any file with the same name that
17791 + might already exist (assuming you have permission to delete it). To
17792 + avoid overwriting existing files, simply check first:
17794 + if exist new.txt exit 1 {Fatal - new.txt already exists}
17795 + fopen /write \%c new.txt
17798 + The next two commands give information about open files:
17800 + FILE STATUS channel
17801 + Tells the name of the file, if any, open on the given channel
17802 + and the switches it was opened with. The read/write pointer is
17803 + also shown; this is where the next read or write will occur;
17804 + "[EOF]" is shown if the current position in the open file is
17805 + the end -- i.e. the next read will fail if the file was opened
17806 + in /READ mode; the next write will add material to the end. The
17807 + current line number (0-based) is also shown if known. The FILE
17808 + STATUS command succeeds if the channel is open, and fails if
17809 + there is no open file on the given channel, or if the channel
17810 + number is invalid or out of range. Synonym: FSTATUS.
17813 + Lists the channel number and name of each open file, along with
17814 + its OPEN modes (R, W, A, B, RW, etc) and its current read/write
17815 + pointer or "[EOF]" if it is at the end. Also tells the number
17816 + of files currently opened with FILE OPEN, plus the maximum
17817 + number of open files allowed by the system and the maximum
17818 + number allowed for FILE OPEN. Synonym: FLIST.
17820 + Next come the commands for reading and writing files:
17822 + FILE READ [ switches ] channel [ variable ]
17823 + Reads data from the file on the given channel number into the
17824 + variable, if one was given; if no variable was given, the
17825 + result is printed on the screen. IMPORTANT: The variable should
17826 + normally be a macro name rather than a \%x or \&x[] variable if
17827 + you want backslash characters in the file to be taken literally
17828 + (see pp.408-412 of [378]Using C-Kermit for an explanation; you
17829 + can also read into a \%x or \&x[] variable, but then you must
17830 + remember to protect future references to by \fcontents() if you
17831 + don't want C-Kermit to process any backslashes it might
17832 + contain). The desired amount of data (according to the
17833 + switches) is read from the file at the current read/write
17834 + pointer, and upon completion the read/write position is updated
17835 + to first byte after the data that was read, no matter what
17836 + switches were given. Synonym: FREAD.
17838 + FILE WRITE [ switches ] channel text
17839 + Writes the given text to the file on the given channel number.
17840 + The text, of course, can be literal text or a variable, or any
17841 + combination. If the text might contain leading or trailing
17842 + spaces, it must be enclosed in braces if you want to preserve
17843 + them. Synonym: FWRITE.
17845 + Before proceeding, a caution about the NUL character. C-Kermit is so
17846 + named because it is a Kermit program written in the C language. In C,
17847 + character strings are represented as a sequence of non-NUL bytes
17848 + terminated by a NUL byte (a byte in which all bits are 0). Thus a C
17849 + string can not contain NUL bytes; it always ends with the first NUL
17850 + byte. C-Kermit variables are implemented as C strings and therefore
17851 + can't contain NUL bytes either, so the FILE READ and FILE WRITE
17852 + commands do not handle files or strings that contain NUL bytes, except
17853 + when the /CHARACTER switch is included with the FILE READ or WRITE
17854 + command, or when /LPAD:0 or /RPAD:0 is given with the FILE WRITE
17855 + command; these switches are explained below.
17857 + Also note that Kermit can not be used read or write binary numbers in
17858 + the machine's internal format (integer or floating-point); in general,
17859 + numbers can be processed only when represented as numeric or
17860 + floating-point strings.
17862 + FILE READ switches are:
17865 + Specifies that a line of text is to be read. A line is defined
17866 + according to the underlying operating system's text-file
17867 + format. For example, in UNIX a line is a sequence of characters
17868 + up to and including a linefeed, or the end of the file, which
17869 + ever comes first. The line terminator (if any) is removed
17870 + before assigning the text to the variable. If no switches are
17871 + included with the FILE READ command, /LINE is assumed. Normally
17872 + this switch should not be used with files opened in /BINARY
17873 + mode (but nothing prevents it either).
17876 + Specifies that the given number of bytes (characters) is to be
17877 + read. The actual number of bytes returned will be less if the
17878 + end of file is reached (or a NUL byte is encountered). For
17879 + example, if a file is 514 bytes long, FILE READ /SIZE:512
17880 + returns 512 bytes the first time and 2 bytes the second time.
17881 + FILE READ /SIZE provides a kind of "record i/o" for files that
17882 + do not necessarily contain lines. The resulting block of
17883 + characters is assigned to the variable without any editing.
17887 + Equivalent to /SIZE:1. If FILE READ /CHAR succeeds but the
17888 + variable is empty, this indicates a NUL byte was read. Synonym:
17891 + FILE WRITE switches are:
17894 + Specifies that an appropriate line terminator is to be added to
17895 + the end of the text. If no switches are included, /LINE is
17899 + Specifies that the given number of bytes (characters) is to be
17900 + written. If the given text is longer than the requested size,
17901 + it is truncated; if is shorter, it is padded according /LPAD
17902 + and /RPAD switches. Synonym: /BLOCK.
17905 + If /SIZE was given, but the text is shorter than the requested
17906 + size, the text is padded on the left with sufficient copies of
17907 + the character whose ASCII value is given to write the given
17908 + length. If no value is specified, 32 (the code for Space) is
17909 + used. The value can also be 0 to write the indicated number of
17910 + NUL bytes. If /SIZE was not given, this switch is ignored.
17913 + Like LPAD, but pads on the right.
17916 + Specifies that one character should be written. If the text is
17917 + empty or not given, a NUL character is written; otherwise the
17918 + first character of text is given. Synonym: /BYTE.
17921 + Specifies that the text is to be written as-is, with no
17922 + terminator added.
17924 + Here's an example in which we copy a text file line by line:
17926 + file open /read \%c oofa.txt ; Open input file
17927 + if fail exit 1 Can't open input file ; Check that it's open
17928 + file open /write \%d new.txt ; Open output file
17929 + if fail exit 1 Can't open output file ; Check
17930 + while true { ; Loop to copy lines
17931 + file read /line \%c line ; Read a line
17932 + if fail break ; Assume failure = end of file
17933 + file write /line \%d {\m(line)} ; Write the line to output file
17934 + if fail exit 1 Write failure ; Failure here is fatal
17936 + file close \%c ; Close the two files
17939 + Note that since /LINE is the default for both FILE READ and FILE
17940 + WRITE, it can be omitted as in the following example, where we also
17941 + use the short names for the FILE commands.
17943 + fopen /read \%c oofa.txt ; Open input file
17944 + if fail exit 1 Can't open input file ; Check that it's open
17945 + fopen /write \%d new.txt ; Open output file
17946 + if fail exit 1 Can't open output file ; Check
17947 + while true { ; Loop to copy lines
17948 + fread \%c line ; Read a line
17949 + if fail break ; Assume failure = end of file
17950 + fwrite \%d {\m(line)} ; Write the line to output file
17951 + if fail exit 1 Write failure ; Failure here is fatal
17953 + fclose \%c ; Close the two files
17956 + Here's the same example using "record i/o" (the open and close
17957 + sequences are are omitted since they are the same as above). The
17958 + result is the same, but execution is much faster:
17960 + while true { ; Loop to copy blocks
17961 + fread /size:512 \%c block ; Read a block into \%a
17962 + if fail break ; Assume failure = end of file
17963 + fwrite /string \%d {\m(block)} ; Write the block to output file
17964 + if fail exit 1 Write failure ; Failure here is fatal
17967 + Although record i/o is faster, it should not be used in line-oriented
17968 + applications, since it returns arbitrary chunks of the file to your
17969 + script, rather than lines. In this example, FWRITE /STRING is used
17970 + rather than FWRITE /SIZE:512 to avoid the last output block being
17971 + padded beyond the original file's length.
17973 + A file can also be copied character by character, but this is much
17974 + slower than line i/o and VERY much slower than block i/o:
17976 + while true { ; Loop to copy blocks
17977 + fread /char \%c c ; Read a character into c
17978 + if fail break ; Assume failure = end of file
17979 + fwrite /char \%d {\m(c)} ; Write character to output file
17980 + if fail exit 1 Write failure ; Failure is fatal
17983 + Although character i/o is slow, it is the only way to process files
17984 + that contain NUL characters (i.e. bytes composed of only zero bits).
17985 + In the example above, when "fread /char \%c c" returns a NUL, the c
17986 + variable is empty. But since the FREAD /CHAR command did not fail, we
17987 + know the result was really a NUL. FWRITE /CHAR, when given an empty
17988 + variable (or no variable at all) writes a NUL. Thus the loop above
17989 + will copy any file at all (very slowly). In non-copying applications,
17990 + NULs are detected like this:
17992 + fread /char \%c c
17993 + if fail (do something)
17994 + if not def c (a NUL byte was read)
17996 + Finally some advanced file operations:
17998 + FILE FLUSH channel
17999 + For output files only: commits all previous writes to disk, in
18000 + case the computer was buffering them. Synonym: FFLUSH.
18002 + FILE COUNT [ { /BYTES, /LINES, /LIST, /NOLIST } ] channel
18003 + By default, or if the /BYTES switch is given, counts the bytes
18004 + in the file, if any, open on the given channel. If the /LINES
18005 + switch is given, counts lines in the file. If the /LIST switch
18006 + is given, the result is printed. If the /NOLIST switch is
18007 + given, the result is not printed. /QUIET is a synonym for
18008 + /NOLIST. If neither /LIST nor /NOLIST is given, the result is
18009 + printed if the command is given at top level, i.e. not from a
18010 + command file or macro. In all cases, the result of the most
18011 + recent FILE COUNT command is stored in the variable
18012 + \v(f_count). Note that FILE COUNT /LINE works (and can only
18013 + work) by reading the entire file; expect it to take some time
18014 + if the file is large. Synonym: FCOUNT.
18016 + FILE REWIND channel
18017 + Moves the read/write pointer to the beginning of the file.
18018 + Equivalent to FILE SEEK channel 0. Synonym: FREWIND.
18020 + FILE SEEK [ switches ] channel { [{+,-}]number, LAST, EOF }
18021 + Moves the read/write pointer for the file on this channel to
18022 + the given position, which may be a byte (character) number or a
18023 + line number, expressed in either absolute or relative terms.
18027 + The number given is a byte number. Synonym: /CHARACTER.
18030 + The number given is a line number.
18033 + The number given is absolute.
18036 + The number given is relative to the current position.
18038 + By default, or if the /BYTE switch is given, the number is a
18039 + byte number (0 = first byte). If /LINE is given, the number is
18040 + a line number (0 = first line). EOF means to move to the end of
18041 + the file. LAST means to move to the last line or character of
18042 + the file, depending on whether it's a line or character seek.
18044 + If neither the /RELATIVE nor the /ABSOLUTE switch is given,
18045 + then if a signed number is given, the motion is relative to the
18046 + current position. An expression that evaluates to a negative
18047 + number is not considered signed for this purpose; that is, a
18048 + sign (+ or -) must be included as the first character of the
18049 + number in the command itself to force a relative seek (in the
18050 + absence of /RELATIVE or /ABSOLUTE).
18052 + If the number has no sign, or if the /ABSOLUTE switch is given,
18053 + the number represents an absolute position (relative to the
18054 + beginning of the file). Subsequent FILE READs or WRITEs will
18055 + take place at the new position.
18057 + If the read/write pointer is placed after the end of the file,
18058 + a subsequent FILE READ will fail, but a FILE WRITE will succeed
18059 + (possibly creating a file with "holes"). If a FILE SEEK /BYTE
18060 + command is given, the current line becomes unknown (unless the
18061 + position is 0) and subsequent FILE SEEK /RELATIVE /LINE
18062 + commands will fail until the next non-relative FILE SEEK /LINE
18063 + command is given. Synonym: FSEEK.
18065 + An absolute FILE SEEK to a negative position fails silently, as does a
18066 + relative seek to a position before the beginning of the file.
18068 + A caution about relative SEEKs: remember that the number is relative
18069 + to the current position. Whenever you read or write, this changes the
18070 + position. In each of the following examples, assume the file open on
18071 + channel \%c is positioned at line n (the FREAD target variable is
18072 + omitted for lack of space):
18074 + { FREAD \%c, FSEEK /LINE \%c -1, FREAD \%c } <-- Reads line n twice
18075 + { FREAD \%c, FSEEK /LINE \%c +0, FREAD \%c } <-- Reads lines n and n+1
18076 + { FREAD \%c, FSEEK /LINE \%c +1, FREAD \%c } <-- Reads lines n and n+2
18077 + { FREAD \%c, FSEEK /LINE \%c -2, FREAD \%c } <-- Reads lines n and n-1
18078 + { FREAD \%c, FSEEK /LINE \%c -3, FREAD \%c } <-- Reads lines n and n-2
18080 + Another caution: Using FSEEK and FREAD /SIZE to repeatedly read the
18081 + same disk block (e.g. when sampling a database record that is
18082 + frequently updated) might not give you updated disk blocks due to the
18083 + internal buffering and caching of the C library (this probably varies
18084 + from one platform/compiler combination to another). If necessary you
18085 + can force a fresh disk read with a close/open sequence:
18088 + FOPEN \%c samefilename
18089 + FSEEK \%c samespot
18090 + FREAD /SIZE:howmanybytes \%c variable
18091 + _________________________________________________________________
18093 + 1.22.3. FILE Command Examples
18095 + To read the last 10 lines of a text file into an array:
18097 + fopen /read \%c oofa.txt ; Open the file
18098 + if fail exit 1 Can't open oofa.txt ; Always check for failure
18099 + dcl \&a[10] ; Declare a 10-element array
18100 + fcount /line \%c ; Count lines in the file
18101 + fseek /line \%c \v(f_count)-10 ; Seek to 10 lines from the end
18102 + if fail exit 1 Can't seek ; Check for failure
18103 + for \%i 1 10 1 { fread \%c \&a[\%i] } ; Read the last 10 lines
18104 + fclose \%c ; Close the file
18106 + Note that blank lines show up as empty (undefined) array elements, for
18107 + example if you give a "show array a" command at this point. This is
18108 + normal. You can still use these elements; e.g.:
18110 + for \%i 1 10 1 { echo \%i. \&a[\%i] } ; Display the 10 lines
18112 + Here is how to read the last line of a file (already open on channel
18115 + fseek /line \%c last ; Seek directly to last line
18119 + fseek /line \%c eof ; Seek to end of file
18120 + fseek /line \%c -1 ; Seek to beginning of last line
18124 + fcount /line \%c ; Count the file's lines
18125 + fseek /line \%c \v(f_count)-1 ; Seek to last line
18126 + fread \%c ; Read it
18128 + To read every other line from the file (using relative SEEK), skipping
18131 + fopen /read \%c oofa.txt ; Open the file
18132 + while ( success ) { ; Loop through lines
18133 + fseek /line \%c +1 ; Skip a line
18134 + if success fread \%c ; Read & display a line
18136 + fclose \%c ; Close the file
18138 + Here is how to read the lines of a file in reverse order:
18140 + fopen /read \%c oofa.txt ; Open
18141 + if fail exit 1 ; Check
18142 + fseek /line \%c last ; Seek to last line
18143 + while success { ; Loop
18144 + fread \%c ; Read line
18145 + fseek /line \%c -2 ; Seek backwards two lines
18147 + fclose \%c ; Close the file
18149 + The loop works because a relative SEEK outside the file fails.
18151 + It is also possible to use block i/o to manage random-access files
18152 + with fixed-length records (as long as they don't contain NUL
18153 + characters). Suppose, for example, you have a file of "card image"
18154 + records with fixed-field information about customers, such as:
18156 + Name: Columns 1-32 (column numbers are 1-based)
18157 + Address: Columns 33-72
18158 + Balance: Columns 73-80
18160 + The records are indexed by customer number, starting with 0. There are
18161 + no line terminators separating them. Therefore the record for customer
18162 + number n starts at position nx 80 (\%n*80).
18164 + Now suppose we received a payment from customer number 173 and want to
18165 + update the balance:
18167 + .\%n = 173 ; Customer (record) number
18168 + .\%a = 12.72 ; Amount
18169 + fopen /read /write \%c customer.db ; Open the file
18170 + if fail stop 1 OPEN FAILED: \f_errmsg() ; Check
18171 + fseek /byte \%c 80*\%n ; Seek to record
18172 + fread /size:80 \%c r ; Read the record
18173 + if fail stop 1 READ FAILED: \f_errmsg() ; Check (IMPORTANT)
18174 + .\%b := \fright(\m(r),8) ; Extract the balance
18175 + .\%b := \ffpadd(\%b,\%a,2) ; Add the new payment
18176 + if fail stop 1 ARITHMETIC ERROR: \%b/\%a ; Catch bad records
18177 + .r := {\fleft(\m(r),72)\flpad(\%b,8)} ; Update the record
18178 + fseek /byte \%c 80*\%n ; Reposition to same spot
18179 + fwrite /size:80 \%c {\m(r)} ; Replace the record
18180 + if fail stop 1 WRITE FAILED: \f_errmsg() ; Check
18181 + fclose \%c ; Close the file
18183 + REMEMBER: Using FILE SEEK to move beyond the end of file can result in
18184 + a file with holes when writing; when reading, an end-of-file error
18185 + will occur -- be sure to check for it.
18186 + _________________________________________________________________
18188 + 1.22.4. Channel Numbers
18190 + C-Kermit's channel numbers are integers from 0 to some
18191 + platform-dependent limit, such as 46 or 1985 (the value of \v(f_max)).
18192 + This is the limit placed by the operating system on the number of
18193 + files that may be opened by one process or user or job, minus the
18194 + standard input, output, and error files, and minus the number of files
18195 + reserved by C-Kermit for logs, OPEN READ and WRITE, and file transfer
18196 + (and maybe some command files -- the \v(f_max) number can't be exact).
18198 + Although you must include a variable in the FILE OPEN command, to
18199 + which the channel number is assigned, you don't have to use a variable
18200 + in the other FILE commands if you know what the number is -- you can
18201 + just put the number. This saves you a few keystrokes when typing
18202 + commands at the prompt:
18204 + fopen \%c oofa.txt
18206 + 0. /usr/olga.oofa.txt (R) 0
18208 + This tells the channel number is 0 (the number on the left is the
18209 + channel file's channel number). Of course you can also find it by
18210 + echoing the variable:
18215 + Or with "fstatus \%c". Now you can type commands like:
18219 + to read a line from the file. Obviously, however, using digits rather
18220 + than a variable for the channel number would be poor practice in a
18223 + If in commands like:
18227 + you have trouble remembering which variable is which, note that the
18228 + channel number is, indeed, a number. Anywhere C-Kermit accepts a
18229 + number it can also accept an expression, so you can put parentheses
18230 + around the channel number to remind you it's the channel number and
18231 + not the variable into which data is to be read:
18235 + Normally channel numbers are assigned sequentially as 0, 1, 2, ... up
18236 + to the limit. However, once you start closing files, there can be
18237 + holes in the sequence. New channels are assigned to fill in the holes.
18238 + Thus you can't depend on channel numbers being in any particular
18240 + _________________________________________________________________
18242 + 1.22.5. FILE Command Errors
18244 + Each FILE command sets the variable \v(f_error) to one of the
18245 + following values:
18248 + -1 = System error
18249 + -2 = Attempt to read after end of file
18250 + -3 = Channel not open
18251 + -4 = Channel number out of range (negative or too large)
18252 + -5 = Numeric argument (size, ...) out of range
18253 + -6 = File not found
18254 + -7 = Bad or missing filename
18255 + -8 = Too many files are already open (FILE OPEN only)
18256 + -9 = Forbidden operation (e.g. write to a read-only file)
18257 + -10 = Access denied
18258 + -11 = Illegal combination of OPEN modes (FILE OPEN only)
18259 + -12 = Buffer overflow
18260 + -13 = Current line number unknown (for relative line seeks)
18261 + -14 through -98: Reserved.
18262 + -99 = Requested operation not implemented in this version of C-Kermit
18263 + -999 = Unknown error
18265 + When \v(f_error) is -1, this means the FILE command failed because
18266 + because of a system error, in which case you can examine the following
18269 + \v(errno) = System error number.
18270 + \v(errstring) = Error message corresponding to \v(errno).
18272 + A special function is available for translating the \v(f_error) code
18273 + to an error message string:
18276 + If the code is -1, returns error message of the most recent system
18277 + error; otherwise if the code is a valid \v(f_error) value, the associated
18278 + message is returned. If the code is omitted, the status message
18279 + corresponding to the current \v(f_error) value is returned.
18281 + A FILE command that fails prints the appropriate error message
18282 + automatically, except when the command is READ or SEEK and the error
18283 + is -2 (end of file); in that case, the command still fails, but does
18284 + not print a message. This allows constructions such as:
18286 + fopen \%c oofa.txt
18287 + while success { fread \%c }
18290 + to work as expected, i.e. without an annoying message when the end of
18292 + _________________________________________________________________
18294 + 1.22.6. File I/O Variables
18296 + The variables associated with the file i/o package are:
18299 + Result of the most recent FILE COUNT (FCOUNT) command.
18302 + Numeric error code of most recent FILE command (0 = no error).
18305 + Maximum number of files open simultaneously.
18306 + _________________________________________________________________
18308 + 1.22.7. File I/O Functions
18310 + Some of the FILE commands can also be issued as function calls, which
18311 + makes script writing a bit more convenient, especially for C
18312 + programmers. Also, several functions are provided that do not have
18313 + command equivalents. Each of these functions takes a channel number as
18314 + the first argument. These functions do not work for OPEN { READ,
18315 + !READ, WRITE, !WRITE, and APPEND } files.
18317 + \f_status(channel)
18318 + Returns 0 if the channel is not open, otherwise a number
18319 + between 1 and 15 which is the sum of the OPEN modes:
18326 + The remaining functions work only for open channels. Each of these
18327 + functions can fail for the applicable reasons listed in [379]Section
18328 + 1.22.5. For instructions on handling function errors, see [380]Section
18332 + Returns the file's current read/write pointer (0-based). There
18333 + is no FILE command equivalent.
18336 + Returns the file's current line number (0-based), if known,
18337 + otherwise -1. There is no FILE command equivalent. The line
18338 + number is known as long as no character or block i/o has been
18339 + done on the channel.
18341 + \f_handle(channel)
18342 + Returns the "file handle" of the file. That is, it translates
18343 + the portable C-Kermit channel number into a system-specific
18344 + file handle or number that can be passed to other programs on
18345 + the same platform. In UNIX this is a file descriptor. There is
18346 + no FILE command equivalent.
18349 + Returns 1 if the read/write pointer of the file on the given
18350 + channel is at the end of the file, 0 otherwise. Convenient in
18351 + WHILE statements, e.g.:
18353 + while not \f_eof(\%c) { fread \%c }
18355 + \f_getchar(channel)
18356 + Equivalent to FREAD /CHAR. Returns the character actually read.
18357 + If \f_getchar() does not fail but the return value is empty,
18358 + this means a NULL character was read.
18360 + \f_getline(channel)
18361 + Equivalent to FREAD /LINE. Returns the line actually read, but
18362 + with the line terminator stripped. If \f_getline() does not
18363 + fail but the return value is empty, this normally means an
18364 + empty line was read.
18366 + \f_getblock(channel,n)
18367 + Equivalent to FREAD /SIZE:n. Returns the block of characters
18368 + actually read. If the returned block is smaller than n, it
18369 + indicates either that the end of file was reached or a NUL
18370 + character is in the block.
18372 + \f_putchar(channel,c)
18373 + Equivalent to FWRITE /CHARACTER. Writes the character c. If c
18374 + contains more than one character, only the first is written. If
18375 + c is empty a NUL is written. Returns the number of characters
18376 + written on success, or a negative error code upon failure.
18378 + \f_putline(channel,string)
18379 + Equivalent to FWRITE /LINE. Writes the string and adds the
18380 + appropriate line termination character or sequence. If the
18381 + string is empty or omitted, an empty line is written. Returns
18382 + the number of characters written on success, or a negative
18383 + error code upon failure.
18385 + \f_putblock(channel,string)
18386 + Equivalent to FWRITE /STRING. Writes the string as given. If
18387 + the string is empty or omitted, nothing is written. Returns the
18388 + number of characters written on success, or a negative error
18389 + code upon failure.
18390 + _________________________________________________________________
18392 + 1.22.8. File I/O Function Examples
18394 + fopen /read \%c oofa.txt ; Open our favorite file for reading
18395 + if failure exit 1 ; Check that it's open
18396 + while not \f_eof(\%c) { ; Loop until EOF
18397 + .line := \f_getline(\%c) ; Get a line
18398 + if success echo {\m(line)} ; Echo it
18400 + if not \f_eof(\%c) { ; Check reason for loop exit
18401 + exit 1 File Error: \f_errmsg() ; If not EOF say so.
18404 + frewind \%c ; Rewind the file
18405 + while not \f_eof(\%c) { ; Same thing but with block i/o
18406 + .block := \f_getblock(\%c,256) ; (much faster than line i/o)
18407 + if success xecho {\m(block)}
18410 + frewind \%c ; Rewind again
18411 + while not \f_eof(\%c) { ; Same deal but with character i/o
18412 + .c := \f_getchar(\%c) ; (much slower than line i/o)
18413 + if success xecho {\m(c)}
18417 + To close all open files (equivalent to FCLOSE ALL):
18419 + for \%i 0 \v(f_max)-1 1 {
18420 + if \f_status(\%i) fclose \%i
18422 + _________________________________________________________________
18424 + 1.23. The EXEC Command
18426 + The EXEC command is available only in UNIX.
18428 + EXEC [ /REDIRECT ] command [ arg1 [ arg2 [ ... ] ]
18429 + Runs the given command with the arguments in such a way that
18430 + the command replaces C-Kermit in memory, and C-Kermit ceases to
18431 + execute. EXEC is like RUN, except instead of returning to
18432 + C-Kermit when finished, the command returns to whatever process
18435 + In the normal case, no files are closed, so the EXEC'd command
18436 + inherits the open files, read/write pointers, working directory,
18437 + process ID, user ID (unless command is SUID), group ID (unless command
18438 + is SGID), groups, etc. (In UNIX, the EXEC command is simply a front
18439 + end for execvp().)
18441 + If the /REDIRECT switch is included, then if a connection is open (SET
18442 + LINE or SET HOST), it becomes the standard input and output of the
18443 + EXEC'd program. If no connection is open, the /REDIRECT switch has no
18444 + effect. For example to use C-Kermit for PPP dialing in Linux:
18446 + set modem type usr ; Specify the kind of modem you have
18447 + set line /dev/ttyS1 ; Specify the device it's connected to
18448 + set speed 57600 ; and the speed
18449 + set flow rts/cts ; and flow control.
18450 + set dial retries 100 ; Try the dial sequence up to 100 times.
18451 + dial {{9-212-555-1212}{9-212-555-1213}{9-212-555-1214}{9-212-555-1215}}
18453 + for \%i 1 16 1 { ; Try up to 16 times to get login prompt
18454 + input 10 Login: ; Wait 10 sec for it to appear
18455 + if success break ; Got it - proceed...
18456 + output \13 ; Send a carriage return and try again
18458 + if ( > \%i 16 ) stop 1 NO LOGIN PROMPT
18459 + lineout \(myuserid) ; Send user ID
18460 + input 30 assword: ; Wait for Password prompt
18461 + if fail stop 1 NO PASSWORD PROMPT
18462 + lineout \m(mypassword) ; Send the password.
18463 + exec /redirect pppd ; Replace ourselves with pppd.
18465 + In this example we assume that the script has already set up the
18466 + myuserid and mypassword variables -- normally the password should be
18467 + prompted for, rather than stored on disk. Notice the advantages over
18468 + the well-known "chat script":
18469 + * You don't have to control the modem itself with AT commands;
18470 + Kermit's DIAL command does this for you.
18471 + * You can have Kermit automatically redial as many times as you want
18472 + until it gets a connection (if this is legal in your country).
18473 + * You can have Kermit fetch the number or numbers from a dialing
18475 + * You can have Kermit cycle through a list of phone numbers (this is
18476 + new in C-Kermit 7.0; see [381]Section 2.1.16) without having to
18477 + enter the numbers in a dialing directory.
18478 + * Dialing is location-independent; you can use the same script to
18479 + dial from different areas or countries.
18480 + * Once the connection is made, the full power of Kermit's script
18481 + language is available to manage the dialog with the terminal
18482 + server or other device that answers the phone call.
18484 + NOTE: PPP and SLIP dialing are not available in Windows 95/98/NT/2000,
18485 + whose APIs do not provide a method for an application to hand over a
18486 + connection to the PPP or SLIP driver.
18487 + _________________________________________________________________
18489 + 1.24. Getting Keyword Lists with '?'
18491 + Suppose you type "te" at the C-Kermit> 6.0 prompt and then Esc or Tab
18492 + to request keyword completion. Kermit beeps, indicating that more than
18493 + one command starts with "te". But if you type '?' to see what they
18494 + are, Kermit shows only "telnet". So why the beep? Because of invisible
18495 + keywords like "telopt", "terminal", and "text". Lots of keywords are
18496 + invisible because they are either synonyms for other keywords or else
18497 + esoteric options to be used only in special circumstances, so we don't
18498 + want them cluttering up the menus.
18500 + But then there is no way for you to discover them. So in C-Kermit 7.0,
18501 + if you type '?' AFTER the beginning of a keyword field, then invisible
18502 + keywords are shown too:
18504 + C-Kermit> te<Esc><BEEP>
18505 + C-Kermit> te? Command, one of the following:
18506 + telnet telopt terminal text
18509 + But if '?' is typed at the beginning of a field, only visible keywords
18510 + are shown, as before (so, in this example, if '?' is typed at the
18511 + C-Kermit> prompt, "telnet" is the only command shown that starts with
18513 + _________________________________________________________________
18515 + 2. MAKING AND USING CONNECTIONS The SET LINE, SET HOST, and SET PORT (a
18516 + synonym for SET LINE) commands have new synonyms, in which the word SET is
18517 + replaced by the word OPEN: OPEN LINE, etc. There is no new functionality
18518 + here, but OPEN is a better verb, since SET generally takes no action, whereas
18519 + these commands actually try to open a connection. Furthermore, there is the
18520 + symmetry with CLOSE.
18521 + ________________________________________________________________________
18523 + 2.0. SET LINE and SET HOST Command SwitchesThe SET LINE (SET PORT) and SET
18524 + HOST commands now allow switches before the device or host name, in most
18525 + cases, and under certain circumstances, also at the end. The new syntax is
18526 + backwards compatible with the previous syntax; thus SET LINE, SET PORT, and
18527 + SET HOST commands in command files written for C-Kermit 6.0 or earlier still
18528 + work. The expanded syntax is:
18530 + { OPEN, SET } { LINE, PORT, HOST } [ switches ] device-or-address [ switches
18533 + The first group of switches is:
18535 + /NETWORK-TYPE:{TCP/IP,X.25,PIPE,PTY...}
18536 + When more than one network type is available, this lets you
18537 + specify the type of network to use for this connection without
18538 + affecting your global SET NETWORK TYPE. See [382]Section 2.7
18539 + about pipes and ptys.
18542 + This switch is equivalent to SET LOGIN USERID. If a string is
18543 + given, it sent to host during Telnet negotiations; if this
18544 + switch is given but the string is omitted, no user ID is sent
18545 + to the host. If this switch is not given, your current LOGIN
18546 + USERID (\v(userid) value), if any, is sent. Unlike most other
18547 + switches, this one is "sticky", since the value must persist
18548 + throughout the session in case the server requests the ID
18549 + string at a later time.
18552 + Enter CONNECT mode immediately and automatically after the
18553 + device or connection is open. On serial devices, however, when
18554 + CARRIER-WATCH is not OFF, wait up to 1 second for the Carrier
18555 + Detect signal to appear before trying to connect, to give the
18556 + device time to react DTR, which might have been off prior to
18557 + opening the device.
18560 + Enter server mode immediately and automatically after the
18561 + device or connection is open. Treatment of carrier is the same
18566 + For Telnet connections only: Like SET TELNET WAIT { ON, OFF },
18567 + but applies only to this connection, and in fact applies only
18568 + when OPENing this connection (which is usually the only place
18569 + it matters). Typically you would use TELNET /NOWAIT to make a
18570 + connection to a misbehaving Telnet server that does not reply
18571 + to negotiations as required by the Telnet protocol definition.
18573 + Note: /CONNECT and /SERVER switches are not available in the RLOGIN
18574 + and TELNET commands, since these commands already include an implicit
18575 + /CONNECT and preclude automatic entry into server mode.
18577 + The /CONNECT and /SERVER switches are especially useful with "set host
18578 + *" connections. For example, suppose you want to start a Kermit server
18579 + on socket 3000 of your TCP host. Normally you would have to give the
18584 + and then wait for a connection to come in, and only then could you
18585 + give the SERVER command (or else define a macro to do this, and then
18586 + execute the macro). Now you can do it in one step:
18588 + set host /server * 3000
18590 + This tells C-Kermit to wait for the connection and then enter server
18591 + mode once it comes in, no matter how long it takes. Similarly, "set
18592 + host /conn *" can be used to wait for a "chat" connection to come in.
18594 + Another set of switches is available in VMS only, for use only with
18598 + Allows the SET LINE device to be opened in shared mode.
18599 + Normally it makes no sense to open a serial device in shared
18600 + mode, but it's necessary when C-Kermit is running in an
18601 + environment such as DECIntact, that opens your job's
18602 + controlling terminal in such a way that C-Kermit can't open it
18603 + too, unless it enables SHARE privilege. Note: SHARE privilege
18607 + Requires that the SET LINE device not be in use by any other
18608 + process in order for it to be successfully opened by C-Kermit.
18609 + If neither /SHARE nor /NOSHARE is specified, /NOSHARE is used.
18611 + The second group of switches is:
18614 + Do not send initial Telnet negotiations even if this is a
18618 + This is a connection to a raw TCP socket ([383]Section 2.3.5).
18621 + Use Rlogin protocol even if this is not an Rlogin port.
18624 + Send initial Telnet negotiations even if this is not a Telnet
18627 + As of C-Kermit 7.0 and K95 1.1.19, the TELNET command includes an
18628 + implicit /TELNET switch. So if you TELNET to a non-TELNET port, Kermit
18629 + sends initial Telnet negotiations. This makes sense, since that's what
18632 + If you want to make a connection to a non-Telnet port without sending
18633 + initial Telnet negotiations, use:
18635 + set host [ /connect ] name-or-address port
18639 + telnet name-or-address port /no-telnet-init
18641 + Additional switches might be added in the future; type "set host ?" or
18642 + "set line ?" to see a current list.
18643 + _________________________________________________________________
18647 + Automatic redialing is illegal or restricted in many countries, so
18648 + until C-Kermit 7.0, it was disabled by default, i.e. until a SET DIAL
18649 + RETRIES command was given. In C-Kermit 7.0, if no SET DIAL RETRIES
18650 + command has been given, a default is picked dynamically at DIAL time
18651 + based on the calling country code, if known. At this writing, the only
18652 + country code known to have no restrictions on automatic redialing is
18653 + 1. So in this case a limit of 10 is chosen; otherwise 1. If you have
18654 + not given an explicit SET DIAL RETRIES command, SHOW DIAL shows the
18655 + value as "(auto)", and then the value actually used is shown when you
18656 + give the DIAL command.
18658 + As of C-Kermit 7.0, automatic redialing is automatically canceled if
18659 + the call could not be placed because no dialtone was detected.
18660 + _________________________________________________________________
18662 + 2.1.1. The Dial Result Message
18664 + If DIAL DISPLAY is not ON, the "Call complete" message now shows the
18665 + modem's call result message, for example:
18668 + Call complete: "CONNECT 31200/ARQ/V32/LAPM/V42BIS"
18670 + The exact format and contents of this message, of course, depends on
18671 + the make, model, and configuration of your modem, so use your modem
18672 + manual to interpret it. The call result message is also available in
18673 + C-Kermit's \v(dialresult) variable.
18675 + C-Kermit> echo \v(dialresult)
18676 + CONNECT 31200/ARQ/V32/LAPM/V42BIS
18677 + C-Kermit> echo Speed = \fword(\v(dialresult),2)
18681 + Suppose your modem reports the modulation speed as shown above and you
18682 + want to ensure your call is completed at (say) 24000 bps or more. You
18683 + can use a little macro to do the job:
18685 +define HSDIAL { ; High Speed DIAL
18687 + if < \v(argc) 1 if not def \v(dialnumber) end 1 Usage: \%0 number
18688 + set dial retries 100
18689 + set dial interval 1
18692 + if fail end 1 DIAL failed.
18693 + asg \%s \fword(\v(dialresult),2)
18694 + if def \%s if numeric \%s if not < \%s 24000 break
18698 + (See [384]Section 7.5 about the \%* variable.)
18699 + _________________________________________________________________
18701 + 2.1.2. Long-Distance Dialing Changes
18703 + Due to the glut of cell phones, pagers, fax machines, ISPs, etc, area
18704 + codes and dialing rules are changing all the time. In the North
18705 + American Numbering Plan (NANP) countries (USA, Canada, etc), area
18706 + codes are split or overlayed with increasing frequency, and 10- and
18707 + 11-digit dialing is gradually becoming the norm for local calls.
18708 + Changes are occurring In Europe, too, partly for these reasons and
18709 + partly because of some new EC rules.
18711 + In France, effective 18 October 1996, all calls, even local ones, must
18712 + be dialed with an area code. French area codes are presently 1-digit
18713 + numbers, 1-6, and the long-distance dialing prefix is 0. All calls
18714 + within France are considered long distance and begin with 01, 02, ...,
18717 + Effective 1 May 1997, all calls within the US state of Maryland, even
18718 + local ones, must be dialed with an area code but without the
18719 + long-distance prefix -- this is the now widely-known North American
18720 + phenomenon of "ten digit dialing". The same is happening elsewhere --
18721 + many cities in Florida adopted 10-digit dialing in 1998.
18723 + In Italy beginning 19 June 1998, all calls to fixed (as opposed to
18724 + mobile) numbers must be prefixed by 0. When calling into Italy from
18725 + outside, the 0 must follow the country code (39). Calls to cell
18726 + phones, however, must be placed without the 0. Then on 29 December
18727 + 2000, the 0 will become a 4 (for calling fixed numbers) and a prefix
18728 + of 3 must used for calling mobile phones. More info at:
18729 + http://www.telecomitalia.it/npnn/.
18731 + In Spain, effective 4 April 1998, with hard cutover on 18 July 1998,
18732 + all calls within the country must be dialed with 9 digits, and all
18733 + calls from outside Spain must also be dialed with 9 digits (after the
18734 + country code, 34). The new 9-digit numbers all begin with "9". More
18735 + info at: [385]http://www.telefonica.es/cambiodenumeracion/
18737 + Several new dialing features and commands have been added in version
18738 + 6.1 and 7.0 to address these changes.
18740 + C-Kermit 6.0 and Kermit 95 1.1.11 and earlier handle the French
18741 + situation via a reasonable subterfuge (setting the local area code to
18742 + a nonexistent one), but did not handle "ten-digit dialing" well at
18743 + all; the recommended technique was to change the long-distance dialing
18744 + prefix to nothing, but this defeated Kermit's "list numbers for one
18745 + name" feature when the numbers were in different locations. For
18748 + set dial ld-prefix
18749 + dial onlineservice
18751 + where "onlineservice" is a dialing directory entry name corresponding
18752 + to entries that are in (say) Maryland as well as other states, would
18753 + not correctly dial the numbers not in Maryland.
18755 + A new command lets you specify a list of area codes to be considered
18756 + local, except that the area code must be dialed:
18758 + SET DIAL LC-AREA-CODES [ areacode [ areacode [ areacode [ ... ] ] ] ]
18759 + The list may include up to 32 area codes. If a number is called
18760 + whose area code is in this list, it is dialed WITHOUT the
18761 + long-distance prefix, but WITH the area code.
18763 + So in Maryland, which (last time we looked) has two area codes, 410
18764 + and 301, the setup would be:
18766 + SET DIAL LC-AREA-CODES 410 301
18770 + SET DIAL LD-PREFIX 1
18771 + SET DIAL AREA-CODE 301
18772 + SET DIAL LC-AREA-CODES 410 301 <-- Area codes in 10-digit dialing region
18773 + DIAL +1 (301) 765-4321 <-- Dials 3017654321 (local with area code)
18774 + DIAL +1 (410) 765-4321 <-- Dials 4107654321 (local with area code)
18775 + DIAL +1 (212) 765-4321 <-- Dials 12127654321 (long distance)
18777 + The SET DIAL LC-AREA-CODES command does not replace the SET DIAL
18778 + AREA-CODE command. The latter specifies the area code you are dialing
18779 + from. If the called number is in the same area code, then the area
18780 + code is dialed if it is also in the LC-AREA-CODES list, and it is not
18781 + dialed otherwise. So if "301" had not appeared in the LC-AREA-CODES
18782 + list in the previous example:
18784 + SET DIAL LD-PREFIX 1
18785 + SET DIAL AREA-CODE 301
18786 + SET DIAL LC-AREA-CODES 410 <-- Area codes in 10-digit dialing region
18787 + DIAL +1 (301) 765-4321 <-- Dials 7654321 (local)
18788 + DIAL +1 (410) 765-4321 <-- Dials 4107654321 (local with area code)
18789 + DIAL +1 (212) 765-4321 <-- Dials 12127654321 (long distance)
18791 + The new Kermit versions also add a Local Call Prefix and Local Call
18792 + Suffix, in case you have any need for it. These are added to the
18793 + beginning and of local phone numbers (i.e. numbers that are not
18794 + long-distance or international). Examples:
18796 + SET DIAL LD-PREFIX 1
18797 + SET DIAL LC-PREFIX 9
18798 + SET DIAL LC-SUFFIX *
18799 + SET DIAL LC-AREA-CODES 410 <-- Area codes in 10-digit dialing region
18800 + SET DIAL AREA-CODE 301
18801 + DIAL +1 (301) 765-4321 <-- Dials 97654321* (local)
18802 + DIAL +1 (410) 765-4321 <-- Dials 94107654321* (local with area code)
18803 + DIAL +1 (212) 765-4321 <-- Dials 12127654321 (long distance)
18804 + _________________________________________________________________
18806 + 2.1.3. Forcing Long-Distance Dialing
18808 + Suppose a number is in your country and area, but for some reason you
18809 + need to dial it long-distance anyway (as is always the case in
18810 + France). There have always been various ways to handle this:
18812 + 1. Temporarily set your area code to a different (or nonexistent or
18813 + impossible) one (but this required knowledge of which area codes
18814 + were nonexistent or impossible in each country).
18815 + 2. Dial the number literally instead of using the portable format,
18816 + but this defeats the purpose of the portable dialing directory.
18818 + Now there is also a new command that, very simply, can force
18819 + long-distance dialing:
18821 + SET DIAL FORCE-LONG-DISTANCE { ON, OFF }
18822 + If a call is placed to a portable phone number within the same
18823 + country code as the calling number, it is dialed with the
18824 + long-distance prefix and the area code if FORCE-LONG-DISTANCE
18825 + is ON. If OFF, the regular rules and procedures apply.
18827 + Example (France):
18829 + SET DIAL COUNTRY-CODE 33
18830 + SET DIAL AREA-CODE 6
18831 + SET DIAL FORCE-LONG-DISTANCE ON
18833 + (In fact, SET DIAL COUNTRY-CODE 33 automatically sets DIAL
18834 + FORCE-LONG-DISTANCE ON...)
18836 + Example (USA, for a certain type of reverse-charge calling in which
18837 + the called number must always be fully specified):
18839 + SET DIAL PREFIX 18002666328$ ; 1-800-COLLECT
18840 + SET DIAL COUNTRY-CODE 1
18841 + SET DIAL AREA-CODE 212
18842 + SET DIAL FORCE-LONG-DISTANCE ON
18844 + Example (Toronto, where calls to exchange 976 within area code 416
18845 + must be dialed as long distance, even when you are dialing from area
18848 + SET DIAL COUNTRY-CODE 1
18849 + SET DIAL AREA-CODE 416
18850 + SET DIAL FORCE-LONG-DISTANCE ON
18851 + DIAL +1 (416) 976-xxxx
18853 + If dialing methods were consistent and sensible, of course it would be
18854 + possible to always dial every domestic call as if it were long
18855 + distance. But in many locations this doesn't work or if it does, it
18856 + costs extra. The following macro can be used for dialing any given
18857 + number with forced long-distance format:
18861 + set dial force-long-distance on
18863 + asg \%x \v(success)
18864 + set dial force-long-distance off
18868 + (See [386]Section 7.5 about the \%* variable.)
18869 + _________________________________________________________________
18871 + 2.1.4. Exchange-Specific Dialing Decisions
18873 + This applies mainly to the North American Numbering Plan (NANP). Refer
18874 + to the section "Alternative notations" in [387]Using C-Kermit 2nd
18875 + Edition, pages 106-107, and the story about Toronto on page 110. Using
18876 + the new LC-AREA-CODES list, we can address the problem by treating the
18877 + exchange as part of the area code:
18879 + SET DIAL LD-PREFIX 1
18880 + SET DIAL AREA-CODE 416
18881 + SET DIAL LC-AREA-CODES 905276
18882 + DIAL +1 416 765 4321 <-- 7654321 (local)
18883 + DIAL +1 905 276 4321 <-- 9052764321 (local with area code)
18884 + DIAL +1 905 528 4321 <-- 19055284321 (long distance)
18886 + The same technique can be used in Massachusetts (story at top of page
18887 + 111) and in any other place where dialing to some exchanges within a
18888 + particular area code is local, but to others in the same area code is
18890 + _________________________________________________________________
18892 + 2.1.5. Cautions about Cheapest-First Dialing
18894 + Kermit does not maintain a knowledge base of telephony information; it
18895 + only provides the tools to let you enter a phone number in a standard
18896 + format and dial it correctly from any location in most cases.
18898 + In particular, Kermit does not differentiate the charging method from
18899 + the dialing method. If a call that is DIALED as long-distance (e.g.
18900 + from 212 to 718 in country code 1) is not CHARGED as long distance, we
18901 + have no way of knowing that without keeping a matrix of charging
18902 + information for every area-code combination within every country, and
18903 + any such matrix would be obsolete five minutes after it was
18904 + constructed. Thus, "cheapest-first" sorting is only as reliable as our
18905 + assumption that the charging method follows the dialing method. A good
18906 + illustration would be certain online services that have toll-free
18907 + dialup numbers which they charge you a premium (in your online service
18909 + _________________________________________________________________
18911 + 2.1.6. Blind Dialing (Dialing with No Dialtone)
18913 + C-Kermit's init string for Hayes-like modems generally includes an X4
18914 + command to enable as many result codes as possible, so that Kermit can
18915 + react appropriately to different failure reasons. One of the result
18916 + codes that X4 enables is "NO DIALTONE". A perhaps not obvious side
18917 + effect of enabling this result code that the modem must hear dialtone
18918 + before it will dial.
18920 + It is becoming increasingly necessary to force a modem to dial even
18921 + though it does not hear a dialtone on the phone line; for example,
18922 + with PBXs that have strange dialtones, or with phone systems in
18923 + different countries, or with ISDN phones, etc. This is called "blind
18926 + C-Kermit 7.0 has two new commands to cope with this situation:
18928 + SET DIAL IGNORE-DIALTONE { ON, OFF }
18929 + OFF (the default) means to tell the modem to wait for dialtone
18930 + before dialing. ON means to enable "blind dialing", i.e. tell
18931 + the modem NOT to wait for dialtone before dialing. Generally
18932 + this is accomplished by sending ATX3 to the modem just prior to
18933 + dialing. SET MODEM TYPE xxx and then SHOW MODEM displays
18934 + Kermit's built-in "ignore dialtone" command.
18936 + SET DIAL COMMAND IGNORE-DIALTONE text
18937 + This lets you change the built-in ignore-dialtone command (such
18938 + as ATX3) to whatever you choose, in case the built-in one does
18939 + not work, or another command works better.
18942 + 1. The ignore-dialtone command is not sent unless SET DIAL
18943 + IGNORE-DIALTONE is ON.
18944 + 2. The ATX3 command generally disables not only NO DIALTONE, but also
18945 + BUSY. So this will prevent Kermit from detecting when the line is
18946 + busy. This is a property of the modem, not of Kermit.
18947 + _________________________________________________________________
18949 + 2.1.7. Trimming the Dialing Dialog
18953 + SET MODEM COMMAND action [ command ]
18955 + is used to override Kermit's built-in modem commands for each action,
18956 + for each kind of modem in its internal database. If you include a
18957 + command, this is used instead of the built-in one. If you omit the
18958 + command, this restores the original built-in command.
18960 + If you want to omit the command altogether, so Kermit doesn't send the
18961 + command at all, or wait for a response, use:
18963 + SET MODEM COMMAND action {}
18965 + That is, specify a pair of empty braces as the command, for example:
18967 + SET MODEM COMMAND ERROR-CORRECTION ON {}
18968 + _________________________________________________________________
18970 + 2.1.8. Controlling the Dialing Speed
18972 + The rate at which characters are sent to the modem during dialing is
18973 + normally controlled by the built-in modem database. You might want to
18974 + override this if Kermit seems to be dialing too slowly, or it is
18975 + sending characters to the modem faster than the modem handle them. A
18976 + new command was added for this in C-Kermit 7.0:
18978 + SET DIAL PACING number
18979 + Specifies the number of milliseconds (thousandths of seconds)
18980 + to pause between each character when sending commands to the
18981 + modem during DIAL or ANSWER command execution. 0 means no pause
18982 + at all, -1 (the default) or any other negative number means to
18983 + use the value from the database. Any number greater than 0 is
18984 + the number of milliseconds to pause.
18986 + HINT: You might also need to control the rate at which the modem
18987 + generates Touch Tones during dialing, for example when sending a
18988 + numeric page. There are two ways to do this. One way is to insert
18989 + pause characters into the dialing string. For modems that use the AT
18990 + command set, the pause character is comma (,) and causes a 2-second
18991 + pause. On most modems, you can use the S8 register to change the pause
18992 + interval caused by comma in the dialing string. The other way is to
18993 + set your modem's tone generation interval, if it has a command for
18994 + that. Most AT-command-set modems use S11 for this; the value is in
18995 + milliseconds. For example on USR modems:
18999 + selects an interval of 200 milliseconds to separate each dialing tone.
19001 + Hint: To add S-Register settings or other commands to your dialing
19002 + procedure, use the new SET MODEM COMMAND PREDIAL-INIT command
19003 + ([388]Section 2.2.2).
19004 + _________________________________________________________________
19006 + 2.1.9. Pretesting Phone Number Conversions
19008 + The LOOKUP command now accepts telephone numbers as well as
19009 + directory-entry names, for example:
19011 + LOOKUP +1 (212) 7654321
19013 + When given a phone number, LOOKUP prints the result of converting the
19014 + phone number for dialing under the current dialing rules. For example,
19015 + if my country code is 1 and my area code is 212, and I am dialing out
19016 + from a PBX whose outside-line prefix is "93,":
19018 + C-Kermit> lookup +1 (212) 7654321
19019 + +1 (212) 7654321 => 93,7654321
19022 + You can also use the \fdialconvert(phone-number) function
19023 + ([389]Section 2.1.11) to do this programmatically:
19025 + C-Kermit> echo "\fdialconvert(+1 (212) 7654321)"
19029 + So the new LOOKUP behaves as follows:
19031 + LOOKUP portable-format-phone-number
19032 + Displays how the number would actually be dialed Sets FAILURE
19033 + if there was a conversion error, otherwise SUCCESS.
19035 + LOOKUP literal-format-phone-number
19036 + Displays the same literal-format-phone-number Always sets
19039 + LOOKUP dialing-directory-name
19040 + Displays all matching entries and converts portable phone
19041 + numbers. Sets SUCCESS if at least one entry was found,
19042 + otherwise FAILURE.
19045 + Displays "=anything" and sets SUCCESS.
19047 + There is, at present, no programmatic way to fetch numbers from the
19048 + dialing directory. This will be considered for a future release.
19049 + _________________________________________________________________
19051 + 2.1.10. Greater Control over Partial Dialing
19053 + The following rules now apply to partial dialing:
19055 + * Phone number transformations based on country and area code,
19056 + application of prefixes, etc, are performed only on the first
19058 + * Each PDIAL argument is looked up in the dialing directory, so it
19059 + is possible have directory entries for pieces of phone numbers or
19060 + other information.
19061 + * Suffixes are not applied automatically, since there is no way for
19062 + C-Kermit to know in which PDIAL segment you want them to be
19065 + However, the suffix that *would* have been applied, based on the
19066 + dialing rules that were invoked when processing the first PDIAL
19067 + command, is stored in the variable:
19071 + which you can include in any subsequent PDIAL or DIAL commands.
19075 + pdial {\m(my_long_distance_pager_number_part_1)}
19076 + pdial {\m(my_long_distance_pager_number_part_2)}
19077 + pdial {\v(dialsuffix)}
19078 + pdial {\m(my_long_distance_pager_number_part_3)}
19079 + pdial {@\m(numeric_pager_code)#}
19080 + _________________________________________________________________
19082 + 2.1.11. New DIAL-related Variables and Functions
19085 + s is a phone number in either literal or portable format (not a
19086 + dialing directory entry name). The function returns the dial
19087 + string that would actually be used by the DIAL command when
19088 + dialing from the current location, after processing country
19089 + code, area code, and other SET DIAL values, and should be the
19090 + same as the result of LOOKUP when given a telephone number.
19093 + Contains the suffix, if any, that was applied in the most
19094 + recent DIAL command, or the suffix that would have been applied
19095 + in the most recent PDIAL command. Use this variable to send the
19096 + dial suffix at any desired point in a PDIAL sequence.
19099 + A number indicating the type of call that was most recently
19100 + placed. Can be used after a normal DIAL command, or after the
19101 + first PDIAL command in a PDIAL sequence. Values are:
19103 + -2: Unknown because TAPI handled the phone number translation.
19104 + -1: Unknown because some kind of error occured.
19105 + 0: Internal within PBX.
19107 + 2: Local within calling area.
19108 + 3: Unknown (e.g. because a literal-format phone number was given).
19109 + 4: Long distance within country.
19113 + The current value of the DIAL retry counter, for use in a DIAL
19114 + macro ([390]Section 2.1.13).
19117 + PBX Exchange (see [391]Section 2.1.12).
19119 + Other dial-related variables, already documented in [392]Using
19120 + C-Kermit (or other sections of this document, e.g. [393]Section
19121 + 2.1.1), include \v(dialnumber), \v(dialstatus), etc. A convenient way
19122 + to display all of them is:
19124 + show variable dial ; hint: abbreviate "sho var dial"
19126 + This shows the values of all the variables whose names start with
19127 + "dial". Also "show variable d$" (to show the \v(d$...) variables).
19128 + _________________________________________________________________
19130 + 2.1.12. Increased Flexibility of PBX Dialing
19132 + Refer to [394]Using C-Kermit, 2nd Edition, pages 107-108. Recall that
19133 + three commands are needed to configure C-Kermit for dialing from a
19136 + SET DIAL PBX-EXCHANGE number
19137 + SET DIAL PBX-INSIDE-PREFIX number
19138 + SET DIAL PBX-OUTSIDE-PREFIX number
19140 + Unfortunately, this model does not accommodate PBXs that have more
19141 + than one exchange. For example our PBX at Columbia University (which
19142 + must handle more than 10,000 phones) has 853-xxxx and 854-xxxx
19145 + Beginning in C-Kermit 7.0, the SET DIAL PBX-EXCHANGE command accepts a
19146 + list of exchanges, e.g.:
19148 + SET DIAL PBX-EXCHANGE 853 854
19150 + (multiple exchanges are separated by spaces, not commas).
19152 + So now when dialing a portable-format number that has the same country
19153 + and area codes as those of your dialing location, C-Kermit compares
19154 + the exchange of the dialed number with each number in the PBX Exchange
19155 + list (rather than with a single PBX Exchange number, as it did
19156 + formerly) to determine whether this is an internal PBX number or an
19157 + external call. If it is an external call, then the PBX Outside Prefix
19158 + is applied, and then the normal dialing rules for local or
19159 + long-distance calls.
19161 + If it is an inside call, the exchange is replaced by the PBX Inside
19162 + Prefix. But if the PBX has more than one exchange, a single fixed PBX
19163 + Inside Prefix is probably not sufficient. For example, at Columbia
19164 + University, we must dial 3-xxxx for an internal call to 853-xxxx, but
19165 + 4-xxxx for a call to 854-xxxx. That is, the inside prefix is the final
19166 + digit of the exchange we are dialing. For this reason, C-Kermit 7.0
19167 + provides a method to determine the inside prefix dynamically at
19168 + dialing time, consisting of a new variable and new syntax for the SET
19169 + DIAL PBX-INSIDE-PREFIX command:
19172 + This variable contains the exchange that was matched when a PBX
19173 + internal call was detected. For example, if the PBX exchange
19174 + list is "853 854" and a call is placed to +1 (212) 854-9999,
19175 + \v(d$px) is set to 854.
19177 + SET DIAL PBX-INSIDE-PREFIX \fxxx(...)
19178 + If the PBX Inside Prefix is defined to be a function, its
19179 + evaluation is deferred until dialing time. Normally, this would
19180 + be a string function having \v(d$px) as an operand. Of course,
19181 + you can still specify a constant string, as before.
19183 + So given the following setup:
19185 + SET DIAL COUNTRY-CODE 1
19186 + SET DIAL AREA-CODE 212
19187 + SET DIAL PBX-OUTSIDE-PREFIX 93,
19188 + SET DIAL PBX-EXCHANGE 853 854
19189 + SET DIAL PBX-INSIDE-PREFIX \fright(\v(d$px),1)
19191 + The following numbers give the results indicated:
19194 + +1 (212) 854-9876 4-9876
19195 + +1 (212) 853-1234 3-1234
19196 + +1 (212) 765-4321 93,765-4321
19197 + +1 (333) 765-4321 93,1333765-4321
19199 + Furthermore, the K_PBX_XCH environment variable may now be set to a
19200 + list of exchanges to automatically initialize C-Kermit's PBX exchange
19201 + list, for example (in UNIX ksh or bash):
19203 + export K_PBX_XCH="853 854"
19205 + (Quotes required because of the space.) Of course, this variable can
19206 + also be set to a single exchange, as before:
19208 + export K_PBX_XCH=853
19209 + _________________________________________________________________
19211 + 2.1.13. The DIAL macro - Last-Minute Phone Number Conversions
19213 + After a DIAL or LOOKUP command is given, a list of phone numbers is
19214 + assembled from the dialing directory (if any), with all
19215 + location-dependent conversion rules applied as described in Chapter 5
19216 + of [395]Using C-Kermit.
19218 + However, additional conversions might still be required at the last
19219 + minute based on local or ephemeral conditions. So that you can have
19220 + the final word on the exact format of the dial string, C-Kermit 7.0
19221 + lets you pass the converted string through a macro of your own design
19222 + for final processing before dialing. The relevant command is:
19224 + SET DIAL MACRO [ name ]
19225 + Specifies the name of a macro to be run on each phone number
19226 + after all built-in conversions have been applied, just before
19227 + the number is dialed. If no name is given, no macro is run. The
19228 + phone number, as it would have been dialed if there were no
19229 + dial macro, is passed to the macro.
19231 + The dial macro can do anything at all (except start a file transfer).
19232 + However, the normal use for the macro would be to modify the phone
19233 + number. For this reason the phone number is passed to the macro as
19234 + argument number 1 (\%1). To cause a modified number to be dialed, the
19235 + macro should terminate with a RETURN statement specifying a return
19236 + value. To leave the number alone, the macro should simply end.
19239 + define xxx return 10108889999$\%1
19240 + set dial macro xxx
19243 + This defines a DIAL MACRO called xxx, which puts an access code on the
19244 + front of the number. Another example might be:
19246 + def xxx if equal "\v(modem)" "hayes-1200" return \freplace(\%1,$,{,,,,,})
19247 + set dial macro xxx
19250 + which replaces any dollar-sign in the dial string by a series of five
19251 + commas, e.g. because this particular modem does not support the "wait
19252 + for bong" feature (remember that commas that are to be included
19253 + literally in function arguments must be enclosed in braces to
19254 + distinguish them from the commas that separate the arguments) and when
19255 + the IF condition is not satisfied, the macro does not return a value,
19256 + and so the number is not modified. Then when a DIAL command is given
19257 + referencing a dialing directory entry, "xyzcorp". The macro is
19258 + automatically applied to each matching number.
19260 + Numerous dial-, modem-, communications-, and time-related variables
19261 + are available for decision making your dial macro. Type SHOW VARIABLES
19262 + for a list. Of particular interest is the \v(dialcount) variable,
19263 + which tells how many times the DIAL command gone through its retry
19264 + loop: 1 on the first try, 2 on the second, 3 on the third, and so on,
19265 + and the \v(dialresult) and \v(dialstatus) variables.
19267 + Here are some other applications for the DIAL MACRO (from users):
19269 + * Phone numbers in the dialing directory are formatted with '-' for
19270 + readability, but some modems don't like the hyphens, so the DIAL
19271 + macro is used to remove them before dialing; e.g
19272 + 0090-123-456-78-99 becomes 00901234567899: "def xxx return
19273 + \freplace(\%1,-)".
19274 + * To set some specific modem (or other) options depending on the
19275 + called customer or telephone number.
19276 + * Choosing the most appropriate provider based on (e.g.) time of
19277 + day, or cycling through a list of providers in case some providers
19280 + To illustrate the final item, suppose you have a choice among many
19281 + phone service providers; the provider is chosen by dialing an access
19282 + code before the number. Different providers might be better (e.g.
19283 + cheaper) for certain times of day or days of the week, or for dialing
19284 + certain locations; you can use the DIAL macro to add the access for
19285 + the most desirable provider.
19287 + Similarly, when the same number might be reached through multiple
19288 + providers, it's possible that one provider might not be able to
19289 + complete the call, but another one can. In that case, you can use the
19290 + DIAL macro to switch providers each time through the DIAL loop --
19291 + that's where the \v(dialcount) variable comes in handy.
19293 + The following command can be used to debug the DIAL macro:
19295 + SET DIAL TEST { ON, OFF }
19296 + Normally OFF, so the DIAL command actually dials. When ON, the
19297 + DIAL command performs all lookups and number conversions, and
19298 + then goes through the number list and retry loop, but instead
19299 + of actually dialing, lists the numbers it would have called if
19300 + none of the DIAL attempts succeeded (or more precisely, every
19301 + number was always busy).
19302 + _________________________________________________________________
19304 + 2.1.14. Automatic Tone/Pulse Dialing Selection
19306 + SET DIAL METHOD { AUTO, DEFAULT, PULSE, TONE }
19307 + Chooses the dialing method for subsequent calls.
19309 + Prior to version 7.0, C-Kermit's DIAL METHOD was DEFAULT by default,
19310 + meaning it does not specify a dialing method to the modem, but relies
19311 + on the modem to have an appropriate default dialing method set. So,
19312 + for example, when using Hayes compatible modems, the dial string would
19313 + be something like ATD7654321, rather than ATDT7654321 or ATDP7654321.
19315 + In C-Kermit 7.0 and K95 1.1.19, the dial method can be set from the
19316 + environment variable:
19320 + when Kermit starts. The values can be TONE, PULSE, or DEFAULT, e.g.
19323 + set K_DIAL_METHOD=TONE; export K_DIAL_METHOD
19325 + In the absence of a K_DIAL_METHOD definition, the new default SET DIAL
19326 + METHOD is AUTO rather than DEFAULT. When DIAL METHOD is AUTO and the
19327 + local country code is known, then if tone dialing is universally
19328 + available in the corresponding area, tone dialing is used; if dialing
19329 + from a location where pulse dialing is mandatory, pulse dialing is
19332 + The "tone country" and "pulse country" lists are preloaded according
19333 + to our knowledge at the time of release. You can see their contents in
19334 + the SHOW DIAL listing. You can change the lists with:
19336 + SET DIAL TONE-COUNTRIES [ cc [ cc [ ... ] ] ]
19337 + Replaces the current TONE-COUNTRIES list with the one given.
19338 + Each cc is a country code; separate them with spaces (not
19339 + commas). Example:
19341 + set dial tone-countries 1 358 44 46 49
19343 + If no country codes are given, the current list, if any, is
19344 + removed, in which case SET DIAL METHOD AUTO is equivalent to
19345 + SET DIAL METHOD DEFAULT.
19347 + SET DIAL PULSE-COUNTRIES [ cc [ cc [ ... ] ] ]
19348 + Replaces the current PULSE-COUNTRIES list with the one give.
19349 + Syntax and operation is like SET DIAL TONE-COUNTRIES.
19351 + If the same country code appears in both lists, Pulse takes
19354 + The SET DIAL TONE- and PULSE-COUNTRIES commands perform no
19355 + verification whatsoever on the cc's, since almost any syntax might be
19356 + legal in some settings. Furthermore, there is no facility to edit the
19357 + lists; you can only replace the whole list. However, since the only
19358 + purpose of these lists is to establish a basis for picking tone or
19359 + pulse dialing automatically, all you need to override the effect of
19360 + the list is to set a specific dialing method with SET DIAL METHOD TONE
19361 + or SET DIAL METHOD PULSE.
19362 + _________________________________________________________________
19364 + 2.1.15. Dial-Modifier Variables
19366 + As of C-Kermit 7.0, dial modifiers are available in the following
19369 + \v(dm_lp) Long pause
19370 + \v(dm_sp) Short pause
19371 + \v(dm_pd) Pulse dial
19372 + \v(dm_td) Tone dial
19373 + \v(dm_wa) Wait for answer
19374 + \v(dm_wd) Wait for dialtone
19375 + \v(dm_rc) Return to command mode
19377 + You can use these in your dial strings in place of hardwired modifiers
19378 + like "@", ",", etc, for increased portability of scripts. Example:
19380 + C-Kermit>set modem type usrobotics
19381 + C-Kermit>sho variables dm
19390 + _________________________________________________________________
19392 + 2.1.16. Giving Multiple Numbers to the DIAL Command
19394 + Prior to C-Kermit 7.0, the only way to give a DIAL command a list of
19395 + phone numbers to try until one answers was to create a dialing
19396 + directory that had multiple entries under the same name, and then use
19397 + that entry name in the DIAL command. Now a list of numbers can be
19398 + given to the DIAL command directly in the following format:
19400 + dial {{number1}{number2}{number3}...}
19402 + This is the same list format used by SEND /EXCEPT: and other commands
19403 + that allow a list where normally a single item is given. Restrictions
19404 + on this form of the DIAL command are:
19406 + * The first two braces must be adjacent; spacing is optional
19408 + * Each number must be an actual number to dial, not a dialing
19410 + * Dialing directory entries may not contain number lists in this
19413 + In all other respects, the numbers are treated as if they had been
19414 + fetched from the dialing directory; they can be in literal or portable
19415 + format, etc. Example:
19417 + dial {{7654321} {+1 (212) 5551212} { 1-212-5556789 }}
19419 + The list can be any length at all, within reason.
19421 + This feature is especially handy for use with the K95 Dialer, allowing
19422 + a list of phone numbers to be specified in the Telephone Number box
19423 + without having to set up or reference a separate dialing directory.
19425 + You can also use it to add commonly-dialed sequences as variables in
19426 + your C-Kermit customization file, e.g.:
19428 + define work {{7654321}{7654322}{7654323}}
19434 + (the variable name must be enclosed in braces).
19438 + define work dial {{7654321}{7654322}{7654323}}
19443 + _________________________________________________________________
19447 + 2.2.1. New Modem Types
19449 + Since C-Kermit 6.0:
19451 + atlas-newcom-33600ifxC Atlas/Newcom 33600
19452 + att-keepintouch AT&T KeepinTouch PCMCIA V.32bis Card Modem
19453 + att-1900-stu-iii AT&T Secure Data STU-III Model 1900
19454 + att-1910-stu-iii AT&T Secure Data STU-III Model 1910
19455 + bestdata Best Data
19456 + cardinal Cardinal V.34 MVP288X series.
19457 + compaq Compaq Data+Fax (e.g. in Presario)
19458 + fujitsu Fujitsu Fax/Modem Adapter
19459 + generic-high-speed Any modern error-correcting data-compressing modem
19460 + itu-t-v25ter/v250 ITU-T (CCITT) V.25ter (V.250) standard command set
19461 + megahertz-att-v34 Megahertz AT&T V.34
19462 + megahertz-xjack Megahertz X-Jack
19463 + motorola-codex Motorola Codex 326X Series
19464 + motorola-montana Motorola Montana
19465 + mt5634zpx Multitech MT5634ZPX
19466 + rockwell-v90 Rockwell V.90 56K
19467 + rolm-244pc Siemens/Rolm 244PC (AT command set)
19468 + rolm-600-series Siemens/Rolm 600 Series (AT command set)
19469 + spirit-ii QuickComm Spirit II
19470 + suprasonic SupraSonic V288+
19471 + supra-express-v90 Supra Express V.90
19473 + One of the new types, "generic-high-speed" needs a bit of explanation.
19474 + This type was added to easily handle other types that are not
19475 + explicitly covered, without going through the bother of adding a
19476 + complete user-defined modem type. This one works for modern modems
19477 + that use the AT command set, on the assumption that all the default
19478 + ("factory") settings of the modem (a) are appropriate for Kermit, (b)
19479 + include error correction, data compression, and speed buffering; and
19480 + (c) are recallable with the command AT&F.
19482 + If the command to recall your modem's profile is not AT&F, use the SET
19483 + MODEM COMMAND INIT-STRING command to specify the appropriate modem
19484 + command. The default init-string is AT&F\13 (that is, AT, ampersand,
19485 + F, and then carriage return); a survey of about 20 modern modem types
19486 + shows they all support this, but they might mean different things by
19487 + it. For example, the USR Sportster or Courier needs AT&F1 (not AT&F,
19488 + which is equivalent to AT&F0, which recalls an inappropriate profile),
19489 + so for USR modems:
19491 + set modem type generic-high-speed
19492 + set modem command init AT&F1\13
19494 + Of course, USR modems already have their own built-in modem type. But
19495 + if you use this one instead, it will dial faster because it has fewer
19496 + commands to give to the modem; in that sense "&F1" is like a macro
19497 + that bundles numerous commands into a single one. See your modem
19498 + manual for details about factory profiles and commands to recall them.
19500 + WARNING: Do not use the generic-high-speed modem type in operating
19501 + systems like VMS where hardware flow control is not available, at
19502 + least not unless you change the init string from AT&F\13 to something
19503 + else that enables local Xon/Xoff or other appropriate type of flow
19506 + Also see [396]Section 2.1.7 for additional hints about making dialing
19508 + _________________________________________________________________
19510 + 2.2.2. New Modem Controls
19512 + SET MODEM CAPABILITIES list
19513 + In C-Kermit 7.0, this command automatically turns MODEM
19514 + SPEED-MATCHING OFF if SB (Speed Buffering) is in the list, and
19515 + turns it ON if SB is absent.
19517 + SET MODEM COMMAND PREDIAL-INIT [ text ]
19518 + Commands to be sent to the modem just prior to dialing.
19521 + SET MODEM SPEAKER { ON, OFF }
19522 + Determines whether modem speaker is on or off while call is
19523 + being placed. ON by default. Note: This command does not
19524 + provide fine-grained control over when the speaker is on or
19525 + off. Normally, ON means while the call is being placed, until
19526 + the point at which carrier is successfully established. If your
19527 + modem has a different speaker option that you want to choose,
19528 + then use the SET MODEM COMMAND SPEAKER ON text command to
19529 + specify this option.
19531 + SET MODEM COMMAND SPEAKER { ON, OFF } [ text ]
19532 + Specify or override the commands to turn your modem's speaker
19535 + SET MODEM VOLUME { LOW, MEDIUM, HIGH }
19536 + When MODEM SPEAKER is on, select volume. Note: In some modems,
19537 + especially internal ones, these commands have no effect; this
19538 + is a limitation of the particular modem, not of Kermit.
19540 + SET MODEM COMMAND VOLUME { LOW, MEDIUM, HIGH } [ text ]
19541 + Specify or override the commands to set your modem's speaker
19544 + SET MODEM COMMAND IGNORE-DIALTONE [ text ]
19545 + The command to enable blind dialing ([397]Section 2.1.6).
19547 + SET MODEM ESCAPE-CHARACTER code
19548 + Has been augmented to allow codes of 0 or less: < 0 means the
19549 + escape mechanism is disabled. = 0 means to use (restore) the
19550 + default value from the modem database. > 0 and < 128 is a
19551 + literal value to be used instead of the default one. > 127
19552 + means the escape mechanism is disabled. This affects "modem
19553 + hangup". When the escape mechanism is disabled, but SET MODEM
19554 + HANGUP-METHOD is MODEM-COMMAND, it sends the hangup command
19555 + immediately, without the <pause>+++<pause> business first. This
19556 + is useful (for example) when sending lots of numeric pages, a
19557 + process in which never we go online, and so never need to
19558 + escape back. Eliminating the unnecessary pauses and escape
19559 + sequence allows a lot more pages to be sent per unit time.
19561 + Recall that C-Kermit can dial modems to which it is connected via
19562 + TCP/IP (Telnet or Rlogin) as described on page 126 of [398]Using
19563 + C-Kermit, 2nd Ed. In this case the MODEM HANGUP-METHOD should be
19564 + MODEM-COMMAND, since RS-232 signals don't work over TCP/IP
19565 + connections. As noted in the manual, such connections are set up by
19566 + the following sequence:
19568 + set host host [ port ]
19569 + set modem type name
19572 + But this can cause complications when you use Kermit to switch between
19573 + serial and TCP/IP connections. In the following sequence:
19576 + set modem type name
19579 + the first two commands obey the rules for dialing out over Telnet.
19580 + However, the SET PORT command requires that Kermit close its current
19581 + (Telnet) connection before it can open the serial port (since Kermit
19582 + can only have one connection open at a time). But since a modem type
19583 + was set after the "set host" command was given, Kermit assumes it is a
19584 + Telnet dialout connection and so sends the modem's hangup sequence is
19585 + sent to the Telnet host. To avoid this, close the network connection
19586 + explicitly before opening the serial one:
19590 + set modem type name
19592 + _________________________________________________________________
19594 + 2.3. TELNET and RLOGIN
19596 + For additional background, please also read the [399]TELNET.TXT file,
19597 + also available on the Web in [400]HTML format.
19601 + * If making a Telnet connection with C-Kermit takes a very long
19602 + time, like over a minute, whereas the system Telnet program makes
19603 + the same connection immediately, try including the /NOWAIT switch:
19604 + C-Kermit> telnet /nowait hostname
19605 + See [401]TELNET.TXT or [402]TELNET.HTM for details. If it also
19606 + takes a very long time to make a Telnet connection with system
19607 + Telnet, then the delay is most likely caused by reverse DNS
19608 + lookups when your host is not properly registered in DNS.
19609 + * When supplying numeric IP addresses to C-Kermit or to any other
19610 + application (regular Telnet, Rlogin, etc), do not include leading
19611 + 0's in any fields unless you intend for those fields to be
19612 + interpreted as octal (or hex) numbers. The description of the
19613 + Internet address interpreter (the sockets library inet_addr()
19614 + routine) includes these words:
19616 + All numbers supplied as "parts" in a "." notation may be decimal,
19617 + octal, or hexadecimal, as specified in the C language (that is, a
19618 + leading 0x or 0X implies hexadecimal; otherwise, a leading 0
19619 + implies octal; otherwise, the number is interpreted as decimal).
19620 + To illustrate, 128.59.39.2 and 128.059.039.002 are not the same
19621 + host! Even though most of the fields contain non-octal digits.
19622 + Using system Telnet (not Kermit):
19623 + $ telnet 128.059.039.002
19624 + Trying 128.49.33.2 ...
19625 + Of course the same thing happens with Kermit because it uses (as
19626 + it must) the same system service for resolving network addresses
19627 + that Telnet, FTP, and all other TCP/IP applications use.
19628 + * The RLOGIN section on page 123 does not make it clear that you can
19629 + use the SET TELNET TERMINAL-TYPE command to govern the terminal
19630 + type that is reported by C-Kermit to the RLOGIN server.
19631 + * Note that the SET TCP commands described on pages 122-123 might be
19632 + absent; some platforms that support TCP/IP do not support these
19633 + particular controls.
19637 + TELOPT { AO, AYT, BREAK, CANCEL, EC, EL, EOF, EOR, GA, IP, DMARK,
19638 + DO, DONT, NOP, SB, SE, SUSP, WILL, WONT }
19639 + This command was available previously, but supported only DO,
19640 + DONT, WILL, and WONT. Now it lets you send all the Telnet
19641 + protocol commands. Note that certain commands do not require a
19642 + response, and therefore can be used as nondestructive "probes"
19643 + to see if the Telnet session is still open; e.g.:
19645 + set host xyzcorp.com
19648 + if fail stop 1 Connection lost
19650 + SET TCP ADDRESS [ ip-address ]
19651 + Specifies the IP address of the computer that C-Kermit is
19652 + running on. Normally this is not necessary. The exception would
19653 + be if your machine has multiple network adapters (physical or
19654 + virtual) with a different address for each adapter AND you want
19655 + C-Kermit to use a specific address when making outgoing
19656 + connections or accepting incoming connections.
19658 + SET TCP DNS-SERVICE-RECORDS { ON, OFF }
19659 + Tells C-Kermit whether to try to use DNS SRV records to
19660 + determine the host and port number upon which to find an
19661 + advertised service. For example, if a host wants regular Telnet
19662 + connections redirected to some port other than 23, this feature
19663 + allows C-Kermit to ask the host which port it should use. Since
19664 + not all domain servers are set up to answer such requests, this
19665 + feature is OFF by default.
19667 + SET TCP REVERSE-DNS-LOOKUP { ON, OFF, AUTO }
19668 + Tells Kermit whether to perform a reverse DNS lookup on TCP/IP
19669 + connections. This allows Kermit to determine the actual
19670 + hostname of the host it is connected to, which is useful for
19671 + connections to host pools, and is required for Kerberos
19672 + connections to host pools and for incoming connections. If the
19673 + other host does not have a DNS entry, the reverse lookup could
19674 + take a long time (minutes) to fail, but the connection will
19675 + still be made. Turn this option OFF for speedier connections if
19676 + you do not need to know exactly which host you are connected to
19677 + and you are not using Kerberos. AUTO, the default, means the
19678 + lookup is done on hostnames, but not on numeric IP addresses.
19680 + SET TELNET WAIT-FOR-NEGOTIATIONS { ON, OFF }
19681 + Each Telnet option must be fully negotiated either On or Off
19682 + before the session can continue. This is especially true with
19683 + options that require sub-negotiations such as Authentication,
19684 + Encryption, and Kermit; for proper support of these options
19685 + Kermit must wait for the negotiations to complete. Of course,
19686 + Kermit has no way of knowing whether a reply is delayed or not
19687 + coming at all, and so will wait a minute or more for required
19688 + replies before continuing the session. If you know that
19689 + Kermit's Telnet partner will not be sending the required
19690 + replies, you can set this option of OFF to avoid the long
19691 + timeouts. Or you can instruct Kermit to REFUSE specific options
19692 + with the SET TELOPT command.
19694 + SET TELOPT [ { /CLIENT, /SERVER } ] option
19695 + { ACCEPTED, REFUSED, REQUESTED, REQUIRED }
19696 + [ { ACCEPTED, REFUSED, REQUESTED, REQUIRED } ]
19697 + SET TELOPT lets you specify policy requirements for Kermit's
19698 + handling of Telnet option negotiations. Setting an option is
19699 + REQUIRED causes Kermit to offer the option to the peer and
19700 + disconnect if the option is refused. REQUESTED causes Kermit to
19701 + offer an option to the peer. ACCEPTED results in no offer but
19702 + Kermit will attempt to negotiate the option if it is requested.
19703 + REFUSED instructs Kermit to refuse the option if it is
19704 + requested by the peer.
19706 + Some options are negotiated in two directions and accept
19707 + separate policies for each direction; the first keyword applies
19708 + to Kermit itself, the second applies to Kermit's Telnet
19709 + partner; if the second keyword is omitted, an appropriate
19710 + (option-specific) default is applied. You can also include a
19711 + /CLIENT or /SERVER switch to indicate whether the given
19712 + policies apply when Kermit is the Telnet client or the Telnet
19713 + server; if no switch is given, the command applies to the
19716 + Note that some of Kermit's Telnet partners fail to refuse
19717 + options that they do not recognize and instead do not respond
19718 + at all. In this case it is possible to use SET TELOPT to
19719 + instruct Kermit to REFUSE the option before connecting to the
19720 + problem host, thus skipping the problematic negotiation.
19722 + Use SHOW TELOPT to view current Telnet Option negotiation
19723 + settings. SHOW TELNET displays current Telnet settings.
19724 + _________________________________________________________________
19728 + If "set host nonexistent-host" was given (and it properly failed),
19729 + followed by certain commands like SEND, the original line and modem
19730 + type were not restored and C-Kermit thought that it still had a
19731 + network hostname; fixed in 7.0.
19733 + 2.3.1. Telnet Binary Mode Bug Adjustments
19735 + SET TELNET BUG BINARY-ME-MEANS-U-TOO { ON, OFF } was added to edit 192
19736 + after the book was printed. Also SET TELNET BUG BINARY-U-MEANS-ME-TOO.
19737 + The default for both is OFF. ON should be used when communicating with
19738 + a Telnet partner (client or server) that mistakenly believes that
19739 + telling C-Kermit to enter Telnet binary mode also means that it, too,
19740 + is in binary mode, contrary to the Telnet specification, which says
19741 + that binary mode must be negotiated in each direction separately.
19743 + 2.3.2. VMS UCX Telnet Port Bug Adjustment
19745 + A new command, SET TCP UCX-PORT-BUG, was added for VMS versions with
19746 + UCX (DEC TCP/IP), applying only to early versions of UCX, like 2.2 or
19747 + earlier. If you try to use VMS C-Kermit to make a Telnet connection
19748 + using a port name (like "telnet", which is used by default), the
19749 + underlying UCX getservbyname() function might return the service
19750 + number with its bytes swapped and the connection will fail. If "telnet
19751 + hostname 23" works, then your version of UCX has this bug and you can
19752 + put "set tcp ucx-port-bug on" in your CKERMIT.INI file to get around
19755 + 2.3.3. Telnet New Environment Option
19757 + The TELNET NEW-ENVIRONMENT option ([403]RFC 1572) is supported as 7.0.
19758 + This option allows the C-Kermit Telnet client to send certain
19759 + well-known variables to the Telnet server, including USER, PRINTER,
19760 + DISPLAY, and several others. This feature is enabled by default in
19761 + Windows and OS/2, disabled by default elsewhere. The command to enable
19762 + and disable it is:
19764 + SET TELNET ENVIRONMENT { ON, OFF }
19766 + When ON, and you Telnet to another computer, you might (or might not)
19767 + notice that the "login:" or "Username:" prompt does not appear --
19768 + that's because your username was sent ahead, in which case the remote
19769 + system might prompt you only for your password (similar to Rlogin).
19770 + Use "set telnet environment off" to defeat this feature, particularly
19771 + in scripts where the dialog must be predictable. You can also use this
19772 + command to specify or override specific well-known environment
19775 + SET TELNET ENVIRONMENT { ACCT,DISPLAY,JOB,PRINTER,SYSTEMTYPE,USER } [ text ]
19777 + 2.3.4. Telnet Location Option
19779 + The TELNET LOCATION option ([404]RFC 779) is supported in 7.0. This
19780 + option allows the C-Kermit Telnet client to send a location string to
19781 + the server if the server indicates its willingness to accept one. If
19782 + an environment variable named LOCATION exists at the time C-Kermit
19783 + starts, its value is used as the location string. If you want to
19786 + SET TELNET LOCATION text
19788 + If you omit the text from this command, the Telnet location feature is
19791 + SET TELNET ENVIRONMENT DISPLAY is used to set the DISPLAY variable
19792 + that is sent to the host, as well as the the XDISPLAY location.
19794 + 2.3.5. Connecting to Raw TCP Sockets
19796 + The SET HOST and TELNET commands now accept an optional switch,
19797 + /RAW-SOCKET, at the end, only if you first give a host and a port.
19800 + set host xyzcorp.com 23 /raw-socket
19801 + set host 128.49.39.2:2000 /raw-socket
19802 + telnet xyzcorp.com 3000 /raw
19804 + Without this switch, C-Kermit behaves as a Telnet client when (a) the
19805 + port is 23 or 1649, or (b) the port is not 513 and the server sent
19806 + what appeared to be Telnet negotiations -- that is, messages starting
19807 + with 0xFF (IAC). With this switch, Kermit should treat all incoming
19808 + bytes as raw data, and will not engage in any Telnet negotiations or
19809 + NVT CRLF manipulations. This allows transparent operation through
19810 + (e.g.) raw TCP ports on Cisco terminal servers, through the 'modemd'
19811 + modem server, etc.
19813 + 2.3.6. Incoming TCP Connections
19815 + Accomplished via SET HOST * port, were introduced in C-Kermit 6.0, but
19816 + for UNIX only. In Version 7.0, they are also available for VMS.
19817 + _________________________________________________________________
19819 + 2.4. The EIGHTBIT Command
19821 + EIGHTBIT is simply a shorthand for: SET PARITY NONE, SET TERMINAL
19822 + BYTESIZE 8, SET COMMAND BYTESIZE 8; that is, a way to set up an 8-bit
19823 + clean connection in a single command.
19824 + _________________________________________________________________
19826 + 2.5. The Services Directory
19828 + Chapter 7 of [405]Using C-Kermit does not mention the ULOGIN macro,
19829 + which is used by our sample services directory, CKERMIT.KND. Unlike
19830 + UNIXLOGIN, VMSLOGIN, etc, this one is for use with systems that
19831 + require a user ID but no password. Therefore it doesn't prompt for a
19832 + password or wait for a password prompt from the remote service.
19834 + In version 7.0, the CALL macro was changed to not execute a SET MODEM
19835 + TYPE command if the given modem type was the same as the current one;
19836 + otherwise the new SET MODEM TYPE command would overwrite any
19837 + customizations that the user had made to the modem settings. Ditto for
19838 + SET LINE / SET PORT and SET SPEED.
19839 + _________________________________________________________________
19841 + 2.6. Closing Connections
19843 + Until version 7.0, there was never an obvious and general way to close
19844 + a connection. If a serial connection was open, it could be closed by
19845 + "set line" or "set port" (giving no device name); if a network
19846 + connection was open, it could be closed by "set host" (no host name).
19848 + In version 7.0, a new command closes the connection in an obvious and
19849 + straightforward way, no matter what the connection type:
19851 + CLOSE [ CONNECTION ]
19853 + The CLOSE command was already present, and required an operand such as
19854 + DEBUG-LOG, WRITE-FILE, etc, and so could never be given by itself. The
19855 + new CONNECTION operand is now the default operand for CLOSE, so CLOSE
19856 + by itself closes the connection, if one is open, just as you would
19857 + expect, especially if you are a Telnet or Ftp user.
19859 + Also see the description of the new SET CLOSE-ON-DISCONNECT command in
19860 + [406]Section 2.10.
19861 + _________________________________________________________________
19863 + 2.7. Using C-Kermit with External Communication Programs
19865 + C-Kermit 7.0 includes a new ability to create and conduct sessions
19866 + through other communications programs. Two methods are available:
19868 + 1. Pty (pseudoterminal): The external program is run on a
19869 + "pseudoterminal", which is controlled by Kermit. This method works
19870 + with practically any external program, but it is not portable. At
19871 + this writing, it works only on some (not all) UNIX versions, and
19872 + not on any non-UNIX platforms.
19873 + 2. Pipe: The external program's standard input and output are
19874 + redirected through a "pipe" controlled by Kermit. This method is
19875 + relatively portable -- it should work across all UNIX versions,
19876 + and it also works in Windows and OS/2 -- but it is effective only
19877 + when the external program actually uses standard i/o (and many
19880 + The two methods are started differently but are used the same way
19883 + The purpose of this feature is to let you use C-Kermit services like
19884 + file transfer, character-set translation, scripting, automatic
19885 + dialing, etc, on connections that Kermit can't otherwise make itself.
19887 + This feature is the opposite of the REDIRECT feature, in which
19888 + C-Kermit makes the connection, and redirects an external (local)
19889 + command or program over this connection. In a pty or pipe connection,
19890 + C-Kermit runs and controls a local command or program, which makes the
19891 + connection. (The same method can be used to simply to control a local
19892 + program without making a connection; see [407]Section 2.8.)
19894 + To find out if your version of Kermit includes PTY support, type "show
19895 + features" and look for NETPTY in the alphabetical list of options. For
19896 + pipes, look for NETCMD.
19898 + The commands are:
19900 + SET NETWORK TYPE PTY or SET NETWORK TYPE PIPE
19902 + where command is any interactive command. If the command does
19903 + not use standard i/o, you must use SET NETWORK TYPE PTY.
19907 + * COMMAND is an invisible synonym for PIPE.
19908 + * The command and its arguments are case-sensitive in UNIX.
19910 + The SET NETWORK TYPE, SET HOST sequence sets the given network type
19911 + for all subsequent SET HOST commands until another SET NETWORK TYPE
19912 + command is given to change it.
19914 + You can also use the new /NETWORK-TYPE:PTY or /NETWORK-TYPE:PIPE (or
19915 + simply /PIPE or /PTY) switches on the SET HOST command itself:
19917 + SET HOST /NETWORK-TYPE:PIPE command ; These two are the same
19918 + SET HOST /PIPE command
19920 + SET HOST /NETWORK-TYPE:PTY command ; Ditto
19921 + SET HOST /PTY command
19923 + These are like SET NETWORK TYPE followed by SET HOST, except they
19924 + apply only to the connection being made and do not change the global
19925 + network type setting (see [408]Section 1.5 about the difference
19926 + between switches and SET commands).
19928 + Include any command-line options with the command that might be
19929 + needed, as in this example where C-Kermit uses another copy of itself
19930 + as the communications program:
19932 + SET HOST /PIPE /CONNECT kermit -YQJ xyzcorp.com
19934 + As usual, if you include the /CONNECT switch, SET HOST enters CONNECT
19935 + mode immediately upon successful execution of the given command.
19936 + Therefore new commands are available as a shorthand for SET HOST
19937 + /CONNECT /PTY and /PIPE:
19941 + The PTY and PIPE commands work like the TELNET and RLOGIN
19942 + commands: they set up the connection (in this case, using the
19943 + given command) and then enter CONNECT mode automatically (if
19944 + the PIPE or PTY command is given without a command, it
19945 + continues the current session if one is active; otherwise it
19946 + gives an error message).
19948 + The PIPE command is named after the mechanism by which C-Kermit
19949 + communicates with the command: UNIX pipes. C-Kermit's i/o is "piped"
19950 + through the given command. Here is a typical example:
19952 + PIPE rlogin -8 xyzcorp.com
19954 + This is equivalent to:
19956 + SET HOST /PIPE rlogin -8 xyzcorp.com
19961 + SET HOST /PIPE /CONNECT rlogin -8 xyzcorp.com
19964 + If you are writing a script, do not use the PIPE, PTY, TELNET,
19965 + or RLOGIN command unless you really want C-Kermit to enter
19966 + CONNECT mode at that point. Normally SET HOST is used in
19967 + scripts to allow the login and other dialogs to be controlled
19968 + by the script itself, rather than by an actively participating
19969 + human at the keyboard.
19971 + Throughput of pty and pipe connections is limited by the performance
19972 + of the chosen command or program and by the interprocess communication
19973 + (IPC) method used and/or buffering capacity of the pipe or pty, which
19974 + in turn depends on the underlying operating system.
19976 + In one trial (on SunOS 4.1.3), we observed file transfer rates over an
19977 + rlogin connection proceeding at 200Kcps for downloads, but only 10Kcps
19978 + for uploads on the same connection with the same settings (similar
19979 + disparities were noted in HP-UX). Examination of the logs revealed
19980 + that a write to the pipe could take as long as 5 seconds, whereas
19981 + reads were practically instantaneous. On the other hand, using Telnet
19982 + as the external program rather than rlogin, downloads and uploads were
19983 + better matched at about 177K each.
19985 + Most external communication programs, like C-Kermit itself, have
19986 + escape characters or sequences. Normally these begin with (or consist
19987 + entirely of) a control character. You must be sure that this control
19988 + character is not "unprefixed" when uploading files, otherwise the
19989 + external program will "escape back" to its prompt, or close the
19990 + connection, or take some other unwanted action. When in CONNECT mode,
19991 + observe the program's normal interaction rules. Of course C-Kermit's
19992 + own escape character (normally Ctrl-\) is active too, unless you have
19993 + taken some action to disable it.
19995 + On PTY connections, the underlying PTY driver is not guaranteed to be
19996 + transparent to control characters -- for example, it might expand
19997 + tabs, translate carriage returns, generate signals if it sees an
19998 + interrupt character, and so on. Similar things might happen on a PIPE
19999 + connection. For this reason, if you plan to transfer files over a PTY
20000 + or PIPE connection, tell the file sender to:
20002 + SET PREFIXING ALL
20003 + This causes all control characters to be prefixed and
20004 + transmitted as printable ASCII characters.
20006 + If the external connection program is not 8-bit clean, you should
20010 + This causes 8-bit data to be encoded in 7 bits using single
20011 + and/or locking shifts.
20013 + And if it does not make a reliable connection (such as those made by
20014 + Telnet, Rlogin, Ssh, etc), you should:
20016 + SET STREAMING OFF
20017 + This forces C-Kermit to treat the connection as unreliable and
20018 + to engage in its normal ACK/NAK protocol for error detection
20019 + and correction, rather than "streaming" its packets, as it
20020 + normally does on a network connection ([409]Section 4.20).
20022 + In some cases, buffer sizes might be restricted, so you might also
20023 + need to reduce the Kermit packet length to fit; this is a
20024 + trial-and-error affair. For example, if transfers always fail with
20025 + 4000-byte packets, try 2000. If that fails too, try 1000, and so on.
20026 + The commands are:
20028 + SET RECEIVE PACKET-LENGTH number
20029 + This tells the file receiver to tell the file sender the
20030 + longest packet length it can accept.
20032 + SET SEND PACKET-LENGTH number
20033 + This tells the file sender not to send packets longer than the
20034 + given length, even if the receiver says longer ones are OK. Of
20035 + course, if the receiver's length is shorter, the shorter length
20038 + If none of this seems to help, try falling back to the bare minimum,
20039 + lowest-common-denominator protocol settings:
20042 + No sliding windows, no streaming, no control-character
20043 + unprefixing, packet length 90.
20045 + And then work your way back up by trial and error to get greater
20048 + Note that when starting a PIPE connection, and the connection program
20049 + (such as telnet or rlogin) prints some greeting or information
20050 + messages before starting the connection, these are quite likely to be
20051 + printed with a stairstep effect (linefeed without carriage return).
20052 + This is because the program is not connected with the UNIX terminal
20053 + driver; there's not much Kermit can do about it. Once the connection
20054 + is made, everything should go back to normal. This shouldn't happen on
20055 + a PTY connection because a PTY is, indeed, a terminal.
20057 + On a similar note, some connection programs (like Solaris 2.5 rlogin)
20058 + might print lots of error messages like "ioctl TIOCGETP: invalid
20059 + argument" when used through a pipe. They are annoying but usually
20060 + harmless. If you want to avoid these messages, and your shell allows
20061 + redirection of stderr, you can redirect stderr in your pipe command,
20062 + as in this example where the user's shell is bash:
20064 + PIPE rlogin xyzcorp.com 2> /dev/null
20066 + Or use PTY rather than PIPE, since PTY is available on Solaris.
20067 + _________________________________________________________________
20069 + 2.7.0. C-Kermit over tn3270 and tn5250
20071 + Now you can make a connection from C-Kermit "directly" to an IBM
20072 + mainframe and transfer files with it, assuming it has Kermit-370
20073 + installed. Because tn3270 is neither 8-bit clean nor transparent to
20074 + control characters, you must give these commands:
20076 + SET PREFIXING ALL ; Prefix all control characters
20077 + SET PARITY SPACE ; Telnet connections are usually not 8-bit clean
20081 + SET HOST /PTY /CONNECT tn3270 abccorp.com
20085 + pty tn3270 abccorp.com
20087 + SET HOST /PIPE does not work in this case, at least not for file
20088 + transfer. File transfer does work, however, with SET HOST /PTY,
20089 + provided you use the default packet length of 90 bytes; anything
20090 + longer seems to kill the session.
20092 + You can also make connections to IBM AS/400 computers if you have a
20093 + tn5250 program installed:
20095 + pty tn5250 hostname
20097 + In this case, however, file transfer is probably not in the cards
20098 + since nobody has ever succeeded in writing a Kermit program for the
20103 + if fail end 1 Sorry - no PTY support...
20107 + Similarly for tn5250. Note that CHECK PTY and CHECK PIPE can be used
20108 + in macros and scripts to test whether PTY or PIPE support is
20110 + _________________________________________________________________
20112 + 2.7.1. C-Kermit over Telnet
20114 + Although C-Kermit includes its own Telnet implementation, you might
20115 + need to use an external Telnet program to make certain connections;
20116 + perhaps because it has access or security features not available in
20117 + C-Kermit itself. As noted above, the only precautions necessary are
20120 + SET PREFIXING ALL ; Prefix all control characters
20121 + SET PARITY SPACE ; Telnet connections might not be 8-bit clean
20125 + SET HOST /PTY (or /PIPE) /CONNECT telnet abccorp.com
20127 + or, equivalently:
20129 + PTY (or PIPE) telnet abccorp.com
20130 + _________________________________________________________________
20132 + 2.7.2. C-Kermit over Rlogin
20134 + C-Kermit includes its own Rlogin client, but this can normally be used
20135 + only if you are root, since the rlogin TCP port is privileged. But
20136 + ptys and pipes let you make rlogin connections with C-Kermit through
20137 + your computer's external rlogin program, which is normally installed
20138 + as a privileged program:
20140 + SET PREFIXING ALL
20144 + SET HOST /PTY (or /PIPE) /CONNECT rlogin -8 abccorp.com
20146 + or, equivalently:
20148 + PTY (or PIPE) rlogin -8 abccorp.com
20150 + The "-8" option to rlogin enables transmission of 8-bit data. If this
20151 + is not available, then include SET PARITY SPACE if you intend to
20154 + Note that the normal escape sequence for rlogin is Carriage Return
20155 + followed by Tilde (~), but only when the tilde is followed by certain
20156 + other characters; the exact behavior depends on your rlogin client, so
20157 + read its documentation.
20158 + _________________________________________________________________
20160 + 2.7.3. C-Kermit over Serial Communication Programs
20162 + Ptys and pipes also let you use programs that make serial connections,
20163 + such as cu or tip. For example, C-Kermit can be used through cu to
20164 + make connections that otherwise might not be allowed, e.g. because
20165 + C-Kermit is not installed with the required write permissions to the
20166 + dialout device and the UUCP lockfile directory.
20168 + Suppose your UUCP Devices file contains an entry for a serial device
20169 + tty04 to be used for direct connections, but this device is protected
20170 + against you (and Kermit when you run it). In this case you can:
20172 + SET CONTROL PREFIX ALL
20173 + PTY (or PIPE) cu -l tty04
20175 + (Similarly for dialout devices, except then you also need to include
20176 + the phone number in the "cu" command.)
20178 + As with other communication programs, watch out for cu's escape
20179 + sequence, which is the same as the rlogin program's: Carriage Return
20180 + followed by Tilde (followed by another character to specify an action,
20181 + like "." for closing the connection and exiting from cu).
20182 + _________________________________________________________________
20184 + 2.7.4. C-Kermit over Secure Network Clients
20186 + DISCLAIMER: There are laws in the USA and other countries regarding
20187 + use, import, and/or export of encryption and/or decryption or other
20188 + forms of security software, algorithms, technology, and
20189 + intellectual property. The Kermit Project attempts to follow all
20190 + known statutes, and neither intends nor suggests that Kermit
20191 + software can or should be used in any way, in any location, that
20192 + circumvents any regulations, laws, treaties, covenants, or other
20193 + legitimate canons or instruments of law, international relations,
20194 + trade, ethics, or propriety.
20196 + For secure connections or connections through firewalls, C-Kermit 7.0
20197 + can be a Kerberos, SRP, and/or SOCKS client when built with the
20198 + appropriate options and libraries. But other application-level
20199 + security acronyms and methods -- SSH, SSL, SRP, TLS -- pop up at an
20200 + alarming rate and are (a) impossible to keep up with, (b) usually
20201 + mutually incompatible, and (c) have restrictions on export or
20202 + redistribution and so cannot be included in C-Kermit itself.
20204 + However, if you have a secure text-based Telnet (or other) client that
20205 + employs one of these security methods, you can use C-Kermit "through"
20206 + it via a pty or pipe.
20207 + _________________________________________________________________
20211 + C-Kermit does not and can not incorporate SSH due to licensing,
20212 + patent, and USA export law restrictions.
20214 + The UNIX SSH client does not use standard input/output, and therefore
20215 + can be used only by Kermit's PTY interface, if one is present. The
20216 + cautions about file transfer, etc, are the same as for Rlogin.
20219 + SET PREFIXING ALL
20220 + PTY ssh XYZCORP.COM
20222 + Or, for a scripted session:
20224 + SET PREFIXING ALL
20225 + SET HOST /PTY ssh XYZCORP.COM
20231 + if fail end 1 Sorry - no PTY support...
20234 + _________________________________________________________________
20238 + Secure Sockets Layer (SSL) is another TCP/IP security overlay, this
20239 + one designed by and for Netscape. An SSL Telnet client is available
20240 + for UNIX from the University of Queensland. More info at:
20242 + [410]http://www.psy.uq.oz.au/~ftp/Crypto/
20244 + Interoperability with C-Kermit is unknown. C-Kermit also includes its
20245 + own built-in SSL/TLS support, but it is not exportable; [411]CLICK
20246 + HERE file for details.
20247 + _________________________________________________________________
20251 + SRP(TM) is Stanford University's Secure Remote Password protocol. An
20252 + SRP Telnet client is available from Stanford:
20254 + [412]http://srp.stanford.edu/srp/
20256 + Stanford's SRP Telnet client for UNIX has been tested on SunOS and
20257 + works fine with C-Kermit, as described in [413]Section 2.7.1, e.g.
20260 + PTY (or PIPE) srp-telnet xenon.stanford.edu
20262 + C-Kermit itself can be built as an SRP Telnet client on systems that
20263 + have libsrp.a installed; the C-Kermit support code, however, may not
20264 + be exported outside the USA or Canada.
20265 + _________________________________________________________________
20269 + C-Kermit can be built as a SOCKS-aware client on systems that have a
20270 + SOCKS library. See section 8.1.1 of the [414]ckccfg.txt file.
20272 + C-Kermit 7.0 can also be run over SOCKSified Telnet or rlogin clients
20273 + with SET NETWORK TYPE COMMAND. Suppose the Telnet program on your
20274 + system is SOCKS enabled but C-Kermit is not. Make Kermit connections
20278 + PTY (or PIPE) telnet zzz.com
20279 + _________________________________________________________________
20281 + 2.7.4.5. Kerberos
20283 + UNIX C-Kermit can be built with MIT Kerberos IV or V authentication
20284 + and encryption. Instructions are available in a [415]separate
20285 + document. Additional modules are required that can not be exported
20286 + from the USA to any country except Canada, by US law.
20288 + If you have Kerberos installed but you don't have a Kerberized version
20289 + of C-Kermit, you can use ktelnet as C-Kermit's external communications
20290 + program to make secure connections without giving up C-Kermit's
20294 + PTY (or PIPE) ktelnet cia.gov
20295 + _________________________________________________________________
20297 + 2.8. Scripting Local Programs
20299 + If your version of Kermit has PTY support built in, then any
20300 + text-based program can be invoked with SET HOST /PTY or equivalent
20301 + command and controlled using the normal sequence of OUTPUT, INPUT, IF
20302 + SUCCESS commands (this is the same service that is provided by the
20303 + 'expect' program, but controlled by the Kermit script language rather
20306 + When PTY service is not available, then any program that uses standard
20307 + input and output can be invoked with SET HOST /PIPE.
20309 + Here's an example in which we start an external Kermit program, wait
20310 + for its prompt, give it a VERSION command, and then extract the
20311 + numeric version number from its response:
20313 + set host /pty kermit -Y
20314 + if fail stop 1 {Can't start external command}
20315 + input 10 C-Kermit>
20316 + if fail stop 1 {No C-Kermit> prompt}
20317 + output version\13
20318 + input 10 {Numeric: }
20319 + if fail stop 1 {No match for "Numeric:"}
20322 + echo VERSION = "\fsubstr(\v(input),1,6)"
20325 + This technique could be used to control any other interactive program,
20326 + even those that do screen formatting (like Emacs or Vi), if you can
20327 + figure out the sequence of events. If your Kermit program doesn't have
20328 + PTY support, then the commands are restricted to those using standard
20329 + i/o, including certain shells, interactive text-mode "hardcopy"
20330 + editors like ex, and so on.
20332 + If you are using the PTY interface, you should be aware that it runs
20333 + the given program or command directly on the pty, without any
20334 + intervening shell to interpret metacharacters, redirectors, etc. If
20335 + you need this sort of thing, include the appropriate shell invocation
20336 + as part of your command; for example:
20340 + just echoes "*"; whereas:
20342 + pty ksh -c "echo *"
20344 + echoes all the filenames that ksh finds matching "*".
20346 + Similarly for redirection:
20348 + set host /pty ksh -c "cat > foo" ; Note: use shell quoting rules here
20349 + set transmit eof \4
20352 + And for that matter, for built-in shell commands:
20354 + set host /pty ksh -c "for i in *; do echo $i; done"
20356 + The PIPE interface, on the other hand, invokes the shell
20357 + automatically, so:
20361 + prints filenames, not "*".
20362 + _________________________________________________________________
20364 + 2.9. X.25 Networking
20366 + X.25 networking is documented in [416]Using C-Kermit, 2nd Edition.
20367 + When the book was published, X.25 was available only in SunOS,
20368 + Solaris, and Stratus VOS. Unlike TCP/IP, X.25 APIs are not
20369 + standardized; each vendor's X.25 libraries and services (if they have
20370 + them at all) are unique.
20372 + This section describes new additions.
20373 + _________________________________________________________________
20375 + 2.9.1. IBM AIXLink/X.25 Network Provider Interface for AIX
20377 + Support for X.25 was added via IBM's Network Provider Interface (NPI),
20378 + AIXLink/X.25 1.1, to the AIX 4.x version of C-Kermit 7.0.
20379 + Unfortunately, AIXLink/X.25 is a rather bare-bones facility, lacking
20380 + in particular any form of PAD support (X.3, X.28, X.29). Thus, the AIX
20381 + version of C-Kermit, when built to include X.25 networking, has
20382 + neither a PAD command, nor a SET PAD command. The same is true for the
20383 + underlying AIX system: no PAD support. Thus it is not possible to have
20384 + an interactive shell session over an X.25 connection into an AIX
20385 + system (as far as we know), even from X.25-capable Kermit versions
20386 + (such as Solaris or VOS) that do include PAD support.
20388 + Thus the X.25 capabilities in AIX C-Kermit are limited to peer-to-peer
20389 + connections, e.g. from a C-Kermit client to a C-Kermit server. Unlike
20390 + the Solaris, SunOS, and VOS versions, the AIX version can accept
20391 + incoming X.25 connections:
20393 + set network type x.25
20394 + if fail stop 1 Sorry - no X.25 support
20395 + ; Put any desired DISABLE or ENABLE or SET commands here.
20396 + set host /server *
20397 + if fail stop 1 X.25 "set host *" failed
20399 + And then access it from the client as follows:
20401 + set network type x.25
20402 + if fail stop 1 Sorry - no X.25 support
20403 + set host xxxxxxx ; Specify the X.25/X.121 address
20404 + if fail stop 1 Can't open connection
20406 + And at this point the client can use the full range of client
20407 + commands: SEND, GET, REMOTE xxx, FINISH, BYE.
20409 + The AIX version also adds two new variables:
20412 + The local X.25 address.
20414 + \v(x25remote_nua)
20415 + The X.25 address of the host on the other end of the
20418 + C-Kermit's AIX X.25 client has not been tested against anything other
20419 + than a C-Kermit X.25 server on AIX. It is not known if it will
20420 + interoperate with C-Kermit servers on Solaris, SunOS, or VOS.
20422 + To make an X.25 connection from AIX C-Kermit, you must:
20424 + set x25 call-user-data xxxx
20426 + where xxxx can be any even-length string of hexadecimal digits, e.g.
20428 + _________________________________________________________________
20430 + 2.9.2. HP-UX X.25
20432 + Although C-Kermit presently does not include built-in support for
20433 + HP-UX X.25, it can still be used to make X.25 connections as follows:
20434 + start Kermit and tell it to:
20436 + set prefixing all
20438 + pty padem address
20440 + This should work in HP-UX 9.00 and later (see [417]Section 2.7). If
20441 + you have an earlier HP-UX version, or the PTY interface doesn't work
20442 + or isn't available, try:
20444 + set prefixing all
20446 + pipe padem address
20448 + Failing that, use Kermit to telnet to localhost and then after logging
20449 + back in, start padem as you would normally do to connect over X.25.
20450 + _________________________________________________________________
20452 + 2.10. Additional Serial Port Controls
20454 + C-Kermit 7.0 adds the following commands for greater control over
20455 + serial ports. These commands are available only in C-Kermit versions
20456 + whose underlying operating systems provide the corresponding services
20457 + (such as POSIX and UNIX System V), and even then their successful
20458 + operation depends on the capabilities of the specific device and
20461 + SET DISCONNECT { ON, OFF }
20462 + On a SET LINE or SET PORT connection with SET CARRIER ON or
20463 + AUTO, if the carrier signal drops during the connection,
20464 + indicating that the connection has been lost, and C-Kermit
20465 + notices it, this setting governs what happens next. With SET
20466 + DISCONNECT OFF, which is consistent with previous behavior, and
20467 + therefore the default, C-Kermit continues to keep the device
20468 + open and allocated. With SET DISCONNECT ON, C-Kermit
20469 + automatically closes and releases the device when it senses a
20470 + carrier on-to-off transition, thus allowing others to use it.
20471 + However, it remains the default device for i/o (DIAL, REDIAL,
20472 + INPUT, SEND, CONNECT, etc), so if a subsequent i/o command is
20473 + given, the device is reopened if it is still available. When it
20474 + has been automatically closed in this manner, SHOW
20475 + COMMUNICATIONS puts "(closed)" after its name, and in UNIX, the
20476 + lockfile disappears -- both from SHOW COMM and from the
20477 + lockfile directory itself. Synonym: SET CLOSE-ON-DISCONNECT.
20479 + SET EXIT ON-DISCONNECT { ON, OFF }
20480 + Like DISCONNECT, but makes the program exit if a connection
20483 + Note that SET CLOSE-ON-DISCONNECT and SET EXIT ON-DISCONNECT apply
20484 + only to connections that drop; they do not apply to connections that
20485 + can't be made in the first place. For example, they have no effect
20486 + when a SET LINE, SET HOST, TELNET, or DIAL command fails.
20489 + If [CLOSE-ON-]DISCONNECT is ON, and the HANGUP command is given
20490 + on a serial device, and the carrier signal is no longer present
20491 + after the HANGUP command, the device is closed and released.
20493 + SET PARITY HARDWARE { EVEN, ODD }
20494 + Unlike SET PARITY { EVEN, ODD, MARK, SPACE }, which selects 7
20495 + data bits plus the indicated kind of parity (to be done in
20496 + software by Kermit itself), SET PARITY HARDWARE selects 8 data
20497 + bits plus even or odd parity, to be done by the underlying
20498 + hardware, operating system, or device driver. This command is
20499 + effective only with a SET LINE or SET PORT device. That is, it
20500 + has no effect in remote mode, nor on network connections. There
20501 + is presently no method for selecting 8 data bits plus mark or
20502 + space parity. If hardware parity is in effect, the variable
20503 + \v(hwparity) is set to "even" or "odd". Note: some platforms
20504 + might also support settings of SPACE, MARK, or NONE.
20506 + SET STOP-BITS { 1, 2 }
20507 + This tells the number of 1-bits to insert after an outbound
20508 + character's data and parity bits, to separate it from the next
20509 + character. Normally 1. Choosing 2 stop bits should do no harm,
20510 + but will slow down serial transmission by approximately 10
20511 + percent. Historically, 2 stop bits were used with Teletypes (at
20512 + 110 bps or below) for print-head recovery time. There is
20513 + presently no method for choosing any number of stop bits
20516 + SET SERIAL [ dps ]
20517 + dps stands for Data-bits, Parity, Stop-bits. This is the
20518 + notation familiar to many people for serial port configuration:
20519 + 7E1, 8N1, 7O2, etc. The data bits number also becomes the
20520 + TERMINAL BYTESIZE setting. The second character is E for Even,
20521 + O for Odd, M for Mark, S for Space, or N for None. The list of
20522 + available options depends on the capabilities of the specific
20523 + platform. If dps is omitted, 8N1 is used. Type "set serial ?"
20524 + for a list of available choices. Examples:
20527 + Equivalent to SET PARITY EVEN, SET STOP-BITS 1, SET TERM
20531 + Equivalent to SET PARITY NONE, SET STOP-BITS 1, SET TERM
20535 + Equivalent to SET PARITY EVEN and SET STOP-BITS 2, SET
20539 + Same as SET PARITY HARDWARE EVEN, SET STOP-BITS 2, SET
20543 + Same as SET PARITY NONE and SET STOP-BITS 1, SET TERM
20548 + * The SET SERIAL xx2 options are available only in Kermit versions
20549 + where the SET PARITY HARDWARE command is also available. (SHOW
20550 + FEATURES includes "HWPARITY" in its options list.)
20551 + * The SET SERIAL 7xx and 8N1 options affect the software parity
20552 + setting, even for network connections.
20553 + * As noted in the manual, selecting 8 data bits does not give you
20554 + 8-bit terminal sessions in CONNECT mode unless you also SET
20555 + TERMINAL BYTESIZE 8. The default terminal bytesize remains 7, to
20556 + protect against the situation where the remote host is generating
20557 + parity but you don't know about it. If the terminal bytesize was 8
20558 + by default and you CONNECTed to such a host, you would see only
20559 + garbage on your screen.
20560 + * If you do not give a SET STOP-BITS or SET SET SERIAL command,
20561 + C-Kermit does not attempt to set the device's stop bits; instead,
20562 + it uses whatever setting the device uses when not given explicit
20563 + instructions about stop bits.
20565 + SHOW COMMUNICATIONS displays the current settings. Stop bits and
20566 + hardware parity are shown only for SET PORT / SET LINE (serial)
20567 + devices, since they do not apply to network connections or to remote
20568 + mode. STOP-BITS is shown as "(default)" if you have not given an
20569 + explicit SET STOP-BITS or SET SERIAL command.
20571 + The \v(serial) variable shows the SET SERIAL setting (8N1, 7E1, etc).
20572 + _________________________________________________________________
20574 + 2.11. Getting Access to the Dialout Device
20576 + This section is for UNIX only; note the special words about QNX at
20577 + the end. Also see [418]Section 2.0 for SET LINE switches,
20578 + particularly the /SHARE switch for VMS only.
20580 + C-Kermit does its best to obey the UUCP lockfile conventions of each
20581 + platform (machine, operating system, OS version) where it runs, if
20582 + that platform uses UUCP.
20584 + But simply obeying the conventions is often not good enough, due to
20585 + the increasing likelihood that a particular serial device might have
20586 + more than one name (e.g. /dev/tty00 and /dev/term/00 are the same
20587 + device in Unixware 7; /dev/cua and /dev/cufa are the same device in
20588 + NeXTSTEP), plus the increasingly widespread use of symlinks for device
20589 + names, such as /dev/modem.
20591 + C-Kermit 7.0 goes to greater lengths than previous versions to
20592 + successfully interlock with other communications program (and other
20593 + instances of Kermit itself); for example, by:
20595 + * Creation of dual lockfiles whenever a symlink is used; one for the
20596 + link name and one for the real name.
20597 + * Creation of dual lockfiles in HP-UX according to HP rules.
20598 + * Creation of dual uppercase/lowercase lockfile names in SCO
20600 + * The use of ttylock() in versions of AIX where it works.
20601 + * The use, wherever possible, of lockfile names based on
20602 + inode/major/minor device number rather than device name.
20604 + See the [419]ckuins.txt and [420]ckubwr.txt files for details.
20606 + QNX is almost unique among UNIX varieties in having no UUCP programs
20607 + nor UUCP-oriented dialout-device locking conventions. QNX does,
20608 + however, allow a program to get the device open count. This can not be
20609 + a reliable form of locking unless all applications do it (and they
20610 + don't), so by default, Kermit uses this information only for printing
20611 + a warning message such as:
20613 + C-Kermit>set line /dev/ser1
20614 + WARNING - "/dev/ser1" looks busy...
20616 + However, if you want to use it as a lock, you can do so with:
20618 + SET QNX-PORT-LOCK { ON, OFF }
20620 + QNX-PORT-LOCK is OFF by default; if you set in ON, C-Kermit fails to
20621 + open any dialout device when its open count indicates that another
20622 + process has it open. SHOW COMM (in QNX only) displays the setting, and
20623 + if you have a port open, it also shows the current open count (with
20624 + C-Kermit's own access always counting as 1).
20625 + _________________________________________________________________
20627 + 2.12. The Connection Log
20629 + C-Kermit 7.0 adds the ability to log connections, so you can see where
20630 + you've been and have a record of calls you've made. A connection is
20631 + defined as any communications session that is begun by SET LINE, SET
20632 + PORT, DIAL, SET HOST, TELNET, or RLOGIN. Connections are not logged
20633 + unless you request it; the command is:
20635 + LOG CX [ filename [ { NEW, APPEND } ] ]
20636 + Enables logging of connections in the given file. If the
20637 + trailing { NEW, APPEND } keyword is omitted, the file is opened
20638 + for appending; i.e. new records are written to the end. If NEW
20639 + is specified, a new file is created; if a file of the same name
20640 + already existed, it is overwritten. If the filename is omitted,
20641 + CX.LOG in your home (login) directory is used (note:
20642 + uppercase). To accept all defaults, just use "log connections"
20643 + (or "l c" for short). Synonym: LOG CONNECTIONS.
20646 + This closes the connection log if it was open. (Note, the CLOSE
20647 + CONNECTION command closes the connection itself).
20650 + This shows your current connection, if any, including the
20651 + elapsed time (since you opened it). Synonym: SHOW CONNECTION.
20654 + This variable shows the elapsed time of your current
20655 + connection, or if there is no current connection, of your most
20656 + recent connection, of if there have been no connections, 0.
20658 + The connection contains one line per connection, of the form:
20660 + yyyymmdd hh:mm:ss username pid p=v [ p=v [ ... ] ]
20662 + where the timestamp (in columns 1-18) shows when the connection was
20663 + made; username is the login identity of the person who made the
20664 + connection; pid is Kermit's process ID when it made the connection.
20665 + The p's are parameters that depend on the type of connection, and the
20666 + v's are their values:
20668 + T = Connection Type (TCP, SERIAL, DIAL, DECNET, etc).
20669 + H = The name of the Host from which the connection was made.
20670 + N = Destination phone Number or Network host name or address.
20671 + D = Serial connections only: Device name.
20672 + O = Dialed calls only: Originating country code & area code if known.
20673 + E = Elapsed time in hh:mm:ss format (or hhh:mm:ss, etc).
20675 + If you always want to keep a connection log, simply add:
20679 + to your C-Kermit customization file. Note, however, that if you make a
20680 + lot of connections, your CX.LOG will grow and grow. You can handle
20681 + this by adding a "logrotate" procedure like the following to your
20682 + customization file, before the "log connections" command:
20684 + define LOGROTATE { ; Define LOGROTATE macro
20685 + local \%i \%m \%d \%n \%f MAX
20686 + def MAX 4 ; How many months to keep
20687 + if not def \%1 - ; No argument given
20688 + end 1 \%0: No filename given
20689 + if not = 1 \ffiles(\%1) - ; Exactly 1 file must match
20690 + end 1 \%0: \%1 - File not found
20691 + .\%d := \fsubstr(\fdate(\%1),1,6) ; Arg OK - get file year & month
20692 + if = \%d - ; Compare file year & month
20693 + \fsubstr(\v(ndate),1,6) - ; with current year & month
20694 + end 0 ; Same year & month - done
20695 + rename \%1 \%1.\%d ; Different - rename file
20696 + .\%n := \ffiles(\%1.*) ; How many old files
20697 + if < \%n \m(MAX) end 0 ; Not enough to rotate
20698 + .\%m := \%1.999999 ; Initial compare string
20699 + for \%i 1 \%n 1 { ; Loop thru old logs
20700 + .\%f := \fnextfile() ; Get next file name
20701 + if llt \%f \%m .\%m := \%f ; If this one older remember it
20703 + delete \%m ; Delete the oldest one
20705 + log connections ; Now open the (possibly new) log
20706 + logrotate \v(home)CX.LOG ; Run the LOGROTATE macro
20708 + As you can see, this compares the yyyymm portion of the modification
20709 + date (\fdate()) of the given file (\%1) with the current yyyymm. If
20710 + they differ, the current file has the yyyymm suffix (from its most
20711 + recent modification date) appended to its name. Then we search through
20712 + all other such files, find the oldest one, and delete it. Thus the
20713 + current log, plus the logs from the most recent four months, are kept.
20714 + This is all done automatically every time you start C-Kermit.
20716 + On multiuser systems, it is possible to keep a single, shared,
20717 + system-wide connection log, but this is not recommended since (a) it
20718 + requires you keep a publicly write-accessible logfile (a glaring
20719 + target for mischief), and (b) it would require each user to log to
20720 + that file and not disable logging. A better method for logging
20721 + connections, in UNIX at least, is syslogging (see [421]ckuins.txt
20722 + Section 15 and [422]Section 4.2 of the [423]IKSD Administration Guide
20724 + _________________________________________________________________
20726 + 2.13. Automatic Connection-Specific Flow Control Selection
20728 + Beginning in C-Kermit 7.0, the appropriate flow-control method for
20729 + each connection type is kept in a table, for example:
20733 + Direct-Serial: NONE
20736 + The size of the table and values for each connection type can vary
20737 + from platform to platform. Type "set flow ?" for a list of available
20738 + flow-control types.
20740 + The table is used to automatically select the appropriate kind of flow
20741 + control whenever you make a connection. You can display the table
20744 + SHOW FLOW-CONTROL
20746 + The defaults are as follows:
20749 + NONE or XON/XOFF. This is because C-Kermit is not allowed to
20750 + find out what type of connection the incoming user has (*). No
20751 + kind of flow control will work on every kind of connection,
20752 + including (unexpectedly) KEEP, which we would have liked to
20753 + use, but not turning off flow control at the remote end during
20754 + file transfer on TCP/IP connections is fatal to the transfer
20755 + (except in VMS and HP-UX, where it must be set to Xon/Xoff!)
20756 + Therefore if you are dialing in to a serial port on a server
20757 + (UNIX or VMS) where C-Kermit is running, you will need to tell
20758 + C-Kermit to "set flow keep" before transferring files (assuming
20759 + the modem and port are configured correctly by the system
20760 + administrator; otherwise you'll need to give a specific kind of
20761 + flow control, e.g. "set flow xon/xoff"), so in this case
20762 + C-Kermit will not disable flow control, as it must do when you
20763 + are coming via Telnet (directly or through a terminal server,
20764 + except on VMS and HP-UX).
20767 + This applies when you dial out with a modem. In this case, the
20768 + MODEM FLOW-CONTROL setting takes affect after the SET FLOW
20769 + setting, so it can pick the most appropriate flow control for
20770 + the combination of the particular modem and the
20771 + computer/port/driver that is dialing.
20774 + The default here is NONE because C-Kermit has no way of knowing
20775 + what kind of flow control, if any, is or can be done by the
20776 + device at the other end of the connection. RTS/CTS would be a
20777 + bad choice here, because if the CTS signal is not asserted, the
20778 + connection will hang. And since direct connections are often
20779 + made with 3-wire cables, there is a good chance the CTS signal
20780 + will not be received.
20783 + NONE, since TCP and IP provide their own flow control
20784 + transparently to the application, except in VMS, where Xon/Xoff
20785 + is the default due to the requirements of the VMS TCP/IP
20789 + NONE, since networks should provide their flow control
20790 + transparently to the application.
20792 + (*) This is possibly the worst feature of UNIX, VMS, and other
20793 + platforms where C-Kermit runs. If C-Kermit was able to ask the
20794 + operating system what kind of connection it had to the user, it could
20795 + set up many things for you automatically.
20797 + You can modify the default-flow-control table with:
20799 + SET FLOW-CONTROL /xxx { NONE, KEEP, RTS/CTS, XON/XOFF, ... }
20801 + where "xxx" is the connection type, e.g.
20803 + SET FLOW /REMOTE NONE
20804 + SET FLOW /DIRECT RTS/CTS
20806 + If you leave out the switch, SET FLOW works as before, choosing the
20807 + flow control method to be used on the current connection:
20809 + SET FLOW XON/XOFF
20811 + Thus, whenever you make a connection with SET PORT, SET LINE, DIAL,
20812 + SET HOST, TELNET, RLOGIN, etc, an appropriate form of flow control is
20813 + selected automatically. You can override the automatic selection with
20814 + a subsequent SET FLOW command, such as SET FLOW NONE (no switch
20817 + The flow control is changed automatically too when you give a SET
20818 + MODEM TYPE command. For example, suppose your operating system (say
20819 + Linux) supports hardware flow control (RTS/CTS). Now suppose you give
20820 + the following commands:
20822 + set line /dev/ttyS2 ; Automatically sets flow to NONE
20823 + set modem type usr ; Automatically sets flow to RTS/CTS
20824 + set modem type rolm ; Doesn't support RTS/CTS so now flow is XON/XOFF
20826 + IMPORTANT: This new feature tends to make the order of SET LINE/HOST
20827 + and SET FLOW commands matter, where it didn't before. For example, in
20833 + the SET LINE undoes the SET FLOW KEEP command; the sequence now must
20836 + SET FLOW /DIRECT KEEP
20843 + _________________________________________________________________
20845 + 2.14. Trapping Connection Establishment and Loss
20847 + If you define a macro called ON_OPEN, it is executed any time that a
20848 + SET LINE, SET PORT, SET HOST, TELNET, RLOGIN or similar command
20849 + succeeds in opening a connection. The argument is the host or device
20850 + name (as shown by SHOW COMMUNICATIONS, and the same as \v(line)). This
20851 + macro can be used for all sorts of things, like automatically setting
20852 + connection- or host-specific parameters when the connection is opened.
20857 + :abccorp.com, set reliable off, break
20858 + :xyzcorp.com, set receive packet-length 1000, break
20863 + If you define a macro called ON_CLOSE, it will be executed any time
20864 + that a SET LINE, SET PORT, SET HOST, TELNET, RLOGIN or any other kind
20865 + of connection that C-Kermit has made is closed, either by the remote
20866 + or by a local CLOSE, HANGUP, or EXIT command or other local action,
20867 + such as when a new connection is opened before an old one was
20868 + explicitly closed.
20870 + As soon as C-Kermit notices the connection has been closed, the
20871 + ON_CLOSE macro is invoked at (a) the top of the command parsing loop,
20872 + or (b) when a connection is closed implicitly by a command such as SET
20873 + LINE that closes any open connection prior to making a new connection,
20874 + or (c) when C-Kermit closes an open connection in the act of exiting.
20876 + The ON_CLOSE macro was inspired by the neverending quest to unite
20877 + Kermit and SSH. In this case using the "tunnel" mechanism:
20879 + def TUNNEL { ; \%1 = host to tunnel to
20881 + if not def \%1 stop 1
20882 + assign tunnelhost \%1 ; Make global copy
20884 + set macro error off
20885 + close connection ; Ignore any error
20886 + open !read tunnel start \%1
20887 + read \%p ; Get port number
20888 + if fail stop 1 Tunnel failure: \%1
20890 + if fail stop 1 Tunnel failure: \%1 ; See [424]Section 4.2.8.1
20891 + assign on_close { ; Set up close handler
20892 + echo Closing tunnel: \m(tunnelhost)
20893 + !tunnel stop \m(tunnelhost)
20896 + set host localhost:\%p /telnet
20899 + stop 1 Connection failure: \%1
20902 + In this case, when the connection stops, we also need to shut down the
20903 + tunnel, even if it is at a later time after TUNNEL has finished
20904 + executing. This way we can escape back, reconnect, transfer files, and
20905 + so on until the connection is broken by logging out from the remote,
20906 + or by explicitly closing it, or by EXITing from C-Kermit, at which
20907 + time the tunnel is shut down.
20909 + When the connection is closed, no matter how, the ON_CLOSE macro
20910 + executes and then undefines (destroys) itself, since we don't want to
20911 + be closing tunnels in the future when we close subsequent connections.
20913 + Other such tricks can be imagined, including ending ON_CLOSE with a
20914 + STOP command to force the command stack to be peeled all the way back
20915 + to the top, for example in a deeply nested script that depends on the
20916 + connection being open:
20918 + def on_close { stop 1 CONNECTION LOST }
20920 + When C-Kermit invokes the ON_CLOSE macro, it supplies one argument
20921 + (\%1): the reason the connection was closed as a number, one of the
20924 + 2 - Fatal failure to negotiate a required item on a network connection.
20925 + 1 - Closed by C-Kermit command.
20926 + 0 - All others (normally closed by remote).
20928 + which may be used for any purpose; for example, to add a comment to
20929 + the connection log:
20933 + if not open cx end 0
20935 + :0, .\%m = Closed by remote, break
20936 + :1, .\%m = Closed by me, break
20937 + :2, .\%m = Network protocol negotiation failure, break
20939 + if def \%m writeln cx {# \%m}
20941 + _________________________________________________________________
20943 + 2.15. Contacting Web Servers with the HTTP Command
20945 + C-Kermit 7.0 (at this writing, the UNIX version only) supports direct
20946 + contact and interaction with Web servers via HTTP 1.0 protocol. To
20947 + make a connection, use Kermit's normal method for making a TCP/IP
20948 + connection, but specify the HTTP port:
20950 + SET HOST host http [ switches ]
20952 + where host is the IP hostname or address, and http is the name of the
20953 + TCP port for the Web server. Relevant switches include:
20956 + Treat the connection as a transparent binary pipe. This switch
20957 + may be required if a port other than 'http' is used.
20960 + Make an secure private connection with SSL (only if SSL support
20961 + is included in your version of Kermit). In this case the port
20962 + name might need to be https rather than http, e.g. "set host
20963 + secureserver.xyxcorp.com https /ssl".
20966 + Make an secure private connection with TLS (only if TLS support
20967 + is included in your version of Kermit). In this case the port
20968 + name would be https rather than http.
20970 + Then you can issue an HTTP command. In most cases, the server closes
20971 + the connection when the command is complete. Example:
20973 + SET HOST www.columbia.edu http
20974 + IF FAIL EXIT 1 Can't contact server
20975 + HTTP GET kermit/index.html
20977 + At this point the connection is closed, since that's how HTTP 1.0
20978 + works. If you want to perform additional operations, you must
20979 + establish a new connection with another SET HOST command.
20981 + The HTTP command acts as a client to the Web server, except instead of
20982 + displaying the results like a Web browser would, it stores them. Any
20983 + HTTP command can (but need not) include any or all of the following
20986 + /AGENT:user-agent
20987 + Identifies the client to the server; "C-Kermit" or "Kermit-95"
20990 + /HEADER:header-line
20991 + Used for specifying any optional headers. A list of headers is
20992 + provided using braces for grouping:
20994 + /HEADER:{{tag:value}{tag:value}...}
20996 + For a listing of valid tag value and value formats see [425]RFC
20997 + 1945: Hypertext Transfer Protocol -- HTTP/1.0. A maximum of
20998 + eight headers may be specified.
21001 + In case a page requires a username for access.
21003 + /PASSWORD:password
21004 + In case a page requires a password for access.
21007 + Tells Kermit to store the response headers in the given array,
21008 + one line per element. The array need not be declared in
21009 + advance. Example:
21011 + C-Kermit? http /array:c get kermit/index.html
21012 + C-Kermit? show array c
21014 + 1. Date: Fri, 26 Nov 1999 23:12:22 GMT
21015 + 2. Server: Apache/1.3.4 (Unix)
21016 + 3. Last-Modified: Mon, 06 Sep 1999 22:35:58 GMT
21017 + 4. ETag: "bc049-f72-37d441ce"
21018 + 5. Accept-Ranges: bytes
21019 + 6. Content-Length: 3954
21020 + 7. Connection: close
21021 + 8. Content-Type: text/html
21023 + As you can see, the header lines are like MIME e-mail header lines:
21024 + identifier, colon, value. The /ARRAY switch is the only method
21025 + available to a script to process the server responses for a POST or
21028 + The HTTP commands are:
21030 + HTTP [ switches ] GET remote-filename [ local-filename ]
21031 + Retrieves the named file. If a local-filename is given, the
21032 + file is stored locally under that name; otherwise it is stored
21033 + with its own name.
21035 + HTTP [ switches ] HEAD remote-filename local-filename
21036 + Like GET except without actually getting the file; instead it
21037 + gets only the headers, storing them into the given file, whose
21038 + name must be given, one line per header item, as shown above in
21039 + the /ARRAY: switch description.
21041 + HTTP [ switches ] INDEX remote-directory [ local-filename ]
21042 + Retrieves the file listing for the given server directory.
21043 + NOTE: This command is not supported by most Web servers.
21045 + HTTP [ switches ] POST [ /MIME-TYPE:type ] local-file remote-file
21046 + Used to send a response as if it were sent from a form. The
21047 + data to be posted must be read from a file.
21049 + HTTP [ switches ] PUT [ /MIME-TYPE:type ] local-file remote-file
21050 + Uploads a local file to a server file.
21052 + HTTP [ switches ] DELETE remote-filename
21053 + Instructs the server to delete the specified filename.
21054 + _________________________________________________________________
21056 + 3. TERMINAL CONNECTION
21058 + 3.1. CONNECT Command Switches
21060 + The following switches (see [426]Section 1.5) were added to the
21061 + CONNECT command in 7.0:
21064 + Don't print the "Connecting to..." or "Back at..." messages. CQ
21065 + is an invisible command synonym for CONNECT /QUIETLY.
21068 + Specify a trigger or triggers ([427]Section 3.2) effective for
21069 + this CONNECT command only, temporarily overriding any current
21070 + SET TERMINAL TRIGGER values ([428]Section 3.2).
21072 + Note: Other switches might also be available; type "connect ?" for a
21073 + list, "help connect" for a description of each.
21074 + _________________________________________________________________
21078 + Triggers were added for UNIX, VMS, AOS/VS, and K95 in C-Kermit 7.0.
21080 + SET TERMINAL TRIGGER string
21081 + Tells C-Kermit to look for the given string during all
21082 + subsequent CONNECT sessions, and if seen, to return to command
21083 + mode automatically, as if you had escaped back manually. If the
21084 + string includes any spaces, you must enclose it in braces.
21087 + set terminal trigger {NO CARRIER}
21089 + Comparisons are made after character-set translation.
21091 + If a string is to include a literal brace character, precede it with a
21094 + ; My modem always makes this noise when the connection is lost:
21095 + set terminal trigger |||ppp\{\{\{\{UUUUUUU
21097 + If you want Kermit to look for more than one string simultaneously,
21098 + use the following syntax:
21100 + set terminal trigger {{string1}{string2}...{stringn}}
21102 + In this case, C-Kermit will return to command mode automatically if
21103 + any of the given strings is encountered. Up to 8 strings may be
21106 + If the most recent return to command mode was caused by a trigger, the
21107 + new variable, \v(trigger), shows the trigger value; otherwise
21108 + \v(trigger) is empty.
21110 + The SHOW TRIGGER command displays the SET TERMINAL TRIGGER values as
21111 + well as the \v(trigger) value.
21112 + _________________________________________________________________
21114 + 3.3. Transparent Printing
21116 + As noted in the manual, C-Kermit's CONNECT command on UNIX is not a
21117 + terminal emulator, but rather a "semitransparent pipe" between the
21118 + terminal or emulator you are using to access C-Kermit, and the remote
21119 + host to which C-Kermit is connected. The "semitransparent" qualifier
21120 + is because of character-set translation as well as several actions
21121 + taken by the emulator in response to the characters or strings that
21122 + pass through it, such as APCs, Kermit packets (autodownload),
21125 + The UNIX version of C-Kermit 7.0 adds another such action: Transparent
21126 + printing, also called Controller printing (as distinct from Autoprint
21127 + or line or screen print). It is intended mainly for use on UNIX
21128 + workstation consoles (as opposed to remote logins), but with some care
21129 + can also be used when accessing C-Kermit remotely.
21131 + Transparent printing is related to APC by sharing C-Kermit's built-in
21132 + ANSI escape-sequence parser to detect "printer on" and "printer off"
21133 + sequences from the host. When the printer-on sequence is received, all
21134 + subsequent arriving characters -- including NUL, control characters,
21135 + and escape sequences -- are sent to the SET PRINTER device instead of
21136 + to your screen until the printer-off sequence is received, or you
21137 + escape back, whichever happens first. These bytes are not translated
21138 + or modified or filtered in any way by Kermit (except for possibly
21139 + stripping of the 8th bit, as noted below), but if filtering or
21140 + translation is desired, this can be accomplished by your SET PRINTER
21141 + selection (e.g. by choosing a pipeline of filters).
21143 + By default, your SET PRINTER device is your default UNIX printer, but
21144 + it can also be a file, a command, or the null device (which causes all
21145 + printer material to be discarded). See [429]Using C-Kermit, 2nd Ed.,
21146 + p.41 for details.
21148 + Transparent printing is controlled by the command:
21150 + SET TERMINAL PRINT { ON, OFF }
21151 + When ON, transparent-print sequences are obeyed, and printing
21152 + occurs on the system where C-Kermit is running. When OFF,
21153 + transparent print sequences are ignored and passed through to
21154 + your actual terminal or emulator, along with the data they
21155 + enclose. OFF is the default, for compatibility with earlier
21156 + C-Kermit releases. As noted in the manual, when the current SET
21157 + PRINTER device is a file, transparent-print material is
21158 + appended to it; the file is not overwritten.
21160 + SET TERMINAL BYTESIZE { 7, 8 }
21161 + SET PARITY { EVEN, ODD, MARK, SPACE, NONE }
21162 + If the terminal bytesize is 7, or PARITY is not NONE, the 8th
21163 + bit of each byte is stripped prior to printing.
21165 + The transparent-print escape sequences are:
21168 + Printer On. Send all subsequent incoming bytes to the printer
21169 + without any kind of filtering, translation, or alteration.
21170 + Note: <ESC> stands for ASCII character number 27 (decimal),
21174 + Printer Off. Resume displaying incoming bytes on the screen.
21176 + These are the same sequences used by DEC VT100 and higher terminals
21177 + and other ANSI X3.64 and ISO 6429 compatible terminals. There is no
21178 + provision for selecting other printer-control sequences.
21182 + 1. You must SET TERM TRANSPARENT-PRINT ON before you can use this
21184 + 2. Only the 7-bit forms of the escape sequences are supported. The
21185 + 8-bit CSI C1 control is not recognized.
21186 + 3. Autoprint is not supported, since this requires a full-fledged
21187 + terminal emulator with direct access to the screen.
21188 + 4. The start-print and stop-print sequences pass through to the
21189 + screen (there is no way to avoid this without causing unacceptable
21190 + delays or deadlocks in CONNECT mode). Thus if your terminal or
21191 + emulator also supports transparent printing via these same
21192 + sequences, an empty file will be sent to its printer. Normally
21193 + this has no effect.
21195 + Point (4) is similar to the situation with autodownload and APC --
21196 + when you have several Kermit clients in a chain, you should take care
21197 + that these features are enabled in only one of them.
21201 + set printer {|lpr -Plaser} ; Specify the printer (if not default).
21202 + set term print on ; Enable transparent printing.
21203 + set term byte 8 ; Enable 8-bit characters.
21204 + connect ; Enter CONNECT mode.
21208 + set printer /home/users/olga/printer.log ; Send printer material to a file.
21212 + set printer {| grep -v ^Received | lpr} ; Filter out some lines
21214 + Then use "pcprint" or "vtprint" commands on the host to initiate
21215 + transparent print operations. See [430]Using C-Kermit, 2nd Ed., p.406
21218 + Here is a sample "pcprint" shell script for UNIX:
21221 + echo -n '<ESC>[5i'
21222 + if [ $# -eq 0 ]; then
21227 + echo -n '<FF><ESC>[4i'
21230 + (Replace "<ESC>" by the actual ASCII Escape character and "<FF>" by
21231 + the ASCII Formfeed character).
21233 + If you always want transparent printing enabled, put "set term print
21234 + on" in your C-Kermit customization file (~/.mykermrc in UNIX). The
21235 + "set term bytesize" selection, however, is a property of each separate
21237 + _________________________________________________________________
21239 + 3.4. Binary and Text Session Logs
21241 + C-Kermit 7.0 corrects an oversight in earlier releases, in which
21242 + binary session logs (SET SESSION-LOG BINARY) translated character sets
21243 + and performed various formatting transformations (e.g. "newline mode")
21244 + before writing characters to the session log. In C-Kermit 7.0,
21245 + binary-mode session logging writes characters as they come in, before
21246 + anything (other that parity-bit stripping) is done to them. Text-mode
21247 + session logging records the characters after processing.
21248 + _________________________________________________________________
21252 + Every file is transferred either in text mode (which implies
21253 + record-format and character-set translation) or binary mode (in which
21254 + each byte is sent literally without any kind of conversion). The mode
21255 + in which a file is transferred is controlled by (a) the default mode,
21256 + in the absence of any other indications; (b) the SET FILE TYPE
21257 + command; (c) various automatic mechanisms based on client/server
21258 + negotiations, directory information or filename patterns, etc.
21260 + The default FILE TYPE was changed from TEXT to BINARY in C-Kermit 7.0
21263 + * Transferring a text file in binary mode does less damage than
21264 + transferring a binary file in text mode.
21265 + * Only binary-mode transfers can be recovered from the point of
21267 + * The automatic transfer-mode mechanisms switch to text mode on a
21268 + per-file basis anyway, so only those files that are not covered by
21269 + the automatic mechanisms are affected.
21270 + * All file transfers on the Web are done in binary mode, so people
21271 + are accustomed to it and expect it.
21272 + _________________________________________________________________
21274 + 4.0. BUG FIXES, MINOR CHANGES, AND CLARIFICATIONS
21276 + 4.0.0. Filenames with Spaces
21278 + Filenames that contain spaces are a major nuisance to a program like
21279 + Kermit, whose command language is line- and word-oriented, in which
21280 + words are separated by spaces and a filename is assumed to be a
21281 + "word". In general (unless noted otherwise in the description of a
21282 + particular command), there is only one way to refer to such files in
21283 + Kermit commands, and that is to enclose the name in braces:
21287 + Tells Kermit to send the file whose name is "this file" (two words, no
21288 + quotes). Of course, various circumlocutions are also possible, such
21291 + define \%a this file
21294 + BUT, perhaps contrary to expectation, you can't use "\32" to represent
21299 + does not work. Why? Because the Kermit parser, which must work on many
21300 + operating systems including Windows, has no way of knowing what you
21301 + mean by "this\32file". Do you mean a file whose name is "this file" in
21302 + the current directory? Or do you mean a file whose name is "32file" in
21303 + the "this" subdirectory of the current directory? Guessing won't do
21304 + here; Kermit must behave consistently and deterministically in all
21305 + cases on all platforms.
21307 + Note that you can't use Esc or Tab within {...} for filename
21308 + completion, or question mark to get a filename list. However, you can
21309 + include wildcards; for example:
21313 + sends all files whose name contains a space.
21315 + All things considered, it is best to avoid spaces in file and
21316 + directory names if you can. Also see [431]Section 5.4 on this topic.
21317 + _________________________________________________________________
21319 + 4.0.1. Packet out of Window
21321 + C-Kermit 6.0 could send packets "out of window" if the window size was
21322 + greater than 1 and ACKs had arrived out of order. Fixed in 6.1.
21323 + _________________________________________________________________
21325 + 4.0.2. MOVE after ADD SEND-LIST
21327 + ADD SEND-LIST followed by MOVE did not delete original files; fixed in
21328 + 6.1. Carrier loss was not detected during transfer; in 7.0 C-Kermit
21329 + checks for this (but results can not be guaranteed). In any case, the
21330 + protocol will eventually time out if the connection is lost.
21331 + _________________________________________________________________
21333 + 4.0.3. GET and RECEIVE As-Names
21335 + In 5A(190) through 6.0.192, the GET and RECEIVE as-name did not
21336 + properly override the RECEIVE PATHNAMES setting. In 7.0 it does.
21337 + _________________________________________________________________
21339 + 4.0.4. New Brief Statistics Listing
21341 + Version 7.0 adds a /BRIEF switch to the STATISTICS command, to display
21342 + a short file-transfer statistics report. /BRIEF is now the default.
21343 + Use /VERBOSE to see the full display, which is about 25 lines long.
21344 + _________________________________________________________________
21346 + 4.0.5. Improved FAST Command
21348 + The preinstalled definition of the FAST macro did not take enough
21349 + factors into account. Now it sets packet lengths and window sizes
21350 + appropriate to the configuration. Furthermore, in IRIX only, it might
21351 + restrict the SEND packet length to 4000, to work around a bug in the
21352 + IRIX Telnet server, depending on the IRIX version (see
21353 + [432]ckubwr.txt, IRIX section). To see the built-in definition of the
21354 + FAST macro, type "show macro fast". To change it, simply define it to
21355 + be whatever you want -- it's just a macro, like any other.
21356 + _________________________________________________________________
21358 + 4.0.6. The SET SEND BACKUP Command
21360 + Version 7.0 adds SET SEND BACKUP { ON, OFF }. This tells whether
21361 + backup files should be sent. Backup files are the ones created by
21362 + Kermit (and EMACS, and possibly other applications) to preserve old
21363 + copies of files when creating new ones with the same name. Kermit does
21364 + this when receiving a file and its FILE COLLISION setting is BACKUP
21365 + (or RENAME, in which case it the new file gets the backup name). On
21366 + most platforms, the backup name is formed by adding:
21370 + to the end of the filename, where "n" is a number. For example, if the
21371 + original file is oofa.txt, a backup file might be called:
21375 + (or oofa.txt.~2~, etc). If you SET SEND BACKUP OFF, this tells Kermit
21376 + not to send files that have backup names. Normally, SET SEND BACKUP is
21377 + ON (as shown by SHOW PROTOCOL), and backup files are sent if their
21378 + names match the SEND file specification.
21380 + Also see PURGE, SET FILE COLLISION, SEND /NOBACKUP, DIRECTORY
21382 + _________________________________________________________________
21384 + 4.0.7. The SET { SEND, RECEIVE } VERSION-NUMBERS Command
21386 + VMS Only. Normally when sending files, VMS C-Kermit strips the version
21387 + number. For example, if the file is FOO.BAR;34, the name is sent as
21388 + FOO.BAR (without the ";34"). If you want to keep version numbers on
21389 + when sending files, use SET SEND VERSION-NUMBERS ON. The effect
21390 + depends on the receiver.
21392 + Normally when receiving files, and an incoming filename includes a
21393 + VMS-style version number (such as FOO.BAR;34) VMS C-Kermit strips it
21394 + before trying to create the new file; this way the new file receives
21395 + the next highest version number in the customary manner for VMS. If
21396 + you want version numbers on incoming filenames to be used in creating
21397 + the new files, use SET RECEIVE VERSION-NUMBERS ON.
21399 + Normally these commands would be effective only when VMS C-Kermit is
21400 + exchanging files with a non-VMS Kermit program, since VMS-to-VMS
21401 + transfers use labeled mode unless you have gone out of your way to
21404 + Example: You want to send all versions of all files in the current
21405 + directory from a VMS C-Kermit client to a UNIX C-Kermit server. Use:
21407 + set send version-numbers on
21410 + The resulting Unix files will have VMS-style version numbers as part
21411 + of their name, for example "foo.bar;1", "foo.bar;2", etc.
21413 + Now suppose you want to send these files from Unix to another VMS
21414 + system and preserve the version numbers. Again we have a Unix C-Kermit
21415 + server and VMS C-Kermit client. Give these commands to the client:
21417 + set receive version-numbers on
21419 + _________________________________________________________________
21421 + 4.0.8. The SET { SEND, RECEIVE } { MOVE-TO, RENAME-TO } Commands
21423 + These commands are persistent global versions of the /MOVE-TO: and
21424 + /RENAME-TO: switches of the SEND, GET, and RECEIVE commands. They
21425 + should normally be used only when setting up a dedicated
21426 + transaction-processing application, in which each file is to be moved
21427 + or renamed immediately after, and only if, it is transferred
21428 + successfully, so that (for example) an independent, concurrent process
21429 + can notice when new files appear and process them immediately without
21430 + having to guess whether they are complete.
21431 + _________________________________________________________________
21433 + 4.0.9. SET FILE INCOMPLETE AUTO
21435 + SET FILE INCOMPLETE { KEEP, DISCARD }, which tells whether to keep or
21436 + discard incompletely received files, has a new option, AUTO, which is
21437 + also the default. It means KEEP the incomplete file if the transfer is
21438 + in binary mode, otherwise DISCARD it. This reduces the chances that a
21439 + subsequent recovery operation (RESEND, REGET, etc) could produce a
21440 + corrupt file, since recovery works only for binary-mode transfers.
21441 + _________________________________________________________________
21443 + 4.1. FILE-TRANSFER FILENAME TEMPLATES
21445 + File-transfer filename templates allow files to be renamed
21446 + automatically by the file sender, the receiver, or both, during
21447 + transfer of groups of files.
21449 + 4.1.1. Templates in the As-Name
21451 + Prior to C-Kermit 6.1 and Kermit 95 1.1.12 the only options that could
21452 + be used to affect the names of files being transferred were SET
21453 + FILENAMES { LITERAL, CONVERTED } and SET { SEND, RECEIVE } PATHNAMES {
21454 + ON, OFF }, plus the "as-name" feature of the SEND (MOVE, etc) and
21455 + RECEIVE commands.
21457 + Previously, the as-name could be used only for a single file. For
21462 + would send the file FOO under the name BAR, but:
21464 + SEND *.TXT anything
21466 + was not allowed, since it would give the same name to each file that
21467 + was sent. When receiving:
21471 + would rename the first incoming file to FOO before storing it on the
21472 + disk, but subsequent files would not be renamed to FOO, since this
21473 + would result in overwriting the same file repeatedly. Instead, they
21474 + were stored under the names they arrived with.
21476 + Beginning in C-Kermit 6.1 and Kermit 95 1.1.12, it is possible to
21477 + specify as-names in SEND, RECEIVE, and related commands even for file
21478 + groups. This is accomplished by using replacement variables in the
21479 + as-name, along with optional material such character-string functions
21480 + and/or constant strings. An as-name containing replacement variables
21481 + is called a filename template.
21483 + The key to filename templates is the new variable:
21487 + During file transfer it is replaced by the name of each file currently
21488 + being transferred (after transfer, it is the name of the last file
21493 + send *.txt \v(filename).new
21495 + sends each file with its own name, but with ".new" appended to it. Of
21496 + course if the name already contains periods, this could confuse the
21497 + file receiver, so you can also achieve fancier effects with
21498 + constructions like:
21500 + send *.txt \freplace(\v(filename),.,_).new
21502 + which replaces all periods in the original filename by underscores,
21503 + and then appends ".new" to the result. So, for example, oofa.txt would
21504 + be sent as oofa_txt.new.
21506 + Another new variable that is useful in this regard is \v(filenumber),
21507 + which is the ordinal number of the current file in the file group, so
21510 + send *.txt FILE\flpad(\v(filenum),2,0)
21512 + resulting in a series of files called FILE00, FILE01, FILE02, etc. (At
21513 + the end of the transfer, \v(filenum) tells the number of files that
21514 + were transferred).
21516 + If you specify a constant as-name when sending a file group:
21518 + send *.txt thisnameonly
21520 + Kermit complains and asks you to include replacement variables in the
21521 + as-name. You should generally use \v(filename) or \v(filenumber) for
21522 + this purpose, since other variables (with the possible exception of
21523 + date/time related variables) do not change from one file to the next.
21524 + But Kermit accepts any as-name at all that contains any kind of
21525 + variables for file group, even if the variable will not change. So:
21529 + is accepted, but all files are sent with the same name (the value of
21530 + \%a, if it has one and it is constant). If the variable has no value
21531 + at all, the files are sent under their own names.
21533 + Of course, the value of \%a in the previous example need not be
21536 + define \%a FILE\flpad(\v(filenum),2,0)_at_\v(time)
21539 + The RECEIVE command, when given without an as-name, behaves as always,
21540 + storing all incoming files under the names they arrive with, subject
21541 + to SET FILE NAME and SET RECEIVE PATHNAMES modifications ([433]Section
21544 + However, when an as-name is given in the RECEIVE command, it is
21545 + applied to all incoming files rather than to just the first. If it
21546 + does not contain replacement variables, then the current FILE
21547 + COLLISION setting governs the result. For example:
21551 + will result in incoming files named foo, foo.~1~, foo.~2~, and so on,
21552 + with the default FILE COLLISION setting of BACKUP. If it does contain
21553 + replacement variables, of course they are used.
21555 + When receiving files, the \v(filename) variable refers to the name
21556 + that was received in the incoming file-header packet, BEFORE any
21557 + processing by SET FILE NAMES or SET RECEIVE PATHNAMES. Since the
21558 + filenames in file-header packets are usually in uppercase, you would
21559 + need to convert them explicitly if you want them in lowercase, e.g.:
21561 + receive \flower(\v(filename)).new
21562 + _________________________________________________________________
21564 + 4.1.2. Templates on the Command Line
21566 + On the command-line, use templates as shown above as the -a option
21567 + argument, bearing in mind the propensity of UNIX and perhaps other
21568 + shells to treat backslash as a shell escape character. So in UNIX (for
21571 + kermit -s oofa.* -a x.\\v(filenum)
21573 + By the way, this represents a change from 6.0 and earlier releases in
21574 + which the as-name (-a argument or otherwise) was not evaluated by the
21575 + command parser. Thus, for example, in VMS (where the shell does not
21576 + care about backslashes), it was possible to:
21578 + kermit -s oofa.txt -a c:\tmp\oofa.txt
21580 + Now backslashes in the as-name must be quoted not only for the shell
21581 + (if necessary) but also for Kermit itself:
21583 + kermit -s oofa.txt -a c:\\tmp\\oofa.txt ; Kermit only
21584 + kermit -s oofa.txt -a c:\\\\tmp\\\\oofa.txt ; Shell and Kermit
21586 + You can also use the \fliteral() function for this:
21588 + kermit -s oofa.txt -a \fliteral(c:\tmp\oofa.txt) ; Kermit only
21589 + kermit -s oofa.txt -a \\fliteral(c:\\tmp\\oofa.txt) ; Shell and Kermit
21590 + _________________________________________________________________
21592 + 4.1.3. Post-Transfer Renaming
21594 + Filename templates are now also useful in SET { SEND, RECEIVE }
21595 + RENAME-TO and in the /RENAME-TO: switch, that can be given to the
21596 + SEND, GET, or RECEIVE commands; this is similar to an as-name, but is
21597 + effective on a per-file basis if and only if the file was transferred
21600 + MOVE-TO and RENAME-TO address a requirement commonly stated for
21601 + transaction processing and similar systems. Suppose, for example, a
21602 + central system "X" accepts connections from multiple clients
21603 + simultaneously; a process on X waits for a file to appear and then
21604 + processes the file. This process must have a way of knowing when the
21605 + file has been completely and successfully transferred before it starts
21606 + to process it. This can be accomplished easily using C-Kermit's SET {
21607 + SEND, RECEIVE } { MOVE-TO, RENAME-TO } command or /MOVE-TO: or
21608 + /RENAME-TO: switches, described in [434]Sections 4.7.1 through
21611 + Here's an example for the client side, in which files to be sent are
21612 + placed in a certain directory (/usr/olga/tosend in this example) by
21613 + another process when they are ready to go. This might be in a hospital
21614 + or big doctor's office, where medical insurance claims are entered at
21615 + a number of workstations, and then deposited in the "tosend"
21616 + directory, from which they are sent to a claims clearinghouse. We
21617 + assume the connection is already made and a Kermit server is on the
21620 + local srcdir findir ; Declare local (automatic) variables
21621 + assign srcdir /usr/olga/tosend ; Local source directory (files to send)
21622 + assign findir /usr/olga/sent ; Where to move files after they are sent
21623 + log transactions ; Keep a log of transfers
21624 + cd \m(srcdir) ; Change to the source directory
21625 + while true { ; Loop forever...
21626 + send /move-to:\m(findir) * ; Send all files
21627 + sleep 60 ; Sleep a minute
21628 + } ; Go back and do it again
21630 + Note how simple this is. Once each file is sent, it is moved so it
21631 + won't be sent again (you could also use SEND /RENAME-TO: or even SEND
21632 + /DELETE). If a transfer fails, the file is not moved and so we try
21633 + again to send it next time around. If there are no files to send, the
21634 + SEND command does nothing but a message is printed; you can avoid the
21635 + message by checking first to see if any files are in the directory:
21637 + while true { ; Loop forever...
21638 + if > \ffiles(*) 0 - ; If there are any files
21639 + send /move-to:\m(findir) * ; send them.
21640 + sleep 60 ; Sleep a minute.
21641 + } ; Go back and do it again.
21643 + It's even simpler on the server side (here again we assume the
21644 + connection is already in place):
21646 + local rcvdir findir ; Declare local (automatic) variables
21647 + assign rcvdir /usr/ivan/tmp ; Temporary receiving directory
21648 + assign findir /usr/ivan/new ; Where to move files after reception
21649 + log transactions ; Keep a log of transfers
21650 + cd \m(rcvdir) ; Change to the source directory
21651 + set receive move-to \m(findir) ; Declare move-to directory.
21652 + server ; Enter server mode.
21654 + A separate process (e.g. the medical claim-form decoder) can look for
21655 + files appearing in the /usr/ivan/new directory and process them with
21656 + every confidence that they have been completely received.
21658 + Note that the use of MOVE-TO can result in moved files overwriting one
21659 + another (the application would normally avoid this by assigning each
21660 + transaction a unique, e.g. based on customer number and claim number).
21661 + But if filename collisions are a possibility in your application,
21662 + RENAME-TO might be a better choice; you can use any variables you like
21663 + in the template to ensure uniqueness of the RENAME-TO filename; for
21666 + SET RECEIVE RENAME-TO \v(filename)_\v(ndate)_\v(ntime)_\v(userid)_\v(pid)
21667 + _________________________________________________________________
21669 + 4.2. FILE-TRANSFER PIPES AND FILTERS
21671 + 4.2.1. INTRODUCTION
21673 + Beginning in C-Kermit 6.1 and Kermit 95 1.1.12, it is possible to send
21674 + from a command, or "pipe", as well as from a file, and to receive to a
21675 + pipe or command. In a typical example, we might want to transfer an
21676 + entire directory tree from one UNIX system to another (but without
21677 + using the methods described in [436]Sections 4.3 , [437]4.10,
21678 + [438]4.11, and [439]4.15). We could do this in multiple steps as
21681 + 1. Create a tar archive of the desired directory tree
21682 + 2. Compress the tar archive
21683 + 3. Transfer it in binary mode to the other computer
21685 + 5. Extract the directory tree from the tar archive
21687 + But this is inconvenient and it requires a temporary file, which might
21688 + be larger than we have room for.
21690 + The new pipe-transfer feature lets you do such things in a single
21691 + step, and without intermediate files.
21693 + Additional new features, also discussed here, let you specify pre- and
21694 + post- processing filters for outbound and incoming files, and give you
21695 + a way to insert the output from shell or system commands into C-Kermit
21698 + The file-transfer related features are available only with Kermit
21699 + protocol, not with any external protocols, nor with K95's built-in
21700 + XYZMODEM protocols (because XYZMODEM recovers from transmission errors
21701 + by rewinding the source file, and you can't rewind a pipe).
21703 + This section begins by discussing the simple and straightforward use
21704 + of these features in UNIX, in which pipes and input/output redirection
21705 + are a fundamental component and therefore "just work", and then goes
21706 + on to discuss their operation in Windows and OS/2, where matters are
21707 + much more complicated.
21708 + _________________________________________________________________
21710 + 4.2.1.1. TERMINOLOGY
21713 + This is a precise technical term denoting the normal source of
21714 + input for a command or program, which is the keyboard of your
21715 + terminal by default, but which can be redirected to a file or
21719 + Abbreviation for Standard Input.
21722 + A precise technical term denoting the normal destination for
21723 + output from a command or program, which is your terminal screen
21724 + by default, but which can be redirected to a file.
21727 + Abbreviation for Standard Output.
21730 + Abbreviation for Standard Input / Standard Output.
21733 + Abbreviation for Input / Output.
21736 + Text-based system command processor, such as the UNIX shell,
21737 + DOS COMMAND.COM, etc.
21740 + A mechanism by which the standard output of one program is sent
21741 + to the standard input of another.
21744 + A series of programs connected by pipes.
21745 + _________________________________________________________________
21747 + 4.2.1.2. NOTATION
21749 + In command descriptions, "command" is replaced by a shell or system
21750 + command or pipeline. The command names specified in these commands are
21751 + interpreted by your shell, just as if you were typing them at the
21752 + shell prompt, and so if they are in your PATH, they will be found in
21753 + the expected manner. Therefore you don't have to specify complete
21754 + pathnames for commands that are programs (but it shouldn't hurt if you
21757 + The normal notation for I/O redirection is as follows:
21759 + < Read Stdin from the given file.
21760 + > Send Stdout to the given file.
21761 + | Send Stdout from the command on the left to the command on the right.
21766 + Sorts the lines in file "foo" and writes the results to file
21769 + grep -c "some text" *.txt | grep -v ":0" | sort | pr -3 | lpr
21770 + This is a command pipeline composed of 5 commands:
21772 + grep -c "some text" *.txt
21773 + Looks in all files whose names end with ".txt" for the string
21774 + "some text" and writes to Stdout the names of each file
21775 + followed by a colon and the number of occurrences in each.
21778 + Prints to Stdout the lines from Stdin that do NOT contain the
21779 + string ":0", in this case, it removes the names of files that
21780 + do not contain "some text".
21783 + Sorts the lines from Stdin alphabetically to Stdout.
21786 + Arranges the lines from Stdin in three columns.
21789 + Prints its Stdin on the default printer.
21791 + Note that the Kermit features described here work only with commands
21792 + that use Stdio. If you attempt to use them with commands whose input
21793 + and output can not be redirected, Kermit will most likely get stuck.
21794 + Kermit has no way of telling how an external command works, nor what
21795 + the syntax of the shell is, so it's up to you to make sure you use
21796 + these features only with redirectable commands.
21798 + The quoting rules of your shell apply to the command. Thus in UNIX,
21799 + where C-Kermit tries to use your preferred shell for running commands,
21800 + shell "metacharacters" within commands must be escaped if they are to
21801 + be taken literally, using the methods normal for your shell. For
21802 + example, the UNIX tr (translate) command must have its arguments in
21805 + tr "[a-z]" "[A-Z]"
21807 + otherwise the shell is likely to replace them by all filenames that
21808 + match, which is probably not what you want. This is also true when
21809 + using your shell directly, and has nothing to do with Kermit.
21810 + _________________________________________________________________
21812 + 4.2.1.3. SECURITY
21814 + Some sites might not wish to allow access to system commands or
21815 + external programs from within Kermit. Such access, including all the
21816 + features described here, can be disabled in various ways:
21818 + 1. When building from source code, include -DNOPUSH among the CFLAGS.
21819 + 2. At runtime, give the NOPUSH command.
21820 + 3. For server mode, give the DISABLE HOST command.
21821 + 4. Implicit use of pipes can be disabled as described in [440]Section
21824 + Note: 3 and 4 are not necessary if you have done 1 or 2.
21825 + _________________________________________________________________
21827 + 4.2.2. Commands for Transferring from and to Pipes
21829 + SEND /COMMAND sends data from a command or command pipeline, and
21830 + RECEIVE /COMMENT writes data to a command or pipeline. The GET
21831 + /COMMAND command asks a server to send material, and then writes the
21832 + incoming material to a command or pipeline. These features, along with
21833 + switches (like "/COMMAND", described in [441]Section 4.7) are new to
21834 + C-Kermit 6.1. The following synonyms are also provided:
21836 + CSEND = SEND /COMMAND
21837 + CRECEIVE = RECEIVE /COMMAND
21838 + CGET = GET /COMMAND
21840 + None of these commands can be used if a SEND or RECEIVE FILTER
21841 + (respectively, [442]Section 4.2.3) is in effect, or if a NOPUSH
21842 + command ([443]Section 4.2.1.3) has been given, or if the current
21843 + protocol is not Kermit.
21844 + _________________________________________________________________
21846 + 4.2.2.1. Sending from a Command
21848 + SEND /COMMAND command [ as-name ]
21849 + SEND /AS-NAME:as-name /COMMAND command
21850 + CSEND command [ as-name ]
21851 + These three forms are the same. They work like the SEND
21852 + command, but instead of sending a file, it sends the standard
21853 + output of the given command, either under the command's own
21854 + name, or else with the given as-name. If the command contains
21855 + spaces, it must be enclosed in braces. Braces should also be
21856 + used for the as-name if it contains spaces. If braces are
21857 + included around either the command or the as-name, they are
21858 + removed after parsing but before use. As with SEND, the
21859 + transfer is in text or binary mode according the current FILE
21860 + TYPE setting, unless you override the global transfer mode by
21861 + including a /TEXT or /BINARY switch. The command must require
21864 + When sending from a command or pipeline, C-Kermit has no way of
21865 + knowing in advance how much data will be sent, and so it can not send
21866 + the size to the other Kermit in the Attribute packet, and so the
21867 + receiving Kermit has no way of displaying "percent done" or a progress
21868 + bar (thermometer).
21870 + Examples that make sense in text mode (illustrated by common UNIX
21873 + SEND /COMMAND finger
21875 + sends the current "finger" listing (who's logged in) under the
21876 + name "finger". The two forms "send /command" and "csend" are
21877 + equivalent; we won't bother showing them both in the rest of
21880 + SEND /COMMAND:{finger}
21882 + Same as previous example (braces are removed from "{finger}").
21884 + SEND /COMMAND:{ finger }
21886 + Same as previous example, but note that the spaces are kept.
21887 + This does not prevent the shell from running the "finger"
21888 + program, but its output is sent under the name " finger " (with
21889 + a leading and trailing space).
21891 + SEND /COMMAND:finger /AS-NAME:userlist
21892 + CSEND finger userlist
21893 + sends the current finger listing under the name "userlist".
21895 + SEND /COMMAND:{finger | sort -r} /AS-NAME:userlist
21896 + CSEND {finger | sort -r} userlist
21897 + sends the current finger listing, sorted in reverse order,
21898 + under the name "userlist". The braces are needed to distinguish
21899 + the command from the as-name.
21901 + SEND /COMMAND:{finger | sort -r} /AS-NAME:{userlist}
21902 + CSEND {finger | sort -r} {userlist}
21903 + Same as previous example (braces are removed from
21906 + SEND /COMMAND:{finger | sort -r}
21907 + /AS-NAME:{\freplace(\v(filename),\32,_)}
21909 + CSEND {finger | sort -r} {\freplace(\v(filename),\32,_)}
21910 + Like the previous example, but sends the output of the command
21911 + under the name of the command, but with all spaces (\32)
21912 + replaced by underscores, so the as-name is "finger_|_sort_-r".
21914 + Examples that make sense in binary mode (three equivalent forms are
21917 + SEND /COMMAND /BINARY {tar cf - . | gzip -c} mydir.tar.gz
21918 + SEND /COMMAND /BINARY /AS-NAME:mydir.tar.gz {tar cf - . | gzip -c}
21919 + CSEND /BINARY {tar cf - . | gzip -c} mydir.tar.gz
21920 + Makes a tar archive of the current directory, compresses it
21921 + with the GNU gzip program, and sends it as "mydir.tar.gz". The
21922 + other Kermit can, of course, just store it as a file, or it can
21923 + use CRECEIVE to uncompress and dearchive it as part of the
21924 + transfer process.
21926 + When using a "pipeline" of commands in the command field, obviously,
21927 + the first command must not require any input, and the last command
21928 + should produce some output, and all intermediate commands should get
21929 + some input and produce some output.
21930 + _________________________________________________________________
21932 + 4.2.2.2. Receiving to a Command
21934 + RECEIVE /COMMAND command
21936 + This is like RECEIVE, except incoming material is written to
21937 + the standard input of the given command, in text or binary mode
21938 + according to the normal rules for file reception. Be sure to
21939 + include a redirector to a file (if the command normally writes
21940 + to standard output), or the output of the command won't go
21941 + anywhere. The command may contain spaces; braces are not
21942 + needed, but they are removed if used.
21944 + WARNING: C-Kermit has no way of knowing anything about the command, or
21945 + even whether it is a command. Thus this command will always cause
21946 + C-Kermit to enter protocol mode, as long as some text is specified in
21947 + the command field. However, if the text does not correspond to a
21948 + command, the transfer will eventually fail with a message such as
21949 + "Error writing data" or "Failure to close file".
21951 + Examples for text mode (in UNIX):
21953 + RECEIVE /COMMAND sort -r > reverse.txt
21954 + CRECEIVE sort -r > reverse.txt
21955 + The text that is received is sorted in reverse order and stored
21956 + in the file "reverse.txt". The two forms shown are equivalent.
21958 + RECEIVE /COMMAND {sort -r > reverse.txt}
21959 + CRECEIVE {sort -r > reverse.txt}
21960 + The same as the previous example; if braces are included, they
21961 + are simply removed.
21963 + RECEIVE /COMMAND {sort -r > \flower(\v(filename)).reverse}
21964 + CRECEIVE {sort -r > \flower(\v(filename)).reverse}
21965 + Same but stores result under the incoming filename, lowercased,
21966 + and with ".reverse" appended to it.
21968 + RECEIVE /COMMAND sort
21970 + Does nothing useful, since the output of sort has nowhere to
21973 + RECEIVE /COMMAND sort -r | pr -3 | lpr -Plaserjet
21974 + CRECEIVE sort -r | pr -3 | lpr -Plaserjet
21975 + The text that is received is sorted in reverse order, arranged
21976 + into three columns, and sent to the "laserjet" printer.
21978 + Examples for binary mode:
21980 + RECEIVE /COMMAND:{gunzip -c | tar xf -}
21981 + CRECEIVE {gunzip -c | tar xf -}
21982 + Assuming the data that is received is a compressed tar archive,
21983 + uncompresses the archive and passes it to tar for extraction.
21984 + In this case the braces are needed because otherwise the final
21985 + "-" would be taken as a command continuation character (see
21986 + [444]Using C-Kermit, 2nd Edition, p.33).
21988 + GET /COMMAND remote-file command
21989 + GET /COMMAND /AS-NAME:command remote-file
21990 + CGET remote-file command
21991 + This command tells the Kermit client to send a GET request for
21992 + the given remote file to a Kermit server. Unlike GET, however,
21993 + the incoming material is written to a command, rather than to a
21994 + file. If the remote-file or the command contain spaces, they
21995 + must be enclosed in braces. The same cautions about the command
21996 + apply as for CRECEIVE.
21998 + Examples (for UNIX):
22000 + GET /COMMAND oofa.txt sort -r > oofa.new
22001 + GET /COMMAND {oofa.txt} {sort -r > oofa.new}
22002 + CGET oofa.txt sort -r > oofa.new
22003 + CGET {oofa.txt} {sort -r > oofa.new}
22004 + These four are equivalent. Each of them requests the server to
22005 + send its "oofa.txt" file, and as it arrives, it is sorted in
22006 + reverse order and written to "oofa.new".
22008 + GET /COMMAND {profile exec a} lpr
22009 + GET /COMMAND {profile exec a} {lpr}
22010 + GET /COMMAND /AS-NAME:lpr {profile exec a}
22011 + GET /COMMAND /AS-NAME:{lpr} {profile exec a}
22012 + GET /COMMAND /AS:lpr {profile exec a}
22013 + CGET {profile exec a} lpr
22014 + CGET {profile exec a} {lpr}
22015 + Here the remote filename contains spaces so it MUST be enclosed
22016 + in braces. As it arrives it is sent to the lpr program for
22017 + printing. Braces are optional around "lpr" since it contains no
22020 + GET /COMMAND *.txt {cat >> new.txt}
22021 + GET /AS-NAME:{cat >> new.txt} /COMMAND *.txt
22022 + CGET *.txt {cat >> new.txt}
22023 + This gets all the ".txt" files from the server and concatenates
22024 + them all into a single "new.txt" file on the client.
22026 + GET /COMMAND *.txt {echo \v(filename)>>new.txt;cat>>new.txt}
22027 + CGET *.txt {echo \v(filename)>>new.txt;cat>>new.txt}
22028 + As above, but inserts each file's name before its contents.
22029 + _________________________________________________________________
22031 + 4.2.3. Using File-Transfer Filters
22033 + The commands described in [445]Section 4.2.2 let you send the output
22034 + of a command, or receive data into a command. But what if you want to
22035 + specify preprocessing for files that you send, or postprocessing of
22036 + files that you receive, even when multiple files are involved? For
22037 + this you need a way to specify send and receive filters. The commands
22038 + are SET SEND FILTER and SET RECEIVE FILTER; SHOW PROTOCOL displays the
22039 + current settings.
22041 + 4.2.3.1. The SEND Filter
22043 + SET SEND FILTER [ command ]
22044 + This command specifies a command to be run on any file that you
22045 + SEND (or MOVE, MSEND, etc). It also applies to files sent when
22046 + in server mode, in response to GET commands, but not to the
22047 + results of REMOTE commands like REMOTE DIRECTORY, REMOTE TYPE,
22048 + REMOTE HOST, etc. The command may be, but need not be, enclosed
22049 + in braces; if it is, the braces are stripped before use. The
22050 + output of this command is sent, rather than the file itself.
22051 + The current FILE TYPE setting (TEXT or BINARY) applies to the
22052 + output of the command. The command must contain at least one
22053 + instance of \v(filename), for which the name of the actual file
22054 + is substituted. If the command is omitted, the send filter is
22055 + removed and files are sent in the normal manner.
22057 + The SET SEND FILTER sets up a "global" filter -- that is, one that
22058 + applies to all subsequent file-sending commands until you change or
22059 + remove it. You can also specify a "local" filter to be used in a
22060 + specific file-sending command by using the /FILTER switch (see
22061 + [446]Section 1.5); for example:
22063 + SEND /FILTER:command [ other-switches ] filename
22065 + Besides \v(filename), you can include any other script programming
22066 + notation in the send filter: variable names, array references, calls
22067 + to built-in string or other functions, and so on. These are evaluated
22068 + during file transfer, NOT during parsing, and they are evaluated
22069 + separately for each file.
22071 + When the SEND or MOVE (SEND /DELETE) command is used with a send
22072 + filter, the output from the filter is sent under the file's original
22073 + name unless you specify an "as-name" or template. The Attribute packet
22074 + (if any) contains the original file's attributes (size, creation date,
22075 + etc). So (for example) if the filter changes the file's size, the
22076 + progress thermometer might be wrong. (We can't send the size of the
22077 + output from the filter, because it is not known until the transfer is
22078 + finished.) If you prefer that the size not be sent, use "set
22079 + attributes size off".
22081 + You can not use send filters with RESEND (SEND /RECOVER) or PSEND
22084 + Examples for text mode:
22086 + SET SEND FILTER sort -r \v(filename) ; Braces may be omitted
22087 + SET SEND FILTER {sort -r \v(filename)} ; Braces may be included
22089 + This sends every file in the current directory whose name ends
22090 + with ".txt" under its own name, but with its lines sorted in
22093 + SEND /FILTER:{sort -r \v(filename)} *.txt
22094 + Same as above, but the filter applies only to this SEND
22095 + command. Braces are required in this case.
22097 + SET SEND FILTER {sort -r \v(filename)}
22098 + SEND oofa.txt reverse.txt
22099 + Sends the oofa.txt file with its lines sorted in reverse order
22100 + under the name "reverse.txt".
22102 + SET SEND FILTER {sort -r \v(filename)}
22103 + SEND oofa.* \v(filename).reverse
22104 + Sends all the oofa.* files with their lines sorted in reverse
22105 + order; each file is sent under its own name but with ".reverse"
22108 + SET SEND FILTER {tr "[a-z]" "[A-Z]" < \v(filename)}
22110 + Sends all ".txt" files under their own names, but uppercasing
22113 + Note that the SEND FILTER applies not only to files that are sent with
22114 + SEND, MOVE, MSEND, etc, but also to files sent by the C-Kermit server
22115 + in response to GET requests.
22117 + Examples for binary mode:
22119 + SET SEND FILTER {gzip -c \v(filename)}
22120 + SEND /BINARY oofa.txt oofa.txt.gz
22121 + Sends the oofa.txt file, compressed by gzip, as oofa.txt.gz.
22123 + SEND /BINARY /FILTER:{gzip -c \v(filename)} oofa.txt oofa.txt.gz
22124 + As above, but the filter applies only to this SEND command.
22126 + SET SEND FILTER {gzip -c \v(filename)}
22127 + SEND /BINARY oofa.* \fupper(\replace(\v(filename),.,_)).GZ
22128 + Sends all the oofa.* files, compressed by gzip, each under its
22129 + own name, but with the name uppercased, all periods within the
22130 + name converted to underscores, and ".GZ" appended to it. So,
22131 + for example, "oofa.txt" is sent as "OOFA_TXT.GZ".
22133 + In the gzip examples, note that the amount of data that is sent is
22134 + normally less than the original file size because gzip compresses the
22135 + file. But Kermit sends the original file size ahead in the attribute
22136 + packet anyway (unless you tell it not too). Thus the transfer will
22137 + probably appear to terminate early, e.g. when the receiver's
22138 + file-transfer display thermometer is only at 40%. If this annoys you,
22139 + tell Kermit to "set attribute length off". On the other hand, you can
22140 + use the final position of the thermometer as a measure of the
22141 + effectiveness of compression.
22142 + _________________________________________________________________
22144 + 4.2.3.2. The RECEIVE Filter
22146 + SET RECEIVE FILTER [ command ]
22147 + This command specifies that the given command will be run on
22148 + any file that is received before it is written to disk. The
22149 + command may be, but need not be, enclosed in braces; if it is
22150 + the braces are stripped before use. The following two commands
22153 + SET RECEIVE FILTER sort -r > \v(filename)
22154 + SET RECEIVE FILTER {sort -r > \v(filename)}
22156 + The RECEIVE filter command may contain a "\v(filename)" sequence to be
22157 + replaced by the incoming filename from the file header packet, but it
22158 + is not required. However you must use it whenever your filter would
22159 + normally write to Stdout, otherwise its output will be lost.
22161 + The RECEIVE filter command may contain one or more "\v(filename)"
22162 + sequence to be replaced by the incoming filename from the file header
22163 + packet, but it is not required. However you must use it whenever your
22164 + filter would normally write to Stdout, otherwise its output will be
22167 + RECEIVE /FILTER:command and GET /FILTER:command can also be used to
22168 + specify a filter to be used for only one file-transfer operation.
22170 + UNIX examples for text mode:
22172 + SET RECEIVE FILTER lpr
22174 + All the files that are received are sent to the default UNIX
22177 + RECEIVE /FILTER:lpr
22178 + Same as above, except the lpr filter is used only with this
22182 + This is probably not what you want; it creates a file called
22185 + SET RECEIVE FILTER {sort -r > \v(filename)}
22187 + Stores each incoming file with its lines sorted in reverse
22188 + order, under its own name.
22190 + RECEIVE /FILTER:{sort -r > \v(filename)}
22191 + As above, but the filter is used only for this RECEIVE command.
22193 + SET RECEIVE FILTER sort -r > \v(filename)
22194 + RECEIVE reverse.txt
22195 + Stores each incoming file with its lines sorted in reverse
22196 + order, under the name "reverse.txt". The actual result depends
22197 + on the FILE COLLISION setting. If it is OVERWRITE and multiple
22198 + files arrive, then each incoming file destroys the previous
22199 + one. If it is BACKUP (the default), filename conflicts are
22200 + resolve by adding "version numbers" to the filenames:
22201 + reverse.txt, reverse.txt.~1~, reverse.txt.~2~, etc.
22203 + SET RECEIVE FILTER sort -r > \v(filename)
22204 + RECEIVE \v(filename).reverse
22205 + Stores each incoming file with its lines sorted in reverse
22206 + order, under the name it arrived with, but with ".reverse"
22209 + SET RECEIVE FILTER sort -r > \v(filename)
22210 + RECEIVE \flower(\v(filename)).reverse
22211 + Like the previous example, but ensures that the filename is
22214 + Examples for binary mode:
22216 + SET RECEIVE FILTER gunzip -c > \v(filename)
22218 + This receives one or more presumably compressed file and
22219 + uncompresses each one into a file having the same name it was
22220 + sent with. For example, if the file is sent with the name
22221 + OOFA.TXT.GZ, it is stored with that name, even after
22224 + SET RECEIVE FILTER gunzip -c > \v(filename)
22225 + RECEIVE \flower(\fsubstring(\v(filename),1,\flength(\v(filename))-3))
22226 + Like the previous example, but the resulting filename has its
22227 + rightmost three characters removed from it and the remainder is
22228 + lowercased. So if the incoming filename is OOFA.TXT.GZ, it is
22229 + stored as oofa.txt after decompression.
22231 + Of course you don't want to type such long hideous commands, so we
22232 + have also introduced several new functions:
22234 + \fstripx(string[,character])
22235 + This function removes the rightmost segment of the string that
22236 + starts with the given character. If no character is given,
22237 + period (.) is used. Thus it is most conveniently used for
22238 + stripping the extension from a filename (or the decimal portion
22239 + from a floating-point number written in US/UK style). Examples:
22241 + \fstripx(OOFA.TXT.GZ) => OOFA.TXT
22242 + \fstripx(OOFA.TXT.GZ,.) => OOFA.TXT
22243 + \fstripx(OOFA.TXT.GZ,X) => OOFA.T
22244 + \fstripx(\fstripx(OOFA.TXT.GZ)) => OOFA
22245 + \fstripx($100.00) => $100
22247 + \fstripn(string,number)
22248 + Removes the rightmost number characters from the string.
22251 + \fstripn(OOFA.TXT.GZ) => OOFA.TXT.GZ
22252 + \fstripn(OOFA.TXT.GZ,3) => OOFA.TXT
22253 + \fstripn(OOFA.TXT.GZ,7) => OOFA
22255 + \fstripb(string[,c1[,c2]])
22256 + Strips enclosing matching braces, brackets, parentheses, or
22257 + quotes from the string. The second argument, c1, specifies
22258 + which kind of enclosure to look for; if not specified, any
22259 + enclosing (), [], <>, {}, "", '', or `' are removed. If c1 is
22260 + specified and c2 is not, then if c1 is an opening brace,
22261 + bracket, or parenthesis, the matching closing one is supplied
22262 + automatically as c2. If both c1 and c2 are specified, then to
22263 + be stripped the string must begin with c1 and end with c2. If
22264 + the string is not enclosed in the indicated manner, the result
22265 + is the original string. Examples:
22267 + \fstripb("abc") => abc
22268 + \fstripb([abc]) => abc
22269 + \fstripb([abc) => [abc
22270 + \fstripb(<abc>) => abc
22271 + \fstripb(<abc>,[) => <abc>
22272 + \fstripb((abc)) => abc
22273 + \fstripb((abc),[) => (abc)
22274 + \fstripb((abc),{(}) => abc
22275 + \fstripb(+abc+) => +abc+
22276 + \fstripb(+abc+,+) => abc
22277 + \fstripb(+abc+,+,^) => +abc+
22278 + \fstripb(+abc^,+,^) => abc
22279 + \fstripb('abc') => abc
22280 + \fstripb(`abc') => abc
22281 + \fstripb(``abc'') => `abc'
22282 + \fstripb(\fstripb(``abc'')) => abc
22284 + Notice the special syntax required for including a literal
22285 + parenthesis in the argument list. As the last two examples
22286 + illustrate, \fstripb() strips only one level at at a time;
22287 + nesting can be used to strip a small fixed number of levels;
22288 + loops can be used to strip larger or indeterminate numbers of
22291 + \flop(string[,char])
22292 + Removes the leftmost segment of the string that ends with the
22293 + given character. If no character is given, period (.) is used.
22296 + \flop(OOFA.TXT.GZ) => TXT.GZ
22297 + \flop(OOFA.TXT.GZ,.) => TXT.GZ
22298 + \flop(OOFA.TXT.GZ,X) => T.GZ
22300 + To remove the leftmost number characters, just use
22301 + \fsubstring(s,number+1). To return the rightmost number
22302 + characters, use \fright(s,number).
22304 + So the hideous example:
22306 + receive \flower(\fsubstring(\v(filename),1,\flength(\v(filename))-3))
22308 + can now be written as:
22310 + receive \flower(\fstripx(\v(filename)))
22312 + That is, the filename stripped of its extension and then lowercased.
22313 + This is not only shorter and less hideous, but also does not depend on
22314 + the length of the extension being 3.
22316 + Note that when a receive filter is in effect, this overrides your FILE
22317 + COLLISION setting, since Kermit has no way of knowing what the final
22318 + destination filename will be (because it does not know, and can not be
22319 + expected to know, the syntax of every version of every command shell
22320 + on every platform on the planet).
22321 + _________________________________________________________________
22323 + 4.2.4. Implicit Use of Pipes
22325 + If you wish, C-Kermit can also examine incoming filenames to see if
22326 + they start with "!", and if so, the subsequent text is treated as a
22327 + command to read from or write to. For example, if a Kermit client is
22328 + given the following command:
22330 + get {!finger | sort}
22332 + the server on the other end, if it supports this feature, will run the
22333 + "finger" program, pipe its standard output to the "sort" program, and
22334 + send sort's standard output back to you. Similarly, if you:
22336 + send oofa.txt !sort -r > oofa.new
22338 + or, equivalently:
22340 + send oofa.txt {!sort -r > oofa.new}
22344 + send /as-name:{!sort -r > oofa.new} oofa.txt
22346 + this has the receiver send the contents of the incoming oofa.txt file
22347 + to the sort program, which sorts the text in reverse order and stores
22348 + the result in oofa.new.
22350 + This use of the exclamation mark should be familiar to UNIX users as
22351 + the "bang" feature that lets you run an external application or
22352 + command from within another application.
22354 + Kermit's "bang" feature is disabled by default, since it is not
22355 + unheard for filenames to actually begin with "!". So if you want to
22356 + use this feature, you must enable it with the following command:
22358 + SET TRANSFER PIPES { ON, OFF }
22359 + ON enables the recognition of "!" notation in incoming
22360 + filenames during file transfer as an indicator that the
22361 + remaining text is the name of a command. OFF, the default,
22362 + disables this feature and uses the text as a filename in the
22363 + normal fashion. This command does NOT affect SEND /COMMAND, GET
22364 + /COMMAND, CSEND, etc.
22366 + So using a combination of CSEND (SEND /COMMAND) and the "bang"
22367 + feature, you can transfer a directory tree all in one command
22368 + (assuming the remote Kermit supports pipe transfers and has them
22371 + CSEND {tar cf - . | gzip -c} {!gunzip -c | tar xf -}
22375 + SEND /COMMAND:{tar cf - . | gzip -c} /as:{!gunzip -c | tar xf -}
22377 + Pay close attention to the syntax. Braces are needed around the
22378 + command because it contains spaces; braces are needed around the
22379 + as-name because it ends with "-". The as-name must begin with "!" or
22380 + receiving Kermit will not recognize it as a command. The CSEND command
22381 + must NOT begin with "!" unless you are running a command whose name
22382 + really does start that character.
22384 + Similarly, you have a Kermit server send a directory tree to be
22385 + unpacked on the client end:
22387 + CGET {!tar cf - . | gzip -c} {gunzip -c | tar xf -}
22391 + GET /COMMAND {!tar cf - . | gzip -c} /as:{gunzip -c | tar xf -}
22393 + Notice how, in this case, the bang is required in the remote command,
22394 + to distinguish it from a filename, but not in the local command, since
22395 + by definition of CGET (or GET /COMMAND), it is known to be a command.
22397 + SEND and RECEIVE FILTERs supersede the bang feature. For example, if a
22398 + file arrives under the name "!gunzip -c | tar xf -", but the receiving
22399 + Kermit also has been given a command like:
22401 + set receive filter sort -r > \v(filename)
22403 + then the incoming data will be sorted rather than gunzipped.
22405 + Finally, if SET TRANSFER PIPES is ON (and in this case, this must be
22406 + done in your C-Kermit initialization file), you can send from a pipe
22407 + on the C-Kermit command line:
22409 + kermit -s "!finger | sort -r" -a userlist
22411 + In this case the "filename" contains spaces and so must be quoting
22412 + using your shell's quoting rules.
22413 + _________________________________________________________________
22415 + 4.2.5. Success and Failure of Piped Commands
22417 + Commands or programs started by Kermit as a result of CSEND or
22418 + CRECEIVE commands, CGET, SEND /COMMAND, REDIRECT commands (see
22419 + [447]Section 4.2.8.2), implicit use of pipes, RUN commands, and so
22420 + forth, should return their exit status codes to the Kermit command
22421 + that caused them to be run, and therefore IF SUCCESS and IF FAILURE
22422 + tests after these commands should work as expected. For example:
22424 + CSEND blah < filename
22426 + should fail if there is no command called "blah" or if there is no
22427 + file called "filename". However, this is not foolproof and sometimes
22428 + C-Kermit might think a command succeeded when it failed, or vice
22429 + versa. This is most likely to happen when the highly system-dependent
22430 + methods that Kermit must use to determine a command's exit status code
22431 + do not supply the right information.
22433 + It can also happen because some commands might define success and
22434 + failure differently from what you expect, or because you are using a
22435 + pipeline composed of many commands, and one of them fails to pass
22436 + failing exit status codes up the chain. The most likely culprit is the
22437 + shell itself, which in most cases must be interposed between Kermit
22438 + and any external program to be run.
22440 + In any case, you can examine the following variable to find out the
22441 + exit status code returned to Kermit by the process most recently run
22442 + by any command that runs external commands or programs, including
22443 + CSEND, CRECEIVE, REDIRECT, RUN, etc:
22447 + In UNIX, Windows and OS/2, the value should be -2 if no command has
22448 + been run yet, 0 if the most recent command succeeded, -1, -3, or -4 if
22449 + there was an internal error, and a positive number returned by the
22450 + command itself if the command failed. If the number is in the range
22451 + 1-127, this is the program's exit status code. If it is 128 or
22452 + greater, this is supposed to indicate that the command or program was
22453 + interrupted or terminated from outside itself.
22455 + In Windows 95 and 98, the return values of the default shell are
22456 + unreliable; various third-party shells can be used to work around this
22459 + In VMS, it is the actual exit status code of the command that was run.
22460 + This is an odd number if the command succeeded, and an even number if
22461 + it failed. You can see the associated message as follows:
22463 + run write sys$output f$message(\v(pexitstat))
22465 + Or, more conveniently, use the new Kermit function:
22467 + echo \ferrstring(\v(pexitstat))
22469 + which converts a system error code (number) to the corresponding
22471 + _________________________________________________________________
22473 + 4.2.6. Cautions about Using Pipes to Transfer Directory Trees
22475 + Although utilities such as tar and zip/unzip might be available on
22476 + different platforms (such as UNIX and Windows), this does not
22477 + necessarily mean you can use them successfully to transfer directory
22478 + trees between unlike platforms. For example:
22480 + CSEND {tar cf - . | gzip -c} {!gunzip -c | tar xf -}
22482 + when used from UNIX to Windows will have satisfactory results for
22483 + binary files, but not for text files. UNIX text files have lines
22484 + ending with Linefeed (LF) only, whereas Windows text files have lines
22485 + ending in Carriage Return and Linefeed (CRLF). Thus any text files
22486 + that were in the archive formed by the first tar command will be
22487 + unpacked by the second tar command in their original form, and will
22488 + display and print incorrectly in Windows (except in applications that
22489 + have been explicitly coded to handle UNIX-format text files). On the
22490 + other hand if you told gzip to use "text mode" to do record format
22491 + conversion (assuming there was a way to tell it, as there is with most
22492 + "zip" programs), this would destroy any binary files in the archive.
22494 + Furthermore, if the archive contains text files that are written in
22495 + languages other than English, the "special" (accented and/or
22496 + non-Roman) characters are NOT translated, and are therefore likely
22497 + show up as gibberish on the target system. For example, West European
22498 + languages are usually encoded in ISO Latin Alphabet 1 in UNIX, but in
22499 + PC code page 850 on the PC. Capital A with acute accent is code point
22500 + 193 (decimal) Latin-1, but 181 in CP850. So A-acute in the UNIX file
22501 + becomes Middle Box Bottom on the PC, and similarly for all the other
22502 + special characters, and for all other languages -- Greek, Russian,
22503 + Hebrew, Japanese, etc.
22505 + So when transferring text files between unlike platforms, you should
22506 + use direct Kermit file transfers so Kermit can apply the needed
22507 + record-format and character-set transformations. Use pipelines
22508 + containing archivers like tar or zip only if all the files are binary
22509 + or the two systems use the same record format and character set for
22512 + Also see [448]Sections 4.3, [449]4.10, [450]4.11, and [451]4.15 for
22513 + how to transfer directory trees between both like and unlike systems
22514 + directly with Kermit.
22515 + _________________________________________________________________
22517 + 4.2.7. Pipes and Encryption
22519 + Of course pipelines could be used for encrypted file transfers,
22520 + assuming proper precautions could be taken concerning the transmission
22521 + of the key. But there is rarely a good way to do this. To illustrate
22522 + using UNIX crypt:
22524 + csend {crypt key < filename} {!crypt key > filename}
22526 + Or, more ambitiously:
22528 + csend {tar cf - . | gzip -c | crypt key} {!crypt key | gunzip -c | tar xf -}
22530 + transmits the key in the file header packet as part of the
22531 + (clear-text) remote command, defeating the entire purpose of
22532 + encrypting the file data.
22534 + But if you are connected in terminal mode to the remote computer and
22537 + creceive {crypt key > filename}
22539 + at the remote Kermit prompt, you have also transmitted the key in
22540 + clear text over the communications link.
22542 + At present, the only secure way to use CSEND and CRECEIVE with an
22543 + encryption filter is to have a human operator at both ends, so the key
22544 + does not have to be transmitted.
22546 + Theoretically it would be possible to use PGP software (Pretty Good
22547 + Privacy, by Phil Zimmerman, Phil's Pretty Good Software) to avoid key
22548 + transmission (since PGP uses separate public and private key and "lets
22549 + you communicate securely with people you've never met, with no secure
22550 + channels needed for prior exchange of keys"), but the specific method
22551 + has yet to be worked out.
22553 + HINT: See the PGP User's Guide, e.g. at:
22554 + [452]http://www.telstra.com.au/docs/PGP/
22555 + Especially the topic "Using PGP as a UNIX-Style Filter":
22556 + [453]http://www.telstra.com.au/docs/PGP/pgpdoc2/pgpdoc2_17.html
22558 + In any case, better and more convenient security options are now
22559 + available: Kerberos authentication and encryption ([454]CLICK HERE for
22560 + details) and the new ability to run C-Kermit "though" other
22561 + communication programs, described in [455]Section 2.7.
22562 + _________________________________________________________________
22564 + 4.2.8. Commands and Functions Related to Pipes
22566 + 4.2.8.1. The OPEN !READ and OPEN !WRITE Commands
22568 + These are described in [456]Using C-Kermit, and are generally useful
22569 + with reading output from commands that produce more than one line on
22570 + their standard output, or writing multiple lines into commands that
22571 + accept them on their standard input.
22573 + In C-Kermit 7.0 CLOSE !READ is accepted as a synonym for CLOSE READ,
22574 + and CLOSE !WRITE for CLOSE WRITE.
22576 + Testing the success and failure of these commands, however, can be a
22577 + bit tricky. Consider:
22579 + open !read lalaskjfsldkfjsldkfj
22581 + (where "lalaskjfsldkfjsldkfj" is neither a valid command nor the name
22582 + of a program or script that can be run). OPEN !READ, in UNIX at least,
22583 + translates this into execl(shellpath,shellname,"-c",command). This
22584 + means it starts your preferred shell (e.g. from the SHELL environment
22585 + variable) and asks it to execute the given command. It must be this
22586 + way, because your command can be a either an internal shell command
22587 + (which only your shell can execute) or an external command, which only
22588 + your shell knows how to find (it knows your PATH and interprets, etc).
22589 + Therefore unless OPEN !READ can't start your shell, it always
22592 + Continuing with the nonexistent-command example:
22594 + C-Kermit> open !read lalaskjfsldkfjsldkfj
22597 + C-Kermit> read line
22600 + C-Kermit> echo "\m(line)"
22601 + "bash: lalaskjfsldkfjsldkfj: command not found"
22602 + C-Kermit> close read
22607 + In other words, the failure can not be detected on OPEN, since the
22608 + OPEN command succeeds if it can start your shell. It can't be detected
22609 + on READ, since all this does is read output from the shell, which in
22610 + this case happens to be an error message. However, failure IS detected
22611 + upon close, since this is the occasion upon which the shell gives
22612 + Kermit its exit status code.
22614 + For an illustration of this situation, see [457]Section 2.14.
22615 + _________________________________________________________________
22617 + 4.2.8.2. The REDIRECT Command
22619 + A second method of I/O redirection is offered by the REDIRECT command.
22620 + This is a rather advanced and tricky feature that is presently
22621 + supported only in UNIX C-Kermit, in OS-9 C-Kermit, and in Kermit 95.
22625 + Runs the given command, sending its standard output to the
22626 + current communications channel (SET LINE, SET PORT, or SET HOST
22627 + connection), and reading its standard input from the same
22628 + connection. Works only in local mode -- i.e. a connection is
22629 + required -- and then only if the given command uses Standard
22636 + runs the local "finger" command and sends its output over the
22637 + connection as plain text, where presumably there is a process set up
22638 + to read it. Another example:
22640 + redirect finger | sort -r
22642 + shows the use of a pipeline.
22644 + Note: REDIRECT differs from CSEND/CRECEIVE in two important ways: (1)
22645 + it does not use the Kermit protocol, and (2) it uses a bidirectional
22646 + pipe rather than a one-way pipe.
22648 + The primary use of the REDIRECT command is to run external protocols,
22649 + such as sz/rz in UNIX for ZMODEM, when they work over Standard I/O(*).
22652 + set host xyzcorp.com
22654 + redirect sz oofa.zip
22656 + lets you make a Telnet connection with C-Kermit and then do a ZMODEM
22657 + transfer over it. ZMODEM protocol messages go both ways over the same
22658 + connection simultaneously.
22660 + It is possible to use C-Kermit on UNIX as your PPP dialer and then to
22661 + REDIRECT the connection to the PPP software, but C-Kermit 7.0 offers a
22662 + better approach to PPP dialing in its new EXEC command ([458]Section
22665 + In theory, you can also redirect an interactive process. For example,
22666 + suppose you tell Kermit 95 to wait for an incoming TCP/IP connection:
22670 + and then tell C-Kermit on UNIX to:
22672 + set host kermit95hostname 3000
22675 + and then tell Kermit 95 to CONNECT: now you are talking to the UNIX
22676 + K-shell; you can give commands (pwd, ls, etc) and see the results. In
22677 + practice, the K-shell's terminal modes are messed up because (a) it is
22678 + not going through the Unix terminal driver, and (b) it is "smart" and
22679 + knows it is being redirected, and so acts in a decidedly inhospitable
22680 + manner (other applications like EMACS, vi, etc, simply refuse to run
22681 + if their standard i/o has been redirected).
22683 + (*) The publicly-distributed sz/rz programs do not work as clients.
22684 + However, Omen Technology does offer an up-to-date redirectable
22685 + client XYZMODEM program called crzsz.
22686 + _________________________________________________________________
22688 + 4.2.8.3. Receiving Mail and Print Jobs
22690 + As of 7.0, and in UNIX only, files that are sent to C-Kermit as mail
22691 + (when the other Kermit uses a MAIL or SEND /MAIL command) or to be
22692 + printed (via REMOTE PRINT or SEND /PRINT) are now piped directly to
22693 + the mail or print program, rather than written to temporary files and
22694 + then mailed or printed and then deleted. This has the advantages of
22695 + (a) not requiring a temporary file, and (b) allowing mail to have a
22696 + proper subject in place of the filename. Temporary files were bad not
22697 + only because they required (a) space, and (b) writeability of the
22698 + current directory, but also because using them could result in wiping
22699 + out an existing file. See [459]Section 4.7 for more about SEND /MAIL
22701 + _________________________________________________________________
22703 + 4.2.8.4. Pipe-Related Functions
22705 + The \fcommand(command) function runs the given shell or system command
22706 + and returns the command's standard output as its value (with any
22707 + newline characters stripped from the end), unless the result is too
22708 + long, in which case it returns the empty string. The maximum length
22709 + for the result is at least 1022 bytes, and it might be longer on some
22710 + platforms. Examples (UNIX):
22712 + C-Kermit> echo "\fcommand(date)"
22713 + "Fri Apr 18 13:31:42 1997"
22714 + C-Kermit> echo "\fcommand(finger | wc -l)" ; how many users logged in?
22716 + C-Kermit> evaluate \fcommand(finger | wc -l) * 2
22718 + C-Kermit> echo Welcome to \fcommand(tty) on \fcommand(date)
22719 + Welcome to /dev/ttyre on Fri Apr 18 13:31:42 1997
22720 + C-Kermit> echo "\fcommand(ls oofa.*)"
22724 + C-Kermit> cd /directory-with-thousands-of-files
22725 + C-Kermit> echo "\fcommand(ls -l)" ; This would be too long
22729 + If a command's output would be too long, you can use the other, more
22730 + laborious method of reading from a command: OPEN !READ command, READ
22731 + each line, CLOSE !READ.
22733 + The \frawcommand(command) function is identical to \fcommand(command),
22734 + except it does not remove trailing newline characters:
22736 + C-Kermit> echo "\frawcommand(date)"
22737 + "Fri Apr 18 13:31:42 1997
22739 + C-Kermit> echo "\frawcommand(ls oofa.*)"
22746 + Use \frawcommand() if you want to retain the final line terminators,
22747 + or if the command's output is "binary". But remember that if the
22748 + result of this (or any other) function contains any NUL (ASCII code 0)
22749 + characters, the first NUL will terminate the result string because
22750 + this is how C strings work (it's "C-Kermit", remember?).
22752 + These functions are useful not only locally, but also in the
22753 + client/server arena. If you need to get the results from a system
22754 + command on the server end into a variable on the client end, just do:
22756 + [ remote ] query kermit command(date)
22758 + The result is in the local \v(query) variable; see [460]Using
22759 + C-Kermit, 2nd Ed., pp.359-360 for details.
22760 + _________________________________________________________________
22762 + 4.3. Automatic Per-File Text/Binary Mode Switching
22764 + When transferring files between like systems (e.g. UNIX-to-UNIX),
22765 + binary mode can be used for all files unless character-set translation
22766 + is needed, and in fact Kermit programs of recent vintage recognize
22767 + each others' platforms and switch to binary mode automatically when it
22768 + is appropriate (e.g. DOS to OS/2, or UNIX to UNIX). (Exception:
22769 + LABELED mode is chosen for VMS-to-VMS and OS/2-to-OS/2 transfers so
22770 + complex file formats can be preserved.)
22772 + On a client/server connection between like systems, the transfer mode
22773 + is currently determined by the file sender, rather than always by the
22774 + client. If the client is sending, it controls the transfer mode. If a
22775 + GET command is sent to the server, the server sends all files in
22776 + binary mode if its TRANSFER CHARACTER-SET is TRANSPARENT; otherwise it
22777 + uses text mode for text files (according to its text-pattern list) and
22778 + binary mode for binary files. Of course, the client can control the
22779 + server's transfer character-set with the REMOTE SET TRANSFER
22780 + CHARACTER-SET command.
22782 + When transferring files between unlike systems, however, (e.g.
22783 + UNIX-to-DOS), some files (such as executable program images) must be
22784 + transferred in binary mode but others (such as plain-text files) must
22785 + be transferred in text mode so their record format and character sets
22786 + can be appropriately converted. If a binary file is transferred in
22787 + text mode, it is ruined. If a text file is transferred in binary mode,
22788 + then at the very least, its format can be incorrect; at worst it is
22789 + also corrupted because its character set was not converted (in extreme
22790 + cases the corruption is total, e.g. because one system is ASCII-based
22791 + and the other EBCDIC).
22792 + _________________________________________________________________
22794 + 4.3.1. Exceptions
22796 + VMS C-Kermit, when sending files to a non-VMS system, switches to text
22797 + or binary mode automatically for each file, based on the record format
22798 + in the file's directory entry; thus the mechanisms described in this
22799 + section do not apply to VMS C-Kermit, yet the effect is the same:
22800 + automatic text/binary mode switching when VMS C-Kermit is sending
22801 + files. See the VMS Appendix of [461]Using C-Kermit for details.
22803 + Kermit versions that support LABELED or IMAGE transfer mode are
22804 + likewise not affected by this feature when one of those modes is
22805 + selected (normally used only when transferring between like systems).
22807 + Kermit versions that support file-transfer pipes and filters are not
22808 + affected by this feature when pipes or filters are used, since the
22809 + output of a pipe or filter (such as gzip) is likely to require
22810 + transfer in a different mode than the original file.
22812 + Finally, SEND /TEXT or SEND /BINARY will force files to be sent in the
22813 + indicated mode, overriding all automatic transfer-mode-choosing
22815 + _________________________________________________________________
22819 + Suppose you give C-Kermit a command like:
22823 + And suppose the pattern *.* matches a mixture of text files (such as
22824 + program source code) and binary files (such os object modules or
22825 + executable programs).
22827 + C-Kermit 6.0 and earlier (except on VMS) send all files in the same
22828 + mode: whatever you said in your most recent SET FILE TYPE command, or
22829 + else whatever mode was chosen automatically according to the rules on
22830 + page 236 of Using C-Kermit, 2nd Ed.
22832 + But when text and binary files are mixed in the same group, and the
22833 + files are being transferred to an unlike system (e.g. UNIX to IBM
22834 + Mainframe), this results in corruption of either all the text files or
22835 + all the binary files.
22837 + Stream-oriented file systems such as in UNIX and DOS do not record any
22838 + information about the file to tell us whether the file should be
22839 + transferred in binary or text mode, making it impossible to select the
22840 + transfer mode for each file in a group automatically with any
22843 + However, we can use some fairly-well established file naming
22844 + conventions for this purpose. C-Kermit 7.0 lets you provide lists of
22845 + filename patterns that are used to separately determine the file type
22846 + for each individual file being transfered. A pattern is a string,
22847 + possibly containing the special characters "*" (asterisk, which
22848 + matches any string of zero of more characters) and/or "?" (question
22849 + mark, which matches any single character). For example "a*b" matches
22850 + all files whose names start with "a" and end with "b", such as "ab",
22851 + "arb", "ababababab", etc, but not "abba". And "a?b" matches any file
22852 + whose name starts with "a", ends with "b", and is exactly 3 characters
22855 + NOTE: When typing commands at the C-Kermit prompt, you must prefix
22856 + "?" with \ to override its normal function of giving help.
22858 + (Also see [462]Section 4.9 for additional pattern-matching notations
22859 + that might be available in your version of C-Kermit.)
22861 + When you have specified filename recognition patterns, C-Kermit can
22862 + transfer the ones whose names match any of the binary-mode patterns in
22863 + binary mode, and those with names that match any of the text-mode
22864 + patterns in text mode, and those whose names match neither in the
22865 + prevailing mode you have chosen, or that was chosen automatically via
22866 + peer recognition.
22867 + _________________________________________________________________
22871 + SET FILE PATTERNS { ON, OFF, AUTO }
22872 + This tells Kermit whether to do per-file filename
22873 + pattern-matching to determine text or binary mode. The normal
22874 + and default setting is AUTO, which means to use pattern lists
22875 + to switch transfer mode only when it is certain that the other
22876 + Kermit program supports automatic notification of transfer mode
22877 + (via Attribute packets) on a per-file basis (this information
22878 + is obtained automatically during protocol startup negotiation).
22879 + ON means to always determine the transfer mode from the
22880 + filename and pattern list when sending files. Use OFF to
22881 + disable this feature (without resetting your pattern lists).
22882 + Also note that if you have selected LABELED file transfer (SET
22883 + FILE TYPE LABELED), this takes precedence over
22884 + filename-matching patterns and all files are sent in labeled
22887 + SET TRANSFER MODE MANUAL
22888 + Disables the use of filename patterns, no matter what the FILE
22889 + PATTERNS setting.
22891 + REMOTE SET TRANSFER MODE MANUAL
22892 + Client command to disable automatic transfer mode, and
22893 + therefore also filename patterns, in the server. Synonym:
22894 + REMOTE SET XFER MODE MANUAL.
22896 + { GET, SEND, etc } { /BINARY, /TEXT }
22897 + Including a /BINARY or /TEXT (or, where supported, /IMAGE or
22898 + /LABELED) switch with a file-transfer command changes the
22899 + transfer mode to manual for that command only, and therefore
22900 + disables patterns that that command.
22902 + SET FILE BINARY-PATTERNS [ pattern [ pattern [ pattern ... ] ] ]
22903 + A list of zero or more patterns, separated by spaces (not
22904 + commas). Letters in a pattern are case-sensitive if the
22905 + underlying filenames are case sensitive (as in UNIX), and
22906 + case-insensitive otherwise (as in Windows). If a file's name is
22907 + matched by any pattern in the list and SET FILE PATTERNS is ON,
22908 + the file is sent in binary mode. Examples:
22910 + SET FILE BINARY-PATTERNS *.gz *.Z *.tar *.zip *.o *.so *.a *.out ; UNIX
22911 + SET FILE BINARY-PATTERNS *.EXE *.ZIP *.OBJ *.COM ; DOS or OS/2 or Windows
22913 + If a pattern contains spaces, enclose it in braces.
22915 + SET FILE TEXT-PATTERNS [ pattern [ pattern [ pattern ... ] ] ]
22916 + Like SET FILE BINARY-PATTERNS, but the patterns choose text
22917 + files rather than binary ones. Examples:
22919 + SET FILE TEXT-PATTERNS *.TXT *.KSC *.HTM* *.BAT ; DOS, Windows, OS/2
22921 + ADD BINARY-PATTERNS [ pattern [ pattern [ pattern ... ] ] ]
22922 + Adds one or more patterns to the BINARY-PATTERN list.
22924 + ADD TEXT-PATTERNS [ pattern [ pattern [ pattern ... ] ] ]
22925 + Adds one or more patterns to the TEXT-PATTERN list.
22927 + REMOVE BINARY-PATTERNS [ pattern [ pattern [ pattern ... ] ] ]
22928 + Removes one or more patterns from the BINARY-PATTERN list. The
22929 + given patterns are matched with the ones in the BINARY-PATTERNS
22930 + list with case sensitivity if the underlying file system has
22931 + case-sensitive names (as do UNIX and OS-9), otherwise with case
22934 + REMOVE TEXT-PATTERNS [ pattern [ pattern [ pattern ... ] ] ]
22935 + Removes one or more patterns from the TEXT-PATTERN list.
22938 + Displays the current pattern selections.
22940 + Whenever you give a SET FILE BINARY-PATTERNS or SET FILE TEXT-PATTERNS
22941 + command, the previous list is replaced. If you give one of these
22942 + commands without a pattern list, the previous list is removed.
22944 + When patterns are active and files are being sent, text patterns (if
22945 + any) are applied first (but only if not RESENDing and not sending in
22946 + LABELED mode), then binary patterns, so if the same pattern appears in
22947 + both lists, binary mode is chosen.
22948 + _________________________________________________________________
22952 + Here's an example that might be used when sending files from UNIX:
22954 + set file type binary
22955 + set file text-patterns *.c *.h *.w *.txt makefile
22956 + set file binary-patterns *.o
22957 + msend makefile wermit wart ck*.[cwho] ck*.txt
22959 + Note that "wermit" and "wart" do not match any patterns so they are
22960 + sent in the prevailing mode, which is binary. Also note the use of
22961 + "makefile" as a pattern that does not contain any wildcard characters
22962 + (there is no other convention to distinguish among "wermit" and
22963 + "wart", which are binary executables, and "makefile", which is a text
22964 + file, purely by their names).
22966 + Most C-Kermit implementations have a default pattern list built in,
22967 + which includes patterns that are almost certain to succeed in picking
22968 + the right transfer mode. Others are omitted due to ambiguity. For
22969 + example ".hlp", and ".ini" are generally binary types in Windows but
22970 + text types everywhere else.
22972 + NOTE: ".doc", used for decades to denote plain-text documentation
22973 + files, now more often than not denotes a Microsoft Word Document,
22974 + so ".doc" is now considered a binary type since it does less harm
22975 + to transfer a plain-text document in binary mode than it does to
22976 + transfer an MS Word file in text mode (except when IBM mainframes
22979 + ANOTHER NOTE: ".com" files are binary in DOS-like operating
22980 + systems, but they are text (DCL command procedures) in VMS. VMS
22981 + C-Kermit sends .COM files in text mode; K95 sends them in binary
22982 + mode. If you download a .COM file from VMS to DOS or Windows, and
22983 + then upload it to another VMS system, be sure to use SEND /TEXT to
22984 + preserve its textness.
22986 + You can see the default pattern list by starting C-Kermit without its
22987 + initialization file (e.g. "kermit -Y") and using the SHOW PATTERNS
22988 + command. If you will be depending on this feature, be sure to examine
22989 + the list carefully in conjunction with the applications that you use.
22991 + The default pattern list does not take "backup files" into account
22992 + because (a) people usually don't want to transfer them; and (b) it
22993 + would make the pattern lists more than twice as long. For example, we
22994 + would need to include both *.txt and *.txt.~[0-9]*~ for ".txt" files,
22995 + and similarly for all the others. Instead, you can use SEND /NOBACKUP
22996 + (or SET SEND BACKUP OFF) to skip over all backup files.
22998 + Put your most commonly-used safe pattern declarations in your C-Kermit
22999 + customization file (ckermod.ini, .mykermrc, k95custom.ini, etc).
23001 + As noted, SET FILE PATTERNS is ON by default. Sometimes, however, it
23002 + is desirable, or necessary, to force files to be sent in a particular
23003 + mode, and often this must be done from the command line (e.g. when
23004 + using Kermit as a download helper in a Web browser like Lynx). The -V
23005 + command-line options is equivalent to SET FILE PATTERNS OFF and SET
23006 + TRANSFER MODE MANUAL. Example:
23008 + kermit -Vis oofa.txt
23010 + forces oofa.txt to be sent in binary mode, even though ".txt" might
23011 + match a text pattern.
23012 + _________________________________________________________________
23014 + 4.4. File Permissions
23016 + "Permissions" refers to a code associated with a file that specifies
23017 + who is allowed to access it, and in what manner. For example, the
23018 + owner, the members of one or more groups, the system administrator,
23019 + and everybody else, might be allowed various combinations of Read,
23020 + Write, Append, Execute, or Listing access.
23022 + The permission code goes by different names on different platforms. In
23023 + UNIX, it might be called the filemode. In VMS, it is called the file
23024 + protection (or protection mask).
23026 + The comments in this section presently apply only to the UNIX and VMS
23027 + versions of C-Kermit, to which these features were added in version
23028 + 7.0; the DOS, Windows, and OS/2 file systems embody no notions of
23029 + protection, and so MS-DOS Kermit and Kermit 95 do not send file
23030 + permissions, and ignore them when received.
23032 + The permissions for a received file are determined by a combination of
23033 + the file transfer mode (VMS-to-VMS transfers only), whether a file of
23034 + the same name exists already, whether permissions of the file are
23035 + received in the file attribute packet, and the setting of ATTRIBUTES
23038 + The default for ATTRIBUTES PROTECTION is ON. If no attributes are
23039 + received, the effect is the same as if attributes PROTECTION were OFF.
23041 + For VMS-to-VMS transfers, the default LABELED mode simply copies the
23042 + protection code from source to destination.
23043 + _________________________________________________________________
23045 + 4.4.1. When ATTRIBUTES PROTECTION is OFF
23047 + If no file of the same name exists, system defaults determine the
23048 + permissions of the new file. Otherwise, the actions taken depend on
23049 + the current FILE COLLISION setting: BACKUP, OVERWRITE, RENAME, etc, as
23050 + documented in [463]Using C-Kermit. But now the new file (if it is
23051 + created at all) automatically inherits the permissions (mode bits) of
23052 + the existing file in a way that is appropriate for the platform.
23056 + All mode bits are inherited except the directory bit, since the
23057 + incoming file can not possibly be a directory. (In any case, it is not
23058 + possible to receive a file that has the same name as an existing
23059 + directory unless FILE COLLISION is set to RENAME).
23063 + Files with the same name as an existing file, transferred in modes
23064 + other than LABELED between VMS systems, inherit the protection of the
23066 + _________________________________________________________________
23068 + 4.4.2 When ATTRIBUTES PROTECTION is ON
23070 + File permissions can be conveyed as part of the file transfer process,
23071 + in accordance with the Kermit protocol definition. If the file sender
23072 + puts system-dependent and/or system-independent versions of the file
23073 + protection (permissions) into the Attribute (A) packet, the file
23074 + receiver can set the new file's permissions from them. Otherwise, the
23075 + permissions are set the same as for ATTRIBUTES PROTECTION OFF.
23077 + When the incoming A packet contains system-dependent permissions, the
23078 + file receiver checks to see if the sender has the same system ID (e.g.
23079 + both the sending and receiving systems are UNIX, or both are VMS); if
23080 + so, it decodes and uses the system-dependent permissions; otherwise it
23081 + uses the generic ones (if any) and applies them to the owner field,
23082 + setting the other fields appropriately as described in the following
23085 + Setting the incoming file's protection from the A packet is controlled
23086 + by SET ATTRIBUTES PROTECTION (or PERMISSION), which is ON by default,
23087 + and its status is displayed by SHOW ATTRIBUTES.
23089 + The main benefit of this feature is to not have to "chmod +x" an
23090 + executable file after transfer from UNIX to UNIX. Its cross-platform
23091 + benefits are less evident, perhaps to retain the status of the Unix
23092 + 'x' bit on a VMS system, for subsequent transfer back to a Unix
23094 + _________________________________________________________________
23096 + 4.4.2.1. System-Specific Permissions
23098 + System-specific file permissions are used when the two Kermit programs
23099 + recognize each other as running on the same type of system. For
23100 + example, both are running under some form of UNIX (it doesn't matter
23101 + which UNIX variation -- HP-UX, Solaris, AIX, etc -- all use the same
23102 + scheme for file permissions); or both are running under VMS (even if
23103 + one is on an Alpha and the other on a VAX, and/or one is old and the
23108 + UNIX supports three categories of users, File Owner, Group, and World,
23109 + and three types of file access permission: Read, Write, and Execute.
23110 + Thus, a UNIX file's permissions are expressed in 9 bits.
23112 + The system-dependent permission string for UNIX is a 3-digit octal
23113 + string, the low-order 9 bits of the st_mode member of the stat struct;
23114 + we deliberately chop off the "file format" bits because they are not
23115 + permissions, nor do we convey the setuid/setgid bits, lock bit, sticky
23120 + VMS supports four categories of users, System, File Owner, Group, and
23121 + World, and four types of file access permission: Read, Write, Execute,
23122 + and Delete. Thus, a VMS file's permissions are expressed in 16 bits.
23124 + The system-dependent protection string for VMS is a 4-digit
23125 + hexadecimal string, corresponding to the internal-format protection
23126 + word of the file (RWED for each of World,Group,Owner,System). A new
23127 + file normally gets all 16 protection bits from the original file of
23130 + Note: VMS-to-VMS transfers take place in LABELED mode when the two
23131 + C-Kermits recognize each other's platform as VMS (unless you have
23132 + disabled LABELED-mode transfers). In this case, all of a file's
23133 + attributes are preserved in the transfer and the protection mask (and
23134 + other information) is taken from the file's internal information, and
23135 + this takes precedence over any information in the Attribute packets.
23136 + You can defeat the automatic switching into LABELED mode (if you want
23137 + to) with SET TRANSFER MODE MANUAL.
23138 + _________________________________________________________________
23140 + 4.4.2.2. System-Independent Permissions
23142 + The system-independent ("generic") protection is used when the system
23143 + IDs of the two Kermit programs do not agree (e.g. one is UNIX, the
23144 + other is VMS). The generic protection attribute includes the following
23145 + permissions (not all are applicable to every file system): Read,
23146 + Write, Append, Execute, Delete, Search. The generic permissions are
23147 + derived from the owner permissions of the source file, thus, a Unix
23148 + 'w' permission becomes VMS Write,Delete.
23150 + The Owner field of the new file's permissions is set from the incoming
23151 + generic protection attribute.
23153 + In UNIX, the Group and World permissions are set according to your
23154 + umask, except that execute permission is NOT set in these fields if it
23155 + was not also set in the generic protection (and consequently, is set
23156 + in the Owner field).
23158 + In VMS, the System, Group, and World permissions are set according to
23159 + the process default file permission (as shown in VMS by SHOW
23160 + PROTECTION), except that no permissions are allowed in these fields
23161 + that are not included in the generic permissions.
23163 + Note that the VMS and UNIX interpretations of Execute permission are
23164 + not identical. In UNIX, a file (binary executable, shell script, etc)
23165 + may not be executed unless it has Execute permission, and normally
23166 + files that are not intended for execution do not have Execute
23167 + permission. In VMS, Read permission implicitly supplies Execute
23168 + capability. Generally files that have Read permission also have
23169 + explicit Execute permission, but files (binary executables, DCL
23170 + command procedures) that have Read permission and not Execute
23171 + permission can still be executed.
23172 + _________________________________________________________________
23174 + 4.5. File Management Commands
23176 + 4.5.1. The DIRECTORY Command
23178 + Prior to C-Kermit 7.0, the DIRECTORY command always ran an external
23179 + system command (such as "ls" on UNIX) or program to product the
23180 + directory listing. This had certain advantages, mostly that you could
23181 + include system-dependent options for customized listings, e.g. on
23184 + dir -lt c* | more
23188 + directory /size/date/protection/except=*.obj oofa.*;0
23190 + This approach, however, carries some disadvantages: C-Kermit can't
23191 + return SUCCESS or FAILURE status for (e.g.) "dir foo" according to
23192 + whether the file "foo" exists; and it runs an inferior process, which
23193 + might be a problem in some environments for resource and/or security
23194 + reasons, and won't work at all in a "nopush" environment (e.g. one in
23195 + which C-Kermit is configured to forbid access to exterior commands and
23196 + programs, e.g. in a VMS "captive account").
23198 + In C-Kermit 7.0 on VMS and UNIX, and in K95 1.1.19 and later, the
23199 + DIRECTORY command is internal to Kermit. It can be run in a "nopush"
23200 + environment and returns SUCCESS or FAILURE status appropriately. In
23201 + UNIX it prints all dates and times in a consistent way (unlike ls). In
23202 + VMS it prints precise file sizes, rather than "blocks". It offers
23203 + several formatting and other options, but it is not necessarily more
23204 + flexible than the corresponding external commands or programs (the
23205 + UNIX "ls" program, the VMS "directory" command). The syntax is:
23207 + DIRECTORY [ switch [ switch [ ... ] ] ] [ filespec ]
23209 + If no filespec is given, all files in the current directory are
23212 + Optional switches include all the standard file-selection switches
23213 + presented in [464]Section 1.5.4, plus:
23216 + Show both regular files and directories; this is the default.
23219 + Instead of displaying a directory listing, put the files that
23220 + would have been shown (based on the filespec and other
23221 + selection switches) in the given array. The array need not (and
23222 + should not) be predeclared; if the array already exists, it is
23223 + destroyed and reused. The array name can be a single letter,
23224 + like "a", or any fuller form, such as "&a", "\&a", "\&a[]",
23225 + etc. If the /ARRAY switch is included, the following other
23226 + switches are ignored: /BRIEF, /VERBOSE, /HEADING, /PAGE,
23227 + /ENGLISHDATE, /ISODATE, /XFERMODE, /MESSAGE, /SORT, /REVERSE,
23228 + /ASCENDING. In other words, only file selection switches are
23229 + meaningful with /ARRAY: /FILES, /DIRECTORIES, /ALL, /DOTFILES,
23230 + /NOBACKUP, /RECURSIVE, /SMALLER, /LARGER, /AFTER, /BEFORE,
23231 + /EXCEPT, etc. The resulting array has the number of files (n)
23232 + as its 0th element, and the filenames in elements 1 through n
23235 + dir /array:&a /files /nobackup /after:19990101 /larger:10000 [ab]*
23239 + Only show regular files.
23242 + Only show directories.
23245 + In UNIX, OS-9, K-95, and other versions that support SET FILE
23246 + COLLISION BACKUP and create backup files by appending .~n~ to
23247 + the filename (where "n" is a number), /BACKUP means to include
23248 + these files in directory listings. This is the default.
23251 + This is the opposite of /BACKUP: that is, do not include backup
23252 + files in the listing.
23255 + List filenames only; use a compact format, as many filenames as
23256 + will fit across the screen (based on the longest name). A brief
23257 + listing is always sorted alphabetically.
23260 + List one file per line, and include date, size, and (in UNIX
23261 + only) permissions of each file. This is the opposite of /BRIEF,
23262 + and is the default.
23265 + Pause at the end of each screenful and give a "more?" prompt,
23266 + even if SET COMMAND MORE-PROMPTING is OFF.
23269 + Don't pause at the end of each screenful and give a "more?"
23270 + prompt, even if SET COMMAND MORE-PROMPTING is ON. If neither
23271 + /PAGE or /NOPAGE is given, paging is according to the
23272 + prevailing COMMAND MORE-PROMPTING setting (which can be
23273 + displayed with SHOW COMMAND).
23276 + Show dates in dd-mmm-yyyy format; mmm is the first three
23277 + letters of the English month name.
23280 + Show dates in yyyy-mm-dd format; mm is the month number, 1-12.
23281 + This is the opposite of /ENGLISHDATE, and is the default.
23284 + Print a heading before the listing and a summary at the end.
23287 + Don't print a heading before the listing or a summary at the
23288 + end. This is the opposite of /HEADINGS, and is the default.
23291 + Only in Kermit programs that support SET FILE PATTERNS. If this
23292 + switch is included, and the filename matches any FILE
23293 + BINARY-PATTERN ([465]Section 4.3), "(B)" is printed after the
23294 + filename; otherwise, if it matches a FILE TEXT-PATTERN, "(T)"
23298 + Don't display transfer-mode indicators. This is the opposite of
23299 + /XFERMODE and is the default.
23302 + Show files not only in the given directory, but also in its
23303 + subdirectories (if any), their subdirectories, etc.
23306 + Don't show files in subdirectories. This is the opposite of
23307 + /RECURSIVE, and is the default.
23310 + This lets you specify a short text string to be appended to the
23311 + end of each directory listing line (a space is supplied
23312 + automatically). If the text contains any spaces, enclose it in
23313 + braces, e.g. /MESSAGE:{two words}.
23316 + Don't append any message to the end of each directory listing
23319 + /SORT:[{NAME,SIZE,DATE}]
23320 + Sort the listing by name, size, or date. If the /SORT switch is
23321 + given but the "sort-by" keyword is omitted, the listing is
23322 + sorted by name. /SORT:NAME /ASCENDING (alphabetic sort by name)
23326 + Don't sort the listing. Files are listed in whatever order they
23327 + are supplied by the operating system, e.g. inode order in UNIX.
23330 + If the /SORT switch is given, reverse the order of the sort.
23331 + Synonym: /DESCENDING.
23334 + If the /SORT switch is given, sort the listing in normal order.
23335 + This is the opposite of /REVERSE and is the default.
23337 + Note that most of the DIRECTORY-specific switches come in pairs, in
23338 + which one member of a pair (e.g. /NOHEADINGS) is the opposite of the
23339 + other (e.g. /HEADINGS).
23341 + If you always want to use certain options, you can set them with the
23342 + SET OPTIONS DIRECTORY command ([466]Section 1.5.5). Use SHOW OPTIONS
23343 + to list the options currently in effect. To make the desired options
23344 + apply every time you run C-Kermit, put a SET OPTIONS DIRECTORY command
23345 + in your C-Kermit customization file, specifying the desired options.
23346 + Options set in this manner apply to every subsequent DIRECTORY
23347 + command. Of course, if you include switches in a DIRECTORY command,
23348 + these override any defaults, built-in or custom. Example:
23350 + DIRECTORY ; Use "factory defaults"
23351 + SET OPTIONS DIRECTORY /SORT:SIZE /REVERSE /HEADINGS ; Customize defaults
23352 + DIRECTORY ; Use customized defaults
23353 + DIR /SORT:NAME ; Override customized default SORT key
23354 + SET OPT DIR /RECURS ; Add /RECURSIVE to customized defaults
23355 + DIR /ASCEND ; Override customized default SORT order
23359 + * Only a single sort key is supported; there is presently no way to
23360 + have multiple sort keys.
23361 + * If the /BRIEF switch is given, all other switches (except
23362 + /[NO]RECURSIVE, /[NO]DOTFILES, /DIRECTORIES, /FILES, and /ALL) are
23364 + * /SORT:anything gives incorrect results if any files have lengths
23365 + greater than 10 digits (i.e. that are more than 9999999999 bytes
23366 + long, i.e. if they are 10GB or more in size) because the overlong
23367 + length field causes the date and name fields to be misaligned.
23368 + * /SORT:NAME is redundant in VMS since VMS returns filenames in
23369 + alphabetic order anyway.
23370 + * /SORT:NAME ignores alphabetic case on platforms where case does
23371 + not matter in filenames, but this works only for unaccented Roman
23373 + * /SORT:NAME is currently based on code values, and so works fine
23374 + for ASCII, but will probably produce unexpected results for files
23375 + with non-ASCII or 8-bit characters in their names. (Locale-based
23376 + sorting raises rather significant issues of portability, size,
23377 + performance, etc.)
23378 + * /SORT:DATE works right only for ISO-format dates, not English
23380 + * /SORT:SIZE sorts the size field lexically. On some platforms (e.g.
23381 + Windows), the size of a directory file is listed as "<DIR>" rather
23382 + than as a number; in this case, the "<DIR>" files are gathered at
23383 + the end (or beginning, depending on the sort order) of the
23385 + * /RECURSIVE is accepted but ignored in AOS/VS. Use the normal
23386 + system-specific filespec notation, e.g. "dir #.txt".
23387 + * /RECURSIVE has no affect when a full, absolute pathname is given;
23388 + e.g. "dir /recursive /tmp/foo" (where "foo" is a regular file)
23389 + only shows the "/tmp/foo" file. If you want to see all "foo" files
23390 + in the /tmp tree, do "cd /tmp" and then "dir /recursive foo".
23391 + * If a file size of -1 is shown, or date-time of 0000-00-00
23392 + 00:00:00, this means the file was located, but access to
23393 + information about the file was denied to C-Kermit.
23394 + * In VMS, if FOO.DIR;1 is a directory within your current directory,
23395 + "directory foo" and "directory [.foo]" list the files in the
23396 + [.FOO] subdirectory, but "directory foo.dir" lists the directory
23397 + file itself; similarly for "*.dir" versus "[.*]", etc.
23398 + * In UNIX, if "foo" is a directory within your current directory,
23399 + "directory foo" lists the files in the foo directory. If you want
23400 + to list the foo directory file itself, put an asterisk at the end:
23403 + Hint: How to find the biggest files in a directory tree:
23405 + cd xxx ; (root of tree)
23406 + directory /sort:size /recursive /reverse /dotfiles /page
23408 + Another hint: If you often use several different directory-listing
23409 + formats, define macro shortcuts for them:
23411 + DEFINE WD DIRECTORY /SORT:DATE /REVERSE \%* ; Reverse chronological order
23412 + DEFINE SD DIRECTORY /SORT:SIZE /REVERSE \%* ; Reverse order of size
23413 + DEFINE ND DIRECTORY /SORT:NAME /ASCEND \%* ; Alphabetical by name
23414 + DEFINE DL DIR /DIR /SORT:NAME /ASCEND \%* ; Alphabetical directory list
23416 + Put these definitions in your C-Kermit customization file. Note that
23417 + "\%*" ([467]Section 7.5) in these definitions lets you include other
23418 + switches in your macro invocations, e.g.:
23420 + wd /headings *.txt
23422 + Of course you can still access your external directory listing program
23423 + by using RUN or "!", e.g. in VMS:
23425 + run directory /size/date/protection/except=*.obj oofa.*;0
23429 + !dir /size/date/prot/exc=*.obj oofa.*;0
23431 + In UNIX, use "!ls" or just "ls" (which is a special synonym for
23433 + _________________________________________________________________
23435 + 4.5.2. The CD and BACK Commands
23437 + In C-Kermit 7.0, the CD command has a new friend, the BACK command.
23438 + BACK means "CD to my previous current directory". A second BACK brings
23439 + you back to where you were before the first one; thus successive BACK
23440 + commands switch back and forth between two directories.
23442 + 4.5.2.1. Parsing Improvements
23444 + The CD command, as well as other commands that parse a directory name,
23445 + were changed in 7.0 to provide all the expected functions: completion
23446 + on Tab or Esc, directory-name lists on ?, etc. Other affected commands
23447 + include SET SERVER GET-PATH, SET TEMP-DIRECTORY, SET FILE
23448 + DOWNLOAD-DIRECTORY, and SPACE. CD and REMOTE CD also now work with
23451 + In VMS, the situation is a bit complicated since a directory name can
23452 + look like "DEV:", "[FOO.BAR]", "DEV:[FOO.BAR]", "[FOO]BAR.DIR;1", etc.
23453 + Completion and ?-help might not always work, but they do in many
23456 + cd ? Lists all subdirectories of the current directory
23458 + cd k? Ditto, but only those starting with K
23459 + cd [foo]? Lists all subdirectories of the [FOO] directory
23460 + cd [-]? Lists all subdirectories of the superior directory
23461 + cd [--]? Lists all subdirectories of the directory 2 levels up
23462 + cd [...]? Lists all directories below the current one
23463 + cd [foo.? Does not work.
23465 + C-Kermit allows all of the following in VMS:
23467 + cd bar CD to subdirectory BAR of the current directory
23470 + cd bar.dir etc...
23474 + cd bar.baz This can go more than 1 level deep...
23475 + cd dir: (where logical name DIR is defined as [FOO.BAR])
23477 + As well as the following:
23479 + cd .. Go up one level as in UNIX
23480 + cd . The current directory
23481 + cd My login directory
23483 + Note that "cd -" (go up one level) does not work as expected, because
23484 + "-" is Kermit's command continuation character. However, "cd [-]", and
23486 + cd {-}" have the desired effect (and so does "cd ..", which is easier
23488 + _________________________________________________________________
23490 + 4.5.2.2. The CDPATH
23492 + The CD command in the UNIX, Windows, OS/2, and VMS versions of
23493 + C-Kermit, as of version 6.1 / 1.1.12, searches the CDPATH for the
23494 + given directory, if it is not absolute and if a CDPATH environment
23495 + variable is defined. Example (in UNIX ksh or bash):
23497 + $ export CDPATH=$HOME:$HOME/kermit:/tmp
23499 + Now if you give a "cd xxx" command, no matter what your current
23500 + directory is, if the "xxx" directory is not a subdirectory of your
23501 + current directory, then the xxx subdirectory of your home directory is
23502 + used or if that does not exist, then the xxx subdirectory of the
23503 + kermit subdirectory of your home directory is used or if that does not
23504 + exist, then /tmp/xxx is used. This is how the ksh "cd" command works,
23505 + and now the C-Kermit CD command works the same way.
23507 + In VMS, you can define CDPATH to be a list of directories that contain
23508 + actual directory delimiters, and/or logical names representing
23509 + directories, using commas to separate them, e.g.:
23511 + $ define cdpath [HOME],[SOMEOTHERDIR],[HOME.MISC]
23512 + $ define cdpath SYS$LOGIN:,DISK1:[HOME],DISK2:[SCRATCH.IVAN]
23516 + $ define cdpath SYS$LOGIN:,[IVAN],[OLAF],[OLGA.MISC]
23518 + DISK1:[OLGA] C-Kermit> cd blah
23520 + tries the BLAH subdirectory of the user's login directory, then
23521 + [OLGA.BLAH], [IVAN.BLAH], [OLAF.BLAH], and [OLGA.MISC.BLAH], in that
23522 + order, using the first one it finds, failing if it finds none.
23524 + In C-Kermit 7.0, you may also set the CDPATH from the Kermit prompt:
23527 + Allows the CD PATH to be set from within C-Kermit.
23529 + SHOW CD shows the CD path and all other information relevant to the CD
23531 + _________________________________________________________________
23533 + 4.5.2.3. CD Messages
23535 + Whenever you change directory, you can have C-Kermit display a "Read
23536 + Me" file from the new directory automatically. The commands are:
23538 + SET CD MESSAGE { ON, OFF, FILE list }
23539 + ON enables this feature; OFF (the default) disables it. File
23540 + lets you specify the name of the "Read Me" file. A list of
23541 + names to look for can be given in the following format:
23543 + {{name1}{name2}{name3}{...}}
23547 + SET SERVER CD-MESSAGE FILE {{./.readme}{README.TXT}{READ.ME}}
23549 + The default list of CD-message files is system dependent.
23551 + SHOW CD shows your current directory, previous directory, CD path, and
23553 + _________________________________________________________________
23555 + 4.5.3. Creating and Removing Directories
23557 + The MKDIR command now allows you to create multiple directories at
23560 + C-Kermit> mkdir a/b/c/d
23562 + creates the directory a in the current directory (if it doesn't exist
23563 + already), and then creates subdirectory b in the a directory (if it
23564 + didn't exist already), and so on.
23566 + If you use MKDIR to try to create a directory that already exists,
23567 + C-Kermit will print a warning ("?Directory already exists"), but the
23568 + MKDIR command will still succeed. If you want to avoid the warning
23569 + message, use IF DIRECTORY first to check if the directory already
23572 + The RMDIR command, however, will not remove more than one directory,
23573 + nor will it remove a directory that contains any files. (There is, as
23574 + yet, no RMDIR /RECURSIVE command, although one might be added later.)
23576 + In VMS, these commands (like CD) are more forgiving of your syntax
23577 + than is the DCL command shell; "mkdir oofa" is equivalent to "mkdir
23578 + [.oofa]" and so on. Also in VMS, you'll find that C-Kermit's RMDIR
23579 + command is easier than deleting a directory in DCL, since it
23580 + automatically first gives it owner delete permission if you are the
23582 + _________________________________________________________________
23584 + 4.5.4. The DELETE and PURGE Commands
23586 + The DELETE command now offers a selection of switches, and has a new
23587 + companion, the PURGE command. First, DELETE:
23589 + DELETE [ switches... ] filespec
23590 + Deletes the file or files that match the filespec, which may
23591 + contain wildcards ([468]Section 4.9).
23593 + Optional switches include the standard file-selection switches
23594 + presented in [469]Section 1.5.4, plus:
23597 + Before deleting each file, ask permission interactively.
23598 + Answers are Yes or OK (delete the file), No (don't delete it),
23599 + or Quit (stop executing the DELETE command).
23602 + Don't ask permission to delete each file.
23605 + List each file and show whether it was deleted. Synonyms: /LOG,
23609 + Don't list files while deleting them. Synonyms: /NOLOG, /QUIET.
23612 + Print a heading and summary line.
23615 + Don't print a heading and summary line.
23618 + When listing, pause at the end of each screenful and give the
23619 + "More?" prompt. If you reply "n" (no), the DELETE command
23623 + Do everything implied by the given switches and filespec,
23624 + except do not actually delete any files. This lets you preview
23625 + which files would be deleted; implies /LIST.
23627 + Now the PURGE command:
23629 + PURGE [ switches... ] [ filespec ]
23630 + (VMS only) Runs the DCL PURGE command. Switches and filespec,
23631 + if any, are passed directly to DCL without parsing or
23632 + verification. Deletes excess versions of the given (or all)
23633 + files. The rest of this section does not apply to VMS.
23635 + PURGE [ switches... ] [ filespec ]
23636 + (UNIX only) Deletes "backup files" that match the filespec,
23637 + which may contain wildcards ([470]Section 4.9). If no filespec
23638 + is given, all backup files in the current directory are
23639 + selected (subject to modification by any switches). Do not
23640 + include backup notation in the filespec.
23644 + To avoid destroying preexisting files when a new file arrives that has
23645 + the same name, C-Kermit backs up the old file by appending a "backup
23646 + number" to its name. In UNIX, the backup suffix consists of a period,
23647 + a tilde, a number, and another tilde. For example, if a file called
23648 + oofa.txt exists and a new oofa.txt file arrives, the original is
23649 + renamed to oofa.txt.~1~. If another oofa.txt file arrives, the
23650 + existing one is renamed to oofa.txt.~2~. And so on. This system is
23651 + compatible with the one used by EMACS. Thus over time, if you receive
23652 + a lot of files with C-Kermit or edit them with EMACS, backup files can
23653 + build up. The new PURGE command lets you clean out accumulated backup
23656 + Optional switches include the standard file-selection switches
23657 + presented in [471]Section 1.5.4, plus all the switches listed above
23658 + for the DELETE command, plus:
23661 + Retains the n most recent (highest-numbered) backup files for
23662 + each file. For example, if oofa.txt, oofa.txt.~1~,
23663 + oofa.txt.~2~, oofa.txt.~10~, oofa.txt.~12~, and oofa.txt.~100~
23664 + exist, "purge /keep:2 oofa.txt" deletes oofa.txt.~1~,
23665 + oofa.txt.~2~, and oofa.txt.~10~, and keeps oofa.txt,
23666 + oofa.txt.~12~, and oofa.txt.~100~. If /KEEP is given without a
23667 + number, one (the highest numbered) backup file is kept.
23669 + CAUTION: The PURGE command should be used only when *.~*~ files truly
23670 + are backup files. This is the case for EMACS, and it is the DEFAULT
23671 + for C-Kermit. However, if C-Kermit's FILE COLLISION has been set to
23672 + RENAME, newly received files will look like backup files. In that
23673 + case, don't use the PURGE command or you'll be removing new files
23674 + rather than old ones. (Use SHOW FILE to find the FILE COLLISION
23677 + The PURGE command is presently available only in UNIX. The command
23678 + succeeds if it deleted any files, or if it deleted no files but there
23679 + were no errors. It fails if it deleted no files and there were errors
23680 + (i.e. deletion was attempted but failed). In VMS, backup file versions
23681 + are handled automatically by the OS, and a PURGE command can be used
23682 + at the VMS prompt to clean them up.
23684 + If you want certain switches to be supplied automatically with each
23685 + DELETE or PURGE command, you can set them with SET OPTIONS
23686 + ([472]Section 1.5.5) and you can display any such settings with SHOW
23687 + OPTIONS. Of course you can override them on a per-command basis by
23688 + including switches in your PURGE or DELETE command.
23690 + Also see SET FILE COLLISION, SHOW FILE, SEND /NOBACKUP, SET SEND
23691 + BACKUP, and DIRECTORY /[NO]BACKUP.
23692 + _________________________________________________________________
23694 + 4.6. Starting the Remote Kermit Server Automatically
23696 + As noted on pages 275-276 of [473]Using C-Kermit 2nd edition, you can
23697 + have Kermit send "kermit receive" commands automatically when it is in
23698 + local mode and you give a SEND or similar command, to start the remote
23699 + Kermit receiver in case it is not already started. The "kermit
23700 + receive" commands are specified by:
23702 + SET PROTOCOL KERMIT binary-receive-command text-receive-command
23704 + As of version 7.0, a Kermit protocol option has been added to send a
23705 + string to the host in advance of any Kermit packets when you give a
23706 + GET-class or REMOTE command. This will switch the remote C-Kermit into
23707 + the appropriate mode or, if the remote system is at a system command
23708 + (shell) prompt, execute the string on the remote system. The new
23709 + syntax of the SET PROTOCOL KERMIT command is:
23711 + SET PROTOCOL KERMIT [ s1 [ s2 [ s3 ] ] ]
23716 + s1 {kermit -ir} Remote "kermit receive in binary mode" command.
23717 + s2 {kermit -r} Remote "kermit receive in text mode" command.
23718 + s3 {kermit -x} Remote "start kermit server" command.
23720 + NOTE: If the remote Kermit is 6.0, the following are recommended for
23721 + fast startup and high-performance file transfer (see Appendix I in
23722 + [474]Using C-Kermit, second Edition, for command-line options):
23724 + s1 kermit -YQir (Kermit receive binary, skip init file, fast.)
23725 + s2 kermit -YQTr (Kermit receive text, skip init file, fast.)
23726 + s3 kermit -YQx (Kermit server, skip init file, fast.)
23728 + If the remote is C-Kermit 7.0 or later, change the -x option (enter
23729 + server mode) to -O (uppercase letter O), which means "enter server
23730 + mode for One transaction only); this way, it is not stuck in server
23731 + after the transfer. Also note that the Q is redundant in version 7.0,
23732 + since fast Kermit protocol settings are now the default.
23734 + Note that in case the C-Kermit executable is called "wermit" or
23735 + "ckermit" you can change "kermit" in the strings above to "wermit" or
23736 + "ckermit" and C-Kermit 7.0 or later will recognize these as synonyms
23737 + for "kermit", in case it is at its command prompt when one of these
23738 + strings is sent to it.
23739 + _________________________________________________________________
23741 + 4.7. File-Transfer Command Switches
23743 + Over the years, various new methods of transferring a file have
23744 + accumulated, until we had, in addition to the SEND command, also MOVE
23745 + (send and then delete), MAIL (send as email), REMOTE PRINT (send to be
23746 + printed), CSEND (send the output of a command), PSEND (send a part of
23747 + a file), BSEND (send in binary mode), RESEND (resume an interrupted
23748 + SEND), etc etc. Similarly: GET, REGET, CGET, RETRIEVE, and so on.
23750 + Not only is it confusing to have different names for these commands,
23751 + many of which are not real words, but this also does not allow all
23752 + combinations, like "send a file as mail, then delete it".
23754 + In C-Kermit 7.0, the SEND, GET, and RECEIVE commands were restructured
23755 + to accept modifier switches (switches are explained in [475]Section
23757 + _________________________________________________________________
23759 + 4.7.1. SEND Command Switches
23761 + Without switches, the SEND command still works exactly as before:
23763 + send oofa.txt ; send a single file
23764 + send oofa.* ; send multiple files
23765 + send oofa.txt x.x ; send oofa.txt as x.x (tell receiver its name is x.x)
23766 + send ; send from SEND-LIST
23768 + But now the following modifier switches may be included between "send"
23769 + and the filename. Zero, one, two, or more switches may be included in
23770 + any combination that makes sense. Switch names (such as /BINARY) can
23771 + be abbreviated, just like any other keywords. Most of these switches
23772 + work only when using Kermit protocol (/TEXT and /BINARY are the
23776 + Specifies that only those files modified (or, in VMS, created)
23777 + after the given date-time (see [476]Section 1.6) are to be
23780 + send /text /after:{2-Feb-1997 10:28:30} *.txt
23781 + send /text /after:\fdate(oofa.txt) *.txt
23786 + Specifies that instead of sending a file, C-Kermit is to send
23787 + the contents of the given array. Since an array does not have a
23788 + filename, you should include an /AS-NAME switch to specify the
23789 + name under which the array is to be sent (if you do not, the
23790 + name "_array_x_" is used, where 'x' is replaced by the array
23791 + designator). See [477]section 7.10 for array-name syntax. As
23792 + noted in that section, you can also include a range to have a
23793 + segment of the array sent, rather than the whole thing; for
23794 + example: "send /array:&a[100:199]". It is strongly recommended
23795 + that you accompany the /ARRAY switch with a /TEXT or /BINARY
23796 + switch to force the desired transfer mode, since otherwise the
23797 + various automatic mechanisms might switch to binary mode when
23798 + you really wanted text, or vice versa. In text mode a line
23799 + terminator is added to the end of each array element, but not
23800 + in binary mode. For details and examples see [478]Section
23804 + Specifies "text" as the name to send the file under. You can
23805 + also still specify the as-name as the second filename on the
23806 + SEND command line. The following two commands are equivalent:
23808 + send oofa.txt oofa.new
23809 + send /as:oofa.new oofa.txt
23811 + /BEFORE:date-time
23812 + Specifies that only those files modified (or, in VMS, created)
23813 + before the given date-time ([479]Section 1.6) are to be sent.
23816 + Performs this transfer in binary mode without affecting the
23817 + global transfer mode, overriding not only the FILE TYPE and
23818 + TRANSFER MODE settings, but also the FILE PATTERN setting, but
23819 + for this SEND command only. In other words, SEND /BINARY means
23820 + what it says: send the file in binary mode, regardless of any
23821 + other settings. Example:
23823 + set file type text ; Set global transfer mode to text
23824 + send /binary oofa.zip ; Send a file in binary
23825 + send oofa.txt ; This one is sent in text mode
23828 + SEND /COMMAND is equivalent to CSEND ([480]Section 4.2.2) -- it
23829 + says to send the output from a command, rather than the
23830 + contents of a file. The first "filename" on the SEND command
23831 + line is interpreted as the name of a command; the second (if
23832 + any) is the as-name. Examples:
23834 + send /command {grep Sunday oofa.txt} sunday.txt
23835 + send /as-name:sunday.txt /command {grep Sunday oofa.txt}
23836 + send /bin /command {tar cf - . | gzip -c} {!gunzip -c | tar xf -}
23839 + Deletes the file (or each file in the group) after it has been
23840 + sent successfully (but does not delete it if it was not sent
23841 + successfully). SEND /DELETE is equivalent to MOVE. Has no
23842 + effect when used with /COMMAND. Example:
23844 + send /delete *.log
23847 + (UNIX and OS-9 only) Normally files whose names begin with "."
23848 + are skipped when matching wildcards that do not also beging
23849 + with ".". Include /DOTFILES to force these files to be included
23853 + Descend the through the directory tree when locating files to
23854 + send. Automatically sets /PATHNAMES:RELATIVE. Explained in
23855 + [481]Section 4.11 .
23858 + See [482]Section 1.5.4.
23861 + This means to skip backup files when sending, even if they
23862 + match the SEND file specification. This is equivalent to using
23863 + SEND /EXCEPT and including *.~[0-9]*~ in the exception list (or
23864 + *.~*~ if Kermit was built without pattern-matching support; see
23865 + [483]Section 4.9.1). Including this switch is equivalent to
23866 + giving SET SEND BACKUP OFF ([484]Section 4.0.6) prior to SEND,
23867 + except its effect is local to the SEND command with which it
23871 + The opposite of /DOTFILES (q.v.)
23873 + /FILENAMES:{CONVERTED,LITERAL}
23874 + Use this switch to override the current global SET FILE NAMES
23875 + setting for this transfer only.
23878 + This specifies a filter to pass the file through before sending
23879 + it. See the [485]section on file-transfer pipes and filters.
23880 + The /FILTER switch applies only to the file-transfer command it
23881 + is given with; it does not affect the global SEND FILTER
23885 + VMS: Sends in image mode. Non-VMS: same as /BINARY.
23888 + VMS and OS/2 only: Sends in labeled mode.
23890 + /LARGER-THAN:number
23891 + Specifies that only those files that are longer than the given
23892 + number of bytes are to be sent.
23894 + /LISTFILE:filename
23895 + Specifies that the files to be sent are listed in a file with
23896 + the given filename. The file contains one filename per line.
23897 + These filenames are not checked in any way; each filename is
23898 + taken and does not use or depend on any Kermit-specific syntax.
23899 + In particular, backslashes are not treated specially, leading
23900 + and trailing spaces are not stripped, etc. However, if a
23901 + filename contains wildcards, they are expanded. Example: If a
23902 + file named files.txt contains the following lines:
23908 + (but without leading or trailing spaces), then the C-Kermit
23909 + command "send /listfile:files.txt" will send the files
23910 + blah.txt, x.x, and all files whose names start with "oofa",
23911 + assuming the files exist and are readable. The /LISTFILE
23912 + switch, can, of course, be used with other switches when it
23913 + makes sense, for example, /EXCEPT, /BINARY, /AFTER, /SMALLER,
23914 + /MOVE-TO, /DELETE, /AS-NAME with a template, etc.
23917 + Sends the file as e-mail to the given address or addresses.
23918 + "send /mail:address filename" is equivalent to "mail filename
23919 + address". You can include multiple addresses separated by
23920 + commas. Examples:
23922 + send /mail:kermit-support@columbia.edu packet.log
23923 + send /mail:cmg,fdc,jrd oofa.txt
23925 + As with any switch argument, if the address or address list
23926 + contains any spaces, you must enclose it in braces. The format
23927 + of the addresses must agree with that understood by the
23928 + mail-sending program on the receiver's computer.
23930 + /MOVE-TO:directory-name
23931 + Specifies that after each (or the only) source file is sent
23932 + successfully, and ONLY if it is sent successfully, it should be
23933 + moved to the named directory. If the directory name contains
23934 + spaces, enclose it in braces. If the directory does not exist,
23935 + it is created if possible; if it can't be created, the command
23936 + fails and an error message is printed. Example:
23938 + send /text /move-to:/users/olga/backup/ *.txt
23940 + /NOT-AFTER:date-time
23941 + Specifies that only those files modified at or before the given
23942 + date and time are to be sent.
23944 + /NOT-BEFORE:date-time
23945 + Specifies that only those files modified at or after the given
23946 + date and time are to be sent.
23948 + /PATHNAMES:{OFF,ABSOLUTE,RELATIVE}
23949 + Use this switch to override the current global SET SEND
23950 + PATHNAMES setting for this transfer only. /PATHNAMES:ABSOLUTE
23951 + or RELATIVE also sets /FILENAMES:LITERAL (also for this
23952 + transfer only) since pathnames are not sent otherwise.
23955 + Specifies that after the (or each) source file is sent
23956 + successfully, and ONLY if it is sent successfully, it should be
23957 + renamed to the name given. If the name contains spaces, enclose
23958 + it in braces. If a file group is being sent, then the "text"
23959 + must contain a variable reference such as \v(filename) (see
23960 + [486]Section 4.1). Example:
23962 + send /rename-to:ok_\v(filename) *.*
23964 + This sends each file in the current directory and if it was
23965 + sent successfully, changes its name to begin with "ok_".
23967 + /SMALLER-THAN:number
23968 + Specifies that only those files that are smaller than the given
23969 + number of bytes are to be sent.
23972 + Subject for email. Actually, this is just a synonym for
23973 + /AS-NAME. If the text includes spaces, you must enclose it in
23974 + braces. If you don't specify a subject (or as-name), the name
23975 + of the file is used as the subject. Example:
23977 + send /mail:kermit-support@columbia.edu /subj:{As requested} packet.log
23980 + Sends the file to be printed, optionally specifying options for
23981 + the printer. Equivalent to REMOTE PRINT filename options.
23984 + send /print oofa.txt ; No options.
23985 + send /print:/copies=3 oofa.txt ; "/copies=3" is a VMS PRINT switch.
23986 + send /print:-#3 oofa.txt ; "-#3" is a UNIX lpr switch.
23989 + Uses the given protocol to send the file (Kermit, Zmodem, etc)
23990 + for this transfer without changing global protocol. Only
23991 + available in Kermit 95, UNIX, and OS-9. Example:
23993 + set protocol kermit ; Set global protocol
23994 + send /proto:zmodem /bin oofa.zip ; Send just this file with Zmodem
23995 + send oofa.txt ; This file is sent with Kermit
23998 + When sending in local mode, this suppresses the file-transfer
24002 + Used to recover from a previously interrupted transfer; SEND
24003 + /RECOVER is equivalent to RESEND. Recovery only works in binary
24004 + mode; SEND /RECOVER and RESEND include an implied /BINARY
24005 + switch. Even then, recovery will successful only if (a) the
24006 + original (interrupted) transfer was also in binary mode, or (b)
24007 + if it was in text mode, the two Kermit programs run on
24008 + platforms where text-mode transfers are not length-changing.
24011 + Starts sending the file from the given byte position. SEND
24012 + /STARTING:n filename is equivalent to PSEND filename n.
24015 + Performs this transfer in text mode without affecting the
24016 + global transfer mode, overriding not only the FILE TYPE and
24017 + TRANSFER MODE settings, but also the FILE PATTERN setting, for
24018 + this SEND command only. In other words, SEND /TEXT really send
24019 + the file in text mode, regardless of any other settings or
24022 + About mail... Refer to [487]Section 4.7.1. The same rules apply as for
24023 + file transfer. If you are mailing multiple files, you can't use an
24024 + as-name (in this case, a subject) unless it contains replacement
24025 + variables like \v(filenum). For example, if you:
24027 + send /mail:somebody@xyz.com *.txt
24029 + Then each file will arrive as a separate email message with its name
24030 + as the subject. But if you:
24032 + send /mail:somebody@xyz.com /subject:{Here is a file} *.txt
24034 + Then each file message will have the same subject, which is probably
24035 + not what you want. You can get around this with constructions like:
24037 + send /mail:somebody@xyz.com /subject:{Here is \v(filename)} *.txt
24039 + which embed the filename in the subject.
24041 + The MOVE, CSEND, MAIL, and RESEND commands now also accept the same
24042 + switches. And the switches are also operative when sending from a
24043 + SEND-LIST (see [488]Using C-Kermit, 2nd Ed, pp.191-192), so, for
24044 + example, it is now possible to SEND /PRINT or SEND /MAIL from a
24047 + The MSEND and MMOVE commands also take switches, but not all of them.
24048 + With these commands, which take an arbitrary list of filespecs, you
24049 + can use /BINARY, /DELETE, /MAIL, /PRINT, /PROTOCOL, /QUIET, /RECOVER,
24050 + and /TEXT (and /IMAGE or /LABELED, depending on the platform). MMOVE
24051 + is equivalent to MSEND /DELETE. (If you want to send a group of files,
24052 + but in mixed transfer modes with per-file as-names, use ADD SEND-LIST
24055 + The MSEND/MMOVE switches come before the filenames, and apply to all
24058 + msend /print /text *.log oofa.txt /etc/motd
24060 + If you type any of these commands (SEND, CSEND, MSEND, etc) followed
24061 + by a question mark (?), you will see a list of the switches you can
24062 + use. If you want to see a list of filenames, you'll need to type
24063 + something like "send ./?" (UNIX, OS/2, Windows, etc), or "send []?"
24064 + (VMS), etc. Of course, you can also type pieces of a filename
24065 + (anything that does not start with "/") and then "?" to get a list of
24066 + filenames that start that way; e.g. "send x.?" still works as before.
24068 + In UNIX, where "/" is also the directory separator, there is usually
24069 + no ambiguity between a fully-specified pathname and a switch, except
24070 + when a file in the root directory has the same name as a switch (as
24071 + noted in [489]Section 1.5):
24073 + send /etc/motd ; Works as expected
24074 + send /command ; ???
24076 + The second example interprets "/command" as a switch, not a filename.
24077 + To send a file actually called "command" in the root directory, use:
24081 + or other system-dependent forms such as //command, /./command,
24082 + c:/command, etc, or cd to / and then "send command".
24083 + _________________________________________________________________
24085 + 4.7.2. GET Command Switches
24087 + Without switches, the GET command still works about the same as
24090 + get oofa.txt ; GET a single file
24091 + get oofa.* ; GET multiple files
24093 + However, the mechanism for including an "as-name" has changed.
24094 + Previously, in order to include an as-name, you were required to use
24095 + the "multiline" form of GET:
24101 + This was because the remote filespec might contain spaces, and so
24102 + there would be no good way of telling where it ended and where the
24103 + local name began, e.g:
24105 + get profile exec a foo
24107 + But now since we can use {braces} for grouping, we don't need the
24108 + multiline GET form any more, and in fact, support for it has been
24109 + removed. If you give a GET command by itself on a line, it fails and
24110 + an error message is printed. The new form is:
24112 + GET [ switches... ] remote-name [ local-name ]
24113 + Ask the server to send the file whose name is remote-name. If
24114 + the optional local-name is given, store it locally under this
24115 + name. If the remote-name or local-name contains spaces, they
24116 + must be enclosed in braces:
24118 + get {profile exec a} foo
24119 + get oofa.txt {~/My Files/Oofa text}
24121 + If you want to give a list of remote file specifications, use the MGET
24124 + MGET [ switches... ] remote-name [ remote-name [ remote-name ... ] ]
24125 + Ask the server to send the files whose names are given.
24127 + Now you can also include modifier switches between GET or MGET and the
24128 + remote-name; most of the same switches as SEND:
24131 + Specifies "text" as the name to store the incoming file under.
24132 + (This switch is not available for MGET.) You can also still
24133 + specify the as-name as the second filename on the GET command
24134 + line. The following two commands are equivalent:
24136 + get oofa.txt oofa.new
24137 + get /as:oofa.new oofa.txt
24140 + Tells the server to send the given file(s) in binary mode
24141 + without affecting the global transfer mode. Example:
24143 + set file type text ; Set global transfer mode to text
24144 + get /binary oofa.zip ; get a file in binary mode
24145 + get oofa.txt ; This one is transferred in text mode
24147 + Or, perhaps more to the point:
24149 + get /binary foo.txt ; where "*.txt" is a text-pattern
24151 + This has the expected effect only if the server is C-Kermit 7.0
24152 + or later or K95 1.1.19 or later.
24155 + GET /COMMAND is equivalent to CGET ([490]Section 4.2.2) -- it
24156 + says to receive the file into the standard input of a command,
24157 + rather than saving it on disk. The /AS-NAME or the second
24158 + "filename" on the GET command line is interpreted as the name
24159 + of a command. Examples:
24161 + get /command sunday.txt {grep Sunday oofa.txt}
24162 + get /command /as-name:{grep Sunday oofa.txt} sunday.txt
24163 + get /bin /command {!gunzip -c | tar xf -} {tar cf - . | gzip -c}
24166 + Asks the Kermit server to delete the file (or each file in the
24167 + group) after it has been transferred successfully (but not to
24168 + delete it if it was not sent successfully). GET /DELETE is
24169 + equivalent to RETRIEVE. Example:
24171 + get /delete *.log
24174 + Specifies that any files whose names match the pattern, which
24175 + can be a regular filename, or may contain "*" and/or "?"
24176 + metacharacters, are to be refused upon arrival. To specify
24177 + multiple patterns (up to 8), use outer braces around the group,
24178 + and inner braces around each pattern:
24180 + /EXCEPT:{{pattern1}{pattern2}...}
24182 + See the description of SEND /EXCEPT in [491]Section 4.7.1 for
24183 + examples, etc. Refusal is accomplished using the Attribute
24184 + Rejection mechanism (reason "name"), which works only when
24185 + Attribute packets have been successfully negotiated.
24187 + /FILENAMES:{CONVERTED,LITERAL}
24188 + Use this switch to override the current global SET FILE NAMES
24189 + setting for this transfer only.
24192 + This specifies a filter to pass the incoming file through
24193 + before writing to disk. See the [492]section on file-transfer
24194 + pipes and filters. The /FILTER switch applies only to the
24195 + file-transfer command it is given with; it does not affect the
24196 + global RECEIVE FILTER setting, if any.
24199 + VMS: Transfer in image mode. Non-VMS: same as /BINARY.
24202 + VMS and OS/2 only: Specifies labeled transfer mode.
24204 + /MOVE-TO:directory
24205 + This tells C-Kermit to move each file that is successfully
24206 + received to the given directory. Files that are not
24207 + successfully received are not moved. By default, files are not
24210 + /PATHNAMES:{OFF,ABSOLUTE,RELATIVE,AUTO}
24211 + Use this switch to override the current global SET RECEIVE
24212 + PATHNAMES setting for this transfer only. /PATHNAMES:ABSOLUTE
24213 + or RELATIVE also sets /FILENAMES:LITERAL (also for this
24214 + transfer only) since incoming pathnames would not be treated as
24215 + pathnames otherwise. See [493]Section 4.10.
24218 + When sending in local mode, this suppresses the file-transfer
24222 + Used to recover from a previously interrupted transfer; GET
24223 + /RECOVER is equivalent to REGET. Recovery only works in binary
24224 + mode; SEND /RECOVER and RESEND include an implied /BINARY
24225 + switch. Even then, recovery will successful only if (a) the
24226 + original (interrupted) transfer was also in binary mode, or (b)
24227 + if it was in text mode, the two Kermit programs run on
24228 + platforms where text-mode transfers are not length-changing.
24231 + Tells the server that the GET file specification applies
24232 + recursively. This switch also automatically sets
24233 + /PATHNAMES:RELATIVE in both the server AND the client. When
24234 + used in conjunction with /DELETE, this "moves" a directory tree
24235 + from the server's computer to the client's computer (except
24236 + that only regular files are deleted from the server's computer,
24237 + not directories; thus the original directories will be left,
24238 + but will contain no files). Note that all servers that support
24239 + /RECURSIVE do not necessarily do so in combination with other
24240 + switches, such as /RECOVER. (Servers that do include C-Kermit
24241 + 7.0 and later, K95 1.1.19 and later.)
24243 + /RENAME-TO:string
24244 + This tells C-Kermit to rename each file that is successfully
24245 + received to the given string. Files that are not successfully
24246 + received are not renamed. By default, files are not renamed.
24247 + The string can be a literal string, which is appropriate when
24248 + only one file is being received, or it can contain one or more
24249 + variables that are to be evaluated at the time each file is
24250 + received, such as \v(filename), \v(filenumber), \v(ntime),
24251 + \v(pid), \v(user), etc. WARNING: if you give a literal string
24252 + and more than one file arrives, each incoming file will be
24253 + given the same name (but SET FILE COLLISION BACKUP or RENAME
24254 + can be used to keep the incoming files from overwriting each
24258 + Tells the server to perform this transfer in text mode without
24259 + affecting its global transfer mode. See /BINARY for additional
24262 + The /MAIL and /PRINT options are not available (as they are for SEND),
24263 + but you can use /COMMAND to achieve the same effect, as in these UNIX
24266 + get /command oofa.txt {mail kermit@columbia.edu}
24267 + get /command oofa.txt lpr
24269 + In OS/2 or Windows, you can GET and print like this:
24273 + The CGET, REGET, RETRIEVE commands also accept the same switches as
24274 + GET. CGET automatically sets /COMMAND; REGET automatically sets
24275 + /RECOVER and /BINARY, and RETRIEVE automatically sets /DELETE.
24276 + _________________________________________________________________
24278 + 4.7.3. RECEIVE Command Switches
24280 + Without switches, the RECEIVE command still works as before:
24282 + receive ; Receives files under their own names
24283 + receive /tmp ; Ditto, but into the /tmp directory
24284 + r ; Same as "receive"
24285 + receive foo.txt ; Receives a file and renames to foo.txt
24287 + Now you can also include modifier switches may be included between
24288 + "receive" and the as-name; most of the same switches as GET:
24291 + Specifies "text" as the name to store the incoming file under.
24292 + You can also still specify the as-name as a filename on the
24293 + command line. The following two commands are equivalent:
24299 + Performs this transfer in binary mode without affecting the
24300 + global transfer mode. NOTE: This does not override the incoming
24301 + filetype (as it does with GET), so this switch is useful only
24302 + if ATTRIBUTE TYPE is OFF, or if the other Kermit does not send
24303 + a TYPE (text or binary) attribute. In any case, it has no
24304 + affect whatsoever on the file sender.
24307 + RECEIVE /COMMAND is equivalent to CRECEIVE ([494]Section 4.2.2)
24308 + -- it says to receive the file into the standard input of a
24309 + command, rather than saving it on disk. The /AS-NAME or the
24310 + "filename" on the RECEIVE command line is interpreted as the
24311 + name of a command.
24313 + r /command {grep Sunday oofa.txt}
24314 + r /command /as-name:{grep Sunday oofa.txt}
24315 + r /bin /command {tar cf - . | gzip -c}
24318 + Specifies that any files whose names match the pattern, which
24319 + can be a regular filename, or may contain "*" and/or "?"
24320 + metacharacters, are to be refused upon arrival. To specify
24321 + multiple patterns (up to 8), use outer braces around the group,
24322 + and inner braces around each pattern:
24324 + /EXCEPT:{{pattern1}{pattern2}...}
24326 + See the description of SEND /EXCEPT in [495]Section 4.7.1 for
24327 + examples, etc. Refusal is accomplished using the Attribute
24328 + Rejection mechanism (reason "name"), which works only when
24329 + Attribute packets have been successfully negotiated.
24331 + /FILENAMES:{CONVERTED,LITERAL}
24332 + Use this switch to override the current global SET FILE NAMES
24333 + setting for this transfer only.
24336 + This specifies a filter to pass the incoming file through
24337 + before writing to disk. See the [496]section on file-transfer
24338 + pipes and filters. The /FILTER switch applies only to the
24339 + file-transfer command it is given with; it does not affect the
24340 + global RECEIVE FILTER setting, if any.
24343 + VMS: Transfer in image mode. Non-VMS: same as /BINARY. See
24344 + comments under RECEIVE /BINARY.
24347 + VMS and OS/2 only: Specifies labeled transfer mode. See
24348 + comments under RECEIVE /BINARY.
24350 + /MOVE-TO:directory
24351 + This tells C-Kermit to move each file that is successfully
24352 + received to the given directory. Files that are not
24353 + successfully received are not moved. By default, files are not
24356 + /PATHNAMES:{ABSOLUTE,RELATIVE,OFF,AUTO}
24357 + Use this switch to override the current global SET RECEIVE
24358 + PATHNAMES setting for this transfer only. See [497]Section
24362 + When used with the RECEIVE command, /RECURSIVE is simply a
24363 + synonym for /PATHNAMES:RELATIVE.
24365 + /RENAME-TO:string
24366 + This tells C-Kermit to rename each file that is successfully
24367 + received to the given string. Files that are not successfully
24368 + received are not renamed. By default, files are not renamed.
24369 + The string can be a literal string, which is appropriate when
24370 + only one file is being received, or it can contain one or more
24371 + variables that are to be evaluated at the time each file is
24372 + received, such as \v(filename), \v(filenumber), \v(ntime),
24373 + \v(pid), \v(user), etc. WARNING: if you give a literal string
24374 + and more than one file arrives, each incoming file will be
24375 + given the same name (but SET FILE COLLISION BACKUP or RENAME
24376 + can be used to keep the incoming files from overwriting each
24380 + When receiving in local mode, this suppresses the file-transfer
24384 + Receives in text mode without affecting the global transfer
24385 + mode. See comments under RECEIVE /BINARY.
24387 + The /MAIL and /PRINT options are not available, but you can use
24388 + /COMMAND to achieve the same effect, as in these UNIX examples:
24390 + r /command {mail kermit@columbia.edu}
24393 + In OS/2 or Windows, you can RECEIVE and print like this:
24397 + The CRECEIVE command now also accepts the same switches.
24398 + _________________________________________________________________
24400 + 4.8. Minor Kermit Protocol Improvements
24402 + 4.8.1. Multiple Attribute Packets
24404 + C-Kermit 7.0 now sends more than one Attribute packet if a file's
24405 + attributes do not fit into a single packet of the negotiated length.
24406 + If a particular attribute (such as file creation date-time) does not
24407 + fit within the negotiated length (which will only happen when the
24408 + negotiated length is around 20 or less), that attribute is not sent at
24411 + 4.8.2. Very Short Packets
24413 + There are certain situations where extremely short packets must be
24414 + used; 20 or 30 bytes at most. This can happen when one or more devices
24415 + along the communication path have very small buffers and lack an
24416 + effective means of flow control. Examples are sometimes cited
24417 + involving radio modems.
24419 + When the maximum packet length is shorter than certain packets that
24420 + would be sent, those packets are either truncated or else broken up
24421 + into multiple packets. Specifically:
24423 + 1. Parameter negotiation packets (I, S, and their ACKs) are truncated
24424 + to the negotiated length. Any parameters that do not fit are reset
24425 + to their default values. There is no provision in the Kermit
24426 + protocol for fragmentation and reassembly of parameter strings.
24427 + 2. File header packets (containing the filename) are simply
24428 + truncated. There is no provision in the Kermit protocol for
24429 + fragmentation and reassembly of filenames.
24430 + 3. Attribute packets are fragmented and reassembled as described in
24431 + 4.8.1 without loss of data, except in case a field will not fit at
24432 + all in the negotiated length (the longest attribute is usually the
24433 + date and time of file creation/modification) because of the rule
24434 + that attributes may not be broken across packets.
24435 + 4. Data packets and other packets are unaffected -- they can be as
24436 + short as they need to be, within reason.
24437 + _________________________________________________________________
24439 + 4.9. Wildcard / File Group Expansion
24441 + "Wildcard" refers to the notation used in filenames to specify a group
24442 + of files by pattern matching.
24444 + 4.9.1. In UNIX C-Kermit
24446 + Prior to C-Kermit 7.0, C-Kermit was capable of expanding wildcard
24447 + strings containing only the "metacharacters" '*' and '?':
24450 + Matches any sequence of zero or more characters. For example:
24451 + "ck*.c" matches all files whose names start with "ck" and end
24452 + with ".c", including "ck.c".
24455 + Matches any single character. For example, "ck?.c" matches all
24456 + files whose names are exactly 5 characters long and start with
24457 + "ck" and end with ".c". When typing commands at the prompt, you
24458 + must precede any question mark to be used for matching by a
24459 + backslash (\) to override the normal function of question mark,
24460 + which is providing menus and file lists.
24462 + C-Kermit 7.0 adds the additional features that users of ksh, csh, and
24463 + bash are accustomed to:
24466 + Square brackets enclosing a list of characters matches any
24467 + single character in the list. Example: ckuusr.[ch] matches
24468 + ckuusr.c and ckuusr.h.
24471 + Square brackets enclosing a range of characters; the hyphen
24472 + separates the low and high elements of the range. For example,
24473 + [a-z] matches any character from a to z.
24476 + Lists and ranges may be combined. This example matches a, c, d,
24479 + {string1,string2,...}
24480 + Braces enclose a list of strings to be matched. For example:
24481 + ck{ufio,vcon,cmai}.c matches ckufio.c, ckvcon.c, or ckcmai.c.
24482 + The strings may themselves contain metacharacters, bracket
24483 + lists, or indeed, other lists of strings, but (when matching
24484 + filenames) they may not contain directory separators.
24486 + Thus, the metacharacters in filenames (and in any other field
24487 + that can be a pattern, such as the IF MATCH pattern, SEND or
24488 + GET exception lists, etc) are:
24492 + And within braces only, comma (,) is a metacharacter.
24494 + To include a metacharacter in a pattern literally, precede it with a
24495 + backslash '\' (or two if you are passing the pattern to a macro).
24498 + send a*b ; Send all files whose names start with 'a' and end with 'b'.
24499 + send a?b ; Ditto, but the name must be exactly three characters long.
24500 + send a[a-z]b ; Ditto, but the second character must be a lowercase letter.
24501 + send a[x\-z]b ; Ditto, except the second character must be 'x', '-', or 'y'.
24502 + send a[ghi]b ; Ditto, except the second character must be 'g', 'h', or 'i'.
24503 + send a[?*]b ; Ditto, except the second character must be '?' or '*'.
24504 + send a[\?\*]b ; Same as previous.
24505 + send *?[a-z]* ; All files with names containing at least one character
24506 + ; that is followed by a lowercase letter.
24508 + Or, more practically:
24510 + send ck[cuw]*.[cwh] ; Send the UNIX C-Kermit source files.
24512 + To refer to the C-Kermit sources files and makefile all in one
24515 + {{makefile,ck[cuw]*.[cwh]}}
24517 + (NOTE: if the entire pattern is a {stringlist}, you must enclose it it
24518 + TWO pairs of braces, since the SEND command strips the outer brace
24519 + pair, because of the "enclose in braces if the filename contains
24522 + If the makefile is called ckuker.mak:
24524 + ck[cuw]*.{[cwh],mak}
24526 + (NOTE: double braces are not needed here since the pattern does not
24527 + both begin and end with a brace.)
24529 + To add in all the C-Kermit text files:
24531 + ck[cuw]*.{[cwh],mak,txt}
24533 + All of these features can be used anywhere you would type a filename
24534 + that is allowed to contain wildcards.
24536 + When you are typing at the command prompt, an extra level of quoting
24537 + is required for the '?' character to defeat its regular function of
24538 + producing a list of files that match what you have typed so far, for
24543 + lists all the files whose names start with ckc and cku. If you quote
24544 + the question mark, it is used as a pattern-matching character, for
24547 + send ck\?[ft]io.c
24549 + sends all the file and communications i/o modules for all the
24550 + platforms: ckufio.c, ckutio.c, ckvfio.c, ckvtio.c, etc.
24552 + If, however, a filename actually contains a question mark and you need
24553 + to refer to it on the command line, you must use three (3)
24554 + backslashes. For example, if the file is actually called ck?fio.c, you
24559 + Further notes on quoting:
24561 + * A single backslash is sufficient for quoting a special character
24562 + at the command prompt or in a command file. However, when passing
24563 + patterns to macros you'll need double backslashes, and when
24564 + referring to these patterns within the macro, you'll need to use
24565 + \fcontents(\%1) (see [498]Section 1.11.5). You should enclose
24566 + macro argument references in braces in case grouped arguments were
24569 + if match {\fcont(\%1)} {\fcont(\%2)} {
24575 + ismatch ab*yz a*\\**z ; Backslash must be doubled
24576 + ismatch {abc def xyz} *b*e*y* ; Braces must be used for grouping
24577 + * Watch out for possible conflicts between {} in filename patterns
24578 + and {} used for grouping multiple words into a single field, when
24579 + the pattern has outer braces. For example, in:
24580 + if match {abc xyz} {a* *z} echo THEY MATCH
24581 + braces must be used to group "abc xyz" into a single string.
24582 + Kermit strips off the braces before comparing the string with the
24583 + pattern. Therefore:
24584 + if match makefile {makefile,Makefile} echo THEY MATCH
24585 + does not work, but:
24586 + if match makefile {{makefile,Makefile}} echo THEY MATCH
24588 + * If you use a pattern that has outer braces, like {*.txt,*.doc}, in
24589 + a field that accepts a pattern list (like SEND /EXCEPT:xxx),
24590 + you'll need to add two extra sets of outer braces:
24591 + send /except:{{{*.txt,*.doc}}} *.*
24593 + C-Kermit's new pattern matching capabilities are also used when
24594 + C-Kermit is in server mode, so now you can send requests such as:
24596 + get ck[cuw]*.[cwh]
24598 + to a C-Kermit server without having to tell it to SET WILD SHELL
24599 + first. Previously this would have required:
24601 + mget ckc*.c ckc*.w ckc*.h cku*.c cku*.w cku*.h ckw*.c ckw*.w ckw*.h
24603 + The new pattern matching features make SET WILD SHELL redundant, and
24604 + barring any objections, it will eventually be phased out. (One
24605 + possible reason for retaining it would be as an escape mechanism when
24606 + Kermit does not understand the underlying file system.)
24608 + By the way, patterns such as these are sometimes referred to as
24609 + "regular expressions", but they are not quite the same. In a true
24610 + regular expression (for example), "*" means "zero or more repetitions
24611 + of the previous item", so (for example), "([0-9]*)" would match zero
24612 + or more digits in parentheses. In Kermit (and in most shells), this
24613 + matches one digit followed by zero or more characters, within
24614 + parentheses. Here are some hints:
24616 + * Although you can't match any sequence of digits (or letters, etc),
24617 + you can match (say) 1, 2, or 3 of them in row. For example, the
24618 + following pattern matches Kermit backup files (with backup numbers
24620 + *.~{[1-9],[1-9][0-9],[1-9][0-9][0-9]}~
24621 + * There is presently no NOT operator, so no way to match any
24622 + character or string EXCEPT the one(s) shown.
24624 + In other wildcarding news...
24626 + * You may now "send xxx" where "xxx" is a directory name, and this
24627 + will send all the files from the directory xxx, as if you had
24628 + typed "send xxx/*". You can also use the special shorthand "send
24629 + ." to send all the files from the current directory.
24630 + * To easily skip over backup files (the ones whose names end like
24631 + .~22~) when sending, you can use SEND /NOBACKUP (see [499]Section
24632 + 4.0.6 for details).
24633 + * When choosing Kermit to expand wildcards, rather than the shell,
24634 + you can choose whether "dot files" -- files whose names begin with
24635 + ".", which are normally "invisible" -- should be matched:
24636 + SET WILD KERMIT /NO-MATCH-DOT-FILES (this is the default)
24637 + SET WILD KERMIT /MATCH-DOT-FILES (this allows matching of "." files)
24638 + or include the /DOTFILES or /NODOTFILES switch on the command you
24639 + are using, such as SEND or DIRECTORY.
24640 + * Commands such as DIRECTORY and SEND allow recursive directory
24641 + traversal. There are also new functions for this to use in
24642 + scripts. See [500]Section 4.11 for details.
24644 + When building file lists in UNIX, C-Kermit follows symbolic links.
24645 + Because of this, you might encounter any or all of the following
24648 + * Multiple copies of the same file; e.g. one from its real directory
24649 + and others from links to its real directory, if both the real
24650 + directory and the links to it are in the wildcard expansion list.
24651 + * A command might unexpectedly "hang" for a long time because an NFS
24652 + link might not be responding, or the directory you are looking at
24653 + contains a link to a huge directory tree (example: "directory
24654 + /recursive /etc" when /etc/spool is a symlink to /var/spool, which
24655 + is a large organization's incoming email directory, containing
24656 + tens of thousands of subdirectories).
24658 + The size of the file list that Kermit can build is limited in most
24659 + C-Kermit implementations. The limit, if any, depends on the
24660 + implementation. Use the SHOW FEATURES command and look in the
24661 + alphabetized options list for MAXWLD to see the value.
24663 + 4.9.2. In Kermit 95
24665 + Kermit 95 1.1.19 and later uses the same pattern matching syntax as in
24666 + UNIX, but (as always) you will encounter numerous difficulties if you
24667 + use backslash (\) as the directory separator. In any command where K95
24668 + parses filenames itself (that is, practically any file-oriented
24669 + command except RUN), you can use forward slash (/) as the directory
24670 + separator to avoid all the nasty conflicts.
24672 + 4.9.3. In VMS, AOS/VS, OS-9, VOS, etc.
24674 + Platforms other than UNIX, Windows 95/98/NT, and OS/2 have their own
24675 + filename matching capabilities that are, in general, different from
24676 + Kermit's built-in ones and in any case might conflict with them. For
24677 + example, [] encloses directory names in VMS.
24679 + Nevertheless you can still use all the pattern-matching capabilities
24680 + described in [501]Section 4.9.1 by loading a file list into an array
24681 + (e.g. with \ffiles(*,&a), see [502]Section 4.11.3) and then using IF
24682 + MATCH on the members.
24683 + _________________________________________________________________
24685 + 4.10. Additional Pathname Controls
24687 + In version 6.0 and earlier, C-Kermit's SET { SEND, RECEIVE } PATHNAMES
24688 + command had only ON and OFF as options. In version 7.0, there are more
24691 + SET SEND PATHNAMES OFF
24692 + When sending a file, strip all disk/directory information from
24693 + the name. Example: "send /usr/olga/letters/oofa.txt" sends the
24694 + file as "oofa.txt". This applies to actual filenames, not to
24695 + any as-name you might specify.
24697 + SET SEND PATHNAMES RELATIVE
24698 + When sending a file, leave the pathname on as given. For
24699 + example, if your current directory is /usr/olga, "send
24700 + letters/oofa.txt" sends the file as "letters/oofa.txt", not
24701 + "/usr/olga/letters/oofa.txt" or "letters.txt".
24703 + SET SEND PATHNAMES ABSOLUTE
24704 + When sending a file, convert its name to the full, absolute
24705 + local pathname. For example, if your current directory is
24706 + /usr/olga, "send letters/oofa.txt" sends the file as
24707 + "/usr/olga/letters/oofa.txt". NOTE: Even with this setting,
24708 + device and/or node names are not included. For example, in VMS,
24709 + any node or device name is stripped; in Windows or OS/2, any
24710 + disk letter is stripped.
24712 + SET RECEIVE PATHNAMES OFF
24713 + When receiving a file, strip all disk/directory information
24714 + from the name before attempting to store it. This applies to
24715 + incoming filename, not to any as-name you might specify.
24716 + Example: If a file arrives under the name
24717 + "/usr/olga/letters/oofa.txt" it is stored simply as "oofa.txt"
24718 + in your download directory or, if no download directory has
24719 + been specified, in your current directory.
24721 + SET RECEIVE PATHNAMES RELATIVE
24722 + When receiving a file, leave the pathname on as it appears in
24723 + the incoming name, but if the incoming name appears to be
24724 + absolute, make it relative to your current or download
24725 + directory. Examples:
24727 + + "oofa.txt" is stored as "oofa.txt".
24728 + + "letters/oofa.txt" is stored as "letters/oofa.txt"; the
24729 + "letters" subdirectory is created if it does not already
24731 + + "/usr/olga/letters/oofa.txt" is stored as
24732 + "usr/olga/letters/oofa.txt" in your current or download
24733 + directory, and the "usr", "usr/olga", etc, directories are
24734 + created if they do not exist.
24736 + SET RECEIVE PATHNAMES ABSOLUTE
24737 + The incoming filename is used as given. Thus it cannot be
24738 + stored unless the given path (if any) already exists or can be
24739 + created. In this case, node, device, or disk designations are
24740 + NOT stripped, since they most likely were given explicitly by
24741 + the user as an as-name, meant to be used as given.
24743 + SET RECEIVE PATHNAMES AUTO
24744 + This is the default, and means RELATIVE if the sender tells me
24745 + it is a recursive transfer, OFF otherwise.
24747 + Set FILE NAMES CONVERTED now also affects pathnames too. When
24748 + PATHNAMES are RELATIVE or ABSOLUTE and FILE NAMES are CONVERTED, the
24749 + file sender converts its native directory-name format to UNIX format,
24750 + and the file receiver converts from UNIX format to its native one;
24751 + thus UNIX format is the common intermediate representation for
24752 + directory hierarchies, as it is in the ZIP/UNZIP programs (which is
24753 + why ZIP archives are transportable among, UNIX, DOS, and VMS).
24755 + Here's an example in which a file is sent from Windows to UNIX with
24756 + relative pathnames and FILE NAMES CONVERTED:
24758 + Source name Intermediate name Destination Name
24759 + C:\K95\TMP\OOFA.TXT K95/TMP/OOFA.TXT k95/tmp/oofa.txt
24761 + In a more complicated example, we send the same file from Windows to
24764 + Source name Intermediate name Destination Name
24765 + C:\K95\TMP\OOFA.TXT K95/TMP/OOFA.TXT [.K95.TMP]OOFA.TXT
24767 + (Note that disk letters and device designations are always stripped
24768 + when pathnames are relative).
24770 + As you can imagine, as more and more directory formats are considered,
24771 + this approach keeps matters simple: on each platform, Kermit must know
24772 + only its own local format and the common intermediate one. In most
24773 + cases, the receiver can detect which format is used automatically.
24774 + _________________________________________________________________
24776 + 4.11. Recursive SEND and GET: Transferring Directory Trees
24778 + C-Kermit 7.0 in selected versions (UNIX, VMS, VOS, AOS/VS, Windows,
24779 + and OS/2 at this writing) now permits the SEND command to traverse
24780 + directories "recursively" if you ask it to; that is, to send files
24781 + from the current or specified directory and all of its subdirectories
24782 + too, and their subdirectories, etc. (Some other commands can do this
24783 + too, including DIRECTORY.)
24785 + This feature is new to UNIX, Windows, VOS, and OS/2. VMS and AOS/VS
24786 + have always included "wildcard" or "template" characters that allow
24787 + this, and in this case, recursive directory traversal could happen
24788 + behind Kermit's back, i.e. Kermit does not have to do it itself (in
24789 + VMS, the notation is "[...]" or "[directory...]"; in AOS/VS is "#").
24790 + In C-Kermit 7.0, however, SEND /RECURSIVE is supported by C-Kermit
24792 + _________________________________________________________________
24794 + 4.11.1. Command-Line Options
24796 + To descend a directory tree when sending files, use the -L
24797 + command-line option to indicate that the send operation is to be
24798 + recursive, and include a name or pattern to be sent. When giving a
24799 + pattern, you should enclose it in quotes to prevent the shell from
24800 + expanding it. Examples:
24802 + $ kermit -Ls "/usr/olga/*" # send all of Olga's files in all her directories
24803 + $ kermit -Ls foo.txt # send all foo.txt files in this directory tree
24804 + $ kermit -Ls "*.txt" # send all .txt files in this directory tree
24805 + $ kermit -Ls "letters/*" # send all files in the letters directory tree
24806 + $ kermit -Ls letters # send all files in the letters directory tree
24807 + $ kermit -Ls "*" # send all files in this directory tree
24808 + $ kermit -Ls . # UNIX only: send all files in this directory tree
24809 + $ kermit -s . # UNIX only: a filename of . implies -L
24811 + If you let the shell expand wildcards, Kermit only sends files whose
24812 + names match files in the current or given directory, because the shell
24813 + replaces an unquoted wildcard expression with the list of matching
24814 + files -- and the shell does not build recursive lists. Note that the
24815 + "." notation for the tree rooted at the current directory is allowed
24816 + only in UNIX, since in Windows and OS/2, it means "*.*"
24818 + _________________________________________________________________
24820 + 4.11.2. The SEND /RECURSIVE Command
24822 + If you include the /RECURSIVE switch in a SEND (or MOVE, or similar)
24823 + command, it means to descend the current or specified directory tree
24824 + searching for files whose names match the given name or pattern. Since
24825 + this is not terribly useful unless you also include pathnames with the
24826 + outbound files, the /RECURSIVE switch also includes an implicit
24827 + /PATHNAMES:RELATIVE switch (which you can undo by including an
24828 + explicit /PATHNAMES switch after the /RECURSIVE switch).
24832 + SEND /RECURSIVE *
24833 + Sends all of the files in the current directory and all the
24834 + files in all of its subdirectories, and all of their
24835 + subdirectories, etc, including their relative pathnames. Empty
24836 + directories are not sent.
24838 + SEND /RECURSIVE /PATHNAMES:ABSOLUTE *
24839 + Sends all of the files in the current directory and all the
24840 + files in all of its subdirectories, and all of their
24841 + subdirectories, etc, including their absolute pathnames.
24843 + SEND /RECURSIVE /PATHNAMES:OFF *
24844 + Sends all of the files in the current directory and all the
24845 + files in all of its subdirectories, and all of their
24846 + subdirectories, etc, without pathnames.
24848 + SEND /RECURSIVE /usr/olga/*
24849 + Sends all of the files in the /usr/olga directory and all the
24850 + files in all of its subdirectories, and all of their
24851 + subdirectories, etc.
24853 + SEND /RECURSIVE /usr/olga (or /usr/olga/)
24854 + Same as above. If the name is a directory name (with or without
24855 + a trailing slash), its files are sent, and those of its
24856 + subdirectories, and their subdirectories, etc (see [503]Section
24859 + SEND /RECURSIVE /TEXT /usr/olga/*.txt
24860 + As above, but only files whose names end with ".txt" are sent,
24861 + and they are sent in text mode (as they would be by default
24862 + anyway if SET FILE PATTERNS is ON or AUTO).
24865 + UNIX only: Send all the files in the current directory.
24867 + SEND /RECURSIVE .
24868 + UNIX only: Sends all of the files in the current directory and
24869 + all of its subdirectories, etc ([504]Section 4.9).
24871 + The /RECURSIVE switch is different from most other switches in that
24872 + its effect is immediate (but still local to the command in which it is
24873 + given), because it determines how filenames are to be parsed. For
24874 + example, "send *.txt" fails with a parse error ("No files match") if
24875 + there are no *.txt files in the current directory, but "send
24876 + /recursive *.txt" succeeds if there are ".txt" files anywhere in the
24877 + tree rooted at the current directory.
24879 + The /RECURSIVE switch also affects the file lists displayed if you
24880 + type "?" in a filename field. "send ./?" lists the regular files in
24881 + the current directory, but "send /recursive ./?" lists the entire
24882 + directory tree rooted at the current directory.
24883 + _________________________________________________________________
24885 + 4.11.3. The GET /RECURSIVE Command
24887 + In a client/server setting, the client can also request a recursive
24890 + GET /RECURSIVE [ other switches ] remote-filespec [ local-spec ]
24892 + In which remote file specification can be a directory name, a
24893 + filename, a wildcard, or any combination. If the local-spec is not
24894 + given (and PATHNAMES are RELATIVE), incoming files and directories go
24895 + into the current local directory. If local-spec is given and is a
24896 + directory, it becomes the root of the tree into which the incoming
24897 + files and directories are placed. If local-spec has the syntax of a
24898 + directory name (e.g. in UNIX it ends with /), C-Kermit creates the
24899 + directory and then places the incoming files into it. If local-spec is
24900 + a filename (not recommended), then all incoming files are stored with
24901 + that name with collisions handled according to the FILE COLLISION
24904 + Again, the normal method for transferring directory trees uses
24905 + relative pathnames, and this is the default when the sender has been
24906 + given the /RECURSIVE switch. The action at the receiver depends on its
24907 + RECEIVE PATHNAMES setting. The default is AUTO, meaning that if the
24908 + sender tells it to expect a recursive transfer, then it should
24909 + automatically switch to relative pathnames for this transfer only;
24910 + otherwise it obeys the RECEIVE PATHNAMES setting of OFF, ABSOLUTE, or
24913 + What happens if a file arrives that has an absolute pathname, when the
24914 + receiver has been told to use only relative pathnames? As a security
24915 + precaution, in this case the receiver treats the name as if it was
24916 + relative. For example, if a file arrives as:
24918 + /usr/olga/oofa.txt
24920 + The receiver creates a "usr" subdirectory in its current directory,
24921 + and then an "olga" subdirectory under the "usr" subdirectory in which
24922 + to store the incoming file.
24924 + Suppose, however there is a sequence of directories:
24926 + /usr/olga/a/b/c/d/
24928 + in which "a" contains nothing but a subdirectory "b", which in turn
24929 + contains nothing but a subdirectory "c", which in turn contains
24930 + nothing but a subdirectory "d", which contains nothing at all. Thus
24931 + there are no files in the "/usr/olga/a/" tree, and so it is not sent,
24932 + and therefore it is not reproduced on the target computer.
24933 + _________________________________________________________________
24935 + 4.11.4. New and Changed File Functions
24937 + C-Kermit 7.0 adds the following functions:
24939 + \ffiles(pattern[,&a])
24940 + This function has been changed to match only regular files in
24941 + the current or given directory, and to take an optional array
24942 + name as a second argument (explained below).
24944 + \fdirectories(pattern[,&a])
24945 + Returns the number of directories that match the given pattern.
24946 + If the pattern does not include a directory, then the search is
24947 + performed in the current directory.
24949 + \frfiles(pattern[,&a])
24950 + Returns the number of files in the current or given directory
24951 + and all of its subdirectories, and their subdirectories, etc,
24952 + that match the given pattern. Warning -- this one can take
24953 + quite some time if performed at the root of a large directory
24956 + \frdirectories(pattern[,&a])
24957 + Returns the number of directories in the current or given
24958 + directory and all of its subdirectories, and their
24959 + subdirectories, etc, that match the given pattern.
24961 + Each of these functions builds up a list of files to be returned by
24962 + the \fnextfile() function, just as \ffiles() always has done. (This
24963 + can also be done with the /ARRAY switch of the DIRECTORY command; see
24964 + [505]Sections 4.5.1 and [506]7.10).
24966 + Each of these functions can be given an array name as an optional
24967 + second argument. If an array name is supplied, the array will contain
24968 + the number of files as its 0th element, and the filenames in elements
24969 + 1 through last. If the array already existed, its previous contents
24970 + are lost. For example, if the current directory contains two files,
24971 + oofa.txt and foo.bar, then "\ffiles(*,&a)" creates an array \&a[] with
24972 + a dimension of 2, containing the following elements:
24975 + \&a[1] = oofa.txt
24978 + If no files match the specification given in the first argument, the
24979 + array gets a dimension of 0, which is the same as undeclaring the
24982 + Note that the order in which the array is filled (and in which
24983 + \fnextfile() returns filenames) is indeterminate (but see [507]Section
24986 + Here's an example that builds and prints a list of all the file whose
24987 + names end in .txt in the current directory and all its descendents:
24989 + asg \%n \frfiles(*.txt)
24991 + for \%i 1 \%n 1 {
24992 + asg \&a[\%i] \fnextfile()
24993 + echo \flpad(\%i,4). "\&a[\%i]"
24996 + Alternatively, using the array method, and then printing the filenames
24997 + in alphabetic order (see [508]Section 7.10.3 and [509]7.10.5):
24999 + asg \%n \frfiles(*.txt,&a)
25001 + for \%i 1 \%n 1 {
25002 + echo \flpad(\%i,4). "\&a[\%i]"
25005 + Or even more simply:
25007 + asg \%n \frfiles(*.txt,&a)
25011 + As noted elsewhere, the file lists built by \ffiles(), \frfiles(),
25012 + etc, are now "safe" in the sense that SEND and other file-related
25013 + commands can reference \fnextfile() without resetting the list:
25015 + set send pathnames relative
25016 + for \%i 1 \frfiles(*.txt) 1 {
25017 + asg \%a \fnextfile()
25018 + echo Sending \%a...
25023 + Copying to an array (as shown on p.398 of [510]Using C-Kermit 2nd Ed)
25024 + is no longer necessary.
25025 + _________________________________________________________________
25027 + 4.11.5. Moving Directory Trees Between Like Systems
25029 + 4.11.5.1. UNIX to UNIX
25031 + Transferring a directory tree from one computer to another replicates
25032 + the file sender's arrangement of files and directories on the file
25033 + receiver's computer. Normally this is done using relative pathnames,
25034 + since the user IDs might not be identical on the two computers. Let's
25035 + say both computers are UNIX based, running C-Kermit 7.0 or later. On
25036 + the sending computer (leaving out the connection details, etc):
25038 + C-Kermit> cd /usr/olga
25039 + C-Kermit> send /recursive .
25041 + The /RECURSIVE switch tells C-Kermit to descend through the directory
25042 + tree and to include relative pathnames on outbound filenames.
25044 + On the receiving computer:
25046 + C-Kermit> mkdir olgas-files ; Make a new directory.
25047 + C-Kermit> cd olgas-files ; CD to it.
25048 + C-Kermit> receive /recursive ; = /PATHNAMES:RELATIVE
25050 + Each Kermit program recognizes that the other is running under UNIX
25051 + and switches to binary mode and literal filenames automatically.
25052 + Directories are automatically created on the receiving system as
25053 + needed. File dates and permissions are automatically reproduced from
25054 + source to destination.
25056 + 4.11.5.2. VMS to VMS
25058 + To send recursively from VMS, simply include the /RECURSIVE switch,
25059 + for example at the sender:
25062 + C-Kermit> cd [olga]
25063 + C-Kermit> send /recursive *.*;0
25065 + And at the receiver:
25067 + C-Kermit> cd [.olga]
25068 + C-Kermit> receive /recursive
25070 + The notation "..." within directory brackets in VMS means "this
25071 + directory and all directories below it"; the /RECURSIVE switch, when
25072 + given to the sender, implies the use of "..." in the file
25073 + specification so you don't have to include "..."; but it makes no
25074 + difference if you do:
25077 + C-Kermit> send /recursive [olga...]*.*;0
25079 + And at the receiver:
25081 + C-Kermit> cd [.olga]
25082 + C-Kermit> receive /recursive
25084 + In either case, since both systems recognize each other as VMS, they
25085 + switch into LABELED transfer mode automatically.
25086 + _________________________________________________________________
25088 + 4.11.6. Moving Directory Trees Between Unlike Systems
25090 + There are several difficulties with recursive transfers between unlike
25093 + * File formats can be different, especially text files character
25094 + sets and record formats. This can now be handled by using SET FILE
25095 + PATTERN, SET FILE TEXT-PATTERNS, and SET FILE BINARY-PATTERNS
25096 + ([511]Section 4.3).
25097 + * File naming conventions are different. For example, one system
25098 + might allow (and use) longer filenames than the other. You can
25099 + tell Kermit how to handle file names with the normal "set file
25100 + names" and "set file collision" mechanisms. Most modern Kermits
25101 + are fairly tolerant of illegal filenames and should not fail
25102 + simply because of an incoming filename; rather, it will do its
25103 + best to convert it to a recognizable and unique legal filename.
25104 + * Directory notations can be different, e.g. backslashes instead of
25105 + slashes, brackets, parentheses, spaces, etc. But this is now
25106 + handled by converting pathnames to a standard format during
25107 + transfer ([512]Section 4.10).
25109 + So now, for the first time, it is possible to send directory trees
25110 + among any combination of UNIX, DOS, Windows, OS/2, VMS, AOS/VS, etc.
25111 + Here's an example sending files from an HP-UX system (where text files
25112 + are encoded in the HP Roman8 character set) to a PC with K95 (where
25113 + text files are encoded in CP850):
25116 + cd xxx ; CD to root of source tree
25117 + set file type binary ; Default transfer mode
25118 + set file character-set hp-roman8 ; Local character set for text files
25119 + set xfer character-set latin1 ; Transfer character set
25120 + set file patterns on ; Enable automatic file-type switching...
25121 + set file binary-patterns *.Z *.gz *.o ; based on these patterns...
25122 + set file text-patterns *.txt *.c *.h ; for binary and text files.
25123 + send /recursive * ; Send all the file in this directory tree
25126 + cd yyy ; CD to root of destination tree
25127 + set file character-set cp850 ; Local character set for text files
25128 + receive /pathnames:relative ; Receive with pathnames
25131 + * Replace "xxx" and "yyy" with the desired directories.
25132 + * Replace the file character sets appropriately.
25133 + * Change the patterns as needed (or just use the built-in default
25135 + * SEND /RECURSIVE also implies /PATHNAMES:RELATIVE.
25136 + * The file sender tells the file receiver the transfer mode of each
25138 + * The file sender tells the file receiver the transfer character
25140 + * By default, destination file dates will be the same as on the
25142 + * Many of the settings shown might already be set by default.
25143 + * See [513]Sections 4.3, [514]4.10, and [515]4.15 for additional
25146 + If you are refreshing an existing directory on the destination
25147 + computer, use "set file collision update" or other appropriate file
25148 + collision option to handle filename collisions.
25149 + _________________________________________________________________
25151 + 4.12. Where Did My File Go?
25153 + Now that Kermit can be started by clicking on desktop icons (thus
25154 + obscuring the concept of "current directory"), and can have a download
25155 + directory, and can create directories for incoming files on the fly,
25156 + etc, sometimes it is easy to lose a file after transfer. Of course, if
25157 + you keep a transaction log:
25161 + it will record the fate and final resting place of each file. But in
25162 + case you did not keep a log, the new command:
25166 + added in C-Kermit 7.0, gives you as much information as it has about
25167 + the location of the last files transferred, including the pathname
25168 + reported by the receiving Kermit, if any, when C-Kermit is the sender.
25169 + This information was also added to SHOW FILE in somewhat less detail.
25170 + _________________________________________________________________
25172 + 4.13. File Output Buffer Control
25174 + (UNIX only). The new command SET FILE OUTPUT lets you control how
25175 + incoming files are written to disk:
25177 + SET FILE OUTPUT BUFFERED [ size ]
25178 + Chooses buffered file output; this is the default. UNIX does
25179 + its normal sort of disk buffering. The optional size specifies
25180 + Kermit's own file output buffer size, and therefore the
25181 + frequency of disk accesses (write() system calls) -- the bigger
25182 + the size, the fewer the disk accesses.
25184 + SET FILE OUTPUT UNBUFFERED [ size ]
25185 + This forces each file output write() call to actually commit
25186 + the data to disk immediately. Choosing this option will usually
25187 + slow file reception down.
25189 + SET FILE OUTPUT BLOCKING
25190 + Write() calls should not return until they are complete. This
25191 + is the normal setting, and it lets Kermit detect disk-write
25192 + errors immediately.
25194 + SET FILE OUTPUT NONBLOCKING
25195 + Write() calls should return immediately. This can speed up file
25196 + reception, but also delay the detection of disk-write errors.
25198 + Experimentation with these parameters should be harmless, and might
25199 + (or might not) have a perceptible, even dramatic, effect on
25201 + _________________________________________________________________
25203 + 4.14. Improved Responsiveness
25205 + In version 7.0, C-Kermit's file-transfer protocol engine has been
25206 + tuned for additional speed and responsiveness.
25208 + * Binary-mode transfers over 8-bit connections, a very common case,
25209 + are now handled in a special way that minimizes overhead.
25210 + * SET TRANSFER CRC-CALCULATION is now OFF by default, rather than
25211 + ON. (This affects only the overall per-transfer CRC, \v(crc16),
25212 + not the per-packet CRCs)
25213 + * Connection loss during file transfer is now detected immediately
25214 + in most cases on Internet connections and on serial connections
25215 + when CARRIER-WATCH is not set to OFF.
25216 + _________________________________________________________________
25218 + 4.15. Doubling and Ignoring Characters for Transparency
25220 + The following commands were added in 7.0, primarily to allow
25221 + successful file transfer through ARPAnet TACs and with Honeywell DPS6
25222 + systems, but can be used in any setting where they might be needed:
25224 + SET SEND DOUBLE-CHAR { [ char [ char [ ... ] ] ], NONE }
25225 + Tells C-Kermit to double the specified characters (use decimal
25226 + notation) in packets that it sends. For example, if you are
25227 + sending files through a device that uses @ as an escape
25228 + character, but allows you to send a single copy of @ through by
25229 + doubling it, use "set send double 64".
25231 + SET RECEIVE IGNORE-CHAR [ char [ char [ ... ] ] ]
25232 + Tells C-Kermit to ignore the specified character(s) in incoming
25233 + packets. Use this, for example, when something between the
25234 + sender and receiver is inserting linefeeds for wrapping, NULs
25235 + for padding, etc.
25236 + _________________________________________________________________
25238 + 4.16. New File-Transfer Display Formats
25240 + SET TRANSFER DISPLAY { BRIEF, CRT, FULLSCREEN, NONE, SERIAL }
25241 + Selects the file-transfer display format.
25243 + BRIEF is the new one. This writes one line to the screen per file,
25244 + showing the file's name, transfer mode, size, the status of the
25245 + transfer, and when the transfer is successful, the effective data rate
25246 + in characters per second (CPS). Example:
25248 + SEND ckcfn3.o (binary) (59216 bytes): OK (0.104 sec, 570206 cps)
25249 + SEND ckcfns.o (binary) (114436 bytes): OK (0.148 sec, 772006 cps)
25250 + SEND ckcmai.c (text) (79147 bytes): OK (0.180 sec, 438543 cps)
25251 + SEND ckcmai.o (binary) (35396 bytes): OK (0.060 sec, 587494 cps)
25252 + SEND ckcnet.o (binary) (62772 bytes): REFUSED
25253 + SEND ckcpro.o (binary) (121448 bytes): OK (0.173 sec, 703928 cps)
25254 + SEND ckcpro.w (text) (63687 bytes): OK (0.141 sec, 453059 cps)
25255 + SEND makefile (text) (186636 bytes): OK (0.444 sec, 420471 cps)
25256 + SEND wermit (binary) (1064960 bytes): OK (2.207 sec, 482477 cps)
25258 + Note that transfer times are now obtained in fractional seconds,
25259 + rather than whole seconds, so the CPS figures are more accurate (the
25260 + display shows 3 decimal places, but internally the figure is generally
25261 + precise to the microsecond).
25262 + _________________________________________________________________
25264 + 4.17. New Transaction Log Formats
25268 + SET TRANSACTION-LOG { VERBOSE, FTP, BRIEF [ separator ] }
25270 + lets you choose the format of the transaction log. VERBOSE (the
25271 + default) indicates the traditional format described in the book. BRIEF
25272 + and FTP are new. This command must be given prior to the LOG
25273 + TRANSACTION command if a non-VERBOSE type is desired.
25275 + 4.17.1. The BRIEF Format
25277 + BRIEF chooses a one-line per file format suitable for direct
25278 + importation into databases like Informix, Oracle, or Sybase, in which:
25280 + * Each record has 8 fields.
25281 + * Fields are separated by a non-alphanumeric separator character.
25282 + * The default separator character is comma (,).
25283 + * Any field containing the separator character is enclosed in
25285 + * The final field is enclosed in doublequotes.
25289 + 1. Date in yyyymmdd format
25290 + 2. Time in hh:mm:ss format
25291 + 3. Action: SEND or RECV
25292 + 4. The local filename
25293 + 5. The size of the file
25294 + 6. The transfer mode (text, binary, image, labeled)
25295 + 7. The status of the transfer: OK or FAILED
25296 + 8. Additional status-dependent info, in doublequotes.
25300 + 20000208,12:08:52,RECV,/u/olga/oofa.txt,5246,text,OK,"0.284sec 18443cps"
25301 + 20000208,12:09:31,SEND,/u/olga/oofa.exe,32768,binary,OK,"1.243sec 26362cps"
25302 + 20000208,12:10:02,SEND,"/u/olga/a,b",10130,text,FAILED,"Refused: date"
25304 + Note how the filename is enclosed in doublequotes in the final
25305 + example, because it contains a comma.
25307 + To obtain BRIEF format, you must give the SET TRANSACTION-LOG BRIEF
25308 + command before the LOG TRANSACTIONS command. (If you give them in the
25309 + opposite order, a heading is written to the log by the LOG command.)
25310 + _________________________________________________________________
25312 + 4.17.2. The FTP Format
25314 + SET TRANSACTION-LOG FTP (available only in UNIX) chooses a format that
25315 + is compatible with the WU-FTPD (Washington University FTP daemon) log,
25316 + and so can be processed by any software that processes the WU-FTPD
25317 + log. It logs only transfers in and out, both successful and failed
25318 + (but success or failure is not indicated, due to lack of a field in
25319 + the WU-FTPD log format for this purpose). Non-transfer events are not
25322 + Unlike other logs, the FTP-format transaction log is opened in append
25323 + mode by default. This allows you to easily keep a record of all your
25324 + kermit transfers, and it also allows the same log to be shared by
25325 + multiple simultaneous Kermit processes or (permissions permitting)
25326 + users. You can, of course, force creation of a new logfile by
25327 + specifying the NEW keyword after the filename, e.g.
25329 + log transactions oofa.log new
25331 + All records in the FTP-style log are in a consistent format. The first
25332 + field is fixed-length and contains spaces; subsequent fields are
25333 + variable length, contain no spaces, and are separated by one or more
25334 + spaces. The fields are:
25337 + This is an asctime-style timestamp, example: "Wed Sep 16
25338 + 20:19:05 1999" It is always exactly 24 characters long, and the
25339 + subfields are always in fixed positions.
25342 + The whole number of seconds required to transfer the file, as a
25343 + string of decimal digits, e.g. "24".
25346 + The name of the network host to which C-Kermit is connected, or
25347 + the name of the serial device through which it has dialed (or
25348 + has a direct connection), or "/dev/tty" for transfers in remote
25351 + Bytes transferred
25352 + The number of bytes transferred, decimal digits, e.g.
25356 + The name of the file that was transferred, e.g.
25357 + "/pub/ftp/kermit/a/README.TXT". If the filename contains any
25358 + spaces or control characters, each such character is replaced
25359 + by an underscore ('_') character.
25362 + The letter 'b' if the file was transferred in binary mode, or
25363 + 'a' if it was transferred in text (ASCII) mode.
25366 + This field always contains an underscore ('_') character.
25369 + The letter 'o' if the file was transferred Out, and 'i' if the
25370 + file was transferred In.
25373 + The letter 'r' indicates the file was transferred by a Real
25376 + User identification
25377 + The ID of the user who transferred the file.
25379 + Server identification
25380 + The string "kermit". This distinguishes a Kermit transfer log
25381 + record from a WU-FTPD record, which contains "ftp" in this
25384 + Authentication class
25385 + The digit '1' if we know the user's ID on the client system,
25386 + otherwise '0'. Currently, always '0'.
25388 + Authenticated user
25389 + If the authentication class is '1', this is the user's ID on
25390 + the client system. Otherwise it is an asterisk ('*'). Currently
25391 + it is always an asterisk.
25395 + Thu Oct 22 17:42:48 1998 0 * 94 /usr/olga/new.x a _ i r olga kermit 0 *
25396 + Thu Oct 22 17:51:29 1998 1 * 147899 /usr/olga/test.c a _ o r olga kermit 0 *
25397 + Thu Oct 22 17:51:44 1998 1 * 235 /usr/olga/test.o b _ i r olga kermit 0 *
25398 + Fri Oct 23 12:10:25 1998 0 * 235 /usr/olga/x.ksc a _ o r olga kermit 0 *
25400 + Note that an ftp-format transaction log can also be selected on the
25401 + Kermit command line as follows:
25403 + kermit --xferfile:filespec
25405 + This is equivalent to:
25407 + SET TRANSACTION-LOG FTP
25408 + LOG TRANSACTIONS filespec APPEND
25410 + Conceivably it could be possible to have a system-wide shared Kermit
25411 + log, except that UNIX lacks any notion of an append-only file; thus
25412 + any user who could append to the log could also delete it (or alter
25413 + it). This problem could be worked around using setuid/setgid tricks,
25414 + but these would most likely interfere with the other setuid/setgid
25415 + tricks C-Kermit must use for getting at dialout devices and UUCP
25417 + _________________________________________________________________
25419 + 4.18. Unprefixing NUL
25421 + As of 6.1.193 Alpha.10, C-Kermit can finally send and receive
25422 + file-transfer packets in which NUL (ASCII 0) is unprefixed (no more
25423 + NUL-terminated packets!). NUL is, of course, extremely prevalent in
25424 + binary files such as executables, and this has been a significant
25425 + source of packet overhead. For example, when transferring itself (the
25426 + SunOS C-Kermit executable) with minimal prefixing and 9000-byte
25429 + File size: 1064960
25430 + Packet chars with 0 prefixed: 1199629 overhead = 12.65%
25431 + Packet chars with 0 unprefixed: 1062393 overhead = -0.03%
25433 + Transfer rates go up accordingly, not only because of the reduced
25434 + amount of i/o, but also because less computation is required on each
25436 + _________________________________________________________________
25438 + 4.19. Clear-Channel Protocol
25440 + Now that C-Kermit itself is capable of sending and receiving any byte
25441 + at all on a clear channel ([516]Section 4.18), it is, for the first
25442 + time, in a position to negotiate a clear channel with the other
25443 + Kermit, giving it permission (but not requiring it) to unprefix any
25444 + and all characters that it knows are safe. In general this means all
25445 + but the Kermit start-of-packet character (normally Ctrl-A), Carriage
25446 + Return (not only Kermit's end-of-packet character, but also treated
25447 + specially on Telnet NVT links), and IAC (255, also special to Telnet).
25449 + By default, C-Kermit will say it has a clear channel only if it has
25450 + opened a TCP socket. Since the Kermit program on the far end of a
25451 + TCP/IP connection generally does not know it has a TCP/IP connection,
25452 + it will not announce a clear channel unless it has been told to do so.
25455 + SET CLEAR-CHANNEL { ON, OFF, AUTO }
25457 + AUTO is the default, meaning that the clear-channel status is
25458 + determined automatically from the type of connection. ON means to
25459 + announce a clear channel, OFF means not to announce it. Use SHOW
25460 + STREAMING ([517]Section 4.20) to see the current CLEAR-CHANNEL status.
25461 + Synonym: SET CLEARCHANNEL.
25463 + CLEAR-CHANNEL is also set if you start C-Kermit with the -I switch
25464 + (see [518]Section 4.20).
25466 + Whenever a clear channel is negotiated, the resulting
25467 + control-character unprefixing is "sticky"; that is, it remains in
25468 + effect after the transfer so you can use SHOW CONTROL to see what was
25471 + You can also see whether a clear channel was negotiated in the
25472 + STATISTICS /VERBOSE Display.
25474 + The advantage of the clear channel feature is that it can make file
25475 + transfers go faster automatically. The disadvantage would be
25476 + file-transfer failures if the channel is not truly clear, for example
25477 + if C-Kermit made a Telnet connection to a terminal server, and then
25478 + dialed out from there; or if C-Kermit made an Rlogin connection to
25479 + host and then made a Telnet connection from there to another host. If
25480 + a file transfer fails on a TCP/IP connection, use SHOW CONTROL to
25481 + check whether control characters became unprefixed as a result of
25482 + protocol negotiations, and/or SHOW STREAMING ([519]Section 4.20) to
25483 + see if "clear-channel" was negotiated. If this happened, use SET
25484 + CLEAR-CHANNEL OFF and SET PREFIXING CAUTIOUS (or whatever) to prevent
25485 + it from happening again.
25486 + _________________________________________________________________
25488 + 4.20. Streaming Protocol
25490 + A new Kermit protocol option called "streaming" was added in C-Kermit
25491 + 7.0. The idea is that if the two Kermit partners have a reliable
25492 + transport (such as TCP/IP or X.25) between them, then there is no need
25493 + to send ACKs for Data packets, or NAKs, since a reliable transport
25494 + will, by definition, deliver all packets in order and undamaged. On
25495 + such a connection, streaming cuts down not only on Kermit program
25496 + overhead (switching back and forth between reading and sending
25497 + packets), but also tends to make the underlying transport use itself
25498 + more efficiently (e.g. by defeating the Nagle algorithm and/or Delayed
25499 + ACK stratagem of the TCP layer). Furthermore, it allows transfers to
25500 + work smoothly on extremely slow network congestions that would
25501 + otherwise cause timeouts and retransmissions, and even failure when
25502 + the retry limit was exceeded.
25504 + The trick is knowing when we can stream:
25506 + 1. If C-Kermit has opened a TCP socket or X.25 connection, it offers
25508 + 2. If C-Kermit has been started with the -I (uppercase) option, or if
25509 + it has been told to SET RELIABLE ON, it offers to stream.
25510 + 3. If C-Kermit is in remote mode, and has been told to SET RELIABLE
25511 + AUTO (or ON), it always offers to stream, and also always agrees
25512 + to stream, if the other Kermit offers. Unless you take explicit
25513 + actions to override the defaults, this allows the local Kermit
25514 + (the one that made the connection, and so knows whether it's
25515 + reliable) to control streaming.
25517 + (Note that an offer to stream also results in a Clear-Channel
25518 + announcement if CLEAR-CHANNEL is set to AUTO; see [520]Section 4.19.)
25520 + When BOTH Kermits offer to stream, then they stream; otherwise they
25521 + don't. Thus streaming-capable Kermit programs interoperate
25522 + automatically and transparently with nonstreaming ones. If the two
25523 + Kermits do agree to stream, you'll see the word "STREAMING" on the
25524 + fullscreen file-transfer display in the Window Slots field. You can
25525 + also find out afterwards with the STATISTICS or SHOW STREAMING
25528 + WARNING: Automatic choice of streaming is based on the assumption
25529 + of a "direct" end-to-end network connection; for example, a Telnet
25530 + or Rlogin connection from host A to host B, and transferring files
25531 + between A and B. However, if your connection has additional
25532 + components -- something "in the middle" (B) that you have made a
25533 + network connection to, which makes a separate connection to the
25534 + destination host (C), then you don't really have a reliable
25535 + connection, but C-Kermit has no way of knowing this; transferring
25536 + files between A and C will probably fail. In such cases, you'll
25537 + need to tell the *local* C-Kermit to "set reliable off" before
25538 + transferring files (it does no good to give this command to the
25539 + remote Kermit since the local one controls the RELIABLE setting).
25541 + Streaming is like using an infinite window size, with no timeouts and
25542 + no tolerance for transmission errors (since there shouldn't be any).
25543 + It relies on the underlying transport for flow control, error
25544 + correction, timeouts, and retransmission. Thus it is very suitable for
25545 + use on TCP/IP connections, especially slow or bursty ones, since
25546 + Kermit's packet timeouts won't interfere with the transfer -- each
25547 + packet takes as long to reach its destination as it takes TCP to
25548 + deliver it. If TCP can't deliver the packet within its own timeout
25549 + period (over which Kermit has no control), it signals a fatal error.
25552 + Streaming goes much faster than non-streaming when a relatively small
25553 + packet length is used, and it tends to go faster than non-streaming
25554 + with even the longest packet lengths. The Kermit window size is
25555 + irrelevant to streaming protocol, but still might affect performance
25556 + in small ways since it can result in different paths through the code.
25558 + The definition of "reliable transport" does not necessarily demand
25559 + 8-bit and control-character transparency. Streaming can work with
25560 + parity and/or control-character prefixing just as well (but not as
25561 + fast) as without them; in such cases you can leave RELIABLE set to ON,
25562 + but set CLEARCHANNEL and/or PARITY appropriately.
25564 + Maximum performance -- comparable to and often exceeding FTP -- is
25565 + achieved on socket-to-socket connections (in which the considerable
25566 + overhead of the terminal driver and Telnet or Rlogin server is
25567 + eliminated) with long packets and the new "brief" file-transfer
25568 + display ([521]Section 4.16).
25569 + _________________________________________________________________
25571 + 4.20.1. Commands for Streaming
25573 + SET RELIABLE { ON, OFF, AUTO }
25574 + SET RELIABLE ON tells Kermit that it has a reliable transport.
25575 + SET RELIABLE OFF tells Kermit the transport is not reliable.
25576 + SET RELIABLE AUTO tells Kermit that it should SET RELIABLE ON
25577 + whenever it makes a reliable connection (e.g. TELNET or SET
25578 + HOST on a TCP/IP or X.25 network), and when in remote mode it
25579 + should believe the transport is reliable if the other Kermit
25580 + says it is during Kermit protocol negotiation.
25582 + AUTO is the default; the Kermit program that makes the connection
25583 + knows whether it is reliable, and tells the remote Kermit.
25585 + The RELIABLE setting has several effects, including:
25587 + * It can affect the timeouts used during normal ACK/NAK protocol.
25588 + * It can affect the clear-channel announcement.
25589 + * It can affect streaming.
25591 + If you TELNET or SET HOST somewhere, this includes an implicit SET
25592 + RELIABLE ON command. The -I command-line option is equivalent to SET
25595 + Since SET RELIABLE ON (and -I) also implies SET CLEAR CHANNEL ON, you
25596 + might find that in certain cases you need to tell Kermit that even
25597 + though the connection is reliable, it doesn't have a clear channel
25600 + SET CLEAR-CHANNEL OFF
25601 + SET PREFIXING CAUTIOUS ; or whatever...
25603 + You can control streaming without affecting the other items with:
25605 + SET STREAMING { ON, OFF, AUTO }
25607 + AUTO is the default, meaning streaming will occur if Kermit has made a
25608 + TCP/IP connection or if RELIABLE is ON (or it was started with the -I
25609 + command line option). OFF means don't stream; ON means offer to stream
25611 + _________________________________________________________________
25613 + 4.20.2. Examples of Streaming
25615 + Here we look at the use and behavior of streaming on several different
25616 + kinds of connections, and compare its performance with non-streaming
25619 + 4.20.2.1. Streaming on Socket-to-Socket Connections
25621 + Here we get streaming automatically when both Kermit programs are
25622 + capable of it, since they both make socket connections. For example,
25625 + C-Kermit> set host * 3000
25628 + and on the near end:
25630 + C-Kermit> set host foo.bar.xyz.com 3000
25631 + (now give SEND and GET command)
25633 + All subsequent file transfers use streaming automatically.
25635 + Here are the results from 84 trials, run on a production network,
25636 + disk-to-disk, in which a 1-MB binary file (the SunOS C-Kermit Sparc
25637 + executable) was sent from a Sun Sparc-10 with SunOS 4.1.3 to an IBM
25638 + Power Server 850 with AIX 4.1, socket-to-socket, over a 10Mbps 10BaseT
25639 + Ethernet, using minimal control-character unprefixing, window sizes
25640 + from 10 to 32, and packet sizes from 1450 to 9010:
25642 + Streaming Nonstreaming
25643 + Max CPS 748955 683354
25644 + Min CPS 221522 172491
25645 + Mean CPS 646134 558680
25646 + Median CPS 678043 595874
25647 + Std Dev 101424 111493
25651 + CPS and window size: -0.036
25652 + CPS and packet length: 0.254
25653 + CPS and streaming: 0.382
25655 + Note that the relationship between streaming and throughput is
25656 + significantly stronger than that between CPS and window size or packet
25659 + Also note that this and all other performance measurements in this
25660 + section are snapshots in time; the results could be much different at
25661 + other times when the load on the systems and/or the network is higher
25664 + In a similar socket-to-socket trial, but this time over a wide-area
25665 + TCP/IP connection (from New York City to Logan, Utah, about 2000
25666 + miles), the following results were obtained:
25668 + Streaming Nonstreaming
25669 + Max CPS 338226 318203
25670 + Min CPS 191659 132314
25671 + Mean CPS 293744 259240
25672 + Median CPS 300845 273271
25673 + Std Dev 41914 52351
25677 + CPS and window size: 0.164
25678 + CPS and packet length: 0.123
25679 + CPS and streaming: 0.346
25680 + _________________________________________________________________
25682 + 4.20.2.2. Streaming on Telnet Connections
25684 + In this case the local copy of Kermit is told to TELNET or SET HOST,
25685 + and so it knows it has a reliable connection and -- unless it has been
25686 + told not to -- will offer to stream, and the other Kermit program,
25687 + since it has STREAMING set to AUTO, agrees.
25689 + Since we have a reliable connection, we'll also get control-character
25690 + unprefixing automatically because of the new clear-channel protocol
25691 + ([522]Section 4.19).
25693 + Any errors that occur during streaming are fatal to the transfer. The
25694 + message is "Transmission error on reliable link". Should this happen:
25696 + 1. Check the remote Kermit's flow control setting (SHOW
25697 + COMMUNICATIONS). If it is NONE, change it to XON/XOFF, or vice
25698 + versa. If it is XON/XOFF (or you just changed it to XOFF/XOFF),
25699 + make sure the file sender is prefixing the XON and XOFF
25700 + characters. In the most drastic case, use "set prefix all" to
25701 + force prefixing of all control characters.
25702 + 2. The remote Telnet server might chop off the 8th bit. In that case,
25703 + tell C-Kermit to "set parity space". Or, you might be able to
25704 + force the Telnet to allow eight-bit data by telling C-Kermit to
25705 + "set telopt binary request accept" -- that is, request the Telnet
25706 + server to enter binary mode, and accept binary-mode bids from the
25708 + 3. The remote Telnet server might have a buffering limitation. If a
25709 + and b don't cure the problem, tell the file receiver to "set
25710 + receive packet-length 1000" (or other number -- use the largest
25711 + one that works). This too, is no different from the non-streaming
25712 + case (more about this in [523]Section 4.20.2.3).
25714 + And remember you can continue interrupted binary-mode transfers where
25715 + they left off with the RESEND (= SEND /RECOVER) command.
25717 + Here are the figures for the same 84 trials between the same Sun and
25718 + IBM hosts as in 4.20.2.1, on the same network, but over a Telnet
25719 + connection rather than socket-to-socket:
25721 + Streaming Nonstreaming
25722 + Max CPS 350088 322523
25723 + Min CPS 95547 173152
25724 + Mean CPS 321372 281830
25725 + Median CPS 342604 291469
25726 + Std Dev 40503 29948
25730 + CPS and window size: 0.001
25731 + CPS and packet length: 0.152
25732 + CPS and streaming: 0.128
25734 + Here the effect is not as emphatic as in the socket-to-socket case,
25735 + yet on the whole streaming tends to be beneficial.
25737 + Additional measurements on HP-UX using C-Kermit 7.0 Beta.06:
25739 + Windowing Streaming
25740 + HP-UX 8->8 not tested 14Kcps
25741 + HP-UX 8->9 not tested 76Kcps
25742 + HP-UX 8->10 36Kcps 66Kcps
25743 + HP-UX 9->9 not tested 190Kcps
25744 + HP-UX 9->10 160Kcps 378Kcps
25745 + _________________________________________________________________
25747 + 4.20.2.3. Streaming with Limited Packet Length
25749 + The IRIX telnet server (at least the ones observed in IRIX 5.3 and
25750 + 6.2) does not allow Kermit to send packets longer than 4096 bytes.
25751 + Thus when sending from IRIX C-Kermit when it is on the remote end of a
25752 + Telnet connection, the packet length must be 4K or less. Trials in
25753 + this case (in which packet lengths range from 1450 to 4000) show a
25754 + strong advantage for streaming, which would be evident in any other
25755 + case where the packet length is restricted, and stronger the shorter
25756 + the maximum packet length.
25758 + Streaming Nonstreaming
25759 + Max CPS 426187 366870
25760 + Min CPS 407500 276517
25761 + Mean CPS 415226 339168
25762 + Median CPS 414139 343803
25763 + Std Dev 6094 25851
25767 + CPS and window size: 0.116
25768 + CPS and packet length: 0.241
25769 + CPS and streaming: 0.901
25770 + _________________________________________________________________
25772 + 4.20.2.4. Streaming on Dialup Connections
25774 + Here "dialup" refers to a "direct" dialup connection, not a SLIP or
25775 + PPP connection, which is only a particular kind of TCP/IP connection.
25777 + Attempt this at your own risk, and then only if (a) you have
25778 + error-correcting modems, and (b) the connections between the modems
25779 + and computers are also error-free, perfectly flow-controlled, and free
25780 + of interrupt conflicts. Streaming can be used effectively and to
25781 + fairly good advantage on such connections, but remember that the
25782 + transfer is fatal if even one error is detected (also remember that
25783 + should a binary-mode transfer fail, it can be recovered from the point
25784 + of failure with RESEND).
25786 + To use streaming on an unreliable connection, you must tell both
25787 + Kermits that the connection is reliable:
25793 + C-Kermit> set reliable on
25795 + In this case, it will probably be necessary to prefix some control
25796 + characters, for example if your connection is through a terminal
25797 + server that has an escape character. Most Cisco terminal servers, for
25798 + example, require Ctrl-^ (30, as well as its high-bit equivalent, 158)
25799 + to be prefixed. To unprefix these, you'll need to defeat the "clear
25800 + channel" feature:
25802 + C-Kermit> set reliable on
25803 + C-Kermit> set clear-channel off
25804 + C-Kermit> set prefixing none
25805 + C-Kermit> set control prefix 1 13 30 158 ; and whatever else is necessary
25807 + Dialup trials were done using fixed large window and packet sizes.
25808 + They compare uploading and downloading of two common types of files,
25809 + with and without streaming. Configuration:
25811 + HP-9000/715/33 -- 57600bps, RTS/CTS -- USR Courier V.34 --
25812 + V.34+V.42, 31200bps -- USR V.34+ Rackmount -- 57600bps, RTS/CTS --
25813 + Cisco terminal server -- Solaris 2.5.1. Packet size = 8000, Window
25814 + Size = 30, Control Character Unprefixing Minimal (but including the
25815 + Cisco escape character).
25817 + Since this is not a truly reliable connection, a few trials failed
25818 + when a bad packet was received (most likely due to UART overruns); the
25819 + failure was graceful and immediate, and the message was informative.
25820 + The results of ten successful trials uploading and downloading the two
25821 + files with and without streaming are:
25825 + Upload 5194 5565 txt (= C source code, 78K)
25826 + 3135 3406 gz (= gzip file, compressed, 85K)
25827 + Download 5194 5565 txt
25830 + Each CPS figure is the mean of 10 results.
25832 + A brief test was also performed on a LAT-based dialout connection from
25833 + a VAX 3100 with VMS 5.5 to a USR Courier V.34 connected to a DECserver
25834 + 700 at 19200 bps. The 1-MB Sparc executable downloaded from a Sun to
25835 + the VAX at 1100cps without streaming and 1900cps with streaming, using
25836 + 8000-byte packets, 30 window slots, and minimal prefixing in both
25838 + _________________________________________________________________
25840 + 4.20.2.5. Streaming on X.25 Connections
25842 + We have only limited access to X.25 networks. One trial was performed
25843 + in which the 1MB Solaris 2.4 Sparc executable was transferred over a
25844 + SunLink X.25 connection; nothing is known about the actual physical
25845 + connection. With a packet length of 8000 and a window size of 30, the
25846 + file transferred at 6400 cps (using a maximum of 6 window slots). With
25847 + the same packet length, but with streaming, it transferred without
25848 + mishap at 6710 cps, about 5% faster.
25849 + _________________________________________________________________
25851 + 4.20.3. Streaming - Preliminary Conclusions
25853 + The results vary with the particular connection, but are good overall.
25854 + Although numerous lower-level tricks can be used to improve
25855 + performance on specific platforms or connection methods, streaming
25856 + occurs at a high, system-independent level of the Kermit protocol and
25857 + therefore can apply to all types of platforms and (reliable)
25858 + connections transparently.
25859 + _________________________________________________________________
25861 + 4.21. The TRANSMIT Command
25863 + Prior to C-Kermit 7.0, the TRANSMIT command transmitted in text or
25864 + binary mode according to SET FILE TYPE { TEXT, BINARY }. But now that
25865 + binary mode is likely to be the default for protocol transfers, it is
25866 + evident that this not also an appropriate default for TRANSMIT, since
25867 + binary-mode TRANSMIT is a rather specialized and tricky operation.
25868 + Therefore, TRANSMIT defaults to text mode always, regardless of the
25869 + FILE TYPE setting.
25871 + C-Kermit 7.0 expands the capabilities of the TRANSMIT command by
25872 + adding the following switches (see [524]Section 1.5). The new syntax
25875 + TRANSMIT [ switches... ] filename
25877 + Zero or more switches may be included:
25880 + When /PIPE is included, "filename" is interpreted as a system
25881 + command or program whose output is to be sent. Synonym:
25882 + /COMMAND. Example:
25884 + transmit /pipe finger
25886 + You may enclose the command in braces, but you don't have to:
25888 + xmit /pipe {ls -l | sort -r +0.22 -0.32 | head}
25891 + Transmits the file (or pipe output) in binary mode.
25894 + Transmits the file (or pipe output) in line-oriented text mode.
25895 + Current FILE CHARACTER-SET and TERMINAL CHARACTER-SET
25896 + selections govern translation. Default.
25899 + Specifies text mode without character-set translation, no
25900 + matter what the FILE and TERMINAL CHARACTER-SET selections are.
25903 + This is equivalent to SET TRANSMIT PROMPT 0, but for this
25904 + TRANSMIT command only. Applies only to text mode; it means to
25905 + not wait for any kind of echo or turnaround character after
25906 + sending a line before sending the next line. (Normally Kermit
25907 + waits for a linefeed.)
25909 + When TRANSMIT ECHO is ON, C-Kermit tries to read back the echo of each
25910 + character that is sent. Prior to C-Kermit 7.0, 1 second was allowed
25911 + for each echo to appear; if it didn't show up in a second, the
25912 + TRANSMIT command would fail. Similarly for the TRANSMIT PROMPT
25913 + character. However, with today's congested Internet connections, etc,
25914 + more time is often needed:
25916 + SET TRANSMIT TIMEOUT number
25917 + Specifies the number of seconds to wait for an echo or the prompt
25918 + character when TRANSMIT PROMPT is nonzero; the default wait is 1
25919 + second. If you specify 0, the wait is indefinite. When a timeout
25920 + interval of 0 is specified, and a desired echo or prompt does not show
25921 + up, the TRANSMIT command will not terminate until or unless you
25922 + interrupt it with Ctrl-C; use SET TRANSMIT TIMEOUT 0 with caution.
25924 + Note: to blast a file out the communications connection without any
25925 + kind of synchronization or timeouts or other manner of checking, use:
25927 + SET TRANSMIT ECHO OFF
25928 + SET TRANSMIT PROMPT 0 (or include the /NOWAIT switch)
25929 + SET TRANSMIT PAUSE 0
25930 + TRANSMIT [ switches ] filename
25932 + In this case, text-file transmission is not-line oriented and large
25933 + blocks can be sent, resulting in a significant performance improvement
25934 + over line-at-at-time transmission. Successful operation depends (even
25935 + more than usual for the TRANSMIT command!) on a clean connection with
25936 + effective flow control.
25938 + For details on TRANSMIT and character sets, see [525]Section 6.6.5.4.
25939 + _________________________________________________________________
25941 + 4.22. Coping with Faulty Kermit Implementations
25943 + Kermit protocol has been implemented in quite a few third-party
25944 + commercial, shareware, and freeware software packages, with varying
25945 + degrees of success. In most cases operation is satisfactory but slow
25946 + -- only the bare minimum subset of the protocol is available -- short
25947 + packets, no sliding windows, no attributes, etc. In other cases, the
25948 + implementation is incorrect, resulting in failures at the initial
25949 + negotiation stage or corrupted files.
25951 + C-Kermit 7.0 and Kermit 95 1.1.19 include some new defense mechanisms
25952 + to help cope with the most common situations. However, bear in mind
25953 + there is only so much we can do in such cases -- the responsibility
25954 + for fixing the problem lies with the maker of the faulty software.
25955 + _________________________________________________________________
25957 + 4.22.1. Failure to Accept Modern Negotiation Strings
25959 + The published Kermit protocol specification states that new fields can
25960 + be added to the parameter negotiation string. These are to be ignored
25961 + by any Kermit implementation that does not understand them; this is
25962 + what makes the Kermit protocol extensible. Unfortunately, some Kermit
25963 + implementations become confused (or worse) when receiving a
25964 + negotiation string longer than the one they expect. You can try
25965 + working around such problems by telling Kermit to shorten its
25966 + negotiation string (and thus disable the corresponding new features):
25968 + SET SEND NEGOTIATION-STRING-MAX-LENGTH number
25970 + Try a number like 10. If that doesn't work, try 9, 8, 7, 6, and so on.
25971 + _________________________________________________________________
25973 + 4.22.2. Failure to Negotiate 8th-bit Prefixing
25975 + The published Kermit protocol specification states that 8th-bit
25976 + prefixing (which allows transfer of 8-bit data over a 7-bit
25977 + connection) occurs if the file sender puts a valid prefix character
25978 + (normally "&") in the 8th-bit-prefix field of the negotiation string,
25979 + and the receiver puts either a letter "Y" or the same prefix
25980 + character. At least one faulty Kermit implementation exists that does
25981 + not accept the letter "Y". To force C-Kermit / K-95 to reply with the
25982 + other Kermit's prefix character rather than a "Y", give the following
25983 + (invisible) command:
25987 + Use SET Q8FLAG OFF to restore the normal behavior.
25988 + _________________________________________________________________
25990 + 4.22.3. Corrupt Files
25992 + Refer to [526]Section 4.22.2. Some Kermit implementations mistakenly
25993 + interpret the "Y" as a prefix character. Then, whenever a letter Y
25994 + appears in the data, the Y and the character that follows it are
25995 + replaced by a garbage character. At this writing, we are not sure if
25996 + there is any solution, but try "set send negotiation-string-max-length
25997 + 6" and/or "set q8flag on".
25999 + File corruption can also occur when control characters within the file
26000 + data are sent without prefixing, as at least some are by default in
26001 + C-Kermit 7.0 and K-95. Some Kermit implementations do not handle
26002 + incoming "bare" control characters. To work around, "set prefixing
26004 + _________________________________________________________________
26006 + 4.22.4. Spurious Cancellations
26008 + The Kermit protocol specification states that if an ACK to a Data
26009 + packet contains X in its data field, the transfer of the current file
26010 + is canceled, and if it contains a Z, the entire transfer is canceled.
26011 + At least one overzealous Kermit implementation applies this rule to
26012 + non-Data packets as well, the typical symptom being that any attempt
26013 + to transfer a file whose name begins with X or Z results in
26014 + cancellation. This is because the file receiver typically sends back
26015 + the name under which it stored the file (which might not be the same
26016 + as the name it was sent with) in the ACK to the File Header packet.
26017 + This is information only and should not cause cancellation. To work
26018 + around the problem, use:
26020 + SET F-ACK-BUG { ON, OFF }
26022 + ON tells Kermit not to send back the filename in the ACK to the file
26023 + header packet as it normally would do (OFF puts Kermit back to normal
26026 + A variation on the this bug occurs in an obscure Kermit program for
26027 + MUMPS: When this Kermit program sends a file called (say) FOO.BAR, it
26028 + requires that the ACK to its F packet contain exactly the same name,
26029 + FOO.BAR. However, C-Kermit likes to send back the full pathname,
26030 + causing the MUMPS Kermit to fail. SET F-ACK-BUG ON doesn't help here.
26031 + So a separate command has been added to handle this situation:
26033 + SET F-ACK-PATH { ON, OFF }
26035 + Normally it is ON (regardless of the SET SEND PATHNAMES setting). Use
26036 + SET F-ACK-PATH OFF to instruct Kermit to send back only the filename
26037 + without the path in the ACK to the F packet.
26038 + _________________________________________________________________
26040 + 4.22.5. Spurious Refusals
26042 + Some Kermit implementations, notably PDP-11 Kermit 3.60 and earlier,
26043 + have bugs in their handling of Attribute packets that can cause
26044 + unwarranted refusal of incoming files, e.g. based on date or size.
26045 + This can be worked around by telling one or both of the Kermit
26048 + SET ATTRIBUTES OFF
26049 + _________________________________________________________________
26051 + 4.22.6. Failures during the Data Transfer Phase
26053 + This can be caused by control-character unprefixing ([527]Section
26054 + 4.22.3 ), and fixed by:
26056 + SET PREFIXING ALL
26058 + It can also have numerous other causes, explained in Chapter 10 of
26059 + [528]Using C-Kermit: the connection is not 8-bit transparent (so use
26060 + "set parity space" or somesuch), inadequate flow control, etc. Consult
26062 + _________________________________________________________________
26064 + 4.22.7. Fractured Filenames
26066 + At least one well-known PC-based communications package negotiates
26067 + data compression, which (according to the protocol specification)
26068 + applies to both the filename and the file data, but then fails to
26069 + decompress the filename. Example: C-Kermit sends a file called
26070 + R000101.DAT (where 000101 might be non-Y2K-wise YYMMDD notation), and
26071 + the package in question stores the files as R~#0101.DAT. Workaround:
26072 + Tell C-Kermit to SET REPEAT COUNTS OFF.
26073 + _________________________________________________________________
26075 + 4.22.8. Bad File Dates
26077 + At least one well-known PC-based communications package negotiates the
26078 + passing of file timestamps from sender to receiver, but when it is
26079 + sending files, it always gives them a timestamp of 1 February 1970.
26080 + Workaround: tell C-Kermit to SET ATTRIBUTE DATE OFF. You don't get the
26081 + file's real date, but you also don't get 1 Feb 1970; instead the file
26082 + gets the current date and time.
26083 + _________________________________________________________________
26085 + 4.23. File Transfer Recovery
26087 + Prior to C-Kermit 7.0, RESEND (SEND /RECOVER) and REGET (GET /RECOVER)
26088 + refused to work if FILE TYPE was not BINARY or the /BINARY switch was
26089 + not included. Now these commands include an implied /BINARY switch,
26090 + meaning they set the file type to binary for the duration of the
26091 + command automatically.
26093 + In the client/server arrangement, this also forces the server into
26094 + binary mode (if it is C-Kermit 7.0 or greater, or K95 1.1.19 or
26095 + greater) so the recovery operation proceeds, just as you asked and
26098 + BUT... Just as before, the results are correct only under the
26099 + following conditions:
26101 + * If the prior interrupted transfer was also in binary mode; or:
26102 + * If the prior transfer was in text mode and the other computer was
26103 + a "like platform" (e.g. UNIX-to-UNIX, Windows-to-Windows,
26104 + DOS-to-Windows) AND there was no character-set translation (i.e.
26105 + TRANSFER CHARACTER-SET was TRANSPARENT).
26107 + Note that these circumstances are more likely to obtain in C-Kermit
26110 + * The default FILE TYPE in C-Kermit 7.0 is BINARY.
26111 + * The default FILE INCOMPLETE setting is AUTO, which means KEEP if
26112 + the transfer is in binary mode, DISCARD otherwise.
26113 + * C-Kermit 7.0, Kermit 95 1.1.17, and MS-DOS Kermit 3.15 and later
26114 + can recognize "like platforms" and switch into binary mode
26115 + automatically. Transfers between like platforms are always binary
26116 + unless character-set translation has been requested, and then is
26117 + still binary for all files whose names match a binary pattern,
26118 + unless the automatic mechanisms have been disabled (with a /TEXT
26119 + switch, or with SET TRANSFER MODE MANUAL).
26120 + * SEND /BINARY and GET /BINARY always force binary-mode transfers,
26121 + even when FILE TYPE is TEXT, even when TRANSFER MODE is AUTOMATIC,
26122 + even when PATTERNS are ON and the file's name matches a text
26125 + But also note that the automatic client/server transfer-mode
26126 + adjustments do not work with versions of C-Kermit prior to 7.0 or K95
26129 + If the prior transfer was in text mode:
26131 + * If text-mode transfers between the two platforms are
26132 + "length-changing" (as they are between UNIX -- which terminates
26133 + text lines with LF -- and DOS or Windows -- which terminates text
26134 + lines with CRLF), the recovered file will be corrupt.
26135 + * If text-mode transfers between the two platforms are not
26136 + length-changing, but character-set translation was active in the
26137 + prior transfer, the result will be a file in which the first part
26138 + has translated characters and the second part does not.
26140 + But in C-Kermit 7.0 and K95 1.1.19 and later, incompletely transferred
26141 + text files are not kept unless you change the default. But if you have
26142 + done this, and you have an incompletely transferred text file, you'll
26145 + * Transfer the whole file again in text mode, or:
26146 + * Use SEND /STARTING-AT: to recover the transfer at the correct
26147 + point; but you have to find out what that point is, as described
26150 + Kermit has no way of knowing whether the previous transfer was in text
26151 + or binary mode so it is your responsibility to choose the appropriate
26154 + If you use C-Kermit to maintain parallel directories on different
26155 + computers, using SET FILE COLLISION to transfer only those files that
26156 + changed since last time, and the files are big enough (or the
26157 + connection slow enough) to require SEND /RECOVER to resume interrupted
26158 + transfers, you should remember that SEND /RECOVER (RESEND) overrides
26159 + all FILE COLLISION settings. Therefore you should use SEND /RECOVER
26160 + (RESEND) only on the file that was interrupted, not the file group.
26161 + For example, if the original transfer was initiated with:
26165 + and was interrupted, then after reestablishing your connection and
26166 + starting the Kermit receiver with SET FILE COLLISION UPDATE on the
26167 + remote end, use the following sequence at the sender to resume the
26170 + SEND /RECOVER name-of-interrupted-file
26176 + (In C-Kermit 7.0 and later, \v(filename) contains the name of the file
26177 + most recently transferred, as long you have not EXITed from Kermit or
26178 + changed directory, etc.
26179 + _________________________________________________________________
26181 + 4.24. FILE COLLISION UPDATE Clarification
26183 + In UNIX, file modification dates are used when comparing the file date
26184 + with the date in the attribute packet. In VMS, however, the file
26185 + creation date is used. These two policies reflect the preferences of
26186 + the two user communities.
26188 + Also, remember that the file date/time given in the attribute packet
26189 + is the local time at the file sender. At present, no timezone
26190 + conversions are defined in or performed by the Kermit protocol. This
26191 + is primarily because this feature was designed at a time when many of
26192 + the systems where Kermit runs had no concept of timezone, and
26193 + therefore would be unable to convert (say, to/from GMT or UTC or Zulu
26196 + As a consequence, some unexpected results might occur when
26197 + transferring files across timezones; e.g. commands on the target
26198 + system that are sensitive to file dates might work (UNIX "make",
26201 + Timezone handling is deferred for a future release.
26202 + _________________________________________________________________
26204 + 4.25. Autodownload Improvements
26206 + Refer to pages 164-165 of [529]Using C-Kermit about the hazards of
26207 + autodownload when C-Kermit is "in the middle". As of C-Kermit 7.0, no
26208 + more hazards. If C-Kermit has TERMINAL AUTODOWNLOAD ON and it detects
26209 + a packet of the current protocol type (Kermit or Zmodem), it "erases"
26210 + the visual aspect of the packet that would be seen by the terminal
26211 + (or, more to the point, the emulator, such as K95). This way, only
26212 + C-Kermit goes into RECEIVE mode, and not also the terminal emulator
26213 + through which C-Kermit is accessed. And therefore, it is no longer
26214 + necessary to SET TERMINAL AUTODOWNLOAD OFF to prevent multiple Kermits
26215 + from going into receive mode at once, but of course it is still
26216 + necessary to ensure that, when you have multiple Kermits in a chain,
26217 + that the desired one receives the autodownload.
26219 + The defaults have not been changed; Kermit 95 still has autodownload
26220 + ON by default, and C-Kermit has it OFF by default.
26221 + _________________________________________________________________
26227 + If you use SET SERVER GET-PATH to set up your server, and the GET-PATH
26228 + does not include the server's current directory, clients can become
26229 + quite confused. For example, "remote dir oofa.txt" shows a file named
26230 + oofa.txt, but "get oofa.txt" fails. In this situation, you should
26231 + either DISABLE DIR or make your GET-PATH include the current
26233 + _________________________________________________________________
26235 + 5.1. New Command-Line Options
26237 + The -G command-line option is like -g (GET), except the incoming file
26238 + is sent to standard output rather than written to disk.
26240 + The -I option ("Internet") is used to tell a remote C-Kermit program
26241 + that you are coming in via Internet Telnet or Rlogin and therefore
26242 + have a reliable connection. The -I option is equivalent to SET
26243 + RELIABLE ON and SET FLOW NONE.
26245 + The -O option ("Only One") tells C-Kermit to enter server mode but
26246 + then exit after the first client operation.
26248 + See [530]Section 9.3 for details.
26249 + _________________________________________________________________
26251 + 5.2. New Client Commands
26253 + BYE and FINISH no longer try to do anything if a connection is not
26254 + active. Thus a sequence like "hangup" followed by "bye" or "finish"
26255 + will no longer get stuck in a long timeout-and-retransmission cycle,
26256 + nor will it try to open a new connection.
26259 + Similar to FINISH, except it ensures that the Kermit server
26260 + program exits back to the operating system or shell prompt.
26261 + (FINISH would return it to its interactive prompt if it was
26262 + started in interactive mode, and would cause it to exit if it
26263 + entered server mode via command-line option.) When C-Kermit is
26264 + to be the server, you can use { ENABLE, DISABLE } EXIT to
26265 + control the client's access to this feature.
26267 + REMOTE MKDIR directory-name
26268 + Tells the client to ask the server to create a directory with
26269 + the given name, which can be absolute or relative. The syntax
26270 + of the directory name depends on the Kermit server (see
26271 + [531]next section); in all cases, it can be in the syntax of
26272 + the system where the server is running (UNIX, VMS, DOS, etc)
26273 + but newer servers also accept UNIX syntax, no matter what the
26274 + underlying platform. The server will not execute this command
26275 + if (a) it does not understand it, (b) a DISABLE MKDIR command
26276 + has been given, or (c) a DISABLE CWD command has been given;
26277 + otherwise, the command is executed, but will fail if the
26278 + directory can not be created, in which cases most servers will
26279 + attempt to return a message giving the reason for failure. The
26280 + REMOTE MKDIR command succeeds if the remote directory is
26281 + created, or if it already exists and therefore does not need to
26282 + be created, and fails otherwise.
26284 + REMOTE RMDIR directory-name
26285 + Tells the client to ask the server to remove (delete) a
26286 + directory with the given name. The same considerations apply as
26287 + for REMOTE MKDIR.
26289 + REMOTE SET FILE INCOMPLETE { DISCARD, KEEP, AUTO }
26290 + Previously this was only available in its earlier form, REMOTE
26291 + SET INCOMPLETE (no FILE). The earlier form is still available,
26292 + but invisible. Also, AUTO was added, meaning KEEP if in binary
26293 + mode, DISCARD otherwise.
26295 + REMOTE SET TRANSFER MODE { AUTOMATIC, MANUAL }
26296 + Tells the client to ask the server to set the given
26297 + file-transfer mode. Automatic means (roughly): if the client
26298 + and the server are running on the same kind of computer (e.g.
26299 + both are on UNIX), then use binary mode automatically; if the
26300 + system types are different, use some other method to
26301 + automatically determine text or binary mode, such as filename
26302 + pattern matching. MANUAL means, in this context, obey the
26303 + client's FILE TYPE setting (TEXT or BINARY). Synonym: REMOTE
26306 + [ REMOTE ] QUERY KERMIT function(args...)
26307 + Prior to C-Kermit 7.0, the arguments were not evaluated
26308 + locally. Thus it was not possible to have the server run the
26309 + function with client-side variables as arguments. Now:
26311 + define \%a oofa.*
26312 + remote query kermit files(\%a) ; Client's \%a
26313 + remote query kermit files(\\%a) ; Server's \%a
26315 + [ REMOTE ] LOGIN [ user [ password ] ]
26316 + LOGIN is now a synonym for REMOTE LOGIN.
26319 + This command, when given in local mode, is equivalent to REMOTE
26320 + LOGOUT. When given at the IKSD prompt, it logs out the IKSD.
26321 + When given at the C-Kermit prompt when it has no connection, it
26324 + Note that in C-Kermit 7.0, the REMOTE (or R) prefix is not required
26325 + for QUERY, since there is no local QUERY command. The new top-level
26326 + QUERY command does exactly what REMOTE QUERY (RQUERY) does.
26328 + All REMOTE commands now have single-word shortcuts:
26330 + Shortcut Full Form
26331 + RASG REMOTE ASSIGN
26333 + RCOPY REMOTE COPY
26334 + RDEL REMOTE DELETE
26335 + RDIR REMOTE DIRECTORY
26336 + REXIT REMOTE EXIT
26337 + RHELP REMOTE HELP
26338 + RHOST REMOTE HOST
26343 + The R prefix is not applied to LOGIN because there is already an
26344 + RLOGIN command with a different meaning. It is not applied to LOGOUT
26345 + either, since LOGOUT knows what to do in each case, and for symmetry
26347 + _________________________________________________________________
26349 + 5.2.1. Remote Procedure Definitions and Calls
26351 + This is nothing new, but it might not be obvious... REMOTE ASSIGN and
26352 + REMOTE QUERY may be used to achieve remote procedure execution. The
26353 + remote procedure can be defined locally or remotely.
26355 + A remote procedure call is accomplished as noted in the previous
26358 + [ remote ] query kermit function-name(args...)
26360 + This invokes any function that is built in to the Kermit server, e.g.:
26362 + [ remote ] query kermit size(foo.bar)
26364 + returns the size of the remote file, foo.bar.
26366 + Now note that C-Kermit includes an \fexecute() function, allowing it
26367 + to execute any macro as if it were a built-in function. So suppose
26368 + MYMACRO is the name of a macro defined in the server. You can execute
26369 + it from the client as follows (the redundant "remote" prefix is
26370 + omitted in the remaining examples):
26372 + query kermit execute(mymacro arg1 arg2...)
26374 + The return value, if any, is the value of the RETURN command that
26375 + terminated execution of the macro, for example:
26377 + define addtwonumbers return \feval(\%1+\%2)
26379 + The client invocation would be:
26381 + query kermit execute(addtwonumbers 3 4)
26384 + The result ("7" in this case) is also assigned to the client's
26385 + \v(query) variable.
26387 + To execute a remote system command or command procedure (shell script,
26390 + query kermit command(name args...)
26392 + Finally, suppose you want the client to send a macro to the server to
26393 + be executed on the server end. This is done as follows:
26395 + remote assign macroname definition
26396 + query kermit execute(macroname arg1 arg2...)
26398 + Quoting is required if the definition contains formal parameters.
26399 + _________________________________________________________________
26401 + 5.3. New Server Capabilities
26403 + 5.3.1. Creating and Removing Directories
26405 + The C-Kermit 7.0 server responds to REMOTE MKDIR and REMOTE RMDIR
26406 + commands. The directory name may be in either the native format of the
26407 + server's computer, or in UNIX format. For example, a server running on
26408 + VMS with a current directory of [IVAN] can accept commands from the
26411 + remote mkdir olga ; Makes [IVAN.OLGA] (nonspecific format)
26412 + remote mkdir .olga ; Makes [IVAN.OLGA] (VMS format without brackets)
26413 + remote mkdir olga/ ; Makes [IVAN.OLGA] (UNIX relative format)
26414 + remote mkdir /ivan/olga ; Makes [IVAN.OLGA] (UNIX absolute format)
26415 + remote mkdir [ivan.olga] ; Makes [IVAN.OLGA] (VMS absolute format)
26416 + remote mkdir [.olga] ; Makes [IVAN.OLGA] (VMS relative format)
26418 + 5.3.1.1. Creating Directories
26420 + If a directory name is given that contains more than one segment that
26421 + does not exist, the server attempts to create all the segments. For
26422 + example, if the client says:
26424 + REMOTE MKDIR letters/angry
26426 + a "letters" subdirectory is created in the server's current directory
26427 + if it does not already exist, and then an "angry" subdirectory is
26428 + created beneath it, if it does not already have one. This can repeated
26429 + to any reasonable depth:
26431 + REMOTE MKDIR a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/z/y/z
26433 + 5.3.1.2. Removing Directories
26435 + When attempting to execute a REMOTE RMDIR, the server can remove only
26436 + a single directory, not an entire sequence or tree. The system service
26437 + that is called to remove the directory generally requires not only
26438 + that the server process has write delete access, but also that the
26439 + directory contain no files.
26441 + In the future, a REMOTE RMDIR /RECURSIVE command (and the accompanying
26442 + protocol) might be added. For now, use the equivalent REMOTE HOST
26443 + command(s), if any.
26444 + _________________________________________________________________
26446 + 5.3.2. Directory Listings
26448 + Directory listings are generated by C-Kermit itself, rather than by
26449 + running the underlying system's directory command. Some control over
26450 + the listing format can be obtained with the SET OPTIONS DIRECTORY
26451 + command ([532]Section 4.5.1). The following options affect listings
26452 + sent by the server: /[NO]HEADING, /[NO]DOTFILES, and /[NO]BACKUP. In
26453 + UNIX and VMS, the listing is always sorted by filename. There is, at
26454 + present, no protocol defined for the client to request listing options
26455 + of the server; this might be added in the future.
26457 + The server's directory listings are in the following format:
26459 + Protection or permissions:
26460 + In UNIX and OS-9, this is a 10-character field, left adjusted.
26461 + In VMS it is a 22-character field, left-adjusted. In each case,
26462 + the protection / permission codes are shown in the server
26463 + platform's native format. In other operating systems, this
26464 + field is not shown.
26467 + This is always a 10-character field. The file's size is shown
26468 + as a decimal number, right adjusted in the field. If the file
26469 + is a directory and its size can not be obtained, the size is
26470 + shown as "<DIR>". Two blanks follow this field.
26473 + Always in yyyy-mm-dd hh:mm:ss numeric format, and therefore 19
26474 + characters long. If the file's date/time can't be obtained,
26475 + zeros (0) are shown for all the digits. This field is followed
26479 + This field extends to the end of the line. Filenames are shown
26480 + relative to the server's current directory. In UNIX, symbolic
26481 + links are shown as they are in an "ls -l" listing as "linkname
26484 + In UNIX and VMS, listings are returned by the server in alphabetical
26485 + order of filename. There are presently no other sort or selection
26488 + However, since these are fixed-field listings, all fields can be used
26489 + as sort keys by external sort programs. Note, in particular, that the
26490 + format used for the date allows a normal lexical on that field to
26491 + achieve the date ordering. For example, let's assume we have a UNIX
26492 + client and a UNIX server. In this case, the server's listing has the
26493 + date in columns 22-40, and thus could be sorted by the UNIX sort
26494 + program using "sort +0.22 -0.40" or in reverse order by "sort +0.22
26497 + Since the UNIX client can pipe responses to REMOTE commands through
26498 + filters, any desired sorting can be accomplished this way, for
26501 +C-Kermit> remote directory | sort +0.22 -0.40
26503 + You can also sort by size:
26505 + C-Kermit> remote directory | sort +0.11 -0.19
26507 + You can use sort options to select reverse or ascending order. "man
26508 + sort" (in UNIX) for more information. And of course, you can pipe
26509 + these listings through any other filter of your choice, such as grep
26510 + to skip unwanted lines.
26511 + _________________________________________________________________
26513 + 5.4. Syntax for Remote Filenames with Embedded Spaces
26515 + C-Kermit and K95, when in server mode, assume that any spaces in the
26516 + file specification in an incoming GET command are filename separators.
26517 + Thus if the client gives a command like:
26519 + get {oofa.txt oofa.bin}
26521 + or, equivalently:
26523 + mget oofa.txt oofa.bin
26525 + the server tries to send the two files, oofa.txt and oofa.bin. But
26526 + what if you want the server to send you a file named, say:
26528 + D:\HP OfficeJet 500\Images\My Pretty Picture Dot PCL
26530 + How does the server know this is supposed to be one file and not
26531 + seven? In this case, you need to the send file name to the server
26532 + enclosed in either curly braces:
26534 + {D:\HP OfficeJet 500\Images\My Pretty Picture Dot PCL}
26536 + or ASCII doublequotes:
26538 + "D:\HP OfficeJet 500\Images\My Pretty Picture Dot PCL"
26540 + The method for doing this depends on your client. If your client is
26541 + C-Kermit 7.0, any recent version of Kermit 95, or MS-DOS Kermit 3.16,
26542 + then you have to enclose the name in braces just so the client can
26543 + parse it, so to send braces or doublequotes to the server, you must
26544 + put them inside the first, outside pair of braces. And you also need
26545 + to double the backslashes to prevent them from being interpreted:
26547 + get {{D:\\HP OfficeJet 500\\Images\\My Pretty Picture Dot PCL}}
26548 + get {"D:\\HP OfficeJet 500\\Images\\My Pretty Picture Dot PCL"}
26550 + To get around the requirement to double backslashes in literal
26551 + filenames, of course you can also use:
26553 + set command quoting off
26554 + get {{D:\HP OfficeJet 500\Images\My Pretty Picture Dot PCL}}
26555 + get {"D:\HP OfficeJet 500\Images\My Pretty Picture Dot PCL"}
26556 + set command quoting on
26558 + If you are giving a "kermit" command to the UNIX shell, you have to
26559 + observe the shell's quoting rules, something like this:
26561 + kermit -ig "{D:\HP OfficeJet 500\Images\My Pretty Picture Dot PCL}"
26563 + Here, the quotes go on the outside so UNIX will pass the entire
26564 + filename, spaces, braces, and all, as a single argument to Kermit, and
26565 + the backslashes are not doubled because (a) the UNIX shell ignores
26566 + them since they are in a quoted string, and (b) Kermit ignores them
26567 + since the interactive command parser is not activated in this case.
26568 + _________________________________________________________________
26570 + 5.5. Automatic Orientation Messages upon Directory Change
26572 + C-Kermit 7.0, when acting as a server, can send an orientation message
26573 + to the client whenever the server directory changes. For example, when
26574 + the client gives a REMOTE CD command, the server sends the contents of
26575 + the new directory's "Read Me" file to the client's screen. The
26576 + following commands govern this feature:
26578 + SET SERVER CD-MESSAGE FILE name
26579 + Given to the servr, allows the message-file name to be
26580 + specified at runtime. A list of names to look for can be given
26581 + in the following format:
26583 + {{name1}{name2}{name3}{...}}
26585 + e.g. SET SERVER CD-MESSAGE FILE
26586 + {{./.readme}{README.TXT}{READ.ME}}
26588 + REMOTE SET SERVER CD-MESSAGE { ON, OFF }
26589 + Given to the client, lets the client control whether the server
26590 + sends automatic CD messages.
26593 + Given to server, includes CD-Message status.
26595 + The default CD message file name is system dependent. SHOW CD or SHOW
26596 + SERVER displays the list. Also see [533]Section 4.5.2.
26597 + _________________________________________________________________
26599 + 5.6. New Server Controls
26602 + Allows the server to configured such that DISABLEd features can
26603 + not be re-enabled by any means -- e.g. if the client is somehow
26604 + able to get the server into command mode. Once DISABLEd, ENABLE
26605 + can not be re-ENABLEd.
26607 + SET SERVER IDLE-TIMEOUT seconds
26608 + This was available previously in Kermit 95 only. Now it can be
26609 + used in C-Kermit also to specify a maximum number of seconds
26610 + the server is allowed to be idle before exiting server mode. 0
26611 + seconds means no idle timeout. In C-Kermit (but not K-95), SET
26612 + SERVER TIMEOUT and SET SERVER IDLE-TIMEOUT are mutually
26613 + exclusive -- you can have one or the other (or neither), but
26614 + not both. (Server timeouts are for the benefit of primitive
26615 + Kermit clients that are not capable of timing out on their own;
26616 + to our knowledge, no such clients are still in circulation.)
26618 + SET SERVER KEEPALIVE { ON, OFF }
26619 + (See next section).
26620 + _________________________________________________________________
26622 + 5.7. Timeouts during REMOTE HOST Command Execution
26624 + Prior to C-Kermit 7.0, the C-Kermit server would block waiting for
26625 + output from a system command invoked via REMOTE HOST from the client.
26626 + If the system command took a long time to execute, the client would
26627 + time out and send NAK packets. If the command took too long, the
26628 + client would reach its retry limit and give up. Even if it didn't, the
26629 + NAKs would cause unnecessary retransmissions.
26631 + In version 7.0, the C-Kermit server (VMS and select()-capable UNIX
26632 + versions only), sends "keepalive packets" (empty data packets) once
26633 + per second while waiting for the system command to complete. This
26634 + procedure should be entirely transparent to the Kermit client, and
26635 + should prevent the unwanted timeouts and NAKs. When C-Kermit 7.0
26636 + itself (or K95 1.1.19) is the client, it prints dots to show the
26637 + keepalive packets.
26639 + The keepalive feature can be turned off and on with:
26641 + SET SERVER KEEPALIVE { ON, OFF }
26643 + Normally it should be on. Turn it off it if causes trouble with the
26644 + client, or if it seems to slow down the server (as it might on some
26645 + platforms under certain circumstances).
26646 + _________________________________________________________________
26648 + 6. INTERNATIONAL CHARACTER SETS
26650 + Support for several new single-byte character sets was added in
26651 + C-Kermit 7.0. Unicode / ISO 10646 is not yet supported, but is a high
26652 + priority for forthcoming releases.
26654 + 6.0. ISO 8859-15 Latin Alphabet 9
26656 + To accommodate the Euro currency symbol, and to correct several other
26657 + longstanding problems with ISO Latin Alphabet 1, ISO 8859-15 Latin
26658 + Alphabet 9 was issued in May 1998. It is supported by C-Kermit 7.0 as
26659 + a transfer character set, a file character set, and a terminal
26660 + character set. Translations that preserve the new characters are
26661 + available between Latin-9 and several other sets including:
26663 + PC Code Page 858 (Western European languages, similar to CP850)
26664 + Windows Code Page 1252 (Western European languages, similar to Latin-1)
26665 + Windows Code Page 1250 (Eastern European languages, similar to Latin-2)
26667 + The Latin-9 transfer character set also allows for the OE digraph
26668 + character, used primarily in French, to be preserved in transfers
26669 + involving the DEC MCS or NeXT character sets.
26671 + The Euro character is also present in the Universal Character Set,
26672 + described in [534]Section 6.6.
26674 + 6.1. The HP-Roman8 Character Set
26676 + The HP-Roman8 character set is supported in C-Kermit 6.0 and later but
26677 + was omitted from Table VII-4 in the 2nd Edition of Using C-Kermit due
26678 + to lack of space. It is listed in [535]Appendix III.
26680 + 6.2. Greek Character Sets
26682 + Greek character sets were added in 6.1:
26684 + SET FILE CHARACTER-SET { CP869, ELOT927, GREEK-ISO }
26685 + SET TRANSFER CHARACTER-SET { GREEK-ISO }
26687 + GREEK-ISO is ISO 8859-7, which the same as ELOT 928.
26689 + The new Greek character sets are listed in [536]Appendix III.
26691 + 6.3. Additional Latin-2 Character Sets
26693 + The following have been added as FILE and TERMINAL CHARACTER-SETs:
26696 + A PC code page used in Poland, equivalent to CP437, but with 18
26697 + substitutions needed for Polish.
26700 + The Windows Latin 2 Code Page. Equivalent to ISO 8859-2, but
26701 + with different encoding.
26703 + 6.4. Additional Cyrillic Character Sets
26705 + The following have been added as FILE and TERMINAL CHARACTER-SETs:
26708 + This is the Cyrillic PC code page used in Bulgaria, where it is
26709 + called Code Page 856. It is attributed to a company called
26710 + DATEC, Inc, but CP856 is not a proper designation, since it
26711 + refers to a Hebrew Code Page (see the IBM Registry).
26714 + This PC Code Page contains all the Cyrillic letters that are
26715 + also in ISO 8859-5, and is therefore useful for non-Russian
26716 + Cyrillic text (Ukrainian, Belorussian, etc), unlike CP866,
26717 + which has a smaller repertoire of Cyrillic letters.
26720 + The Windows Cyrillic Code Page. Equivalent to CP855, but with
26721 + different encoding.
26724 + An extension to "Old KOI-8" that adds upper and lower case
26725 + Cyrillic letter Io (looks like Roman E with diaeresis) plus a
26726 + selection of box-drawing characters to columns 8 through 11,
26727 + which are vacant in original Old KOI-8. KOI8-R is used for the
26728 + Russian language. It is specified in [537]RFC 1489.
26731 + A similar extension of Old KOI-8, but for Ukrainian. It is
26732 + specified in [538]RFC 2319.
26733 + _________________________________________________________________
26735 + 6.5. Automatic Character-Set Switching
26737 + Prior to version 7.0, C-Kermit's file character-set always had to be
26738 + set explicitly. In 7.0 and later, it is set automatically when:
26740 + 1. This feature is enabled (as it is unless you disable it).
26741 + 2. An incoming text-mode transfer includes a transfer-character-set
26742 + announcer and you have not previously given a SET FILE
26743 + CHARACTER-SET command. In this case, C-Kermit switches to an
26744 + appropriate file character set. For example, on an HP-UX
26745 + workstation, an incoming Latin-1 file automatically selects
26746 + HP-Roman8 for the local copy of the file; in Data General AOS/VS,
26747 + it would select DG International.
26748 + 3. You give a SET TRANSFER CHARACTER-SET command without having
26749 + previously specified a FILE CHARACTER-SET. An appropriate file
26750 + character-set is chosen automatically.
26752 + In addition, when you give a SET FILE CHARACTER-SET command, the
26753 + appropriate transfer character-set is automatically chosen, to be used
26754 + when you are sending files (but this does not override the one
26755 + announced by the sender when you are receiving files).
26757 + You might not agree about what is "appropriate", so of course you can
26758 + disable or change all of the above actions.
26760 + You can disable (or re-enable) the new automatic character-set
26761 + switching feature in each direction separately:
26763 + SET RECEIVE CHARACTER-SET-SELECTION { AUTOMATIC, MANUAL }
26764 + AUTOMATIC is the default, causing the behavior described above
26765 + when an incoming file arrives. Choose MANUAL to defeat this
26766 + behavior and force your current FILE CHARACTER-SET setting to
26767 + be used, no matter what it is. Note that SET RECEIVE
26768 + CHARACTER-SET MANUAL does not disable recognition of the
26769 + incoming transfer character-set announcer, and translation from
26770 + the corresponding character-set to your current file
26771 + character-set. To disable that, use SET ATTRIBUTE CHARACTER-SET
26774 + SET SEND CHARACTER-SET-SELECTION { AUTOMATIC, MANUAL }
26775 + Again AUTOMATIC is the default, causing the behavior described
26776 + above when you give a SET { FILE, TRANSFER } CHARACTER-SET
26777 + command. Use MANUAL to allow you to specify the transfer and
26778 + file character-sets independently.
26780 + SHOW CHARACTER-SETS
26781 + Tells settings of { SEND, RECEIVE } CHARACTER-SET-SELECTION.
26783 + Normally, however, it is more convenient to leave automatic switching
26784 + active, and change any associations that are not appropriate for your
26785 + application, area, or country. The commands are:
26787 + SHOW ASSOCIATIONS
26788 + This command lists all the associations in each direction: for
26789 + each possible transfer character-set, it lists the associated
26790 + file character-set, and vice versa. These are two separate and
26791 + independent lists.
26793 + ASSOCIATE TRANSFER-CHARACTER-SET name1 [ name2 ]
26794 + Changes the association for the transfer character-set name1 to
26795 + be the file character-set name2. If name2 is omitted, automatic
26796 + switching is disabled for this transfer character-set only.
26798 + ASSOCIATE FILE-CHARACTER-SET name1 [ name2 ]
26799 + Changes the association for the file character-set name1 to be
26800 + the transfer character-set name2. If name2 is omitted,
26801 + automatic switching is disabled for this file character-set
26803 + _________________________________________________________________
26807 + C-Kermit 7.0 adds support for Unicode, the Universal Character Set,
26810 + * File Transfer (SEND, RECEIVE, GET, etc)
26811 + * Terminal connection (CONNECT)
26812 + * Unguarded file capture (LOG SESSION)
26813 + * Unguarded file transmission (TRANSMIT)
26814 + * Local file character-set conversion (TRANSLATE)
26816 + C-Kermit is not, however, a "Unicode application" in the sense that
26817 + its commands, messages, or user interface are Unicode. Rather, it is
26818 + "Unicode aware" in its ability to handle and convert Unicode text in
26819 + the course of file transfer and terminal connection, and you can also
26820 + use Kermit to convert local files between Unicode and other character
26823 + BMP - Base Multilingual Plane
26824 + BOM - Byte Order Mark
26825 + CJK - Chinese, Japanese, and Korean
26826 + ISO - International Standards Organization
26827 + TLA - Three-Letter Acronym
26828 + UCS - Universal Character Set
26829 + UTF - UCS Transformation Format
26831 + Unicode and ISO 10646 are the coordinated and compatible corporate and
26832 + international standards for the Universal Character Set (UCS). Unlike
26833 + single-byte and even most multibyte character sets, the UCS can
26834 + represent all characters in every existing writing system. A flat
26835 + plain-text file encoded in some form of UCS can contain any mixture of
26836 + English, Spanish, Italian, German, Hebrew, Arabic, Greek, Russian,
26837 + Armenian, Georgian, Japanese, Chinese, Korean, Vietnamese, Tibetan,
26838 + Hindi, Bengali, Tamil, Thai, Ethiopic, and so on, plus scientific and
26839 + mathematical notation, as well as texts in Runes, Ogham, Glagolitic,
26840 + and other historic scripts.
26842 + The UCS already covers these scripts and many more, but it's an
26843 + evolving standard with efforts underway to accommodate even more
26844 + languages and writing systems. Support is growing for native UCS use
26845 + on many platforms and in many applications. The goal of the framers of
26846 + the UCS is for it to replace ASCII, the ISO Latin Alphabets, ISCII,
26847 + VISCII, the Chinese, Japanese, and Korean (CJK) multibyte sets, etc,
26848 + as well as the many private character sets in use today, in other
26849 + words to become *the* Universal Character Set.
26851 + Until that time, however, conversions between existing sets and the
26852 + UCS will be necessary when moving text between platforms and
26853 + applications. Now Kermit can help.
26854 + _________________________________________________________________
26856 + 6.6.1. Overview of Unicode
26858 + For a more complete picture, please visit:
26860 + [539]http://www.unicode.org/
26862 + and access the various online introductions, FAQs, technical reports,
26863 + and other information. For greater depth, order the latest version of
26864 + the published Unicode Standard. The following overview contains a
26865 + great many oversimplifications and perhaps an opinion or two.
26867 + At present, the UCS is a 16-bit (2-byte) character set, but with
26868 + provisions to grow to a 4-byte set. UCS-2 refers to the two-byte set,
26869 + also called the Base Multilingual Plane (BMP), in which each character
26870 + has 16 bits, and therefore there are 2^16 = 65536 possible characters.
26871 + The first 128 characters are the same as US ASCII (C0 control
26872 + characters and DEL included), the next 32 are the C1 control
26873 + characters of ISO 6429, and the next 96 are the Right Half of ISO
26874 + 8859-1 Latin Alphabet 1. The remaining tens of thousands of characters
26875 + are arranged newly for the UCS, usually (but not always) in sections
26876 + corresponding to existing standards, such as ISO Latin/Cyrillic, often
26877 + plus additional characters not appearing in the existing standards due
26878 + to lack of space (or other reasons).
26880 + ISO 10646 allows for additional planes, e.g. for Egyptian
26881 + hieroglyphics or ancient (or other esoteric) CJK characters, but these
26882 + planes are not yet defined and so we will say nothing more about them
26883 + here, except that their use will require the 4-byte form of UCS,
26884 + called UCS-4, in some form (more about "forms" in [540]Section 6.6.2).
26886 + Unicode and ISO 10646 are constantly under revision, mainly to add new
26887 + characters. The Unicode revision is denoted by a version number, such
26888 + as 1.0, 1.1, 2.0, 3.0. The ISO 10646 standard revision is identified
26889 + by Edition (such as ISO 10646-1 1993), plus reference to any
26890 + amendments. The first versions of these standards included encodings
26891 + for Korean Hangul syllables (Jamos); these encodings were changed in
26892 + version 1.1 of Unicode and by Amendment 5 to ISO 10646-1. The Unicode
26893 + Technical Committee and the ISO acknowledge that this was a bad thing
26894 + to do, and promise never change encodings or character names again,
26895 + since this poses serious problems for conformance and data
26898 + A UCS-2 value is customarily written like this:
26902 + where "xxxx" represents four hexadecimal digits, 0-9 and A-F. For
26903 + example, U+0041 is "A", U+00C1 is A-acute, U+042F is uppercase
26904 + Cyrillic "Ya", U+FB4F is Hebrew Ligature Alef Lamed, and U+FFFD is the
26905 + special character that means "not a character".
26907 + Most characters from widely-used alphabetic writing systems such as
26908 + the West European ones, Cyrillic, Greek, Hebrew, Vietnamese, etc, are
26909 + available in "precomposed" form; for example Uppercase Latin Letter A
26910 + with Acute Accent is a single character (as it is in Latin-1).
26911 + However, the UCS also permits composition of a base character with one
26912 + or more nonspacing diacritics. This means the same character can be
26913 + represented in more than one way, which can present problems in many
26914 + application areas, including transfer and character-set conversion of
26917 + Conversion from ASCII or Latin-1 to UCS-2 text is "trivial": simply
26918 + insert a NUL (0) byte before each ASCII or Latin-1 byte. Converting in
26919 + the reverse direction (provided the UCS-2 file contains only U+0000 to
26920 + U+00FF) is equally simple (if we ignore the issue of composition):
26921 + remove every second (NUL) byte. Conversion of other character sets to
26922 + and from UCS, however, requires tables or algorithms specific to each
26923 + set. Nevertheless, the relatively transparent upwards compatibility
26924 + from ASCII and Latin-1, in which a very large share of the world's
26925 + textual data is encoded, gives the UCS an entree onto existing
26928 + But the 2-byte format and the preponderance of NUL and other control
26929 + bytes in UCS-2 text pose problems for current applications and
26930 + transmission methods. And to make matters worse, different hardware
26931 + platforms store UCS-2 characters in different byte order. Thus a UCS-2
26932 + file transferred by FTP (or accessed via NFS, etc) between two
26933 + computers with different architecture might have its bytes in the
26934 + wrong order (or worse; see [541]Section 6.6.5.1 ).
26935 + _________________________________________________________________
26937 + 6.6.2. UCS Byte Order
26939 + Consider the number 1. In an 8-bit byte, this would be represented by
26940 + the following series of 0- and 1-bits:
26942 + +-----------------+
26943 + | 0 0 0 0 0 0 0 1 |
26944 + +-----------------+
26946 + Therefore in a 16-bit "word" the representation might be:
26948 + +-----------------+-----------------+
26949 + | 0 0 0 0 0 0 0 0 | 0 0 0 0 0 0 0 1 |
26950 + +-----------------+-----------------+
26952 + Now consider the number 256, which is 2 to the 8th power. The binary
26953 + representation is 100000000 (1 followed by 8 zeros). 256 would go into
26954 + a 16-bit word like this:
26956 + +-----------------+-----------------+
26957 + | 0 0 0 0 0 0 0 1 | 0 0 0 0 0 0 0 0 |
26958 + +-----------------+-----------------+
26960 + When a computer works this way, it is said to be Big Endian, meaning
26961 + it puts the most significant (biggest) byte first (on the "left") in a
26962 + 16-bit word, and the least significant byte second (on the right).
26964 + However, some other computers have the opposite arrangement, called
26965 + Little Endian, in which 1 is:
26967 + +-----------------+-----------------+
26968 + | 0 0 0 0 0 0 0 1 | 0 0 0 0 0 0 0 0 |
26969 + +-----------------+-----------------+
26973 + +-----------------+-----------------+
26974 + | 0 0 0 0 0 0 0 0 | 0 0 0 0 0 0 0 1 |
26975 + +-----------------+-----------------+
26977 + Computers such as Sparc, MIPS, PA-RISC, and PowerPC are Big Endian,
26978 + whereas the PC and the Alpha are Little Endian. Endianness has never
26979 + been an issue with 7- or 8-bit characters, but it is with UCS
26980 + characters. It can be a tricky business to share or transfer a UCS-2
26981 + file between two different kinds of computers.
26983 + To alleviate (but not entirely solve) the problem, UCS-2 files are
26984 + supposed to begin with the Unicode character U+FEFF, Zero-Width
26985 + No-Break Space (ZWNBS). This is a kind of "no-op" (note: any such
26986 + assertion must normally be qualified with many "but ifs" and "excepts"
26987 + which are omitted here in the interest of brevity). If the bytes are
26988 + reversed the ZWNBS becomes U+FFFE, which is not (and never will be) a
26989 + defined UCS character. U+FEFF at the beginning of a UCS file is
26990 + therefore called a Byte Order Mark, or BOM.
26992 + Any application that creates a UCS-2 (or UTF-16, or UCS-4) file should
26993 + include a BOM, and any application that reads one should test for a
26994 + BOM, and if one is found, infer the byte order from it. This is a
26995 + convention, however -- not a standard or a requirement -- and
26996 + applications vary in their ability to handle BOMs and "backwards"
26999 + Note that a BOM is useful only at the beginning of a file. If you
27000 + append one UCS-2 file to another, and both have BOMs, the internal BOM
27001 + is no longer a BOM. And if the byte orders of the two files differ,
27002 + then either the first part or the second will be backwards. (Various
27003 + other undesirable effects might also occur, not discussed here.)
27004 + _________________________________________________________________
27006 + 6.6.2. UCS Transformation Formats
27008 + UCS textual data can be modified in various ways for transmission or
27009 + storage. Any officially sanctioned method of doing this is called a
27010 + UCS Transformation Format, or UTF. One such method, called UTF-16, is
27011 + essentially identical with UCS-2 except that it designates certain
27012 + code values as "escape sequences" (called surrogate pairs) to access
27013 + characters in other planes without having to use full UCS-4. We won't
27014 + discuss UTF-16 further here, since at the moment there are no other
27015 + planes. Several other UTF's (such as UTF-1, UTF-2, and UTF-7) have
27016 + fallen into disuse and are not discussed here. The most important
27017 + transformation format today is UTF-8.
27019 + UTF-8, so called because it "serializes" UCS-2 data into a stream of
27020 + 8-bit bytes, is designed to allow the UCS to work with present-day
27021 + communications gear, computers, and software. The most important
27022 + properties of UTF-8 are that byte order is constant (no byte swapping)
27023 + and all (7-bit) ASCII characters represent themselves. Therefore
27024 + conversion between ASCII and UTF-8 is no conversion at all, and
27025 + applications or platforms (such as Plan 9 from Bell Labs) that use
27026 + UTF-8 "for everything" can still run traditional ASCII-only
27027 + applications and be accessed from them. In particular, unlike UCS-2,
27028 + ASCII characters are not padded with NUL bytes. But also unlike UCS-2,
27029 + there is no transparency for Latin-1 or any other non-ASCII character
27030 + set. Every non-ASCII UCS-2 character is represented by a sequence of 2
27031 + or 3 UTF-8 bytes. Thus UTF-8 is more compact than UCS-2 for text
27032 + containing a preponderance of ABC's (or other ASCII characters), about
27033 + the same as UCS-2 for other alphabetic scripts (Cyrillic, Roman,
27034 + Greek, etc), and larger than UCS-2 for Chinese, Japanese, and Korean.
27036 + The UTF-8 uncoding of the UCS has been adopted by the Internet as the
27037 + preferred character set for new applications, and is gradually being
27038 + retrofitted into traditional applications like FTP ([542]RFC 2640).
27039 + _________________________________________________________________
27041 + 6.6.3. Conformance Levels
27043 + Although the Unicode and ISO 10646 standards both describe the same
27044 + character set, these standards differ in many ways, including their
27045 + stated requirements for conformance and their classification of
27046 + conformance levels.
27048 + Kermit has always abided by ISO character-set standards, including ISO
27049 + character-set designation and invocation methods. In adapting Unicode,
27050 + therefore, we had to choose from among the available ISO designations
27051 + which, in turn, correspond with ISO 10646 conformance levels. At
27052 + present, Kermit claims the lowest conformance level, 1, meaning
27053 + (roughly) that it does not handle combining forms and it does not
27054 + handle Korean Hangul Jamos (just as, at present, it does not handle
27055 + Korean in general). Note that ISO 10646 Conformance Levels 1 and 2
27056 + sidestep the issue of the code changes for Korean Hangul by announcing
27057 + non-support for Hangul regardless of encoding.
27059 + ISO 10646 Conformance Level 1 is approximately equivalent to Unicode
27060 + Normalization Form C (described in Unicode Technical Report 15,
27061 + incorporated into Unicode 3.0).
27063 + As noted in [543]Section 6.6.2, Kermit does not claim to support
27064 + UTF-16 at the present time, hence the UCS-2 nomenclature. Kermit
27065 + treats surrogates just as if they were any other UCS-2 characters,
27066 + rather than as escapes to other planes, which means that (except when
27067 + converting between UCS-2 and UTF-8) they are translated to "error"
27068 + characters, since (a) no other planes are defined yet (and if they
27069 + were, no other character sets supported by Kermit would encode their
27070 + characters), and (b) no valid surrogate character corresponds to any
27071 + other UCS-2 character.
27073 + A minor yet significant aspect of Unicode 3.0 and some recent
27074 + perturbation of ISO 10646-1 (probably Amendment 18, "Symbols and Other
27075 + Characters") is the addition of the Euro Sign at U+20AC. As noted in
27076 + [544]Section 6.0, Kermit's "Euro compliance" includes conversion
27077 + between Latin Alphabet 9 and various PC code pages. Text can also be
27078 + converted between UCS-2 or UTF-8 and any other Euro-compliant
27079 + character set (Latin-9, CP858, CP1250, CP1252) without loss of the
27081 + _________________________________________________________________
27083 + 6.6.4. Relationship of Unicode with Kermit's Other Character Sets
27085 + Kermit's character sets are divided into two groups: single-byte sets
27086 + (such as Roman, Hebrew, Cyrillic, Greek) and multibyte (various
27087 + Japanese sets). The two groups are distinct since one normally would
27088 + not expect to convert Kanji ideograms to Roman (or other) letters, or
27091 + Unicode character-set conversion works with both groups, but obviously
27092 + the result depends on the repertoires of the source and destination
27093 + character-sets both including the characters in the file. For example,
27094 + you can translate a Hungarian text file between Latin-2 and Unicode,
27095 + but not between (say) Unicode and Latin/Greek. By the same token you
27096 + can convert Japanese text from Shift-JIS or EUC or JIS-7 to Unicode
27097 + and back, but you can't convert the same file to (say) Latin-1 if it
27098 + contains Japanese characters.
27100 + JIS-7 is equivalent to DEC Kanji and ISO-2022-JP except that the
27101 + latter two do not support halfwidth Katakana. Kermit treats all
27102 + three of these sets the same way, i.e. as JIS-7.
27104 + As noted, Kermit presently does not handle combining diacritics, and
27105 + so will not correctly convert UCS files that use them into a
27106 + single-byte character set. For example, if a UCS file contains Latin
27107 + Capital Letter A (U+0041) followed by Combining Acute Accent (U+0301),
27108 + the result will be a two-character sequence, A followed by another
27109 + character. This is what is meant by Conformance Level 1. (The
27110 + situation grows worse with multiple diacritics, since they can occur
27113 + A higher level of conformance is possible, in which "canonical
27114 + equivalences" are handled via algorithms and databases, at some
27115 + (perhaps considerable) cost in performance, since a fair amount of
27116 + additional code must be executed for every character during data
27117 + transfer (database lookup, sorting of combining sequences into
27118 + canonical order, etc). This can be added in future releases if there
27119 + is a need (but in many cases, pre- and postpostprocessing might be a
27122 + Within these constraints, Kermit converts between the UCS and its
27123 + other character sets. For example, a mixture of Russian and English
27124 + (and/or Dutch, or Latin) text can bet converted between the UCS and
27125 + ISO Latin/Cyrillic or KOI-8. But since Kermit does not presently
27126 + support Arabic character-set conversion, the new availability of UCS
27127 + conversion does not mean that Kermit can convert from Arabic UCS text
27128 + to some other character set, because Kermit does not support any other
27129 + character set that includes Arabic. Ditto for Thai, Armenian,
27130 + Georgian, Tibetan, Chinese, Korean, etc. However, Kermit CAN convert
27131 + Arabic (or any other script) between UCS-2 and UTF-8.
27133 + Considering Cyrillic more carefully, note that the UCS also contains
27134 + numerous Cyrillic characters not found in any of the Cyrillic sets
27135 + (ISO Latin/Cyrillic, KOI8, CP866, etc) that Kermit supports;
27136 + characters needed for Abkhasian, Yakut, Tatar, Bashkir, Altaic, Old
27137 + Church Slavonic, etc; UCS text containing any of these historic or
27138 + "extended" Cyrillic characters can not be converted to any of Kermit's
27139 + current single-byte Cyrillic sets without loss. The situation is
27140 + similar for Greek, Hebrew, etc, and even worse for Japanese since
27141 + Unicode contains thousands of Kanjis that are lacking from the
27142 + Japanese character sets based on JIS X 0208, such as EUC-JP, JIS-7,
27145 + In general, when converting from UCS to a single-byte set, there is
27146 + always the possibility of data loss, just as there is when converting
27147 + from any larger set to a smaller one. For example, if a UCS file
27148 + contains Devanagari characters, these characters will be lost when
27149 + converting to (say) Latin-1, just as Roman vowels with acute accents
27150 + are lost when converting from Latin-1 (an 8-bit set) to German ISO 646
27152 + _________________________________________________________________
27154 + 6.6.5. Kermit's Unicode Features
27156 + C-Kermit can convert between UCS-2 or UTF-8 and any of its other
27157 + character sets, and also between UCS-2 and UTF-8. When converting
27158 + between UCS-2 or UTF-8 and a non-Unicode character set (such as
27159 + Latin-1), the UCS Line Separator (LS, U+2028) and Paragraph Separator
27160 + (PS, U+2029) characters are converted to the appropriate line
27161 + terminator (CR, LF, or CRLF). When converting from a non-Unicode set
27162 + to UCS-2 or UTF-8, however, line terminators are not converted to LS
27163 + or PS. This is in accordance with the recommendations of Unicode
27164 + Technical Report #13.
27166 + When C-Kermit starts, it tests the native byte order of the computer.
27167 + You can see the result in the SHOW FEATURES or SHOW FILE display. It's
27168 + also available in the variable \v(byteorder): 0 means Big Endian, 1
27169 + means Little Endian.
27171 + When UCS-2 is involved in file transfer or translation, the following
27172 + commands tell C-Kermit what to do about byte order:
27174 + SET FILE UCS BYTE-ORDER { BIG-ENDIAN, LITTLE-ENDIAN }
27175 + This is for reading UCS-2 files that don't have a BOM, and also
27176 + for writing UCS-2 files. If this command is not given, the
27177 + machine's native byte order is used when writing UCS-2 files,
27178 + and also when reading UCS-2 files that don't have a BOM.
27180 + SET FILE UCS BOM { ON, OFF }
27181 + This setting is used when creating UCS-2 files. A BOM is added
27182 + at the beginning by default. Use OFF to not add the BOM. This
27183 + command has no affect when writing files.
27185 + COPY /SWAP-BYTES sourcefile destinationfile
27186 + Use this for fixing a UCS-2 file whose bytes are in the wrong
27189 + Use SHOW FILE to display the FILE UCS settings.
27191 + Please note, again, that C-Kermit's user interface, including its
27192 + script language, is not internationalized in any way. String
27193 + comparisons, case conversion, and so on, work only for US ASCII
27194 + (comparisons for equality work with other sets, but not
27195 + lexically-greater-or-less-than or caseless comparisons; even
27196 + comparisons for equality can fail when composed characters or byte
27197 + order are involved). String functions such as \findex() and
27198 + \fsubstring() that reference byte positions do just that; they won't
27199 + work with UTF-8 text that contains any non-ASCII characters, and they
27200 + will not work with UCS-2 text at all since they use C strings
27201 + internally, which are NUL-terminated. These are just a few examples to
27202 + illustrate that neither Unicode nor any other character-set beyond
27203 + ASCII is supported at the user-interface, command, or scripting level
27204 + in this version of C-Kermit.
27205 + _________________________________________________________________
27207 + 6.6.5.1. File Transfer
27209 + Kermit supports both UCS-2 and UTF-8 as file and transfer character
27210 + sets in text-mode file transfer.
27212 + To select UCS-2 or UTF-8 as a file character-set, use:
27214 + SET FILE CHARACTER-SET { UCS2, UTF8 }
27216 + If you want to send a UCS-2 text file (or save an incoming file in
27217 + UCS-2 format), tell Kermit to:
27219 + SET FILE CHARACTER-SET UCS2
27221 + and if you want to send a UTF-8 text file (or store an incoming file
27222 + in UTF-8 format), tell Kermit to:
27224 + SET FILE CHARACTER-SET UTF8
27226 + When sending UCS-2 files, Kermit determines the byte order from the
27227 + BOM, if there is one (and if there is a BOM, it is stripped, i.e. not
27228 + sent). If there is no BOM, the byte order is the one specified in the
27229 + most recent SET FILE UCS BYTE-ORDER command, if any, otherwise the
27230 + computer's native byte order is assumed. When storing incoming files
27231 + as UCS-2, the byte order is according SET FILE UCS BYTE-ORDER, if
27232 + given, otherwise the native one; a BOM is written according to SET
27235 + A transfer character-set should be chosen that includes all of the
27236 + characters in the source file. So, for example, if you are sending a
27237 + UCS-2 file containing only German-language text, your transfer
27238 + character-set can be Latin-1, Latin-2, Latin-9, UCS-2, or UTF-8. But
27239 + if you are sending a file that contains a combination of Hebrew and
27240 + Greek, your transfer character-set must be UCS-2 or UTF-8 if you don't
27241 + want to lose one script or the other. Furthermore, the transfer
27242 + character-set must be one that is supported by the receiving Kermit
27243 + program. Since UCS support is new, it is possible that the other
27244 + Kermit program (if it supports character sets at all) does not support
27245 + it, but does support single-byte sets such as Latin-1, Latin/Cyrillic,
27248 + To select UCS-2 or UTF-8 as a transfer character-set, use:
27250 + SET TRANSFER CHARACTER-SET { UCS2, UTF8 }
27252 + It is up to the receiving Kermit program to convert the transfer
27253 + format to its own local format, if necessary. If it does not
27254 + understand the UTF-8 or UCS-2 transfer character-set, and your file
27255 + can not be adequately represented by any single-byte transfer
27256 + character-set (such as Latin-1 or Latin/Cyrillic) then, if UTF-8
27257 + format is acceptable on the receiving computer, use UTF-8 as the
27258 + transfer character-set, with the receiver told to "set unknown-char
27259 + keep", or with the sender told to "set attribute char off". If you
27260 + want the file to be stored in UCS-2 format at the receiver, send it it
27261 + binary mode if the source file is also UCS-2, or else use the
27262 + TRANSLATE command (next section) to convert it to UCS-2 first, then
27263 + send it in binary mode. You should not use UCS-2 as a transfer
27264 + character-set in text-mode transfers to Kermit programs that don't
27265 + support it, because they are likely to corrupt the result the same way
27266 + FTP would (see the final paragraph of this section).
27268 + When UCS-2 is the transfer character set, it always goes into Kermit
27269 + packets in Big Endian format, with no BOM. As always, the transfer
27270 + character-set is announced by the sender to the receiver. The
27271 + announcement for UCS-2 is "I162" (ISO Registration 162 = UCS-2 Level
27272 + 1) and by definition it is Big Endian (the standards say that when
27273 + UCS-2 is serialized into bytes, the order must be Big Endian). The
27274 + announcement for UTF-8 is "I190" (UTF-8 Level 1).
27276 + When receiving a file whose transfer character-set is UCS-2 or UTF-8,
27277 + you must choose the appropriate file character set for the result.
27278 + There is no way Kermit can do this for you automatically, since UCS
27279 + data can be in any script at all, or any combination.
27281 + In general, UTF-8 or UCS-2 should be chosen as a transfer
27282 + character-set if the source file is also encoded in some form of UCS
27283 + and it contains more than one script. But there are other situations
27284 + where where UTF-8 or UCS-2 offer advantages. For example, suppose the
27285 + source file is on a NeXTstation and the destination file is on VMS.
27286 + Both the NeXT and the DEC Multinational character sets include the
27287 + French OE digraph, but Latin-1 does not. Therefore French words
27288 + containing this character might not arrive intact when Latin-1 is the
27289 + transfer character-set, but will with UTF-8 or UCS-2, since the UCS
27290 + includes the OE digraph (but so does Latin-9).
27292 + UCS-2 should be chosen as a transfer character-set only for Japanese
27293 + text files that contain a large preponderance of Kanji, since in this
27294 + case (and only this case) UCS-2 (two bytes per Kanji) is more
27295 + efficient than UTF-8 (three bytes per Kanji). The same will be true
27296 + for Chinese and Korean when they are supported by Kermit. UCS-2 should
27297 + never be used as a transfer character-set with a transfer partner that
27298 + does not support UCS-2 since this can cause file corruption (see last
27299 + paragraph in this section).
27301 + Note that Kermit's repeat-count compression is 100% ineffective for
27302 + UCS-2, and is also ineffective for multibyte characters in UTF-8 and
27303 + EUC-JP; this is because repeat-compression is a transport-level
27304 + mechanism that operates on a per-byte basis; it has no knowledge of
27305 + the distinction between a byte and a character.
27307 + When C-Kermit starts, it sets up associations ([545]Section 6.5) for
27308 + incoming files whose transfer character sets are UCS-2 or UTF-8
27309 + appropriately for the platform so that the file character-set for the
27310 + incoming file is UCS-2 in Windows and UTF-8 elsewhere. Otherwise,
27311 + C-Kermit does not make any default associations for UCS-2 or UTF-8,
27312 + but of course you may add or change associations to suit your needs
27313 + and preferences by including the appropriate ASSOCIATE commands in
27314 + your Kermit startup file. For example, if you are a PC user and deal
27315 + only with text written in Greek and English, you can:
27317 + ASSOCIATE TRANSFER-CHARACTER-SET UTF8 CP869
27318 + ASSOCIATE TRANSFER-CHARACTER-SET UCS2 CP869
27319 + ASSOCIATE FILE-CHARACTER-SET CP869 UTF8
27321 + Note that when file transfer involves conversion between a single-byte
27322 + character set and UCS-2 or UTF-8, the file-transfer thermometer and
27323 + estimated time left might be inaccurate, since they are based on the
27324 + source file size, not the transfer encoding. This is purely a cosmetic
27325 + issue and does not effect the final result. (And is not, strictly
27326 + speaking, a bug; Kermit protocol presently includes no method for the
27327 + sender to furnish an "estimated transfer size" to the receiver, and in
27328 + any case any such guess could be as far off as the file size, given
27329 + the many other factors that come into play, such as compression and
27332 + A caution about FTP and UCS-2. As noted previously, if you transfer a
27333 + UCS-2 file with FTP in binary mode between two computers with opposite
27334 + Endianness, the result will have its bytes in the wrong order.
27335 + However, if you use FTP to transfer a UCS-2 file in "ascii" (text)
27336 + mode to ANY computer, even if it is identical to yours, the result
27337 + will be corrupted because FTP's line-terminator conversions do not
27338 + account for UCS-2. The same holds when sending from a UCS-aware Kermit
27339 + program to an older Kermit program in text mode with a transfer
27340 + character-set of UCS-2. So use UCS-2 as a transfer character-set ONLY
27341 + with a UCS-2-aware Kermit partner.
27342 + _________________________________________________________________
27344 + 6.6.5.2. The TRANSLATE Command
27346 + In Kermit versions that have Unicode support included, TRANSLATE now
27347 + always goes through Unicode; that is, the source set is converted to
27348 + UCS-2 and thence to the target set. This is a major improvement, since
27349 + in prior releases, C-Kermit had to pick the "most appropriate"
27350 + transfer character-set as the intermediate set, and this would result
27351 + in the loss of any characters that the source and target sets had in
27352 + common but were lacking from the intermediate set (for example the OE
27353 + digraph when translating from NeXT to DEC MCS through Latin-1). This
27354 + never happens when Unicode is the intermediate set because Unicode is
27355 + a superset of all other character sets supported by Kermit. A more
27356 + dramatic example would be translation between Cyrillic PC code page
27357 + 866 and KOI8-R ([546]Section 6.4); formerly all the line- and
27358 + box-drawing characters would be lost (since ISO 8859-5 does not have
27359 + any); now the ones that these two sets have in common are preserved.
27361 + UCS-2 and UTF-8 are now both supported as source-file and
27362 + destination-file character sets by C-Kermit's TRANSLATE command, for
27365 + translate oofa.txt ucs2 latin1 oofa-l1.txt
27367 + translates oofa.txt from UCS-2 to Latin-1, storing the result as
27368 + oofa-l1.txt. Similarly:
27370 + translate oofa.txt utf8 latin1 oofa-l1.txt
27371 + translate oofa.txt latin1 ucs2 oofa-ucs2.txt
27372 + translate oofa.txt latin1 utf8 oofa-utf8.txt
27373 + translate oofa.txt ucs2 utf8 oofa-utf8.txt
27374 + translate oofa.txt utf8 ucs2 oofa-ucs2.txt
27376 + Treatment of the UCS-2 BOM is exactly the same as for file transfer.
27377 + Note that if a UCS-2 source file is in the "wrong" byte order and
27378 + lacks a BOM, and you don't tell Kermit about it with SET FILE UCS
27379 + BYTE-ORDER, the result of the translation is total gibberish. Recall
27380 + that you can use COPY /SWAP-BYTES to switch the byte order of an
27381 + errant UCS-2 file (or any other file for that matter, if you can think
27382 + of a reason to). Also note that:
27384 + translate oofa.txt ucs2 ucs2 new.txt
27386 + Produces a result in the native (or SET FILE UCS) byte-order as long
27387 + as oofa.txt has a BOM.
27389 + As a side benefit of the Unicode work, the TRANSLATE command now works
27390 + for the first time also for all Japanese character sets that Kermit
27391 + supports. In other words, if you have a Japanese text file in any of
27392 + the following encodings:
27400 + You can use the TRANSLATE command to convert to any other encoding
27401 + from the same list.
27402 + _________________________________________________________________
27404 + 6.6.5.3. Terminal Connection
27406 + The CONNECT command now allows UTF-8 as a local or remote terminal
27409 + SET TERMINAL CHARACTER-SET { ..., UTF8 } { ..., UTF8 }
27410 + SET TERMINAL REMOTE-CHARACTER-SET { ..., UTF8 }
27411 + SET TERMINAL LOCAL-CHARACTER-SET { ..., UTF8 }
27413 + (Recall that Kermit's terminal character-set has two "ends" -- the set
27414 + used on the host to which Kermit is connected, and the set used on the
27415 + local keyboard and screen.)
27417 + UCS-2 is not supported as a terminal character-set (either end) since
27418 + (a) it is not used that way anywhere to our knowledge, and (b) the
27419 + problems of Endianness and the high likelihood of loss of
27420 + synchronization make it impractical. (Telecommunications is
27421 + byte-oriented; if one byte, or any odd number of bytes, is lost
27422 + because of buffer overruns, circuit resets, etc (or likewise if a
27423 + burst of noise appears that takes the guise of an odd number of
27424 + bytes), the byte order of the subsequent data stream will be
27425 + backwards; unlike UTF-8 and traditional byte-based character sets,
27426 + UCS-2 is not "self synchronizing".)
27428 + UTF-8 does not have byte-order or synchronization problems and is
27429 + growing in popularity as a terminal character set as well as in other
27430 + application areas. It allows a single terminal session to use multiple
27431 + scripts (Roman, Cyrillic, Greek, etc) without ISO 2022 character-set
27432 + switching (which terminal emulators like Kermit 95 can handle but few
27433 + host applications understand or use), and meshes nicely with the
27434 + Unicode screen fonts that are beginning to appear.
27436 + UTF-8 was first used in Plan 9 and soon will be available in Linux. It
27437 + will probably spread from there (Unicode in some form is, of course,
27438 + also used in Windows NT, but only internally -- not for access from
27441 + To use UTF-8 or any other character set that uses 8-bit bytes in your
27442 + terminal session, be sure to tell C-Kermit to:
27444 + SET TERMINAL BYTESIZE 8
27445 + SET COMMAND BYTESIZE 8
27448 + (or use the shortcut command, EIGHTBIT, which does all three at once).
27450 + In a setup where your local Kermit program uses a single-byte
27451 + character set such as PC Code Page 850 and the remote host uses UTF-8:
27453 + SET TERM CHAR UTF8 CP850
27457 + SET TERM REMOTE CHAR UTF8
27458 + SET TERM LOCAL CHAR CP850
27460 + all works as expected. UTF-8 text on the remote displays correctly on
27461 + your screen, and when you type CP850 characters, they are translated
27462 + to UTF-8 sequences for transmission, and the echo from the host is
27463 + translated from UTF-8 back to CP850. Telnet negotiations and
27464 + autodownload take place before any character-set translation and work
27465 + as before. The session log (if text mode was selected for it) contains
27466 + only the local terminal character-set. And so on.
27468 + Kermit merely supplies translations from UTF-8 to your local terminal
27469 + character-set (this includes treating UTF-8 Line Separator and
27470 + Paragraph separator as CRLF). However, Kermit does does not, at
27471 + present, perform "canonicalization" of composed sequences, nor does it
27472 + automatically execute bidirectionality algorithms for display of
27473 + mixed-direction text (e.g. Hebrew and English). Such presentation
27474 + issues, like all others in the terminal-host regime, are left to the
27477 + By the way, C-Kermit also allows UTF-8 to be the local end of the
27478 + terminal character-set, but so far this code is not tested, since we
27479 + don't have a UTF-8 console or terminal to work with. However, it can
27480 + be stated without doubt that C-Kermit's key mapping will not work for
27481 + UTF-8 values, since (a) the key map is indexed by 8-bit byte values
27482 + and (b) C-Kermit reads keystrokes a byte at a time (these comments do
27483 + not apply to K95, which has direct access to the keyboard and can read
27484 + "wide" keycodes and uses them to index a "wide" keymap).
27486 + Restrictions: As noted, the CONNECT command does not support UCS-2 as
27487 + a REMOTE TERMINAL character-set. Neither does it support the Japanese
27488 + sets EUC-JP, JIS-7, and Shift-JIS. Support for the Japanese sets (and
27489 + possibly Chinese and Korean too) might be added in a future release.
27490 + Since the TRANSMIT command (next section) uses the same REMOTE
27491 + TERMINAL character-sets as the CONNECT command, it has the same
27493 + _________________________________________________________________
27495 + 6.6.5.4. The TRANSMIT Command
27497 + As described in Chapter 15 of [547]Using C-Kermit and [548]Section
27498 + 4.21 of this document, the TRANSMIT command can be used to upload a
27499 + file without protocol, more or less as if you were typing it on your
27500 + keyboard while connected to the host. When TRANSMITting in text mode,
27501 + the file's character set is converted to the host's unless you have
27502 + SET TERMINAL CHARACTER-SET TRANSPARENT, or you include the new
27503 + TRANSMIT switch, /TRANSPARENT.
27505 + Before C-Kermit 7.0, the file character-set was assumed to be the same
27506 + as the local end of the terminal character-set, and the TRANSMIT
27507 + command used the same translations as the CONNECT command, ignoring
27508 + the file character-set.
27510 + In C-Kermit 7.0, that assumption (a poor one to begin with) can no
27511 + longer be made, since UCS-2 can be a file character-set but not a
27512 + terminal character-set. So now the file's character-set is given by
27513 + your most recent SET FILE CHARACTER-SET command. The host's character
27514 + set is the remote end of your most recent SET TERMINAL CHARACTER-SET
27517 + SET TERMINAL CHARACTER-SET remote-set [ local-set ]
27521 + SET TERMINAL REMOTE-CHARACTER-SET remote-set
27523 + The TRANSMIT command converts each source-file character from the FILE
27524 + character-set to the REMOTE TERMINAL character-set, and then transmits
27525 + the translated characters according to your SET TRANSMIT preferences
27528 + If you have SET TRANSMIT ECHO ON, and the host is echoing the
27529 + transmitted characters, the echos are converted from the remote
27530 + terminal character-set to the local terminal character-set.
27532 + [ A picture would help... ]
27534 + Confused? Let's work through an example. Suppose your local computer
27535 + is a NeXTstation, on which text files are encoded in the NeXT
27536 + character set, and that the remote computer is a Data General AViiON,
27537 + which uses the Data General International character set. Further
27538 + suppose that you are logged in to the NeXT from a VT220 terminal which
27539 + uses the DEC Multinational character set.
27541 + You need to convert the file from NeXT encoding to DG encoding and
27542 + convert the echoes from DG encoding to DEC encoding. So on the NeXT,
27543 + tell C-Kermit to:
27546 + set file character-set next
27547 + set term character-set dg-international dec-mcs
27548 + transmit /text nextdata.txt
27550 + (This assumes you have some sort of collection process already set up
27551 + on the Data General, such as a text editor or the venerable "cat >
27552 + foo". The EIGHTBIT command is equivalent to SET TERMINAL BYTESIZE 8,
27553 + SET COMMAND BYTESIZE 8, SET PARITY NONE.)
27555 + To further complicate matters, suppose your local terminal character
27556 + set is the same as the remote one, so you don't need terminal
27557 + character-set translation, but you need to TRANSMIT a file that is in
27558 + a different character set and you want it translated to the host set.
27559 + In this case, use SET TERM CHARACTER-SET to actually specify the
27560 + character set used on each end, rather than specifying TRANSPARENT:
27563 + set file character-set ucs2
27564 + set term character-set latin1 latin1
27565 + transmit /text ucs2data.txt
27567 + The distinction between:
27569 + SET TERMINAL CHARACTER-SET xxx yyy
27571 + (where xxx and yyy are the same set) and:
27573 + SET TERMINAL CHARACTER-SET TRANSPARENT
27575 + is new to C-Kermit 7.0, but affects only the TRANSMIT command.
27577 + The TRANSMIT command currently does nothing special with UCS-2/UTF-8
27578 + Line and Paragraph Separator characters; more experience is required
27579 + to find out how these behave in a genuine Unicode terminal-host
27582 + Restrictions: As noted, the TRANSMIT command translates from the FILE
27583 + character-set to the REMOTE TERMINAL character-set. This rules out
27584 + translations to any character set that is not supported as a REMOTE
27585 + TERMINAL character-set, such as UCS-2, EUC-JP, JIS-7, and Shift-JIS.
27586 + _________________________________________________________________
27588 + 6.6.5.5. Summary of Kermit Unicode Commands
27590 + Specifying file character-set and byte order:
27591 + SET FILE CHARACTER-SET { ..., UCS2, UTF8 }
27592 + REMOTE SET FILE CHARACTER-SET { ..., UCS2, UTF8 } (See next
27594 + SET FILE UCS BOM { ON, OFF }
27595 + SET FILE UCS BYTE-ORDER { BIG-ENDIAN, LITTLE-ENDIAN }
27597 + Specifying the transfer character-set:
27598 + SET TRANSFER CHARACTER-SET { ..., UCS-2, UTF-8 }
27599 + REMOTE SET TRANSFER CHARACTER-SET { ..., UCS-2, UTF-8 }
27601 + Specifying the terminal character-set:
27602 + SET TERMINAL CHARACTER-SET { ..., UTF8 } { ..., UTF8 }
27603 + SET TERMINAL REMOTE-CHARACTER-SET { ..., UTF8 }
27604 + SET TERMINAL LOCAL-CHARACTER-SET { ..., UTF8 }
27606 + Displaying settings:
27610 + SHOW CHARACTER-SETS
27612 + Commands that use these settings include:
27613 + SEND, RECEIVE, GET, etc.
27618 + Converting files:
27619 + TRANSLATE infile { ..., UCS-2, UTF-8 } { ..., UCS-2, UTF-8 }
27621 + COPY /SWAP-BYTES infile outfile
27622 + _________________________________________________________________
27624 + 6.7. Client/Server Character-Set Switching
27626 + A simple mechanism has been added to allow the client to change the
27627 + server's FILE CHARACTER-SET:
27629 + REMOTE SET FILE CHARACTER-SET name
27630 + The client asks the server to change its file character-set to
27631 + the one given. The name must match one of the server's file
27632 + character-set names. For convenience, C-Kermit uses its own
27633 + file character-set keyword list for parsing this command so you
27634 + can use ? for help and Tab or Esc for completion. However,
27635 + since the server might have a different repertoire (or even use
27636 + different names for the same sets), C-Kermit accepts any string
27637 + you supply and sends it to the server. The server, if it
27638 + supports this command (C-Kermit 7.0 and K95 1.1.19 do), sets
27639 + its file character-set as requested, and also disables
27640 + automatic character-set switching ([549]Section 6.5). If the
27641 + server does not support this command or if it does not support
27642 + the given character set, the REMOTE SET FILE CHARACTER-SET
27645 + Here's an example that sends a Japanese text file encoded in Shift-JIS
27646 + to a server using every combination of Kermit's Japanese-capable file
27647 + and transfer character sets:
27649 + dcl \&x[] = euc ucs2 utf8 ; transfer character-sets
27650 + dcl \&y[] = eu uc ut ; 2-letter abbreviations for them
27651 + dcl \&f[] = shift euc jis7 ucs2 utf8 ; file character-sets
27652 + dcl \&g[] = sj eu j7 uc ut ; 2-letter abbreviations
27654 + set file char shift-jis ; local file character-set is Shift-JIS
27655 + for \%i 1 \fdim(&x) 1 { ; for each transfer character-set...
27656 + set xfer char \&x[\%i] ; set it
27657 + for \%j 1 \fdim(&f) 1 { ; for each remote file character-set...
27658 + remote set file char \&f[\%j] ; set it
27659 + if fail exit 1 SERVER REJECTED CHARSET
27660 + send /text meibo-sj.html meibo-sj-\&y[\%i]-\&g[\%j].txt ; send the fi
27662 + if fail exit 1 TRANSFER FAILED
27666 + The Kermit-370 server does not support REMOTE SET FILE CHARACTER-SET,
27667 + but since it supports REMOTE KERMIT commands, you can get the same
27668 + effect with REMOTE KERMIT SET FILE CHARACTER-SET name.
27669 + _________________________________________________________________
27671 + 7. SCRIPT PROGRAMMING
27673 + (Also see [550]Section 2.8, Scripting Local Programs.)
27677 + The following script programming bugs were fixed in C-Kermit 7.0:
27679 + * IF EXIST and IF DIRECTORY were fixed to properly strip braces from
27680 + around their arguments, so "if directory {C:\Program Files}", etc,
27681 + would work as expected. However, this means that if the file or
27682 + directory name is actually enclosed in braces, the braces must be
27684 + * The READ command did not fail if the READ file wasn't open; now it
27686 + * The READ command refused to read the last or only line of a file
27687 + if it did not end with a proper line terminator; now it does.
27688 + * The END command, when given from within a SWITCH statement, did
27689 + not exit from the current macro or command file; instead it just
27690 + terminated the SWITCH.
27691 + _________________________________________________________________
27693 + 7.1. The INPUT Command
27695 + 7.1.1. INPUT Timeouts
27697 + The description of the INPUT command on page 422 fails to mention the
27698 + following two points about the timeout (which apply to C-Kermit 6.0
27701 + 1. "INPUT -1 text" (or "INPUT \%x text", where \%x is any variable
27702 + whose value is -1 or less) means "wait forever". This form of the
27703 + INPUT command fails only if it is interrupted, since it will never
27705 + 2. INPUT 0 performs a nonblocking read of material that has already
27706 + arrived but has not yet been read, and succeeds immediately if the
27707 + target string is found, or fails immediately if it is not found.
27709 + The same points apply to MINPUT. REINPUT ignores its timeout
27711 + _________________________________________________________________
27713 + 7.1.2. New INPUT Controls
27715 + The following new INPUT controls were added in version 7.0:
27717 + SET INPUT AUTODOWNLOAD { ON, OFF }
27718 + Explained in [551]Section 7.7.
27720 + SET INPUT CANCELLATION { ON, OFF }
27721 + This governs whether an INPUT command can be canceled by
27722 + "pressing any key" on the keyboard. Normally it can be, in
27723 + which case the INPUT command fails immediately and \v(instatus)
27724 + is set to 2, indicating interruption. SET INPUT CANCELLATION
27725 + OFF disables keyboard cancellations; thus if the search text is
27726 + not encountered, the INPUT command will run for its entire
27727 + timeout interval. SET INPUT CANCELLATION OFF does not disable
27728 + interruption by Ctrl-C, however; every command needs an
27729 + emergency exit. (If you really want to disable interruption by
27730 + Ctrl-C, use SET COMMAND INTERRUPTION OFF.)
27732 + Also see [552]Section 7.2 for any new variables related to INPUT.
27733 + _________________________________________________________________
27735 + 7.1.3. INPUT with Pattern Matching
27737 + C-Kermit 7.0 allows INPUT, MINPUT, and REINPUT targets to be a pattern
27738 + (explained in [553]Sections 1.19 and [554]4.9). This solves a
27739 + long-standing problem illustrated by the following scenario: a certain
27740 + company has a bank of TCP/IP modem servers, with hostnames server1,
27741 + server2, server3, and so on. Each server's prompt is its name,
27742 + followed by a colon (:), for example "Server72:". Without INPUT
27743 + patterns, it would be rather difficult to wait for the prompt. The
27744 + brute force approach:
27746 + minput 20 Server1: Server2: Server3: ... (enumerating each one)
27748 + is subject to failure whenever a new server is added. A more subtle
27755 + is liable to false positives, e.g. "Welcome to the XYZ Corp Modem
27756 + Server. Please read the following message:"...
27758 + With patterns, you can match the prompt with "Server*:" (which doesn't
27759 + solve the "false positives" problem, but certainly is more compact
27760 + than the brute force method), or with more specific patterns such as
27761 + "Server[1-9]:" and "Server[1-9][0-9]:", or equivalently:
27763 + Server{[1-9],[1-9][0-9]}:
27765 + meaning the word "Server" followed by a single digit (1-9) or by two
27766 + digits representing a number from 1 to 99, followed by a colon.
27768 + INPUT pattern matching has been added in a way that does not interfere
27769 + with existing scripts. No new commands or switches are used. The
27770 + simple rule is: if an INPUT search target is the argument of the (new)
27771 + \fpattern() function, it is a pattern. Otherwise it is taken
27772 + literally, as before. For example:
27776 + searches for an 'a' followed by an asterisk ('*'), followed by a 'b'.
27779 + input 5 \fpattern(a*b)
27781 + searches for an 'a' followed by anything at all up to and including
27782 + the first 'b'. This means that any search target to INPUT, MINPUT, or
27783 + REINPUT can be a pattern or a literal string, and in particular that
27784 + MINPUT can accommodate any mixture of patterns and literal strings.
27786 + In selecting patterns, note that:
27788 + * A leading '*' is always implied so there is no need to include
27790 + * A trailing '*' is meaningless and ignored.
27791 + * A '*' by itself matches the first character that arrives.
27793 + A syntax note: If your pattern is a selection list, meaning a list of
27794 + alternatives separated by commas and enclosed in braces, then the
27795 + outer braces will be stripped by various levels of parsers, so you
27796 + must include three of each:
27798 + input 10 \fpattern({{{abc,mno,xyz}}})
27800 + Note that this is equivalent to:
27802 + minput 10 abc mno xyz
27804 + except for the setting of the \v(minput) variable.
27806 + And a caution: INPUT pattern matching has a limitation that you
27807 + probably never noticed with literal-string matching, namely that there
27808 + is a limit on the size of the match. For example, if the pattern is
27809 + "a*b", the match will succeed if the 'a' and 'b' are not separated by
27810 + more than (say) 8K bytes, but will fail if they are farther apart than
27811 + that. In such cases, it better to use two INPUTs (e.g. "input 10 a"
27812 + and then "input 100 b").
27813 + _________________________________________________________________
27815 + 7.1.4. The INPUT Match Result
27817 + The result of any INPUT, MINPUT, or REINPUT command, no matter whether
27818 + the search targets are patterns or literal strings, is available in
27819 + the new \v(inmatch) variable. For example:
27821 + minput 10 cat \fpattern([dh]og)
27822 + if success echo MINPUT matched "\v(inmatch)"
27824 + This is especially useful when a pattern was matched, since it makes
27825 + the string that matched the pattern available to Kermit; there would
27826 + be no way to get it otherwise.
27828 + After an INPUT command, you can view all the INPUT-related variables
27829 + by typing "show variables in" (abbreviate as "sho var in"), which
27830 + shows the values of all built-in variables whose names start with
27832 + _________________________________________________________________
27834 + 7.2. New or Improved Built-In Variables
27837 + Current BLOCK-CHECK setting, 1, 2, 3, or 4. 4 is the code for
27841 + The machine's byte order: 0 = Big Endian, 1 = Little Endian.
27844 + The length of the command buffer, which is the maximum size for
27845 + a macro, a command, a variable, or anything else in C-Kermit's
27849 + The device name of C-Kermit's controlling (login) terminal.
27852 + Described in [555]Sections 4.1 and [556]4.2.
27855 + Described in [557]Sections 4.1 and [558]4.2.
27858 + As of C-Kermit 7.0, contains fully qualified filenames rather
27859 + than (usually) relative ones.
27862 + Now holds the END n value of the macro that most recently
27863 + returned, in case END was used rather than RETURN.
27866 + Pathname of preferred text editor
27869 + Command-line options for editor
27872 + File most recently edited
27875 + Pathname of preferred Web browser
27878 + Command-line options for Web browser
27881 + URL most recently given to Web browser
27884 + Type of call most recently placed (see [559]Section 2.1.11).
27887 + The character, if any, that was typed at the keyboard to to
27888 + interrupt the most recent PAUSE, SLEEP, WAIT, MSLEEP, or INPUT
27889 + command; empty if the most recent such command was not
27890 + interrupted from the keyboard.
27893 + UNIX only - The name of the UUCP lockfile directory, if known,
27894 + otherwise "(unknown)".
27897 + UNIX only - PID of process that owns the communication port
27898 + that you tried to open with a SET LINE command that failed
27899 + because the port was in use, otherwise empty. This variable is
27900 + set with every SET LINE command.
27903 + If no connection (SET HOST, SET LINE, DIAL, TELNET, etc) is
27904 + active, this is 0. If a connection is active, this is the
27905 + number of seconds since the connection was made.
27908 + If hardware parity is in effect, this variable gives its value,
27909 + such as "even" or "odd" (in which case, the \v(parity) variable
27910 + will be "none"). Otherwise this variable is empty.
27913 + Current serial port settings in 8N1 format ([560]Section 2.10).
27916 + In UNIX, the current value of the C runtime errno variable,
27917 + which is quite volatile (meaning that often an "interesting"
27918 + error code can be overwritten by some other library call or
27919 + system service that sets errno before you have a chance to look
27920 + at it). In VMS, the error code returned by the system or
27921 + library call that most recently failed (success codes are not
27922 + saved). Not available in other operating systems.
27925 + The UNIX or VMS system error message that corresponds to
27926 + \v(errno). Not available in all OS's. Also see
27927 + [561]\ferrstring().
27930 + The error message, if any, from the most recent SET LINE, SET
27931 + PORT, SET HOST, TELNET, or other connection-making command.
27932 + This is not necessarily the same as \v(errstring) since these
27933 + commands might fail without generating a system error code, for
27934 + example (in UNIX) because a lockfile existed indicating the
27935 + device was assigned by another user.
27938 + The exit status C-Kermit would return if it exited now.
27941 + The exit status of the inferior process most recently invoked
27942 + by C-Kermit (by RUN, !, REDIRECT, SEND /COMMAND, etc). In VMS,
27943 + this code can be given to \ferrstring() to get the
27944 + corresponding error message (in UNIX, program/command return
27945 + codes are not the same as system error codes). Not available in
27946 + operating systems other than UNIX and VMS. See [562]Section
27947 + 4.2.5 for details.
27950 + The incoming string of characters, if any, that matched the
27951 + most recent INPUT, REINPUT, or MINPUT command.
27954 + The number of milliseconds (thousandths of seconds) it took for
27955 + the most recent INPUT command to find its match, or -1 if no
27956 + INPUT command has been given yet. If the INPUT command timed
27957 + out, the value is approximately equal to 1000 times the INPUT
27958 + timeout. If INPUT failed for some other reason, the value is
27959 + undefined (\v(instatus) gives INPUT completion status). If your
27960 + version of C-Kermit is built without high-precision
27961 + floating-point timers, this number will always be a multiple of
27965 + The number of seconds specified as the timeout in the most
27966 + recent INPUT command.
27969 + Dialing suffix for use during PDIAL sequence; see [563]Section
27973 + UNIX, VMS, and K95 only. C-Kermit's primary process ID,
27974 + numeric, decimal. If you want to show it in hex, use
27975 + \fn2hex(\v(pid)) If you want to show it in octal, use
27976 + \fn2octal(\v(pid)).
27979 + Current printer name or SET PRINTER value.
27982 + Control prefix char \v(p_8bit) 8-bit prefix char (if parity not
27986 + Repeat prefix char (if repeat compression enabled)
27989 + Kermit's version herald
27992 + Kermit's test version, if any, or 0 if this is not a test
27993 + version. Typical values for test versions are "Alpha.03" or
27997 + The number of entries in the SEND-LIST, 0 if none. Note:
27998 + entries do not necessarily correspond to files, since an entry
27999 + might contain wildcards. Also note that the value does not go
28000 + back to 0 after the files in the list are sent. To reset this
28001 + variable, use CLEAR SEND-LIST. The purpose of this variable is
28002 + to determine if a SEND command, when given without any
28003 + filenames, will be legal. Example:
28005 + xif \v(sendlist) { send } else { send oofa.txt }
28008 + If the most recent CONNECT session was terminated automatically
28009 + by a trigger, this variable contains the trigger value.
28012 + TYPE line number (during TYPE)
28015 + TYPE line count (after TYPE)
28018 + TYPE match count (after TYPE)
28021 + Status of most recent file transfer:
28023 +-1: No transfer yet
28028 + If the most recent file transfer failed, this is the reason. If
28029 + it succeeded, \v(xfermsg) is an empty string.
28032 + Total elapsed time of most recent file transfer operation, in
28036 + Directory that holds (or is supposed to hold) Kermit text files
28037 + such as installation instructions, release notes, update notes,
28038 + read-me files, "beware" files, etc.
28041 + The name with which the Kermit program was invoked, e.g.
28042 + "kermit", "wermit", "k95", "k2", etc (see [564]Section 9.1).
28045 + Name of operating system on computer where C-Kermit is running,
28046 + obtained at runtime (from uname or equivalent).
28049 + Version of operating system on computer where C-Kermit is
28050 + running, obtained at runtime (from uname or equivalent).
28053 + Release of operating system on computer where C-Kermit is
28054 + running, obtained at runtime (from uname or equivalent).
28057 + The specific hardware model of the computer where C-Kermit is
28058 + running, if known.
28061 + The value of Pi (see [565]Section 7.23)
28064 + The value of e (see [566]Section 7.23)
28066 + \v(math_precision)
28067 + How many significant digits in a floating-point number.
28070 + Result of the most recent FILE COUNT (FCOUNT) command.
28073 + Numeric error code of most recent FILE command.
28076 + Maximum number of files open simultaneously.
28078 + The math constants are given in the precision of underlying computer's
28079 + floating-point arithmetic.
28081 + Note the distinction between \v(osname), \v(osversion), and
28082 + \v(platform); the latter refers to the platform for which and/or upon
28083 + which C-Kermit was built, as opposed to the one on which it is
28084 + actually running. Also note that each operating system can, and
28085 + probably will, interpret and fill in the os* variables differently, or
28088 + The SHOW VARIABLES command now accepts a variable name, prefix, or
28091 + show variables Shows all variables.
28092 + show variables t Shows all variables that start with "t".
28093 + show variables *ver* Shows all variables whose names contain "ver".
28094 + show variables *ver Ditto (an implied "*" is appended).
28095 + _________________________________________________________________
28097 + 7.3. New or Improved Built-In Functions
28099 + The following new file-i/o functions are explained in [567]Section
28102 + \f_status(channel) Status of file open on channel
28103 + \f_pos(channel) Read/write (byte) pointer of given file
28104 + \f_line(channel) Current line of file
28105 + \f_handle(channel) Handle of file
28106 + \f_eof(channel) Whether given file is at EOF
28107 + \f_getchar(channel) Read a char from given file
28108 + \f_getline(channel) Read a line from given file
28109 + \f_getblock(channel,n) Read a block from given file
28110 + \f_putchar(channel,c) Write a char to given file
28111 + \f_putline(channel,string) Write a line to given file
28112 + \f_putblock(channel,string) Write a block to given file
28114 + The following new date-time-related functions are explained in
28115 + [568]Section 1.6:
28117 + \fday() Returns day of week of given date
28118 + \fnday() Returns numeric day of week of given date
28119 + \ftime() Returns time portion of given date-time
28120 + \fntime() Converts time to seconds since midnight
28121 + \fn2time() Converts seconds since midnight to hh:mm:ss
28122 + \fcvtdate(date-time) Converts free-format date to yyyymmdd hh:mm:ss
28123 + \fdayofyear(date-time) Converts date to yyyyddd (day-of-year) format
28124 + \fdoy(date-time) Synonym for \fdayofyear()
28125 + \fdoy2date(dayofyear) Converts yyyyddd to yyyymmdd
28126 + \fmjd(date-time) Converts free-format date to Modified Julian Date
28127 + \fmjd2date(mjd) Converts modified Julian date to yyyymmdd
28129 + The new floating-point arithmetic functions are explained in
28130 + [569]Section 7.23. f1 and f2 are floating-point (real) numbers; d is
28131 + the number of decimal places to show:
28133 + \ffpabsolute(f1,d) Absolute value of f1
28134 + \ffpadd(f1,f2,d) f1 + f1
28135 + \ffpcosine(f1,d) Cosine of f1
28136 + \ffpdivide(f1,f2,d) f1 divided by f2
28137 + \ffpexp(f1,d) e to the f1 power
28138 + \ffpint(f1) Integer part of f1
28139 + \ffplog10(f1,d) Log base 10 of f1
28140 + \ffplogn(f1,d) Natural log of f1
28141 + \ffpmaximum(f1,f2,d) Maximum of f1 and f2
28142 + \ffpminimum(f1,f2,d) Minimum of f1 and f2
28143 + \ffpmodulus(f1,f2,d) Modulus of f1 and f2
28144 + \ffpmultiply(f1,f2,d) Product of f1 and f2
28145 + \ffpraise(f1,f2,d) Raise f1 to power f2
28146 + \ffpround(f1,d) Round f1 to d places
28147 + \ffpsine(f1,d) Sine of f1
28148 + \ffpsqrt(f1,d) Square root of f1
28149 + \ffpsubtract(f1,f2,d) f2 - f1
28150 + \ffptangent(f1,d) Tangent of f1
28152 + Integer number functions:
28155 + Absolute value of integer n.
28158 + Returns a random integer between 0 and n-1.
28161 + If the string s is an integer in radix n1, the result is the
28162 + same number expressed in radix n2, where n1 and n2 may be any
28163 + number from 2 through 36, expressed as decimal numbers, or
28164 + variables (etc) that evaluate to decimal numbers. For the
28165 + source and result, the digits of any radix, r, are the first r
28166 + characters in the sequence 0-9,a-z (case doesn't matter for the
28167 + letters). The string s may have a sign, + or -; if it starts
28168 + with a minus (-) sign, the result also has a minus sign.
28170 + The \fradix() function does not work with floating-point numbers. It
28171 + does not reveal the internal storage format of a number; for example,
28172 + \fradix(-1,10,16) is -1, not something like FFFFFFFFFF. If all three
28173 + arguments are not given, or if n1 or n2 are not numbers between 2 and
28174 + 36 inclusive, or s is not a number in radix n1, an error occurs and
28175 + the empty string is returned. \fradix() also does not offer
28176 + extended-precision arithmetic; number values are limited to those
28177 + expressed as a long integer in the architecture of the underlying
28178 + computer, usually 32 or 64 bits. If you give it an argument whose
28179 + absolute value is larger than can be held in an unsigned long, the
28182 + The next four are shorthand functions for decimal/hexadecimal and
28183 + decimal/octal number conversion:
28186 + Returns the hexadecimal (base 16) representation of the integer
28187 + n. This is different from \fhexify(s), which treats its
28188 + argument as a string rather than a number. The result is always
28189 + left-padded with 0's to make its length even. Examples:
28191 + \n2hex(0) = "00" \fhexify(0) = "30"
28192 + \n2hex(255) = "ff" \fhexify(255) = "323535"
28193 + \n2hex(256) = "0100" \fhexify(256) = "323536"
28196 + Converts hexadecimal number x to decimal equivalent decimal
28197 + number. This is the inverse of \fn2hex(). Equivalent to
28198 + \fradix(s,16,10).
28201 + Returns the octal (base 8) representation of the number n.
28204 + \n2octal(0) = "0"
28205 + \n2oct(255) = "377"
28206 + \n2oct(256) = "400"
28207 + Equivalent to \fradix(n,10,8).
28210 + Returns the decimal representation of the given octal number,
28211 + n. The inverse of \fn2octal(). Equivalent to \fradix(n,8,10).
28213 + String functions:
28216 + Equivalent to \fsubstring(\m(name),n,m) ([570]Section 7.24).
28219 + Equivalent to \fsubstring(name,n,m) (where "name" is any
28220 + \-quantity) ([571]Section 7.24).
28223 + The leftmost ncharacters of string s; equivalent to
28224 + \fsubstring(s,1,n).
28226 + \fstripx(string,char)
28227 + Returns the part of the string up to the rightmost occurrence,
28228 + if any, of the given character. The default character is period
28231 + \fstripx(foo/bar,/) = "foo"
28232 + \fstripx(foo/bar/baz,/) = "foo/bar"
28233 + \fstripx(autoexec.bat,.) = "autoexec"
28234 + \fstripx(autoexec.bat) = "autoexec"
28235 + \fstripx(fstripx(foo/bar/baz,/),/) = "foo"
28237 + \flop(string,character)
28238 + Returns the portion of the string starting after the first
28239 + occurrence of the given character. The default character is
28240 + period (.) Examples:
28242 + \flop(autoexec.bat) = "bat"
28243 + \flop(baz.foo/bar) = "foo/bar"
28244 + \flop(baz.foo/bar,/) = "bar
28246 + \fstripn(string,n)
28247 + Returns the string with ncharacters removed from the end.
28250 + \fstripn(12345678,3) = "12345"
28252 + (For more discussion of \fstripx(), \fstripn(), and \flop() see
28253 + [572]Section 4.2.3).
28256 + Returns the Base-64 encoding of the string s.
28259 + Returns the decoding of the Base-64 string s. Fails if s is not
28260 + a Base-64 string, or if its length is not a multiple of 4. Note
28261 + that if any of the result bytes are null (0), the result string
28262 + stops there. There is no way to represent strings that contain
28263 + null bytes in C-Kermit (the same is true for \funhexify()).
28265 + \fword(s1,n,s2,s3)
28266 + Extracts word number nfrom string s1. By default, a "word" is
28267 + any sequence of ASCII letters or digits; nis 1-based. If nis
28268 + omitted, "1" is used. Examples:
28270 + \fword(one two three) = "one"
28271 + \fword(one two three,1) = "one"
28272 + \fword(one two three,2) = "two"
28273 + \fword(one two three,3) = "three"
28277 + \fword(\v(dialresult),2) = "31200"
28279 + is "31200" if \v(dialresult) is (e.g.) "CONNECT
28280 + 31200/ARQ/V32/LAPM/V42BIS".
28282 + If you include s2, this replaces the default break set. For
28283 + example, suppose you have a string \%a whose value is:
28285 + $150.00 $300.00 $39.95
28287 + and you want each dollar amount to be a word; use:
28289 + \fword(\%a,\%n,{ })
28291 + This returns dollar amount number \%n, e.g. "$300.00" for \%n =
28292 + 2. "{ }" denotes a space (you must enclose it in braces,
28293 + otherwise it is squeezed out). Note that ASCII control
28294 + characters are always included in the break set; you don't have
28295 + to specify them (and you can't not specify them).
28297 + The optional s3 argument lists characters (even control
28298 + characters) that normally would be considered separators that
28299 + you want included in words. So the dollars-and-cents example
28300 + could also be handled this way:
28302 + \fword(\%a,\%n,,$.)
28304 + in other words, use the default separator list, but remove "$"
28305 + and "." from it so they will be considered part of a word.
28307 + \fsplit(s1,&a,s2,s3)
28308 + This is like \fword(), except instead of extracting and
28309 + returning a particular word from string s1, it counts the words
28310 + and optionally assigns them to the array whose identifying
28311 + letter, a-z, is given after the "&" in the second argument,
28312 + with the first word going into element 1, the second into
28313 + element 2, and so on. The rules regarding break and include
28314 + lists (s2 and s3) are exactly the same as for \fword().
28315 + \fsplit() returns the number of words that were assigned, which
28316 + is either the number of words in the string, or the dimension
28317 + of the array, whichever is less. If the array is not declared,
28318 + \fsplit() creates it and returns a number which is both the
28319 + number of words in s1 and the dimension of the new array.
28322 + declare \&w[20] ; (Optional.)
28324 + read \%s ; \%s is "This is a sentence with seven words."
28326 + echo "\fsplit(\%s)" ; This would print "7".
28327 + echo "\fsplit(\%s,&w)" ; Ditto, and also assigns them to array \&w[].
28329 + echo "\&w[7]" ; This would print "words".
28331 + If the line contained fields that were delimited by colon (:),
28332 + you would use \fsplit(\%s,&w,:). If the fields were delimited
28333 + by comma, then you would use \fsplit(\%s,&w,{,}); in this case
28334 + the literal comma must be enclosed in braces to distinguish it
28335 + from the comma that separates function arguments. To get a word
28336 + count without loading an array, but still specify break and/or
28337 + include lists, leave the array argument empty:
28339 + echo "\fsplit(\%s,,:)" ; Use colon as the separator.
28343 + 1. If you use the same array repeatedly, \fsplit() leaves any
28344 + trailing members undisturbed. For example:
28346 + \fsplit(1 2 3 4 5,&w) ; Sets \&w[1] thru \&w[5].
28347 + \fsplit(a b c,&w) ; Sets \&w[1]-[3] leaving [4]-[5] as they were.
28348 + 2. If you allow \fsplit to create the array (by not declaring it
28349 + first), it is dimensioned to the number of elements it was
28351 + \fsplit(1 2 3,&x) ; Creates an array \&x[] with 3 elements.
28352 + \fsplit(a b c d e,&x) ; This overflows the array.
28354 + Thus if you want to use \fsplit() repeatedly on the same array,
28355 + either dimension it in advance to the maximum expected size
28356 + (and then some -- more efficient), or else destroy it after
28357 + each use (to allow for unexpectedly large arguments). Example
28358 + using a dynamic array:
28360 + fopen /read \%c some-file
28362 + set function error on ; See [573]Section 7.12
28364 + dcl \&w[] ; Destroy \&[w] each time thru the loop
28365 + fread /line \%c \%a
28367 + asg \%x \fsplit(\%a,&w)
28369 + ; (do what you want with \&w[] here...)
28373 + \frindex(s1,s2,n)
28374 + The "n" argument to \frindex() now works consistently (in
28375 + mirror image) with the corresponding \findex() argument. In
28376 + each case, the (n-1)-most characters of s2 are ignored in the
28377 + search; for findex, this means the starting position of the
28378 + search is n (the default nis 1, and 0 is treated like 1). For
28379 + \frindex() it means the default starting point is:
28381 + length(s2) - length(s1) - n (with the same defaults for n).
28383 + \fsearch(pattern,string[,position])
28384 + Exactly like \findex(), except with a pattern (see [574]Section
28385 + 7.9) rather than a literal string.
28387 + \frsearch(pattern,string[,position])
28388 + Exactly like \frindex(), except with a pattern rather than a
28393 + \ffiles(), \fnextfile()
28394 + It is no longer necessary to copy the file list to an array
28395 + before use, as shown on p.398 of [575]Using C-Kermit 2nd
28396 + Edition. \ffiles() and friends now make their own safe copies
28397 + of the file list. Thus constructions like the following are now
28400 + for \%i 1 \ffiles(*.txt) 1 { send \fnextfile() }
28402 + The same is true for the new function \frfiles(),
28403 + \fdirectories(), and \frdirectories(), described in
28404 + [576]Section 4.11.3.
28406 + But note that each reference to \fnextfile() still gets you the
28407 + next file. So "if newer \fnextfile() foo.txt send \fnextfile()"
28408 + compares one file's age with that of foo.txt, and then sends an
28409 + entirely different file. If you're going to refer to the same
28410 + file more than once, assign it to a variable:
28412 + asg \%f \fnextfile()
28413 + if newer \%f foo.txt send \%f
28415 + (note: assign, not define).
28417 + Also note that \ffiles(), \frfiles(), \fdirectories(), and
28418 + \frdirectories() all now accept on optional 2nd argument: the
28419 + name of an array to load with the resulting file or directory
28420 + list, explained in [577]Section 4.11.3. So you can also load an
28421 + array with the filelist when you need to refer to the same file
28424 + for \%i 1 \ffiles(*,&a) 1 { if newer \&a[\%i] foo.txt send \&a[\%i] }
28426 + \fpermissions(file)
28427 + Returns the platform-specific permissions string for the file,
28428 + such as "-rw-rw-r--" in UNIX or "(RWE,RWE,RE,E)" in VMS.
28431 + Given a file specification f, this function returns the
28432 + complete pathname of directory the file is in.
28437 + Returns the dimension declared for the array whose identifying
28438 + letter, a-z, or special character "_" or "@", is given after
28439 + the "&" in the argument. If the array is not declared, 0 is
28440 + returned. Note that when used with the macro argument vector
28441 + array, \&_[] (see [578]Section 7.5), the value of this function
28442 + is one less than \v(argc), and when used with the C-Kermit
28443 + command-line argument vector array, \&@[], it is equal to the
28444 + \v(args) variable. Examples:
28446 + echo \fdimension(&a) ; Not declared.
28448 + declare \&a[12] ; Now it's declared.
28452 + \farraylook(pattern,arrayname)
28453 + Looks in the given array for the pattern and returns the index
28454 + of the first element that matches, if any, or -1 if none match.
28455 + The arrayname can include a range specifier to restrict to
28456 + search to a segment of the array, e.g.
28457 + \farraylook(*xyz*,&a[32:63]). For greater detail see
28458 + [579]Section 7.10.7.
28460 + \ftablelook(keyword,arrayname[,delimiter])
28461 + Looks in the given "table", which must be sorted, for the given
28462 + keyword. Returns the index of the table element that uniquely
28463 + matches the given keyword, or -1 if none match, or -2 if more
28464 + than 1 match. For greater detail see [580]Section 7.10.7.
28466 + Other new functions:
28469 + Converts a dotted decimal IP address to an 8-digit hexadecimal
28470 + number. \fip2hex(128.59.39.2) = 803b2702.
28473 + Converts an 8-digit hexadecimal IP address to dotted decimal
28474 + form, e.g. \fhex2ip(803b2702) = 128.59.39.2. The inverse of
28479 + These run an external command and return its output; see
28480 + [581]Section 4.2.8.4.
28483 + s is a phone number in either literal or portable format (not a
28484 + dialing directory entry name). The function returns the dial
28485 + string that would actually be used when dialing from the
28486 + current location (after processing country code, area code, and
28487 + other SET DIAL values).
28490 + Returns the system error message associated with the (numeric)
28491 + error code n. UNIX and VMS only. Use in conjunction with
28492 + \v(errno) or \v(pexitstat). See [582]Section 4.2.5 for a usage
28493 + example. Note: This function doesn't work in Windows because
28494 + there is not a consistent error-code-to-message mapping; error
28495 + code "x" means something completely different depending on
28496 + whether it comes from the C runtime library, Winsock, a
28497 + Windows-32 API, TAPI, etc,
28500 + Used in INPUT, REINPUT, and MINPUT commands to denote search
28501 + strings that are to be treated as patterns rather than
28504 + Also see [583]Section 7.8 on built-in help for functions.
28505 + _________________________________________________________________
28507 + 7.4. New IF Conditions
28509 + IF AVAILABLE feature command
28510 + Executes the command if the given feature is available.
28511 + Presently used only to determine if specific authentication and
28512 + encryption options are available. Type "if available ?" to see
28513 + which features may be tested.
28515 + IF FLOAT f1 command
28516 + Executes command if f1 is a legal floating point number (which
28517 + includes integers). Use this to preverify arguments for the
28518 + \ffp...() floating-point arithmetic functions, e.g. "if float
28519 + \%1 echo \ffpint(\%1)".
28521 + IF == n1 n2 command
28522 + Synonym for "if =" (numeric equality). Note that as of C-Kermit
28523 + 7.0, this and all other numeric comparison operators also work
28524 + for floating-point numbers.
28526 + IF != n1 n2 command
28527 + Executes the command if n1 and n2 are both numbers or variables
28528 + containing numbers and the value of n1 is not equal to the
28529 + value of n2. This is equivalent to "if not = n1 n2".
28531 + IF <= n1 n2 command
28532 + Executes the command if n1 and n2 are both numbers or variables
28533 + containing numbers and the value of n1 is less than or equal to
28534 + the value of n2. This is equivalent to "if not > n1 n2".
28536 + IF >= n1 n2 command
28537 + Executes the command if n1 and n2 are both numbers or variables
28538 + containing numbers and the value of n1 is greater than or equal
28539 + to the value of n2. Equivalent to "if not < n1 n2".
28541 + IF COMMAND word command
28542 + Executes the command if word is a built-in C-Kermit command.
28545 + if not command copy define { copy run copy \%1 \%2 }".
28547 + This defines a COPY macro that runs an external COPY command if
28548 + COPY is not already a built-in command.
28551 + Executes the command if Kermit is in local mode, i.e. if it has
28552 + a SET LINE, SET PORT, or SET HOST (TELNET, RLOGIN, etc) device
28553 + or connection open. Does not execute the command if in remote
28556 + IF MATCH string pattern command
28557 + Executes the command if the string matches the pattern. For a
28558 + description of the syntax for the pattern, see [584]Section
28559 + 4.9.1. If you want to test if the string contains pattern, use
28560 + IF \fsearch(pattern,string).
28562 + IF OPEN { DEBUG-LOG, SESSION-LOG, TRANSACTION-LOG, ... } command
28563 + Executes the command if the given file is open, fails if it is
28564 + not open. Type IF OPEN ? for a complete list of files that can
28565 + be checked (all the files that can be opened with the OPEN or
28569 + Executes the command if SET QUIET is ON, and does not execute
28570 + it if SET QUIET is OFF. Example: IF NOT QUIET ECHO { This is a
28574 + Succeeds if name is the name of an existing file or directory
28575 + that is readable.
28577 + IF WRITEABLE name
28578 + Succeeds if name is the name of an existing file or directory
28579 + that is writeable, e.g.:
28581 + if not writeable \v(lockdir) echo Please read installation instructions!
28584 + This tests a user-settable condition, which can mean anything
28585 + you like. SET FLAG ON causes subsequent IF FLAG commands to
28586 + succeed; SET FLAG OFF causes them to fail. One way to use it
28587 + would be for debugging your scripts; precede any debugging
28588 + statements with IF FLAG. Then SET FLAG on to debug your script,
28589 + SET FLAG OFF to run it without debugging. Another common use is
28590 + for causing an inner loop to cause an outer loop to exit.
28592 + IF C-KERMIT command
28593 + C-Kermit, but not Kermit 95 or MS-DOS Kermit, executes the
28597 + Kermit 95, but not C-Kermit or MS-DOS Kermit, executes the
28600 + IF MS-KERMIT command
28601 + MS-DOS Kermit, but not C-Kermit or Kermit 95, executes the
28603 + _________________________________________________________________
28605 + 7.5. Using More than Ten Macro Arguments
28607 + The \v(argc) variable now gives the actual number of arguments, even
28608 + if the number is greater than 9:
28610 + C-Kermit> define xx echo \v(argc)
28611 + C-Kermit> xx a b c d e f g h i j k l m n o p q r s t u v w x y z
28614 + Remember that \v(argc) includes the name of the macro itself, so it is
28615 + always at least 1, and is always 1 greater than the actual number of
28616 + arguments. As in versions 6.0 and earlier, if more than 9 arguments
28617 + are given, only the first nine are assigned to the variables \%1..\%9.
28619 + The \&_[] array, discussed on page 353 of [585]Using C-Kermit, 2nd ed,
28620 + now holds all the arguments, up to some implementation-dependent limit
28621 + (64 or greater), rather than only the first 9. To illustrate: the
28622 + following macro tells the number of arguments it was called with and
28623 + then prints them:
28625 + define show_all_args {
28627 + echo \&_[0] - Number of arguments: \feval(\v(argc)-1)
28628 + for \%i 1 \v(argc)-1 1 { echo \flpad(\%i,3). "\&_[\%i]" }
28631 + Within a macro \&_[0], like \%0, contains the name of the macro.
28633 + At top level, the \&_[] array is filled as follows:
28635 + * If the first argument on the C-Kermit command line was a filename,
28636 + or C-Kermit was invoked from a "Kerbang" script ([586]Section
28637 + 7.19), element 0 contains the filename, and elements 1 through
28638 + \v(argc)-1 hold the remaining command-line arguments.
28639 + * Otherwise the program name goes in element 0, and elements 1
28640 + through \v(argc)-1 hold any arguments that were included after
28643 + The new \%* variable, when used within a macro, is replaced by the
28644 + text that followed the macro name in the macro invocation. If no
28645 + arguments were given, \%* is replaced by the empty string. Examples:
28647 + C-Kermit> define xx echo [\%*]
28648 + C-Kermit> define \%a oofa
28657 + C-Kermit> xx a b c
28659 + C-Kermit> xx a b c d e f g h i j k l m n o p q r s t u v w x y z
28660 + [a b c d e f g h i j k l m n o p q r s t u v w x y z]
28662 + Note that \%* can not be used at top level, since Kermit does not have
28663 + access to the raw command line (only to its elements separately, after
28664 + they have been processed by the shell and the C library).
28666 + C-Kermit 7.0 also adds a SHIFT command:
28669 + Shifts the macro arguments (except argument 0) the given number
28670 + of places to the left and adjusts \v(argc) accordingly. The
28671 + default number is 1.
28673 + To illustrate, suppose macro XXX is invoked as follows:
28675 + xxx arg1 arg2 arg3
28677 + Then inside XXX, \%1 is "arg1", \%2 is "arg2", and \%3 is "arg3".
28678 + After a SHIFT command is given inside XXX, then \%1 is "arg2", \%2 is
28679 + "arg3", and \%3 is empty. \%0 (the name of the macro) remains
28682 + If more than 9 arguments were given, then arguments are shifted into
28683 + the \%1..9 variables from the argument vector array.
28685 + At top level, the SHIFT command operates on the \&_[] array and \%1..9
28686 + variables; the \&@[] array is not affected. See [587]Section 7.16 for
28689 + The \%* variable is not affected by the SHIFT command.
28690 + _________________________________________________________________
28692 + 7.6. Clarification of Function Call Syntax
28694 + Spaces are normally stripped from the front and back of each function
28695 + argument; to prevent this enclose the argument in braces:
28697 + \fsplit(\%a,&a,{ })
28699 + However, function calls that contain spaces can make trouble when the
28700 + function is to be used in a "word" field, since space separates words.
28703 + for \%i 1 \fsplit(\%a,&a,{ }) 1 {
28704 + echo \%i. "\&a[\%i]"
28707 + In most cases, the trouble can be averted by enclosing the function
28708 + reference in braces:
28710 + for \%i 1 {\fsplit(\%a,&a,{ })} 1 {
28711 + echo \%i. "\&a[\%i]"
28714 + or by replacing spaces with \32 (the ASCII code for space):
28716 + for \%i 1 \fsplit(\%a,&a,\32) 1 {
28717 + echo \%i. "\&a[\%i]"
28720 + Braces are also used in function calls to indicate grouping. For
28723 + \fsubstring(abcd,2,2) = "bc"
28725 + But suppose "abcd" needed to contain a comma:
28727 + \fsubstring(ab,cd,2,2)
28729 + This would cause an error, since "cd" appears to be the second
28730 + argument, when really you want the first "2" to be the second
28731 + argument. Braces to the rescue:
28733 + \fsubstring({ab,cd},2,2) = "b,"
28735 + Similarly, leading and trailing spaces are stripped from each
28738 + \fsubstring( abcd ,2,2) = "bc"
28740 + but braces preserve them:
28742 + \fsubstring({ abcd },2,2) = "ab"
28744 + Given these special uses for braces, there is no way to pass literal
28745 + braces to the function itself. For example:
28747 + \fsubstring(ab{cd,2,2)
28751 + So if you need a function to include braces, define a variable
28752 + containing the string that has braces. Example:
28755 + \fsubstring(\%a,2,2) = "b{"
28757 + If the string is to start with a leading brace and end with a closing
28758 + brace, then double braces must appear around the string (which itself
28759 + is enclosed in braces):
28761 + define \%a {{{foo}}}
28762 + \fsubstring(\%a) = "{foo}"
28764 + This also works for any other kind of string:
28766 + define \%a {{ab{cd}}
28767 + echo \fsubstring(\%a) = "ab{cd"
28768 + _________________________________________________________________
28770 + 7.7. Autodownload during INPUT Command Execution
28772 + As of 6.1 / 1.1.12, C-Kermit can be told to look for incoming Kermit
28773 + (or Zmodem) packets during execution of an INPUT command. By default
28774 + (for consistency with earlier releases), this is not done. You can
28775 + enable this feature with:
28777 + SET INPUT AUTODOWNLOAD ON
28779 + (and disable it again with OFF.)
28781 + One possible use for this feature is as a server mode with a time
28784 + INPUT 3600 secret-string-to-end-the-INPUT-command
28786 + In this example, any GET, SEND, or REMOTE commands received within one
28787 + hour (3600 seconds) of when the INPUT command was issued will be
28788 + executed. Here's another example, in which we want to stay open until
28789 + 11:30pm, or until interrupted by seven consecutive Ctrl-C (\3)
28792 + INPUT 23:30:00 \3\3\3\3\3\3\3
28794 + The INPUT AUTODOWNLOAD setting is displayed by SHOW SCRIPTS or SHOW
28796 + _________________________________________________________________
28798 + 7.8. Built-in Help for Functions.
28800 + Beginning in C-Kermit 7.0, you may obtain a description of the calling
28801 + conventions and return values of any built-in function, such as
28802 + \fsubstring(), with the new HELP FUNCTION command; give the function's
28803 + name without the leading "\f", e.g. "help func substring". You can use
28804 + ?, completion, and abbreviation in the normal manner.
28805 + _________________________________________________________________
28807 + 7.9. Variable Assignments
28809 + 7.9.1. Assignment Operators
28811 + Programmers accustomed to languages such as C or Fortran might find
28812 + Kermit's method of assigning values to variables unnatural or awkward.
28813 + Beginning in C-Kermit 7.0, you can use the following alternative
28816 + .name = value is equivalent to DEFINE name value
28817 + .name := value is equivalent to ASSIGN name value
28818 + .name ::= value is equivalent to ASSIGN name \feval(value)
28820 + When the command begins with a period (.), this indicates an
28821 + assignment. The name can be a macro name, a \%{digit,letter} variable,
28822 + or an array element. There can be space(s) between "." and the name.
28825 + .\%a = This is a string ; Same as "define \%a This is a string"
28829 + .xxx = \%a ; Same as "define xxx \%a"
28833 + .xxx := \%a ; Same as "assign xxx \%a"
28837 + declare \&a[2] ; Use with arrays...
28840 + .\&a[\%i] = second
28842 + The following sequence illustrates the differences among three levels
28845 + .\%x = 2 ; Define a variable to have a numeric value
28846 + .\%y = (3 + \%x) ; Define another variable as an arithmetic expression
28848 + .xxx = 4 * \%y ; "=" simply copies the right-hand side.
28852 + .xxx := 4 * \%y ; ":=" evaluates the variables first, then copies.
28856 + .xxx ::= 4 * \%y ; "::=" evaluates the expression, then copies.
28860 + You can also use this syntax to clear (undefine) a variable:
28862 + .\%a = oofa ; Define the variable
28865 + .\%a ; Clear the variable
28869 + Extra credit: Can you guess what happens below when the file "abc"
28872 + fopen /read \%c abc
28874 + _________________________________________________________________
28876 + 7.9.2. New Assignment Commands
28878 + Recall the DEFINE and ASSIGN commands, and their hidden counterparts,
28879 + _DEFINE and _ASSIGN. The former take the variable name literally, the
28880 + latter evaluate the variable-name field to form the variable name
28881 + dynamically. Examples:
28883 + DEFINE \%x foo ; Sets the value of the variable \%x to "foo".
28884 + DEFINE \%a \%x ; Sets the value of the variable \%a to "\%x".
28885 + _DEFINE x_\%a \%x ; Sets the value of the variable x_foo to "\%x".
28886 + ASSIGN \%a \%x ; Sets the value of the variable \%a to the "foo".
28887 + _ASSIGN x_\%a \%x ; Sets the value of the variable x_foo to "foo".
28889 + This concept has been carried over to the remaining
28890 + variable-assignment commands: EVALUATE, INCREMENT, and DECREMENT:
28892 + EVALUATE variablename expression
28893 + Evaluates the arithmetic expression and assigns its value to
28894 + the variable whose name is given. Example: "eval \%a 1+1"
28895 + assigns "2" to \%a.
28897 + _EVALUATE metaname expression
28898 + Evaluates the arithmetic expression and assigns its value to
28899 + the variable whose name is computed from the given metaname.
28900 + Example: "eval foo<\%a>::\%1 \%2 * (\%3 + \%4)" assigns the
28901 + value of "\%2 * (\%3 + \%4)" to the variable whose name is
28902 + computed from "foo<\%a>::\%1".
28904 + INCREMENT variablename [ expression ]
28905 + Evaluates the arithmetic expression and adds its value to the
28906 + value of the variable whose name is given. Example: "increment
28909 + _INCREMENT metaname [ expression ]
28910 + Evaluates the arithmetic expression and adds its value to the
28911 + value of the variable whose name is computed from the given
28912 + metaname. Example: "_increment Words::\%1.count[\%2]".
28914 + DECREMENT variablename [ expression ]
28915 + Evaluates the arithmetic expression and subtracts its value
28916 + from the value of the variable whose name is given.
28918 + _DECREMENT metaname [ expression ]
28919 + Evaluates the arithmetic expression and subtracts its value
28920 + from the value of the variable whose name is computed from the
28923 + WARNING: The syntax of the EVALUATE command has changed since C-Kermit
28924 + 6.0 and K95 1.1.17. Previously, it did not include a variable name,
28925 + only an expression. To restore the old behavior, use SET EVALUATE OLD.
28926 + To return to the new behavior after restoring the old behavior, use
28927 + SET EVALUATE NEW.
28929 + NOTE: There are no analogs to the "_" commands for the operators
28930 + described in [588]Section 7.9.1; those operators can not be used to
28931 + assign values to variables whose names must be computed.
28932 + _________________________________________________________________
28936 + C-Kermit 7.0 adds lots of new array-related features, and groups them
28937 + together under the NEW ARRAY command:
28939 + ARRAY { CLEAR, COPY, DECLARE, DESTROY, RESIZE, SHOW, SORT }
28941 + In each of the ARRAY commands, wherever an array name is expected,
28942 + "short forms" may be used. For example, all of the following are
28945 + array show \&a[] (or SHOW ARRAY...)
28951 + In addition, ranges are accepted in the ARRAY COPY, ARRAY CLEAR, ARRAY
28952 + SET, ARRAY SHOW, and ARRAY SORT commands:
28954 + array clear \&a[16] ; Clears 16 thru end
28955 + array clear &a[16] ; Ditto
28956 + array clear a[16] ; Ditto
28958 + array clear \&a[16:32] ; Clears 16 thru 32
28959 + array clear &a[16:32] ; Ditto
28960 + array clear a[16:32] ; Ditto
28962 + When using array names as function arguments, you must omit the "\"
28963 + and you must include the "&". You may optionally include empty
28964 + brackets. Examples:
28966 + \fsplit(\%a,a) ; Bad
28967 + \fsplit(\%a,\&a) ; Bad
28968 + \fsplit(\%a,&a[3]) ; Bad
28970 + \fsplit(\%a,&a) ; Good
28971 + \fsplit(\%a,&a[]) ; Good
28972 + _________________________________________________________________
28974 + 7.10.1. Array Initializers
28976 + Beginning in C-Kermit 7.0, you may initialize an array -- in whole or
28977 + in part -- in its declaration:
28979 + [ ARRAY ] DECLARE array-name[size] [ = ] [ value1 [ value2 [...] ] ]
28981 + For compatibility with versions 5A and 6.0, the ARRAY keyword is
28982 + optional. DECLARE can also be spelled DCL.
28984 + Initializers are (a) optional, (b) start with element 1, (c) must be
28985 + enclosed in braces if they contain spaces, and (d) are evaluated
28986 + according to normal rules by the DECLARE command prior to assignment.
28987 + Thus the assignments made here are the same as those made by the
28988 + ASSIGN command. This allows you to initialize array elements from the
28989 + values of other variables. If you actually want to initialize an array
28990 + element to variable's name, as opposed to its value, use double
28991 + backslashes (as in "\\&a", "\\v(time)", etc).
28993 + The size (dimension) of the array is optional. If the size is omitted,
28994 + as in "\&a[]", then the array sizes itself to the number of
28995 + initializers; if there are no initializers the array is not declared
28996 + or, if it was declared previously, it is destroyed. If a size is
28997 + given, any extra elements in the initialization list are discarded and
29000 + NOTE: Unlike in C, the list of initializers is NOT enclosed in braces.
29001 + Instead, braces are used to group multiple words together. So:
29003 + ARRAY DECLARE \&a[] = { one two three }
29005 + would create an array with two elements (0 and 1), with element 1
29006 + having the value " one two three ".
29010 + ARRAY DECLARE \&a[16]
29011 + Declares the array \&a with 17 elements (0 through 16), in
29012 + which all elements are initially empty. If the array \&a[]
29013 + existed before, the earlier copy is destroyed.
29015 + ARRAY DECLARE &a[16]
29016 + ARRAY DECLARE a[16]
29017 + ARRAY DCL \&a[16]
29026 + All of the above are the same as the first example.
29028 + ARRAY DECLARE \&a[16] = alpha beta {gamma delta}
29029 + Declares the array \&a with 17 elements (0 through 16),
29030 + initializing \&a[1] to "alpha", \&a[2] to "beta", and \&a[3] to
29031 + "gamma delta". The remaining elements are empty.
29033 + ARRAY DECLARE \&a[] = alpha beta {gamma delta}
29034 + Same as the previous example, but the array is automatically
29035 + dimensioned to 3.
29037 + ARRAY DECLARE \&a[3] = alpha beta {gamma delta} epsilon zeta
29038 + Too many initializers; only the first three are kept.
29040 + ARRAY DECLARE \&a[0]
29041 + ARRAY DECLARE \&a[]
29042 + ARRAY DECLARE &a[]
29048 + All of these are equivalent. Each destroys \&a[] if it exists.
29049 + Declaring an array with a dimension of 0 is the same as ARRAY
29050 + DESTROY arrayname.
29052 + ARRAY DECLARE \&a[] = \%1 \%2 \%3
29053 + Declares the array \&a with 3 elements (0 through 3),
29054 + initializing \&a[1] to the value of \%1, \&a[2] to the value of
29055 + \%2, and \&a[3] to the value of \%3. In this case, any
29056 + reference to one of these array elements is replaced by the
29057 + value of the corresponding \%n variable at the time the
29058 + declaration was executed (immediate evaluation; the array
29059 + element's value does not change if the initializer variable's
29062 + ARRAY DECLARE \&a[] = \\%1 \\%2 \\%3
29063 + Declares the array \&a with 3 elements (0 through 3),
29064 + initializing \&a[1] to the string "\%1", \&a[2] to "\%2", and
29065 + \&a[3] to "\%3". In this case any reference to one of these
29066 + array elements is replaced by the CURRENT value of the
29067 + corresponding \%n variable (deferred evaluation -- the array
29068 + element's value follows the value of the initializer variable).
29070 + The equal sign (=) preceding the initializer list is optional, but is
29071 + recommended for clarity. If you need to initialize element 1 to a
29072 + literal equal sign, use two of them, separated by a space, as in this
29075 + ARRAY DECLARE \&a[] = = + - * /
29077 + Remember, element 0 is not initialized by the DECLARE command. To
29078 + initialize element 0, use a regular DEFINE or ASSIGN command:
29080 + ARRAY DECLARE \&a[] one two three four five six seven eight nine
29081 + DEFINE \&a[0] zero
29083 + Finally, remember that every command level has its own local array,
29084 + \&_[], containing all the macro arguments (\%0, \%1, ...) for that
29085 + level. See [589]Section 7.5 for details.
29086 + _________________________________________________________________
29088 + 7.10.2. Turning a String into an Array of Words
29090 + The \fsplit(s1,&a,s2,s3) function assigns the words of string s1 to
29091 + successive elements of the array (beginning with element 1) whose
29092 + identifying letter, a-z, is given after the "&" in the second
29093 + argument, using break and include characters given in s2 and s3. See
29094 + [590]Section 7.3 for details.
29095 + _________________________________________________________________
29097 + 7.10.3. Arrays of Filenames
29099 + See [591]Section 4.11.3 for news about how \ffiles() and related
29100 + functions can assign a list of filenames to an array. To recapitulate
29105 + assigns all files that match the first argument to the array denoted
29106 + by the second argument. If the array has not been declared, it is
29107 + declared automatically, with exactly the number of elements needed to
29108 + hold the file list; if it was previously declared, it is destroyed and
29109 + reused. The filenames are assigned starting at array element 1.
29110 + Element 0 holds the number of files in the list.
29112 + The DIRECTORY command ([592]Section 4.5.1) can also create filename
29113 + arrays if you give it the /ARRAY: switch; this allows selection
29114 + criteria beyond whether the filename matches the given pattern.
29116 + All functions and commands that create filename arrays store the
29117 + number of filenames, n, as element 0 of the array, and the filenames
29118 + as elements 1 through n.
29119 + _________________________________________________________________
29121 + 7.10.4. Automatic Arrays
29123 + In a command file or macro, you can now have local (automatic) arrays.
29124 + Just give the name followed by empty subscript brackets (no spaces
29125 + inside the brackets please) in a LOCAL command, and then declare the
29128 + LOCAL \%a \&a[] oofa
29129 + ARRAY DECLARE \&a[32] = value1 value2 value3 ...
29131 + This declares the scalar variable \%a, the array \&a[], and the macro
29132 + name "oofa" to be local, and then declares the new local copy of \&a[]
29133 + with 32 elements, perhaps assigning some initial values. When C-Kermit
29134 + exits from the command file or macro containing these command, the
29135 + previous \&a[] array is restored (and if there was no \&a[] at any
29136 + higher level, this will still be true). The process can be repeated to
29137 + any level. Thus it is now safe to write scripts or macros containing
29138 + arrays without danger of interfering with global arrays of the same
29141 + Just as scalars are inherited by lower command levels, so are arrays.
29142 + So, for example, if \&a[] is declared at top level, all lower levels
29143 + will see it unless they include a "local \&a[]" statement, in which
29144 + case all levels at and beneath the level where the LOCAL statement was
29145 + executed will see the local copy. This too can be repeated to any
29148 + On the other hand, if you DECLARE an array at a lower command level
29149 + without also making it LOCAL, this replaces the copy that was declared
29150 + at the lowest command level above this one.
29151 + _________________________________________________________________
29153 + 7.10.5. Sorting Arrays
29155 + Although arrays can be sorted using FOR loops as shown on page 383 of
29156 + Using C-Kermit, 2nd Ed., this involves quite a bit of repetitive
29157 + interpretation by the command parser, and so can be slow for large
29158 + arrays. For this reason, C-Kermit 7.0 adds a built-in SORT command:
29160 + ARRAY SORT [ switches ] array [ array2 ]
29161 + Sorts the given array in place. Sorting is strictly lexical
29162 + (string based). The array name can be given fully, e.g.
29163 + "\&a[]", or the "\" and/or "&" and/or brackets can be omitted,
29164 + e.g. "array sort \&a[]", "sort &a", "sort a". Also, a range can
29165 + be indicated in the brackets as noted in [593]Section 7.10, to
29166 + restrict the sort to a range of elements (equivalent to the
29167 + /RANGE switch, described just below), e.g. "array sort
29170 + A second array may be specified. If it is, and if it is at least as
29171 + big as the first array, it is sorted according to the first array. For
29172 + a sample application, see [594]Section 7.10.10.
29174 + See [595]Section 1.5 for an explanation of switches. The optional
29178 + /CASE:ON means that alphabetic case is significant in
29179 + comparisons; uppercase letters are sorted before lowercase
29180 + ones. /CASE:OFF means case is ignored, e.g. "A" is the same as
29181 + "a". If this switch is not given, sorting is according the
29182 + current SET CASE setting.
29185 + Comparison begins at position n(1-based) in each string. If no
29186 + key is given, the entire strings are compared. Only one key can
29187 + be given. If an array element is shorter than the key value, n,
29188 + that element is considered empty for comparison purposes, and
29189 + therefore lexically less than any element at least ncharacters
29193 + If this switch is included, it means sorting should be numeric,
29194 + rather than lexical. The sort key is the string starting at the
29195 + key position, skipping any leading blanks or tabs, and then as
29196 + much of the string from that point on that fits the definition
29197 + of "numeric", terminating at the first character that does not
29198 + qualify. A numeric string has an optional sign (+ or -)
29199 + followed by one or more digits, and (if your version of Kermit
29200 + was built with floating-point support; see [596]Section 7.23 )
29201 + zero or one decimal point (period). If both /CASE and /NUMERIC
29202 + are given, /NUMERIC takes precedence.
29205 + Sort elements nthrough m of the array. By default, the entire
29206 + array from element 1 to its dimensioned size is sorted, which
29207 + might produce surprising results if the array is not full; see
29208 + example in [597]Section 7.10.7. If ":m" is omitted from the
29209 + range, the dimensioned size is used. Thus, to sort an entire
29210 + array, \&a[], including its 0th element, use "sort /range:0
29211 + &a". You can also sort any desired section of an array, e.g.
29212 + "sort /range:10:20 &a" or "sort /range:\%i:\%j-1 &b". As noted
29213 + above, you can also specify a range in the array-name brackets.
29214 + If you specify a range in the array-name brackets AND with a
29215 + /RANGE switch, the ones in the brackets take precedence.
29218 + Sort in reverse order. If this switch is not given, the array
29219 + is sorted in ascending order.
29221 + Remember that numeric switch arguments can be numbers, arithmetic
29222 + expressions, or variables whose values are numbers or expressions, as
29223 + illustrated in the /RANGE examples above.
29225 + A typical sorting application might be to list students' test scores
29226 + in descending order. Suppose you had the following records:
29233 + (and so on) stored in array \&s[] (e.g. by reading them from a file as
29234 + illustrated in [598]section 7.10.7). In these records, the student's
29235 + name is in columns 1-9 and the score in 10-12. So to rearrange the
29236 + list in descending order of score:
29238 + sort /key:10 /reverse &s
29240 + Then to list your top five students:
29242 + for \%i 1 5 1 { echo \&s[\%i] }
29244 + Or more simply (see next section):
29246 + show array a[1:5]
29248 + To illustrate the difference between a lexical and a numeric sort,
29249 + suppose you have the following records (the lines that are numbered,
29250 + starting at column 1) in array \&a[]:
29253 + 12345678901234567890
29255 + 1. Ivan 10.0 2. Olaf 9.95 3. Olga 101.5
29257 + ARRAY SORT /KEY:10 &a[] would order them 3,1,2, but ARRAY SORT /KEY:10
29258 + /NUMERIC &a[] would order them 2,1,3.
29259 + _________________________________________________________________
29261 + 7.10.6. Displaying Arrays
29263 + The SHOW ARRAY command (or ARRAY SHOW) now accepts an optional
29264 + array-name argument:
29268 + (you can leave off the \, the \&, and/or the []'s if you like; "show
29269 + array a" is equivalent to "show array \&a[]"). When an array is
29270 + specified, its dimension is shown and all defined (non-empty) elements
29275 + assign \%n \ffiles(*,&a) ; Fill an array with filenames ([599]Section 4.11.3
29277 + show array \&a[] ; Show the array we just read
29278 + array show \&a[] ; Same as previous
29279 + array sort \&a[] ; Sort the array
29280 + array show \&a[] ; Show it after sorting
29281 + array show \&a ; Show it again
29282 + array show &a ; Show it again
29283 + array show a ; Show it again
29285 + (The final four commands demonstrate the alternative forms that are
29286 + accepted for the array name.)
29288 + If you SHOW ARRAY without giving an array name, all defined arrays are
29289 + listed by name and dimension, but their contents are not shown.
29291 + You can also show a piece of an array by including a subscript or
29292 + range within the array brackets:
29294 + array show \&a[5] ; Shows \&a[5]
29295 + array show &a[3:8] ; Shows \&a[3] through \&a[8]
29296 + array show a[:\%n-1] ; Shows \&a[0] through \&a[\%n-1]
29297 + _________________________________________________________________
29299 + 7.10.7. Other Array Operations
29301 + ARRAY DESTROY arrayname
29302 + Destroys and undeclares the named array. Subscripts or ranges
29303 + are not accepted in this command.
29305 + ARRAY COPY array1 array2
29306 + Copies the first array to the second array. If the target array
29307 + has not been declared, it is created automatically with the
29308 + same size as the first. If it has been declared, it will be
29309 + used as declared; if the source array is larger, only as much
29310 + of it as will fit is copied to the target array. Syntax for
29311 + array1 and array2 is as in ARRAY SHOW (SHOW ARRAY). Example:
29313 + .\%n := \ffiles(*,&a) ; Create and load array A with a file list.
29314 + array copy &a &b ; Copy array A to array B.
29316 + The ARRAY COPY command also lets you copy pieces of arrays by
29317 + including range specifiers, as in these examples:
29319 + ARRAY COPY \&a[4:27] \&b
29320 + This copies \&a[] elements 4-27 to \&b[] elements 1-23,
29321 + creating \&b[] if necessary or, if \&b[] is already
29322 + declared, stopping early if its size is less than 23.
29324 + ARRAY COPY \&a[4:27] \&b[12]
29325 + This copies \&a[] elements 4-27 to \&b[] elements 12-35,
29326 + creating \&b[] if necessary or, if \&b[] is already
29327 + declared, stopping early if its size is less than 35.
29329 + ARRAY COPY \&a[4:27] \&b[12:14]
29330 + This copies \&a[] elements 4-6 to \&b[] elements 12-14,
29331 + creating \&b[] if necessary or, if \&b[] is already
29332 + declared, stopping early if its size is less than 14.
29334 + ARRAY COPY \&a[17] \&b
29335 + This copies all the elements of \&a[] starting with 17
29336 + until the last to \&b[], creating \&b[] if necessary or,
29337 + if \&b[] is already declared, stopping early if \&b[] is
29340 + ARRAY CLEAR arrayname
29341 + Sets all the elements of the array to the empty value. You may
29342 + also include a range specifier to clear only a selected portion
29343 + of the array; for example "array clear \&a[37:214]". If the
29344 + range is out of bounds, only the part of the array that is in
29345 + bounds is cleared.
29347 + ARRAY SET arrayname [ value ]
29348 + Sets all the elements of the array to the given value. If no
29349 + value is given, the array is cleared. You may also include a
29350 + range specifier to set only a selected portion of the array;
29351 + for example "array set \&a[1:9] -1". If the range is out of
29352 + bounds, only the part of the array that is in bounds is set.
29354 + ARRAY RESIZE arrayname size
29355 + Resizes the given array. If the size is greater than the
29356 + array's current dimension, new empty elements are added to the
29357 + end. If the size is less than the current dimension, the extra
29358 + elements are discarded. Note: If you have stored the array size
29359 + in element 0, ARRAY RESIZE does not change this value.
29360 + Alternative notation: ARRAY RESIZE arrayname[size]. For a
29361 + practical example, see [600]Section 7.10.11.
29363 + \farraylook(pattern,arrayname)
29364 + This function returns the index of the first element of the
29365 + given array that matches the given pattern (for details about
29366 + pattern syntax, see [601]section 4.9). The array name can
29367 + include a range specification to restrict the search to a given
29368 + segment of the array. If no elements match the pattern, -1 is
29371 + \ftablelook(keyword,arrayname[,delimiter])
29372 + Looks in the given "table", which must be sorted, for the given
29373 + keyword. The keyword need not be spelled out in full.
29374 + Pattern-matching characters should not be included as part of
29375 + the keyword. The function returns the index of the table
29376 + element that uniquely matches the given keyword, or -1 if none
29377 + match, or -2 if more than 1 match.
29379 + A "table" is an array that is sorted in lexical order; each of its
29380 + elements may contain multiple fields, delimited by the given delimiter
29381 + character or, if no delimiter is specified, a colon (:).
29383 + The \farraylook() function does exactly what you tell it. If you give
29384 + it a pattern that does not include wildcard characters (such as *, ?,
29385 + etc), it requires an exact match. For example:
29387 + \farraylook(oofa,&a)
29389 + searches for the first element of \&a[] whose value is "oofa". But:
29391 + \farraylook(oofa*,&a)
29393 + finds the first element whose value starts with "oofa", and;
29395 + \farraylook(*oofa,&a)
29397 + finds the first element whose value ends with "oofa", and;
29399 + \farraylook(*oofa*,&a)
29401 + finds the first element whose value contains "oofa".
29403 + Here's a simple demonstration of looking up patterns in arrays:
29405 + local \&a[] \%x \%n
29406 + declare \&a[] = zero one two three four five six seven eight nine ten
29410 + ask \%a { Pattern? }
29411 + if not def \%a exit 0 Done.
29412 + while <= \%x \fdim(&a) {
29413 + .\%x := \farraylook(\%a,&a[\%x])
29414 + if ( < \%x 0 ) break
29415 + echo \flpad(\%x,3). \&a[\%x]
29419 + if ( < \%n 1 ) echo Pattern not found - "\%a"
29422 + The array need not be sorted. When a pattern is given, a search is
29423 + performed; if there is a match, the matching element's index and the
29424 + element itself are printed, and the search begins again at the next
29425 + element. Thus each matching element is printed. If none match, the
29426 + "Pattern not found" message is printed. The process repeats for as
29427 + many patterns as the user wants to type, and terminates when the user
29428 + types an empty pattern.
29430 + Now let's build a little command parser, consisting of a keyword
29431 + table, and a loop to look up the user's commands in it with
29432 + \ftablelook(). In this case the array elements have "fields" separated
29433 + by colon (:) -- a keyword and a value. Keyword tables must be sorted
29434 + if \tablelook() is to work right, so after declaring and initializing
29435 + the table array, we sort it.
29437 + local \&k[] \%a \%i \%n
29439 + array declare \&k[] = drive:9 do:8 discuss:7 live:6 spend:5 help:4 quit:0
29441 + array sort &k ; Make sure array is sorted
29442 + echo Type "help" for help. ; Print greeting & instructions
29444 + while true { ; Loop to get commands
29446 + while not defined \%a { ; Get a command
29447 + ask \%a { Command? }
29449 + .\%n := \ftablelook(\%a,&k) ; Look up the command
29450 + switch \%n { ; Handle errors
29451 + :-1, echo Not found - "\%a" ; Doesn't match
29453 + :-2, echo Ambiguous - "\%a" ; Matches too many
29456 + switch \fword(\&k[\%n],2) { ; Dispatch according to value
29457 + :9, echo Driving..., break
29458 + :8, echo Doing..., break
29459 + :7, echo Discussing..., break
29460 + :6, echo Living..., break
29461 + :5, echo Spending..., break
29462 + :4, echo { Commands (may be abbreviated):}
29463 + for \%i 1 \fdim(&k) 1 {
29464 + echo { \%i. \fword(\&k[\%i],1) }
29468 + :default, stop 1 Internal error
29472 + In this example, keywords are "drive", "do", "discuss", etc, and their
29473 + values are unique numbers (values need not be numbers, and there need
29474 + not be only one value -- there can be 0, 1, 2, or more of them). The
29475 + user types a command, which can be the whole word (like "help") or any
29476 + abbreviation (like "hel", "he", or just "h"). If this does not match
29477 + any keywords, \ftablelook() returns -1; if it matches more than one
29478 + (as would "d"), it returns -2. Otherwise the array index is returned,
29481 + Given the array index \%n, we can get the table values as follows:
29483 + \fword(\&k[\%n],1) is the keyword (first field)
29484 + \fword(\&k[\%n],2) is the value (second field, in this case a number)
29486 + In our example, we use the value (number) as the SWITCH variable. As
29487 + noted, \fablelook() expects the array elements to contain multiple
29488 + fields separated by colon (:) (or other character that you specify,
29489 + e.g. \ftablelook(\%a,&a,^)) and when matching the keyword, ignores the
29490 + first delimiter and everything after it.
29491 + _________________________________________________________________
29493 + 7.10.8. Hints for Using Arrays
29495 + C programmers are accustomed to out-of-bounds array references causing
29496 + core dumps or worse. In C-Kermit:
29498 + * A reference to an an out-of-bounds array element returns the empty
29500 + * An attempt to set the value of an array element that is out of
29501 + bounds or that has not been declared simply fails.
29503 + C programmers expect an array of size nto have elements 0 through n-1.
29504 + Fortran programmers expect the same array to have elements 1 through
29505 + n. C-Kermit accommodates both styles; when you declare an array of
29506 + size n, it has n=1 elements, 0 through n, and you can use the array in
29507 + your accustomed manner, 0-based or 1-based.
29509 + However, note that C-Kermit has certain biases towards 1-based arrays:
29511 + * Assignment of file lists starts with element 1 ([602]Section
29513 + * Assignment by \fsplit() starts with element 1 ([603]Section 7.3).
29514 + * Array initialization skips the 0th element. To initialize a
29515 + 0-based array, use something like this:
29516 + declare \&a[3] = one two three
29518 + * The ARRAY SORT command skips the 0th element unless you include
29520 + * The SHIFT command ignores element 0 of the \&_[] array.
29522 + The distinction between an array's dimensioned size and the number of
29523 + elements in the array is important when sorting. To illustrate:
29525 + declare \&a[100] ; Declare array &a with 100 elements
29526 + fopen /read \%c oofa.txt ; Open a file
29528 + for \%i 1 \fdim(&a) 1 { ; Read the file into the array
29529 + fread \%c \&a[\%i]
29533 + if > \%i \fdim(&a) end 1 File has too many lines for array.
29535 + echo File has \%n line(s).
29537 + Let's say the file had 95 lines. This leaves elements 96-100 of the
29538 + array empty. Now suppose you sort the array and write out the result:
29540 + sort &a ; Sort the whole array
29541 + fopen /write \%o oofa.txt.sorted ; Open an output file
29543 + for \%i 1 \%n 1 { ; Write out 95 records
29544 + fwrite /line \%o \&a[\%i]
29545 + if fail end 1 Write error
29549 + You might be surprised at the contents of "oofa.txt.sorted" -- five
29550 + empty elements, 96-100, floated to the top of the array in the sort,
29551 + and since your write loop only had 95 iterations, the final 5 lines of
29552 + the sorted file are lost.
29554 + Therefore, when dealing with partially filled arrays -- especially
29555 + when sorting them -- remember to specify the number of elements. A
29556 + handy way of recording an array's "true" size is to put it in the 0th
29557 + element. That way, it "travels with the array". To illustrate
29558 + (continuing the previous example at the "close read" statement):
29561 + if > \%i \fdim(&a) end 1 File has too many lines for array.
29562 + .\&a[0] ::= \%i - 1 ; Assign number of lines to \&a[0].
29563 + echo File has \&a[0] line(s).
29564 + sort /range:1:\&a[0] &a
29565 + open write oofa.txt.sorted
29567 + for \%i 1 \&a[0] 1 {
29568 + writeln file \&a[\%j]
29569 + if fail end 1 Write error
29573 + Note the SORT switch, /RANGE:1:\&a[0]. This keeps the sort 1-based,
29574 + and uses element 0 of the array as its size indicator.
29576 + Finally, note that even though some commands or functions might put a
29577 + size in array element 0, no built-in functions or commands depend on a
29578 + size actually being there. Thus you are perfectly free to replace the
29579 + size with something else and treat the array as 0-based.
29580 + _________________________________________________________________
29582 + 7.10.9. Do-It-Yourself Arrays
29584 + Kermit's \&x[] arrays are nice because of the accompanying built-in
29585 + functionality -- ARRAY commands, built-in functions that load and
29586 + search arrays, automatic evaluation of arithmetic expressions within
29587 + the subscript brackets, and so on. Yet they also have certain
29590 + 1. Except when created by dynamic loading (e.g. by \ffiles()) they
29591 + must be declared and dimensioned in advance.
29592 + 2. Indices must be numeric, positive, and in range.
29593 + 3. There can be only one dimension. Matrices or other
29594 + higher-dimensioned arrays are not available.
29596 + But none of this is to say you can't invent any kind of data structure
29597 + you like. In [604]Section 7.9.2 you can see some examples. Here's
29598 + another (courtesy of Dat Thuc Nguyen), in which a pair of matrices is
29599 + created and then added: no dimensioning necessary.
29604 + ; MACRO TO PRINT A MATRIX
29607 + for \%r 1 \m(row) 1 {
29608 + for \%c 1 \m(col) 1 {
29609 + xecho \flpad(\m(\%1[\%r][\%c]),4)
29615 + ; CREATE MATRICES A AND B
29616 + for \%r 1 \m(row) 1 {
29617 + for \%c 1 \m(col) 1 {
29618 + _eval A[\%r][\%c] \%r + \%c
29619 + _eval B[\%r][\%c] \%r * \%c
29622 + ; CREATE MATRIX C = SUM OF MATRIX A AND MATRIX B
29623 + for \%r 1 \m(row) 1 {
29624 + for \%c 1 \m(col) 1 {
29625 + _eval C[\%r][\%c] \m(A[\%r][\%c]) + \m(B[\%r][\%c])
29628 + pmatrix A ; Print Matrix A
29629 + pmatrix B ; Print Matrix B
29630 + pmatrix C ; Print Matrix C
29632 + In the example, we use matrix-like notation to create macros with
29633 + names like "A[1][1]", "B[3][7]", and so on.
29634 + _________________________________________________________________
29636 + 7.10.10. Associative Arrays
29638 + An associative array is a special kind of Do-It-Yourself array. It
29639 + differs from a regular array in that its indices need not be numbers
29640 + -- they can be anything at all -- words, filenames, names of months,
29641 + any character string at all, and that it doesn't have to be (and in
29642 + fact can't be) declared. An associative array element is simply a
29643 + macro whose name ends with an index enclosed in angle brackets, for
29652 + An associative array is a collection of all associative array elements
29653 + that have the same basename. Any number of associative arrays, each
29654 + with any number of elements, can exist at the same time.
29656 + An associative array element can be assigned a value, such as "1",
29657 + just like any other macro:
29659 + define file<oofa.txt> 1 ; Give "file<oofa.txt>" the value "1".
29663 + assign file<oofa.txt> \%a ; Give it the value of the variable \%a.
29665 + However, since an associative array element is a macro, it may not
29666 + have an empty (null) value, since assigning an empty value to a macro
29667 + undefines the macro.
29669 + You can refer to the value of an associative array element using the
29670 + familiar notation for macro values:
29672 + echo \m(file<oofa.txt>) ; Echo the value of "file<oofa.txt>".
29674 + Associative arrays are most useful, however, when the value of the
29675 + index is a variable. In that case, you must use the "hidden" forms of
29676 + the DEFINE or ASSIGN commands that evaluate the macro name before
29677 + making the assignment (see [605]Using C-Kermit, page 457). Example:
29679 + define \%f oofa.txt
29680 + _define file<\%f> 1
29681 + echo file<\%f> = \m(file<\%f>)
29685 + file<oofa.txt> = 1
29689 + _increment file<\%f>
29690 + echo file<\%f> = \m(file<\%f>)
29694 + file<oofa.txt> = 2
29696 + What are associative arrays good for? The classic example is "word
29697 + counts": finding the number of times each word is used in a text
29698 + without knowing in advance what the words are. Without associative
29699 + arrays, your program would have to build a table of some kind, and
29700 + every time a word was encountered, look it up in the table to find its
29701 + position and counter, or add it to the table if it wasn't found -- a
29702 + time-consuming and laborious process. Associative arrays, however, let
29703 + you use the word itself as the table index and therefore sidestep all
29704 + the table building and lookups.
29706 + Let's work through a practical example. Suppose you have a
29707 + file-transfer log in which each line is composed of a number of
29708 + blank-separated fields, and the 9th field is a filename (which happens
29709 + to be the format of certain FTP server logs, as well as of C-Kermit's
29710 + new FTP-format transaction log, described in [606]Section 4.17.2), for
29713 + Wed Jul 14 09:35:31 1999 22 xx.mit.edu 13412 /pub/ftp/mm/intro.txt ....
29715 + and you want to find out how many times each file was transferred. The
29716 + following code builds an associative array, file<>, containing the
29717 + counts for each file:
29719 + local name line max \%c \%n ; Declare local variables
29720 + fopen /read \%c /var/log/ftpd.log ; Open the log file ([607]Section 1.22)
29721 + if fail exit 1 Can't open log ; Check
29722 + while true { ; Loop for each record
29723 + fread /line \%c line ; Read a line
29724 + if fail break ; Check for end of file
29725 + .name := \fword(\m(line),9,{ }) ; Get 9th field = filename (Sec 7.3)
29726 + _increment file<\m(name)> ; Increment its counter (Sec 7.9.2)
29728 + fclose \%c ; Close file when done.
29730 + Note that _INCREMENT (and INCREMENT, and [_]DECREMENT) treat an empty
29731 + (i.e. nonexistent) variable as having a value of 0, and therefore
29732 + creates the variable with a value of 1.
29734 + At this point, if you told Kermit to "show macro file<", it would list
29735 + the associative array. But since you don't necessarily know the names
29736 + of the files in the array, or even how many elements are in the array,
29737 + how can you use it in a script program?
29739 + The idea of creating macro names that include character-string indices
29740 + enclosed in angle brackets is perfectly arbitrary and doesn't depend
29741 + on any Kermit features that weren't already there -- we could just as
29742 + easily have used some other notation, such as "file[index]",
29743 + "file:index", or "file.index", and the code above would have worked
29744 + just as well (with the corresponding syntax adjustments). But to be
29745 + able to use an associative array in a program after the array is
29746 + built, we need a method of accessing all its elements without knowing
29747 + in advance what they are. That's where the chosen notation comes in.
29749 + First of all, any macro name that ends with "<xxx>" (where "xxx" is
29750 + any string) is case sensitive, unlike all other macro names, which are
29751 + case independent. To illustrate, "file<oofa.txt>" and "file<OOFA.TXT>"
29752 + are two distinct macros, whereas "OOFA", "Oofa", and "oofa", when used
29753 + as macro names, are all the same.
29755 + Second, the new \faaconvert() function converts an associative array
29756 + (that is, all macros with names of the form "base<index>" that have
29757 + the same "base" part) into a pair of regular arrays and returns the
29758 + number of elements:
29760 + \faaconvert(name,&a[,&b])
29762 + "name" is the name of the associative array, without the angle
29763 + brackets or index ("file" in our example).
29765 + The second argument is the name of a regular array in which to store
29766 + the indices of the associative array (filenames in our example); if an
29767 + array of this name already exists, it is destroyed unless the array is
29768 + LOCAL. The third argument is the name of another regular array in
29769 + which to store the values (the counts in our example), with the same
29770 + rules about array name collisions. If you care only about the indices
29771 + and not the values, you can omit the third argument to \faaconvert().
29772 + In any case, the associative array is converted, not copied: its
29773 + elements are moved to the specified regular arrays, so after
29774 + conversion the original associative array is gone.
29776 + As with other array-loading functions, \faaconvert() sets element 0 of
29777 + each array to the number of elements in the array.
29779 + To continue our example:
29781 + .max := 0 ; Maximum count
29782 + .\%n := \faaconvert(file,&a,&b) ; Convert
29783 + for \%i 1 \%n 1 { ; Loop through values
29784 + echo \flpad(\%i,3). \&a[\%i]: \&b[\%i] ; Echo this pair
29785 + if ( > \&b[\%i] \m(max) ) { ; Check for new maximum
29786 + .name := \&a[\%i]
29790 + echo Most popular file: \m(name), accesses: \m(max)
29792 + This lists the files and counts and then announces which file has the
29795 + Now suppose you want to sort the array pair created from an
29796 + associative array. In our example, \&a[] contains filenames, and \&b[]
29797 + contains the associated counts. Here we take advantage of the ARRAY
29798 + SORT command's ability to sort a second array according to the first
29801 + array sort /reverse /numeric &b &a ; Descending sort by count
29803 + Now to see the top five files and their counts:
29805 + echo The top 5 files are:
29806 + for \%i 1 5 1 { ; Loop through top 5 values
29807 + echo \flpad(\%i,3). \&a[\%i]: \&b[\%i] ; Echo this pair
29809 + _________________________________________________________________
29811 + 7.10.11. Transferring Array Contents to Other Computers
29813 + The SEND /ARRAY:arrayname command ([608]Section 4.7.1) allows you to
29814 + send the contents of any array, or any contiguous segment of it, in
29815 + either text or binary mode to another computer, using Kermit protocol.
29816 + When used in conjunction with C-Kermit's other features (the array
29817 + features described in this section; the file i/o package from
29818 + [609]Section 1.22; its decision-making, pattern-matching, and string
29819 + manipulation capabilities, and so on) the possibilities are endless:
29820 + extracts of large files, remote database queries, ..., all without
29821 + recourse to system-dependent mechanisms such UNIX pipes and filters,
29822 + thus ensuring cross-platform portability of scripts that use these
29825 + When sending an array in text mode, Kermit appends a line terminator
29826 + to each array element, even empty ones, and it also converts the
29827 + character set from your current FILE character-set to your current
29828 + TRANSFER character-set, if any. No conversions are made or line
29829 + terminations added in binary mode. For example, the following array:
29831 + dcl \&a[] = One Two Three Four Five Six
29833 + is sent as six lines, one word per line, in text mode, and as the bare
29834 + unterminated string "OneTwoThreeFourFiveSix" in binary mode.
29836 + You should always include a /TEXT or /BINARY switch in any SEND /ARRAY
29837 + command to force the desired transfer mode, otherwise you're likely to
29838 + be surprised by the effects described in [610]Section 4.3.
29840 + Here are some examples:
29842 + send /text /array:\&a[]
29843 + Sends the entire contents of the array \&a[] in text mode.
29844 + Since an as-name is not included, the receiver is told the
29845 + filename is _array_a_.
29847 + send /text /array:&a[]
29848 + send /text /array:a[]
29849 + send /text /array:&a
29850 + send /text /array:a
29851 + These are all equivalent to the previous example.
29853 + send /text /array:&a /as-name:foo.bar
29854 + As above, but the array is sent under the name foo.bar.
29856 + send /text /array:&a[100:199] /as:foo.bar
29857 + As above, but only the elements from 100 through 199 are sent.
29859 + In text-mode transfers, character sets are translated according to
29860 + your current settings, just as for text files. In binary mode, of
29861 + course, there is no character-set translation or other conversion of
29862 + any kind. But remember that array elements can not contain the NUL
29863 + (ASCII 0) character, since they are implemented as NUL-terminated
29866 + Here's an example that shows how to send all the lines (up to 1000 of
29867 + them) from a file animals.txt that contain the words "cat", "dog", or
29868 + "hog" (see [611]Section 4.9 about pattern matching):
29870 + declare \&a[1000]
29871 + fopen /read \%c animals.txt
29877 + if match {\m(line)} {*{cat,[dh]og}*} {
29879 + if ( > \%i \fdim(&a) ) break
29880 + .\&a[\%i] := \m(line)
29884 + send /array:a[1:\%i] /text
29886 + Note that we are careful to send only the part of the array that was
29887 + filled, not the entire array, because there are likely to be lots of
29888 + unused elements at the end, and these would be sent as blank lines
29891 + This example raises an interesting question: what if we want to send
29892 + ALL the matching lines, even if there are more than 1000 of them, but
29893 + we don't know the number in advance? Clearly the problem is limited by
29894 + Kermit's (and the computer's) memory. If there are a thousand trillion
29895 + matching lines, they most likely will not fit in memory, and in this
29896 + case the only solution is to write them first to a temporary file on
29897 + mass storage and then send the temporary file and delete it
29900 + However, when the selection is likely to fit in memory, the
29901 + once-familiar technique of initial allocation with extents can be
29904 + if match {\m(line)} {*{cat,[dh]og}*} {
29906 + if ( > \%i \fdim(&a) ) {
29907 + array resize a \fdim(&a)+100
29908 + if fail stop 1 MEMORY FULL
29909 + echo NEW DIMENSION: \fdim(&a)
29911 + .\&a[\%i] := \m(line)
29914 + This grows the array in chunks of 100 as needed.
29915 + _________________________________________________________________
29917 + 7.11. OUTPUT Command Improvements
29920 + This command is exactly like OUTPUT, except it supplies a
29921 + carriage return at the end of the text. "lineout exit" is
29922 + exactly the same as "output exit\13".
29924 + SET OUTPUT SPECIAL-ESCAPES { ON, OFF }
29925 + This command lets you tell C-Kermit whether to process \N, \L,
29926 + and \B specially in an OUTPUT command, as distinct from other \
29927 + sequences (such as \%a, \13, \v(time), etc). Normally the
29928 + special escapes are handled. Use SET OUTPUT SPECIAL-ESCAPES OFF
29931 + Disabling special escapes is necessary in situations when you need to
29932 + transmit lines of data and you have no control over what is in the
29933 + lines. For example, a file oofa.txt that contains:
29936 + It has \%a variables in it
29937 + And it has \B in it.
29938 + And it has \L in it.
29939 + And it has \N in it.
29940 + And this is the last line.
29942 + can be sent like this:
29945 + set output special-escapes off
29946 + fopen /read \%c oofa.txt
29947 + if fail stop 1 Can't open oofa.txt
29951 + ; Add filtering or processing commands here...
29952 + output \m(line)\13
29954 + _________________________________________________________________
29956 + 7.12. Function and Variable Diagnostics
29958 + In C-Kermit 6.0 and earlier, the only diagnostic returned by a failing
29959 + function call was an empty value, which (a) could not be distinguished
29960 + from an empty value returned by a successful function call; (b) did
29961 + not give any indication of the cause of failure; and (c) did not cause
29962 + the enclosing statement to fail. C-Kermit 7.0 corrects these
29965 + SET FUNCTION DIAGNOSTICS { ON, OFF }
29966 + when ON, allows built-in functions to return diagnostic
29967 + messages when improperly referenced, instead of an empty
29968 + string. FUNCTION DIAGNOSTICS are ON by default. When OFF,
29969 + improperly referenced functions continue to return an empty
29970 + string. This command also affects built-in variables; in this
29971 + case, an error message is returned only if the variable does
29972 + not exist. When FUNCTION DIAGNOSTICS are ON, the error message
29975 + For variables, the only message is:
29977 + <ERROR:NO_SUCH_VARIABLE:\v(name)>
29979 + where "name" is the name of the nonexistent variable.
29981 + For functions, the diagnostic message is:
29983 + <ERROR:message:\fname()>
29985 + where "message" is replaced by a message, and "name" is replaced by
29986 + the function name, e.g. <ERROR:ARG_NOT_NUMERIC:\fmod()>. Messages
29989 + ARG_BAD_ARRAY An argument contains a malformed array reference.
29990 + ARG_BAD_DATE An argument contains a malformed date and/or time.
29991 + ARG_BAD_PHONENUM An argument contains a malformed telephone number.
29992 + ARG_BAD_VARIABLE An argument contains a malformed \%x variable.
29993 + ARG_INCOMPLETE An argument is incomplete (e.g. a broken Base64 string).
29994 + ARG_EVAL_FAILURE An argument could not be evaluated (internal error).
29995 + ARG_NOT_ARRAY An argument references an array that is not declared.
29996 + ARG_NOT_NUMERIC An argument that must be integer contains non-digits.
29997 + ARG_NOT_FLOAT An argument has bad floating-point number format.
29998 + ARG_NOT_VARIABLE An argument that must be a variable is not a variable.
29999 + ARG_OUT_OF_RANGE An argument's numeric value is too big or too small,
30000 + or an argument contains illegal characters (e.g. a hex
30001 + or Base-64 string).
30002 + ARG_TOO_LONG An argument's value is too long.
30003 + ARRAY_FAILURE Failure to create an array.
30004 + DIVIDE_BY_ZERO Execution of the function would cause division by zero.
30005 + FLOATING_POINT_OP Execution error in a floating-point operation.
30006 + FILE_NOT_FOUND Filename argument names a file that can't be found.
30007 + FILE_NOT_READABLE Filename argument is not a regular file.
30008 + FILE_NOT_ACCESSIBLE Filename argument names a file that is read-protected.
30009 + FILE_ERROR Other error with filename argument.
30010 + FILE_NOT_OPEN A file function was given a channel that is not open.
30011 + FILE_ERROR_-n A file function got error -n ([612]Section 1.22).
30012 + LOOKUP_FAILURE Error looking up function (shouldn't happen).
30013 + MALLOC_FAILURE Failure to allocate needed memory (shouldn't happen).
30014 + NAME_AMBIGUOUS The function is not uniquely identified.
30015 + MISSING_ARG A required argument is missing.
30016 + NO_SUCH_FUNCTION An argument references a function that is not defined.
30017 + NO_SUCH_MACRO An argument references a macro that is not defined.
30018 + RESULT_TOO_LONG The result of a function is too long.
30019 + UNKNOWN_FUNCTION Internal error locating function (shouldn't happen).
30023 + assign \%m \fmod()
30024 + ?<ERROR:MISSING_ARG:\fmod()>
30025 + echo "\fcontents(\%m)"
30026 + "<ERROR:MISSING_ARG:\fmod()>"
30028 + ?<ERROR:ARG_NOT_NUMERIC:\fmod()>
30029 + echo \fmod(3,4-2*2)
30030 + ?<ERROR:DIVIDE_BY_ZERO:\fmod()>
30032 + Notice the use of \fcontents() in echoing the value of a variable that
30033 + contains a returned error message. That's because the error message
30034 + includes the name of the variable or function that failed, so you must
30035 + use \fcontents() to prevent it from being evaluated again -- otherwise
30036 + the same error will occur.
30038 + The handling of function and variable errors is controlled by:
30040 + SET FUNCTION ERROR { ON, OFF }
30041 + Tells whether invalid function calls or variable references
30042 + should cause command errors. FUNCTION ERROR is ON by default.
30043 + When ON, and an error is diagnosed in a built-in function or
30044 + variable, the command that includes the function call or
30045 + variable reference fails. The failing command can be handled in
30046 + the normal way with IF FAILURE / IF SUCCESS, SET TAKE ERROR, or
30049 + When FUNCTION DIAGNOSTICS is OFF, there is no error message.
30051 + SHOW SCRIPTS displays the current FUNCTION DIAGNOSTICS and ERROR
30053 + _________________________________________________________________
30055 + 7.13. Return Value of Macros
30057 + In C-Kermit 5A and 6.0, there are two ways to return one level from a
30058 + macro: RETURN value and END number text. When RETURN is used, the
30059 + value, which can be a number or a text string, is assigned to
30060 + \v(return). When END was used, however, \v(return) was not set.
30061 + SUCCESS/FAILURE was set according to whether the number was zero, and
30062 + the text was printed, but the actual value of the number was lost.
30064 + In C-Kermit 7.0, the END number is available in the \v(return)
30066 + _________________________________________________________________
30068 + 7.14. The ASSERT, FAIL, and SUCCEED Commands.
30070 + The ASSERT command is just like the IF command, but without a command
30071 + to execute. It simply succeeds or fails, and this can be tested by a
30072 + subsequent IF SUCCESS or IF FAILURE command. Example:
30075 + IF SUCCESS echo 1 = 1.
30077 + The FAIL command does nothing, but always fails. The SUCCEED command
30078 + does nothing, but always succeeds.
30080 + These commands are handy in debugging scripts when you want to induce
30081 + a failure (or success) that normally would not occur, e.g. for testing
30082 + blocks of code that normally are not executed.
30083 + _________________________________________________________________
30085 + 7.15. Using Alarms
30087 + Alarms may be set in two ways:
30090 + Sets an alarm for the given number of seconds "from now", i.e.
30091 + in the future, relative to when the SET ALARM command was
30094 + set alarm 60 ; 60 seconds from now
30095 + set alarm +60 ; The same as "60"
30096 + set alarm -60 ; Not legal - you can't set an alarm in the past.
30097 + set alarm 60*60 ; 60 minutes from now.
30098 + set alarm \%a+10 ; You can use variables, etc.
30100 + SET ALARM hh:mm:ss
30101 + Sets an alarm for the specified time. If the given time is
30102 + earlier than the current time, the alarm is set for the given
30103 + time in the next day. You may give the time in various formats:
30105 + set alarm 15:00:00 ; 3:00:00pm
30106 + set alarm 3:00:00pm ; 3:00:00pm
30107 + set alarm 3:00pm ; 3:00:00pm
30108 + set alarm 3pm ; 3:00:00pm
30111 + Displays the current alarm, if any, in standard date-time
30112 + format (see [613]Section 1.6): yyyymmdd hh:mm:ss.
30115 + Executes the command if an alarm has been set and the alarm
30118 + IF ALARM { command-list } [ ELSE { command-list } ]
30119 + Executes the command-list if an alarm has been set and the
30120 + alarm time has passed. Otherwise, if an ELSE part is given, its
30121 + command-list is executed.
30124 + Clears the alarm.
30126 + Only one alarm may be set at a time.
30128 + Example: Suppose you have a script that is always running, and that
30129 + transfers files periodically, and that keeps a transaction log.
30130 + Suppose you want to start a new transaction log each day:
30132 + log transactions \v(date).log
30133 + set alarm 00:00:00 ; Set an alarm for midnight
30134 + while true { ; Main script loop
30135 + xif alarm { ; If the alarm time is past...
30136 + close transactions ; Close current log
30137 + log transactions \v(date).log ; Start new one
30138 + pause 1 ; To make sure 00:00:00 is past
30139 + set alarm 00:00:00 ; Set a new alarm
30141 + ; put the rest of the script here...
30144 + Note that IF ALARM -- no matter whether it succeeds or fails -- does
30145 + NOT clear an expired alarm. Thus, once an alarm has expired, every IF
30146 + ALARM will succeed until the alarm is cleared (with the CLEAR ALARM
30147 + command) or reset with a new SET ALARM command.
30148 + _________________________________________________________________
30150 + 7.16. Passing Arguments to Command Files
30152 + Beginning in version 7.0, C-Kermit accepts arguments on the TAKE
30153 + command line, for example:
30155 + C-Kermit> take oofa.ksc one two {this is three} four
30157 + This automatically sets the variables \%1 through \%9 to the
30158 + arguments, and \%0 to the name of the file, in this case:
30160 + \%0 = /usr/olga/oofa.ksc
30163 + \%3 = this is three
30166 + and \%5..\%9 are undefined (empty). Arguments past the ninth are
30167 + available in the \&_[] argument-vector array ( [614]Section 7.5).
30169 + The variables are those at the current macro level. Thus, if the TAKE
30170 + command is executed from within a macro, the macro's arguments are
30171 + replaced by those given on the TAKE command line (but only if at least
30172 + one argument is given). The command shown above is exactly equivalent
30175 + assign \%0 /usr/olga/oofa.ksc
30178 + assign \%3 this is three
30187 + Remember, the variables \%0..\%9 are on the macro call stack, and
30188 + command files are independent of the macro stack. Thus, if a command
30189 + file TAKEs another command file and passes arguments to it, the
30190 + variables are changed from that point on for both files, and so forth
30191 + for all levels of nested command files without intervening macro
30194 + It would have been possible to change C-Kermit to use the overall
30195 + command stack, rather than the macro stack, for arguments -- this
30196 + would have made TAKE work exactly like DO, which is "nicer", but it
30197 + would also have broken countless existing scripts. However, the new
30198 + SHIFT command ([615]Section 7.5) makes it possible to create an
30199 + alternative TAKE command that does indeed save and restore the
30200 + argument variables at its own level around execution of a command
30205 + assign \%f \fcontents(\%1)
30210 + C-Kermit 7.0 also supports a new, easier way to pass arguments to
30211 + scripts from the system command line:
30213 + kermit filename arg1 arg2 arg3 ...
30215 + in which arg1, arg2, arg3 (etc) are arguments for the script (whose
30216 + filename is given), and are assigned to \%1, \%2, ... \%9. The
30217 + filename is assigned to \%0. This applies equally to "Kerbang" scripts
30218 + in UNIX ([616]Section 7.19). For example, suppose you have a file
30219 + called "showargs" containing the following lines:
30221 + #!/usr/local/bin/kermit +
30222 + echo Hello from \%0
30226 + (except not indented, since the "#!" line must be on the left margin).
30227 + If you give this file execute permission:
30229 + chmod +x showargs
30231 + then you can run it exactly as you would run a UNIX shell script,
30234 + $ showargs one two three
30235 + Hello from /usr/olga/showargs
30236 + Top-level arguments (\v(argc) = 4):
30237 + \&_[0] = /usr/olga/showargs
30242 + Furthermore, the \&_[] array now contains the filename, if one was
30243 + given as the first command line argument, or it is a "Kerbang" script,
30246 + Otherwise element 0 is program name, and elements 1 through \v(argc)-1
30247 + contain the command-line arguments, if any, that appear after "--" or
30248 + "=", if any. This array is saved and restored around macro calls;
30249 + recall that inside macros it contains the macro argument vector
30250 + (allowing you to access arguments programmatically, and to have more
30253 + At top level, notice the difference between the \&@[] and \&_[]
30254 + arrays. The former includes C-Kermit options; the latter omits them.
30255 + _________________________________________________________________
30257 + 7.17. Dialogs with Timed Responses
30259 + The ASK, ASKQ, GETOK, and GETC commands (let's call them the
30260 + "ASK-class commands") let you write scripts that carry on dialogs with
30261 + the user, asking them for text, a Yes/No answer, or a character,
30262 + respectively. Prior to C-Kermit 7.0, these questions would always wait
30263 + forever for an answer. In C-Kermit 7.0, you may specify a time limit
30264 + for them with the new command:
30266 + SET ASK-TIMER number
30267 + Sets a time-limit on ASK-CLASS commands to the given number of
30268 + seconds. If the number is 0 or less, there is no time limit and
30269 + these commands wait forever for a response. Any timer that is
30270 + established by this command remains in effect for all future
30271 + ASK-class commands until another SET ASK-TIMER command is given
30272 + (e.g. with a value of 0 to disable ASK timeouts).
30274 + IF ASKTIMEOUT command
30275 + An ASK-class command that times out returns a failure status.
30276 + You can test explicitly for a timeout with:
30277 + _________________________________________________________________
30279 + 7.18. Increased Flexibility of SWITCH Case Labels
30281 + Prior to C-Kermit 7.0 / K95 1.1.19, the case labels in SWITCH
30282 + statements were string constants.
30284 + Now case labels can be variables, function calls, or any mixture of
30285 + these with each other and/or with regular characters.
30287 + Furthermore, after the case label is evaluated, it is treated not as a
30288 + string constant, but as a pattern against which the SWITCH variable is
30289 + matched ([617]Section 4.9.1).
30291 + This introduces a possible incompatibility with previous releases,
30292 + since the following characters in case labels are no longer taken
30297 + Any scripts that previously included any of these characters in case
30298 + labels must now quote them with backslash (\).
30299 + _________________________________________________________________
30301 + 7.19. "Kerbang" Scripts
30303 + In UNIX only, Kermit scripts can be stored in files and run
30304 + "directly", without starting Kermit first (as noted on page 467 of the
30305 + manual), just as a shell script can be "run" as if it were a program.
30306 + This section amplifies on that idea a bit, and presents some new
30307 + aspects of version 7.0 that make it easier to write and run Kermit
30308 + scripts directly.
30310 + NOTE: On non-UNIX platforms, such as VMS or Windows, Kerbang
30311 + scripts can be run as "kermit + scriptfilename arg1 arg2 arg3 ...".
30312 + Windows 95/98/NT file associations do not allow for the passing of
30313 + parameters. In VMS, however, you can achieve the Kerbang effect by
30314 + defining a symbol, as in this example:
30316 + $ autotelnet :== "$SYS$TOOLS:KERMIT.EXE + AUTOTELNET.KSC"
30318 + and then running the script like any other command:
30320 + $ autotelnet xyzcorp.com myuserid
30322 + See [618]Section 9.3 for an explanation of the "+" symbol.
30324 + UNIX shell scripts can specify which shell should run them by
30325 + including a "shebang" line at the top, e.g.:
30329 + (but not indented; the shebang line must be on the left margin). The
30330 + term "shebang" is a contraction of "shell" and "bang". "Bang" is a
30331 + slang word for the exclamation mark ("!"); "shebang" itself is an
30332 + American slang word used in in the phrase "the whole shebang".
30334 + We can run Kermit scripts directly too, by including a "shebang" line
30335 + that names Kermit as the "shell"; thus we call these "Kerbang"
30336 + scripts. This mechanism has been considerably simplified in C-Kermit
30337 + 7.0 to facilitate C-Kermit's use a scripting tool just like any of the
30338 + UNIX shells or scripting languages. The rules are the same as for
30341 + 1. The first line of the Kermit script must begin with "#!"
30342 + immediately followed by the full pathname of the program that will
30343 + execute the script (in this case, C-Kermit rather than a UNIX
30344 + shell), followed by any Kermit command-line options. To suppress
30345 + execution of the C-Kermit initialization file and to make command
30346 + line arguments available to the script, the final option should be
30348 + #!/usr/local/bin/kermit +
30349 + Some users have reported that in some circumstances a space might
30350 + be necessary after the plus sign; this depends on your shell -- it
30351 + has nothing to do with Kermit. In most cases, no space is needed.
30352 + 2. The file must have execute permission (granted via "chmod +x
30355 + When C-Kermit is invoked from a Kerbang script (or from the system
30356 + prompt with a "+" command-line argument, which amounts to the same
30357 + thing), the following special rules apply:
30359 + 1. The C-Kermit initialization file is NOT executed automatically. If
30360 + you want it to be executed, include a TAKE command for it in the
30361 + script, e.g. "take \v(home).kermrc". (In previous releases, the
30362 + initialization file was always executed, with no way to prevent it
30363 + except for the user to include Kermit-specific command line
30364 + options which had nothing to do with the script). Many scripts
30365 + have no need for the standard Kermit initialization file, which is
30366 + quite lengthy and not only delays startup of the script, but also
30367 + spews forth numerous messages that are most likely unrelated to
30369 + 2. If the initialization file is not executed, neither is your
30370 + customization file, since the initialization file is the command
30371 + file from which the customization file is TAKEn. Again, you can
30372 + include a TAKE command for the initialization file if desired, or
30373 + for the customization file by itself, or for any other file.
30374 + 3. C-Kermit does not process command-line arguments at all. Instead,
30375 + it passes all words on the command line after the "+" to the
30376 + script as \%0 (the script name), \%1..\%9 (the first nine
30377 + arguments), as well as in the argument vector array \&_[]. The
30378 + variable \v(argc) is set to the total number of "words" (as passed
30379 + by the shell to Kermit) including the script name. Quoting and
30380 + grouping rules are those of the shell.
30381 + 4. At any point where the script terminates, it must include an EXIT
30382 + command if you want it to exit back to the shell; otherwise
30383 + C-Kermit enters interactive prompting mode when the script
30384 + terminates. The EXIT command can include a numeric status to be
30385 + returned to the shell (0, 1, etc), plus an optional message.
30387 + Here is a simple Kerbang script that prints its arguments:
30389 + #/usr/local/bin/kermit +
30390 + echo Hello from \%0
30391 + for \%i 0 \v(argc)-1 1 {
30392 + echo \%i. "\&_[\%i]"
30396 + Save this file as (say) "showargs", then give it execute permission
30397 + and run it (the \&_[] array is the same as \%0..\%9, but allows you to
30398 + refer to argument variables programmatically; see [619]Section 7.5).
30399 + (Yes, you could substitute SHOW ARGUMENTS for the loop.)
30401 + $ chmod +x showargs
30402 + $ ./showargs one "this is two" three
30404 + The script displays its arguments:
30406 + Hello from /usr/olga/showargs
30407 + 0. "/usr/olga/showargs"
30413 + Notice that no banners or greetings are printed and that startup is
30414 + instantaneous, just like a shell script. Also notice that grouping of
30415 + arguments is determined by *shell* quoting rules, not Kermit ones,
30416 + since the command line is parsed by the shell before Kermit ever sees
30419 + Of course you can put any commands at all into a Kerbang script. It
30420 + can read and write files, make connections, transfer files, anything
30421 + that Kermit can do -- because it *is* Kermit. And of course, Kerbang
30422 + scripts can also be executed from the Kermit prompt (or from another
30423 + script) with a TAKE command; the Kerbang line is ignored since it
30424 + starts with "#", which is a comment introducer to Kermit just as it is
30425 + to the UNIX shell. In VMS and other non-UNIX platforms, the Kerbang
30426 + line has no effect and can be omitted.
30428 + It might be desireable for a script to know whether it has been
30429 + invoked directly from the shell (as a Kerbang script) or by a TAKE
30430 + command given to the Kermit prompt or in a Kermit command file or
30431 + macro. This can be done as in this example:
30433 + #!/usr/local/bin/kermit +
30434 + assign \%m \fbasename(\%0)
30435 + define usage { exit 1 {usage: \%m phonenumber message} }
30436 + define apage { (definition of APAGE...) } ; (See [620]book pp.454-456)
30437 + xif equal "\%0" "\v(cmdfil)" {
30438 + if not def \%1 usage
30439 + if not def \%2 usage
30440 + apage {\%1} {\%2}
30444 + In a Kerbang script, \%0 and \v(cmdfile) are the same; both of them
30445 + are the name of the script. When a script is invoked by a Kermit TAKE
30446 + command, \%0 is the name of the Kermit program, but \v(cmdfile) is the
30447 + name of the script. In the example above, a macro called APAGE is
30448 + defined. If the script was invoked directly, the APAGE macro is also
30449 + executed. Otherwise, it is available for subsequent and perhaps
30450 + repeated use later in the Kermit session.
30452 + An especially handy use for Kerbang scripts is to have the
30453 + initialization file itself be one. Since the standard initialization
30454 + file is rather long and time-consuming to execute, it is often
30455 + overkill if you want to start Kermit just to transfer a file. Of
30456 + course there are command-line switches to suppress initialization-file
30457 + execution, etc, but another approach is to "run" the initialization
30458 + file when you want its features (notably the services directory), and
30459 + run C-Kermit directly when you don't. A setup like this requires that
30460 + (a) the C-Kermit initialization file is configured as a Kerbang script
30461 + (has #!/path.../kermit as first line), has execute permission, and is
30462 + in your PATH; and (b) that you don't have a .kermrc file in your login
30464 + _________________________________________________________________
30466 + 7.20. IF and XIF Statement Syntax
30468 + The IF command has been improved in two significant ways in C-Kermit
30469 + 7.0, described in the following subsections. All changes are backwards
30472 + 7.20.1. The IF/XIF Distinction
30474 + The distinction between IF and XIF is no longer important as of
30475 + C-Kermit 7.0. You should be able to use IF in all cases (and of
30476 + course, also XIF for backwards compatibility). In the past, IF was
30477 + used for single-command THEN parts, followed optionally by a separate
30480 + IF condition command1 ; THEN part
30481 + ELSE command2 ; ELSE part
30483 + whereas XIF was required if either part had multiple commands:
30485 + XIF condition { command, command, ... } ELSE { command, command, ... }
30487 + The syntactic differences were primarily that IF / ELSE was two
30488 + commands on two separate lines, whereas XIF was one command on one
30489 + line, and that XIF allowed (and in fact required) braces around its
30490 + command lists, whereas IF did not allow them.
30492 + Furthermore, the chaining or nesting of parts and conditions was
30493 + inconsistent. For example, the IF command could be used like this:
30495 + IF condition command
30496 + ELSE IF condition command
30497 + ELSE IF condition command
30498 + ELSE IF condition command
30501 + but XIF could not. C-Kermit 7.0 accepts the old syntax and executes it
30502 + the same as previous versions, but also accepts a new unified and more
30503 + convenient syntax:
30505 + IF condition command-list [ ELSE command-list ]
30509 +IF condition command-list
30512 + in which the ELSE part is optional, and where command-list can be a
30513 + single command (with or without braces around it) or a list of
30514 + commands enclosed in braces. Examples:
30518 + IF condition { command1, command2 } ELSE { command3, command4 }
30520 + Example 2 (same as Example 1):
30530 + Example 3 (same as 1 and 2):
30536 + ELSE { command3, command4 }
30538 + Example 4 (same as 1-3):
30549 + Example 5 (ELSE can be followed by another command):
30554 + } ELSE IF condition {
30562 + Example 5 suggests other possibilities:
30567 + } ELSE FOR variable initial final increment {
30572 + And this too is possible, except for some non-obvious quoting
30575 + dcl \&a[6] = one two three four five six
30578 + echo \\%n is too small: \%n
30579 + } ELSE FOR \\%i 1 \\%n 1 {
30580 + echo \\%i. \\&a[\\%i]
30583 + (The loop variable must be quoted in this context to prevent premature
30585 + _________________________________________________________________
30587 + 7.20.2. Boolean Expressions (The IF/WHILE Condition)
30589 + Prior to C-Kermit 7.0, the IF and WHILE commands accepted only a
30590 + single Boolean ("true or false") assertion, e.g. "if > \%m 0 command"
30591 + or "if exist filename command". There was no way to form Boolean
30592 + expressions and, in particular, nothing that approached a Boolean OR
30593 + function (AND could be simulated by concatenating IF statements: "if
30594 + condition1 if condition2..").
30596 + C-Kermit 7.0 (and K95 1.1.19) allow grouping of Boolean assertions
30597 + using parentheses and combining them using AND (or &&) and OR (or ||).
30598 + Each of these operators -- including the parentheses -- is a field and
30599 + must be set off by spaces. AND has higher precedence than OR, NOT has
30600 + higher precedence than AND, but parentheses can be used to force any
30601 + desired order of evaluation. The old syntax is still accepted.
30603 + Here are some examples:
30605 + define \%z 0 ; Define some variables
30606 + define \%n 1 ; for use in the examples.
30608 + if > \%n \%z echo \%n is greater. ; Original format - still accepted.
30609 + if ( > \%n \%z ) echo \%n is greater. ; Parentheses may be used in 7.0.
30610 + if ( > \%n \%z && not = \%z 0 ) ... ; Two assertions combined with AND.
30611 + if ( > \%n \%z and not = \%z 0 ) ... ; Same as previous ("and" = "&&").
30612 + if ( > \%n \%z || not = \%z 0 ) ... ; Two assertions combined with OR.
30613 + if ( > \%n \%z or not = \%z 0 ) ... ; Same as previous ("or" = "||").
30614 + if ( > \%n \%z || != \%z 0 ) ... ; Ditto ("!=" = "not =").
30615 + while ( 1 ) { ... } ; Just like C.
30617 + Notice the spaces around all operators including the parentheses --
30618 + these are required. The following examples show how parentheses can be
30619 + used to alter the precedence of the AND and OR operators:
30621 + if ( false || false && false || true ) ,.. ; True
30622 + if ( false || ( false && false ) || true ) ... ; Same as previous
30623 + if ( ( false || false ) && ( false || true ) ) ... ; False
30625 + Similarly for NOT:
30627 + if ( not true && false ) ... ; False (NOT binds to TRUE only)
30628 + if ( ( not true ) && false ) ... ; Same as previous
30629 + if ( not ( true && false ) ) ... ; True (NOT binds to (TRUE && FALSE))
30633 + 1. The syntax of the Boolean expression itself has not changed; each
30634 + expression begins with a keyword or token such as "EXIST", ">", or
30635 + "=", etc; operators such as "<", "=", and ">" do not go between
30636 + their operands but precede them as before; this might be called
30637 + "reverse reverse Polish notation"; it allows deterministic
30638 + on-the-fly parsing of these expressions at the C-Kermit> prompt as
30639 + well as in scripts, and allows ?-help to be given for each item
30640 + when IF or WHILE commands are typed at the prompt.
30641 + 2. Parentheses are required when there is more than one Boolean
30643 + 3. Parentheses are not required, but are allowed, when there is only
30644 + one Boolean assertion.
30645 + 4. Evaluation of Boolean assertions occurs left to right, but the
30646 + resulting Boolean expression is evaluated afterwards according to
30647 + the rules of precedence. All Boolean assertions are always
30648 + evaluated; there is no "early stopping" property and therefore no
30649 + question about when or if side effects will occur -- if any
30650 + Boolean assertion has side effects, they will always occur.
30652 + Constructions of arbitrary complexity are possible, within reason.
30654 + Also see [621]Section 7.4 for new IF / WHILE conditions.
30655 + _________________________________________________________________
30657 + 7.21. Screen Formatting and Cursor Control
30659 + C-Kermit 7.0 adds a simple way to create formatted screens, the SCREEN
30662 + SCREEN { CLEAR, CLEOL, MOVE-TO row [ column ] }
30663 + Performs screen-formatting actions. Correct operation of these
30664 + commands depends on proper terminal setup on both ends of the
30665 + connection -- mainly that the host terminal type is set to
30666 + agree with the kind of terminal or the emulation you are
30667 + viewing C-Kermit through. The UNIX version uses terminfo or
30668 + termcap (not curses); the VMS version uses SMG; K-95 uses its
30669 + built in screen manager.
30672 + Moves the cursor to home position and clears the entire screen.
30673 + Synonyms: CLEAR COMMAND-SCREEN ALL (K-95 only), CLS, CLEAR
30677 + Clears from the current cursor position to the end of the line.
30678 + Synonym: CLEAR COMMAND-SCREEN EOL (K-95 only)
30680 + SCREEN MOVE-TO row column
30681 + Moves the cursor to the indicated row and column. The row and
30682 + column numbers are 1-based, so on a 24x80 screen the home
30683 + position is 1 1 and the lower right corner is 24 80. If a row
30684 + or column number is given that too large for what Kermit or the
30685 + operating system thinks is your screen size, the appropriate
30686 + number is substituted.
30688 + These escape sequences used by these commands depends on the platform.
30689 + In UNIX, your TERM environment variable is used to query the
30690 + terminfo/termcap database; if the query fails, ANSI/VT100 sequences
30691 + are used. In VMS, the SMG library is used, which sends sequences based
30692 + on your VMS terminal type. K95 does its own screen control. On other
30693 + platforms (such as AOS/VS, VOS, etc), screen formatting is not
30694 + supported, and the SCREEN command does nothing.
30696 + The three SCREEN actions can be used in scripts to produce menus,
30697 + formatted screens, dynamic displays, etc. Related variables include:
30699 + \v(terminal) The type terminal C-Kermit thinks you have.
30700 + \v(rows) The number of rows C-Kermit thinks your terminal has.
30701 + \v(columns) The number of columns C-Kermit thinks your terminal has.
30705 + \fscrncurx() The current X coordinate of the cursor (K-95 only).
30706 + \fscrncury() The current Y coordinate of the cursor (K-95 only).
30707 + \fscrnstr(x,y,n) The string of length nat position (x,y) (K-95 only).
30711 + ECHO string Writes string + CRLF at the current cursor position.
30712 + XECHO string Writes string at current cursor position; CRLF not supplied.
30713 + GETC v prompt Issues prompt, reads one character into variable v, no echo.
30715 + And special characters:
30717 + Ctrl-L At the C-Kermit> command prompt, or in a C-Kermit command,
30718 + works like Return or Enter, but also clears the screen
30720 + Example 1: A macro that prints a message \%1 at cursor position
30724 + if not def \%3 def \%3 0 ; Default column to 0
30725 + if > \v(argc) 2 screen move \%2 \%3 ; Move to given row/col (if any)
30726 + screen cleol ; Clear to end of line
30727 + if def \%1 xecho \fcontents(\%1) ; Print message (if any)
30730 + Example 2: A macro put the cursor on the bottom screen line, left
30734 + screen move \v(rows) 0
30737 + Example 3: A macro to center message \%1 on line \%2.
30740 + if not def \%2 def \%2 1
30741 + .\%x ::= (\v(cols)-\flen(\%1))/2
30742 + msg {\%1} {\%2} {\%x}
30745 + Example 4: A simple menu (building on Examples 1-3):
30747 + def \%c 0 ; Menu choice variable
30748 + screen clear ; Clear the screen
30749 + center {Welcome to This Menu} 2 ; Display the menu
30754 + while ( != \%c 3 ) { ; Read and verify choice
30755 + while true { ; Keep trying till we get a good one
30756 + screen move 10 ; Move to line 10
30757 + screen cleol ; Clear this line
30758 + getc \%c {Your choice: } ; Prompt and get and echo 1 character
30760 + if ( not numeric \%c ) { msg {Not numeric - "\%c"} 12, continue }
30761 + if ( >= \%c 1 && <= \%c 3 ) break
30762 + msg {Out of range - "\%c"} 12
30764 + switch \%c { ; Valid choice - execute it.
30765 + :1, msg {Filing... } 12, break
30766 + :2, msg {Editing...} 12, break
30767 + :3, msg {Exiting...} 12, break
30770 + echo Bye ; Exit chosen - say goodbye.
30771 + bot ; Leave cursor at screen bottom.
30774 + Similar scripts can work over the communication connection; substitute
30775 + INPUT and OUTPUT for GETC and ECHO/XECHO.
30776 + _________________________________________________________________
30778 + 7.22. Evaluating Arithmetic Expressions
30780 + A new arithmetic operator was added to the list recognized by the
30781 + EVALUATE command, the \feval() function, and which can also be used
30782 + anywhere else arithmetic expressions are accepted (numeric command
30783 + fields, array subscripts, etc):
30786 + This operator inverts the "truth value" of the number or
30787 + arithmetic expression that follows. If the value of the operand
30788 + is 0, the result is 1. If the value is nonzero, the result is
30808 + evaluate !(\%a|\%b)
30811 + evaluate !(\%a&\%b)
30814 + evaluate !(!(\%a&\%b))
30817 + Note the distinction between Prefix ! (invert truth value) and Suffix
30818 + ! (factorial). Also the distinction between Prefix ! and Prefix ~
30819 + (which inverts all the bits in its operand). Also note that prefix
30820 + operators (!, -, and ~) can not be adjacent unless you use parentheses
30821 + to separate them, as shown in the final example above.
30822 + _________________________________________________________________
30824 + 7.23. Floating-Point Arithmetic
30826 + C-Kermit 7.0 adds limited support for floating-point numbers (numbers
30827 + that have fractional parts, like 3.141592653). This support is
30828 + provided through a small repertoire of functions and in Boolean
30829 + expressions that compare numbers, but does not apply to number parsing
30830 + in general, or to expression evaluation, array subscripts, the
30831 + INCREMENT and DECREMENT commands, or in any context other than those
30832 + listed in this section.
30834 + A floating point number has an optional sign (+ or -), followed by a
30835 + series of decimal digits containing either zero or one period (.)
30836 + character, which is the decimal point. The use of comma or any other
30837 + character besides period as a decimal point is not supported.
30838 + Scientific notation is not supported either. Examples of legal
30839 + floating-point numbers:
30841 + 0 Integers can be used
30843 + 2. A decimal point without decimal digits
30844 + 3.0 A decimal point with decimal digits
30845 + 3.141592653 Ditto
30846 + -4.0 A negative sign can be included
30847 + +5.0 A positive sign can be included
30849 + Examples of notations that are not accepted:
30851 + 1,000,000 Separators can not be used
30852 + 1.000.000 Ditto (or multiple decimal points)
30853 + 6.022137E23 No scientific notation
30854 + 6.62606868e-34 Ditto
30855 + 12.5+6.25 No "bare" expressions
30857 + You can use IF FLOAT test a string or variable to see if it's in
30858 + acceptable floating-point format. Example:
30860 + ask \%f { Type a number: }
30861 + if not def \%f .\%f = 0.0
30862 + if not float \%f stop 1 Invalid floating-point number: "\%f"
30864 + C-Kermit's floating-point support, like its support for whole numbers
30865 + (integers), relies on the capabilities of the underlying computer.
30866 + Your computer has only a limited amount of precision for numbers,
30867 + depending on its architecture. Thus floating-point numbers that have
30868 + too many digits will not be accurate; adding a very small number to a
30869 + very large one might have no effect at all; and so on. For details,
30870 + read a text on numerical analysis. Example:
30872 + .\%a = 11111111111111111111 ; A long number
30873 + .\%b = 22222222222222222222 ; Another one
30874 + echo \ffpadd(\%a,\%b) ; Add them - the result should be all 3's
30875 + 33333333333333330000.0 ; See the result
30877 + In this example, the computer has 16 digits of precision; after that,
30878 + the (low-order) digits are set to 0, since the computer doesn't know
30879 + what they really are. In fact, the computer returns random digits, but
30880 + Kermit sets all digits beyond the computer's precision to 0.
30882 + C-Kermit's floating-point functions have names of the form
30883 + "\ffpxxx(args)" ("\f" for function, "fp" for floating-point), where
30884 + "xxx" is replaced by the name of the function, such as "sqrt", and
30885 + "args" is the argument list, consisting of one or two floating-point
30886 + numbers (depending on the function), and an optional "d" argument that
30887 + says now many decimal places should be shown in the result. Example:
30889 + \ffpdiv(10,3,1) returns "3.3"
30890 + \ffpdiv(10,3,2) returns "3.33"
30891 + \ffpdiv(10,3,3) returns "3.333"
30893 + and so on, up to the precision of the computer. If the decimal-places
30894 + argument is less than zero, the fractional part of the result is
30897 + \ffpdiv(10,3,-1) returns "3".
30899 + If the decimal-places argument is 0, or is omitted, C-Kermit returns
30900 + as many decimal places as are meaningful in the computer's
30901 + floating-point precision, truncating any extraneous trailing 0's:
30903 + \ffpdiv(10,8) returns "1.25".
30904 + \ffpdiv(10,4) returns "2.5".
30905 + \ffpdiv(10,2) returns "5.0".
30906 + \ffpdiv(10,3) returns "3.333333333333333" (for 16-digit precision).
30908 + There is no way to request that a floating-point function return a
30909 + decimal point but no decimal places. However, this is easy enough to
30910 + accomplish in other ways, for example by supplying it outside the
30913 + echo \ffpadd(\%a,\%b,-1).
30915 + Kermit's floating-point functions always round the result for the
30916 + requested number of decimal places when the "d" argument is given and
30917 + has a value greater than 0 (see the description of \ffpround() just
30920 + Floating-point arguments can be constants in floating-point format or
30921 + variables whose values are floating-point numbers. If a floating-point
30922 + argument is omitted, or is a variable with no value, 0.0 is supplied
30923 + automatically. Example:
30927 + echo \ffpmin(\%x,\%y)
30932 + echo \ffpmin(999.999)
30935 + The floating-point functions are:
30938 + Returns f1 rounded to d decimal places. For this function only,
30939 + d = 0 (or d omitted) has a special meaning: return the integer
30940 + part of f1 rounded according to the fractional part. Examples:
30942 + \ffpround(2.74653,-1) returns "2" (fraction truncated, no rounding).
30943 + \ffpround(2.74653,0) returns "3" (integer part is rounded).
30944 + \ffpround(2.74653) returns "3" (d omitted same as d = 0).
30945 + \ffpround(2.74653,1) returns "2.7".
30946 + \ffpround(2.74653,2) returns "2.75".
30947 + \ffpround(2.74653,3) returns "2.747".
30948 + \ffpround(2.74653,4) returns "2.7465", etc.
30951 + Returns the sum of f1 and f2.
30953 + \ffpsubtract(f1,f2,d)
30954 + Subtracts f2 from f1 and returns the result.
30956 + \ffpmultiply(f1,f2,d)
30957 + Returns the product of f1 and f2.
30959 + \ffpdivide(f1,f2,d)
30960 + If f2 is not 0, divides f1 by f2 and returns the quotient.
30961 + If f2 is 0, a DIVIDE_BY_ZERO error occurs.
30963 + \ffpraise(f1,f2,d)
30964 + If f1 = 0 and f2 <= 0, or if f1 < 0 and f2 has a fractional
30965 + part, an ARG_OUT_OF_RANGE error occurs; otherwise f1 raised to
30966 + the f2 power is returned.
30969 + If f1 >= 0, returns the square root of f1; otherwise
30970 + ARG_OUT_OF_RANGE.
30972 + \ffpabsolute(f1,d)
30973 + Returns the absolute value of f1 (i.e. f1 without a sign). This
30974 + is the floating-point analog of \fabsolute(n1).
30977 + Returns the integer part of f1. Equivalent to \ffpround(f1,-1).
30980 + The base of natural logarithms, e (2.718282...), raised to the
30984 + The natural logarithm of f1 (the power to which e must be
30985 + raised to obtain f1).
30988 + The base-10 logarithm of f1 (the power to which 10 must be
30989 + raised to obtain f1).
30991 + \ffpmodulus(f1,f2,d)
30992 + If f2 is not 0, the remainder after dividing f1 by f2.
30993 + If f2 is 0, a DIVIDE_BY_ZERO error occurs.
30994 + This is the floating-point analog of \fmod(n1,n2).
30996 + \ffpmaximum(f1,f2,d)
30997 + Returns the maximum of f1 and f2. This is the floating-point
30998 + analog of \fmax(n1,n2).
31000 + \ffpminimum(f1,f2,d)
31001 + Returns the minimum of f1 and f2. This is the floating-point
31002 + analog of \fmin(n1,n2).
31005 + Returns the sine of f1 radians.
31008 + Returns the cosine of f1 radians.
31010 + \ffptangent(f1,d)
31011 + Returns the tangent of f1 radians.
31013 + Note that all of these functions can be used with integer arguments.
31014 + If you want an integer result, specify d = -1 (to truncate) or feed
31015 + the result to \ffpround(xxx,0) (to round).
31017 + Floating-point numbers (or variables or functions that return them)
31018 + can be used in Boolean expressions (see [622]Section 7.20.2) that
31028 + In these examples, x and y can be either integers or floating-point
31029 + numbers in any combination. In an arithmetic comparison of an integer
31030 + and a floating-point number, the integer is converted to
31031 + floating-point before the comparison is made. Examples:
31033 + .\%t = 3.000000000
31034 + .\%f = 3.141592653
31037 + if > \%f \%i echo Pi is greater.
31038 + if = \%t \%i echo "\%i" = "\%t".
31040 + A floating-point number can also be used in:
31042 + IF number command
31044 + where the command is executed if the number is nonzero. If the number
31045 + is floating-point, the command is not executed if the number is 0.0,
31046 + and is executed otherwise.
31048 + Floating-point numbers can be sorted using ARRAY SORT /NUMERIC (see
31049 + [623]Section 7.10.5 ).
31051 + Two floating-point constants are provided:
31053 + \v(math_pi) = Pi (3.141592653...)
31054 + \v(math_e) = e, the base of natural logarithms (2.71828...)
31056 + These are given to the computer's precision, e.g. 16 digits. This
31057 + number itself is available in a variable:
31059 + \v(math_precision)
31060 + How many significant digits in a floating-point number.
31061 + _________________________________________________________________
31063 + 7.24. Tracing Script Execution
31065 + The TRACE command is handy for debugging scripts.
31067 + TRACE [ { /ON, /OFF } ] [ { ASSIGNMENTS, COMMAND-LEVEL, ALL } ]
31068 + Selects tracing of the given object.
31070 + Optional switches are /ON and /OFF. If no switch is given, /ON is
31071 + implied. The trace objects are ASSIGNMENTS, COMMAND-LEVEL, and ALL.
31072 + The default object is ALL, meaning to select all trace objects
31073 + (besides ALL). Thus TRACE by itself selects tracing of everything, as
31074 + does TRACE /ON, and TRACE /OFF turns off all tracing.
31076 + When tracing of ASSIGNMENTS is on, every time the value of any
31077 + user-defined variable or macro changes, C-Kermit prints one of the
31080 + >>> name: "value"
31081 + The name of the variable or macro followed by the new value in
31082 + quotes. This includes implicit macro-parameter assignments
31083 + during macro invocation.
31085 + >>> name: (undef)
31086 + This indicates that the variable or macro has been undefined.
31088 + <<< name: "value"
31089 + For RETURN statements: the name of the macro and the return
31093 + For RETURN statements that include no value or an empty value.
31095 + When tracing of COMMAND-LEVEL is on, C-Kermit prints:
31098 + Whenever a command file is entered, where "n" is the command
31099 + level (0 = top); the name of the command file is shown in
31103 + Whenever a macro is entered; "n" is the command level. The name
31104 + of the macro is shown in quotes.
31107 + Whenever a command file is reentered from below, when a macro
31108 + or command file that it has invoked has returned.
31111 + Whenever a macro is reentered from below.
31113 + For other debugging tools, see SHOW ARGS, SHOW STACK, SET TAKE, SET
31114 + MACRO, and of course, ECHO.
31115 + _________________________________________________________________
31117 + 7.25. Compact Substring Notation
31119 + It is often desirable to extract a substring from a string which is
31120 + stored in a variable, and for this we have the \fsubstring() function,
31121 + which is used like this:
31123 + define \%a 1234567890
31124 + echo \fsubstring(\%a,3,4) ; substring from 3rd character length 4
31127 + or like this with macro-named variables:
31129 + define string 1234567890
31130 + echo \fsubstring(\m(string),3,4)
31133 + C-Kermit 7.0 adds a pair of alternative compact notations:
31135 +\:(variablename[start:length]) <-- Substring of variable's value
31136 +\s(macroname[start:length]) <-- Substring of macro's definition
31138 + These are exactly equivalent to using \fsubstring(), except more
31139 + compact to write and also faster since evaluation is in one step
31142 + The "\:()" notation can be used with any Kermit variable, that is,
31143 + almost anything that starts with a backslash:
31145 + \:(\%a[2:6]) <-- equivalent to \fsubstring(\%a,2,6)
31146 + \:(\&x[1][2:6]) <-- equivalent to \fsubstring(\&x[1],2,6)
31147 + \:(\m(foo)[2:6]) <-- equivalent to \fsubstring(\m(foo),2,6)
31148 + \:(\v(time)[2:6]) <-- equivalent to \fsubstring(\v(time),2,6)
31149 + \:(\$(TERM)[2:6]) <-- equivalent to \fsubstring(\$(TERM),2,6)
31150 + \:(ABCDEFGH[2:6]) <-- equivalent to \fsubstring(ABCDEFGH,2,6)
31152 + Whatever appears between the left parenthesis and the left bracket is
31153 + evaluated and then the indicated substring of the result is returned.
31155 + The "\s()" notation is the same, except after evaluating the variable,
31156 + the result is treated as a macro name and is looked up in the macro
31157 + table. Then the indicated substring of the macro definition is
31158 + returned. Example:
31160 + define testing abcdefghijklmnopqrstuvwxyz
31161 + define \%a testing
31163 + \s(testing[2:6]) --> bcdefg
31164 + \:(testing[2:6]) --> esting
31165 + \:(\%a[2:6]) --> esting
31166 + \s(\%a[2:6]) --> bcdefg
31168 + Note that the following two examples are equivalent:
31173 + The first number in the brackets is the 1-based starting position. If
31174 + it is omitted, or less than 1, it is treated as 1. If it is greater
31175 + than the length of the string, an empty string is returned.
31177 + The second number is the length of the desired substring. If the
31178 + second number is omitted, is less than 0, or would be past the end of
31179 + the string, then "through the end of the string" is assumed. If it is
31180 + 0, the empty string is returned.
31182 + If the brackets are empty or omitted, the original string is returned.
31184 + The starting position and length need not be literal numbers; they can
31185 + also be variables, functions, arithmetic expressions, or even other
31186 + \s() or \:() quantities; anything that evaluates to a number, for
31189 + \s(block[1025:\fhex2n(\s(block[\%b:\%n+4]))/2])
31191 + Syntactically, \m(name) and \s(name) differ only in that the sequence
31192 + [*] at the end of the name (where * is any sequence of 0 or more
31193 + characters) is treated as substring notation in \s(name), but is
31194 + considered part of the name in \m(name) (to see why, see [624]Section
31196 + _________________________________________________________________
31198 + 7.26. New WAIT Command Options
31200 + The WAIT command has been extended to allow waiting for different
31201 + kinds of things (formerly it only waited for modem signals). Now it
31202 + also can wait for file events.
31204 + 7.26.1. Waiting for Modem Signals
31206 + The previous syntax:
31208 + WAIT time { CD, DSR, RTS, RI, ... }
31212 + WAIT time MODEM-SIGNALS { CD, DSR, RTS, RI, ... }
31214 + However, the previous syntax is still accepted. The behavior is the
31215 + same in either case.
31216 + _________________________________________________________________
31218 + 7.26.2. Waiting for File Events
31220 + The new WAIT option:
31222 + WAIT time FILE { CREATION, DELETION, MODIFICATION } filename
31224 + lets you tell Kermit to wait the given amount of time (or until the
31225 + given time of day) for a file whose name is filename to be created,
31226 + deleted, or modified, respectively. The filename may not contain
31227 + wildcards. If the specified event does not occur within the time
31228 + limit, or if WAIT CANCELLATION is ON and you interrupt from the
31229 + keyboard before the time is up, the WAIT command fails. If the event
31230 + is MODIFICATION and the file does not exist, the command fails.
31231 + Otherwise, if the given event occurs within the time limit, the
31232 + command succeeds. Examples:
31234 + WAIT 600 FILE DELETION oofa.tmp
31235 + Wait up to 10 minutes for file oofa.tmp to disappear.
31237 + WAIT 23:59:59 FILE MOD orders.db
31238 + Wait until just before midnight for the orders.db file to be
31241 + Example: Suppose you want to have the current copy of /etc/motd on
31242 + your screen at all times, and you want to hear a bell whenever it
31245 + def \%f /etc/motd ; The file of interest.
31246 + while 1 { ; Loop forever...
31247 + cls ; Clear the screen.
31248 + echo \%f: \v(date) \v(time)... ; Print 2-line heading...
31250 + if ( not exist \%f ) { ; If file doesn't exist,
31251 + echo \%f does not exist... ; print message,
31252 + wait 600 file creat \%f ; and wait for it to appear.
31255 + beep ; Something new - beep.
31256 + type /head:\v(rows-2) \%f ; Display the file
31257 + if fail exit 1 \%f: \ferrstring() ; (checking for errors).
31258 + wait 999 file mod \%f ; Wait for it to change.
31261 + This notices when the file is created, deleted, or modified, and acts
31262 + only then (or when you interrupt it with); the time shown in the
31263 + heading is the time of the most recent event (including when the
31264 + program started).
31266 + See [625]Section 1.10, where the \v(kbchar) variable is explained.
31267 + This lets you modify a loop like the one above to also accept
31268 + single-character commands, which interrupt the WAIT, and dispatch
31269 + accordingly. For example:
31271 + wait 999 file mod \%f ; Wait for the file to change.
31272 + if defined \v(kbchar) { ; Interrupted from keyboard?
31273 + switch \v(kbchar) { ; Handle the keystroke...
31274 + :q, exit ; Q to Quit
31275 + :h, echo blah blah, break ; H for Help
31276 + :default, beep, continue ; Anything else beep and ignore
31280 + This lets you write event-driven applications that wait for up to
31281 + three events at once: a file or modem event, a timeout, and a
31283 + _________________________________________________________________
31285 + 7.27. Relaxed FOR and SWITCH Syntax
31287 + For consistency with the extended IF and WHILE syntax, the FOR and
31288 + SWITCH control lists may (but need not be) enclosed in parentheses:
31290 + FOR ( \%i 1 \%n 1 ) { command-list... }
31291 + SWITCH ( \%c ) { command-list... }
31293 + In the FOR command, the increment item can be omitted if the control
31294 + list is enclosed in parentheses, in which case the increment defaults
31295 + appropriately to 1 or -1, depending on the values of the first two
31298 + As with IF, the parentheses around the FOR-command control list must
31299 + be set off by spaces (in the SWITCH command, the spaces are not
31300 + required since the SWITCH expression is a single arithmetic
31303 + Also, outer braces around the command list are supplied automatically
31304 + if you omit them, e.g.:
31306 + FOR ( \%i 1 %n 1 ) echo \%i
31307 + _________________________________________________________________
31309 + 8. USING OTHER FILE TRANSFER PROTOCOLS
31311 + In C-Kermit 7.0, alternative protocols can be selected using switches.
31312 + Switches are described in [626]Section 1.5; the use of
31313 + protocol-selection switches is described in [627]Section 4.7.1.
31316 + send /binary /protocol:zmodem x.tar.gz
31318 + Note that file transfer recovery works only with Kermit and Zmodem
31319 + protocols. With Zmodem, recovery can be initiated only by the sender.
31321 + Only pre-1988 versions of the publicly-distributed sz/rz programs use
31322 + Standard I/O; those released later than that do not use Standard I/O
31323 + and therefore do not work with REDIRECT. However, Omen Technology does
31324 + offer an up-to-date redirectable version called crzsz, which must be
31325 + licensed for use:
31327 + "Unix Crz and Csz support XMODEM, YMODEM, and ZMODEM transfers when
31328 + called by dial-out programs such as Kermit and certain versions of
31329 + cu(1). They are clients designed for this use.
31331 + "Crz and Csz are Copyrighted shareware programs. Use of these
31332 + programs beyond a brief evaluation period requires registration.
31333 + Please print the "mailer.rz" file, fill out the form and return
31334 + same with your registration."
31336 + To use the crzsz programs as your external XYZMODEM programs in
31337 + C-Kermit, follow the instructions in the book, but put a "c" before
31338 + each command, e.g.:
31340 + set protocol zmodem {csz %s} {csz -a %s} crz crz crz crz
31342 + To use Zmodem protocol over Telnet or other non-transparent
31343 + connections, you might need to add the -e (Escape) option:
31345 + set protocol zmodem {csz -e %s} {csz -e -a %s} crz crz crz crz
31346 + _________________________________________________________________
31348 + 9. COMMAND-LINE OPTIONS
31350 + 9.0. Extended-Format Command-Line Options
31352 + Standard UNIX command line options are a single letter. C-Kermit has
31353 + run out of letters, so new options are in a new extended format:
31357 + where a keyword (rather than a single letter) specifies the function,
31358 + and if an argument is to be included, it is separated by a colon (or
31359 + equal sign). Most of the new extended-format command-line options are
31360 + only for use with the Internet Kermit Service Daemon; see the
31361 + [628]IKSD Administration Guide for details. However, several of them
31362 + are also general in nature:
31365 + Disables keyboard interrupts that are normally enabled, which
31366 + are usually Ctrl-C (to interrupt a command) and Ctrl-Z (UNIX
31367 + only, to suspend C-Kermit).
31370 + Lists the extended command-line options that are available in
31371 + your version of C-Kermit. If any options seem to be missing,
31372 + that is because your copy of C-Kermit was built with
31373 + compile-time options to deselect them.
31375 + --helpfile:filename
31376 + Specifies the name of a file to be displayed if the user types
31377 + HELP (not followed by a specific command or topic), in place of
31378 + the built-in top-level help text. The file need not fit on one
31379 + screen; more-prompting is used if the file is more than one
31380 + screen long if COMMAND MORE-PROMPTING is ON, as it is by
31383 + --bannerfile:filename
31384 + The name of a file containing a message to be printed after the
31385 + user logs in, in place of the normal message (Copyright notice,
31386 + "Type HELP or ? for help", "Default transfer mode is...", etc).
31388 + --cdmessage:{on,off,0,1,2}
31389 + For use in the Server-Side Server configuration; whenever the
31390 + client tells the server to change directory, the server sends
31391 + the contents of a "read me" file to the client's screen. This
31392 + feature is On by default, and operates only in client/server
31393 + mode when ON or 1. If set to 2 or higher, it also operates when
31394 + the CD command is given at the IKSD> prompt. Synonym: --cdmsg.
31396 + --cdfile:filename
31397 + When cdmessage is on, this is the name of the "read me" file to
31398 + be sent. Normally you would specify a relative (not absolute)
31399 + name, since the file is opened using the literal name you
31400 + specified, after changing to the new directory. Example:
31404 + You can also give a list of up to 8 filenames by (a) enclosing
31405 + each filename in braces, and (b) enclosing the entire list in
31407 + --cdfile:{{./.readme}{READ.ME}{aaareadme.txt}{README}{read-this
31408 + -first}} When a list is given, it is searched from left to
31409 + right and the first file found is displayed. The default list
31412 + {{./.readme}{README.TXT}{READ.ME}}
31413 + _________________________________________________________________
31415 + 9.1. Command Line Personalities
31417 + Beginning in version 7.0, if the C-Kermit binary is renamed to
31418 + "telnet" (or TELNET.EXE, telnet.pr, etc, depending on the platform),
31419 + it accepts the Telnet command line:
31421 + telnet [ host [ port ] ]
31423 + In Unix, you can achieve the same effect with a symlink:
31426 + mv telnet oldtelnet
31427 + ln -ls /usr/local/bin/kermit telnet
31429 + When installed in this manner, C-Kermit always reads its
31430 + initialization file. If no host (and therefore no port) is given,
31431 + C-Kermit starts in interactive prompting mode. If a host is given as
31432 + the first command-line argument, C-Kermit makes a connection to it.
31433 + The host argument can be an IP host name or address, or the name of a
31434 + TCP/IP entry in your C-Kermit network directory.
31436 + If a port is given, it is used. If a port is not given, then if the
31437 + hostname was found in your network directory and port was also listed
31438 + there, then that port is used. Otherwise port 23 (the Telnet port) is
31441 + When C-Kermit is called "telnet" and it is invoked with a hostname on
31442 + the command line, it exits automatically when the connection is
31443 + closed. While the connection is open, however, you may escape back and
31444 + forth as many times as you like, transfer files, etc.
31446 + An rlogin personality is also available, but it is less useful, at
31447 + least in UNIX and VMS, where the Rlogin TCP port is privileged.
31449 + The new variable \v(name) indicates the name with which C-Kermit was
31450 + invoked ("kermit", "wermit", "k95", "telnet", etc).
31451 + _________________________________________________________________
31453 + 9.2. Built-in Help for Command Line Options
31455 + "kermit -h", given from the system prompt, lists as many command-line
31456 + options as will fit on a standard 24x80 screen. For more comprehensive
31457 + help, use the interactive HELP OPTIONS command that was added in
31461 + Explains how command-line options work, their syntax, etc.
31464 + Lists all command-line options and gives brief help about each one.
31467 + Gives brief help about option "x".
31469 + HELP EXTENDED-OPTIONS
31470 + Lists the available extended-format command-line options.
31472 + HELP EXTENDED-OPTION xxx
31473 + Gives help for the specified extended option.
31474 + _________________________________________________________________
31476 + 9.3. New Command-Line Options
31478 + Command-line options added since C-Kermit 6.0 are:
31481 + (plus sign by itself): The next argument is the name of a
31482 + script to execute; all subsequent arguments are ignored by
31483 + C-Kermit itself, but passed to the script as top-level copies
31484 + of \%1, \%2, etc; the \&_[] is also set accordingly. \%0 and
31485 + \&_[0] become the name of the script file, rather than the
31486 + pathname of the C-Kermit program, which is its normal value.
31487 + Primarily for use in the top line of "Kerbang" scripts in UNIX
31488 + (see [629]Section 7.19). Example from UNIX command line:
31490 + $ kermit [ regular kermit args ] + filename
31492 + Sample first line of Kerbang script:
31494 + #!/usr/local/bin/kermit +
31497 + (two hyphens surrounded by whitespace) Equivalent to "=", for
31498 + compatibility with UNIX getopt(1,3).
31501 + GET (like -g), but send the incoming file to standard output.
31502 + Example: "kermit -G oofa.txt | lpr" retrieves a file from your
31503 + local computer (providing it is running a Kermit program that
31504 + supports the autodownload feature and has it enabled) and
31508 + equivalent to -x (start up in server mode), but exits after the
31509 + first client command has been executed (mnemonic: O = Only
31510 + One). This one is handy replacing "kermit -x" in the
31511 + "automatically start Kermit on the other end" string:
31513 + set protocol kermit {kermit -ir} {kermit -r} {kermit -x}
31515 + since -x leaves the remote Kermit in server mode after the
31516 + transfer, which can be confusing, whereas -O makes it go away
31517 + automatically after the transfer.
31520 + Recursive, when used in combination with -s (mnemonic: L =
31521 + Levels). In UNIX or other environments where the shell expands
31522 + wildcards itself, the -s argument, if it contains wildcards,
31523 + must be quoted to prevent this, e.g.:
31525 + kermit -L -s "*.c"
31527 + In UNIX only, "kermit -L -s ." means to send the current
31528 + directory tree. See [630]Sections 4.10 and [631]4.11 about
31529 + recursive file transfer.
31532 + Equivalent to SET FILE PATTERNS OFF ([632]Section 4.3) and SET
31533 + TRANSFER MODE MANUAL. In other words, take the FILE TYPE
31534 + setting literally. For example, "kermit -VT oofa.bin" means
31535 + send the file in Text mode, no matter what its name is and no
31536 + matter whether a kindred spirit is recognized at the other end
31537 + of the connection.
31540 + (digit zero) means "be 100% transparent in CONNECT mode". This
31541 + is equivalent to the following series of commands: SET PARITY
31542 + NONE, SET COMMAND BYTESIZE 8, SET TERMINAL BYTESIZE 8, SET FLOW
31543 + NONE, SET TERM ESCAPE DISABLED, SET TERM CHAR TRANSPARENT, SET
31544 + TERM AUTODOWNLOAD OFF, SET TERM APC OFF, SET TELOPT KERMIT
31546 + _________________________________________________________________
31548 + 10. C-KERMIT AND G-KERMIT
31550 + Every multifunctioned and long-lived software program grows in
31551 + complexity and size over time to meet the needs and requests of its
31552 + users and the demands of the underlying technology as it changes.
31554 + Eventually users begin to notice how big the application has grown,
31555 + how much disk space it occupies, how long it takes to load, and they
31556 + start to long for the good old days when it was lean and mean. Not
31557 + long after that they begin asking for a "light" version that only does
31558 + the basics with no frills.
31560 + And so it is with C-Kermit. A "light" version of Kermit was released
31561 + (for UNIX only) in December 1999 under the GNU General Public License;
31562 + thus it is called G-Kermit (for GNU Kermit). All it does is send and
31563 + receive files, period. You can find it at:
31565 + [633]http://www.columbia.edu/kermit/gkermit.html
31567 + Where the C-Kermit 7.0 binary might be anywhere from 1 to 3 million
31568 + bytes in size, the G-Kermit binary ranges from 30K to 100K, depending
31569 + on the underlying architecture (RISC vs CISC, etc).
31571 + G-Kermit and C-Kermit may reside side-by-side on the same computer.
31572 + G-Kermit does not make connections; it does not have a script
31573 + language; it does not translate character sets. G-Kermit may be used
31574 + instead of C-Kermit when:
31576 + * It is on the remote end.
31577 + * Files are to be transferred in binary mode or in text mode without
31578 + character-set translation.
31579 + * File timestamps don't need to be preserved.
31581 + In such cases G-Kermit might be preferred since it generally starts up
31582 + faster, and yet transfers files just as fast on most (but not
31583 + necessarily all) kinds of connections; for example, it supports
31584 + streaming ([634]Section 4.20).
31586 + G-Kermit is also handy for bootstrapping. It is easier to load on a
31587 + new computer than C-Kermit -- it fits on a floppy diskette with plenty
31588 + of room to spare. Thus if you have (say) an old PC running (say) SCO
31589 + Xenix and no network connection, you can download the Xenix version of
31590 + G-Kermit to (say) a DOS or Windows PC, copy it to diskette, read the
31591 + diskette on Xenix with "dosread", and then use G-Kermit to receive
31592 + C-Kermit (which does not fit on a diskette). If diskettes aren't an
31593 + option, other bootstrapping methods are possible too -- see the
31594 + [635]G-Kermit web page for details.
31595 + _________________________________________________________________
31599 + III.1. Character Set Tables
31601 + III.1.1. The Hewlett Packard Roman8 Character Set
31603 +dec col/row oct hex description
31604 +160 10/00 240 A0 (Undefined)
31605 +161 10/01 241 A1 A grave
31606 +162 10/02 242 A2 A circumflex
31607 +163 10/03 243 A3 E grave
31608 +164 10/04 244 A4 E circumflex
31609 +165 10/05 245 A5 E diaeresis
31610 +166 10/06 246 A6 I circumflex
31611 +167 10/07 247 A7 I diaeresis
31612 +168 10/08 250 A8 Acute accent
31613 +169 10/09 251 A9 Grave accent
31614 +170 10/10 252 AA Circumflex accent
31615 +171 10/11 253 AB Diaeresis
31616 +172 10/12 254 AC Tilde accent
31617 +173 10/13 255 AD U grave
31618 +174 10/14 256 AE U circumflex
31619 +175 10/15 257 AF Lira symbol
31620 +176 11/00 260 B0 Top bar (macron)
31621 +177 11/01 261 B1 Y acute
31622 +178 11/02 262 B2 y acute
31623 +179 11/03 263 B3 Degree Sign
31624 +180 11/04 264 B4 C cedilla
31625 +181 11/05 265 B5 c cedilla
31626 +182 11/06 266 B6 N tilde
31627 +183 11/07 267 B7 n tilde
31628 +184 11/08 270 B8 Inverted exclamation mark
31629 +185 11/09 271 B9 Inverted question mark
31630 +186 11/10 272 BA Currency symbol
31631 +187 11/11 273 BB Pound sterling symbol
31632 +188 11/12 274 BC Yen symbol
31633 +189 11/13 275 BD Paragraph
31634 +190 11/14 276 BE Florin (Guilder) symbol
31635 +191 11/15 277 BF Cent symbol
31636 +192 12/00 300 C0 a circumflex
31637 +193 12/01 301 C1 e circumflex
31638 +194 12/02 302 C2 o circumflex
31639 +195 12/03 303 C3 u circumflex
31640 +196 12/04 304 C4 a acute
31641 +197 12/05 305 C5 e acute
31642 +198 12/06 306 C6 o acute
31643 +199 12/07 307 C7 u acute
31644 +200 12/08 310 C8 a grave
31645 +201 12/09 311 C9 e grave
31646 +202 12/10 312 CA o grave
31647 +203 12/11 313 CB u grave
31648 +204 12/12 314 CC a diaeresis
31649 +205 12/13 315 CD e diaeresis
31650 +206 12/14 316 CE o diaeresis
31651 +207 12/15 317 CF u diaeresis
31652 +208 13/00 320 D0 A ring
31653 +209 13/01 321 D1 i circumflex
31654 +210 13/02 322 D2 O with stroke
31655 +211 13/03 323 D3 AE digraph
31656 +212 13/04 324 D4 a ring
31657 +213 13/05 325 D5 i acute
31658 +214 13/06 326 D6 o with stroke
31659 +215 13/07 327 D7 ae digraph
31660 +216 13/08 330 D8 A diaeresis
31661 +217 13/09 331 D9 i grave
31662 +218 13/10 332 DA O diaeresis
31663 +219 13/11 333 DB U diaeresis
31664 +220 13/12 334 DC E acute
31665 +221 13/13 335 DD i diaeresis
31666 +222 13/14 336 DE German sharp s
31667 +223 13/15 337 DF O circumflex
31668 +224 14/00 340 E0 A acute
31669 +225 14/01 341 E1 A tilde
31670 +226 14/02 342 E2 a tilde
31671 +227 14/03 343 E3 Icelandic Eth
31672 +228 14/04 344 E4 Icelandic eth
31673 +229 14/05 345 E5 I acute
31674 +230 14/06 346 E6 I grave
31675 +231 14/07 347 E7 O acute
31676 +232 14/08 350 E8 O grave
31677 +233 14/09 351 E9 O tilde
31678 +234 14/10 352 EA o tilde
31679 +235 14/11 353 EB S caron
31680 +236 14/12 354 EC s caron
31681 +237 14/13 355 ED U acute
31682 +238 14/14 356 EE Y diaeresis
31683 +239 14/15 357 EF y diaeresis
31684 +240 15/00 360 F0 Icelandic Thorn
31685 +241 15/01 361 F1 Icelandic thorn
31686 +242 15/02 362 F2 Middle dot
31687 +243 15/03 363 F3 Greek mu
31688 +244 15/04 364 F4 Pilcrow sign
31689 +245 15/05 365 F5 Fraction 3/4
31690 +246 15/06 366 F6 Long dash, horizontal bar
31691 +247 15/07 367 F7 Fraction 1/4
31692 +248 15/08 370 F8 Fraction 1/2
31693 +249 15/09 371 F9 Feminine ordinal
31694 +250 15/10 372 FA Masculine ordinal
31695 +251 15/11 373 FB Left guillemot
31696 +252 15/12 374 FC Solid box
31697 +253 15/13 375 FD Right guillemot
31698 +254 15/14 376 FE Plus or minus sign
31699 +255 15/15 377 FF (Undefined)
31700 + _________________________________________________________________
31702 + III.1.2. Greek Character Sets
31704 + III.1.2.1. The ISO 8859-7 Latin / Greek Alphabet = ELOT 928
31706 +dec col/row oct hex description
31707 +160 10/00 240 A0 No-break space
31708 +161 10/01 241 A1 Left single quotation mark
31709 +162 10/02 242 A2 right single quotation mark
31710 +163 10/03 243 A3 Pound sign
31711 +164 10/04 244 A4 (UNUSED)
31712 +165 10/05 245 A5 (UNUSED)
31713 +166 10/06 246 A6 Broken bar
31714 +167 10/07 247 A7 Paragraph sign
31715 +168 10/08 250 A8 Diaeresis (Dialytika)
31716 +169 10/09 251 A9 Copyright sign
31717 +170 10/10 252 AA (UNUSED)
31718 +171 10/11 253 AB Left angle quotation
31719 +172 10/12 254 AC Not sign
31720 +173 10/13 255 AD Soft hyphen
31721 +174 10/14 256 AE (UNUSED)
31722 +175 10/15 257 AF Horizontal bar (Parenthetiki pavla)
31723 +176 11/00 260 B0 Degree sign
31724 +177 11/01 261 B1 Plus-minus sign
31725 +178 11/02 262 B2 Superscript two
31726 +179 11/03 263 B3 Superscript three
31727 +180 11/04 264 B4 Accent (tonos)
31728 +181 11/05 265 B5 Diaeresis and accent (Dialytika and Tonos)
31729 +182 11/06 266 B6 Alpha with accent
31730 +183 11/07 267 B7 Middle dot (Ano Teleia)
31731 +184 11/08 270 B8 Epsilon with accent
31732 +185 11/09 271 B9 Eta with accent
31733 +186 11/10 272 BA Iota with accent
31734 +187 11/11 273 BB Right angle quotation
31735 +188 11/12 274 BC Omicron with accent
31736 +189 11/13 275 BD One half
31737 +190 11/14 276 BE Upsilon with accent
31738 +191 11/15 277 BF Omega with accent
31739 +192 12/00 300 C0 iota with diaeresis and accent
31740 +193 12/01 301 C1 Alpha
31741 +194 12/02 302 C2 Beta
31742 +195 12/03 303 C3 Gamma
31743 +196 12/04 304 C4 Delta
31744 +197 12/05 305 C5 Epsilon
31745 +198 12/06 306 C6 Zeta
31746 +199 12/07 307 C7 Eta
31747 +200 12/08 310 C8 Theta
31748 +201 12/09 311 C9 Iota
31749 +202 12/10 312 CA Kappa
31750 +203 12/11 313 CB Lamda
31751 +204 12/12 314 CC Mu
31752 +205 12/13 315 CD Nu
31753 +206 12/14 316 CE Ksi
31754 +207 12/15 317 CF Omicron
31755 +208 13/00 320 D0 Pi
31756 +209 13/01 321 D1 Rho
31757 +210 13/02 322 D2 (UNUSED)
31758 +211 13/03 323 D3 Sigma
31759 +212 13/04 324 D4 Tau
31760 +213 13/05 325 D5 Upsilon
31761 +214 13/06 326 D6 Phi
31762 +215 13/07 327 D7 Khi
31763 +216 13/08 330 D8 Psi
31764 +217 13/09 331 D9 Omega
31765 +218 13/10 332 DA Iota with diaeresis
31766 +219 13/11 333 DB Upsilon with diaeresis
31767 +220 13/12 334 DC alpha with accent
31768 +221 13/13 335 DD epsilon with accent
31769 +222 13/14 336 DE eta with accent
31770 +223 13/15 337 DF iota with accent
31771 +224 14/00 340 E0 upsilon with diaeresis and accent
31772 +225 14/01 341 E1 alpha
31773 +226 14/02 342 E2 beta
31774 +227 14/03 343 E3 gamma
31775 +228 14/04 344 E4 delta
31776 +229 14/05 345 E5 epsilon
31777 +230 14/06 346 E6 zeta
31778 +231 14/07 347 E7 eta
31779 +232 14/08 350 E8 theta
31780 +233 14/09 351 E9 iota
31781 +234 14/10 352 EA kappa
31782 +235 14/11 353 EB lamda
31783 +236 14/12 354 EC mu
31784 +237 14/13 355 ED nu
31785 +238 14/14 356 EE ksi
31786 +239 14/15 357 EF omicron
31787 +240 15/00 360 F0 pi
31788 +241 15/01 361 F1 rho
31789 +242 15/02 362 F2 terminal sigma
31790 +243 15/03 363 F3 sigma
31791 +244 15/04 364 F4 tau
31792 +245 15/05 365 F5 upsilon
31793 +246 15/06 366 F6 phi
31794 +247 15/07 367 F7 khi
31795 +248 15/08 370 F8 psi
31796 +249 15/09 371 F9 omega
31797 +250 15/10 372 FA iota with diaeresis
31798 +251 15/11 373 FB upsilon with diaeresis
31799 +252 15/12 374 FC omicron with diaeresis
31800 +253 15/13 375 FD upsilon with accent
31801 +254 15/14 376 FE omega with accent
31802 +255 15/15 377 FF (UNUSED)
31803 + _________________________________________________________________
31805 + III.1.2.2. The ELOT 927 Character Set
31807 +dec col/row oct hex description
31808 + 32 02/00 40 20 SPACE
31809 + 33 02/01 41 21 EXCLAMATION MARK
31810 + 34 02/02 42 22 QUOTATION MARK
31811 + 35 02/03 43 23 NUMBER SIGN
31812 + 36 02/04 44 24 DOLLAR SIGN
31813 + 37 02/05 45 25 PERCENT SIGN
31814 + 38 02/06 46 26 AMPERSAND
31815 + 39 02/07 47 27 APOSTROPHE
31816 + 40 02/08 50 28 LEFT PARENTHESIS
31817 + 41 02/09 51 29 RIGHT PARENTHESIS
31818 + 42 02/10 52 2A ASTERISK
31819 + 43 02/11 53 2B PLUS SIGN
31820 + 44 02/12 54 2C COMMA
31821 + 45 02/13 55 2D HYPHEN, MINUS SIGN
31822 + 46 02/14 56 2E PERIOD, FULL STOP
31823 + 47 02/15 57 2F SOLIDUS, SLASH
31824 + 48 03/00 60 30 DIGIT ZERO
31825 + 49 03/01 61 31 DIGIT ONE
31826 + 50 03/02 62 32 DIGIT TWO
31827 + 51 03/03 63 33 DIGIT THREE
31828 + 52 03/04 64 34 DIGIT FOUR
31829 + 53 03/05 65 35 DIGIT FIVE
31830 + 54 03/06 66 36 DIGIT SIX
31831 + 55 03/07 67 37 DIGIT SEVEN
31832 + 56 03/08 70 38 DIGIT EIGHT
31833 + 57 03/09 71 39 DIGIT NINE
31834 + 58 03/10 72 3A COLON
31835 + 59 03/11 73 3B SEMICOLON
31836 + 60 03/12 74 3C LESS-THAN SIGN, LEFT ANGLE BRACKET
31837 + 61 03/13 75 3D EQUALS SIGN
31838 + 62 03/14 76 3E GREATER-THAN SIGN, RIGHT ANGLE BRACKET
31839 + 63 03/15 77 3F QUESTION MARK
31840 + 64 04/00 100 40 COMMERCIAL AT SIGN
31841 + 65 04/01 101 41 CAPITAL LETTER A
31842 + 66 04/02 102 42 CAPITAL LETTER B
31843 + 67 04/03 103 43 CAPITAL LETTER C
31844 + 68 04/04 104 44 CAPITAL LETTER D
31845 + 69 04/05 105 45 CAPITAL LETTER E
31846 + 70 04/06 106 46 CAPITAL LETTER F
31847 + 71 04/07 107 47 CAPITAL LETTER G
31848 + 72 04/08 110 48 CAPITAL LETTER H
31849 + 73 04/09 111 49 CAPITAL LETTER I
31850 + 74 04/10 112 4A CAPITAL LETTER J
31851 + 75 04/11 113 4B CAPITAL LETTER K
31852 + 76 04/12 114 4C CAPITAL LETTER L
31853 + 77 04/13 115 4D CAPITAL LETTER M
31854 + 78 04/14 116 4E CAPITAL LETTER N
31855 + 79 04/15 117 4F CAPITAL LETTER O
31856 + 80 05/00 120 50 CAPITAL LETTER P
31857 + 81 05/01 121 51 CAPITAL LETTER Q
31858 + 82 05/02 122 52 CAPITAL LETTER R
31859 + 83 05/03 123 53 CAPITAL LETTER S
31860 + 84 05/04 124 54 CAPITAL LETTER T
31861 + 85 05/05 125 55 CAPITAL LETTER U
31862 + 86 05/06 126 56 CAPITAL LETTER V
31863 + 87 05/07 127 57 CAPITAL LETTER W
31864 + 88 05/08 130 58 CAPITAL LETTER X
31865 + 89 05/09 131 59 CAPITAL LETTER Y
31866 + 90 05/10 132 5A CAPITAL LETTER Z
31867 + 91 05/11 133 5B LEFT SQUARE BRACKET
31868 + 92 05/12 134 5C REVERSE SOLIDUS, BACKSLASH
31869 + 93 05/13 135 5D RIGHT SQUARE BRACKET
31870 + 94 05/14 136 5E CIRCUMFLEX ACCENT
31871 + 95 05/15 137 5F UNDERSCORE
31872 + 96 06/00 140 60 ACCENT GRAVE
31873 + 97 06/01 141 61 GREEK LETTER ALPHA
31874 + 98 06/02 142 62 GREEK LETTER BETA
31875 + 99 06/03 143 63 GREEK LETTER GAMMA
31876 +100 06/04 144 64 GREEK LETTER DELTA
31877 +101 06/05 145 65 GREEK LETTER EPSILON
31878 +102 06/06 146 66 GREEK LETTER ZETA
31879 +103 06/07 147 67 GREEK LETTER ETA
31880 +104 06/08 150 68 GREEK LETTER THETA
31881 +105 06/09 151 69 GREEK LETTER IOTA
31882 +106 06/10 152 6A GREEK LETTER KAPPA
31883 +107 06/11 153 6B GREEK LETTER LAMDA
31884 +108 06/12 154 6C GREEK LETTER MU
31885 +109 06/13 155 6D GREEK LETTER NU
31886 +110 06/14 156 6E GREEK LETTER KSI
31887 +111 06/15 157 6F GREEK LETTER OMICRON
31888 +112 07/00 160 70 GREEK LETTER PI
31889 +113 07/01 161 71 GREEK LETTER RHO
31890 +114 07/02 162 72 GREEK LETTER SIGMA
31891 +115 07/03 163 73 GREEK LETTER TAU
31892 +116 07/04 164 74 GREEK LETTER UPSILON
31893 +117 07/05 165 75 GREEK LETTER FI
31894 +118 07/06 166 76 GREEK LETTER XI
31895 +119 07/07 167 77 GREEK LETTER PSI
31896 +120 07/08 170 78 GREEK LETTER OMEGA
31897 +121 07/09 171 79 SPACE
31898 +122 07/10 172 7A SPACE
31899 +123 07/11 173 7B LEFT CURLY BRACKET, LEFT BRACE
31900 +124 07/12 174 7C VERTICAL LINE, VERTICAL BAR
31901 +125 07/13 175 7D RIGHT CURLY BRACKET, RIGHT BRACE
31902 +126 07/14 176 7E TILDE
31903 +127 07/15 177 7F RUBOUT, DELETE
31904 + _________________________________________________________________
31906 + III.1.2.3. PC Code Page 869
31908 + (to be filled in...)
31909 + _________________________________________________________________
31911 + III.2. Updated Country Codes
31913 + Date: Mon, 7 Apr 1997 23:23:49 EDT
31914 + From: Dave Leibold <dleibold@else.net>
31915 + Newsgroups: comp.dcom.telecom
31916 + Subject: Ex-USSR Country Codes Profile
31917 + Organization: TELECOM Digest
31919 + Ex-USSR Country Codes Profile
31922 + Below is a summary of the country codes that have formed in the wake
31923 + of the USSR dissolution, along with some updated findings and reports.
31924 + Additional or corrected information on any of these nations would be
31925 + welcome (c/o dleibold@else.net).
31926 + * Kyrgyz Republic country code 996 will take effect, at least in
31927 + Canada, effective 1 May 1997, according to CRTC Telecom Order
31928 + 97-464, based on Stentor Tariff Notice 433. There is no indication
31929 + whether there will be a permissive dialing period involved or for
31930 + how long such a permissive operation would remain.
31931 + * Country code 992 was reported as a recent assignment for
31932 + Tajikistan, which will be moving from country code 7 at some
31934 + * Uzbekistan has its own country code assignment, but I have no
31935 + information if this is in service yet or what implementation dates
31937 + * Kazakstan does not have a known separate country code assignment
31938 + at present. It remains in country code 7 for the time being.
31939 + * Russia seems destined to keep country code 7.
31940 + * Recent news reports speak of some agreements forming between
31941 + Russia and Belarus. While there is no outright reunification yet,
31942 + there is expected to be much closer ties between the two nations.
31943 + Whether this will lead to a reunification of telephone codes
31944 + remains to be seen.
31946 + In the table, "Effective" means the date at which the country code
31947 + began service (which could vary according to the nation). "Mandatory"
31948 + means the date at which the country code 7 is invalid for calls to
31949 + that nation. There are a number of question marks since exact dates
31950 + have not been collected in all cases.
31952 +CC Nation Effective Mandatory Notes
31954 +370 Lithuania 1993? ??? Announced Jan 1993
31955 +371 Latvia 1993? ???
31956 +372 Estonia 1 Feb 1993? March 1993?
31957 +373 Moldova 1993? ??? Announced Jan 1993
31958 +374 Armenia 1 May 1995 1 July 1995 Announced Jan 1995 (ITU)
31959 +375 Belarus 16 Apr 1995 1997?
31960 +380 Ukraine 16 Apr 1995 Oct 1995?
31961 +7 Kazakstan (no known changes)
31962 +7 Russia (presumably not changing)
31963 +992 Tajikistan ??? ??? Announced 1996-7?
31964 +993 Turkmenistan 3 Jan 1997 3 Apr 1997 Canada as of 29 Nov 1996
31965 +994 Azerbaijan Sept 1994? ??? Announced 1992
31966 +995 Georgia 1994? ??? ref: Telecom Digest Oct 1994
31967 +996 Kyrgyz Republic 1 May 1997 ??? ref: Stentor Canada/CRTC
31968 +998 Uzbekistan ??? ??? Announced 1996? (ITU)
31970 + Details courtesy Toby Nixon, ITU, Stentor (Canada), CRTC (Canada),
31971 + TELECOM Digest (including information collected for the country code
31973 + _________________________________________________________________
31975 +IV. ERRATA & CORRIGENDA
31977 + The following errors in [636]Using C-Kermit, Second Edition, first
31978 + printing, have been noted.
31980 + First, some missing acknowledgements for C-Kermit 6.0: JE Jones of
31981 + Microware for help with OS-9, Nigel Roles for his help with Plan 9,
31982 + Lucas Hart for help with VMS and Digital UNIX, Igor Kovalenko for his
31983 + help with QNX. And later, to Susan Kleinmann for her help with Debian
31984 + Linux packaging; Patrick Volkerding for his help with Slackware Linux
31985 + packaging; Jim Knoble for his help with Red Hat Linux packaging; and
31986 + to dozens of others for sending individual C-Kermit binaries for
31987 + varied and diverse platforms.
31989 + Thanks to James Spath for both binaries and reporting many of the
31990 + typos noted below. Also to Dat Thuc Nguyen for spotting several typos.
31993 +COVER "COS" is a misprint. There is no COS. Pretend it says "SCO" or "VOS".
31994 + (This is fixed in the second printing.)
31995 + xxi Second line: Fred Smith's affiliation should be Computrition.
31996 + 83 Change "commands other" to "commands as other" (1st paragraph)
31997 + 87 Change "The the" to "The" (2nd paragraph)
31998 + 92 "set modem-type user-defined supra" should be "set modem type ..."
31999 + 95 Change "VI" to "vi" (1st paragraph)
32000 + 96 Change "it it" to "it is" (1st paragraph)
32001 + 97 Change "advantage a literal" to "advantage of a literal" (2nd
32003 +102 The call-waiting example would be better as SET DIAL PREFIX *70W
32004 + (rather than "*70,") because the former will not cause an incorrect
32005 + call to be placed with pulse dialing.
32006 +123 Third paragraph from bottom: "..otherwise if a your local username.."
32007 + should be "..otherwise your local username..".
32008 +160 Delete the "it" between "and" and "to" (2nd paragraph)
32009 +185 In "When TRANSFER DISPLAY is OFF, C-Kermit skips the display...",
32010 + "OFF" should be "NONE".
32011 +187 The last paragraph says the "A command" is ignored, should be "S".
32012 +194 Change "it known" to "it is known" (4th paragraph).
32013 +235 In C-Kermit 7.0, the syntax of the GET command changed. MGET now
32014 + must be used to get a list of files and there is no more multiline
32016 +268 Last paragraph: "effect" should be "affect".
32017 +275 In the SET PROTOCOL KERMIT description, the following sentence is
32018 + incorrect and should be removed: 'If you omit the commands, the
32019 + default ones are restored: "kermit -ir" and "kermit -r" respectively".
32020 + The correct information is given at the bottom of page 281.
32021 +279 9th line. The decimal value of ST is 156, not 155.
32022 +295 In the stepping stones, skip ahead to Chapter 17 on p. 327.
32023 +298 Table 16-2, Portuguese entry. Column 4/00 should show section sign,
32024 + not acute accent.
32025 +316 Other languages written in the Hebrew alphabet include Karaim (a Turkic
32026 + language spoken in Lithuania and Poland), Judeo-Kurdish, and Judeo-
32028 +332 UNDEFINE definition, change "This just" to "This is just".
32029 +344 It might be necessary to set the modem's pulse generation rate when
32030 + sending numeric pages; most Hayes compatible modems use the S11
32031 + register for this.
32032 +350 Delete "is" from between "It" and "ceases" (4th paragraph)
32033 +351 Top - both occurrences of "print \%a" should be "echo \%a".
32034 +364 \v(input) and \v(query) out of alphabetical order.
32035 +378 In the MYSEND macro, "if not \m(rc) goto bad" should be:
32036 + "if \m(rc) goto bad" (remove the "not").
32037 +382-383 It should be stated that the loop control variable must be of the \%a
32038 + type, or else an array element; macro names can not be used for this.
32039 +383 In line 3, "\%f[\%i]" should be "\&f[\%i]".
32040 +383 In the sort example, it should be stated that the array is 1-based.
32041 +387 Change "You can list" to "You can get a list" (5th paragraph)
32042 +393 \Fverify() description. The 3rd sentence could be stated more clearly
32043 + as "If all characters in string2 are also in string1, 0 is returned."
32044 +398 Copying \ffiles() results to an array before is not required as of
32045 + C-Kermit 7.0 (see [637]Section 7.3).
32046 +403 In "(\%a + 3) * (\%b 5)", a minus sign is missing between b and 5.
32047 +407 C-Kermit 7.0 no longer supports multiline GET. Change
32048 + "get, \%1, \%2" to "get {\%1} {\%2}" or "get /as:{\%2} {\%1}".
32049 +409 READ example while loop should be:
32050 + while success { echo \m(line), read line }
32051 +409 "WRITE file" should be "WRITE keyword" (you can't put a filename there)
32052 + (The same applies to WRITE-LINE / WRITELN).
32053 +414 \Funhexify() missing from Table 18-3.
32054 +425 MINPUT definition, change 2nd "text2" to "text3".
32055 +436 Several lines are missing from the UNIXLOGIN macro listing.
32056 + After the "xif fail" block, insert:
32058 + out \%1\13 ; Send username, carriage return
32059 + inp 5 Password: ; Wait 5 sec for this prompt
32060 + if fail end 1 No password prompt
32061 + pause ; Wait a sec
32062 + out \%2\13 ; Send password
32064 +440 Change "set terminal byteszie" to "set terminal bytesize".
32065 + Change "input Password:" to "input 10 Password".
32066 +448 Franchise script: "access line" should be "access \m(line)".
32067 +453 There are two incorrectly coded IF statements in the DELIVER macro
32068 + definition. Replace both occurrences of "if > \%1 \%3 {" with
32069 + "xif > \%i \%3 {" (replace "if" by "xif" and "\%1" with "\%i").
32070 +453 "the the" (last paragraph) should be "the".
32071 +454 EOT (last paragraph) is End of Transmission, not End of Text.
32072 +457 _DEFINE definition: "name constructed" should be "name is constructed".
32073 +457 "macro for and" (last paragraph) should be "macro and".
32074 +459 Should explain that \v(user) is a legal abbreviation of \v(userid).
32075 +480 Figure II-2 is backwards; the least-significant bit is transmitted
32076 + first, then up to the highest, and the parity bit last.
32077 +534 The VMS Appendix section on Odd Record Lengths no longer applies;
32078 + C-Kermit 7.0 handles odd record lengths as well as even ones.
32079 +559 Table VIII-3, Portuguese entry. Column 4/00 should show section sign,
32080 + not acute accent.
32081 +560-563 HP-Roman8 missing from Table VII-4; there wasn't room to squeeze it in.
32082 + It is listed in section II(6).
32083 +565 "d stroke" in Table VII-5 has the wrong appearance; the stem should
32084 + be upright. The letter shown in the table is actually a lowercase
32085 + Icelandic eth, which has a curved stem.
32086 +601-604 BeBox, BeOS, Plan 9, and probably others not listed in trademarks.
32087 +604 The words "SCRIBE TEXT FORMATTER" appear at the end of the last
32088 + sentence of the first paragraph of the Colophon. They should have
32089 + been in the Index.
32090 +Index: Missing entries: SET { SEND, RECEIVE } PATHNAMES, Call waiting, ...
32091 + \F() Page 605, add also 413-414
32102 + \v() built_in Page 606, add also 361-364
32103 + \v(_line) 354, 361
32104 + \v(apcactive) 361
32107 + \v(crc16) 357, 362
32108 + \v(d$xxx) add page 362
32109 + \v(dialnumber) 362
32110 + \v(dialresult) 362
32112 + \v(errstring) 362
32115 + \v(ipaddress) 363
32119 + \v(m_xxx) 94, 363
32123 + \v(speed) 356, 364
32128 + \v(fsize) at lower half page 606 should read \v(tfsize)
32133 + Figure II-5 on page 493. The pin assignments of the Mini Din-8
32134 + connector are not described anywhere. As noted in the text, these tend
32135 + to vary from vendor to vendor. One common arrangement is:
32137 + 1. HSKout (Handshake out -- definition depends on software)
32138 + 2. HSKin (Handshake in or external clock)
32146 + Note the "balanced pairs" for Receive Data (RxD) and Transmit Data
32147 + (TxD), and the utter lack of modem signals. These connectors follow
32148 + the RS-423 standard, rather than RS-232. In some arrangements, Pin 1
32149 + is used for DTR and Pin 2 for CD; in others Pin 1 is RTS and Pin 2 is
32152 + Please send reports of other errors to the authors, as well as
32153 + suggestions for improvements, additional index entries, and any other
32156 + [638]kermit@columbia.edu
32157 + _________________________________________________________________
32159 +APPENDIX V. ADDITIONAL COPYRIGHT NOTICES
32161 + The following copyrights cover some of the source code used in the
32162 + development of C-Kermit, Kermit 95, or Kermit 95 support libraries.
32164 +/*****************************************************************************/
32166 +/* Copyright (c) 1995 by Oy Online Solutions Ltd. */
32168 +/* Distribution of this source code is strictly forbbidden. Use of this */
32169 +/* source code is granted to the University of Columbia C-Kermit project */
32170 +/* to be distributed in binary format only. Please familiarize yourself */
32171 +/* with the accompanying LICENSE.P file. */
32173 +/*****************************************************************************/
32175 + used for Xmodem, Ymodem, and Zmodem protocol in Kermit 95 (p95.dll,
32177 + _________________________________________________________________
32179 + Copyright (c) 1997 Stanford University
32181 + The use of this software for revenue-generating purposes may require a
32182 + license from the owners of the underlying intellectual property.
32183 + Specifically, the SRP-3 protocol may not be used for
32184 + revenue-generating purposes without a license.
32186 + Within that constraint, permission to use, copy, modify, and
32187 + distribute this software and its documentation for any purpose is
32188 + hereby granted without fee, provided that the above copyright notices
32189 + and this permission notice appear in all copies of the software and
32190 + related documentation.
32192 + THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
32193 + EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
32194 + WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
32196 + IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
32197 + INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
32198 + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
32199 + ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
32200 + ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
32203 + Used for Secure Remote Password (TM) protocol (SRP) in C-Kermit,
32204 + Kermit 95 (k95.exe, k2.exe, k95crypt.dll, k2crypt.dll)
32205 + _________________________________________________________________
32207 + Copyright 1990 by the Massachusetts Institute of Technology. All
32210 + Export of this software from the United States of America may require
32211 + a specific license from the United States Government. It is the
32212 + responsibility of any person or organization contemplating export to
32213 + obtain such a license before exporting.
32215 + WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
32216 + distribute this software and its documentation for any purpose and
32217 + without fee is hereby granted, provided that the above copyright
32218 + notice appear in all copies and that both that copyright notice and
32219 + this permission notice appear in supporting documentation, and that
32220 + the name of M.I.T. not be used in advertising or publicity pertaining
32221 + to distribution of the software without specific, written prior
32222 + permission. M.I.T. makes no representations about the suitability of
32223 + this software for any purpose. It is provided "as is" without express
32224 + or implied warranty.
32226 + Used for Telnet Authentication Option, Telnet Encryption Option, and
32227 + Kerberos (TM) authentication in C-Kermit, Kermit 95 (k95.exe, k2.exe,
32228 + k95crypt.dll, k2crypt.dll)
32229 + _________________________________________________________________
32231 + Copyright (c) 1991, 1993 The Regents of the University of California.
32232 + All rights reserved.
32234 + Redistribution and use in source and binary forms, with or without
32235 + modification, are permitted provided that the following conditions are
32237 + 1. Redistributions of source code must retain the above copyright
32238 + notice, this list of conditions and the following disclaimer.
32239 + 2. Redistributions in binary form must reproduce the above copyright
32240 + notice, this list of conditions and the following disclaimer in
32241 + the documentation and/or other materials provided with the
32243 + 3. All advertising materials mentioning features or use of this
32244 + software must display the following acknowledgement:
32246 + This product includes software developed by the University of
32247 + California, Berkeley and its contributors.
32248 + 4. Neither the name of the University nor the names of its
32249 + contributors may be used to endorse or promote products derived
32250 + from this software without specific prior written permission.
32252 + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
32253 + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
32254 + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32255 + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
32256 + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32257 + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32258 + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
32259 + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
32260 + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
32261 + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
32262 + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32264 + Used for Telnet Authentication Option, Telnet Encryption Option, and
32265 + Kerberos (TM) authentication in C-Kermit, Kermit 95 (k95.exe, k2.exe,
32266 + k95crypt.dll, k2crypt.dll)
32267 + _________________________________________________________________
32269 + Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) All rights
32272 + This package is an DES implementation written by Eric Young
32273 + (eay@cryptsoft.com). The implementation was written so as to conform
32274 + with MIT's libdes.
32276 + This library is free for commercial and non-commercial use as long as
32277 + the following conditions are aheared to. The following conditions
32278 + apply to all code found in this distribution.
32280 + Copyright remains Eric Young's, and as such any Copyright notices in
32281 + the code are not to be removed. If this package is used in a product,
32282 + Eric Young should be given attribution as the author of that the SSL
32283 + library. This can be in the form of a textual message at program
32284 + startup or in documentation (online or textual) provided with the
32287 + Redistribution and use in source and binary forms, with or without
32288 + modification, are permitted provided that the following conditions are
32290 + 1. Redistributions of source code must retain the copyright notice,
32291 + this list of conditions and the following disclaimer.
32292 + 2. Redistributions in binary form must reproduce the above copyright
32293 + notice, this list of conditions and the following disclaimer in
32294 + the documentation and/or other materials provided with the
32296 + 3. All advertising materials mentioning features or use of this
32297 + software must display the following acknowledgement: This product
32298 + includes software developed by Eric Young (eay@cryptsoft.com)
32300 + THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR
32301 + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
32302 + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
32303 + DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
32304 + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32305 + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
32306 + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32307 + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
32308 + IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
32309 + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
32310 + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32312 + The license and distribution terms for any publically available
32313 + version or derivative of this code cannot be changed. i.e. this code
32314 + cannot simply be copied and put under another distrubution license
32315 + [including the GNU Public License.]
32317 + The reason behind this being stated in this direct manner is past
32318 + experience in code simply being copied and the attribution removed
32319 + from it and then being distributed as part of other packages. This
32320 + implementation was a non-trivial and unpaid effort.
32322 + Used DES encryption in Kermit 95 (k95crypt.dll, k2crypt.dll)
32323 + _________________________________________________________________
32325 + * This is version 1.1 of CryptoLib
32327 + * The authors of this software are Jack Lacy, Don Mitchell and Matt Blaze
32328 + * Copyright (c) 1991, 1992, 1993, 1994, 1995 by AT&T.
32329 + * Permission to use, copy, and modify this software without fee
32330 + * is hereby granted, provided that this entire notice is included in
32331 + * all copies of any software which is or includes a copy or
32332 + * modification of this software and in all copies of the supporting
32333 + * documentation for such software.
32336 + * Some of the algorithms in cryptolib may be covered by patents.
32337 + * It is the responsibility of the user to ensure that any required
32338 + * licenses are obtained.
32341 + * SOME PARTS OF CRYPTOLIB MAY BE RESTRICTED UNDER UNITED STATES EXPORT
32345 + * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
32346 + * WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR AT&T MAKE ANY
32347 + * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
32348 + * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
32350 + Used for Big Number library in Kermit 95 (k95crypt.dll, k2crypt.dll).
32352 + [ [639]Top ] [ [640]C-Kermit ] [ [641]Kermit Home ]
32353 + _________________________________________________________________
32355 + CKERMIT70.HTM / The Kermit Project / Columbia University / 8 Feb 2000
32359 + 1. http://www.columbia.edu/kermit/ckermit70.html#contents
32360 + 2. http://www.columbia.edu/kermit/ckermit.html
32361 + 3. http://www.columbia.edu/kermit/index.htm
32362 + 4. mailto:kermit-support@columbia.edu
32363 + 5. http://www.columbia.edu/kermit/
32364 + 6. http://www.kermit-project.org/
32365 + 7. http://www.columbia.nyc.ny.us/kermit/
32366 + 8. ftp://kermit.columbia.edu/kermit/f/COPYING.TXT
32367 + 9. ftp://kermit.columbia.edu/kermit/f/ckcmai.c
32368 + 10. http://www.columbia.edu/kermit/ckermit70.html#xv
32369 + 11. http://www.columbia.edu/kermit/ckb2.htm
32370 + 12. ftp://kermit.columbia.edu/kermit/f/ckcbwr.txt
32371 + 13. ftp://kermit.columbia.edu/kermit/f/ckubwr.txt
32372 + 14. ftp://kermit.columbia.edu/kermit/f/ckvbwr.txt
32373 + 15. ftp://kermit.columbia.edu/kermit/f/ckubwr.txt
32374 + 16. ftp://kermit.columbia.edu/kermit/f/ckermit70.txt
32375 + 17. ftp://kermit.columbia.edu/kermit/f/security.txt
32376 + 18. http://www.columbia.edu/kermit/security.htm
32377 + 19. ftp://kermit.columbia.edu/kermit/f/iksd.txt
32378 + 20. http://www.columbia.edu/kermit/iksd.htm
32379 + 21. http://www.columbia.edu/kermit/cuiksd.htm
32380 + 22. ftp://kermit.columbia.edu/kermit/f/telnet.txt
32381 + 23. http://www.columbia.edu/kermit/telnet.htm
32382 + 24. ftp://kermit.columbia.edu/kermit/f/COPYING.TXT
32383 + 25. http://www.columbia.edu/kermit/k95.html
32384 + 26. http://www.opensource.org/
32385 + 27. http://www.columbia.edu/kermit/ckb2.htm
32386 + 28. http://www.columbia.edu/kermit/ckermit70.html#xi
32387 + 29. http://www.columbia.edu/kermit/ckermit70.html#xii
32388 + 30. http://www.columbia.edu/kermit/ckermit70.html#x0
32389 + 31. http://www.columbia.edu/kermit/ckermit70.html#x1
32390 + 32. http://www.columbia.edu/kermit/ckermit70.html#x1.0
32391 + 33. http://www.columbia.edu/kermit/ckermit70.html#x1.1
32392 + 34. http://www.columbia.edu/kermit/ckermit70.html#x1.2
32393 + 35. http://www.columbia.edu/kermit/ckermit70.html#x1.3
32394 + 36. http://www.columbia.edu/kermit/ckermit70.html#x1.4
32395 + 37. http://www.columbia.edu/kermit/ckermit70.html#x1.5
32396 + 38. http://www.columbia.edu/kermit/ckermit70.html#x1.5.1
32397 + 39. http://www.columbia.edu/kermit/ckermit70.html#x1.5.2
32398 + 40. http://www.columbia.edu/kermit/ckermit70.html#x1.5.3
32399 + 41. http://www.columbia.edu/kermit/ckermit70.html#x1.5.4
32400 + 42. http://www.columbia.edu/kermit/ckermit70.html#x1.5.5
32401 + 43. http://www.columbia.edu/kermit/ckermit70.html#x1.6
32402 + 44. http://www.columbia.edu/kermit/ckermit70.html#x1.7
32403 + 45. http://www.columbia.edu/kermit/ckermit70.html#x1.8
32404 + 46. http://www.columbia.edu/kermit/ckermit70.html#x1.9
32405 + 47. http://www.columbia.edu/kermit/ckermit70.html#x1.10
32406 + 48. http://www.columbia.edu/kermit/ckermit70.html#x1.11
32407 + 49. http://www.columbia.edu/kermit/ckermit70.html#x1.11.1
32408 + 50. http://www.columbia.edu/kermit/ckermit70.html#x1.11.2
32409 + 51. http://www.columbia.edu/kermit/ckermit70.html#x1.11.3
32410 + 52. http://www.columbia.edu/kermit/ckermit70.html#x1.11.4
32411 + 53. http://www.columbia.edu/kermit/ckermit70.html#x1.11.5
32412 + 54. http://www.columbia.edu/kermit/ckermit70.html#x1.11.6
32413 + 55. http://www.columbia.edu/kermit/ckermit70.html#x1.11.7
32414 + 56. http://www.columbia.edu/kermit/ckermit70.html#x1.12
32415 + 57. http://www.columbia.edu/kermit/ckermit70.html#x1.13
32416 + 58. http://www.columbia.edu/kermit/ckermit70.html#x1.14
32417 + 59. http://www.columbia.edu/kermit/ckermit70.html#x1.15
32418 + 60. http://www.columbia.edu/kermit/ckermit70.html#x1.16
32419 + 61. http://www.columbia.edu/kermit/ckermit70.html#x1.17
32420 + 62. http://www.columbia.edu/kermit/ckermit70.html#x1.18
32421 + 63. http://www.columbia.edu/kermit/ckermit70.html#x1.19
32422 + 64. http://www.columbia.edu/kermit/ckermit70.html#x1.20
32423 + 65. http://www.columbia.edu/kermit/ckermit70.html#x1.21
32424 + 66. http://www.columbia.edu/kermit/ckermit70.html#x1.22
32425 + 67. http://www.columbia.edu/kermit/ckermit70.html#x1.22.1
32426 + 68. http://www.columbia.edu/kermit/ckermit70.html#x1.22.2
32427 + 69. http://www.columbia.edu/kermit/ckermit70.html#x1.22.3
32428 + 70. http://www.columbia.edu/kermit/ckermit70.html#x1.22.4
32429 + 71. http://www.columbia.edu/kermit/ckermit70.html#x1.22.5
32430 + 72. http://www.columbia.edu/kermit/ckermit70.html#x1.22.6
32431 + 73. http://www.columbia.edu/kermit/ckermit70.html#x1.22.7
32432 + 74. http://www.columbia.edu/kermit/ckermit70.html#x1.22.8
32433 + 75. http://www.columbia.edu/kermit/ckermit70.html#x1.23
32434 + 76. http://www.columbia.edu/kermit/ckermit70.html#x1.24
32435 + 77. http://www.columbia.edu/kermit/ckermit70.html#x2
32436 + 78. http://www.columbia.edu/kermit/ckermit70.html#x2.0
32437 + 79. http://www.columbia.edu/kermit/ckermit70.html#x2.1
32438 + 80. http://www.columbia.edu/kermit/ckermit70.html#x2.1.1
32439 + 81. http://www.columbia.edu/kermit/ckermit70.html#x2.1.2
32440 + 82. http://www.columbia.edu/kermit/ckermit70.html#x2.1.3
32441 + 83. http://www.columbia.edu/kermit/ckermit70.html#x2.1.4
32442 + 84. http://www.columbia.edu/kermit/ckermit70.html#x2.1.5
32443 + 85. http://www.columbia.edu/kermit/ckermit70.html#x2.1.6
32444 + 86. http://www.columbia.edu/kermit/ckermit70.html#x2.1.7
32445 + 87. http://www.columbia.edu/kermit/ckermit70.html#x2.1.8
32446 + 88. http://www.columbia.edu/kermit/ckermit70.html#x2.1.9
32447 + 89. http://www.columbia.edu/kermit/ckermit70.html#x2.1.10
32448 + 90. http://www.columbia.edu/kermit/ckermit70.html#x2.1.11
32449 + 91. http://www.columbia.edu/kermit/ckermit70.html#x2.1.12
32450 + 92. http://www.columbia.edu/kermit/ckermit70.html#x2.1.13
32451 + 93. http://www.columbia.edu/kermit/ckermit70.html#x2.1.14
32452 + 94. http://www.columbia.edu/kermit/ckermit70.html#x2.1.15
32453 + 95. http://www.columbia.edu/kermit/ckermit70.html#x2.1.16
32454 + 96. http://www.columbia.edu/kermit/ckermit70.html#x2.2
32455 + 97. http://www.columbia.edu/kermit/ckermit70.html#x2.2.1
32456 + 98. http://www.columbia.edu/kermit/ckermit70.html#x2.2.2
32457 + 99. http://www.columbia.edu/kermit/ckermit70.html#x2.3
32458 + 100. http://www.columbia.edu/kermit/ckermit70.html#x2.3.0
32459 + 101. http://www.columbia.edu/kermit/ckermit70.html#x2.3.1
32460 + 102. http://www.columbia.edu/kermit/ckermit70.html#x2.3.2
32461 + 103. http://www.columbia.edu/kermit/ckermit70.html#x2.3.3
32462 + 104. http://www.columbia.edu/kermit/ckermit70.html#x2.3.4
32463 + 105. http://www.columbia.edu/kermit/ckermit70.html#x2.3.5
32464 + 106. http://www.columbia.edu/kermit/ckermit70.html#x2.3.6
32465 + 107. http://www.columbia.edu/kermit/ckermit70.html#x2.4
32466 + 108. http://www.columbia.edu/kermit/ckermit70.html#x2.5
32467 + 109. http://www.columbia.edu/kermit/ckermit70.html#x2.6
32468 + 110. http://www.columbia.edu/kermit/ckermit70.html#x2.7
32469 + 111. http://www.columbia.edu/kermit/ckermit70.html#x2.7.0
32470 + 112. http://www.columbia.edu/kermit/ckermit70.html#x2.7.1
32471 + 113. http://www.columbia.edu/kermit/ckermit70.html#x2.7.2
32472 + 114. http://www.columbia.edu/kermit/ckermit70.html#x2.7.3
32473 + 115. http://www.columbia.edu/kermit/ckermit70.html#x2.7.4
32474 + 116. http://www.columbia.edu/kermit/ckermit70.html#x2.7.4.1
32475 + 117. http://www.columbia.edu/kermit/ckermit70.html#x2.7.4.2
32476 + 118. http://www.columbia.edu/kermit/ckermit70.html#x2.7.4.3
32477 + 119. http://www.columbia.edu/kermit/ckermit70.html#x2.7.4.4
32478 + 120. http://www.columbia.edu/kermit/ckermit70.html#x2.7.4.5
32479 + 121. http://www.columbia.edu/kermit/ckermit70.html#x2.8
32480 + 122. http://www.columbia.edu/kermit/ckermit70.html#x2.9
32481 + 123. http://www.columbia.edu/kermit/ckermit70.html#x2.9.1
32482 + 124. http://www.columbia.edu/kermit/ckermit70.html#x2.9.2
32483 + 125. http://www.columbia.edu/kermit/ckermit70.html#x2.10
32484 + 126. http://www.columbia.edu/kermit/ckermit70.html#x2.11
32485 + 127. http://www.columbia.edu/kermit/ckermit70.html#x2.12
32486 + 128. http://www.columbia.edu/kermit/ckermit70.html#x2.13
32487 + 129. http://www.columbia.edu/kermit/ckermit70.html#x2.14
32488 + 130. http://www.columbia.edu/kermit/ckermit70.html#x2.15
32489 + 131. http://www.columbia.edu/kermit/ckermit70.html#x3
32490 + 132. http://www.columbia.edu/kermit/ckermit70.html#x3.1
32491 + 133. http://www.columbia.edu/kermit/ckermit70.html#x3.2
32492 + 134. http://www.columbia.edu/kermit/ckermit70.html#x3.3
32493 + 135. http://www.columbia.edu/kermit/ckermit70.html#x3.4
32494 + 136. http://www.columbia.edu/kermit/ckermit70.html#x4
32495 + 137. http://www.columbia.edu/kermit/ckermit70.html#x4.0
32496 + 138. http://www.columbia.edu/kermit/ckermit70.html#x4.1
32497 + 139. http://www.columbia.edu/kermit/ckermit70.html#x4.1.1
32498 + 140. http://www.columbia.edu/kermit/ckermit70.html#x4.1.2
32499 + 141. http://www.columbia.edu/kermit/ckermit70.html#x4.1.3
32500 + 142. http://www.columbia.edu/kermit/ckermit70.html#x4.2
32501 + 143. http://www.columbia.edu/kermit/ckermit70.html#x4.2.1
32502 + 144. http://www.columbia.edu/kermit/ckermit70.html#x4.2.1.1
32503 + 145. http://www.columbia.edu/kermit/ckermit70.html#x4.2.1.2
32504 + 146. http://www.columbia.edu/kermit/ckermit70.html#x4.2.1.3
32505 + 147. http://www.columbia.edu/kermit/ckermit70.html#x4.2.2
32506 + 148. http://www.columbia.edu/kermit/ckermit70.html#x4.2.2.1
32507 + 149. http://www.columbia.edu/kermit/ckermit70.html#x4.2.2.2
32508 + 150. http://www.columbia.edu/kermit/ckermit70.html#x4.2.3
32509 + 151. http://www.columbia.edu/kermit/ckermit70.html#x4.2.3.1
32510 + 152. http://www.columbia.edu/kermit/ckermit70.html#x4.2.3.2
32511 + 153. http://www.columbia.edu/kermit/ckermit70.html#x4.2.4
32512 + 154. http://www.columbia.edu/kermit/ckermit70.html#x4.2.5
32513 + 155. http://www.columbia.edu/kermit/ckermit70.html#x4.2.6
32514 + 156. http://www.columbia.edu/kermit/ckermit70.html#x4.2.7
32515 + 157. http://www.columbia.edu/kermit/ckermit70.html#x4.2.8
32516 + 158. http://www.columbia.edu/kermit/ckermit70.html#x4.2.8.1
32517 + 159. http://www.columbia.edu/kermit/ckermit70.html#x4.2.8.2
32518 + 160. http://www.columbia.edu/kermit/ckermit70.html#x4.2.8.3
32519 + 161. http://www.columbia.edu/kermit/ckermit70.html#x4.2.8.4
32520 + 162. http://www.columbia.edu/kermit/ckermit70.html#x4.3
32521 + 163. http://www.columbia.edu/kermit/ckermit70.html#x4.3.1
32522 + 164. http://www.columbia.edu/kermit/ckermit70.html#x4.3.2
32523 + 165. http://www.columbia.edu/kermit/ckermit70.html#x4.3.3
32524 + 166. http://www.columbia.edu/kermit/ckermit70.html#x4.3.4
32525 + 167. http://www.columbia.edu/kermit/ckermit70.html#x4.4
32526 + 168. http://www.columbia.edu/kermit/ckermit70.html#x4.4.1
32527 + 169. http://www.columbia.edu/kermit/ckermit70.html#x4.4.1.1
32528 + 170. http://www.columbia.edu/kermit/ckermit70.html#x4.4.1.2
32529 + 171. http://www.columbia.edu/kermit/ckermit70.html#x4.4.2
32530 + 172. http://www.columbia.edu/kermit/ckermit70.html#x4.4.2.1
32531 + 173. http://www.columbia.edu/kermit/ckermit70.html#x4.4.2.1.1
32532 + 174. http://www.columbia.edu/kermit/ckermit70.html#x4.4.2.1.2
32533 + 175. http://www.columbia.edu/kermit/ckermit70.html#x4.4.2.2
32534 + 176. http://www.columbia.edu/kermit/ckermit70.html#x4.5
32535 + 177. http://www.columbia.edu/kermit/ckermit70.html#x4.5.1
32536 + 178. http://www.columbia.edu/kermit/ckermit70.html#x4.5.2
32537 + 179. http://www.columbia.edu/kermit/ckermit70.html#x4.5.2.1
32538 + 180. http://www.columbia.edu/kermit/ckermit70.html#x4.5.2.2
32539 + 181. http://www.columbia.edu/kermit/ckermit70.html#x4.5.3
32540 + 182. http://www.columbia.edu/kermit/ckermit70.html#x4.5.4
32541 + 183. http://www.columbia.edu/kermit/ckermit70.html#x4.6
32542 + 184. http://www.columbia.edu/kermit/ckermit70.html#x4.7
32543 + 185. http://www.columbia.edu/kermit/ckermit70.html#x4.7.1
32544 + 186. http://www.columbia.edu/kermit/ckermit70.html#x4.7.2
32545 + 187. http://www.columbia.edu/kermit/ckermit70.html#x4.7.3
32546 + 188. http://www.columbia.edu/kermit/ckermit70.html#x4.8
32547 + 189. http://www.columbia.edu/kermit/ckermit70.html#x4.8.1
32548 + 190. http://www.columbia.edu/kermit/ckermit70.html#x4.8.2
32549 + 191. http://www.columbia.edu/kermit/ckermit70.html#x4.9
32550 + 192. http://www.columbia.edu/kermit/ckermit70.html#x4.9.1
32551 + 193. http://www.columbia.edu/kermit/ckermit70.html#x4.9.2
32552 + 194. http://www.columbia.edu/kermit/ckermit70.html#x4.9.3
32553 + 195. http://www.columbia.edu/kermit/ckermit70.html#x4.10
32554 + 196. http://www.columbia.edu/kermit/ckermit70.html#x4.11
32555 + 197. http://www.columbia.edu/kermit/ckermit70.html#x4.11.1
32556 + 198. http://www.columbia.edu/kermit/ckermit70.html#x4.11.2
32557 + 199. http://www.columbia.edu/kermit/ckermit70.html#x4.11.3
32558 + 200. http://www.columbia.edu/kermit/ckermit70.html#x4.11.4
32559 + 201. http://www.columbia.edu/kermit/ckermit70.html#x4.11.5
32560 + 202. http://www.columbia.edu/kermit/ckermit70.html#x4.11.6
32561 + 203. http://www.columbia.edu/kermit/ckermit70.html#x4.12
32562 + 204. http://www.columbia.edu/kermit/ckermit70.html#x4.13
32563 + 205. http://www.columbia.edu/kermit/ckermit70.html#x4.14
32564 + 206. http://www.columbia.edu/kermit/ckermit70.html#x4.15
32565 + 207. http://www.columbia.edu/kermit/ckermit70.html#x4.16
32566 + 208. http://www.columbia.edu/kermit/ckermit70.html#x4.17
32567 + 209. http://www.columbia.edu/kermit/ckermit70.html#x4.17.1
32568 + 210. http://www.columbia.edu/kermit/ckermit70.html#x4.17.2
32569 + 211. http://www.columbia.edu/kermit/ckermit70.html#x4.18
32570 + 212. http://www.columbia.edu/kermit/ckermit70.html#x4.19
32571 + 213. http://www.columbia.edu/kermit/ckermit70.html#x4.20
32572 + 214. http://www.columbia.edu/kermit/ckermit70.html#x4.20.1
32573 + 215. http://www.columbia.edu/kermit/ckermit70.html#x4.20.2
32574 + 216. http://www.columbia.edu/kermit/ckermit70.html#x4.20.2.1
32575 + 217. http://www.columbia.edu/kermit/ckermit70.html#x4.20.2.2
32576 + 218. http://www.columbia.edu/kermit/ckermit70.html#x4.20.2.3
32577 + 219. http://www.columbia.edu/kermit/ckermit70.html#x4.20.2.4
32578 + 220. http://www.columbia.edu/kermit/ckermit70.html#x4.20.2.5
32579 + 221. http://www.columbia.edu/kermit/ckermit70.html#x4.20.3
32580 + 222. http://www.columbia.edu/kermit/ckermit70.html#x4.21
32581 + 223. http://www.columbia.edu/kermit/ckermit70.html#x4.22
32582 + 224. http://www.columbia.edu/kermit/ckermit70.html#x4.22.1
32583 + 225. http://www.columbia.edu/kermit/ckermit70.html#x4.22.2
32584 + 226. http://www.columbia.edu/kermit/ckermit70.html#x4.22.3
32585 + 227. http://www.columbia.edu/kermit/ckermit70.html#x4.22.4
32586 + 228. http://www.columbia.edu/kermit/ckermit70.html#x4.22.5
32587 + 229. http://www.columbia.edu/kermit/ckermit70.html#x4.22.6
32588 + 230. http://www.columbia.edu/kermit/ckermit70.html#x4.22.7
32589 + 231. http://www.columbia.edu/kermit/ckermit70.html#x4.22.8
32590 + 232. http://www.columbia.edu/kermit/ckermit70.html#x4.23
32591 + 233. http://www.columbia.edu/kermit/ckermit70.html#x4.24
32592 + 234. http://www.columbia.edu/kermit/ckermit70.html#x4.25
32593 + 235. http://www.columbia.edu/kermit/ckermit70.html#x5
32594 + 236. http://www.columbia.edu/kermit/ckermit70.html#x5.0
32595 + 237. http://www.columbia.edu/kermit/ckermit70.html#x5.1
32596 + 238. http://www.columbia.edu/kermit/ckermit70.html#x5.2
32597 + 239. http://www.columbia.edu/kermit/ckermit70.html#x5.3
32598 + 240. http://www.columbia.edu/kermit/ckermit70.html#x5.3.1
32599 + 241. http://www.columbia.edu/kermit/ckermit70.html#x5.3.2
32600 + 242. http://www.columbia.edu/kermit/ckermit70.html#x5.4
32601 + 243. http://www.columbia.edu/kermit/ckermit70.html#x5.5
32602 + 244. http://www.columbia.edu/kermit/ckermit70.html#x5.6
32603 + 245. http://www.columbia.edu/kermit/ckermit70.html#x5.7
32604 + 246. http://www.columbia.edu/kermit/ckermit70.html#x6
32605 + 247. http://www.columbia.edu/kermit/ckermit70.html#x6.0
32606 + 248. http://www.columbia.edu/kermit/ckermit70.html#x6.1
32607 + 249. http://www.columbia.edu/kermit/ckermit70.html#x6.2
32608 + 250. http://www.columbia.edu/kermit/ckermit70.html#x6.3
32609 + 251. http://www.columbia.edu/kermit/ckermit70.html#x6.4
32610 + 252. http://www.columbia.edu/kermit/ckermit70.html#x6.5
32611 + 253. http://www.columbia.edu/kermit/ckermit70.html#x6.6
32612 + 254. http://www.columbia.edu/kermit/ckermit70.html#x6.6.1
32613 + 255. http://www.columbia.edu/kermit/ckermit70.html#x6.6.2
32614 + 256. http://www.columbia.edu/kermit/ckermit70.html#x6.6.2
32615 + 257. http://www.columbia.edu/kermit/ckermit70.html#x6.6.3
32616 + 258. http://www.columbia.edu/kermit/ckermit70.html#x6.6.4
32617 + 259. http://www.columbia.edu/kermit/ckermit70.html#x6.6.5
32618 + 260. http://www.columbia.edu/kermit/ckermit70.html#x6.6.5.1
32619 + 261. http://www.columbia.edu/kermit/ckermit70.html#x6.6.5.2
32620 + 262. http://www.columbia.edu/kermit/ckermit70.html#x6.6.5.3
32621 + 263. http://www.columbia.edu/kermit/ckermit70.html#x6.6.5.4
32622 + 264. http://www.columbia.edu/kermit/ckermit70.html#x6.6.5.5
32623 + 265. http://www.columbia.edu/kermit/ckermit70.html#x6.7
32624 + 266. http://www.columbia.edu/kermit/ckermit70.html#x7
32625 + 267. http://www.columbia.edu/kermit/ckermit70.html#x7.0
32626 + 268. http://www.columbia.edu/kermit/ckermit70.html#x7.1
32627 + 269. http://www.columbia.edu/kermit/ckermit70.html#x7.1.1
32628 + 270. http://www.columbia.edu/kermit/ckermit70.html#x7.1.2
32629 + 271. http://www.columbia.edu/kermit/ckermit70.html#x7.1.3
32630 + 272. http://www.columbia.edu/kermit/ckermit70.html#x7.1.4
32631 + 273. http://www.columbia.edu/kermit/ckermit70.html#x7.2
32632 + 274. http://www.columbia.edu/kermit/ckermit70.html#x7.3
32633 + 275. http://www.columbia.edu/kermit/ckermit70.html#x7.4
32634 + 276. http://www.columbia.edu/kermit/ckermit70.html#x7.5
32635 + 277. http://www.columbia.edu/kermit/ckermit70.html#x7.6
32636 + 278. http://www.columbia.edu/kermit/ckermit70.html#x7.7
32637 + 279. http://www.columbia.edu/kermit/ckermit70.html#x7.8
32638 + 280. http://www.columbia.edu/kermit/ckermit70.html#x7.9
32639 + 281. http://www.columbia.edu/kermit/ckermit70.html#x7.9.1
32640 + 282. http://www.columbia.edu/kermit/ckermit70.html#x7.9.2
32641 + 283. http://www.columbia.edu/kermit/ckermit70.html#x7.10
32642 + 284. http://www.columbia.edu/kermit/ckermit70.html#x7.10.1
32643 + 285. http://www.columbia.edu/kermit/ckermit70.html#x7.10.2
32644 + 286. http://www.columbia.edu/kermit/ckermit70.html#x7.10.3
32645 + 287. http://www.columbia.edu/kermit/ckermit70.html#x7.10.4
32646 + 288. http://www.columbia.edu/kermit/ckermit70.html#x7.10.5
32647 + 289. http://www.columbia.edu/kermit/ckermit70.html#x7.10.6
32648 + 290. http://www.columbia.edu/kermit/ckermit70.html#x7.10.7
32649 + 291. http://www.columbia.edu/kermit/ckermit70.html#x7.10.8
32650 + 292. http://www.columbia.edu/kermit/ckermit70.html#x7.10.9
32651 + 293. http://www.columbia.edu/kermit/ckermit70.html#x7.10.10
32652 + 294. http://www.columbia.edu/kermit/ckermit70.html#x7.11
32653 + 295. http://www.columbia.edu/kermit/ckermit70.html#x7.12
32654 + 296. http://www.columbia.edu/kermit/ckermit70.html#x7.13
32655 + 297. http://www.columbia.edu/kermit/ckermit70.html#x7.14
32656 + 298. http://www.columbia.edu/kermit/ckermit70.html#x7.15
32657 + 299. http://www.columbia.edu/kermit/ckermit70.html#x7.16
32658 + 300. http://www.columbia.edu/kermit/ckermit70.html#x7.17
32659 + 301. http://www.columbia.edu/kermit/ckermit70.html#x7.18
32660 + 302. http://www.columbia.edu/kermit/ckermit70.html#x7.19
32661 + 303. http://www.columbia.edu/kermit/ckermit70.html#x7.20
32662 + 304. http://www.columbia.edu/kermit/ckermit70.html#x7.20.1
32663 + 305. http://www.columbia.edu/kermit/ckermit70.html#x7.20.2
32664 + 306. http://www.columbia.edu/kermit/ckermit70.html#x7.21
32665 + 307. http://www.columbia.edu/kermit/ckermit70.html#x7.22
32666 + 308. http://www.columbia.edu/kermit/ckermit70.html#x7.23
32667 + 309. http://www.columbia.edu/kermit/ckermit70.html#x7.24
32668 + 310. http://www.columbia.edu/kermit/ckermit70.html#x7.25
32669 + 311. http://www.columbia.edu/kermit/ckermit70.html#x7.26
32670 + 312. http://www.columbia.edu/kermit/ckermit70.html#x7.26.1
32671 + 313. http://www.columbia.edu/kermit/ckermit70.html#x7.26.2
32672 + 314. http://www.columbia.edu/kermit/ckermit70.html#x7.27
32673 + 315. http://www.columbia.edu/kermit/ckermit70.html#x8
32674 + 316. http://www.columbia.edu/kermit/ckermit70.html#x9
32675 + 317. http://www.columbia.edu/kermit/ckermit70.html#x9.0
32676 + 318. http://www.columbia.edu/kermit/ckermit70.html#x9.1
32677 + 319. http://www.columbia.edu/kermit/ckermit70.html#x9.2
32678 + 320. http://www.columbia.edu/kermit/ckermit70.html#x9.3
32679 + 321. http://www.columbia.edu/kermit/ckermit70.html#x10
32680 + 322. http://www.columbia.edu/kermit/ckermit70.html#xiii
32681 + 323. http://www.columbia.edu/kermit/ckermit70.html#xiii.1
32682 + 324. http://www.columbia.edu/kermit/ckermit70.html#xiii.1.1
32683 + 325. http://www.columbia.edu/kermit/ckermit70.html#xiii.1.2
32684 + 326. http://www.columbia.edu/kermit/ckermit70.html#xiii.1.2.1
32685 + 327. http://www.columbia.edu/kermit/ckermit70.html#xiii.1.2.2
32686 + 328. http://www.columbia.edu/kermit/ckermit70.html#xiii.1.2.3
32687 + 329. http://www.columbia.edu/kermit/ckermit70.html#xiii.2
32688 + 330. http://www.columbia.edu/kermit/ckermit70.html#xiv
32689 + 331. http://www.columbia.edu/kermit/ckermit70.html#xv
32690 + 332. http://www.columbia.edu/kermit/ckb2.htm
32691 + 333. http://www.columbia.edu/kermit/ckbreviews.html
32692 + 334. http://www.bhusa.com/
32693 + 335. http://www.columbia.edu/kermit/manuals.html#ckde
32694 + 336. http://www.columbia.edu/kermit/manuals.html#ktb
32695 + 337. http://www.columbia.edu/kermit/news.html
32696 + 338. news:comp.protocols.kermit.announce
32697 + 339. news:comp.protocols.kermit.misc
32698 + 340. http://www.columbia.edu/kermit/ckb2.htm
32699 + 341. http://www.columbia.edu/kermit/ckermit70.html#x4
32700 + 342. http://www.columbia.edu/kermit/ckermit70.html#x4.3
32701 + 343. http://www.columbia.edu/kermit/ckermit70.html#x4.23
32702 + 344. http://www.columbia.edu/kermit/ckermit70.html#x4.5.1
32703 + 345. http://www.columbia.edu/kermit/ckermit70.html#x1.5
32704 + 346. http://www.columbia.edu/kermit/ckermit70.html#x4.7.1
32705 + 347. http://www.columbia.edu/kermit/ckermit70.html#x4.9.
32706 + 348. http://www.columbia.edu/kermit/ckb2.htm
32707 + 349. http://www.columbia.edu/kermit/ckermit70.html#x7.9.2
32708 + 350. http://www.columbia.edu/kermit/ckermit70.html#x2.15
32709 + 351. http://www.columbia.edu/kermit/ckermit70.html#x9.1
32710 + 352. http://www.columbia.edu/kermit/ckermit70.html#x1.6
32711 + 353. http://www.columbia.edu/kermit/ckermit70.html#x7.4
32712 + 354. http://www.columbia.edu/kermit/ckermit70.html#x4.9.1
32713 + 355. http://www.columbia.edu/kermit/ckermit70.html#mjd
32714 + 356. http://www.columbia.edu/kermit/ckermit70.html#mjd
32715 + 357. http://www.columbia.edu/kermit/ckermit70.html#x4.9
32716 + 358. http://www.columbia.edu/kermit/ckb2.htm
32717 + 359. http://www.columbia.edu/kermit/ckb2.htm
32718 + 360. http://www.columbia.edu/kermit/ckermit70.html#x7.5
32719 + 361. http://www.columbia.edu/kermit/ckermit70.html#x2.12
32720 + 362. http://www.columbia.edu/kermit/ckermit70.html#x1.5
32721 + 363. http://www.columbia.edu/kermit/ckermit70.html#x4.9.1
32722 + 364. http://www.columbia.edu/kermit/ckermit70.html#x6.6.5
32723 + 365. http://www.columbia.edu/kermit/ckermit70.html#x4.9
32724 + 366. http://www.columbia.edu/kermit/ckermit70.html#x7.18
32725 + 367. http://www.columbia.edu/kermit/ckermit70.html#x7.4
32726 + 368. http://www.columbia.edu/kermit/ckermit70.html#x1.15
32727 + 369. http://www.columbia.edu/kermit/ckermit70.html#x4.3
32728 + 370. http://www.columbia.edu/kermit/ckermit70.html#x7.3
32729 + 371. http://www.columbia.edu/kermit/ckermit70.html#x7.10.7
32730 + 372. http://www.columbia.edu/kermit/ckermit70.html#x7.1
32731 + 373. http://www.columbia.edu/kermit/ckermit70.html#x4.9.1
32732 + 374. ftp://kermit.columbia.edu/kermit/f/ckccfg.txt
32733 + 375. ftp://kermit.columbia.edu/kermit/f/ckccfg.txt
32734 + 376. http://www.columbia.edu/kermit/ckermit70.html#x1.22.4
32735 + 377. http://www.columbia.edu/kermit/ckermit70.html#x1.22.5
32736 + 378. http://www.columbia.edu/kermit/ckb2.htm
32737 + 379. http://www.columbia.edu/kermit/ckermit70.html#x1.22.5
32738 + 380. http://www.columbia.edu/kermit/ckermit70.html#x7.12
32739 + 381. http://www.columbia.edu/kermit/ckermit70.html#x2.1.16
32740 + 382. http://www.columbia.edu/kermit/ckermit70.html#x2.7
32741 + 383. http://www.columbia.edu/kermit/ckermit70.html#x2.3.5
32742 + 384. http://www.columbia.edu/kermit/ckermit70.html#x7.5
32743 + 385. http://www.telefonica.es/cambiodenumeracion/
32744 + 386. http://www.columbia.edu/kermit/ckermit70.html#x7.5
32745 + 387. http://www.columbia.edu/kermit/ckb2.htm
32746 + 388. http://www.columbia.edu/kermit/ckermit70.html#x2.2.2
32747 + 389. http://www.columbia.edu/kermit/ckermit70.html#x2.1.11
32748 + 390. http://www.columbia.edu/kermit/ckermit70.html#x2.1.13
32749 + 391. http://www.columbia.edu/kermit/ckermit70.html#x2.1.12
32750 + 392. http://www.columbia.edu/kermit/ckb2.htm
32751 + 393. http://www.columbia.edu/kermit/ckermit70.html#x2.1.1
32752 + 394. http://www.columbia.edu/kermit/ckb2.htm
32753 + 395. http://www.columbia.edu/kermit/ckb2.htm
32754 + 396. http://www.columbia.edu/kermit/ckermit70.html#x2.1.7
32755 + 397. http://www.columbia.edu/kermit/ckermit70.html#x2.1.6
32756 + 398. http://www.columbia.edu/kermit/ckb2.htm
32757 + 399. ftp://kermit.columbia.edu/kermit/f/telnet.txt
32758 + 400. http://www.columbia.edu/kermit/telnet.htm
32759 + 401. ftp://kermit.columbia.edu/kermit/f/telnet.txt
32760 + 402. http://www.columbia.edu/kermit/telnet.htm
32761 + 403. ftp://ftp.isi.edu/in-notes/rfc1572.txt
32762 + 404. ftp://ftp.isi.edu/in-notes/rfc779.txt
32763 + 405. http://www.columbia.edu/kermit/ckb2.htm
32764 + 406. http://www.columbia.edu/kermit/ckermit70.html#x2.10
32765 + 407. http://www.columbia.edu/kermit/ckermit70.html#x2.8
32766 + 408. http://www.columbia.edu/kermit/ckermit70.html#x1.5
32767 + 409. http://www.columbia.edu/kermit/ckermit70.html#x4.20
32768 + 410. http://www.psy.uq.oz.au/~ftp/Crypto/
32769 + 411. http://www.columbia.edu/kermit/security.htm
32770 + 412. http://srp.stanford.edu/srp/
32771 + 413. http://www.columbia.edu/kermit/ckermit70.html#x2.7.1,
32772 + 414. ftp://kermit.columbia.edu/kermit/f/ckccfg.txt
32773 + 415. http://www.columbia.edu/kermit/security.htm
32774 + 416. http://www.columbia.edu/kermit/ckb2.htm
32775 + 417. http://www.columbia.edu/kermit/ckermit70.html#x2.7
32776 + 418. http://www.columbia.edu/kermit/ckermit70.html#x2.0
32777 + 419. ftp://kermit.columbia.edu/kermit/f/ckuins.txt
32778 + 420. ftp://kermit.columbia.edu/kermit/f/ckubwr.txt
32779 + 421. ftp://kermit.columbia.edu/kermit/f/ckuins.txt
32780 + 422. http://www.columbia.edu/kermit/iksd.html#x4.2
32781 + 423. http://www.columbia.edu/kermit/iksd.html
32782 + 424. http://www.columbia.edu/kermit/ckermit70.html#x4.2.8.1
32783 + 425. ftp://ftp.isi.edu/in-notes/rfc1945.txt
32784 + 426. http://www.columbia.edu/kermit/ckermit70.html#x1.5
32785 + 427. http://www.columbia.edu/kermit/ckermit70.html#x3.2
32786 + 428. http://www.columbia.edu/kermit/ckermit70.html#x3.2
32787 + 429. http://www.columbia.edu/kermit/ckb2.htm
32788 + 430. http://www.columbia.edu/kermit/ckb2.htm
32789 + 431. http://www.columbia.edu/kermit/ckermit70.html#x5.4
32790 + 432. ftp://kermit.columbia.edu/kermit/f/ckubwr.txt
32791 + 433. http://www.columbia.edu/kermit/ckermit70.html#x4.10
32792 + 434. http://www.columbia.edu/kermit/ckermit70.html#x4.7.1
32793 + 435. http://www.columbia.edu/kermit/ckermit70.html#x4.7.3
32794 + 436. http://www.columbia.edu/kermit/ckermit70.html#x4.3
32795 + 437. http://www.columbia.edu/kermit/ckermit70.html#x4.10
32796 + 438. http://www.columbia.edu/kermit/ckermit70.html#x4.11
32797 + 439. http://www.columbia.edu/kermit/ckermit70.html#x4.15
32798 + 440. http://www.columbia.edu/kermit/ckermit70.html#x4.2.4
32799 + 441. http://www.columbia.edu/kermit/ckermit70.html#x4.7
32800 + 442. http://www.columbia.edu/kermit/ckermit70.html#x4.2.3
32801 + 443. http://www.columbia.edu/kermit/ckermit70.html#x4.2.1.3
32802 + 444. http://www.columbia.edu/kermit/ckb2.htm
32803 + 445. http://www.columbia.edu/kermit/ckermit70.html#x4.2.2
32804 + 446. http://www.columbia.edu/kermit/ckermit70.html#x1.5
32805 + 447. http://www.columbia.edu/kermit/ckermit70.html#x4.2.8.2
32806 + 448. http://www.columbia.edu/kermit/ckermit70.html#x4.3
32807 + 449. http://www.columbia.edu/kermit/ckermit70.html#x4.10
32808 + 450. http://www.columbia.edu/kermit/ckermit70.html#x4.11
32809 + 451. http://www.columbia.edu/kermit/ckermit70.html#x4.15
32810 + 452. http://www.telstra.com.au/docs/PGP/
32811 + 453. http://www.telstra.com.au/docs/PGP/pgpdoc2/pgpdoc2_17.html
32812 + 454. http://www.columbia.edu/kermit/security.htm
32813 + 455. http://www.columbia.edu/kermit/ckermit70.html#x2.7
32814 + 456. http://www.columbia.edu/kermit/ckb2.htm
32815 + 457. http://www.columbia.edu/kermit/ckermit70.html#x2.14
32816 + 458. http://www.columbia.edu/kermit/ckermit70.html#x1.23
32817 + 459. http://www.columbia.edu/kermit/ckermit70.html#x4.7
32818 + 460. http://www.columbia.edu/kermit/ckb2.htm
32819 + 461. http://www.columbia.edu/kermit/ckb2.htm
32820 + 462. http://www.columbia.edu/kermit/ckermit70.html#x4.9
32821 + 463. http://www.columbia.edu/kermit/ckb2.htm
32822 + 464. http://www.columbia.edu/kermit/ckermit70.html#x1.5.4
32823 + 465. http://www.columbia.edu/kermit/ckermit70.html#x4.3
32824 + 466. http://www.columbia.edu/kermit/ckermit70.html#x1.5.5
32825 + 467. http://www.columbia.edu/kermit/ckermit70.html#x7.5
32826 + 468. http://www.columbia.edu/kermit/ckermit70.html#x4.9
32827 + 469. http://www.columbia.edu/kermit/ckermit70.html#x1.5.4
32828 + 470. http://www.columbia.edu/kermit/ckermit70.html#x4.9
32829 + 471. http://www.columbia.edu/kermit/ckermit70.html#x1.5.4
32830 + 472. http://www.columbia.edu/kermit/ckermit70.html#x1.5.5
32831 + 473. http://www.columbia.edu/kermit/ckb2.htm
32832 + 474. http://www.columbia.edu/kermit/ckb2.htm
32833 + 475. http://www.columbia.edu/kermit/ckermit70.html#x1.5
32834 + 476. http://www.columbia.edu/kermit/ckermit70.html#x1.6
32835 + 477. http://www.columbia.edu/kermit/ckermit70.html#x7.10
32836 + 478. http://www.columbia.edu/kermit/ckermit70.html#x7.10.11
32837 + 479. http://www.columbia.edu/kermit/ckermit70.html#x1.6
32838 + 480. http://www.columbia.edu/kermit/ckermit70.html#x4.2.2
32839 + 481. http://www.columbia.edu/kermit/ckermit70.html#x4.11
32840 + 482. http://www.columbia.edu/kermit/ckermit70.html#x1.5.4
32841 + 483. http://www.columbia.edu/kermit/ckermit70.html#x4.9.1
32842 + 484. http://www.columbia.edu/kermit/ckermit70.html#x4.0.6
32843 + 485. http://www.columbia.edu/kermit/ckermit70.html#x4.2
32844 + 486. http://www.columbia.edu/kermit/ckermit70.html#x4.1
32845 + 487. http://www.columbia.edu/kermit/ckermit70.html#x4.7.1
32846 + 488. http://www.columbia.edu/kermit/ckb2.htm
32847 + 489. http://www.columbia.edu/kermit/ckermit70.html#x1.5
32848 + 490. http://www.columbia.edu/kermit/ckermit70.html#x4.2.2
32849 + 491. http://www.columbia.edu/kermit/ckermit70.html#x4.7.1
32850 + 492. http://www.columbia.edu/kermit/ckermit70.html#x4.2
32851 + 493. http://www.columbia.edu/kermit/ckermit70.html#x4.10
32852 + 494. http://www.columbia.edu/kermit/ckermit70.html#x4.2.2
32853 + 495. http://www.columbia.edu/kermit/ckermit70.html#x4.7.1
32854 + 496. http://www.columbia.edu/kermit/ckermit70.html#x4.2
32855 + 497. http://www.columbia.edu/kermit/ckermit70.html#x4.10
32856 + 498. http://www.columbia.edu/kermit/ckermit70.html#x1.11.5
32857 + 499. http://www.columbia.edu/kermit/ckermit70.html#x4.0.6
32858 + 500. http://www.columbia.edu/kermit/ckermit70.html#x4.11
32859 + 501. http://www.columbia.edu/kermit/ckermit70.html#x4.9.1
32860 + 502. http://www.columbia.edu/kermit/ckermit70.html#x4.11.3
32861 + 503. http://www.columbia.edu/kermit/ckermit70.html#x4.9
32862 + 504. http://www.columbia.edu/kermit/ckermit70.html#x4.9
32863 + 505. http://www.columbia.edu/kermit/ckermit70.html#x4.5.1
32864 + 506. http://www.columbia.edu/kermit/ckermit70.html#x7.10
32865 + 507. http://www.columbia.edu/kermit/ckermit70.html#x7.10.5
32866 + 508. http://www.columbia.edu/kermit/ckermit70.html#x7.10.3
32867 + 509. http://www.columbia.edu/kermit/ckermit70.html#x7.10.5
32868 + 510. http://www.columbia.edu/kermit/ckb2.htm
32869 + 511. http://www.columbia.edu/kermit/ckermit70.html#x4.3
32870 + 512. http://www.columbia.edu/kermit/ckermit70.html#x4.10
32871 + 513. http://www.columbia.edu/kermit/ckermit70.html#x4.3
32872 + 514. http://www.columbia.edu/kermit/ckermit70.html#x4.10
32873 + 515. http://www.columbia.edu/kermit/ckermit70.html#x4.15
32874 + 516. http://www.columbia.edu/kermit/ckermit70.html#x4.18
32875 + 517. http://www.columbia.edu/kermit/ckermit70.html#x4.20
32876 + 518. http://www.columbia.edu/kermit/ckermit70.html#x4.20
32877 + 519. http://www.columbia.edu/kermit/ckermit70.html#x4.20
32878 + 520. http://www.columbia.edu/kermit/ckermit70.html#x4.19
32879 + 521. http://www.columbia.edu/kermit/ckermit70.html#x4.16
32880 + 522. http://www.columbia.edu/kermit/ckermit70.html#x4.19
32881 + 523. http://www.columbia.edu/kermit/ckermit70.html#x4.20.2.3
32882 + 524. http://www.columbia.edu/kermit/ckermit70.html#x1.5
32883 + 525. http://www.columbia.edu/kermit/ckermit70.html#x6.6.5.4
32884 + 526. http://www.columbia.edu/kermit/ckermit70.html#x4.22.2
32885 + 527. http://www.columbia.edu/kermit/ckermit70.html#x4.22.3
32886 + 528. http://www.columbia.edu/kermit/ckb2.htm
32887 + 529. http://www.columbia.edu/kermit/ckb2.htm
32888 + 530. http://www.columbia.edu/kermit/ckermit70.html#x9.3
32889 + 531. http://www.columbia.edu/kermit/ckermit70.html#x5.2.1
32890 + 532. http://www.columbia.edu/kermit/ckermit70.html#x4.5.1
32891 + 533. http://www.columbia.edu/kermit/ckermit70.html#x4.5.2
32892 + 534. http://www.columbia.edu/kermit/ckermit70.html#x6.6
32893 + 535. http://www.columbia.edu/kermit/ckermit70.html#xiii
32894 + 536. http://www.columbia.edu/kermit/ckermit70.html#xiii
32895 + 537. ftp://ftp.isi.edu/in-notes/rfc1489.txt
32896 + 538. ftp://ftp.isi.edu/in-notes/rfc2319.txt
32897 + 539. http://www.unicode.org/
32898 + 540. http://www.columbia.edu/kermit/ckermit70.html#x6.6.2
32899 + 541. http://www.columbia.edu/kermit/ckermit70.html#x6.6.5.1
32900 + 542. ftp://ftp.isi.edu/in-notes/rfc2640.txt
32901 + 543. http://www.columbia.edu/kermit/ckermit70.html#x6.6.2
32902 + 544. http://www.columbia.edu/kermit/ckermit70.html#x6.0
32903 + 545. http://www.columbia.edu/kermit/ckermit70.html#x6.5
32904 + 546. http://www.columbia.edu/kermit/ckermit70.html#x6.4
32905 + 547. http://www.columbia.edu/kermit/ckb2.htm
32906 + 548. http://www.columbia.edu/kermit/ckermit70.html#x4.21
32907 + 549. http://www.columbia.edu/kermit/ckermit70.html#x6.5
32908 + 550. http://www.columbia.edu/kermit/ckermit70.html#x2.8
32909 + 551. http://www.columbia.edu/kermit/ckermit70.html#x7.7
32910 + 552. http://www.columbia.edu/kermit/ckermit70.html#x7.2
32911 + 553. http://www.columbia.edu/kermit/ckermit70.html#x1.19
32912 + 554. http://www.columbia.edu/kermit/ckermit70.html#x4.9
32913 + 555. http://www.columbia.edu/kermit/ckermit70.html#x4.1
32914 + 556. http://www.columbia.edu/kermit/ckermit70.html#x4.2
32915 + 557. http://www.columbia.edu/kermit/ckermit70.html#x4.1
32916 + 558. http://www.columbia.edu/kermit/ckermit70.html#x4.2
32917 + 559. http://www.columbia.edu/kermit/ckermit70.html#x2.1.11
32918 + 560. http://www.columbia.edu/kermit/ckermit70.html#x2.10
32919 + 561. http://www.columbia.edu/kermit/ckermit70.html#ferrstring
32920 + 562. http://www.columbia.edu/kermit/ckermit70.html#x4.2.5
32921 + 563. http://www.columbia.edu/kermit/ckermit70.html#x2.1.10
32922 + 564. http://www.columbia.edu/kermit/ckermit70.html#x9.1
32923 + 565. http://www.columbia.edu/kermit/ckermit70.html#x7.23
32924 + 566. http://www.columbia.edu/kermit/ckermit70.html#x7.23
32925 + 567. http://www.columbia.edu/kermit/ckermit70.html#x1.22
32926 + 568. http://www.columbia.edu/kermit/ckermit70.html#x1.6
32927 + 569. http://www.columbia.edu/kermit/ckermit70.html#x7.23
32928 + 570. http://www.columbia.edu/kermit/ckermit70.html#x7.24
32929 + 571. http://www.columbia.edu/kermit/ckermit70.html#x7.24
32930 + 572. http://www.columbia.edu/kermit/ckermit70.html#x4.2.3
32931 + 573. http://www.columbia.edu/kermit/ckermit70.html#x7.12
32932 + 574. http://www.columbia.edu/kermit/ckermit70.html#x7.9
32933 + 575. http://www.columbia.edu/kermit/ckb2.htm
32934 + 576. http://www.columbia.edu/kermit/ckermit70.html#x4.11.3
32935 + 577. http://www.columbia.edu/kermit/ckermit70.html#x4.11.3
32936 + 578. http://www.columbia.edu/kermit/ckermit70.html#x7.5
32937 + 579. http://www.columbia.edu/kermit/ckermit70.html#x7.10.7
32938 + 580. http://www.columbia.edu/kermit/ckermit70.html#x7.10.7
32939 + 581. http://www.columbia.edu/kermit/ckermit70.html#x4.2.8.4
32940 + 582. http://www.columbia.edu/kermit/ckermit70.html#x4.2.5
32941 + 583. http://www.columbia.edu/kermit/ckermit70.html#x7.8
32942 + 584. http://www.columbia.edu/kermit/ckermit70.html#x4.9.1
32943 + 585. http://www.columbia.edu/kermit/ckb2.htm
32944 + 586. http://www.columbia.edu/kermit/ckermit70.html#x7.19
32945 + 587. http://www.columbia.edu/kermit/ckermit70.html#x7.16
32946 + 588. http://www.columbia.edu/kermit/ckermit70.html#x7.9.1
32947 + 589. http://www.columbia.edu/kermit/ckermit70.html#x7.5
32948 + 590. http://www.columbia.edu/kermit/ckermit70.html#x7.3
32949 + 591. http://www.columbia.edu/kermit/ckermit70.html#x4.11.3
32950 + 592. http://www.columbia.edu/kermit/ckermit70.html#x4.5.1
32951 + 593. http://www.columbia.edu/kermit/ckermit70.html#x7.10
32952 + 594. http://www.columbia.edu/kermit/ckermit70.html#x7.10.10
32953 + 595. http://www.columbia.edu/kermit/ckermit70.html#x1.5
32954 + 596. http://www.columbia.edu/kermit/ckermit70.html#x7.23
32955 + 597. http://www.columbia.edu/kermit/ckermit70.html#x7.10.7
32956 + 598. http://www.columbia.edu/kermit/ckermit70.html#x7.10.7
32957 + 599. http://www.columbia.edu/kermit/ckermit70.html#x4.11.3
32958 + 600. http://www.columbia.edu/kermit/ckermit70.html#x7.10.11
32959 + 601. http://www.columbia.edu/kermit/ckermit70.html#x4.9
32960 + 602. http://www.columbia.edu/kermit/ckermit70.html#x7.10.3
32961 + 603. http://www.columbia.edu/kermit/ckermit70.html#x7.3
32962 + 604. http://www.columbia.edu/kermit/ckermit70.html#x7.9.2
32963 + 605. http://www.columbia.edu/kermit/ckb2.htm
32964 + 606. http://www.columbia.edu/kermit/ckermit70.html#x4.17.2
32965 + 607. http://www.columbia.edu/kermit/ckermit70.html#x1.22
32966 + 608. http://www.columbia.edu/kermit/ckermit70.html#x4.7.1
32967 + 609. http://www.columbia.edu/kermit/ckermit70.html#x1.22
32968 + 610. http://www.columbia.edu/kermit/ckermit70.html#x4.3
32969 + 611. http://www.columbia.edu/kermit/ckermit70.html#x4.9
32970 + 612. http://www.columbia.edu/kermit/ckermit70.html#x1.22
32971 + 613. http://www.columbia.edu/kermit/ckermit70.html#x1.6
32972 + 614. http://www.columbia.edu/kermit/ckermit70.html#x7.5
32973 + 615. http://www.columbia.edu/kermit/ckermit70.html#x7.5
32974 + 616. http://www.columbia.edu/kermit/ckermit70.html#x7.19
32975 + 617. http://www.columbia.edu/kermit/ckermit70.html#x4.9.1
32976 + 618. http://www.columbia.edu/kermit/ckermit70.html#x9.3
32977 + 619. http://www.columbia.edu/kermit/ckermit70.html#x7.5
32978 + 620. http://www.columbia.edu/kermit/ckb2.htm
32979 + 621. http://www.columbia.edu/kermit/ckermit70.html#x7.4
32980 + 622. http://www.columbia.edu/kermit/ckermit70.html#x7.20.2
32981 + 623. http://www.columbia.edu/kermit/ckermit70.html#x7.10.5
32982 + 624. http://www.columbia.edu/kermit/ckermit70.html#x7.10.9
32983 + 625. http://www.columbia.edu/kermit/ckermit70.html#x1.10
32984 + 626. http://www.columbia.edu/kermit/ckermit70.html#x1.5
32985 + 627. http://www.columbia.edu/kermit/ckermit70.html#x4.7.1
32986 + 628. http://www.columbia.edu/kermit/iksd.html
32987 + 629. http://www.columbia.edu/kermit/ckermit70.html#x7.19
32988 + 630. http://www.columbia.edu/kermit/ckermit70.html#x4.10
32989 + 631. http://www.columbia.edu/kermit/ckermit70.html#x4.11
32990 + 632. http://www.columbia.edu/kermit/ckermit70.html#x4.3
32991 + 633. http://www.columbia.edu/kermit/gkermit.html
32992 + 634. http://www.columbia.edu/kermit/ckermit70.html#x4.20
32993 + 635. http://www.columbia.edu/kermit/gkermit.html
32994 + 636. http://www.columbia.edu/kermit/ckb2.htm
32995 + 637. http://www.columbia.edu/kermit/ckermit70.html#x7.3
32996 + 638. mailto:kermit@columbia.edu
32997 + 639. http://www.columbia.edu/kermit/ckermit70.html#top
32998 + 640. http://www.columbia.edu/kermit/ckermit.html
32999 + 641. http://www.columbia.edu/kermit/index.html
33001 +++ ckermit-212/ckccfg.txt
33004 + C-Kermit Configuration Options
33007 + [1]The Kermit Project
33008 + [2]Columbia University
33010 + As of: C-Kermit 8.0.211, 10 April 2004
33011 + This page last updated: Sun Apr 11 16:45:55 2004 (New York USA Time)
33013 + IF YOU ARE READING A PLAIN-TEXT version of this document, note that
33014 + this file is a plain-text dump of a Web page. You can visit the
33015 + original (and possibly more up-to-date) Web page here:
33017 + [3]http://www.columbia.edu/kermit/ckccfg.html
33019 + [ [4]C-Kermit Home ] [ [5]Kermit Home ]
33020 + ________________________________________________________________________
33024 + 1. [6]FILE TRANSFER
33025 + 2. [7]SERIAL COMMUNICATION SPEEDS
33026 + 3. [8]FULLSCREEN FILE TRANSFER DISPLAY
33027 + 4. [9]CHARACTER SETS
33028 + 5. [10]APC EXECUTION
33029 + 6. [11]PROGRAM SIZE
33030 + 7. [12]MODEM DIALING
33031 + 8. [13]NETWORK SUPPORT
33032 + 9. [14]EXCEPTION HANDLING
33033 + 10. [15]SECURITY FEATURES
33034 + 11. [16]ENABLING SELECT()
33035 + 12. [17]I/O REDIRECTION
33036 + 13. [18]FLOATING-POINT NUMBERS, TIMERS, AND ARITHMETIC
33037 + 14. [19]SPECIAL CONFIGURATIONS
33038 + I. [20]SUMMARY OF COMPILE-TIME OPTIONS
33039 + ________________________________________________________________________
33043 + This document describes configuration options for C-Kermit (5A and
33044 + later). The major topics covered include program size (and how to
33045 + reduce it), how to include or exclude particular features, notes on
33046 + serial-port, modem, and network support, and a list of C-Kermit's
33047 + compile-time options.
33049 + For details about your particular operating system, also see the
33050 + system-specific installation instructions file, such as the
33051 + [21]C-Kermit Installation Instructions for Unix.
33053 + [ [22]C-Kermit Home ] [ [23]Kermit Home ]
33054 + ________________________________________________________________________
33058 + [ [24]Top ] [ [25]Contents ] [ [26]Next ] [ [27]Previous ]
33060 + Prior to version 7.0, C-Kermit was always built with the most
33061 + conservative Kermit file-transfer protocol defaults on every platform:
33062 + no control-character prefixing, 94-byte packets, and a window size of
33065 + Starting in version 7.0, fast settings are the default. To override
33066 + these at compile time, include:
33070 + in the C compiler CFLAGS. Even with the fast defaults, C-Kermit
33071 + automatically drops down to whatever window and packet sizes requested
33072 + by the other Kermit, if these are smaller, when sending files (except
33073 + for control-character unprefixing, which is not negotiated, and which
33074 + is now set to CAUTIOUS rather than NONE at startup). C-Kermit's
33075 + settings prevail when it is receiving.
33077 + [ [28]C-Kermit Home ] [ [29]Kermit Home ]
33078 + ________________________________________________________________________
33080 + 2. SERIAL COMMUNICATION SPEEDS
33082 + [ [30]Top ] [ [31]Contents ] [ [32]Next ] [ [33]Previous ]
33084 + As of 6 September 1997, a new simplified mechanism for obtaining the
33085 + list of legal serial interface speeds is in place:
33087 + * If the symbol TTSPDLIST is defined, the system-dependent routine
33088 + ttspdlist() is called at program initialization to obtain the
33090 + * This symbol should be defined only for C-Kermit implementations
33091 + that have implemented the ttspdlist() function, typically in the
33092 + ck?tio.c module. See [34]ckutio.c for an example.
33093 + * TTSPDLIST is automatically defined in [35]ckcdeb.h for UNIX. Add
33094 + the appropriate #ifdefs for other platforms when the corresponding
33095 + ttspdlist() functions are filled in.
33096 + * If TTSPDLIST is (or normally would be) defined, the old code
33097 + (described below) can still be selected by defining NOTTSPDLIST.
33099 + The ttspdlist() function can obtain the speeds in any way that works.
33100 + For example, based simply on #ifdef Bnnnn..#endif (in UNIX). Although
33101 + it might be better to actually check each speed against the currently
33102 + selected hardware interface before allowing it in the array, there is
33103 + usually no passive and/or reliable and safe way to do this, and so
33104 + it's better to let some speeds into the array that might not work,
33105 + than it is to erroneously exclude others. Speeds that don't work are
33106 + caught when the SET SPEED command is actually given.
33108 + Note that this scheme does not necessarily rule out split speed
33109 + operation, but effectively it does in C-Kermit as presently
33110 + constituted since there are no commands to set input and output speed
33111 + separately (except the special case "set speed 75/1200").
33113 + Note that some platforms, notably AIX 4.2 and 4.3, implement high
33114 + serial speeds transparently to the application, e.g. by mapping 50 bps
33115 + to 57600 bps, and so on.
33117 + That's the whole deal. When TTSPDLIST is not defined, the following
33120 + Speeds are defined in two places: the SET SPEED keyword list in the
33121 + command parser (as of this writing, in the [36]ckuus3.c source file),
33122 + and in the system- dependent communications i/o module, ck?tio.c,
33123 + functions ttsspd() (set speed) and ttgspd() (get speed). The following
33124 + speeds are assumed to be available in all versions:
33126 + 0, 110, 300, 600, 1200, 2400, 4800, 9600
33128 + If one or more of these speeds is not supported by your system, you'll
33129 + need to change the source code (this has never happened so far). Other
33130 + speeds that are not common to all systems have Kermit-specific
33134 + Speed (bps) to enable to disable
33137 + 75/1200 BPS_7512 NOB_7512
33138 + 134.5 BPS_134 NOB_134
33139 + 150 BPS_150 NOB_150
33140 + 200 BPS_200 NOB_200
33141 + 1800 BPS_1800 NOB_1800
33142 + 3600 BPS_3600 NOB_3600
33143 + 7200 BPS_7200 NOB_7200
33144 + 14400 BPS_14K NOB_14K
33145 + 19200 BPS_19K NOB_19K
33146 + 28800 BPS_28K NOB_28K
33147 + 38400 BPS_38K NOB_38K
33148 + 57600 BPS_57K NOB_57K
33149 + 76800 BPS_76K NOB_76K
33150 + 115200 BPS_115K NOB_155K
33151 + 230400 BPS_230K NOB_230K
33152 + 460800 BPS_460K NOB_460K
33153 + 921600 BPS_921K NOB_921K
33155 + The [37]ckcdeb.h header file contains default speed configurations for
33156 + the many systems that C-Kermit supports. You can override these
33157 + defaults by (a) editing ckcdeb.h, or (b) defining the appropriate
33158 + enabling and/or disabling symbols on the CC command line, for example:
33160 + -DBPS_14400 -DNOB_115200
33162 + or the "make" command line, e.g.:
33164 + make blah "KFLAGS=-DBPS_14400 -DNOB_115200"
33166 + Note: some speeds have no symbols defined for them, because they have
33167 + never been needed: 12.5bps, 45.5bps, 20000bps, etc. These can easily
33168 + be added if required (but they will work only if the OS supports
33171 + IMPORTANT: Adding one of these flags at compile time does not
33172 + necessarily mean that you will be able to use that speed. A particular
33173 + speed is usable only if your underlying operating system supports it.
33174 + In particular, it needs to be defined in the appropriate system header
33175 + file (e.g. in UNIX, cd to /usr/include and grep for B9600 in *.h and
33176 + sys/*.h to find the header file that contains the definitions for the
33177 + supported speeds), and supported by the serial device driver, and of
33178 + course by the physical device itself.
33180 + ALSO IMPORTANT: The list of available speeds is independent of how
33181 + they are set. The many UNIXes, for example, offer a wide variety of
33182 + APIs that are BSD-based, SYSV-based, POSIX-based, and purely made up.
33183 + See the ttsspd(), ttgspd(), and ttspdlist() routines in [38]ckutio.c
33184 + for illustrations.
33186 + The latest entries in this horserace are the tcgetspeed() and
33187 + ttsetspeed() routines found in UnixWare 7. Unlike other methods, they
33188 + accept the entire range of integers (longs really) as speed values,
33189 + rather than certain codes, and return an error if the number is not,
33190 + in fact, a legal speed for the device/driver in question. In this
33191 + case, there is no way to build a list of legal speeds at compile time,
33192 + since no Bnnnn symbols are defined (except for "depracated, legacy"
33193 + interfaces like ioctl()) and so the legal speed list must be
33194 + enumerated in the code -- see ttspdlist() in [39]ckutio.c.
33196 + [ [40]C-Kermit Home ] [ [41]Kermit Home ]
33197 + ________________________________________________________________________
33199 + 3. FULLSCREEN FILE TRANSFER DISPLAY
33201 + [ [42]Top ] [ [43]Contents ] [ [44]Next ] [ [45]Previous ]
33203 + New to edit 180 is support for an MS-DOS-Kermit-like local-mode full
33204 + screen file transfer display, accomplished using the curses library,
33205 + or something equivalent (for example, the Screen Manager on DEC VMS).
33206 + To enable this feature, include the following in your CFLAGS:
33210 + and then change your build procedure (if necessary) to include the
33211 + necessary libraries. For example, in Unix these are usually "curses"
33212 + or "ncurses" (and more recenlty, "ncursesw" and "slang"), perhaps also
33213 + "termcap", "termlib", or "tinfo":
33215 + "LIBS= -lcurses -ltermcap"
33216 + "LIBS= -lcurses -ltermlib"
33217 + "LIBS= -lncurses"
33218 + "LIBS= -ltermlib"
33221 + "man curses" for further information, and search through the Unix
33222 + [46]makefile for "CK_CURSES" to see many examples, and also see the
33223 + relevant sections of the [47]Unix C-Kermit Installation Instructions,
33224 + particularly Sections [48]4 and [49]9.2.
33226 + There might still be a complication. Some implementations of curses
33227 + reserve the right to alter the buffering on the output file without
33228 + restoring it afterwards, which can leave Kermit's command processing
33229 + in a mess when the prompt comes back after a fullscreen file transfer
33230 + display. The typical symptom is that characters you type at the prompt
33231 + after a local-mode file transfer (i.e. after seeing the curses
33232 + file-transfer display) do not echo until you press the Return (Enter)
33233 + key. If this happens to you, try adding
33237 + to your makefile target (see comments in screenc() in [50]ckuusx.c for
33240 + If that doesn't fix the problem, then use a bigger hammer and replace
33241 + -DCK_NEWTERM with:
33245 + which tells Kermit to force stdout to be unbuffered so CBREAK mode can
33248 + In SCO Xenix and SCO UNIX, there are two separate curses libraries,
33249 + one based on termcap and the other based on terminfo. The default
33250 + library, usually terminfo, is established when the development system
33251 + is installed. To manually select terminfo (at compile time):
33253 + compile -DM_TERMINFO and link -ltinfo
33255 + and to manually select termcap:
33257 + compile -DM_TERMCAP and link -ltcap -ltermlib
33259 + <curses.h> looks at M_TERMINFO and M_TERMCAP to decide which header
33260 + files to use. /usr/lib/libcurses.a is a link to either libtinfo.a or
33261 + libtcap.a. The C-Kermit compilation options must agree with the
33262 + version of the curses library that is actually installed.
33264 + NOTE: If you are doing an ANSI-C compilation and you get compile time
33265 + warnings like the following:
33267 + Warning: function not declared in ckuusx.c: wmove, printw, wclrtoeol,
33268 + wclear, wrefresh, endwin, etc...
33270 + it means that your <curses.h> file does not contain prototypes for
33271 + these functions. The warnings should be harmless.
33273 + New to edit 190 is the ability to refresh a messed-up full-screen
33274 + display, e.g. after receiving a broadcast message. This depends on the
33275 + curses package including the wrefresh() and clearok() functions and
33276 + the curscr variable. If your version has these, or has code to
33277 + simulate them, then add:
33281 + The curses and termcap libraries add considerable size to the program
33282 + image (e.g. about 20K on a SUN-4, 40K on a 386). On some small
33283 + systems, such as the AT&T 6300 PLUS, curses can push Kermit over the
33284 + edge... even though it compiles, loads, and runs correctly, its
33285 + increased size apparently makes it swap constantly, slowing it down to
33286 + a crawl, even when the curses display is not in use. Some new makefile
33287 + targets have been added to take care of this (e.g. sys3upcshcc), but
33288 + similar tricks might be necessary in other cases too.
33290 + On the curses file-transfer display, just below the "thermometer", is
33291 + a running display of the transfer rate, as a flat quotient of file
33292 + characters per elapsed seconds so far. You can change this to an
33293 + average that gives greater weight to recent history (0.25 *
33294 + instantaneous cps + 0.75 * historical cps) by adding -DCPS_WEIGHTED to
33295 + your CFLAGS (sorry folks, this one is not worth a SET command). You
33296 + can choose a second type of weighted average in which the weighting
33297 + smooths out progressively as the transfer progresses by adding
33298 + -DCPS_VINCE to -DCPS_WEIGHTED.
33300 + An alternative to curses is also available at compile time, but should
33301 + be selected if your version of Kermit is to be run in local mode only
33302 + in an ANSI terminal environment, for example on a desktop workstation
33303 + that has an ANSI console driver. To select this option in place of
33304 + curses, define the symbol MYCURSES:
33308 + instead of CK_CURSES. The MYCURSES option uses built-in ANSI (VT100)
33309 + escape sequences, and depends upon your terminal or console driver to
33310 + interpret them correctly.
33312 + In some C-Kermit builds, we replace printf() via #define printf...
33313 + However, this can cause conflicts with the [n]curses header files.
33314 + Various hacks are required to get around this -- see [51]ckutio.c,
33315 + [52]ckufio.c, [53]ckuusx.c, [54]ckucmd.c, etc.
33317 + [ [55]C-Kermit Home ] [ [56]Kermit Home ]
33318 + ________________________________________________________________________
33320 + 4. CHARACTER SETS
33322 + [ [57]Top ] [ [58]Contents ] [ [59]Next ] [ [60]Previous ]
33324 + Since version 5A, C-Kermit has included support for conversion of
33325 + character sets for Western European languages (i.e. languages that
33326 + originated in Western Europe, but are now also spoken in the Western
33327 + Hemisphere and other parts of the world), via ISO 8859-1 Latin
33328 + Alphabet 1, for Eastern European languages (ISO Latin-2), Hebrew (and
33329 + Yiddish), Greek, and Cyrillic-alphabet languages (ISO Latin/Cyrillic).
33330 + Many file (local) character sets are supported: ISO 646 7-bit national
33331 + sets, IBM code pages, Apple, DEC, DG, NeXT, etc.
33333 + To build Kermit with no character-set translation at all, include
33334 + -DNOCSETS in the CFLAGS. To build with no Latin-2, add -DNOLATIN2. To
33335 + build with no Cyrillic, add -DNOCYRIL. To omit Hebrew, add -DNOHEBREW.
33336 + If -DNOCSETS is *not* included, you'll always get LATIN1. To build
33337 + with no KANJI include -DNOKANJI. There is presently no way to include
33338 + Latin-2, Cyrillic, Hebrew, or Kanji without also including Latin-1.
33340 + [61]Unicode support was added in C-Kermit 7.0, and it adds a fair
33341 + amount of tables and code (and this is only a "Level 1" implementation
33342 + -- a higher level would also require building in the entire Unicode
33343 + database). On a PC with RH 5.2 Linux, building C-Kermit 7.0, we get
33344 + the following sizes:
33346 + NOCSETS NOUNICODE NOKANJI Before After
33347 + [ ] [ ] [ ] 1329014 (Full)
33348 + [ ] [ ] [ X ] 1325686 (Unicode but no Kanji)
33349 + [ ] [ X ] [ ] 1158837 (All charsets except Unicode)
33350 + [ X ] [ x ] [ x ] 1090845 (NOCSETS implies the other two)
33352 + Note, by the way, that NOKANJI without NOUNICODE only removes the
33353 + non-Unicode Kanji sets (Shift-JIS, EUC-JP, JIS-7, etc). Kanji is still
33354 + representable in UCS-2 and UTF-8.
33356 + [ [62]C-Kermit Home ] [ [63]Kermit Home ]
33357 + ________________________________________________________________________
33361 + [ [64]Top ] [ [65]Contents ] [ [66]Next ] [ [67]Previous ]
33363 + The Kermit CONNECT and INPUT commands are coded to execute Application
33364 + Program Command escape sequences from the host:
33366 + <ESC>_<text><ESC>\
33368 + where <text> is a C-Kermit command, or a list of C-Kermit commands
33369 + separated by commas, up to about 1K in length.
33371 + To date, this feature has been included in the OS/2, Windows, VMS,
33372 + OS-9, and Unix versions, for which the symbol:
33376 + is defined automatically in [68]ckuusr.h. For OS/2, APC is enabled at
33377 + runtime by default, for UNIX it is disabled. It is controlled by the
33378 + SET TERMINAL APC command. Configuring APC capability into a version
33379 + that gets it by default (because CK_APC is defined in [69]ckuusr.h)
33380 + can be overridden by including:
33384 + on the CC command line.
33386 + C-Kermit's autodownload feature depends on the APC feature, so
33387 + deconfiguring APC also disables autodownload (it doesn't use APC
33388 + escape sequences, but uses the APC switching mechanism internally).
33390 + [ [70]C-Kermit Home ] [ [71]Kermit Home ]
33391 + ________________________________________________________________________
33395 + [ [72]Top ] [ [73]Contents ] [ [74]Next ] [ [75]Previous ]
33399 + 6.1. [76]Feature Selection
33400 + 6.2. [77]Changing Buffer Sizes
33401 + 6.3. [78]Other Size-Related Items
33402 + 6.4. [79]Space/Time Tradeoffs
33404 + (Also see [80]Section 4)
33406 + Each release of C-Kermit is larger than the last. On some computers
33407 + (usually old ones) the size of the program prevents it from being
33408 + successfully linked and loaded. On some others (also usually old
33409 + ones), it occupies so much memory that it is constantly swapping or
33410 + paging. In such cases, you can reduce C-Kermit's size in various ways,
33411 + outlined in this section. The following options can cut down on the
33412 + program's size at compile time by removing features or changing the
33413 + size of storage areas.
33415 + If you are reading this section because all you want is a small, fast,
33416 + quick-to-load Kermit file-transfer application for the remote end of
33417 + your connection, and the remote end is Unix based, take a look at
33420 + [81]http://www.columbia.edu/kermit/gkermit.html
33422 + 6.1. Feature Selection
33424 + Features can be added or removed by defining symbols on the CC (C
33425 + compiler) command line. "-D" is the normal CC directive to define a
33426 + symbol so, for example, "-DNODEBUG" defines the symbol NODEBUG. Some C
33427 + compilers might use different syntax, e.g. "-d NODEBUG" or
33428 + "/DEFINE=NODEBUG". For C compilers that do not accept command-line
33429 + definitions, you can put the corresponding #define statements in the
33430 + file ckcsym.h, for example:
33434 + The following table shows the savings achieved when building C-Kermit
33435 + 8.0 (Beta.04) with selected feature-deselection switches on an
33436 + Intel-based PC with Red Hat Linux 7.0 and gcc 2.96. The sizes are for
33437 + non-security builds. The fully configured non-security build is
33440 + Option Size Savings Effect
33441 + NOICP 545330 74.4% No Interactive Command Parser (command-line only)
33442 + NOLOCAL 1539994 27.6% No making connections.
33443 + NOXFER 1551108 27.1% No file transfer.
33444 + IKSDONLY 1566608 26.4% Internet Kermit Server only.
33445 + NOCSETS 1750097 17.7% No character-set conversion.
33446 + NOSPL 1800293 15.4% No Script Programming Language.
33447 + NONET 1808575 15.0% No making network connections.
33448 + NOUNICODE 1834426 13.8% No Unicode character-set conversion.
33449 + NOHELP 1837877 13.6% No built-in help text.
33450 + NODEBUG 1891669 11.1% No debug log.
33451 + NOFRILLS 1918966 9.8% No "frills".
33452 + NOFTP 1972496 7.3% No FTP client.
33453 + NODIAL 1984488 6.7% No automatic modem dialing.
33454 + NOPUSH 2070184 2.7% No shell access, running external programs, etc.
33455 + NOIKSD 2074129 2.5% No Internet Kermit Server capability.
33456 + NOHTTP 2082610 2.1% No HTTP client.
33457 + NOFLOAT 2091332 1.7% No floating-point arithmetic.
33458 + NOCHANNELIO 2095978 1.5% No FOPEN/FREAD/FWRITE/FCLOSE, etc.
33459 + MINIDIAL 2098035 1.4% No built-in support for many kinds of modems.
33460 + NOSERVER 2098987 1.3% No server mode.
33461 + NOSEXP 2105898 1.0% No S-Expressions.
33462 + NOPTY 2117743 0.5% No pseudoterminal support.
33463 + NORLOGIN 2121089 0.3% No RLOGIN connections.
33464 + NOOLDMODEMS 2124038 0.2% No built-in support for old kinds of modems.
33465 + NOSSH 2125696 0.1% No SSH command.
33467 + And here are a few combinations
33469 + Options Size Savings Effect
33470 + NODEBUG NOICP NOCSETS NOLOCAL 281641 86.7% No debug log, parser,
33471 + character sets, or making connections.
33472 + NOICP NOCSETS NOLOCAL 376468 82.3% No parser, character sets, or
33473 + making connections.
33474 + NOICP NOCSETS NONET 427510 79.9% No parser, character sets, or network
33476 + NOSPL NOCSETS 1423784 33.1% No script language, or character sets.
33478 + -DNOFRILLS removes various command synonyms; the following top-level
33479 + commands: CLEAR, DELETE, DISABLE, ENABLE, GETOK, MAIL, RENAME, TYPE,
33480 + WHO; and the following REMOTE commands: KERMIT, LOGIN, LOGOUT, PRINT,
33483 + 6.2. Changing Buffer Sizes
33485 + Most modern computers have so much memory that (a) there is no need to
33486 + scrimp and save, and (b) C-Kermit, even when fully configured, is
33487 + relatively small by today's standards.
33489 + Two major factors affect Kermit's size: feature selection and buffer
33490 + sizes. Buffer sizes affect such things as the maximum length for a
33491 + Kermit packet, the maximum length for a command, for a macro, for the
33492 + name of a macro, etc. Big buffer sizes are used when the following
33493 + symbol is defined:
33497 + as it is by default for most modern platforms (Linux, AIX 4 and 5,
33498 + HP-UX 10 and 11, Solaris, etc) in [82]ckuusr.h. If your build does not
33499 + get big buffers automatically (SHOW FEATURES tells you), you can
33500 + include them by rebuilding with BIGBUFOK defined; e.g. in Unix:
33502 + make xxxx KFLAGS=-DBIGBUFOK
33504 + where xxxx is the makefile target. On the other hand, if you want to
33505 + build without big buffers when they normally would be selected, use:
33507 + make xxxx KFLAGS=-DNOBIGBUF
33509 + There are options to control Kermit's packet buffer allocations. The
33510 + following symbols are defined in [83]ckcker.h in such a way that you
33511 + can override them by redefining them in CFLAGS:
33513 + -DMAXSP=xxxx - Maximum send-packet length.
33514 + -DMAXRP=xxxx - Maximum receive-packet length.
33515 + -DSBSIZ=xxxx - Total allocation for send-packet buffers.
33516 + -DRBSIZ=xxxx - Total allocation for receive-packet buffers.
33518 + The defaults depend on the platform.
33520 + Using dynamic allocation (-DDYNAMIC) reduces storage requirements for
33521 + the executable program on disk, and allows more and bigger packets at
33522 + runtime. This has proven safe over the years, and now most builds
33523 + (e.g. all Unix, VMS, Windows, and OS/2 ones) use dynamic memory
33524 + allocation by default. If it causes trouble, however, then omit the
33525 + -DDYNAMIC option from CFLAGS, or add -DNODYNAMIC.
33527 + 6.3. Other Size-Related Items
33529 + To make Kermit compile and load successfully, you might have to change
33530 + your build procedure to:
33532 + a. Request a larger ("large" or "huge") compilation / code-generation
33533 + model. This is needed for 16-bit PC-based UNIX versions (most or
33534 + all of which fail to build C-Kermit 7.0 and later anyway). This is
33535 + typically done with a -M and/or -F switch (see your cc manual or
33536 + man page for details).
33537 + b. Some development systems support overlays. If the program is too
33538 + big to be built as is, check your loader manual ("man ld") to see
33539 + if an overlay feature is available. See the 2.10/2.11 BSD example
33540 + in the UNIX makefile. (Actually, as of version 7.0, C-Kermit is
33541 + too big to build, period, even with overlays, on 2.xx BSD).
33542 + c. Similarly, some small and/or segment-based architectures support
33543 + "code mapping", which is similar to overlays (PDP11-based VENIX
33544 + 1.0, circa 1984, was an example). See the linker documentation on
33545 + the affected platform.
33547 + It is also possible to reduce the size of the executable program file
33548 + in several other ways:
33550 + a. Include the -O (optimize) compiler switch if it isn't already
33551 + included in your "make" entry (and if it works!). If your compiler
33552 + supports higher levels of optimization (e.g. -O2 or higher number,
33553 + -Onolimit (HP-UX), etc), try them; the greater the level of
33554 + optimization, the longer the compilation and more likely the
33555 + compiler will run out of memory. The the latter eventuality, some
33556 + compilers also provide command-line options to allocate more
33557 + memory for the optimizer, like "-Olimit number" in Ultrix.
33558 + b. If your platofrm supports shared libraries, change the make entry
33559 + to take advantage of this feature. The way to do this is, of
33560 + course, platform dependent; see the NeXT makefile target for an
33561 + example. some platforms (like Solaris) do it automatically and
33562 + give you no choice. But watch out: executables linked with shared
33563 + libraries are less portable than statically linked executables.
33564 + c. Strip the program image after building ("man strip" for further
33565 + info), or add -s to the LNKFLAGS (UNIX only). This strips the
33566 + program of its symbol table and relocation information.
33567 + d. Move character strings into a separate file. See the 2.11 BSD
33568 + target for an example.
33570 + 6.4. Space/Time Tradeoffs
33572 + There are more than 6000 debug() statements in the program. If you
33573 + want to save both space (program size) and time (program execution
33574 + time), include -DNODEBUG in the compilation. If you want to include
33575 + debugging for tracking down problems, omit -DNODEBUG from the make
33576 + entry. But when you include debugging, you have two choices for how
33577 + it's done. One definition defines debug() to be a function call; this
33578 + is cheap in space but expensive in execution. The other defines debug
33579 + as "if (deblog)" and then the function call, to omit the function call
33580 + overhead when the debug log is not active. But this adds a lot of
33581 + space to the program. Both methods work, take your choice; IFDEBUG is
33582 + preferred if memory is not a constraint but the computer is likely to
33583 + be slow. The first method is the default, i.e. if nothing is done to
33584 + the CFLAGS or in [84]ckcdeb.h (but in some cases, e.g. VMS, it is). To
33585 + select the second method, include -DIFDEBUG in the compilation (and
33586 + don't include -DNODEBUG).
33588 + [ [85]C-Kermit Home ] [ [86]Kermit Home ]
33589 + ________________________________________________________________________
33593 + [ [87]Top ] [ [88]Contents ] [ [89]Next ] [ [90]Previous ]
33595 + -DNODIAL removes automatic modem dialing completely, including the
33596 + entire [91]ckudia.c module, plus all commands that refer to dialing in
33597 + the various ckuus*.c modules.
33599 + -DMINIDIAL leaves the DIAL and related commands (SET/SHOW MODEM,
33600 + SET/SHOW DIAL) intact, but removes support for all types of modems
33601 + except CCITT, Hayes, Unknown, User-defined, Generic-high-speed, and
33602 + None (= Direct). The MINIDIAL option cuts the size of the dial module
33603 + approximately in half. Use this option if you have only Hayes or CCITT
33604 + modems and don't want to carry the baggage for the other types.
33606 + A compromise between full dialer support and MINIDIAL is obtained by
33607 + removing support for "old" modems -- all the strange non-Hayes
33608 + compatible 1200 and 2400 bps modems that C-Kermit has been carrying
33609 + around since 1985 or so. To remove support for these modems, add
33610 + -DNOOLDMODEMS to CFLAGS at compilation time.
33612 + Finally, if you keep support for old modems, you will notice that
33613 + their names appear on the "set modem ?" menu. That's because their
33614 + names are, by default, "visible". But the list is confusing to the
33615 + younger generation, who have only heard of modems from the
33616 + V.32bis-and-later era. If you want to be able to use old modems, but
33617 + don't want their names cluttering up menus, add this to CFLAGS:
33621 + [ [92]C-Kermit Home ] [ [93]Kermit Home ]
33622 + ________________________________________________________________________
33624 + 8. NETWORK SUPPORT
33626 + [ [94]Top ] [ [95]Contents ] [ [96]Next ] [ [97]Previous ]
33632 + 8.3. [100]Other Networks
33634 + C-Kermit supports not only serial-port and modem connections, but also
33635 + TCP/IP and X.25 network connections. Some versions support other
33636 + network types too like DECnet, LAT, NETBIOS, etc. If you define the
33637 + following symbol:
33641 + then all network support is compiled away.
33645 + SUBSECTION CONTENTS
33647 + 8.1.1. [101]Firewalls
33648 + 8.1.2. [102]Compilation and Linking Problems
33649 + 8.1.3. [103]Enabling Host Address Lists
33650 + 8.1.4. [104]Enabling Telnet NAWS
33651 + 8.1.5. [105]Enabling Incoming TCP/IP Connections
33652 + 8.1.6. [106]Disabling SET TCP Options
33654 + C-Kermit's TCP/IP features require the Berkeley sockets library or
33655 + equivalent, generally available on any Unix system, as well as in
33656 + Windows 9x/NT, OS/2, VMS, AOS/VS, VOS, etc. The TCP/IP support
33657 + includes built-in TELNET, FTP, and HTTP protocol. To select TCP/IP
33658 + support, include -DTCPSOCKET in your makefile target's CFLAGS, or (in
33659 + VMS) the appropriate variant (e.g. -DWOLLONGONG, -DMULTINET,
33660 + -DEXCELAN, -DWINTCP, etc).
33662 + The VMS and/or early Unix third-party TCP/IP products are often
33663 + incompatible with each other, and sometimes with different versions of
33664 + themselves. For example, Wollongong reportedly put header files in
33665 + different directories for different UNIX versions:
33667 + * in.h can be in either /usr/include/sys or /user/include/netinet.
33668 + * telnet.h can be in either /usr/include/arpa or
33669 + /user/include/netinet.
33670 + * inet.h can be in either /usr/include/arpa or /user/include/sys.
33672 + In cases like this, use the -I cc command-line option when possible;
33673 + otherwise it's better to make links in the file system than it is to
33674 + hack up the C-Kermit source code. Suppose, for example, Kermit is
33675 + looking for telnet.h in /usr/include/arpa, but on your computer it is
33676 + in /usr/include/netinet. Do this (as root, or get the system
33677 + administrator to do it):
33679 + cd /usr/include/arpa
33680 + ln /usr/include/netinet/telnet.h telnet.h
33682 + ("man ln" for details about links.)
33684 + The network support for TCP/IP and X.25 is in the source files
33685 + [107]ckcnet.h, [108]ckctel.c, [109]ckctel.c, [110]ckctel.h,
33686 + [111]ckcftp.c, with miscellaneous SHOW commands, etc, in the various
33687 + ckuus*.c modules, plus code in the ck*con.c or ckucns.c (CONNECT
33688 + command) and several other modules to detect TELNET negotiations, etc.
33690 + Within the TCPSOCKET code, some socket-level controls are included if
33691 + TCPSOCKET is defined in the C-Kermit CFLAGS and SOL_SOCKET is defined
33692 + in in the system's TCP-related header files, such as <sys/socket.h>.
33695 + SET TCP KEEPALIVE
33700 + In addition, if TCP_NODELAY is defined, the following command is also
33703 + SET TCP NODELAY (Nagle algorithm)
33705 + See the [112]C-Kermit user documentation for descriptions of these
33710 + There exist various types of firewalls, set up to separate users of an
33711 + internal TCP/IP network ("Intranet") from the great wide Internet, but
33712 + then to let selected users or services get through after all.
33714 + One firewall method is called SOCKS, in which a proxy server allows
33715 + users inside a firewall to access the outside world, based on a
33716 + permission list generally stored in a file. SOCKS is enabled in one of
33717 + two ways. First, the standard sockets library is modified to handle
33718 + the firewall, and then all the client applications are relinked (if
33719 + necessary, i.e. if the libraries are not dynamically loaded) with the
33720 + modified sockets library. The APIs are all the same, so the
33721 + applications do not need to be recoded or recompiled.
33723 + In the other method, the applications must be modified to call
33724 + replacement routines, such as Raccept() instead of accept(), Rbind()
33725 + instead of bind(), etc, and then linked with a separate SOCKS library.
33726 + This second method is accomplished (for SOCKS4) in C-Kermit by
33727 + including -DCK_SOCKS in your CFLAGS, and also adding:
33731 + to LIBS, or replacing -lsockets with -lsocks (depending on whether the
33732 + socks library also includes all the sockets entry points).
33734 + For SOCKS5, use -DCK_SOCKS5.
33736 + Explicit firewall support can, in general, not be a standard feature
33737 + or a feature that is selected at runtime, because the SOCKS library
33738 + tends to be different at each site -- local modifications abound.
33740 + The ideal situation occurs when firewalls are supported by the first
33741 + method, using dynamically linked sockets-replacement libraries; in
33742 + this case, all your TCP/IP client applications negotiate the firewall
33745 + 8.1.2. Compilation and Linking Problems
33747 + If you get a compilation error in [113]ckcnet.c, with a complaint like
33748 + "incompatible types in assignment", it probably has something to do
33749 + with the data type your system uses for the inet_addr() function,
33750 + which is declared (usually) in <arpa/inet.h>. Kermit uses "unsigned
33751 + long" unless the symbol INADDRX is defined, in which case "struct
33752 + inaddr" is used instead. Try adding -DINADDRX to CFLAGS in your make
33753 + entry, and if that fixes the problem, please send a report to
33754 + kermit@columbia.edu.
33756 + Compilation errors might also have to do with the data type used for
33757 + getsockopt() and setsockopt() option-length field. This is normally an
33758 + int, but sometimes it's a short, a long, or an unsigned any of those,
33759 + or a size_t. To fix the compilation problem, add -DSOCKOPT_T=xxx to
33760 + the CFLAGS in your makefile target, where xxx is the appropriate type
33761 + (use "man getsockopt" or grep through your system/network header files
33762 + to find the needed type).
33764 + 8.1.3. Enabling Host Address Lists
33766 + When you give Kermit an IP host name, it calls the socket routine
33767 + gethostbyname() to resolve it. gethostbyname() returns a hostent
33768 + struct, which might or might not not include a list of addresses; if
33769 + it does, then if the first one fails, Kermit can try the second one,
33770 + and so on. However, this will only work if the symbol "h_addr" is a
33771 + macro defined as "h_addr_list[0]", usually in netdb.h. If it is, then
33772 + you can activate this feature by defining the following symbol in
33777 + 8.1.4. Enabling Telnet NAWS
33779 + The Telnet Negotiation About Window Size (NAWS) option requires the
33780 + ability to find out the terminal screen's dimensions. E.g. in Unix, we
33781 + need something like ioctl(0, TIOCGWINSZ, ...). If your version of
33782 + Kermit was built with NAWS capability, SHOW VERSIONS includes CK_NAWS
33783 + among the compiler options. If it doesn't, you can add it by defining
33784 + CK_NAWS at compile time. Then, if the compiler or linker complain
33785 + about undefined or missing symbols, or there is no complaint but SHOW
33786 + TERMINAL fails to show reasonable "Rows =, Columns =" values, then
33787 + take a look at (or write) the appropriate ttgwsiz() routine. On the
33788 + other hand, if CK_NAWS is defined by default for your system (in
33789 + [114]ckcnet.h), but causes trouble, you can override this definition
33790 + by including the -DNONAWS switch on your CC command line, thus
33791 + disabling the NAWS feature.
33793 + This appears to be needed at least on the AT&T 3B2, where in
33794 + [115]ckutio.c, the routine ttgwsiz() finds that the TIOCGWINSZ symbol
33795 + is defined but lacks definitions for the corresponding winsize struct
33796 + and its members ws_col and ws_row.
33798 + The UNIX version of C-Kermit also traps SIGWINCH, so it can send a
33799 + NAWS to the Telnet server any time the local console terminal window
33800 + size changes, e.g. when you stretch it with a mouse. The
33801 + SIGWINCH-trapping code is enabled if SIGWINCH is defined (i.e. in
33802 + signal.h). If this code should cause problems, you can disable it
33803 + without disabling the NAWS feature altogether, by defining NOSIGWINCH
33806 + 8.1.5. Enabling Incoming TCP/IP Connections
33808 + This feature lets you "set host * port" and wait for an incoming
33809 + connection on the given port. This feature is enabled automatically at
33810 + compile if TCPSOCKET is defined and SELECT is also defined. But watch
33811 + out, simply defining SELECT on the cc command line does not guarantee
33812 + successful compilation or linking (see [116]Section 11).
33814 + If you want to disable incoming TCP/IP connections, then build
33819 + 8.1.6. Disabling SET TCP Options
33821 + The main reason for this is because of header file / prototype
33822 + conflicts at compile time regardting get- / setsockopt(). If you can't
33823 + fix them (without breaking other builds), add the following in CFLAGS:
33829 + X.25 support requires (a) a Sun, (b) the SunLink product (libraries
33830 + and header files), and (c) an X.25 connection into your Sun. Similarly
33831 + (in C-Kermit 7.0 or later) Stratus VOS and IBM AIX.
33833 + In UNIX, special makefile targets sunos4x25 and sunos41x25 (for SUNOS
33834 + 4.0 and 4.1, respectively), or aix41x25, are provided to build in this
33835 + feature, but they only work if conditions (a)-(c) are met. To request
33836 + this feature, include -DSUNX25 (or -DIBMX25) in CFLAGS.
33838 + SUNX25 (or -DIBMX25) and TCPSOCKET can be freely mixed and matched,
33839 + and selected by the user at runtime with the SET NETWORK TYPE command
33840 + or SET HOST switches.
33842 + 8.3. Other Networks
33844 + Support for other networking methods -- NETBIOS, LAT, Named Pipes, etc
33845 + -- is included in ck*net.h and ck*net.c for implementations (such as
33846 + Windows or OS/2) where these methods are supported.
33848 + Provision is made in the organization of the modules, header files,
33849 + commands, etc, for addition of new network types such as DECnet, X.25
33850 + for other systems (HP-UX, VMS, etc), and so on. Send email to
33851 + [117]kermit@columbia.edu if you are willing and able to work on such a
33854 + [ [118]C-Kermit Home ] [ [119]Kermit Home ]
33855 + ________________________________________________________________________
33857 + 9. EXCEPTION HANDLING
33859 + [ [120]Top ] [ [121]Contents ] [ [122]Next ] [ [123]Previous ]
33861 + The C language setjmp/longjmp mechanism is used for handling
33862 + exceptions. The jump buffer is of type jmp_buf, which almost
33863 + everywhere is typedef'd as an array, in which case you should have no
33864 + trouble compiling the exception-handling code. However, if you are
33865 + building C-Kermit in/for an environment where jmp_buf is something
33866 + other than an array (e.g. a struct), then you'll have to define the
33867 + following symbol:
33871 + [ [124]C-Kermit Home ] [ [125]Kermit Home ]
33872 + ________________________________________________________________________
33874 + 10. SECURITY FEATURES
33876 + [ [126]Top ] [ [127]Contents ] [ [128]Next ] [ [129]Previous ]
33878 + Security, in the sense of secure authentication and strong encryption,
33879 + can be built into versionf of C-Kermit for which the appropriate
33880 + libraries and header files are available (Kerberos IV, Kerberos V,
33881 + OpenSSL, SRP), as explained in great detail in the Kermit Security
33883 + . The following symbols govern C-Kermit's security features at build
33886 + NO_AUTHENTICATION
33887 + Means do not configure any TELNET AUTHENTICATION support. It
33888 + implies NO_ENCRYPTION and undefines any of the auth and encrypt
33889 + types. It does not undefine CK_SSL even though builds with
33890 + CK_SSL cannot succeed without CK_AUTHENTICATION. (This will be
33891 + supported in a future release. It will be needed to allow
33892 + C-Kermit to be built only as an FTP client.)
33895 + Means do not compile in any KERBEROS support when
33896 + CK_AUTHENTICATION has been defined.
33899 + Do not compile in any SRP support when CK_AUTHENTICATION has
33903 + Do not compile in any SSL/TLS support
33906 + Do not compile in any Telnet encryption support. It does not
33907 + affect the use of SSL/TLS
33910 + Do not compile in any SSH support whether internal or external
33912 + CK_AUTHENTICATION
33913 + Telnet AUTHENTICATION support. (Also, required if SSL/TLS
33914 + support is desired.) On most platforms this does not autodefine
33915 + any authentication mechanisms such as Kerberos V, Kerberos IV,
33916 + SRP, ... Those need to be defined separately.
33919 + Defined automatically when KRB4, KRB5, or KRB524 are defined.
33920 + Implies that some version of Kerberos is in use.
33923 + Should be defined when Kerberos IV support is desired.
33926 + Should be defined when Kerberos V support is desired.
33929 + Should be defined if both Kerberos V and Kerberos IV are used
33930 + and the Kerberos IV support is provided by the MIT Kerberos IV
33931 + compatibility library in the current Kerberos 5 distribution.
33934 + Should be defined if KRB5 is defined and Kerberos 5 User to
33935 + User mode is desired.
33938 + Should be defined if Kerberos V support is provided by HEIMDAL.
33939 + Support for this option is not complete in C-Kermit 8.0. Anyone
33940 + interested in working on this should contact kermit-support.
33943 + Should be defined if SRP support is desired.
33946 + Should be defined if TELNET ENCRYPTION option support is
33947 + desired. This option does not define any particular encryption
33948 + types. That should be done by defining CK_DES or CK_CAST.
33951 + Should be defined if either DES or 3DES Telnet Encryption
33952 + option support is desired.
33955 + If CK_DES is defined and DES support is being provided by
33956 + either Eric Young's libdes.a or OpenSSL 0.9.6x or earlier, this
33957 + option must be defined. If it is not defined, it will be
33958 + assumed that DES support is provided by the MIT Kerberos IV
33962 + Should be defined if CAST Telnet Encryption option support is
33966 + Should be defined if SSL/TLS support (OpenSSL) is desired.
33969 + If KRB5 is defined, and OpenSSL is built to support the
33970 + Kerberos 5 ciphers, then you should define SSL_KRB5
33973 + If you are using OpenSSL 0.9.7 or higher and do not wish to
33974 + build with support for Kerberos 5 TLS ciphers, this option must
33978 + If you are using OpenSSL 0.9.6 or higher and it has been
33979 + compiled with support for ZLIB compression, this option should
33980 + be defined to enable Kermit to properly enable the use of
33984 + Defined for C-Kermit to enable the use of external SSH clients
33985 + from the Kermit command language
33988 + Defined for Kermit implementations that have integrated SSH
33989 + support. Currently only Windows.
33992 + Defined if either SSHCMD or SSHBUILTIN are defined.
33995 + Telnet Send Location support.
33998 + Do not include Telnet Send Location support.
34001 + Telnet X-Display Location support. Determines if the X-Display
34002 + location information is sent to the Telnet server either via
34003 + Telnet XDISPLOC or NEW-ENV options.
34006 + Do not include Telnet X-Display Location support.
34009 + Telnet Forward X Windows Session Data option. Used to protect
34010 + the privacy and integrity of X Windows Sessions when secure
34011 + telnet sessions are in use.
34014 + Do not include Telnet Forward X Windows Session Data option.
34016 + Besides the strong forms of security listed above, C-Kermit also
34017 + embodies various internal security features, including:
34020 + Compiling with the NOPUSH symbol defined removes all the "shell
34021 + escape" features from the program, including the PUSH, RUN, and
34022 + SPAWN commands, the "!" and "@" command prefixes, OPEN !READ,
34023 + OPEN !WRITE, job control (including the SUSPEND command), the
34024 + REDIRECT command, shell/DCL escape from CONNECT mode, as well
34025 + as the server's execution of REMOTE HOST commands (and, of
34026 + course, the ENABLE HOST command). Add NODISPO to also prevent
34027 + acceptance of incoming MAIL or REMOTE PRINT files. For UNIX,
34028 + also be sure to read [130]Section 11 of the [131]Unix C-Kermit
34029 + Installation Instructions. about set[ug]id configuration.
34030 + Additional restrictions can be enforced when in server mode;
34031 + read about the DISABLE command in the user manual.
34034 + Compiling with NOCCTRAP prevents the trapping of SIGINT by
34035 + Kermit. Thus if the user generates a SIGINT signal (e.g. by
34036 + typing the system's interrupt character), Kermit will exit
34037 + immediately, rather than returning to its prompt.
34039 + NOPUSH and NOCCTRAP together allow Kermit to be run from restricted
34040 + shells, preventing access to system functions.
34042 + [ [132]C-Kermit Home ] [ [133]Kermit Home ]
34043 + ________________________________________________________________________
34045 + 11. ENABLING SELECT()
34047 + [ [134]Top ] [ [135]Contents ] [ [136]Next ] [ [137]Previous ]
34049 + Kermit works best if it can do nonblocking reads, nondestructive input
34050 + buffer checking, and millisecond sleeps. All of these functions can be
34051 + accomplished by the select() function, which, unfortunately, is not
34052 + universally available. Furthermore, select() is required if incoming
34053 + TCP/IP connections are to be supported.
34055 + select() was introduced with Berkeley UNIX, rejected by AT&T for
34056 + System V, but is gradually creeping in to all UNIX versions (and other
34057 + operating systems too) by virtue of its presence in the sockets
34058 + library, which is needed for TCP/IP. AT&T SVID for System V R4
34059 + includes select(), but that does not mean that all SVR4
34060 + implementations have it.
34062 + Furthermore, even when select() is available, it might work only on
34063 + socket file descriptors, but not on others like serial ports, pipes,
34064 + etc. For example, in AOS/VS and BeOS, it works only with file
34065 + descriptors that were created by socket() and opened by connect() or
34068 + Other alternatives include poll() and rdchk(). Only one of these three
34069 + functions should be included. The following symbols govern this:
34071 + SELECT Use select() (BSD, or systems with sockets libraries)
34072 + CK_POLL Use poll() (System V)
34073 + RDCHK Use rdchk() (SCO XENIX and UNIX)
34075 + If your system supports the select() function, but your version of
34076 + C-Kermit does not, try adding:
34080 + to the CFLAGS, and removing -DRDCHK or -DCK_POLL if it is there. If
34081 + you get compilation errors, some adjustments to ck*tio.c and/or
34082 + ck*net.c might be needed; search for SELECT (uppercase) in these files
34083 + (note that there are several variations on the calling conventions for
34086 + Various macros and data types need to be defined in order to use
34087 + select(). Usually these are picked up from <types.h> or <sys/types.h>.
34088 + But on some systems, they are in <sys/select.h>. In that case, add the
34093 + to the CFLAGS to tell C-Kermit to #include <sys/select.h>. A good
34094 + indication that you need to do this would be if you get compile-time
34095 + complaints about "fd_set" or "FD_SET" not being declared or defined.
34097 + In UNIX, the use of select() vs fork() in the CONNECT command is
34098 + independent of the above considerations, and is governed by choosing a
34099 + particular makefile target.
34101 + As of C-Kermit 7.0, select() is also the preferred control mechanism
34102 + for the CONNECT command. Unfortunately, the structures used by the
34103 + original UNIX CONNECT command, based on fork(), and those used by
34104 + select(), are so different, it was not practical to implement them
34105 + both in one module. So the select()-based CONNECT command module for
34106 + UNIX is [138]ckucns.c, and the fork-based one remains [139]ckucon.c.
34107 + To choose the fork-based one, which is more portable (but slower and
34108 + more fragile), use "wermit" as the make target. To choose the
34109 + select-based one, use "xermit". Only do this if you can verify that
34110 + the CONNECT command works on serial connections and PIPE connections
34111 + as well as TCP connections.
34113 + The select()-based Unix CONNECT module, ckucns.c, must be used if
34114 + encryption is to be done, since the fork() version (ckucon.c) loses
34115 + its ability to share vital state information between the two forks.
34116 + Also note that the select() version is superior in many other ways
34117 + too. For example, it recovers better from exterior killing, forced
34118 + disconnections, etc, plus it goes faster.
34120 + SHOW VERSIONS tells whether the CONNECT module uses fork() or
34123 + C-Kermit 8.0 adds learned script capability, which depends on
34124 + select(). All the "wermit" based targets (as opposed to "xermit") had
34125 + NOLEARN added to them. Whenever changing a target over from wermit to
34126 + xermit, also remember to remove NOLEARN.
34128 + [ [140]C-Kermit Home ] [ [141]Kermit Home ]
34129 + ________________________________________________________________________
34131 + 12. I/O REDIRECTION
34133 + [ [142]Top ] [ [143]Contents ] [ [144]Next ] [ [145]Previous ]
34135 + The REDIRECT command allows a local program to be run with its i/o
34136 + redirected over the communications connection. Your version of
34137 + C-Kermit has a REDIRECT command if it was built with the following
34142 + This, in turn, is possible only if the underlying API is there. In the
34143 + case of UNIX this is just the wait() system call, so all UNIX versions
34144 + get this feature as of 6.0.192 (earlier versions needed a <sys/wait.h>
34145 + header file defining the symbols WIFEXITED and WEXITSTATUS).
34147 + As of version 7.0, file transfer can be done using pipes and filters.
34148 + To enable this feature, #define PIPESEND (and fill in the code). To
34149 + disable on systems where it is normally enabled, define NOPIPESEND.
34150 + This feature is, of course, also disabled by building with NOPUSH (or
34151 + giving the "nopush" command at runtime).
34153 + C-Kermit 7.0 also adds the PIPE and SET HOST /COMMAND commands, which
34154 + provide another form of redirection. This feature is selected with
34155 + -DNETCMD. CK_RDIR must also be defined, since the same mechanisms are
34158 + [ [146]C-Kermit Home ] [ [147]Kermit Home ]
34159 + ________________________________________________________________________
34161 + 13. FLOATING-POINT NUMBERS, TIMERS, AND ARITHMETIC
34163 + [ [148]Top ] [ [149]Contents ] [ [150]Next ] [ [151]Previous ]
34165 + Floating-point support was added in C-Kermit 7.0.
34167 + Floating-point numbers are enabled internally, at least for use in
34168 + high-precision file-transfer timers and statistics, unless the
34169 + following symbol is defined at compile time:
34173 + This might be necessary on old PCs that do not have built-in
34174 + floating-point hardware.
34176 + When NOFLOAT is not defined, the following symbol tells which
34177 + floating-point type to use:
34181 + The value is either "double" (normal for 32- and 16-bit architectures)
34182 + or "float" (normal for 64-bit architectures).
34184 + C-Kermit can be configured to use high-precision file-transfer timers
34185 + for more accurate statistics. This feature is enabled with:
34189 + and disabled with:
34193 + If you try to build with -DGFTIMER but you get compilation errors,
34194 + either fix them (and send email to kermit@columbia.edu telling what
34195 + you did), or else give up and use -DNOGFTIMER (or -DNOFLOAT) instead.
34196 + Hint: depending on your machine architecture, you might have better
34197 + luck using double than float as the data type for floating-point
34198 + numbers, or vice versa. Look in [152]ckcdeb.h for the CKFLOAT
34201 + Floating-point arithmetic is also supported in the script programming
34202 + language. First via the \fpp...() functions, such as \fppadd(), which
34203 + adds two floating-point numbers, second in S-Expressions. Addition,
34204 + subtraction, multiplication, and division are always available. But
34205 + other functions such as logs, raising to powers, sines and cosines,
34206 + etc, require the C Math library. To include user-level floating-point
34207 + math you must put:
34211 + and in Unix you must link with the Math library:
34215 + In K95 and VMS, FNFLOAT is defined automatically if CKFLOAT is
34216 + defined. In Unix, however, FNFLOAT must be added to each makefile
34217 + target individually, because of the special linking instructions that
34218 + must also be added to each target.
34220 + Note: S-Expressions require FNFLOAT.
34222 + [ [153]C-Kermit Home ] [ [154]Kermit Home ]
34223 + ________________________________________________________________________
34225 + 14. SPECIAL CONFIGURATIONS
34227 + [ [155]Top ] [ [156]Contents ] [ [157]Previous ]
34229 + As of C-Kermit 7.0, if you build C-Kermit normally, but with -DNOICP
34230 + (No Interactive Command Parser), you get a program capable of making
34231 + serial connections (but not dialing) and network connections (if
34232 + TCPSOCKET or other network option included), and can also transfer
34233 + files using Kermit protocol, but only via autodownload/upload.
34234 + Furthermore, if you call the executable "telnet", it will act like
34235 + Telnet -- using the command-line options. However, in this case there
34236 + is nothing to escape back to, so if you type Ctrl-\c, it just prints a
34237 + message to this effect.
34239 + You can also build C-Kermit with -DNOXFER, meaning omit all the
34240 + file-transfer features. This leaves you with a scriptable
34241 + communications program that is considerably smaller than the full
34244 + [ [158]C-Kermit Home ] [ [159]Kermit Home ]
34245 + ________________________________________________________________________
34247 + APPENDIX I: SUMMARY OF COMPILE-TIME OPTIONS
34249 + [ [160]Top ] [ [161]Contents ]
34251 + These are the symbols that can be specified on the cc command line,
34252 + listed alphabetically. Others are used internally, including those
34253 + taken from header files, those defined by the compiler itself, and
34254 + those inferred from the ones given below. Kermit's SHOW VERSIONS
34255 + command attempts to display most of these. See [162]ckcdeb.h and
34256 + [163]ckcnet.h for inference rules. For example SVR3 implies ATTSV,
34257 + MULTINET implies TCPSOCKET, and so on.
34259 + Here is the complete list of the Kermit-specific compile-time
34262 + ACUCNTRL Select BSD 4.3-style acucntrl() bidirectional tty control.
34263 + aegis Build for Apollo Aegis (predefined on Apollo systems).
34264 + AIX370 Build for IBM AIX/370 for IBM mainframes.
34265 + AIXESA Build for IBM AIX/ESA for IBM mainframes.
34266 + AIXPS2 Build for IBM AIX 3.0 for PS/2 series (never formally
34268 + AIXRS Build for IBM AIX 3.x on RS/6000.
34269 + AIX41 Build for IBM AIX 4.x on RS/6000.
34270 + AMIGA Build for Commodore Amiga with Intuition OS.
34271 + ATT6300 Build for AT&T 6300 PLUS.
34272 + ATT7300 Build for AT&T 7300 UNIX PC (3B1).
34273 + ATTSV Build for AT&T System III or V UNIX.
34274 + AUX Build for Apple A/UX for the Macintosh.
34275 + BIGBUFOK OK to use big buffers - "memory is not a problem"
34276 + BPS_xxxx Enable SET SPEED xxxx
34277 + BSD29 Build for BSD 2.9 or 2.10.
34278 + BSD4 Build for BSD 4.2.
34279 + BSD41 Build for BSD 4.1.
34280 + BSD43 Build for BSD 4.3.
34281 + BSD44 Build for BSD 4.4.
34282 + C70 Build for BBN C/70.
34283 + CIE Build for CIE Systems 680/20.
34284 + CKCONINTB4CB Work around prompt-disappears after escape back from
34286 + CKLEARN Build with support for learned scripts.
34287 + CKLOGDIAL Enable connection log.
34288 + CKMAXPATH Maximum length for a fully qualified filename.
34289 + CKREGEX (misnomer) Include [...] or {xxx,xxx,xxx} matching in
34291 + CKSYSLOG Enable syslogging.
34292 + CK_ANSIC Enable ANSI C constructs - prototypes, etc.
34293 + CK_ANSILIBS Use header files for ANSI C libraries.
34294 + CK_APC Enable APC execution by CONNECT module.
34295 + CK_CURSES Enable fullscreen file transfer display.
34296 + CK_DSYSINI Use system-wide init file, with name supplied by Kermit.
34297 + CK_DTRCD DTR/CD flow control is available.
34298 + CK_FAST Build with fast Kermit protocol defaults.
34299 + CK_FORK_SIG UNIX only: signal() number for CONNECT module forks.
34300 + CK_IFRO IF REMOTE command is available (and can run in remote mode).
34301 + CK_INI_A System-wide init file takes precedence over user's.
34302 + CK_INI_B User's init file takes precedence over the system-wide one.
34303 + CK_LABELED Include support for SET FILE TYPE LABELED.
34304 + CK_LBRK This version can send Long BREAK.
34305 + CK_LINGER Add code to turn of TCP socket "linger" parameter.
34306 + CK_MKDIR This version has a zmkdir() command to create directories.
34307 + CK_NAWS Include TELNET Negotiate About Window Size support.
34308 + CK_NEWTERM Use newterm() rather than initscr() to initialize curses.
34309 + CK_PAM Include PAM authentication (might also require -lpam).
34310 + CK_PCT_BAR Fullscreen file transfer display should include
34312 + CK_POLL System-V or POSIX based UNIX has poll() function.
34313 + CK_POSIX_SIG Use POSIX signal handing: sigjmp_buf, sigsetjmp,
34315 + CK_READ0 read(fd,&x,0) can be used to test TCP/IP connections.
34316 + CK_REDIR Enable the REDIRECT command.
34317 + CK_RESEND Include the RESEND command (needs zfseek() + append).
34318 + CK_RTSCTS RTS/CTS flow control is available.
34319 + CK_SHADOW Include support for shadow passwords (e.g. for IKSD
34321 + CK_SOCKBUF Enable TCP socket-buffer-size-increasing code.
34322 + CK_SOCKS UNIX only: Build with socks library rather than regular
34324 + CK_SOCKS5 UNIX only: Build with socks 5 lib rather than regular
34326 + CK_SPEED Enable control-character unprefixing.
34327 + CK_SYSINI="xxxxx" Quoted string to be used as system-wide init file
34329 + CK_TIMERS Build with support for dynamically calculated packet
34331 + CK_TMPDIR This version of Kermit has an isdir() function.
34332 + CK_TTYFD Defined on systems where the communications connection file
34333 + descriptor (ttyfd) can be passed to other processes as a command-line
34334 + argument via \v(ttyfd).
34335 + CK_URL Parse URLs as well as hostnames, etc.
34336 + CK_XONXOFF Xon/Xoff flow control available.
34337 + CK_XYZ Include support for XYZMODEM protocols.
34338 + CK_WREFRESH Curses package includes wrefresh(),clearok() for screen
34340 + CKFLOAT=type Floating-point data type, "double" or "float".
34341 + CKTYP_H=xxx Force include of xxx as <types.h> file.
34342 + CLSOPN When hanging up a tty device, also close and reopen it.
34343 + CMDDEP Maximum recursion depth for self-referential user-defined fn's.
34344 + COHERENT Build for Mark Williams Coherent UNIX
34345 + CONGSPD Define if this version has congspd() routine in ck?tio.c
34346 + datageneral Build for Data General AOS/VS or AOS/VS II
34347 + DCLPOPEN popen() is available but needs to be declared
34348 + DEC_TCPIP Build with support for DEC TCP/IP (UCX) for (Open)VMS
34349 + DGUX430 Build for DG/UX 4.30
34350 + DGUX540 Build for DG/UX 5.40
34351 + DEFPAR=x Default parity, 0, 'e', 'o', 'm', or 's'.
34352 + DFTTY=xxx Default communications device name.
34353 + DIRENT UNIX directory structure to be taken from <dirent.h>.
34354 + DIRPWDRP Prompt for password in REMOTE CWD command.
34355 + DTILDE Include UNIX ~ notation for username/home-directory
34356 + DYNAMIC Allocate file transfer packet buffers dynamically with malloc.
34357 + ENCORE Build for Encore Multimax computers.
34358 + EXCELAN Build with excelan TCP/IP.
34359 + FNFLOAT Include floating-point math functions (logs, sin, cos, exp,
34361 + FT18 Build for Fortune For:Pro 1.8.
34362 + FT21 Build for Fortune For:Pro 2.1.
34363 + GEMDOS Build for Atari ST GEMDOS.
34364 + GFTIMER Use high-precision floating-point file-transfer timers.
34365 + GID_T=xxx Group IDs are of type xxx (usually int, short, or gid_t).
34366 + HADDRLIST If gethostbyname() hostent struct contains a list of
34368 + HDBUUCP Build with support for Honey DanBer UUCP.
34369 + HPUX Build for Hewlett Packard HP-UX.
34370 + HPUX9 Build for Hewlett Packard HP-UX 9.x.
34371 + HPUX10 Build for Hewlett Packard HP-UX 10.x.
34372 + HWPARITY Define if this version can SET PARITY HARDWARE { EVEN,
34374 + I386IX Build for Interactive System V R3.
34375 + IFDEBUG Add IF stmts "if (deblog)" before "debug()" calls.
34376 + INADDRX TCP/IP inet_addr() type is struct inaddr, not unsigned long.
34377 + INTERLAN Build with support for Racal/Interlan TCP/IP.
34378 + ISDIRBUG System defs of S_ISDIR and S_ISREG have bug, define
34380 + ISIII Build for Interactive System III.
34381 + IX370 Build for IBM IX/370.
34382 + KANJI Build with Kanji character-set translation support.
34383 + LCKDIR UUCP lock directory is /usr/spool/uucp/LCK/.
34384 + LFDEVNO UUCP lockfile name uses device numbers, as in SVR4.
34385 + LINUXFSSTND For Linux, use FSSTND UUCP lockfile conventions (default).
34386 + LOCK_DIR=xxx UUCP lock directory is xxx (quoted string).
34387 + LOCKF Use lockf() (in addition to lockfiles) on serial lines
34388 + LONGFN BSD long filenames supported using <dir.h> and opendir().
34389 + LYNXOS Build for Lynx OS 2.2 or later (POSIX-based).
34390 + MAC Build for Apple Macintosh with Mac OS.
34391 + MATCHDOT Make wildcards match filenames that start with period (.)
34392 + MAXRP=number Maximum receive-packet length.
34393 + MAXSP=number Maximum send-packet length.
34394 + MDEBUG Malloc-debugging requested.
34395 + MINIDIAL Minimum modem dialer support: CCITT, Hayes, Unkown, and None.
34396 + MINIX Build for MINIX.
34397 + MIPS Build for MIPS workstation.
34398 + MULTINET Build with support for TGV MultiNet TCP/IP (VAX/VMS).
34399 + M_UNIX Defined by SCO.
34400 + NAP The nap() is available (conflicts with SELECT and USLEEP)
34401 + NAPHACK The nap() call is available but only as syscall(3112,...)
34402 + NDIR BSD long filenames supported using <ndir.h> and opendir().
34403 + NDGPWNAM Don't declare getpwnam().
34404 + NDSYSERRLIST Don't declare sys_errlist[].
34405 + NEEDSELECTDEFS select() is avaible but we need to define FD_blah
34407 + NETCMD Build with support for SET HOST /COMMAND and PIPE commands.
34408 + NEXT Build for NeXT Mach 1.x or 2.x or 3.0, 3.1, or 3.2.
34409 + NEXT33 Build for NeXT Mach 3.3.
34410 + NOANSI Disable ANSI C function prototyping.
34411 + NOAPC Do not include CK_APC code.
34412 + NOARROWKEYS Exclude code to parse ANSI arrow-key sequences.
34413 + NOB_xxxx Disable SET SPEED xxxx
34414 + NOBIGBUF Override BIGBUFOK when it is the default
34415 + NOBRKC Don't try to refer to t_brkc or t_eof tchars structure members.
34416 + NOCKFQHOSTNAME Exclude code to get fully qualified hostname in case it
34417 + causes core dumps.
34418 + NOCCTRAP Disable Control-C (SIGINT) trapping.
34419 + NOCKSPEED Disable control-prefix removal feature (SET CONTROL).
34420 + NOCKTIMERS Build without support for dynamic timers.
34421 + NOCKXYZ Overrides CK_XYZ.
34422 + NOCKREGEX Do not include [...] or {xxx,xxx,xxx} matching in ckmatch().
34423 + NOCMDL Build with no command-line option processing.
34424 + NOCOTFMC No Close(Open()) To Force Mode Change (UNIX version).
34425 + NOCSETS Build with no support for character set translation.
34426 + NOCYRIL Build with no support for Cyrillic character set translation.
34427 + NOCYRILLIC Ditto.
34428 + NODEBUG Build with no debug logging capability.
34429 + NODIAL Build with no DIAL or SET DIAL commands.
34430 + NODISPO Build to always refuse incoming MAIL or REMOTE PRINT files.
34431 + DNODISPLAY Build with no file-transfer display.
34432 + NOESCSEQ Build with no support for ANSI escape sequence recognition.
34433 + NOFAST Do not make FAST Kermit protocol settings the default.
34434 + NOFDZERO Do not use file descriptor 0 for remote-mode file transfer.
34435 + NOFILEH Do not #include <sys/file.h>.
34436 + NOFLOAT Don't include any floating-point data types or operations.
34437 + NOFRILLS Build with "no frills" (this should be phased out...)
34438 + NOFTRUNCATE Include this on UNIXes that don't have ftruncate().
34439 + NOGETUSERSHELL Include this on UNIXes that don't have getusershell().
34440 + NOGFTIMER Don't use high-precision floating-point file-transfer
34442 + NOHEBREW Build with no support for Hebrew character sets.
34443 + NOHELP Build with no built-in help.
34444 + NOIKSD Build with IKSD support excluded.
34445 + NOINITGROUPS Include this on UNIXes that don't have initgroups().
34446 + NOICP Build with no interactive command parser.
34447 + NOJC Build with no support for job control (suspend).
34448 + NOKANJI Build with no support for Japanese Kanji character sets.
34449 + NOKVERBS Build with no support for keyboard verbs (\Kverbs).
34450 + NOLATIN2 Build with no ISO Latin-2 character-set translation support.
34451 + NOLEARN Build with no support for learned scripts.
34452 + NOLINKBITS Use of S_ISLNK and _IFLNK untrustworthy; use readlink()
34454 + NOLOCAL Build without any local-mode features: No Making Connections.
34455 + NOLOGDIAL Disable connection log.
34456 + NOLOGIN Build without IKSD (network login) support.
34457 + NOLSTAT Not OK to use lstat().
34458 + NOMDMHUP Build without "modem-specific hangup" (e.g. ATH0) feature.
34459 + NOMHHOST Exclude the multihomed-host TCP/IP code (if compilcation
34461 + NOMINPUT Build without MINPUT command.
34462 + NOMSEND Build with no MSEND command.
34463 + NONAWS Do not include TELNET Negotiate About Window Size support.
34464 + NONET Do not include any network support.
34465 + NONOSETBUF (See NOSETBUF)
34466 + NOPARSEN Build without automatic parity detection.
34467 + NOPIPESEND Disable file transfer using pipes and filters.
34468 + NOPOLL Override CK_POLL definition.
34469 + NOPOPEN The popen() library call is not available.
34470 + NOPURGE Build with no PURGE command.
34471 + NOPUSH Build with no escapes to operating system.
34472 + NOREALPATH In UNIX, realpath() function is not available.
34473 + NORECALL Disable the command-recall feature.
34474 + NOREDIRECT Disable REDIRECT command.
34475 + NORENAME Don't use rename() system call, use link()/unlink() (UNIX).
34476 + NORESEND Build with no RESEND command.
34477 + NORETRY Build with no command-retry feature.
34478 + NOSCRIPT Build with no SCRIPT command.
34479 + NOSELECT Don't try to use select().
34480 + NOSERVER Build with no SERVER mode and no server-related commands.
34481 + NOSETBUF Don't make console writes unbuffered.
34482 + NONOSETBUF DO make console writes unbuffered.
34483 + NOSETREU setreuid() and/or setregid() not available.
34484 + NOSHOW Build with no SHOW command (not recommended!).
34485 + NOSIGWINCH Disable SIGWINCH signal trapping.
34486 + NOSPL Build with no script programming language.
34487 + NOSTAT Don't call stat() from mainline code.
34488 + NOSYMLINK Include this for UNIXes that don't have readlink().
34489 + NOSYSIOCTLH Do not #include <sys/ioctl.h>.
34490 + NOSYSTIMEH Co not include <sys/time.h>.
34491 + NOSYSLOG Disable syslogging code.
34492 + NOTCPOPTS Build with no SET TCP options or underlying support.
34493 + NOTLOG Build with no support for transaction logging.
34494 + NOTM_ISDST Struct tm has no tm_isdst member.
34495 + NOUNICODE Build with no support for Unicode character-set translation.
34496 + NOURL Don't parse URLs
34497 + NOUUCP Build with no UUCP lockfile support (dangerous!).
34498 + NOWARN Make EXIT WARNING be OFF by default (otherwise it's ON).
34499 + NOWREFRESH Override built-in definition of CK_WREFRESH (q.v.).
34500 + NOXFER Build with no Kermit or other file-transfer protocols.
34501 + NOXMIT Build with no TRANSMIT command.
34502 + NOXPRINT Disables transparent print code.
34503 + OLDMSG Use old "entering server mode" message (see [164]ckcmai.c).
34504 + OLINUXHISPEED Build in old Linux hi-serial-speed code (for Linux <=
34506 + OPENBSD Build for OpenBSD.
34507 + OS2 Build for OS/2.
34508 + OSF Build for OSF/1.
34509 + OSFPC Build for OSF/1 on a PC.
34510 + OSF32 Digital UNIX 3.2 or later.
34511 + OSF40 Build for Digital UNIX 4.0.
34512 + OSF50 Build for Digital UNIX 5.0.
34513 + OSK Build for OS-9.
34514 + OXOS Build for Olivetti X/OS 2.3.
34515 + PCIX Build for PC/IX
34516 + PID_T=xxx Type for pids is xxx (normally int or pid_t).
34517 + POSIX Build for POSIX: use POSIX header files, functions, etc.
34518 + _POSIX_SOURCE Disable non-POSIX features.
34519 + PROVX1 Build for Venix 1.0 on DEC Professional 3xx.
34520 + PTX Build for Dynix/PTX
34521 + PWID_T=xxx getpwid() type is xxx.
34522 + RBSIZ=xxx Define overall size of receive-packet buffer (with DYNAMIC).
34523 + RDCHK rdchk() system call is available.
34524 + RENAME rename() system call is available (UNIX).
34525 + RTAIX Build for AIX 2.2.1 on IBM RT PC.
34526 + RTU Build for Masscomp / Concurrent RTU.
34527 + SAVEDUID BSD or other non-AT&T UNIX has saved-setuid feature.
34528 + SBSIZ=xxx Define overall size of send-packet buffer (use with
34530 + SDIRENT Directory structure specified in <sys/dirent.h>.
34531 + SELECT select() function available (conflicts with RDCHK and CK_POLL)
34532 + SELECT_H Include <sys/select.h> for select()-releated definitions.
34533 + SETEUID BSD 4.4-style seteXid() functions available.
34534 + SIG_V Type for signal() is void. Used to override normal assumption.
34535 + SIG_I Type for signal() is int. Used to override normal assumption.
34536 + SOCKOPT_T Override default data type for get/setsockopt() option
34538 + SOLARIS Build for Solaris.
34539 + SOLARIS25 Build for Solaris 2.5 or later.
34540 + SONYNEWS Build for Sony NEWS-OS.
34541 + STERMIOX <sys/termiox.h> is available.
34542 + STRATUS Build for Stratus VOS.
34543 + STRATUSX25 Include Stratus VOS X.25 support.
34544 + SUN4S5 Build for SUNOS 4.x in the System V R3 environment.
34545 + SUNOS4 Build for SUNOS 4.0 in the BSD environment.
34546 + SUNOS41 Build for SUNOS 4.1 in the BSD environment.
34547 + SUNX25 Build with support for SunLink X.25.
34548 + SVR3 Build for AT&T System V Release 3.
34549 + SVR3JC Allow job control support on System V Release 3 UNIX versions.
34550 + SVR4 Build for AT&T System V Release 4.
34551 + SW_ACC_ID UNIX only -- swap real & effective ids around access()
34553 + sxaE50 Build for PFU Compact A Series SX/A TISP.
34554 + SYSLOGLEVEL=n Force syslogging at given level.
34555 + SYSTIMEH Include <sys/time.h>.
34556 + SYSUTIMEH Include <sys/utime.h> for setting file dates (88OPEN)
34557 + TCPSOCKET Build with support for TCP/IP via Berkeley sockets library.
34558 + TERMIOX <termiox.h> header file is available (mostly SVR4).
34559 + TNCODE Include TELNET-specific code.
34560 + TOWER1 Build for NCR Tower 1632 with OS 1.02.
34561 + TRS16 Build for Tandy 16/6000.
34562 + UID_T=xxx Type for uids is xxx (normally int or uid_t).
34563 + UNIX Must be defined for all UNIX versions.
34564 + UNIX351M AT&T UNIX 3.51m on the AT&T 7300 UNIX PC.
34565 + USE_ARROWKEYS Include code to parse ANSI arrow-key sequences.
34566 + USE_LSTAT OK to use lstat().
34567 + USE_MEMCPY Define this if memcpy()/memset()/memmove() available.
34568 + USE_STRERROR Define this if strerror() is available.
34569 + USLEEP usleep() system call available (conflicts with NAP & SELECT).
34570 + UTEK Build for Tektronix workstations with UTEK OS.
34571 + UTIMEH Include <utime.h> for setting file dates (SVR4, POSIX)
34572 + UTS24 Build for Amdahl UTS 2.4.
34573 + V7 Build for Version 7 UNIX.
34574 + VMS Build for VAX/VMS.
34575 + VOID=xxx VOID type for functions (int or void).
34576 + VXVE Build for CDC VX/VE 5.2.1.
34577 + WAIT_T=xxx Type of argument passed to wait().
34578 + WINTCP Build with Wollongong VAX/VMS TCP/IP (implies TCPSOCKET)
34579 + WOLLONGONG Build with Wollongong UNIX TCP/IP (implies TCPSOCKET)
34580 + XENIX Build for Xenix (SCO, Tandy, others).
34581 + XNDIR Support for BSD long filenames via <sys/ndir.h>.
34582 + XYZ_INTERNAL Support for XYZMODEM protocols is internal, not external.
34583 + ZFCDAT Define this if zfcdat() function is available in Kermit.
34584 + ZILOG Build for Zilog ZEUS.
34585 + ZJDATE Has zjdate() function that converts date to Julian format.
34586 + XPRINT Transparent print code included in CONNECT module.
34588 + [ [165]Top ] [ [166]Contents ] [ [167]C-Kermit Home ] [ [168]Kermit
34590 + _________________________________________________________________
34593 + C-Kermit Configuration Options / [169]The Kermit Project /
34594 + [170]Columbia University / [171]kermit@columbia.edu / 14 March 2003
34598 + 1. http://www.columbia.edu/kermit/
34599 + 2. http://www.columbia.edu/
34600 + 3. http://www.columbia.edu/kermit/ckccfg.html
34601 + 4. http://www.columbia.edu/kermit/ckermit.html
34602 + 5. http://www.columbia.edu/kermit/index.html
34603 + 6. http://www.columbia.edu/kermit/ckccfg.html#x1
34604 + 7. http://www.columbia.edu/kermit/ckccfg.html#x2
34605 + 8. http://www.columbia.edu/kermit/ckccfg.html#x3
34606 + 9. http://www.columbia.edu/kermit/ckccfg.html#x4
34607 + 10. http://www.columbia.edu/kermit/ckccfg.html#x5
34608 + 11. http://www.columbia.edu/kermit/ckccfg.html#x6
34609 + 12. http://www.columbia.edu/kermit/ckccfg.html#x7
34610 + 13. http://www.columbia.edu/kermit/ckccfg.html#x8
34611 + 14. http://www.columbia.edu/kermit/ckccfg.html#x9
34612 + 15. http://www.columbia.edu/kermit/ckccfg.html#x10
34613 + 16. http://www.columbia.edu/kermit/ckccfg.html#x11
34614 + 17. http://www.columbia.edu/kermit/ckccfg.html#x12
34615 + 18. http://www.columbia.edu/kermit/ckccfg.html#x13
34616 + 19. http://www.columbia.edu/kermit/ckccfg.html#x14
34617 + 20. http://www.columbia.edu/kermit/ckccfg.html#xa1
34618 + 21. http://www.columbia.edu/kermit/ckuins.html
34619 + 22. http://www.columbia.edu/kermit/ckermit.html
34620 + 23. http://www.columbia.edu/kermit/index.html
34621 + 24. http://www.columbia.edu/kermit/ckccfg.html#top
34622 + 25. http://www.columbia.edu/kermit/ckccfg.html#contents
34623 + 26. http://www.columbia.edu/kermit/ckccfg.html#x2
34624 + 27. http://www.columbia.edu/kermit/ckccfg.html#x0
34625 + 28. http://www.columbia.edu/kermit/ckermit.html
34626 + 29. http://www.columbia.edu/kermit/index.html
34627 + 30. http://www.columbia.edu/kermit/ckccfg.html#top
34628 + 31. http://www.columbia.edu/kermit/ckccfg.html#contents
34629 + 32. http://www.columbia.edu/kermit/ckccfg.html#x3
34630 + 33. http://www.columbia.edu/kermit/ckccfg.html#x1
34631 + 34. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
34632 + 35. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
34633 + 36. ftp://kermit.columbia.edu/kermit/c-kermit/ckuus3.c
34634 + 37. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
34635 + 38. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
34636 + 39. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
34637 + 40. http://www.columbia.edu/kermit/ckermit.html
34638 + 41. http://www.columbia.edu/kermit/index.html
34639 + 42. http://www.columbia.edu/kermit/ckccfg.html#top
34640 + 43. http://www.columbia.edu/kermit/ckccfg.html#contents
34641 + 44. http://www.columbia.edu/kermit/ckccfg.html#x4
34642 + 45. http://www.columbia.edu/kermit/ckccfg.html#x2
34643 + 46. ftp://kermit.columbia.edu/kermit/c-kermit/makefile
34644 + 47. http://www.columbia.edu/kermit/ckuins.html
34645 + 48. http://www.columbia.edu/kermit/ckuins.html#x4
34646 + 49. http://www.columbia.edu/kermit/ckuins.html#x9.2
34647 + 50. ftp://kermit.columbia.edu/kermit/c-kermit/ckuusx.c
34648 + 51. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
34649 + 52. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
34650 + 53. ftp://kermit.columbia.edu/kermit/c-kermit/ckuusx.c
34651 + 54. ftp://kermit.columbia.edu/kermit/c-kermit/ckucmd.c
34652 + 55. http://www.columbia.edu/kermit/ckermit.html
34653 + 56. http://www.columbia.edu/kermit/index.html
34654 + 57. http://www.columbia.edu/kermit/ckccfg.html#top
34655 + 58. http://www.columbia.edu/kermit/ckccfg.html#contents
34656 + 59. http://www.columbia.edu/kermit/ckccfg.html#x5
34657 + 60. http://www.columbia.edu/kermit/ckccfg.html#x3
34658 + 61. http://www.columbia.edu/kermit/unicode.html
34659 + 62. http://www.columbia.edu/kermit/ckermit.html
34660 + 63. http://www.columbia.edu/kermit/index.html
34661 + 64. http://www.columbia.edu/kermit/ckccfg.html#top
34662 + 65. http://www.columbia.edu/kermit/ckccfg.html#contents
34663 + 66. http://www.columbia.edu/kermit/ckccfg.html#x6
34664 + 67. http://www.columbia.edu/kermit/ckccfg.html#x4
34665 + 68. ftp://kermit.columbia.edu/kermit/c-kermit/ckuusr.h
34666 + 69. ftp://kermit.columbia.edu/kermit/c-kermit/ckuusr.h
34667 + 70. http://www.columbia.edu/kermit/ckermit.html
34668 + 71. http://www.columbia.edu/kermit/index.html
34669 + 72. http://www.columbia.edu/kermit/ckccfg.html#top
34670 + 73. http://www.columbia.edu/kermit/ckccfg.html#contents
34671 + 74. http://www.columbia.edu/kermit/ckccfg.html#x7
34672 + 75. http://www.columbia.edu/kermit/ckccfg.html#x5
34673 + 76. http://www.columbia.edu/kermit/ckccfg.html#x6.1
34674 + 77. http://www.columbia.edu/kermit/ckccfg.html#x6.2
34675 + 78. http://www.columbia.edu/kermit/ckccfg.html#x6.3
34676 + 79. http://www.columbia.edu/kermit/ckccfg.html#x6.4
34677 + 80. http://www.columbia.edu/kermit/ckccfg.html#x4
34678 + 81. http://www.columbia.edu/kermit/gkermit.html
34679 + 82. ftp://kermit.columbia.edu/kermit/c-kermit/ckuusr.h
34680 + 83. ftp://kermit.columbia.edu/kermit/c-kermit/ckcker.h
34681 + 84. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
34682 + 85. http://www.columbia.edu/kermit/ckermit.html
34683 + 86. http://www.columbia.edu/kermit/index.html
34684 + 87. http://www.columbia.edu/kermit/ckccfg.html#top
34685 + 88. http://www.columbia.edu/kermit/ckccfg.html#contents
34686 + 89. http://www.columbia.edu/kermit/ckccfg.html#x8
34687 + 90. http://www.columbia.edu/kermit/ckccfg.html#x6
34688 + 91. ftp://kermit.columbia.edu/kermit/c-kermit/ckudia.c
34689 + 92. http://www.columbia.edu/kermit/ckermit.html
34690 + 93. http://www.columbia.edu/kermit/index.html
34691 + 94. http://www.columbia.edu/kermit/ckccfg.html#top
34692 + 95. http://www.columbia.edu/kermit/ckccfg.html#contents
34693 + 96. http://www.columbia.edu/kermit/ckccfg.html#x9
34694 + 97. http://www.columbia.edu/kermit/ckccfg.html#x7
34695 + 98. http://www.columbia.edu/kermit/ckccfg.html#x8.1
34696 + 99. http://www.columbia.edu/kermit/ckccfg.html#x8.2
34697 + 100. http://www.columbia.edu/kermit/ckccfg.html#x8.3
34698 + 101. http://www.columbia.edu/kermit/ckccfg.html#x8.1.1
34699 + 102. http://www.columbia.edu/kermit/ckccfg.html#x8.1.2
34700 + 103. http://www.columbia.edu/kermit/ckccfg.html#x8.1.3
34701 + 104. http://www.columbia.edu/kermit/ckccfg.html#x8.1.4
34702 + 105. http://www.columbia.edu/kermit/ckccfg.html#x8.1.5
34703 + 106. http://www.columbia.edu/kermit/ckccfg.html#x8.1.6
34704 + 107. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.h
34705 + 108. ftp://kermit.columbia.edu/kermit/c-kermit/ckctel.c
34706 + 109. ftp://kermit.columbia.edu/kermit/c-kermit/ckctel.c
34707 + 110. ftp://kermit.columbia.edu/kermit/c-kermit/ckctel.h
34708 + 111. ftp://kermit.columbia.edu/kermit/c-kermit/ckcftp.c
34709 + 112. http://www.columbia.edu/kermit/ckermit.html
34710 + 113. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.c
34711 + 114. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.h
34712 + 115. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
34713 + 116. http://www.columbia.edu/kermit/ckccfg.html#x11
34714 + 117. mailto:kermit@columbia.edu
34715 + 118. http://www.columbia.edu/kermit/ckermit.html
34716 + 119. http://www.columbia.edu/kermit/index.html
34717 + 120. http://www.columbia.edu/kermit/ckccfg.html#top
34718 + 121. http://www.columbia.edu/kermit/ckccfg.html#contents
34719 + 122. http://www.columbia.edu/kermit/ckccfg.html#x10
34720 + 123. http://www.columbia.edu/kermit/ckccfg.html#x8
34721 + 124. http://www.columbia.edu/kermit/ckermit.html
34722 + 125. http://www.columbia.edu/kermit/index.html
34723 + 126. http://www.columbia.edu/kermit/ckccfg.html#top
34724 + 127. http://www.columbia.edu/kermit/ckccfg.html#contents
34725 + 128. http://www.columbia.edu/kermit/ckccfg.html#x11
34726 + 129. http://www.columbia.edu/kermit/ckccfg.html#x9
34727 + 130. http://www.columbia.edu/kermit/ckuins.html#x11
34728 + 131. http://www.columbia.edu/kermit/ckuins.html
34729 + 132. http://www.columbia.edu/kermit/ckermit.html
34730 + 133. http://www.columbia.edu/kermit/index.html
34731 + 134. http://www.columbia.edu/kermit/ckccfg.html#top
34732 + 135. http://www.columbia.edu/kermit/ckccfg.html#contents
34733 + 136. http://www.columbia.edu/kermit/ckccfg.html#x12
34734 + 137. http://www.columbia.edu/kermit/ckccfg.html#x10
34735 + 138. ftp://kermit.columbia.edu/kermit/c-kermit/ckucns.c
34736 + 139. ftp://kermit.columbia.edu/kermit/c-kermit/ckucon.c
34737 + 140. http://www.columbia.edu/kermit/ckermit.html
34738 + 141. http://www.columbia.edu/kermit/index.html
34739 + 142. http://www.columbia.edu/kermit/ckccfg.html#top
34740 + 143. http://www.columbia.edu/kermit/ckccfg.html#contents
34741 + 144. http://www.columbia.edu/kermit/ckccfg.html#x13
34742 + 145. http://www.columbia.edu/kermit/ckccfg.html#x11
34743 + 146. http://www.columbia.edu/kermit/ckermit.html
34744 + 147. http://www.columbia.edu/kermit/index.html
34745 + 148. http://www.columbia.edu/kermit/ckccfg.html#top
34746 + 149. http://www.columbia.edu/kermit/ckccfg.html#contents
34747 + 150. http://www.columbia.edu/kermit/ckccfg.html#x14
34748 + 151. http://www.columbia.edu/kermit/ckccfg.html#x12
34749 + 152. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
34750 + 153. http://www.columbia.edu/kermit/ckermit.html
34751 + 154. http://www.columbia.edu/kermit/index.html
34752 + 155. http://www.columbia.edu/kermit/ckccfg.html#top
34753 + 156. http://www.columbia.edu/kermit/ckccfg.html#contents
34754 + 157. http://www.columbia.edu/kermit/ckccfg.html#x13
34755 + 158. http://www.columbia.edu/kermit/ckermit.html
34756 + 159. http://www.columbia.edu/kermit/index.html
34757 + 160. http://www.columbia.edu/kermit/ckccfg.html#top
34758 + 161. http://www.columbia.edu/kermit/ckccfg.html#contents
34759 + 162. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
34760 + 163. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.h
34761 + 164. ftp://kermit.columbia.edu/kermit/c-kermit/ckcmai.c
34762 + 165. http://www.columbia.edu/kermit/ckccfg.html#top
34763 + 166. http://www.columbia.edu/kermit/ckccfg.html#contents
34764 + 167. http://www.columbia.edu/kermit/ckermit.html
34765 + 168. http://www.columbia.edu/kermit/index.html
34766 + 169. http://www.columbia.edu/kermit/index.html
34767 + 170. http://www.columbia.edu/
34768 + 171. mailto:kermit@columbia.edu
34770 +++ ckermit-212/ckcbwr.txt
34773 + C-Kermit 8.0 General Hints and Tips
34776 + [1]The Kermit Project, [2]Columbia University
34778 + As of: C-Kermit 8.0.211, 17 March 2003
34779 + This page last updated: Sat Apr 10 16:37:37 2004 (New York USA Time)
34781 + IF YOU ARE READING A PLAIN-TEXT version of this document, it is a
34782 + plain-text dump of a Web page. You can visit the original (and
34783 + possibly more up-to-date) Web page here:
34785 + [3]http://www.columbia.edu/kermit/ckcbwr.html
34787 + This document contains platform-independent C-Kermit hints and tips.
34788 + Also see the platform-specific C-Kermit hints and tips document for
34789 + your platform, for example:
34791 + [4]http://www.columbia.edu/kermit/ckubwr.html
34793 + for Unix. This document also applies to [5]Kermit 95 for Windows,
34794 + which is based on C-Kermit.
34796 + [ [6]C-Kermit ] [ [7]TUTORIAL ]
34797 + ________________________________________________________________________
34802 + 1. [9]INCOMPATIBLE CHANGES
34803 + 2. [10]THE C-KERMIT COMMAND PARSER
34804 + 3. [11]MULTIPLE SESSIONS
34805 + 4. [12]NETWORK CONNECTIONS
34806 + 5. [13]MODEMS AND DIALING
34807 + 6. [14]DIALING HINTS AND TIPS
34808 + 7. [15]TERMINAL SERVERS
34809 + 8. [16]TERMINAL EMULATION
34810 + 9. [17]KEY MAPPING
34811 + 10. [18]FILE TRANSFER
34812 + 11. [19]SCRIPT PROGRAMMING
34813 + ________________________________________________________________________
34817 + [ [20]Top ] [ [21]Contents ] [ [22]Next ]
34819 + Source-level patches for C-Kermit 8.0.211:
34822 + ________________________________________________________________________
34824 + 1. INCOMPATIBLE CHANGES
34826 + [ [23]Top ] [ [24]Contents ] [ [25]Next ]
34828 + These are not necessarily exhaustive lists.
34830 + 1.1. C-Kermit 6.0
34832 + C-Kermit 6.0 was released 6 September 1996 and is completely
34833 + documented in [26]Using C-Kermit, 2nd Edition. The following
34834 + incompatible changes were made in C-Kermit 6.0:
34836 + * Unless you tell C-Kermit otherwise, if a serial or network
34837 + connection seems to be open, and you attempt to EXIT or to open a
34838 + new connection, C-Kermit warns you that an active connection
34839 + appears to be open and asks you if you really want to close it. If
34840 + you do not want these warnings, add SET EXIT WARNING OFF to your
34841 + customization file or script, or give this command at the prompt.
34842 + * The default for SET { SEND, RECEIVE } PATHNAMES was changed from
34843 + ON to OFF, to prevent unexpected creation of directories and
34844 + depositing of incoming files in places you might not know to look.
34845 + * The default for SET FILE INCOMPLETE was changed from DISCARD to
34846 + KEEP to allow for file transfer recovery.
34847 + * The default file-transfer block-check is now 3, rather than 1. If
34848 + the other Kermit does not support this, the two will drop back to
34849 + type 1 automatically unless the other Kermit fails to follow the
34850 + protocol specification.
34851 + * The default flow-control is now "auto" ("do the right thing for
34852 + each type of connection"), not Xon/Xoff.
34853 + * Backslash (\) is no longer a command continuation character. Only
34854 + - (hyphen, dash) may be used for this in C-Kermit 6.0 and later.
34855 + * Negative INPUT timeout now results in infinite wait, rather than 1
34858 + 1.2. C-Kermit 7.0
34860 + C-Kermit 7.0 was released 1 January 2000. Its new features are
34861 + documented in the C-Kermit 7.0 Supplement,
34862 + [27]http://www.columbia.edu/kermit/ckermit2.html. The following
34863 + incompatible changes were made in C-Kermit 7.0:
34864 + * The "multiline GET" command is gone. Now use either of the
34865 + following forms instead:
34866 + get remote-name local-name
34867 + get /as-name:local-name remote-name
34868 + If either name contains spaces, enclose it in braces (or, in
34869 + C-Kermit 8.0, doublequotes).
34870 + * To include multiple file specifications in a GET command, you must
34871 + now use MGET rather than GET:
34872 + mget file1 file2 file3 ...
34873 + * C-Kermit 7.0 and later use FAST Kermit protocol settings by
34874 + default. This includes "unprefixing" of certain control
34875 + characters. Because of this, file transfers that worked with
34876 + previous releases might not work in the new release especially
34877 + against a non-Kermit-Project Kermit protocol implementation (but
34878 + it is more likely that they will work, and much faster). If a
34879 + transfer fails, you'll get a context-sensitive hint suggesting
34880 + possible causes and cures. Usually SET PREFIXING ALL does the
34882 + * By default C-Kermit 7.0 and later send files in text or binary
34883 + mode by looking at each file to see which is the appropriate mode.
34884 + To restore the previous behavior, put SET TRANSFER MODE MANUAL and
34885 + the desired SET FILE TYPE (TEXT or BINARY) in your C-Kermit
34886 + initialization file.
34887 + * The RESEND and REGET commands automatically switch to binary mode;
34888 + previously if RESEND or REGET were attempted when FILE TYPE was
34889 + TEXT, these commands would fail immediately, with a message
34890 + telling you they work only when the FILE TYPE is BINARY. Now they
34891 + simply do this for you.
34892 + * SET PREFIXING CAUTIOUS and MINIMAL now both prefix linefeed (10
34893 + and 138) in case rlogin, ssh, or cu are "in the middle", since
34894 + otherwise <LF>~ might appear in Kermit packets, and this would
34895 + cause rlogin, ssh, or cu to disconnect, suspend,escape back, or
34896 + otherwise wreck the file transfer. Xon and Xoff are now always
34897 + prefixed too, even when Xon/Xoff flow control is not in effect,
34898 + since unprefixing them has proven dangerous on TCP/IP connections.
34899 + * In UNIX, VMS, Windows, and OS/2, the DIRECTORY command is built
34900 + into C-Kermit itself rather than implemented by running an
34901 + external command or program. The built-in command might not behave
34902 + the way the platform-specific external one did, but many options
34903 + are available for customization. Of course the underlying
34904 + platform-specific command can still be accessed with "!", "@", or
34905 + "RUN" wherever the installation does not forbid. In UNIX, the "ls"
34906 + command can be accessed directly as "ls" in C-Kermit.
34907 + * SEND ? prints a list of switches rather than a list of filenames.
34908 + If you want to see a list of filenames, use a (system-dependent)
34909 + construction such as SEND ./? (for UNIX, Windows, or OS/2), SEND
34911 + * In UNIX, OS-9, and Kermit 95, the wildcard characters in previous
34912 + versions were * and ?. In C-Kermit 7.0 they are *, ?, [, ], {, and
34913 + }, with dash used inside []'s to denote ranges and comma used
34914 + inside {} to separate list elements. If you need to include any of
34915 + these characters literally in a filename, precede each one with
34917 + * SET QUIET { ON, OFF } is now on the command stack, just like SET
34918 + INPUT CASE, SET COUNT, SET MACRO ERROR, etc, as described on p.458
34919 + of [28]Using C-Kermit, 2nd Edition. This allows any macro or
34920 + command file to SET QUIET ON or OFF without worrying about saving
34921 + and restoring the global QUIET value. For example, this lets you
34922 + write a script that tries SET LINE on lots of devices until it
34923 + finds one free without spewing out loads of error messages, and
34924 + also without disturbing the global QUIET setting, whatever it was.
34925 + * Because of the new "." operator (which introduces assignments),
34926 + macros whose names begin with "." can not be invoked "by name".
34927 + However, they still can be invoked with DO or \fexecute().
34928 + * The syntax of the EVALUATE command has changed. To restore the
34929 + previous syntax, use SET EVALUATE OLD.
34930 + * The \v(directory) variable now includes the trailing directory
34931 + separator; in previous releases it did not. This is to allow
34932 + constructions such as:
34933 + cd \v(dir)data.tmp
34934 + to work across platforms that might have different directory
34935 + notation, such as UNIX, Windows, and VMS.
34936 + * Prior to C-Kermit 7.0, the FLOW-CONTROL setting was global and
34937 + sticky. In C-Kermit 7.0, there is an array of default flow-control
34938 + values for each kind of connection, that are applied automatically
34939 + at SET LINE/PORT/HOST time. Thus a SET FLOW command given before
34940 + SET LINE/PORT/HOST is likely to be undone. Therefore SET FLOW can
34941 + be guaranteed to have the desired effect only if given after the
34942 + SET LINE/PORT/HOST command.
34943 + * Character-set translation works differently in the TRANSMIT
34944 + command when (a) the file character-set is not the same as the
34945 + local end of the terminal character-set, or (b) when the terminal
34946 + character-set is TRANSPARENT.
34948 + 1.3. C-Kermit 8.0
34950 + The following incompatible changes were made in C-Kermit 8.0:
34951 + * C-Kermit now accepts doublequotes in most contexts where you
34952 + previously had to use braces to group multiple words into a single
34953 + field, or to force inclusion of leading or trailing blanks. This
34954 + might cause problems in contexts where you wanted the doublequote
34955 + characters to be taken literally. Consult [29]Section 5 of the
34956 + [30]C-Kermit 8.0 Update Notes for further information.
34957 + * Using the SET HOST command to make HTTP connections is no longer
34958 + supported. Instead, use the new [31]HTTP OPEN command.
34959 + ________________________________________________________________________
34961 + 2. THE C-KERMIT COMMAND PARSER
34963 + [ [32]Top ] [ [33]Contents ] [ [34]Next ] [ [35]Previous ]
34965 + Various command-related limits are shown in the following table, in
34966 + which the sample values are for a "large memory model" build of
34967 + C-Kermit, typical for modern platforms (Linux, Solaris, AIX, VMS,
34968 + etc). You can see the values for your version of Kermit by giving the
34969 + SHOW FEATURES command. The maximum length for a Kermit command (CMDBL)
34970 + also determines the maximum length for a macro definition, since
34971 + DEFINE is itself a command. The maximum length for a variable name is
34972 + between 256 and 4096 characters, depending on the platform; for array
34973 + declarations and references, that includes the subscript.
34974 + ______________________________________________________________
34976 + Item Symbol Sample
34978 + Number of characters in a command CMDBL 32763 ckucmd.h
34979 + Number of chars in a field of a command ATMBL 10238 ckucmd.h
34980 + Nesting level for command files MAXTAKE 54 ckuusr.h
34981 + Nesting level for macros MACLEVEL 128 ckuusr.h
34982 + Nesting level for FOR / WHILE loops FORDEPTH 32 ckuusr.h
34983 + Number of macros MAC_MAX 16384 ckuusr.h
34984 + Size of INPUT buffer INPBUFSIZ 4096 ckuusr.h
34985 + Maximum files to match a wildcard MAXWLD 102400 ckcdeb.h
34986 + Filespecs in MSEND command MSENDMAX 1024 ckuusr.h
34987 + Length for GOTO target label LBLSIZ 50 ckuusr.h
34988 + \fexecute() recursion depth limit CMDDEP 64 ckucmd.h
34989 + ______________________________________________________________
34991 + If you need to define a macro that is longer than CMDBL, you can break
34992 + the macro up into sub-macros or rewrite the macro as a command file.
34993 + In a pinch you can also redefine CMDBL and recompile C-Kermit. All of
34994 + these numbers represent tradeoffs: the bigger the number, the more
34995 + "powerful" Kermit in the corresponding area, but also the bigger the
34996 + program image and possibly disk footprint, and the longer it takes to
34997 + load and initialize.
34999 + In the interactive command parser:
35001 + * EMACS- or VI-style command line editing is not supported.
35002 + * Editing keys are hardwired (Ctrl-U, Ctrl-W, etc).
35004 + If you interrupt C-Kermit before it has issued its first prompt, it
35005 + will exit. This means that you cannot interrupt execution of the
35006 + initialization file, or of an "application file" (file whose name is
35007 + given as the first command-line argument), or of an alternative
35008 + initialization file ("-y filename"), and get to the prompt. There is,
35009 + however, one exception to this rule: you *can* interrupt commands --
35010 + including TAKE commands -- given in the '-C "command list"'
35011 + command-line argument and -- if there were no action commands among
35012 + the command-line arguments -- you will be returned to the C-Kermit
35013 + prompt. So, for example, if you want to start C-Kermit in such a way
35014 + that it executes a command file before issuing its first prompt, and
35015 + you also want to be able to interrupt the command file and get to the
35016 + prompt, include a TAKE command for the desired command in the -C
35017 + argument, for example:
35019 + kermit -C "take dial.scr"
35021 + At the command prompt, if you use the backslash (\) prefix to enter a
35022 + control character, space, or question mark into a command literally,
35023 + the backslash disappears and is replaced by the quoted character. If
35024 + it was a control character, it is shown as a circumflex (^). This
35025 + allows editing (backspace, delete, Ctrl-W) to work correctly even for
35026 + control characters.
35028 + Priot to C-Kermit 8.0, the only way to include a comma literally in a
35029 + macro definition -- as opposed to having it separate commands within
35030 + the definition -- is to enter its ASCII value (44) in backslash
35033 + DEFINE ROWS RUN MODE CO80\{44}\%1
35035 + In C-Kermit 8.0 you can use constructions like this:
35037 + DEFINE ROWS RUN MODE "CO80,\%1"
35039 + If you quote special characters in a filename (e.g. in the SEND
35040 + command), filename completion may seem to work incorrectly. For
35041 + example, if you have a file whose name is a*b (the name really
35042 + contains an asterisk), and you type "send a\\*<ESC>", the "b" does not
35043 + appear, nor will Ctrl-R redisplay the completed name correctly. But
35044 + internally the file name is recognized anyway.
35046 + Question-mark help does not work during execution of an ASKQ command.
35047 + The question marks are simply accepted as text.
35049 + In OUTPUT commands only, \B sends a BREAK signal, \L sends a Long
35050 + BREAK signal, and \N sends a NUL (ASCII 0). BREAK and Long BREAK are
35051 + special signals, not characters, and NUL is a character that normally
35052 + cannot be included in a C string, since it is the C string terminator.
35053 + If you really want to output a backslash followed by a B, an L, or an
35054 + N (as is needed to configure certain modems, etc), double the
35055 + backslash, e.g. "output \\B". In C-Kermit 7.0 or later, you can disarm
35056 + and re-arm the special OUTPUT-command escapes (\B, \L, and \N) with
35057 + SET OUTPUT SPECIAL-ESCAPES { OFF, ON }.
35059 + When using the command-line processor ("kermit -l /dev/tty00 -b
35060 + 19200", etc), note that in some cases the order of the command-line
35061 + options makes a difference, contrary to the expectation that order of
35062 + command-line options should not matter. For example, the -b option
35063 + must be given after the -l option if it is to affect the device
35064 + specified in the -l option.
35065 + ________________________________________________________________________
35067 + 3. MULTIPLE SESSIONS
35069 + [ [36]Top ] [ [37]Contents ] [ [38]Next ] [ [39]Previous ]
35071 + C-Kermit 7.0 and earlier do not support multiple sessions. When you
35072 + SET LINE (or SET PORT, same thing) to a new device, or SET HOST to a
35073 + new host, the previous SET LINE device or network host connection is
35074 + closed, resulting in hangup of the modem or termination of the network
35075 + connection. In windowing environments like HP-VUE, NeXTSTEP, Windows,
35076 + OS/2, etc, you can run separate copies of Kermit in different windows
35077 + to achieve multiple sessions.
35079 + To achieve multiple sessions through a single serial port (e.g. when
35080 + dialing up), you can install SLIP or PPP on your computer and then use
35081 + C-Kermit's TCP/IP support over the SLIP or PPP connection, assuming
35082 + you also have TCP/IP networking installed on your computer.
35084 + C-Kermit 8.0 has the same restriction on SET LINE and SET HOST
35085 + sessions: only one regular session (dialout, Telnet, etc) can be open
35086 + at a time. However, version 8.0 adds two new kinds of sessions: FTP
35087 + and HTTP; one or both of these can be open at the same as a regular
35089 + ________________________________________________________________________
35091 + 4. NETWORK CONNECTIONS
35093 + [ [40]Top ] [ [41]Contents ] [ [42]Next ] [ [43]Previous ]
35097 + The Unix C-Kermit 8.0.206 FTP client had the following bugs at the
35098 + time most of the 8.0.206 binaries were built for the C-Kermit 8.0
35101 + 1. FTP MGET fails when directory segments contain wildcards, as in
35102 + "ftp mget */data/*.dat". Work around by doing a separate MGET for
35103 + each source directory.
35104 + 2. FTP MGET can fail or produce random side effects if you have a
35105 + TMPDIR or CK_TMP environment variable definition in effect, or a
35106 + SET TEMP-DIRECTORY value, longer than 7 characters. Work around by
35107 + giving a SET TEMP-DIRECTORY command with a short value, such as
35110 + These two bugs are fixed in the source code that is included on the
35111 + CDROM, and also in Kermit 95 2.1.1. You can tell if a C-Kermit 8.0.206
35112 + binary has these fixes by typing SHOW VERSION; if it says "FTP Client,
35113 + 8.0.200, 24 Oct 2002" it has the fixes; if the edit number is less
35114 + that 200, it doesn't, in which case can build a new binary from the
35115 + source code (or contact us and we'll try to get get one for you).
35117 + Making TCP/IP Connections Can Take a Long Time
35119 + The most frequently asked question in many newsgroups is "Why does it
35120 + take such a long time to make a Telnet connection to (or from) my
35121 + (e.g.) Linux PC?" (this applies to Kermit as well as to regular Telnet
35124 + 1. Most Telnet servers perform reverse DNS lookups on the client for
35125 + security and/or logging reasons. If the Telnet client's host
35126 + cannot be found by the server's local DNS server, the DNS request
35127 + goes out to the Internet at large, and this can take quite some
35128 + time. The solution to this problem is to make sure that both
35129 + client and host are registered in DNS.
35130 + 2. C-Kermit itself performs reverse DNS lookups unless you tell it
35131 + not to. This is to allow C-Kermit to let you know which host it is
35132 + actually connected to in case you have made a connection to a
35133 + "host pool" (multihomed host). You can disable C-Kermit's reverse
35134 + DNS lookup with SET TCP REVERSE-DNS-LOOKUP OFF.
35135 + 3. C-Kermit 7.0 and later strictly enforce Telnet protocol rules. One
35136 + such rule is that certain negotiations must be responded to. If
35137 + C-Kermit sends a such a negotiation and the host does not respond,
35138 + C-Kermit waits a long time for the reply (in case the network is
35139 + congested or the host is slow), but eventually will time out. To
35140 + eliminate the waits (and therefore risk possible protocol
35141 + mismatches -- or worse -- between Telnet client and server), tell
35142 + C-Kermit to SET TELNET WAIT OFF (or include the /NOWAIT switch
35143 + with the TELNET command).
35145 + The Rlogin Client
35147 + In multiuser operating systems such as UNIX and VMS, TCP/IP Rlogin
35148 + connections are available only to privileged users, since "login" is a
35149 + privileged socket. Assuming you are allowed to use it in the first
35150 + place, it is likely to behave differently depending on what type of
35151 + host you are rlogging in to, due to technical reasons having to do
35152 + with conflicting interpretations of RFC793 (Out-Of-Band Data) and
35153 + Rlogin (RFC1122)... "Specifically, the TCP urgent pointer in BSD
35154 + points to the byte after the urgent data byte, and an RFC-compliant
35155 + TCP urgent pointer points to the urgent data byte. As a result, if an
35156 + application sends urgent data from a BSD-compatible implementation to
35157 + an [44]RFC-1122 compatible implementation then the receiver will read
35158 + the wrong urgent data byte (it will read the byte located after the
35159 + correct byte in the data stream as the urgent data byte)." Rlogin
35160 + requires the use of OOB data while Telnet does not. Therefore, it is
35161 + possible for Telnet to work between all systems while BSD and System V
35162 + TCP/IP implementations are almost always a bad mix.
35164 + The Telnet Client
35166 + On a TCP/IP TELNET connection, you should normally have PARITY set to
35167 + NONE and (except in VMS C-Kermit) FLOW-CONTROL also set to NONE. If
35168 + file transfer does not work with these settings (for example, because
35169 + the remote TELNET server only gives a 7-bit data path), use SET PARITY
35170 + SPACE. Do not use SET PARITY MARK, EVEN, or ODD on a TELNET connection
35171 + -- it interferes with TELNET protocol.
35173 + If echoing does not work right after connecting to a network host or
35174 + after dialing through a TCP/IP modem server, it probably means that
35175 + the TELNET server on the far end of the connection is executing the
35176 + TELNET protocol incorrectly. After initially connecting and
35177 + discovering incorrect echoing (characters are echoed twice, or not at
35178 + all), escape back, give the appropriate SET DUPLEX command (FULL or
35179 + HALF), and then CONNECT again. For a consistently misbehaving
35180 + connection, you can automate this process in a macro or TAKE file.
35182 + TELNET sessions are treated just like serial communications sessions
35183 + as far as "terminal bytesize" and "command bytesize" are concerned. If
35184 + you need to view and/or enter 8-bit characters during a TELNET
35185 + session, you must tell C-Kermit to SET TERMINAL BYTESIZE 8, SET
35186 + COMMAND BYTESIZE 8, and SET PARITY NONE.
35188 + If you SET TELNET DEBUG ON prior to making a connection, protocol
35189 + negotiations will be displayed on your screen. You can also capture
35190 + them in the debug log (along with everything else) and then extract
35191 + them easily, since all Telnet negotiations lines begin with
35192 + (uppercase) "TELNET".
35193 + ________________________________________________________________________
35195 + 5. MODEMS AND DIALING
35197 + [ [45]Top ] [ [46]Contents ] [ [47]Next ] [ [48]Previous ]
35199 + External modems are recommended because:
35201 + * They don't need any special drivers.
35202 + * They are less likely to interfere with normal operation of your
35204 + * You can use the lights and speaker to troubleshoot dialing.
35205 + * You can share them among all types of computers.
35206 + * You can easily turn them off and on when power-cycling seems
35208 + * They are more likely to have manuals.
35210 + Modems can be used by C-Kermit only when they are visible as or
35211 + through a regular serial port device. Certain modems can not be used
35212 + in this normal way on many kinds of computers: Winmodems, RPI modems,
35213 + Controllerless modems, the IBM Mwave, etc; all of these require
35214 + special drivers that perform some, most, or all of the modem's
35215 + functions in software. Such drivers are generally NOT available in
35216 + UNIX or other non-Windows (or non-OS/2, in the case of the Mwave)
35219 + In order to dial a modem, C-Kermit must know its repertoire of
35220 + commands and responses. Each modem make and model is likely to have a
35221 + different repertoire. Since Kermit has no way of knowhing which kind
35222 + of modem will be dialed, normally you have to tell it with a SET MODEM
35223 + TYPE command, e.g.:
35225 + set modem type usrobotics
35226 + set line /dev/cua0
35230 + In the early days, there was a wide variety of modems and command
35231 + languages. Nowadays, almost every modem uses the Hayes AT command set
35232 + (but with some differences in the details) and its startup
35233 + configuration includes error correction, data compression, and
35234 + hardware (RTS/CTS) flow control. As long as C-Kermit is capable of
35235 + hardware flow control (as it is on many, but not all, the platforms
35236 + where it runs, since some operating systems don't support it), the
35237 + modem can be dailed immediately, without lengthy configuration
35238 + dialogs, and in fact this is what SET MODEM TYPE GENERIC-HIGH-SPEED
35239 + does. In C-Kermit 8.0, GENERIC-HIGH-SPEED has become the default modem
35240 + type, so now it is usually possible to SET LINE, SET SPEED, and DIAL
35241 + without having to identify your modem. If this doesn't work, of
35242 + course, then you might have to fall back to the tradiational method:
35243 + Give a SET MODEM TYPE for a specific modem first, then SET LINE, SET
35246 + An important change in C-Kermit 6.0 is that when you give a SET MODEM
35247 + TYPE command to tell Kermit what kind of modem you have, Kermit also
35248 + sets a number of other modem-related parameters automatically from its
35249 + internal modem database. Thus, the order in which you give
35250 + modem-related commands is significant, whereas in prior releases they
35251 + could be given in any order.
35253 + In particular, MODEM SPEED-MATCHING is set according to whether the
35254 + modem is known to be capable of speed buffering. SET MODEM TYPE
35255 + HAYES-2400 automatically turns SPEED-MATCHING ON, because when the
35256 + Hayes 2400 reports a particular speed in its CONNECT message, that
35257 + means its interface speed has changed to that speed, and C-Kermit's
35258 + must change accordingly if it is to continue communicating. This might
35259 + cause some confusion if you use "set modem type hayes" for dialing a
35260 + more advanced type of modem.
35262 + The new default for flow control is "auto", meaning "do the right
35263 + thing for each type of connection". So (for example) if your version
35264 + of C-Kermit supports SET FLOW RTS/CTS and your modem also supports
35265 + RTS/CTS, then Kermit automatically sets its flow control to RTS/CTS
35266 + and set modem's flow control to RTS/CTS too before attempting to use
35269 + For these reasons, don't assume that "set modem type hayes" should be
35270 + used for all modems that uses the Hayes AT command set. "set modem
35271 + type hayes" really does mean Hayes 1200 or 2400, which in turn means
35272 + no hardware flow control, and no speed buffering. This choice will
35273 + rarely work with a modern high-speed modem.
35274 + ________________________________________________________________________
35276 + 6. DIALING HINTS AND TIPS
35278 + [ [49]Top ] [ [50]Contents ] [ [51]Next ] [ [52]Previous ]
35280 + If you have a high-speed, error-correcting, data-compressing,
35281 + speed-buffering modem, you should fix the modem's interface speed as
35282 + high as possible, preferably (at least) four times higher than its
35283 + maximum connection (modulation) speed to allow compression to work at
35284 + full advantage. In this type of setup, you must also have an effective
35285 + means of flow control enabled between C-Kermit and the modem,
35286 + preferably hardware (RTS/CTS) flow control. On platforms that do not
35287 + support hardware flow control, it is usually possible to select
35288 + software flow control (Xon/Xoff), and C-Kermit will do its best to set
35289 + the modem for local Xon/Xoff flow control too (but then, of course,
35290 + Ctrl-S and Ctrl-Q characters can not be transmitted on the
35293 + If you are having trouble dialing your modem, SET DIAL DISPLAY ON to
35294 + watch the dialing interactions between C-Kermit and your modem.
35295 + Consult Chapters 3-4 of [53]Using C-Kermit (2nd Ed) for modem-dialing
35296 + troubleshooting instructions. The following sections offer some
35297 + addtional hints and tips.
35301 + If you want to dial a number that starts with #, you'll need to quote
35302 + the "#" character (as \# or \{35}), since it is also a comment
35305 + C-Kermit>dial #98765421-1-212-5551212 ; Looks like a comment
35306 + ?You must specify a number to dial
35307 + C-Kermit>dial \#98765421-1-212-5551212 ; Works OK
35308 + C-Kermit>dial =#98765421-1-212-5551212 ; This works too
35310 + When using a dialing directory, remember what happens if a name is not
35313 + C-Kermit>dial xyzcorp
35314 + Lookup: "xyzcorp" - not found - dialing as given
35316 + This normally does no harm, but some modems might behave strangely
35317 + when given dial strings that contain certain letters. For example, a
35318 + certain German modem treats any dial string that contains the letter
35319 + "s" as a command to fetch a number from its internal list, and replies
35320 + OK to the ATD command, which is normally not a valid response except
35321 + for partial dialing. To avoid this situation, use:
35326 + 6.2. The Carrier Signal
35328 + Remember: In many C-Kermit implementations (depending on the
35329 + underlying operating system -- mostly Windows, OS/2, and
35330 + System-V-based UNIX versions, and in C-Kermit 7.0, also VMS), you
35331 + can't CONNECT to a modem and type the modem's dialing command (like
35332 + "ATDT7654321") manually, unless you first tell C-Kermit to:
35334 + SET CARRIER-WATCH OFF
35336 + This is because (in these implementations), the CONNECT command
35337 + requires the modem's Carrier Detect (CD) signal to be on, but the CD
35338 + signal doesn't come on until after dialing is complete. This
35339 + requirement is what allows C-Kermit to pop back to its prompt
35340 + automatically when the connection is hung up. See the description of
35341 + SET CARRIER-WATCH in "Using C-Kermit".
35343 + Similarly, if your dialed connection drops when CARRIER-WATCH is set
35344 + to AUTO or ON, you can't CONNECT back to the (now disconnected) screen
35345 + to see what might have happened unless you first SET CARRIER-WATCH
35346 + OFF. But sometimes not even SET CARRIER-WATCH OFF will help in this
35347 + situation: certain platforms (for example Unixware 2.1), once carrier
35348 + drops, won't let the application do i/o with the device any more. In
35349 + that case, if you want to use the device again, you have to CLOSE it
35350 + and OPEN it again. Or you can have Kermit do this for you
35351 + automatically by telling it to SET CLOSE-ON-DISCONNECT ON.
35353 + 6.3. Dialing and Flow Control
35355 + Don't SET FLOW RTS/CTS if your modem is turned off, or if it is not
35356 + presenting the CTS signal. Otherwise, the serial device driver can get
35357 + stuck waiting for this signal to appear.
35359 + Most modern modems support RTS/CTS (if they support any hardware flow
35360 + control at all), but some computers use different RS-232 circuits for
35361 + the same purposes, e.g. DTR and CD, or DTR and CTS. In such cases, you
35362 + might be able to make your computer work with your modem by
35363 + appropriately cross-wiring the circuits in the cable connector, for
35364 + example the computer's DTR to the modem's RTS, and modem's CD to the
35365 + computer's CTS. HOWEVER, C-Kermit does not know you have done this. So
35366 + if you have (say) SET FLOW DTR/CD, C-Kermit will make no attempt to
35367 + tell the modem to use RTS/CTS. You probably did this yourself when you
35368 + configured the modem.
35370 + 6.4. The Dial Timeout
35372 + If it takes your call longer to be completed than the timeout interval
35373 + that C-Kermit calculates, you can use the SET DIAL TIMEOUT command to
35374 + override C-Kermit's value. But beware: the modem has its own timeout
35375 + for completing the call. If it is a Hayes-like modem, C-Kermit adjusts
35376 + the modem's value too by setting register S7. But the maximum value
35377 + for S7 might be smaller than the time you need! In that case, C-Kermit
35378 + sets S7 to 0, 255, or other (modem-specific) value to signify "no
35379 + timeout". If Kermit attempts to set register S7 to a value higher than
35380 + your modem's maximum, the modem will say "ERROR" and you will get a
35381 + "Failure to initialize modem" error. In that case, use SET DIAL
35382 + TIMEOUT to override C-Kermit's calculation of the timeout value with
35383 + the highest value that is legal for your modem, e.g. 60.
35385 + 6.5. Escape Sequence Guard Time
35387 + A "TIES" (Time-Independent Escape Sequence) modem does not require any
35388 + guard time around its escape sequence. The following text:
35392 + if sent through a TIES modem, for example because you were uploading
35393 + this file through it, could pop the modem back into command mode and
35394 + make it hang up the connection. Later versions of the Telebit T1600
35395 + and T3000 (version LA3.01E firmware and later), and all WorldBlazers,
35398 + Although the probability of "+++" appearing in a Kermit packet is
35399 + markedly lower than with most other protocols (see the [54]File
35400 + Transfer section below), it can still happen under certain
35401 + circumstances. It can also happen when using C-Kermit's TRANSMIT
35402 + command. If you are using a Telebit TIES modem, you can change the
35403 + modem's escape sequence to an otherwise little-used control character
35404 + such as Ctrl-_ (Control-Underscore):
35408 + A sequence of three consecutive Ctrl-_ characters will not appear in a
35409 + Kermit packet unless you go to extraordinary lengths to defeat more
35410 + than a few of Kermit's built-in safety mechanisms. And if you do this,
35411 + then you should also turn off the modem's escape-sequence recognition
35416 + But when escape sequence recognition is turned off, "modem hangup"
35417 + (<pause>+++<pause>ATH0<CR>) will not work, so you should also SET
35418 + MODEM HANGUP RS232-SIGNAL (rather then MODEM-COMMAND).
35420 + 6.6. Adaptive Dialing
35422 + Some modems have a feature called adaptive dialing. When they are told
35423 + to dial a number using Tone dialing, they check to make sure that
35424 + dialtone has gone away after dialing the first digit. If it has not,
35425 + the modem assumes the phone line does not accept Tone dialing and so
35426 + switches to Pulse. When dialing out from a PBX, there is almost always
35427 + a secondary dialtone. Typically you take the phone off-hook, get the
35428 + PBX dialtone, dial "9" to get an outside line, and then get the phone
35429 + company's dialtone. In a situation like this, you need to tell the
35430 + modem to expect the secondary dialtone. On Hayes and compatible
35431 + modems, this is done by putting a "W" in the dial string at the
35432 + appropriate place. For example, to dial 9 for an outside line, and
35433 + then 7654321, use ATDT9W7654321:
35435 + SET PBX-OUTSIDE-PREFIX 9W
35437 + (replace "9" with whatever your PBX's outside-line prefix is).
35439 + 6.7. The Busy Signal
35441 + Some phone companies are eliminating the busy signal. Instead, they
35442 + issue a voice message such as "press 1 to automatically redial until
35443 + the number answers, or...". Obviously this is a disaster for modem
35444 + calls. If your service has this feature, there's nothing Kermit can do
35445 + about it. Your modem will respond with NO CARRIER (after a long time)
35446 + rather than BUSY (immediately), and Kermit will declare the call a
35447 + failure, rather than trying to redial the same number.
35451 + There are two ways to hang up a modem: by turning off the serial
35452 + port's DTR signal (SET MODEM HANGUP-METHOD RS232-SIGNAL) or sending
35453 + the modem its escape sequence followed by its hangup command (SET
35454 + MODEM HANGUP-METHOD MODEM-COMMAND). If one doesn't work, try the
35455 + other. If the automatic hangup performed at the beginning of a DIAL
35456 + command causes trouble, then SET DIAL HANGUP OFF.
35458 + The HANGUP command has no effect when C-Kermit is in remote mode. This
35459 + is on purpose. If C-Kermit could hang up its own controlling terminal,
35460 + this would (a) most likely leave behind zombie processes, and (b) pose
35463 + If you DIAL a modem, disconnect, then SET HOST or TELNET, and then
35464 + HANGUP, Kermit sends the modem's hangup command, such as "+++ATHO".
35465 + There is no good way to avoid this, because this case can't reliably
35466 + be distinguished from the case in which the user does SET HOST
35467 + terminal-server, SET MODEM TYPE name, DIAL. In both cases we have a
35468 + valid modem type selected and we have a network connection. If you
35469 + want to DIAL and then later make a regular network connection, you
35470 + will have to SET MODEM TYPE NONE or SET DIAL HANGUP OFF to avoid this
35472 + ________________________________________________________________________
35474 + 7. TERMINAL SERVERS
35476 + [ [55]Top ] [ [56]Contents ] [ [57]Next ] [ [58]Previous ]
35478 + Watch out for terminal server's escape character -- usually a control
35479 + character such as Ctrl-Circumflex (Ctrl-^). Don't unprefix it in
35482 + Ciscos -- must often be told to "terminal download"... Cisco ASM
35483 + models don't have hardware flow control in both directions.
35485 + Many terminal servers only give you a 7-bit connection, so if you
35486 + can't make it 8-bit, tell Kermit to "set parity space".
35488 + The following story, regarding trouble transferring 8-bit files
35489 + through a reverse terminal server, was contributed by an Annex
35490 + terminal server user:
35492 + Using C-Kermit on an HP 9000 712/80 running the HP-UX 10.0
35493 + operating system. The HP was connected to a Xylogics Annex
35494 + MICRO-ELS-UX R7.1 8 port terminal server via ethernet. On the
35495 + second port of the terminal server is an AT&T Paradyne 3810 modem,
35496 + which is connected to a telephone line. There is a program which
35497 + runs on the HP to establish a Telnet connection between a serial
35498 + line on the Annex and a character special file on the HP (/dev
35499 + file). This is an Annex specific program called rtelnet (reverse
35500 + telnet) and is provided with the terminal server software. The
35501 + rtelnet utility runs on top of the pseudo-terminal facility
35502 + provided by UNIX. It creates host-originiated connections to
35503 + devices attached ot Annex serial ports. There are several command
35504 + line arguments to be specified with this program: the IP address of
35505 + the terminal server, the number of the port to attach to, and the
35506 + name of the pseudo-device to create. In addition to these there are
35507 + options to tell rtelnet how to operate on the connect: -b requests
35508 + negotiation for Telnet binary mode, -d turns on socket-leve
35509 + debugging, -f enables "connect on the fly" mode, -r removes the
35510 + device-name if it already exists, etc. The most important of these
35511 + to be specified when using 8 data bits and no parity, as we found
35512 + out, was the -t option. This creates a transparent TCP connection
35513 + to the terminal server. Again, what we assumed to be happening was
35514 + that the rtelnet program encountered a character sequence special
35515 + to itself and then "eating" those kermit packets. I think this is
35516 + all of the information I can give you on the configuration, short
35517 + of the values associated with the port on the terminal server.
35519 + How to DIAL from a TCP/IP reverse terminal server (modem server):
35521 + 1. (only if necessary) SET TELNET ECHO REMOTE
35522 + 2. SET HOST terminal-server-ip-name-or-address [ port ]
35523 + 3. SET MODEM TYPE modem-type
35524 + 4. (only if necessary) SET DIAL HANGUP OFF
35525 + 5. (for troubleshooting) SET DIAL DISPLAY ON
35526 + 6. DIAL phone-number
35528 + The order is important: SET HOST before SET MODEM TYPE. Since this is
35529 + a Telnet connection, serial-port related commands such as SET SPEED,
35530 + SET STOP-BITS, HANGUP (when MODEM HANGUP-METHOD is RS232), etc, have
35531 + no effect. However, in C-Kermit 8.0, if the modem server supports
35532 + [59]RFC-2217 Telnet Com-Port Control protocol, these commands do
35533 + indeed take effect at the server's serial port.
35534 + ________________________________________________________________________
35536 + 8. TERMINAL EMULATION
35538 + [ [60]Top ] [ [61]Contents ] [ [62]Next ] [ [63]Previous ]
35540 + Except for the Windows, OS/2, and Macintosh versions, C-Kermit does
35541 + not emulate any kind of terminal. Rather, it acts as a
35542 + "semitransparent pipe", passing the characters you type during a
35543 + CONNECT session to the remote host, and sending the characters
35544 + received from the remote host to your screen. Whatever is controlling
35545 + your keyboard and screen provides the specific terminal emulation: a
35546 + real terminal, a PC running a terminal emulator, etc, or (in the case
35547 + of a self-contained workstation) your console driver, a terminal
35548 + window, xterm, etc.
35550 + Kermit is semitrantsparent rather than fully transparent in the
35553 + * During a TELNET ("set host") session, C-Kermit itself executes the
35554 + TELNET protocol and performs TELNET negotiations. (But it does not
35555 + perform TN3270 protocol or any other type of 3270 terminal
35557 + * If you have changed your keyboard mapping using SET KEY, C-Kermit
35558 + replaces the characters you type with the characters or strings
35559 + they are mapped to.
35560 + * If you SET your TERMINAL CHARACTER-SET to anything but
35561 + TRANSPARENT, C-Kermit translates your keystrokes (after applying
35562 + any SET KEY definitions) before transmitting them, and translates
35563 + received characters before showing them on your screen.
35564 + * If your remote and/or local TERMINAL CHARACTER-SET is an ISO 646
35565 + 7-bit national character set, such as German, French, Italian,
35566 + Swedish, etc, or Short KOI used for Cyrillic, C-Kermit's CONNECT
35567 + command automatically skips over ANSI escape sequences to avoid
35568 + translating their characters. Only ANSI/ISO standard
35569 + (VT100/200/300-like) 7-bit escape sequence formats are supported
35570 + for this purpose, no proprietary schemes like H-P, Televideo,
35572 + * If your version of C-Kermit includes SET TERMINAL APC command,
35573 + then C-Kermit's CONNECT command will handle APC escape sequences
35574 + if TERMINAL APC is not set to OFF (which is the default).
35576 + You can make C-Kermit fully transparent by starting it with the -0
35577 + (dash zero) command-line option.
35579 + If you are running C-Kermit under a console driver, or in a terminal
35580 + window, that emulates the VT100, and use C-Kermit to log in to a VMS
35581 + system, the console driver or terminal window (not Kermit) is supposed
35582 + to reply to the "what are you?" query (ESC Z) from the VAX. If it
35583 + doesn't, and you can't make it do so, then you can (a) live with the
35584 + "unknown terminal" problem; (b) tell VMS to SET TERMINAL/DEVICE=VT100;
35585 + (c) program a key using SET KEY to send the appropriate sequence and
35586 + then punch the key at the right time; or (d) use the VMSLOGIN macro
35587 + that is defined in CKERMIT.INI to do this for you automatically.
35589 + SET SESSION-LOG { TEXT, BINARY }, which is effective in UNIX and
35590 + AOS/VS but not other C-Kermit versions, removes CR, DEL, NUL, XON, and
35591 + XOFF characters (Using C-Kermit neglects to mention that XON and XOFF
35592 + are removed). The TEXT-mode setting is ineffective during SCRIPT
35593 + command execution, as well as on X.25 connections.
35594 + ________________________________________________________________________
35598 + [ [64]Top ] [ [65]Contents ] [ [66]Next ] [ [67]Previous ]
35600 + Except in the terminal-emulating versions, C-Kermit's key mapping
35601 + facilities are limited to normal "ASCII" keys, and cannot be used with
35602 + function keys, arrow keys, arcane key combinations, etc. Since
35603 + C-Kermit runs on such a wide variety of hardware platforms (including,
35604 + for example, more than 360 different UNIX platforms), it is not
35605 + possible for C-Kermit to support every conceivable keyboard under
35606 + every release of every UNIX (or VMS, or ...) product on every
35607 + different kind of computer possibly under all manner of different
35608 + console drivers, even if it had the means to do so.
35610 + In technical terms, C-Kermit uses the read() function to read
35611 + keystrokes, and read() returns a single byte (value 0 through 255).
35612 + C-Kermit's SET KEY function applies to these single-byte codes.
35613 + "Extended function" keys, such as F-keys, arrow keys, etc, usually
35614 + return either a 2-byte "scan code" or else a character string (such as
35615 + an escape sequence like "<ESC> O p"). In both cases, C-Kermit has no
35616 + way to tell the difference between such multibyte key values, and the
35617 + corresponding series of single-byte key values. This could only be
35618 + done by accessing the keyboard at a much lower level in a highly
35619 + platform-dependent manner, probably requiring tens of thousands of
35620 + lines of code to support even a sampling of the most popular
35621 + workstation / OS combinations.
35623 + However, most workstation console drivers (terminal emulation windows,
35624 + etc) include their own key-mapping facility. For example in AIX, the
35625 + AIXterm program (in whose window you would run C-Kermit) allows
35626 + rebinding of the F1-F12 keys to arbitrary strings. The same is true of
35627 + Xterm and DECterm windows, etc. Consult the technical documentation
35628 + for your workstation or emulator. See sample Xterm (Xmodmap) mappings
35629 + in the [68]Unix C-Kermit Hints and Tips document.
35631 + The SET KEY command (except in Kermit 95) does not allow a key
35632 + definition to be (or contain) the NUL (\0) character.
35633 + ________________________________________________________________________
35635 + 10. FILE TRANSFER
35637 + [ [69]Top ] [ [70]Contents ] [ [71]Next ] [ [72]Previous ]
35639 + C-Kermit 7.0 is the first release of C-Kermit to use fast (rather than
35640 + robust and therefore slow) protocol defaults: long packets, sliding
35641 + windows, control-character unprefixing, and streaming where possible.
35642 + This makes most transfers (partner willing) dramatically faster "out
35643 + of the box" but might break some combinations that worked before. If
35644 + transfers with C-Kermit 7.0 or later fail where transfers worked with
35645 + earlier C-Kermit versions, try the following (one at a time, in this
35648 + 1. SET PREFIXING ALL: Disables control-character unprefixing.
35649 + 2. SET STREAMING OFF: Disables streaming.
35650 + 3. CAUTIOUS: Selects medium but cautious protocol settings.
35651 + 4. ROBUST: this command reverts to the most conservative protocol
35654 + Execution of multiple file transfers by C-Kermit from a command file
35655 + when in remote mode might exhibit long delays between each transfer.
35656 + To avoid this, just include the command "SET DELAY 0" in your command
35657 + file before any of the file-transfer commands.
35659 + File transfer failures can occur for all sorts of reasons, most of
35660 + them listed in Chapter 10 of [73]Using C-Kermit. The following
35661 + sections touch on some that aren't.
35663 + The [74]C-Kermit 7.0 Release Notes document SEND /COMMAND as taking an
35664 + argument, but it doesn't. Instead of SEND /COMMAND:{some command},
35667 +SEND /COMMAND [ other switches such as /AS-NAME: ] command [ arguments... ]
35671 + Watch out for laptops and their assorted power-saver features; for
35672 + example, a built-in modem's "auto timeout delay" hanging up the
35673 + connection in the middle of a file transfer. Most modems, even if they
35674 + have this feature, do not have it enabled by default. But if you
35675 + experience otherwise inexplicable disconnections in the midst of your
35676 + Kermit sessions, check the modem manual for such things as "idle
35677 + timeout", "auto timeout", etc, and add the command to disable this
35678 + feature to Kermit's init string for this modem.
35682 + If uploading a large file to an NFS-mounted disk fails (or is
35683 + painfully slow), try uploading it to a local disk (e.g. /tmp on Unix)
35684 + and then copying to the NFS disk later.
35688 + If you are dialing out and find that downloads work but uploads don't,
35689 + try again with a lower serial-port speed. Case in point: dialing out
35690 + on a certain PC from Linux at 115200 bps using a USR Courier 56K
35691 + "V.Everything" external modem and RTS/CTS flow control. Downloads
35692 + worked flawlessly, uploads stopped dead after the first few packets
35693 + were sent. The modem lights showed constant retraining (ARQ light
35694 + blinks slowly), and the CTS light was off 95% of the time, allowing
35695 + nothing to get through. Reducing the serial port speed to 57600 bps
35696 + made the problems go away. Evidently the PC in question has a very
35697 + fast serial port, since dialing the same modem with a different PC at
35698 + 115200 bps works without incident.
35700 + 10.4. TCP/IP Connections
35702 + If you have trouble transferring files over a TCP/IP connection, tell
35703 + Kermit to SET PARITY SPACE and try again. If that doesn't work, also
35704 + try a shorter packet length or smaller window size (to compensate for
35705 + certain well-known broken Telnet servers), and/or SET RELIABLE OFF.
35707 + 10.5. Multihop Connections
35709 + If you have a multihop connection, with the interior nodes in CONNECT
35710 + mode (Kermit, Telnet, Rlogin, or any other), you can expect (a) file
35711 + transfer to be slower, and (b) the connection to be less transparent
35712 + (to control characters, perhaps to the 8th bit) than a more direct
35713 + connection. C-Kermit 7.0 and later have a "-0" (dash-zero)
35714 + command-line option to make it 100% transparent in cases where it is
35715 + to be used in the middle.
35719 + The recovery feature (RESEND command) that was added in version
35720 + 5A(190) works only for binary-mode transfers. In order for this
35721 + feature to be useful at all, the default for SET FILE INCOMPLETE was
35722 + changed from DISCARD to KEEP. Otherwise an interrupted transfer would
35723 + leave no partial file behind unless you had remembered to change the
35724 + default. But now you have to pay closer attention to Kermit's messages
35725 + to know whether a transfer succeeded or failed -- previously, if it
35726 + failed, the file would not show up on the receiving end at all; in
35727 + 5A(190) and later, you'll get a partial file which could easily be
35728 + mistaken for the complete file unless you change the default back to
35729 + DISCARD or read the screen messages, or keep a transaction log.
35731 + 10.7. Filename Collisions
35733 + SET FILE COLLISION BACKUP is the default. This means:
35735 + * If you send the same file lots of times, there will be many backup
35736 + files. There is no automatic mechanism within Kermit to delete
35737 + them, no notion of a "version retention count", etc, but you can
35738 + use the PURGE command to clean them up.
35739 + * If a file arrives that has the same name as a directory, the file
35740 + transfer fails because Kermit will not rename a directory. Send
35741 + the file with another name, or use SET FILE COLLISION RENAME.
35742 + * If the directory lacks write permission, the file transfer fails
35743 + even if you have write access to the file that is being backed up;
35744 + in that case, switch to SET FILE COLLISION OVERWRITE or APPEND, or
35745 + send to a different directory.
35747 + SET FILE COLLISION UPDATE depends on the date/time stamp in the
35748 + attribute packet. However, this is recorded in local time, not
35749 + Universal Time (GMT), and there is no indication of time zone. The
35750 + time is expressed to the precision of 1 second, but some file systems
35751 + do not record with this precision -- for example, MS-DOS records the
35752 + file date/time only to the nearest 2 seconds. This might cause update
35753 + operations to send more files than necessary.
35755 + (This paragraph does NOT apply to UNIX, where, as of C-Kermit 7.0,
35756 + C-Kermit pipes incoming mail and print material directly the mail or
35757 + print program): When C-Kermit is receiving files from another Kermit
35758 + program that has been given the MAIL or REMOTE PRINT command, C-Kermit
35759 + follows the current filename collision action. This can be
35760 + disconcerting if the action was (for example) BACKUP, because the
35761 + existing file will be renamed, and the new file will be mailed (or
35762 + printed) and then deleted. Kermit cannot temporarily change to RENAME
35763 + because the file collision action occurs when the filename packet is
35764 + received, and the PRINT or MAIL disposition only comes later, in the
35765 + Attribute packet.
35767 + Watch out for SET FILE COLLISION RENAME, especially when used in
35768 + conjunction with recovery. Recall that this option (which is NOT the
35769 + default) renames the incoming file if a file already exists with the
35770 + same name (the default is to rename the previously existing file, and
35771 + store the incoming file with its own name). It is strongly recommended
35772 + that you do not use SET FILE COLLISION RENAME if you ever intend to
35773 + use the recovery feature:
35775 + * When the file is first received by C-Kermit, its name is changed
35776 + if another file already has the same name. When you RESEND the
35777 + same file after a failure, C-Kermit will probably try to append
35778 + the re-sent portion to the wrong file.
35779 + * Assuming that you get RESEND to work with FILE COLLISION RENAME,
35780 + C-Kermit, when receiving the remainder of the file during a RESEND
35781 + operation, will report back the wrong name. Nothing can be done
35782 + about this because the name is reported back before the receiving
35783 + Kermit program finds out that it is a recovery operation.
35785 + Also watch out for DISABLE DELETE, since this implicitly sets FILE
35786 + COLLISION to RENAME. And note tht DELETE is DISABLEd automatically any
35787 + time you Kermit is in local mode (i.e. it makes a connection). Also
35788 + note that for purposes of DISABLE and ENABLE, "set host *" connections
35789 + do not count as local mode even though, strictly speaking, they are.
35791 + 10.8. DOS Pathnames
35793 + When referring to foreign MS-DOS, Windows, Atari ST, OS/2, or other
35794 + file specifications that contain backslash characters in a C-Kermit
35795 + command, you might have to double each backslash, for example:
35797 + C-Kermit>get c:\\directory\\foo.txt
35799 + This is because backslash is used in C-Kermit commands for introducing
35800 + special character codes, variables, functions, etc.
35802 + 10.9. Cancellation
35804 + If attempting to cancel local-mode file reception at a very early
35805 + stage (i.e. before data packets are exchanged) with X or Z does not
35806 + work, use E or Ctrl-C instead, or wait until the first data packets
35809 + If you cancel a transfer that is underway using X or Z, and a lot of
35810 + window slots are in use, it might take a while for the cancellation to
35811 + take effect, especially if you do this on the receiving end; that's
35812 + because a lot of packets might already be on their way to you. In that
35813 + case, just be patient and let Kermit "drain" them.
35815 + If C-Kermit is sending a file, remote-mode packet-mode breakout (three
35816 + consecutive Ctrl-C's by default) is not effective until after C-Kermit
35817 + sends its first packet. If C-Kermit is receiving a file or is in
35818 + server mode, it is effective right away. In the former case, the SET
35819 + DELAY value determines the earliest time at which you can break out of
35822 + 10.10. Partner Peculiarities
35824 + When one or both partners is on an SCO operating system such as OSR5,
35825 + you might issue the command:
35829 + to disable character-set conversion by the terminal driver. Similarly
35834 + When using C-Kermit to transfer files with the HP48SX calculator, you
35835 + must SET FLOW NONE. The HP48SX does not support flow control, and
35836 + evidently also becomes confused if you attempt to use it. You might
35837 + also need to use SET SEND PAUSE 100 (or other number). For greater
35838 + detail about transferring files the the HP-48, see:
35840 + [75]http://www.columbia.edu/kermit/hp48.html
35842 + Some communication programs have errors in their implementation of
35843 + Kermit attribute packets. If you get an error message from your
35844 + communication program like "Attribute error", tell C-Kermit to SET
35845 + ATTRIBUTES OFF. Better yet, switch to a real Kermit program.
35847 + Some communication software claims to implement Kermit sliding
35848 + windows, but does so incorrectly. If sliding window transfers fail,
35849 + set C-Kermit's window size to the smallest one that works, for
35850 + example, SET WINDOW 1.
35852 + For lots more detail about how to cope with defective Kermit partners,
35855 + * [76]Coping with Faulty Kermit Implementations (C-Kermit 7.0 and
35857 + * [77]Coping with Broken Kermit Partners (C-Kermit 8.0 and later).
35859 + The UNIX version of C-Kermit discards carriage returns when receiving
35860 + files in text mode. Thus, "bare" carriage returns (sometimes used to
35861 + achieve overstriking) are lost.
35862 + ________________________________________________________________________
35864 + 11. SCRIPT PROGRAMMING
35866 + [ [78]Top ] [ [79]Contents ] [ [80]Previous ]
35868 + 11.1. Comments Versus the SCRIPT Command
35870 + Remember that ";" and "#" introduce comments when (a) they are the
35871 + first character on the line, or (b) they are preceded by at least one
35872 + blank or tab within a line. Thus constructions like:
35875 + SCRIPT ~0 #--#--#
35877 + must be coded using backslash notation to keep the data from being
35880 + INPUT 5 \59 ; 59 is the decimal ASCII code for ";"
35881 + SCRIPT ~0 \35--#--# ; 43 is the decimal ASCII code for "#"
35885 + INPUT 5 \; ; Just quote the semicolon
35886 + SCRIPT ~0 \#--#--# ; Just quote the "#"
35887 + ________________________________________________________________________
35889 + 11.2. Alphabetic Case and the INPUT Command
35891 + INPUT and MINPUT caseless string comparisons do not work for non-ASCII
35892 + (international) characters. Workaround: SET INPUT CASE OBSERVE. Even
35893 + then, the "lexically less than" and "lexically greater than"
35894 + operations (IF LLT, IF LGT) probably won't work as expected. The same
35895 + is true for the case-conversion functions \Flower() and \Fupper().
35896 + C-Kermit does not know the collating sequence for different character
35897 + sets and languages. (On the other hand, it might work depending on
35898 + such items as how Kermit was linked, whether your operating supports
35900 + ________________________________________________________________________
35902 + 11.3. NUL (0) Characters in C-Kermit Commands
35904 + You can't include a NUL character (\0) in C-Kermit command text
35905 + without terminating the character string in which it appears. For
35908 + echo In these brackets [\0] is a NUL
35910 + will echo "In these brackets [". This applies to ECHO, INPUT, OUTPUT,
35911 + and all other commands (but you can represent NUL by "\N" in an OUTPUT
35912 + string). This is because C-language strings are terminated internally
35913 + by the NUL character, and it allows all of C-Kermit's string
35914 + comparison and manipulation functions to work in the normal "C" way.
35920 + is equivalent to:
35928 + is equivalent to:
35932 + INPUT operations discard and ignore NUL characters that arrive from
35933 + the communication device, meaning that they do not figure into
35934 + matching operations (e.g. A<NUL>B matches AB); they are not deposited
35935 + in the INPUT buffer (\v(input)); and they are not counted in
35936 + \v(incount), with two exceptions:
35938 + 1. An arriving NUL character restarts the INPUT SILENCE timer.
35939 + 2. An arriving NUL character terminates the INPUT command with the
35940 + SUCCESS condition if the INPUT command was given an empty search
35941 + string. In this case \v(incount) is set to 1.
35943 + Also, the \v(inchar) variable is null (completely empty) if the last
35944 + INPUT character was NUL. That is, there is no way to tell only by
35945 + looking at \v(inchar) the difference between a NUL that was INPUT and
35946 + no INPUT at all. If the INPUT command succeeded but \v(inchar) is
35947 + empty, then a NUL character was input. Also, \v(incount) will be set
35950 + Here's a sample script fragment to read characters, possibly including
35951 + NUL, from the communication connection and write them to a file:
35954 + input 1 ; read one byte
35955 + if fail break ; timed out or connection closed
35956 + fwrite /char \%c \v(inchar) ; record the byte
35959 + This works because when \v(inchar) is NUL, that's equivalent to FWRITE
35960 + /CHAR having no text argument at all, in which case it writes a NUL
35963 + \v(incount) and \v(inchar) are NOT affected by the CLEAR command.
35964 + ________________________________________________________________________
35966 + 11.4. \ffiles() and \fnextfile() Peculiarities
35968 + The following script program:
35970 + for \%i 1 \ffiles(oofa.*) 1 {
35971 + send \fnextfile()
35974 + did not work as expected in C-Kermit 6.0 and earlier but does work in
35975 + C-Kermit 7.0 and later.
35976 + ________________________________________________________________________
35978 + 11.5. Commands That Have Only Local Effect
35980 + Certain settings are local to each command level, meaning that
35981 + subordinate command levels (macros or command files) can change them
35982 + without affecting their values at higher command levels. When a new
35983 + command level is invoked, the value is inherited from the previous
35984 + level. These settings are:
35987 + COUNT and \v(count)
35994 + This arrangement allows CASE, TIMEOUT, and ERROR settings, which are
35995 + used to control automatic exit from a command file or macro upon
35996 + error, to be automatically restored when the command file or macro
35999 + The COUNT variable follows this rule too, which permits nested SET
36000 + COUNT / IF COUNT loops, as in this example in which the inner loop
36001 + counts down from the current COUNT value of the outer loop (try it):
36003 + DEFINE INNER WHILE COUNT { WRITE SCREEN { Inner:}, SHOW COUNT }
36005 + WHILE COUNT { WRITE SCREEN Outer:, SHOW COUNT, DO INNER }
36007 + Keep in mind that an inferior command level cannot manipulate the
36008 + COUNT value held by a higher level. For example:
36010 + DEFINE OOFA SHOW COUNT, IF COUNT GOTO LOOP
36016 + results in an infinite loop; the COUNT value remains at 5 because it
36017 + is never decremented at the same level at which it was set.
36018 + ________________________________________________________________________
36020 + 11.6. Literal Braces in Function Calls
36022 + Since braces are used in function calls to indicate grouping, there is
36023 + no way to pass literal braces to the function itself. Solution: Define
36024 + a variable containing the string that has braces. Example:
36027 + echo \fsubstring(\%a)
36030 + If the string is to start with a leading brace and end with a closing
36031 + brace, then double braces must appear around the string (which itself
36032 + is enclosed in braces):
36034 + define \%a {{{foo}}}
36035 + echo \fsubstring(\%a)
36038 + This also works for any other kind of string:
36040 + define \%a {{ab{cd}}
36041 + echo \fsubstring(\%a)
36043 + ________________________________________________________________________
36045 + 11.7. Defining Variables on the C-Kermit Command Line
36047 + To define variables on the C-Kermit command line, use the -C
36048 + command-line option with one or more DEFINE or ASSIGN commands. Note
36049 + that the C-Kermit command line must cope with the quoting rules of
36050 + your shell. Examples:
36052 + kermit -C "define \\%a foo, define phonenumber 7654321"
36054 + In this case we follow UNIX quoting rules by doubling the backslash.
36055 + Once C-Kermit starts, the \%a and \m(phonenumber) variables are
36056 + defined as indicated and can be used in the normal way.
36058 + In DOS or Windows or OS/2 the command would be:
36060 + kermit -C "define \%%a foo, define phonenumber 7654321"
36062 + Here we need to double the percent sign rather than the backslash
36063 + because of DOS shell quoting rules.
36064 + ________________________________________________________________________
36066 + 11.8. Per-Character Echo Check with the OUTPUT Command
36068 + Sometimes the OUTPUT command must be used to send commands or data to
36069 + a device in "echoplex" mode, meaning that characters must be sent one
36070 + at a time, and the next character can not be sent until the echo from
36071 + the previous one has been received. For example, a certain PBX might
36072 + have this characteristic. Let's say a Kermit script is used to program
36073 + the PBX. If characters are sent too fast, they can be lost. It would
36074 + seem that the command:
36076 + SET OUTPUT PACING milliseconds
36078 + could be used to take care of this, but the pacing interval is
36079 + constant and must be set large enough to allow even the slowest echo
36080 + to finish. If the script is large (an actual example is 14,000 lines
36081 + long), this can cause it to take hours longer than it needs to.
36083 + Here is a macro you can use to OUTPUT a string in an Echoplex
36088 + set output pacing 0
36089 + for \%i 1 \flen(\%*) 1 {
36090 + asg \%c \fsubstr(\%*,\%i,1)
36096 + C-Kermit 7.0 or later is required.
36098 + It sends one character at a time and then waits up to 2 seconds for
36099 + the character to be echoed back, but continues to the next character
36100 + as soon as the echo appears, so no time is wasted. You can add an IF
36101 + FAIL clause after the INPUT in case you want to do something special
36102 + about failure to detect an echo within the timeout period. Obviously
36103 + you can also change the 2-second limit, and adjust the script in any
36104 + other desired way.
36105 + ________________________________________________________________________
36107 + 11.9. Scripted File Transfer
36109 + Sometimes a user complains that when she makes a connection by hand,
36110 + logs in, and transfers a file, there are no problems, but when she
36111 + scripts the the exact same sequence, the file transfer always fails
36112 + after a few packets. Here's a scenario where this can happen:
36114 + 1. Upon logging in to the remote computer, it sends a "What Are You?"
36116 + 2. When you log in interactively, your terminal emulator sends the
36117 + response. This is invisible to you; you don't know it's happening.
36118 + 3. When you script the login, and begin a file transfer immediately
36119 + upon logging in, the host still sends the "What Are You?"
36120 + sequence. Kermit's INPUT ECHO setting is ON by default, so the
36121 + escape sequence passes through to the terminal, and the terminal
36122 + sends its response. But by this time Kermit has already started
36123 + the file transfer.
36124 + 4. By default, the local Kermit program examines the keyboard for
36125 + interruption characters between every packet. The "What Are You"
36126 + response is sitting in the keyboard buffer. Eventually Kermit will
36127 + read a character such as "c" that is a valid interruption
36128 + character, and the file transfer stops with "User cancelled".
36130 + The right way to handle this situation is to have your look for the
36131 + "What Are You?" sequence and send the response itself, as described in
36132 + Using C-Kermit, pp.429-431. Or you can work around it by telling the
36133 + local Kermit to "set input echo off" and/or "set transfer interruption
36135 + ________________________________________________________________________
36139 + Escape sequences (or any strings that contain control characters)
36140 + can't be used as labels, GOTO targets, or SWITCH cases.
36142 + [ [81]Top ] [ [82]Contents ] [ [83]C-Kermit Home ] [ [84]C-Kermit 8.0
36143 + Overview ] [ [85]Kermit Home ]
36144 + _________________________________________________________________
36146 + C-Kermit 8.0 Unix Hints and Tips / [86]The Kermit Project /
36147 + [87]Columbia University / [88]kermit@columbia.edu / 10 April 2004
36151 + 1. http://www.columbia.edu/kermit/
36152 + 2. http://www.columbia.edu/
36153 + 3. http://www.columbia.edu/kermit/ckcbwr.html
36154 + 4. http://www.columbia.edu/kermit/ckubwr.html
36155 + 5. http://www.columbia.edu/kermit/k95.html
36156 + 6. http://www.columbia.edu/kermit/ckermit.html
36157 + 7. http://www.columbia.edu/kermit/ckututor.html
36158 + 8. http://www.columbia.edu/kermit/ckcbwr.html#x0
36159 + 9. http://www.columbia.edu/kermit/ckcbwr.html#x1
36160 + 10. http://www.columbia.edu/kermit/ckcbwr.html#x2
36161 + 11. http://www.columbia.edu/kermit/ckcbwr.html#x3
36162 + 12. http://www.columbia.edu/kermit/ckcbwr.html#x4
36163 + 13. http://www.columbia.edu/kermit/ckcbwr.html#x5
36164 + 14. http://www.columbia.edu/kermit/ckcbwr.html#x6
36165 + 15. http://www.columbia.edu/kermit/ckcbwr.html#x7
36166 + 16. http://www.columbia.edu/kermit/ckcbwr.html#x8
36167 + 17. http://www.columbia.edu/kermit/ckcbwr.html#x9
36168 + 18. http://www.columbia.edu/kermit/ckcbwr.html#x10
36169 + 19. http://www.columbia.edu/kermit/ckcbwr.html#x11
36170 + 20. http://www.columbia.edu/kermit/ckcbwr.html#top
36171 + 21. http://www.columbia.edu/kermit/ckcbwr.html#contents
36172 + 22. http://www.columbia.edu/kermit/ckcbwr.html#x2
36173 + 23. http://www.columbia.edu/kermit/ckcbwr.html#top
36174 + 24. http://www.columbia.edu/kermit/ckcbwr.html#contents
36175 + 25. http://www.columbia.edu/kermit/ckcbwr.html#x2
36176 + 26. http://www.columbia.edu/kermit/ck60manual.html
36177 + 27. http://www.columbia.edu/kermit/ckermit2.html
36178 + 28. http://www.columbia.edu/kermit/ck60manual.html
36179 + 29. http://www.columbia.edu/kermit/ckermit80.html#x5
36180 + 30. http://www.columbia.edu/kermit/ckermit80.html
36181 + 31. http://www.columbia.edu/kermit/ckermit80.html#x2.2
36182 + 32. http://www.columbia.edu/kermit/ckcbwr.html#top
36183 + 33. http://www.columbia.edu/kermit/ckcbwr.html#contents
36184 + 34. http://www.columbia.edu/kermit/ckcbwr.html#x3
36185 + 35. http://www.columbia.edu/kermit/ckcbwr.html#x1
36186 + 36. http://www.columbia.edu/kermit/ckcbwr.html#top
36187 + 37. http://www.columbia.edu/kermit/ckcbwr.html#contents
36188 + 38. http://www.columbia.edu/kermit/ckcbwr.html#x4
36189 + 39. http://www.columbia.edu/kermit/ckcbwr.html#x2
36190 + 40. http://www.columbia.edu/kermit/ckcbwr.html#top
36191 + 41. http://www.columbia.edu/kermit/ckcbwr.html#contents
36192 + 42. http://www.columbia.edu/kermit/ckcbwr.html#x5
36193 + 43. http://www.columbia.edu/kermit/ckcbwr.html#x3
36194 + 44. ftp://ftp.isi.edu/in-notes/rfc1122.txt
36195 + 45. http://www.columbia.edu/kermit/ckcbwr.html#top
36196 + 46. http://www.columbia.edu/kermit/ckcbwr.html#contents
36197 + 47. http://www.columbia.edu/kermit/ckcbwr.html#x6
36198 + 48. http://www.columbia.edu/kermit/ckcbwr.html#x4
36199 + 49. http://www.columbia.edu/kermit/ckcbwr.html#top
36200 + 50. http://www.columbia.edu/kermit/ckcbwr.html#contents
36201 + 51. http://www.columbia.edu/kermit/ckcbwr.html#x7
36202 + 52. http://www.columbia.edu/kermit/ckcbwr.html#x5
36203 + 53. http://www.columbia.edu/kermit/ck60manual.html
36204 + 54. http://www.columbia.edu/kermit/ckcbwr.html#x10
36205 + 55. http://www.columbia.edu/kermit/ckcbwr.html#top
36206 + 56. http://www.columbia.edu/kermit/ckcbwr.html#contents
36207 + 57. http://www.columbia.edu/kermit/ckcbwr.html#x8
36208 + 58. http://www.columbia.edu/kermit/ckcbwr.html#x6
36209 + 59. ftp://ftp.isi.edu/in-notes/rfc2217.txt
36210 + 60. http://www.columbia.edu/kermit/ckcbwr.html#top
36211 + 61. http://www.columbia.edu/kermit/ckcbwr.html#contents
36212 + 62. http://www.columbia.edu/kermit/ckcbwr.html#x9
36213 + 63. http://www.columbia.edu/kermit/ckcbwr.html#x7
36214 + 64. http://www.columbia.edu/kermit/ckcbwr.html#top
36215 + 65. http://www.columbia.edu/kermit/ckcbwr.html#contents
36216 + 66. http://www.columbia.edu/kermit/ckcbwr.html#x10
36217 + 67. http://www.columbia.edu/kermit/ckcbwr.html#x8
36218 + 68. http://www.columbia.edu/kermit/ckubwr.html
36219 + 69. http://www.columbia.edu/kermit/ckcbwr.html#top
36220 + 70. http://www.columbia.edu/kermit/ckcbwr.html#contents
36221 + 71. http://www.columbia.edu/kermit/ckcbwr.html#x11
36222 + 72. http://www.columbia.edu/kermit/ckcbwr.html#x9
36223 + 73. http://www.columbia.edu/kermit/ck60manual.html
36224 + 74. http://www.columbia.edu/kermit/ckermi70.htm
36225 + 75. http://www.columbia.edu/kermit/hp48.html
36226 + 76. http://www.columbia.edu/kermit/ckermit70.html#x4.22
36227 + 77. http://www.columbia.edu/kermit/ckermit80.html#x15
36228 + 78. http://www.columbia.edu/kermit/ckcbwr.html#top
36229 + 79. http://www.columbia.edu/kermit/ckcbwr.html#contents
36230 + 80. http://www.columbia.edu/kermit/ckcbwr.html#x10
36231 + 81. http://www.columbia.edu/kermit/ckcbwr.html#top
36232 + 82. http://www.columbia.edu/kermit/ckcbwr.html#contents
36233 + 83. http://www.columbia.edu/kermit/ckermit.html
36234 + 84. http://www.columbia.edu/kermit/ck80.html
36235 + 85. http://www.columbia.edu/kermit/index.html
36236 + 86. http://www.columbia.edu/kermit/index.html
36237 + 87. http://www.columbia.edu/
36238 + 88. mailto:kermit@columbia.edu
36240 +++ ckermit-212/ckermod.ini
36242 +; File CKERMOD.INI, Sample C-Kermit 7.0 customization file.
36244 +; This file, which is ONLY A SAMPLE, should be called:
36246 +; .mykermrc (UNIX, OS-9, Aegis, BeBox, Plan 9)
36247 +; CKERMOD.INI (VMS, OpenVMS, AOS/VS, OS/2, Amiga, Atari ST)
36248 +; ckermod.ini (Stratus VOS)
36250 +; This file is executed automatically by the standard C-Kermit initialization
36251 +; file, CKERMIT.INI (or .kermrc). This file is not executed by C-Kermit itself
36252 +; unless the initialization file is not found.
36254 +; MODify this file to suit your needs and preferences, and install it in your
36255 +; home directory. Or replace it entirely with a new file.
36257 +; The design of this sample customization file lets you fill in a section for
36258 +; each different operating system where you run C-Kermit.
36260 +; In UNIX, if you give this file execute permission and make sure the top
36261 +; line indicates the full path of the C-Kermit 7.0-or-later executable, you
36262 +; can execute this file directly, as if it was a shell script, except it is
36263 +; interpreted by Kermit rather than the shell. This lets you have as many
36264 +; different startup files as you like, each suited to a particular purpose.
36266 +; Authors: Christine Gianone, Frank da Cruz, Jeffrey Altman,
36267 +; The Kermit Project, Columbia University.
36268 +; Creation: 23 November 1992 for C-Kermit 5A(188).
36269 +; Modified: 30 June 1993 for edit 189.
36270 +; 04 October 1994 for edit 190.
36271 +; 17 April 1995 for edit 191.
36272 +; 6 September 1996 for version 6.0, edit 192.
36273 +; 1 January 2000 for version 7.0, edit 196.
36274 +; 14 October 2001 for version 8.0, edit 200.
36277 +ECHO Executing SAMPLE C-Kermit customization file \v(cmdfile) for \v(system)...
36278 +ECHO { Please edit this file to reflect your needs and preferences.}
36281 +; ... and then remove the ECHO commands above.
36283 +COMMENT - Settings that apply to all the systems I use:
36285 +set delay 1 ; I escape back quickly
36286 +set dial display on ; I like to watch C-Kermit dial
36288 +; Dialing locale and method
36290 +; SET DIAL COUNTRY-CODE 1 ; Uncomment and replace with yours
36291 +; SET DIAL AREA-CODE 000 ; Uncomment and replace with yours
36292 +; SET DIAL LD-PREFIX 1 ; Uncomment and replace with yours
36293 +; SET DIAL INTL-PREFIX 011 ; Uncomment and replace with yours
36294 +; SET DIAL METHOD TONE ; Uncomment and replace with PULSE if necessary
36295 +; SET DIAL DIRECTORY ... ... ; List dialing directory files here
36297 +if < \v(version) 600192 -
36298 + stop 1 \v(cmdfile): C-Kermit 6.0.192 or later required.
36300 +set take error on ; Make errors fatal temporarily
36301 +check if ; Do we have an IF command?
36302 +set take error off ; Yes we do, back to normal
36304 +; The ON_EXIT macro is executed automatically when C-Kermit exits.
36305 +; Define as desired.
36307 +define ON_EXIT echo Returning you to \v(system) now.
36309 +; System-independent quick dialing macro. Depends on having the
36310 +; macros MYMODEM, MYPORT, and (optionally) MYSPEED defined in the
36311 +; system-dependent sections below.
36314 + if not defined MYMODEM end 1 {\%0: Modem type not defined.}
36315 + set modem type \m(MYMODEM)
36316 + if fail end 1 {\%0: \m(MYMODEM): Unsupported modem type.}
36317 + if not defined MYPORT end 1 {\%0: Communication port not defined.}
36318 + set port \m(MYPORT)
36319 + if fail end 1 {\%0: SET PORT \m(MYPORT) failed.}
36320 + if defined MYFLOW set flow \m(MYFLOW)
36321 + if fail end 1 {\%0: SET FLOW \m(MYFLOW) failed.}
36322 + if defined MYSPEED set speed \m(MYSPEED)
36323 + if fail end 1 {\%0: SET SPEED \m(MYSPEED) failed.}
36324 + dial \%1\%2\%3\%4\%5\%6\%7\%8\%9
36328 +forward \v(system) ; Go execute system-dependent commands
36330 +:UNIX ; UNIX, all versions...
36331 +define MYPORT /dev/cua ; My dialing environment
36332 +define MYMODEM usr ; Replace these by what you actually have
36333 +define MYSPEED 57600
36335 +; If you want all your downloads to go to the same directory, no matter
36336 +; what your current directory is, uncomment and edit the following command:
36338 +; set file download-directory ~/download ; Download directory for UNIX
36340 +; Put other UNIX-specific commands here...
36341 +end ; End of UNIX section
36343 +:VMS ; VMS and OpenVMS
36344 +define MYPORT TXA0: ; My dialing environment
36345 +define MYMODEM usr ; Replace these by what you actually have
36346 +define MYSPEED 57600
36347 +; set file download-directory [\$(USER).DOWNLOAD] ; Download directory for VMS
36348 +; Put other VMS-specific commands here...
36349 +end ; End of VMS section
36351 +:WIN32 ; Windows and OS/2 customizations...
36353 +define MYPORT COM1 ; My dialing environment
36354 +define MYMODEM usr ; Replace these by what you actually have
36355 +define MYSPEED 57600
36356 +set command byte 8 ; Use 8 bits between Kermit and console
36357 +set xfer char latin1 ; Use Latin-1 for text file transfer
36358 +set term char latin1 ; And use Latin-1 during CONNECT mode
36359 +; set file download-directory C:\DOWNLOADS
36362 +:OS9/68K ; OS-9/68000
36363 +define MYPORT /t3 ; My dialing environment
36364 +define MYMODEM usr ; Replace these by what you actually have
36365 +define MYSPEED 9600
36366 +; set file download-directory ~/downloads
36367 +end ; End of OS-9 section
36369 +:AOS/VS ; Data General AOS/VS
36370 +define MYPORT @con3 ; My dialing environment
36371 +define MYMODEM usr ; Replace these by what you actually have
36372 +define MYSPEED 9600
36373 +; set file download-directory \v(home)DOWNLOADS
36376 +; And so on, you get the idea...
36377 +; Fill in the sections that apply to you.
36379 +:Stratus_VOS ; Stratus VOS
36380 +:Amiga ; Commodore Amiga
36381 +:Atari_ST ; Atari ST
36382 +:Macintosh ; Apple Macintosh
36385 +; (End of CKERMOD.INI)
36387 +++ ckermit-212/ckermit80.txt
36388 @@ -0,0 +1,10349 @@
36390 + C-Kermit 8.0 Update Notes
36392 + [ [1]Contents ] [ [2]C-Kermit ] [ [3]Kermit Home ]
36394 + Second Supplement to Using C-Kermit, Second Edition
36398 + As of C-Kermit version: 8.0.211
36399 + Date of C-Kermit release: 10 April 2003
36400 + This file last updated: Sat Apr 10 16:36:11 2004
36402 + * IF YOU ARE READING A PLAIN-TEXT version of this document, note
36403 + that it is a plain-text dump of a Web page. You can visit the
36404 + original (and possibly more up-to-date) Web page here:
36405 + [4]http://www.columbia.edu/kermit/ckermit80.html
36406 + * If you are reading the HTML version of this file with a GUI Web
36407 + browser, the features added since C-Kermit 8.0.201 are shown in
36408 + red if your browser and monitor permit. Features that were new to
36409 + versions 8.0.200 and 201 are in black.
36411 +Authors: Frank da Cruz and Christine M. Gianone
36412 +Address: The Kermit Project
36413 + Columbia University
36414 + 612 West 115th Street
36415 + New York NY 10025-7799
36417 +Fax: +1 (212) 662-6442
36418 +E-Mail: [5]kermit-support@columbia.edu
36419 +Web: [6]http://www.columbia.edu/kermit/
36420 +Or: [7]http://www.kermit-project.org/
36421 +Or: [8]http://www.columbia.nyc.ny.us/kermit/
36422 + _________________________________________________________________
36427 + Copyright © 1997, 2002, Frank da Cruz and Christine M. Gianone.
36428 + All rights reserved.
36431 + Copyright © 1995, 2002, Trustees of Columbia University in the
36432 + City of New York. All rights reserved.
36435 + Copyright © 1985, 2002,
36436 + Trustees of Columbia University in the City of New York. All
36437 + rights reserved. See the C-Kermit [9]COPYING.TXT file or the
36438 + copyright text in the [10]ckcmai.c module for disclaimer and
36441 + When Kerberos(TM) and/or SRP(TM) (Secure Remote Password) and/or
36442 + SSL/TLS protocol are included:
36443 + Portions Copyright © 1990, Massachusetts Institute of
36445 + Portions Copyright © 1991, 1993 Regents of the University of
36447 + Portions Copyright © 1991, 1992, 1993, 1994, 1995 by AT&T.
36448 + Portions Copyright © 1997, Stanford University.
36449 + Portions Copyright © 1995-1997, Eric Young
36450 + <eay@cryptosoft.com>.
36452 + For the full text of the third-party copyright notices, see
36454 + _________________________________________________________________
36456 + WHAT IS IN THIS FILE
36458 + This file lists changes made to C-Kermit since version 7.0 was
36459 + released in January 2000. Use this file as a supplement to:
36461 + * The second edition of [12]Using C-Kermit; and:
36462 + * The [13]C-Kermit 7.0 Update Notes. Also available in plain-text
36463 + form as [14]ckermit70.txt.
36465 + until the third edition of Using C-Kermit is published. We apologize
36466 + for the scattered documentation and will consolidate it when we are
36468 + _________________________________________________________________
36470 + ADDITIONAL FILES Several other files accompany this new Kermit
36473 + [15]ckututor.html
36474 + C-Kermit Tutorial (for Unix). Also distributed in Nroff form as
36475 + [16]ckuker.nr, the Unix C-Kermit manual page.
36478 + Discussion of Kermit's new authentication and encryption
36479 + features, updated for C-Kermit 8.0.
36482 + Detailed documentation of Kermit's Telnet client, updated for
36485 + [19]ftpscripts.html
36486 + Tutorial: Writing FTP automation scripts
36489 + Platform-independent C-Kermit hints and tips. Also distributed
36490 + in plain text form as [21]ckcbwr.txt
36493 + Unix-specific C-Kermit hints and tips. Also distributed in
36494 + plain text form as [23]ckubwr.txt.
36497 + VMS-specific C-Kermit hints and tips. Also distributed in plain
36498 + text form as [25]ckvbwr.txt.
36501 + Unix C-Kermit installation instructions. Also distributed in
36502 + plain text form as [27]ckuins.txt.
36505 + VMS C-Kermit installation instructions. Also distributed in
36506 + plain text form as [29]ckvins.txt.
36509 + Compile-time configuration options. Also distributed in plain
36510 + text form as [31]ckccfg.txt.
36513 + C-Kermit Program Logic Manual. Also distributed in plain text
36514 + form as [33]ckcplm.txt.
36517 + Internet Kermit Service Aministrators Guide for Unix.
36520 + C-Kermit as an SSH Subsystem (SFTP server replacement).
36522 + [ [36]Top ] [ [37]C-Kermit ] [ [38]Kermit Home ]
36523 + __________________________________________________________________________
36527 + [39]0. WHAT'S NEW
36528 + [40]1. FIXES SINCE VERSION 7.0.196
36529 + [41]2. SSH AND HTTP
36530 + [42]2.1. SSH Connections
36531 + [43]2.2. HTTP Connections
36532 + [44]2.2.1. HTTP Command Switches
36533 + [45]2.2.2. HTTP Action Commands
36534 + [46]2.2.3. HTTP Headers
36535 + [47]2.2.4. Secure HTTP Connections
36536 + [48]2.2.5. HTTP Variables
36537 + [49]2.2.6. The HTTP Command-Line Personality
36538 + [50]3. THE BUILT-IN FTP CLIENT
36539 + [51]3.1. Making and Managing FTP Connections
36540 + [52]3.1.1. Kermit Command-Line Options for FTP
36541 + [53]3.1.2. The FTP Command-Line Personality
36542 + [54]3.1.3. The FTP URL Interpreter
36543 + [55]3.1.4. Interactive FTP Session Establishment
36544 + [56]3.2. Making Secure FTP Connections
36545 + [57]3.3. Setting FTP Preferences
36546 + [58]3.4. Managing Directories and Files
36547 + [59]3.5. Uploading Files With FTP
36548 + [60]3.5.1. FTP PUT Switches
36549 + [61]3.5.2. Update Mode
36550 + [62]3.5.3. Recovery
36551 + [63]3.6. Downloading Files With FTP
36552 + [64]3.6.1. FTP GET Switches
36553 + [65]3.6.2. Filename Collisions
36554 + [66]3.6.3. Recovery
36555 + [67]3.7. Translating Character Sets
36556 + [68]3.7.1. Character Sets and Uploading
36557 + [69]3.7.2. Character Sets and Downloading
36558 + [70]3.8. FTP Command Shortcuts
36559 + [71]3.9. Dual Sessions
36560 + [72]3.10. Automating FTP Sessions
36561 + [73]3.10.1. FTP-Specific Variables and Functions
36562 + [74]3.10.2. Examples
36563 + [75]3.10.3. Automating Secure FTP Connections
36564 + [76]3.11. Advanced FTP Protocol Features [77]4. FILE SCANNING
36565 + [78]5. FILE AND DIRECTORY NAMES CONTAINING SPACES
36566 + [79]6. OTHER COMMAND PARSING IMPROVEMENTS
36567 + [80]6.1. Grouping Macro Arguments
36568 + [81]6.2. Directory and File Name Completion
36569 + [82]6.3. Passing Arguments to Command Files
36570 + [83]6.4. More-Prompting
36571 + [84]6.5. Commas in Macro Definitions
36572 + [85]6.6. Arrow Keys
36573 + [86]7. NEW COMMANDS AND SWITCHES
36574 + [87]8. SCRIPTING IMPROVEMENTS
36575 + [88]8.1. Performance and Debugging
36576 + [89]8.2. Using Macros as Numeric Variables
36577 + [90]8.3. New IF Conditions
36578 + [91]8.4. The ON_UNKNOWN_COMMAND and ON_CD Macros
36579 + [92]8.5. The SHOW MACRO Command
36581 + [94]8.7. New or Improved Built-in Variables and Functions
36582 + [95]8.8. The RETURN and END Commands
36583 + [96]8.9. UNDEFINing Groups of Variables
36584 + [97]8.10. The INPUT and MINPUT Commands
36585 + [98]8.11. Learned Scripts
36586 + [99]8.12. Pattern Matching
36587 + [100]8.13. Dates and Times
36588 + [101]8.14. Trapping Keyboard Interruption
36589 + [102]9. S-EXPRESSIONS
36590 + [103]9.1. What is an S-Expression?
36591 + [104]9.2. Integer and Floating-Point-Arithmetic
36592 + [105]9.3. How to Use S-Expressions
36593 + [106]9.4. Summary of Built-in Constants and Operators
36594 + [107]9.5. Variables
36595 + [108]9.6. Assignments and Scope
36596 + [109]9.7. Conditional Expressions
36597 + [110]9.8. Extensibility
36598 + [111]9.9. Examples
36599 + [112]9.10. Differences from Algebraic Notation
36600 + [113]9.11.Differences from Lisp
36601 + [114]10. FILE TRANSFER
36602 + [115]11. MODEMS AND DIALING
36603 + [116]12. TERMINAL CONNECTION
36604 + [117]13. CHARACTER SETS
36605 + [118]14. DIALOUT FROM TELNET TERMINAL SERVERS
36606 + [119]15. COPING WITH BROKEN KERMIT PARTNERS
36607 + [120]16. NEW COMMAND-LINE OPTIONS
36610 + [ [122]Top ] [ [123]C-Kermit ] [ [124]Kermit Home ]
36611 + __________________________________________________________________________
36615 + The Initialization and Customization Files
36616 + C-Kermit 8.0 now supports specification of the initialization
36617 + file name (path) in an environment variable, CKERMIT_INI. It
36618 + also relies far less than before on the initialization for
36619 + functioning. See [125]Section 5 of the Unix C-Kermit
36620 + [126]installation instructions for details. As of version
36621 + 8.0.201, C-Kermit also executes your customization file (if you
36622 + have one) even if the initialization file was not found.
36623 + Previously, the customization file was executed by a TAKE
36624 + command in the initialization file (and it still is, if an
36625 + initialization is found).
36627 + Incompatible Changes
36628 + As always, we do our best to avoid changes that break existing
36629 + scripts. However, C-Kermit 8.0 does include a rather pervasive
36630 + syntax change that might alter the behavior of scripts that
36631 + depend on the previous behavior. As described in [127]Section
36632 + 5, C-Kermit now accepts doublequotes in most contexts where you
36633 + previously had to use braces to group multiple words into a
36634 + single field, or to force inclusion of leading or trailing
36635 + blanks. Most noticeably, in C-Kermit 7.0 and earlier:
36637 + echo {this is a string}
36645 + echo "this is a string"
36649 + "this is a string"
36651 + In C-Kermit 8.0, both print:
36655 + To force the doublequotes to be treated as part of the string,
36656 + use either of the following forms:
36658 + echo {"this is a string"}
36659 + echo ""this is a string""
36661 + Similarly, to force braces to be treated as part of the string:
36663 + echo "{this is a string}"
36664 + echo {{this is a string}}
36666 + Other incompatibilities:
36668 + 1. Using the SET HOST command to make HTTP connections is no
36669 + longer supported. Instead, use the new HTTP OPEN command,
36670 + described in [128]Section 2.2.
36672 + C-Kermit 7.1 Alpha.01 (8 December 2000)
36674 + Its major new features are those listed in the [129]Table of
36675 + Contents: the FTP client, file scanning, command parsing and
36676 + scripting improvements, S-Expressions, and support for the
36677 + Telnet Com Port Option, plus wider availability of the
36678 + Kerberos, SSL/TLS, and SRP security options for secure Internet
36681 + C-Kermit 7.1.199 Alpha.02 (4 January 2001)
36683 + + C-Kermit now accepts [130]FTP, TELNET, and IKSD URLs as its
36684 + first command-line argument.
36685 + + Character-set translation added to the FTP client for
36687 + + Optional [132]setting of date of incoming files by FTP [M]GET
36688 + from the server date.
36689 + + [133]FTP CHECK filename added to let FTP client check the
36690 + existence of a file on the server.
36691 + + [134]FTP GET /NAMELIST:filename added to get list of server
36692 + filenames into a local file.
36693 + + [135]FTP [M]PUT /SERVER-RENAME:template added to make server
36694 + rename a file as indicated by the template after it has
36695 + arrived completely.
36696 + + FTP [M]GET /SERVER-RENAME:template added to make server
36697 + rename a file as indicated by the template after it has been
36699 + + FTP [136]VDIRECTORY added for getting verbose directory
36700 + listings from TOPS-20.
36701 + + [137]FTP TYPE TENEX added for transferring 8-bit binary files
36703 + + Added [138]automatic text/binary mode switching for FTP
36704 + [M]GET, based on filename patterns (e.g. *.zip, *.gz, *.exe
36705 + are binary; *.txt, *.c are text).
36706 + + [139]SET SEND I-PACKETS OFF added for coping with Kermit
36707 + servers that do not support I packets.
36708 + + A new option was added to [140]\fword() and \fsplit() for
36709 + parsing comma-separated lists that might contain empty
36711 + + Bug fixes including:
36712 + o {} or "" could not be used as expected to represent the
36714 + o ,- on a line by itself in a macro definition caused
36715 + subsequent statements to be skipped.
36716 + o FTP [M]GET didn't work right if path segments were
36717 + included in the filespec.
36718 + o FTP MGET, if interrupted, did not clear its file list.
36719 + o Various problems with FTP PUT /AS-NAME that nobody
36721 + o Some FTP messages and displays interfered with each
36723 + o Parsing of YESTERDAY, TODAY, and TOMORROW in date-time
36724 + fields was broken.
36725 + o Automatic old-to-new dialing directory format conversion
36726 + was broken on VMS.
36727 + o Various source-code portability problems fixed.
36728 + + Improvement of various HELP and SHOW messages.
36730 + C-Kermit 7.1.199 Alpha.04 (1 April 2001)
36733 + o Changed default modem type from NONE to GENERIC.
36734 + o Generic dialing now sends no init string at all.
36735 + o Changed default terminal bytesize from 7 to 8.
36737 + o SET SESSION-LOG TIMESTAMPED-TEXT for timestamped session
36739 + + New modem types:
36740 + o Conexant modem family
36741 + o Lucent VENUS chipset
36742 + o PCTel V.90 chipset
36746 + o FTP OPEN /PASSIVE and /ACTIVE switches added.
36747 + o Now works with servers that that don't include path in
36749 + o Fixed SEND /RECURSIVE not to follow symlinks (UNIX).
36750 + o SET FTP VERBOSE-MODE default is now OFF instead of ON.
36751 + + Kermit protocol:
36752 + o Fixed what I hope is the last "Receive window full"
36754 + o SET PREFIXING or SET CONTROL PREFIX now automatically
36755 + sets CLEARCHANNEL OFF.
36756 + o Fixed incorrect report of number of files transferred at
36758 + o Fixed SEND /RECURSIVE not to follow symlinks (UNIX).
36760 + o HTTP and shadow passwords enabled for SCO 5.0.6.
36761 + o Even with SET FILENAMES CONVERTED, spaces were still
36762 + accepted in incoming filenames; now they are converted
36764 + o Added support for compile-time mktemp()/mkstemp()
36767 + o Session-log format for scripted sessions fixed.
36769 + o Fixed \frdir() not to follow symlinks (UNIX).
36770 + o Fixed \fday() not to dump core for dates prior to 17 Mar
36773 + o "Closing blah..." message upon exit could not be
36775 + o Added /PAGE and /NOPAGE to DELETE switches.
36776 + o Added GO response for DELETE /ASK (delete all the rest
36778 + o Added GO response to "more?" prompt (for multi-page
36780 + o Updated HELP texts.
36782 + C-Kermit 7.1.199 Beta.01 (10 May 2001)
36784 + + FTP client verbosity adjustments.
36785 + + Bug with generic modem dialing pausing several secs fixed.
36786 + + SET HOST /USER:, SET LOGIN USERID, etc, fixed when given no
36788 + + A couple \v(dm_blah) dial modifier variables added.
36789 + + "--version" command-line switch added.
36790 + + Fixed NetBSD serial-port DTR handling.
36791 + + Lots of syntax cleanups for Flexelint and gcc -Wall.
36792 + + Fixed modem-type aliases to not take precedence over real
36794 + + Fixed funny treatment of doublequotes by ECHO command.
36795 + + Enabled SET SESSION-LOG for VMS and other non-UNIX platorms.
36796 + + Fixed changing direction in command history buffer.
36797 + + Fixed handling of IKSD URLs.
36798 + + Made sure DELETE prints a message if it got any errors.
36800 + C-Kermit 8.0.200 Beta.02 (28 June 2001)
36802 + + Major version number increased from 7 to 8.
36803 + + [141]SSH command.
36804 + + More-consistent Kermit protocol defaults.
36805 + + CONNECT idle timeout and action selection.
36806 + + CONNECT status variable.
36807 + + A way to allocate more space for filename lists.
36808 + + Pseudoterminal handler fixed for late-model Linuxes.
36809 + + Command-line option -dd for timestamped debug log.
36810 + + Download directory now works for external protocols too.
36811 + + GREP /COUNT:variable.
36812 + + SET ATTRIBUTE RECORD-FORMAT { OFF, ON }.
36815 + C-Kermit 8.0.200 Beta.03 (9 Sep 2001)
36817 + + [142]HTTP 1.1 connections and scripting
36818 + + [143]ON_CTRLC macro for trapping Ctrl-C in scripts
36819 + + [144]Date-time parsing improvements, timezones, comparison,
36821 + + [145]Pattern-matching improvements
36822 + + FTP improvements
36823 + + SET EXIT HANGUP { ON, OFF }
36824 + + SET FILE EOF { CTRL-Z, LENGTH }
36825 + + ASK[Q] /TIMEOUT
36829 + C-Kermit 8.0.200 Beta.04 (16 Nov 2001)
36831 + + [146]New Unix man page
36832 + + [147]New Unix installation instructions
36833 + + SET TELOPT policies are now enforced on non-Telnet ports if
36834 + the server begins Telnet negotiations.
36835 + + SET TERMINAL IDLE-ACTION { TELNET-NOP, TELNET-AYT }.
36836 + + UUCP lockfile creation race condition fixed.
36837 + + Dialout, modem signals, hangup, hardware flow control, etc,
36838 + tested extensively on many platforms, numerous problems
36840 + + Improved hints when dialing fails.
36841 + + SET STOP-BITS 2 can now be given without SET FLOW HARDWARE.
36842 + + Major improvements in RFC 2217 Telnet Com-Port Control.
36843 + + Improved ability to REDIAL a modem server port.
36844 + + kermit -h now shows the command name in the usage usage
36846 + + kermit -h now shows ALL command-line options.
36847 + + kermit -s blah, where blah is a symlink, now works.
36848 + + --noperms command-line option = SET ATTRIBUTE PERMISSIONS
36850 + + HTTP and HTTPS URLs now supported on the command line.
36851 + + An http command-line personality is now available.
36852 + + Initialization file streamlined to load faster, anachronisms
36854 + + Updated NEWS, INTRO, HELP text, SHOW commands. In particular,
36855 + see SHOW COMM, HELP SET LINE, HELP WAIT.
36856 + + Date/time arithmetic routines converted from floating-point
36857 + to integer arithmetic (internally) for greater accuracy and
36859 + + Quoted strings containing commas no longer break macro
36861 + + Dynamic Kermit file-transfer timeouts are now much more
36863 + + New "hot keys" to turn debug.log on/off during file transfer.
36864 + + Improved hints when file transfer fails.
36865 + + FTP CD orientation messages are now printed.
36866 + + -R now accepted on the FTP command line to request Recursion.
36867 + + -m allows Active or Passive mode to be chosen on the FTP
36869 + + -dd on the FTP command line creates a timestamped debug.log.
36870 + + FTP command-line security options filled in.
36871 + + Improved automatic text/binary mode switching for MGET.
36872 + + Removed spurious error messages that sometimes occur during
36874 + + DIRECTORY, GREP, TYPE, HEAD, and TAIL now have a /OUTPUT:file
36876 + + TYPE /NUMBER adds line numbers.
36877 + + CAT = TYPE /NOPAGE; MORE = TYPE /PAGE.
36878 + + GETOK ?-help fixed.
36879 + + \v(timestamp) (= "\v(ndate) \v(time)")
36880 + + \v(hour) (hour of the day, 0-23)
36881 + + \funix2dospath() converts a UNIX path (/) to a DOS one (\).
36882 + + \fdos2unixpath() converts a DOS (Windows, OS/2) path to a
36884 + + \fkeywordval() parses name=value pair, allows macro keyword
36886 + + We now make every attempt to not write passwords to the
36888 + + New Certficate Authority certificates file, includes the
36889 + Kermit Project at Columbia University so you can access our
36891 + + Secure targets improved and better documented in Unix
36893 + + All Linux (libc and glibc) builds consolidated under "make
36895 + + HP-UX makefile targets now have consistent names.
36896 + + New aix50 and aix51 targets added.
36898 + C-Kermit 8.0.200 Final (12 Dec 2001)
36900 + + Remote/local-mode confusion on some platforms introduced in
36902 + + Many of the makefile targets adjusted, new ones added.
36903 + + New "make install" target should please most people.
36904 + + New command: SHOW IKSD.
36906 + + Last-minute touchups to text messages, HELP text, etc.
36907 + + Enable modem-signal reading for SCO OSR5 and Unixware 7.
36908 + + Special superfast TRANSMIT /BINARY /NOECHO /NOWAIT mode
36910 + + Fixed PBX dialing in unmarked-area-code case.
36911 + + Improved SHOW COMMUNICATIONS tells lockfile directory,
36912 + typical dialout device name.
36913 + + Some FTP OPEN command parsing problems fixed.
36914 + + Some errors in date arithmetic fixed.
36915 + + New command: SET TERMINAL AUTODOWNLOAD { ..., ERROR { STOP,
36917 + + New command: HELP FIREWALL.
36918 + + SET MODEM HANGUP-METHOD DTR added as synomym for RS232-SIGNAL
36919 + + Support for secure URL protocols added: telnets:, ftps:,
36922 + C-Kermit 8.0.201 (8 Feb 2002)
36924 + + Installability as an [148]SSH v2 Subsystem.
36925 + + [149]SET LOCUS command.
36926 + + [150]L-versions of CD, DIR, DELETE, MKDIR, etc, to force
36928 + + [151]USER and ACCOUNT added as synonyms for FTP USER and FTP
36930 + + [152]SHOW VARIABLES now accepts a list of variables.
36931 + + Rudimentary support for [153]Caller ID when receiving phone
36933 + + Up/Down [154]Arrow-key navigation of command history buffer.
36934 + + [155]Automatic execution of customization file if init file
36937 + C-Kermit 8.0.206 Beta.01 (11 Oct 2002)
36941 + o ORIENTATION lists location-related variables and their
36943 + o KCD changes to special directories by their symbolic
36944 + names ("kcd ?" for a list).
36945 + o SET CD HOME path to specify home directory for CD and
36947 + o CONTINUE given at top level is equivalent to END --
36948 + handy when PROMPT'ed out of a script, to continue the
36951 + New switches or operands for existing commands:
36954 + o ASK, ASKQ, GETOK /QUIET (suppresses error message on
36956 + o COPY /APPEND now allows concatenating multiple source
36957 + files into one dest file.
36958 + o SET TCP { HTTP-PROXY, SOCKS-SERVER } /USER, /PASSWORD.
36959 + o DIRECTORY command now accepts multiple filespecs, e.g.
36962 + SET QUIET ON now also applies to:
36964 + o SET HOST connection progress messages.
36965 + o "Press the X or E key to cancel" file-transfer message.
36966 + o REMOTE CD response.
36967 + o REMOTE LOGIN response.
36969 + Improvements and new features:
36971 + o Numerous FTP client fixes and new features, listed
36973 + o C-Kermit, when in remote mode at the end of a file
36974 + transfer, now prints a one-line "where" message. Control
36975 + with SET TRANSFER REPORT.
36976 + o Unix makefile "install" target now creates an UNINSTALL
36978 + o Improved operation and performance on RFC 2217 Telnet
36980 + o Improved CONNECT (interactive terminal connection)
36982 + o HELP text updated for many commands.
36984 + New or fixed makefile targets:
36986 + o Solaris 9 (several variations)
36987 + o Concurrent PowerMAX
36990 + o FreeBSD 4.6, 5.0
36993 + Bugs fixed (general):
36995 + o Failure to run in VMS Batch fixed.
36996 + o LDIRECTORY fixed to run Kermit's built-in DIRECTORY
36997 + command rather than an external one.
36998 + o Fixed Solaris and other SVORPOSIX builds to find out
36999 + their full hostnames rather than just the "uname -n"
37001 + o Fixed some problems matching strings that start with
37003 + o Fixed some problems matching pattern that contain
37005 + o Fixed erroneous reporting of text-mode reception as
37006 + binary when sender did not report the file size
37008 + o Many problems with SWITCH statements fixed.
37009 + o Fixed SET OPTIONS DIRECTORY /DOTFILES to work for server
37011 + o Fixed DELETE to print an error message if the file was
37013 + o Fixed SET CONTROL UNPREFIX ALL and SET PREFIXING NONE to
37014 + do the same thing.
37015 + o Fixed bugs executing macros from within the ON_EXIT
37017 + o \fday() and \fnday() fixed for dates prior to 17 Nov
37019 + o Serial speed-changing bug in Linux fixed.
37020 + o "Unbalanced braces" script parsing errors when using
37022 + o "if defined \v(name)" fixed to behave as described in
37024 + o Fixed Problems caused by LOCAL variables whose names are
37025 + left substrings of macro names.
37026 + o The INPUT command was fixed to honor the PARITY setting.
37027 + o Fixed bug with COPY to existing file that is longer than
37029 + o REINPUT command failed to strip braces/quotes around its
37031 + o Network directory lookups didn't work for SSH
37033 + o REMOTE SET { FILE, TRANSFER } CHARACTER-SET fixed.
37034 + o Closed some holes whereby an incompletely received file
37035 + was not deleted when SET FILE INCOMPLETE is DISCARD,
37036 + e.g. when the Kermit is hung up upon.
37037 + o SET XFER CHARACTER-SET TRANSPARENT fixed to do the same
37038 + as SET XFER TRANSLATION OFF.
37039 + o SET HOST PTY (e.g. SSH) connection fixed to pass along
37040 + window-size changes.
37041 + o C-Kermit search path for TAKE files was accidentally
37044 + FTP client bugs fixed:
37046 + o Character set translation was broken on little-endian
37047 + (e.g. PC) architectures.
37048 + o FTP PUT /SERVER-RENAME:, /RENAME-TO:, /MOVE-TO: switches
37050 + o Make SET TRANSFER MODE MANUAL apply to FTP.
37051 + o Make SET FILE INCOMPLETE { KEEP, DISCARD } apply to FTP.
37052 + o FTP MGET /UPDATE handled equal times incorrectly.
37053 + o FTP MGET /RECOVER fixed to ignore file dates, use only
37055 + o FTP MGET /RECOVER sometimes downloaded files it didn't
37057 + o FTP downloads with TRANSFER DISPLAY BRIEF could give
37058 + misleading error messages.
37059 + o FTP MGET temp file not deleted if FTP DEBUG set to OFF
37061 + o LOCUS not switched back when FTP connection is lost.
37062 + o Set incoming file date even if it was not completely
37064 + o FTP MGET sent SIZE and MDTM commands even when it didn't
37066 + o FTP MGET sent SIZE and MDTM commands even when it knew
37067 + they wouldn't work.
37068 + o FTP MGET failed if no files were selected for download.
37069 + o FTP MGET a* b* c* would fail to get any c*'s if no b*'s
37071 + o Big problems canceling MGET with Ctrl-C.
37072 + o Some extraneous LOCUS dialogs squelched.
37073 + o Some inconsistencies in SET FTP FILENAMES AUTO fixed.
37074 + o Fixed file-descriptor pileup after multiple MGETs when
37076 + o Fixed "mget foo", where foo is a directory name.
37078 + FTP improvements:
37080 + o New [156]FTP protocol features added (FEAT, MLSD).
37081 + o FTP MGET /RECURSIVE now works as expected if server
37083 + o FTP MGET /DATES-DIFFER to download if local and remote
37084 + file dates differ.
37085 + o FTP DATES default changed to ON.
37086 + o FTP MPUT, MGET /EXCEPT now allows up to 64 patterns (up
37088 + o Top-level SITE and PASSIVE commands added for
37090 + o MGET /COLLISION:APPEND /AS-NAME:newfile *.* puts all
37091 + remote files into one local file.
37092 + o SET FTP SERVER-TIME-OFFSET for when server has wrong
37094 + o Allow for alternative server interpretations of [M]MPUT
37096 + o SET FTP ANONOMOUS-PASSWORD lets you specify the default
37097 + anonymous password.
37098 + o Allow "GET /RECURSIVE path/file" to force local
37099 + subdirectory creation.
37100 + o SET FTP DISPLAY is like SET TRANSFER DISPLAY but applies
37102 + o FTP { ENABLE, DISABLE } new-protocol-feature-name.
37103 + o FTP MGET /NODOTFILES.
37104 + o Debug log now records FTP commands and responses in
37105 + grep-able format.
37107 + [ [157]Top ] [ [158]Contents ] [ [159]C-Kermit ] [ [160]Kermit Home ]
37108 + __________________________________________________________________________
37110 +1. FIXES SINCE VERSION 7.0.196 First, the changes from 7.0.196 to 7.0.197...
37111 +Source and makefile tweaks to get successful builds on platforms that were not
37112 +available in time for the 7.0 release:
37117 + * AT&T 3B2 and 3B20
37120 + * Interactive UNIX System V/386 R3.2 V4.1.1
37125 + * SCO Xenix 2.3.4
37126 + * SINIX 5.41/Intel
37129 + * SunOS 4.1 with X.25
37133 + There were no functional changes from 196 to 197.
37135 + Fixes applied after C-Kermit 7.0.197 was released:
37137 + Source code: Big flexelint and "gcc -Wall" audit and cleanup.
37140 + * Solaris RTS/CTS (hardware flow control) didn't work.
37141 + * BSDI RTS/CTS worked only in one direction.
37142 + * FreeBSD 4.0 with ncurses 5.0 broke interactive command parsing.
37143 + * QNX-32 build lacked -DBIGBUFOK so couldn't execute big macros.
37146 + * SET HOST /PTY didn't work on some platforms.
37147 + * Broken SET HOST /USER:xxx /PASSWORD:yyy /ACCOUNT:zzz switches
37149 + * Transparent printing was broken in Unix.
37150 + * ANSWER 0 (wait forever) didn't work.
37151 + * Some problems in Multitech modem command strings.
37152 + * Spurious "?Sorry, can't condition console terminal" errors.
37153 + * Disabling modem command strings by setting them to nothing broke
37155 + * SET DIAL TIMEOUT value was usually ignored.
37156 + * SET DIAL METHOD PULSE didn't work.
37157 + * Certain modem commands, if changed, not refreshed if modem type
37159 + * SET SESSION-LOG command was missing from VMS.
37160 + * VMS session log format fixed for scripts.
37161 + * HANGUP by dropping DTR didn't work in NetBSD.
37162 + * SET FLOW /AUTO versus SET FLOW confusion fixed.
37163 + * Spurious secondary Solaris lockfile removed.
37164 + * SCO OSR5 DTR On/Off hangup.
37165 + * UUCP lockfile race condition.
37167 + Commands and scripts:
37168 + * Missing CAUTIOUS and FAST commands restored.
37169 + * Broken PTY command in late-model Linuxes fixed (API changed).
37170 + * Fixed off-by-one error in command recall when switching direction.
37171 + * Fixed recall of commands that contain '?'.
37172 + * COPY /SWAP-BYTES didn't work on some architectures.
37173 + * Various combinations of COPY switches didn't work.
37174 + * Various problems with COPY or RENAME with a directory name as
37176 + * SHIFT didn't decrement \v(argc) if used within IF, ELSE, or SWITCH
37178 + * SHIFT didn't affect the \%* variable.
37179 + * Divide by zero improperly handled in some \function()s.
37180 + * Problems with RETURN from right-recursive functions.
37181 + * FSEEK /LINE \%c LAST didn't work if already at end.
37182 + * Some buffer vulnerabilities and potential memory leaks were
37183 + discovered and fixed.
37184 + * \frdirectory() fixed not to follow symbolic links.
37185 + * SET EXIT WARNING OFF fixed to work when EXIT given in a script.
37186 + * Missing DELETE and MKDIR error message fixed.
37187 + * \fday() core dump for ancient dates fixed.
37190 + * SEND /COMMAND was broken.
37191 + * CRECEIVE was broken (but RECEIVE /COMMAND was OK).
37192 + * Quoting wildcard chars in filenames didn't work.
37193 + * Problems canceling streaming file transfers with X or Z.
37194 + * Problems shifting between streaming and windowing file transfer.
37195 + * Non-FULL file-transfer displays erroneously said STREAMING when
37197 + * An active SEND-LIST prevented GET from working.
37198 + * SET SERVER GET-PATH interpretation of relative names like "." was
37200 + * The MAIL command was broken.
37201 + * "kermit -s *" might have skipped some files.
37202 + * Transaction log entries were not made for external protocol
37204 + * File count report fixed to show number of files actually
37206 + * Fixed filename conversion to convert spaces to underscores.
37207 + * Made SET PREFIXING / SET CONTROL PREFIX also adjust CLEARCHANNEL.
37208 + * More "Receive window full" errors fixed.
37209 + * Broken terminal buffering after curses display in Solaris fixed.
37210 + * SET FILE INCOMPLETE DISCARD did not work in all cases.
37211 + * Packet log changed to reformat the start-of-packet character
37213 + * Dynamic timeouts could grow ridiculously large.
37216 + * Hebrew-7 translations missed the letter Tav.
37217 + * C1 area of CP1252 was ignored.
37218 + * SET TRANSFER CHARACTER-SET TRANSPARENT could give garbage
37220 + * TRANSLATE might not work on Little Endian architectures.
37221 + * Insufficient range checking in certain TRANSLATE operations.
37223 + The following bugs in C-Kermit 8.0.200 were fixed in 8.0.201:
37225 + * An obscure path through the code could cause the Unix version of
37226 + C-Kermit to dump core during its startup sequence. This happened
37227 + to only one person, but now it's fixed.
37228 + * When C-Kermit 8.0 is in Kermit server mode and the client says
37229 + "get blah", where blah (on the server) is a symlink rather than a
37230 + real file, the server unreasonably refused to send the linked-to
37232 + * When C-Kermit is an FTP client and says "get foo/bar" (i.e. a
37233 + filename that includes one or more path segments), it failed to
37234 + accept the incoming file (this happened only with GET, not MGET).
37235 + * Array references should be case insensitive but only lowercase
37236 + array letters were accepted.
37237 + * SHOW VARIABLES dumped core on \v(sexpression) and \v(svalue).
37238 + * Spurious refusals of remote directory listings if the remote
37239 + server's date was set in the past.
37240 + * In AIX, and maybe elsewhere too, Kermit's COPY command always
37241 + failed with "Source and destination are the same file" when the
37242 + destination file didn't exist.
37243 + * The VMS version of C-Kermit did not work in Batch or when SPAWN'd.
37244 + To compound the problem, it also pretty much ignored the -B and -z
37245 + command-line options, whose purpose is to work around such
37247 + * C-Kermit 8.0 could not be built on IRIX 5.x.
37248 + * The C-Kermit 8.0 build for QNX6 said it was an "(unknown
37251 + Other fixes are listed in the [161]previous section.
37253 + [ [162]Top ] [ [163]Contents ] [ [164]C-Kermit ] [ [165]Kermit Home ]
37254 + __________________________________________________________________________
37258 + 2.1. SSH Connections
37260 + This section does not apply to [166]Kermit 95 2.0, which has its
37261 + own built-in SSH client, which is documented [167]SEPARATELY.
37263 + On most UNIX platforms, C-Kermit can make SSH (Secure SHell)
37264 + connection by running the external SSH command or program through its
37265 + pseudoterminal interface. The command is:
37268 + Tells Kermit to start the external SSH client, passing the
37269 + given text to it on the command line. Normally the text is just
37270 + the hostname, but it can be anything else that is acceptable to
37271 + the ssh client. If the command succeeds, the connection is made
37272 + and Kermit automatically enters CONNECT (terminal) mode. You
37273 + can use the SSH command to make a connection to any host that
37274 + has an SSH server.
37276 + Kermit's SSH command gives you all the features of Kermit on an SSH
37277 + connection: command language, file transfer, character-set
37278 + translation, scripting, and all the rest. By default, C-Kermit invokes
37279 + SSH with "-e none", which disables the ssh escape character and makes
37280 + the connection transparent for purposes of file transfer. You can,
37281 + however, change the SSH invocation to whatever else you might need (an
37282 + explicit path, additional command-line arguments, etc) with:
37284 + SET SSH COMMAND text
37285 + Specifies the system command that Kermit's SSH command should
37286 + use to invoke the external SSH client. Use this command to
37287 + supply a specific path or alternative name, or to include
37288 + different or more command-line options.
37290 + In most cases, these connections work quite well. They can be scripted
37291 + like any other connection, and file transfer goes as fast as, or
37292 + faster than, on a regular Telnet connection. In some cases, however,
37293 + the underlying pseudoterminal driver is a limiting factor, resulting
37294 + in slow or failed file transfers. Sometimes you can work around such
37295 + problems by reducing the Kermit packet length. Note that Kermit does
37296 + not consider SSH connections to be reliable, so it does not offer to
37297 + use streaming in Kermit protocol transfers (but you can force it with
37298 + SET RELIABLE or SET STREAMING if you wish).
37300 + The SSH command is like the TELNET command: it enters CONNECT mode
37301 + automatically when the connection is made. Therefore, to script an SSH
37304 + set host /pty ssh -e none [ other-options ] host
37307 + to make the connection.
37309 + Here's a sequence that can be used to make a connection to a given
37310 + host using Telnet if the host accepts it, otherwise SSH:
37312 + if not defined \%1 exit 1 Usage: \%0 host
37314 + set host \%1 23 /telnet
37316 + set host /pty ssh -l \m(user) -e none \%1
37317 + if fail exit 1 \%1: Telnet and SSH both fail
37318 + echo SSH connection to \%1 successful
37320 + echo Telnet connection to \%1 successful
37323 + In SSH v2, it is possible to make an SSH connection direct to a Kermit
37324 + server system if the host administrator has configured the SSH server
37325 + to allow this; [168]CLICK HERE for details.
37327 + Since Kermit uses external ssh client software, and since there are
37328 + different ssh clients (and different releases of each one), the exact
37329 + command to be used to make an SSH/Kermit connection can vary. Here is
37330 + the command for the OpenSSH 3.0.2p1 client:
37332 +set host /pipe ssh -e none [ -l username ] -T -s hostname kermit
37336 +set host /pipe ssh -e none -l olga -T -s hq.xyzcorp.com kermit
37338 + The SSH client might or might not prompt you for a password or other
37339 + information before it makes the connection; this depends on your SSH
37340 + configuration (your public and private keys, your authorized hosts
37341 + file, etc). Here's a brief synopsis of the OpenSSH client command
37342 + syntax ("man ssh" for details):
37345 + This tells the SSH client to use no escape character. Since we
37346 + will be transferring files across the connection, we don't want
37347 + the connection to suddenly block because some character in the
37351 + This is the username on the remote host. You can omit the -l
37352 + option and its argument if your local and remote usernames are
37353 + the same. If they are different, you must supply the remote
37357 + This tells the SSH client to tell the SSH server not to
37358 + allocate a pseudoterminal. We are not making a terminal
37359 + connection, we don't need a terminal, and in fact if a terminal
37360 + were allocated on the remote end, the connection would not
37364 + This tells the SSH client to tell the SSH server to start the
37365 + specified subsystem ("kermit") once the connection is made. The
37366 + subsystem name comes after the hostname.
37369 + The IP host name or address of the desired host.
37371 + You might want to include other or additional ssh command-line
37372 + options; "man ssh" explains what they are. Here are some examples for
37373 + the OpenSSH 3.0.2p1 client:
37375 + -oClearAllForwardings yes
37376 + -oForwardAgent no
37378 + -oFallbackToRsh no
37379 + These ensure that a secure connection is used and that the
37380 + connection used for file transfer is not also used for
37381 + forwarding other things that might be specified in the
37385 + (i.e. SSH v2) Ensures that the negotiated protocol supports
37388 + Once you have an SSH connection to a Kermit server, it's just like any
37389 + other connection to a Kermit server (and very similar to a connection
37390 + to an FTP server). You give the client file transfer and management
37391 + commands for the server, and the server executes them. Of course you
37392 + can also give the client any other commands you wish.
37394 + [ [169]SSH Kermit Server Subsystem ] [ [170]Kermit 95 Built-in SSH
37396 + _________________________________________________________________
37398 + 2.2. HTTP Connections
37400 + Hypertext Transfer Protocol, or HTTP, is the application protocol of
37401 + the World Wide Web (WWW), used between Web browsers (clients) and Web
37402 + servers. It allows a client to get files from websites, upload files
37403 + to websites, delete files from websites, get information about website
37404 + directories and files, and interact with server-side CGI scripts.
37405 + C-Kermit includes an HTTP client capable of both clear-text and secure
37406 + HTTP connections, that can do all these tasks and can be automated
37407 + through the Kermit scripting language.
37409 + Although C-Kermit 7.0 could make HTTP connections to Web servers, it
37410 + could do so only when no other connection was open, and the procedure
37411 + was somewhat awkward. C-Kermit 8.0 improves matters by:
37413 + * Allowing an HTTP connection to be open at the same time as a
37414 + regular SET LINE or SET HOST connection, and also at the same time
37415 + as an FTP connection ([171]Section 3);
37416 + * Upgrading the HTTP protocol level from 1.0 to 1.1, thus allowing
37417 + for persistent connections, in which a series of commands can be
37418 + sent on the same connection, rather than only one as in HTTP 1.0
37419 + (and C-Kermit 7.0);
37420 + * Providing for "one-shot" URL-driven HTTP operations such as GET or
37422 + * Providing a distinct HTTP command-line personality.
37424 + Persistent HTTP connections are managed with the following commands:
37426 + HTTP [ switches ] OPEN [ security-options ] host-or-url [ port ]
37427 + Opens a persistent connection to the specified host (IP host
37428 + name or address) on the specified port. If any switches
37429 + (options, listed in the next section) are included, their
37430 + values are saved and used for all subsequent HTTP action
37431 + commands on the same connection. If no port is specified, HTTP
37432 + (80) is used. A Uniform Resource Locator (URL, [172]RFC 1738)
37433 + can be given instead of a hostname (or address) and port (but
37434 + the URL can not include a directory/file path). The security
37435 + options are explained [173]below. The HTTP OPEN command
37436 + replaces the C-Kermit 7.0 SET HOST hostname HTTP command, which
37437 + no longer works with HTTP GET and related commands.
37440 + Closes any open HTTP connection and clears any saved switch
37443 + A URL starts with a protocol name, which must be http or https in this
37444 + case; optionally includes a username and password; and must contain a
37445 + host name or address:
37447 + protocol://[user[.password]]@host[:port][URI]
37449 + HTTP is Hypertext Transfer Protocol. HTTPS is the secure (SSL/TLS)
37450 + version of HTTP. The TCP service port is derived from the protocol
37451 + prefix (so normally the ":port" field is omitted). Thus the URL
37452 + protocol name specifies a default TCP service port and the URL user
37453 + and password fields can take the place of the /USER and /PASSWORD
37454 + switches ([174]Section 2.2.1). The optional URI is a "compact string
37455 + of characters for identifying an abstract or physical resource"
37456 + ([175]RFC 2396), such as a file. It must begin with a slash (/); if
37457 + the URI is omitted, "/" is supplied. Examples:
37459 + http open http://www.columbia.edu/
37460 + Equivalent to http open www.columbia.edu or http open
37461 + www.columbia.edu http.
37463 + http open https://olga.secret@www1.xyzcorp.com/
37464 + Equivalent to http /user:olga /pass:secret open
37465 + www1.xyzcorp.com https.
37467 + Persistence is accomplished unilaterally by C-Kermit 8.0. An HTTP 1.0
37468 + server closes the connection after each action. Although HTTP 1.1
37469 + allows multiple actions on the same connection, an HTTP 1.1 server
37470 + tends to close the connection if it is idle for more than a few
37471 + seconds, to defend itself against denial-of-service attacks. But when
37472 + you use Kermit's HTTP OPEN command to create a connection, Kermit
37473 + reopens it automatically (if necessary) for each HTTP action until you
37474 + close it with HTTP CLOSE, regardless of the server's HTTP protocol
37475 + version, or how many times it closes the connection.
37477 + Firewalls can be negotiated through proxies with the following
37480 + SET TCP HTTP-PROXY [ host[:port] ]
37481 + If a host (by hostname or IP address) is specified, Kermit uses
37482 + it as a proxy server when attempting outgoing TCP connections
37483 + -- not only HTTP connections, but all TCP/IP connections,
37484 + Telnet and FTP included. This allows Kermit to adapt to the
37485 + HTTP firewall penetration method (as opposed to other methods
37486 + such as SOCKS4). If no hostname or ip-address is specified, any
37487 + previously specified Proxy server is removed. If no port number
37488 + is specified, the "http" service is used. This command must be
37489 + given before the HTTP OPEN command if a proxy is to be used or
37492 + HTTP [ switches ] CONNECT host[:port]
37493 + Instructs the HTTP server to act as a proxy, establishing a
37494 + connection to the specified host (IP hostname or address) on
37495 + the given port (80 = HTTP by default) and to redirect all data
37496 + transmitted between Kermit and itself to the given host for the
37497 + life of the connection. This command is to be used only for
37498 + debugging HTTP proxy connections. If a proxy connection is
37499 + required, instruct Kermit to use the proxy with the SET TCP
37500 + HTTP-PROXY command.
37502 + 2.2.1. HTTP Command Switches
37504 + HTTP switches, like all other switches, are optional. When HTTP
37505 + switches are included with the HTTP OPEN command, they apply
37506 + automatically to this and all subsequent HTTP actions (GET, PUT, ...)
37507 + on the same connection until an HTTP CLOSE command is given. So if you
37508 + include switches (or the equivalent URL fields, such as user and
37509 + password) in the HTTP OPEN command, you can omit them from subsequent
37510 + commands on the same connection. If the connection has closed since
37511 + your last command, it is automatically reopened with the same options.
37513 + If you include switches with an HTTP action command (such as GET or
37514 + PUT), they apply only to that command.
37517 + To be used in case a page requires a username for access. The
37518 + username is sent with page requests. If it is given with the
37519 + OPEN command it is saved until needed. If a username is
37520 + included in a URL, it overrides the username given in the
37521 + switch. CAUTION: Username and password (and all other
37522 + information, including credit card numbers and other material
37523 + that you might prefer to protect from public view) are sent
37524 + across the network in clear text on regular HTTP connections,
37525 + but authentication is performed securely on HTTPS connections.
37528 + To be used in case a web page requires a password for access.
37529 + The password is sent with page requests. If it is given with
37530 + the OPEN command it is saved until needed. If a password is
37531 + given in a URL, it overrides the one given here. CAUTION: (same
37534 + /AGENT:user-agent
37535 + Identifies the client to the server. Overrides the default
37536 + agent string, which is "C-Kermit" (for C-Kermit) or "Kermit-95"
37539 + /ARRAY:array-designator
37540 + Tells Kermit to store the response headers in the given array,
37541 + one line per element. The array need not be declared in
37542 + advance. Example: /array:&a.
37545 + Tells Kermit to display any response text on the screen. It
37546 + applies independently of the output file specification; thus it
37547 + is possible to have the server response go to the screen, a
37548 + file, both, or neither.
37550 + /HEADER:header-item(s)
37551 + Used for specifying any optional headers to be sent with HTTP
37554 + /HEADER:tag:value
37556 + To send more than one header, use braces for grouping:
37558 + /HEADER:{{tag:value}{tag:value}...}
37560 + For a list of valid tags and value formats see [176]RFC 2616,
37561 + "Hypertext Transfer Protocol -- HTTP/1.1". A maximum of eight
37562 + headers may be specified.
37564 + 2.2.2. HTTP Action Commands
37566 + HTTP actions can occur within a persistent connection, or they can be
37567 + self-contained ("connectionless"). A persistent HTTP connection begins
37568 + with an HTTP OPEN command, followed by zero or more HTTP action
37569 + commands, and is terminated with an HTTP CLOSE command:
37571 + http open www.columbia.edu
37572 + if failure stop 1 HTTP OPEN failed: \v(http_message)
37573 + http get kermit/index.html
37574 + if failure stop 1 HTTP GET failed: \v(http_message)
37575 + (more actions possible here...)
37578 + A self-contained HTTP action occurs when a URL is given instead of a
37579 + remote file name to an HTTP action command. In this case, Kermit makes
37580 + the HTTP connection, takes the action, and then closes the connection.
37581 + If an HTTP connection was already open, it is closed silently and
37584 + http get http://www.columbia.edu/kermit/index.html
37586 + Kermit's HTTP action commands are as follows. Switches may be included
37587 + with any of these to override switch (or default) values given in the
37588 + HTTP OPEN command.
37590 + HTTP [ switches ] GET remote-filename [ local-filename ]
37591 + Retrieves the named file from the server specified in the most
37592 + recent HTTP OPEN command for which a corresponding HTTP CLOSE
37593 + command has not been given. The filename may not include
37594 + wildcards (HTTP protocol does not support them). If no HTTP
37595 + OPEN command is in effect, this form of the HTTP GET command
37596 + fails. The default local filename is the same as the remote
37597 + name, but with any pathname stripped. For example, the command
37598 + http get kermit/index.html stores the file in the current local
37599 + directory as index.html. If the /HEADERS: switch is included,
37600 + information about the file is also stored in the specified
37601 + array (explained in [177]Section 2.2.3). All files are
37602 + transferred in binary mode. HTTP does not provide for
37603 + record-format or character-set conversion.
37605 + HTTP [ switches ] GET url [ local-filename ]
37606 + When HTTP GET is given a URL rather than a filename, Kermit
37607 + opens a connection to the designated server (closing any
37608 + previously open HTTP connection), gets the file, and then
37609 + closes the connection. If the URL does not include a filename,
37610 + index.html is supplied. This is the self-contained one-step
37611 + "connectionless" method for getting a file from a Web server.
37612 + The data is not interpreted; HTTP GET is like "lynx -source"
37613 + rather than "lynx -dump".
37615 + In the remaining HTTP action commands, the distinction between a
37616 + remote filename and a URL are the same as in the HTTP GET command.
37618 + HTTP [ switches ] HEAD remote-filename-or-url [ local-filename ]
37619 + Like GET except without actually getting the file; instead it
37620 + retrieves only the headers. If the /ARRAY: or /TOSCREEN switch
37621 + is included, there is no default local output filename but you
37622 + can still specify one. If neither of these switches is
37623 + included, the default local filename is the same as the remote
37624 + filename, but with any path stripped and with ".head" appended.
37625 + The HEAD command can be used in a script with the /ARRAY:
37626 + switch to retrieve information about the requested resource to
37627 + determine whether the resource should actually be retrieved
37628 + with a subsequent GET request.
37630 + HTTP [ switches ] INDEX remote-directory-or-url [ local-filename ]
37631 + Asks the server to send a listing of the files in the given
37632 + server directory. This command is not supported by most Web
37633 + servers. Even when it is supported, there is no standard format
37636 + HTTP [ switches ] POST [ /MIME-TYPE:type ] source-file
37637 + remote-path-or-url [ result-file ]
37638 + Sends data to a process running on the remote host; the result
37639 + is usually an HTML file but could be anything. The data to be
37640 + posted must be read from a local file (the source-file). If a
37641 + result file is specified, Kermit stores the server's response
37644 + HTTP [ switches ] PUT [ MIME-TYPE:type ] local-file [
37645 + remote-file-or-url [ result-file ] ]
37646 + Uploads a local file to the server. Only the name of a single
37647 + file can be given; wildcards (and group transfers) are not
37648 + supported by HTTP protocol. If no remote filename is given, the
37649 + file is sent with the same name as the local file, but with any
37650 + pathname stripped.
37652 + HTTP [ switches ] DELETE remote-file-or-url [ local-result-file ]
37653 + Asks the server to delete the specified single file. If a
37654 + result file is specified, it will contain any response data
37655 + returned by the server.
37657 + Note the limitations of HTTP protocol compared to (say) FTP or Kermit.
37658 + There is no command for changing directories, no standard way to get
37659 + file or directory lists, no way to transfer file groups by using
37660 + wildcard notation, etc, and therefore no good way to (say) fetch all
37661 + pages, descend through subdirectories, perform automatic updates, etc.
37662 + There is no assurrance a connection will stay open and, as noted,
37663 + there is no provision for data conversion between unlike platforms.
37664 + The data's MIME headers can be used for postprocessing.
37666 + 2.2.3. HTTP Headers
37668 + Each HTTP request and response contains a set of name/value pairs
37669 + called headers. HTTP headers are specified in [178]RFC 2616. For
37670 + example, an HTTP GET request for /index.html on www.columbia.edu
37671 + contains the following headers:
37673 + GET /index.html HTTP/1.1
37674 + Host: www.columbia.edu:80
37675 + User-agent: C-Kermit 8.0
37676 + Authorization: Basic base64-encoded-username-password
37678 + These might be followed by any others specified with a /HEADERS:
37681 + Accept: image/gif, image/x-xbitmap, image/jpeg, *.*
37682 + Accept-Encoding: gzip
37683 + Accept-Language: en
37684 + Accept-Charset: iso-8859-1,utf-8
37685 + Cookie: cookie-data
37687 + The server sends back a short report about the file prior to sending
37688 + the file contents. Example:
37691 + Date: Fri, 24 Aug 2001 21:09:39 GMT
37692 + Server: Apache/1.3.4 (Unix)
37693 + Last-Modified: Mon, 06 Aug 2001 21:16:13 GMT
37694 + ETag: "1fa137-10d7-3b6f091d"
37695 + Accept-Ranges: bytes
37696 + Content-Length: 4311
37697 + Content-Type: text/html
37699 + If you want to have this information available to a Kermit script you
37700 + can use the /ARRAY switch to have Kermit put it in array, one line per
37701 + array element. Example:
37703 + set exit warning off
37704 + http open www.columbia.edu
37705 + if fail exit 1 Can't reach server
37706 + http /array:&a get /index.html
37707 + if fail exit 1 Can't get file
37708 + echo Header lines: \fdim(&a)
37709 + for \%i 1 \fdim(&a) 1 {
37710 + echo \%i. \&a[\%i]
37713 + Note that the "Date:" item is the current date and time; the
37714 + "Last-Modifed:" item is the file's modification date and time. An
37715 + example showing how to use this information is presented in
37716 + [179]Section 8.13.7.
37718 + 2.2.4. Secure HTTP Connections
37720 + SSL/TLS (Secure Sockets Layer / Transport Layer Security) is the
37721 + protocol used to secure HTTP, SMTP, and other Internet applications.
37722 + See the [180]C-Kermit Reference Section 5.4 for an introduction to
37723 + SSL/TLS. To make a secure HTTP connection, you need:
37725 + 1. A secure client (a version of C-Kermit or Kermit 95 with SSL/TLS
37726 + security built in). Type "check ssl" at the Kermit prompt to make
37727 + sure you have it.
37728 + 2. A secure server to connect to.
37729 + 3. The CA Root Certificate used to authenticate the server to the
37730 + client. (see [181]Section 15 of the security reference for an
37731 + introduction to certificates).
37733 + And you must make a connection to the secure HTTP port: service name
37734 + HTTPS, port number 443 (as opposed to service HTTP, port 80). You can
37735 + also make secure connections to other ports by including the /TLS or
37736 + /SSL switch with the HTTP OPEN command, if the host supports SSL/TLS
37737 + on the given port:
37739 + The quality of the SSL/TLS connection depends on the cipher suite.
37740 + There are several possibilities:
37742 + Anonymous cipher suite:
37743 + If an anonymous cipher suite is negotiated, the connection is
37744 + encrypted but there is no authentication. This connection is
37745 + subject to a Man-In-The-Middle (MITM) attack.
37747 + X.509 certificate on the server:
37748 + When you connect to certain secure servers, an X.509
37749 + certificate is returned. This certificate is issued to a
37750 + special hostname, something like www1.xyzcorp.com or
37751 + wwws.xyzcorp.com (rather than the normal www.xyzcorp.com). It
37752 + is signed by the host's Certificate Authority (CA). If the host
37753 + certificate is configured on the client, it can be used to
37754 + verify the certificate received from the server. If the
37755 + certificate it verified as authentic, a check is made to ensure
37756 + it has not expired and it was issued to the host you were
37757 + attempting to connect to. If you had asked to connect to (say)
37758 + www.xyzcorp.com but were given a certificate for
37759 + www1.xyzcorp.com, you would be prompted for permission to
37762 + If the verification succeeded, the connection would be
37763 + encrypted with one-way (server-to-client) authentication. This
37764 + connection is not subject to a MITM attack.
37766 + If a username and password are transmitted over this
37767 + connection, they are not subject to interception. However, the
37768 + standard risks associated with passing the password to the host
37769 + for verification apply; for example, if the host has been
37770 + compromised, the password will be compromised.
37772 + X.509 client certificate:
37773 + If a connection has been established with an X.509 server
37774 + certificate, the server can ask the client to send a
37775 + certificate of its own. This certificate must be verified
37776 + against a CA Root certificate. The certificate itself (or
37777 + subject info from the certificate) is used to determine the
37778 + authorization for the client, and if successful, the username
37779 + and password need not be sent to the server.
37782 + Instead of using X.509 certifcates, Kerberos 5 can be used to
37783 + perform the authentication and key exchange. In this situation,
37784 + there is mutual authentication between the client and server.
37785 + The Kerberos 5 principal is used by the server to look up the
37786 + appropriate authorization data. There is no need to send
37787 + username and password.
37789 + An HTTP connection is made with the HTTP OPEN command:
37791 + HTTP [ switches ] OPEN [ { /SSL, /TLS } ] host [ port ]
37792 + If /SSL or /TLS switches are included (these are synonyms), or
37793 + if the service is HTTPS or the port is 443, a secure connection
37794 + is attempted using the current authentication settings; see
37795 + HELP SET AUTHENTICATION for details ([182]Section 6.2 of the
37796 + security reference). If the no /SSL or /TLS switch is included
37797 + but the port is 443 or the service is HTTPS, a secure
37798 + connection is attempted. If an /SSL or /TLS switch is included
37799 + but a port is not specified, an SSL/TLS connection is attempted
37800 + on the default port (80).
37802 + Certificates are covered in the separate [183]Kermit Security
37803 + Reference for C-Kermit 8.0. You should let Kermit know to verify
37804 + certificates with the SET AUTHENTICATION TLS command. For example:
37806 + SET AUTHENTICATION TLS CRL-DIR directory
37807 + Specifies a directory that contains certificate revocation
37808 + files where each file is named by the hash of the certificate
37809 + that has been revoked.
37811 + SET AUTHENTICATION TLS CRL-FILE filename
37812 + Specifies a file that contains a list of certificate
37815 + SET AUTHENTICATION TLS VERIFY-DIR directory
37816 + Specifies a directory that contains root CA certificate files
37817 + used to verify the certificate chains presented by the peer.
37818 + Each file is named by a hash of the certificate.
37820 + SET AUTHENTICATION TLS VERIFY-FILE filename
37821 + Specifies a file that contains root CA certificates to be used
37822 + for verifying certificate chains.
37824 + SET AUTHENTICATION TLS VERIFY OFF
37825 + Tells Kermit not to require a certificate and accept any
37826 + certificate that is presented regardless of whether it is
37829 + There are many other options; see the security document for details.
37831 + Now suppose you need need to fetch the file denoted by the following
37834 + https://myuserid:mypassword@wwws.xyzcorp.com/clients/info/secret.html
37836 + Once you have set up the handling of certificates as desired, you can
37837 + use the following Kermit commands:
37839 + http /user:myuserid /password:mypassword open www1.xyzcorp.com https
37841 + http get /clients/info/secret.html
37845 + As another example, let's say that you have a web form you need to
37846 + populate with three fields: red,white and blue.
37848 + <FORM ACTION="http://www.xyzcorp.com/cgi-bin/form.cgi" METHOD="POST">
37849 + <INPUT NAME="Red">
37850 + <INPUT NAME="White">
37851 + <INPUT NAME="Blue">
37854 + You can handle this with the HTTP POST command. The data to be posted
37855 + is stored in the local file data.txt.
37857 + Red=seven stripes&White=six stripes&Blue=fifty stars
37859 + and the response from the server will be stored into response.txt.
37861 + http open www.xyzcorp.com http
37863 + http /array:c post data.txt /cgi-bin/form.cgi response.txt
37867 + In this scenario, the Common Gateway Interface (CGI) sends a response
37868 + whether it succeeds or fails in a script-dependent manner. The script
37869 + can either report success and enclose the response data; or it might
37870 + send a 302 Found error which indicates that the "Location:" header
37871 + should be used to determine the URL at which the data can be found.
37873 + 2.2.5. HTTP Variables
37876 + The HTTP protocol code number of the most recent server reply,
37877 + e.g. 404 for "not found".
37879 + \v(http_connected)
37880 + 1 when an HTTP connection is open, 0 when there is no HTTP
37884 + If an HTTP connection is open, the hostname:port, e.g.
37885 + www.columbia.edu:80; otherwise, empty.
37888 + Server error message, if any, from most recent HTTP command.
37890 + \v(http_security)
37891 + A list of the security parameters and values for the current
37892 + connection, if any. Empty if the connection is not to a secure
37893 + server, or there is no connection.
37895 + To display all the HTTP variables at once, type SHOW VAR HTTP:
37897 + C-Kermit> http open www.columbia.edu
37898 + C-Kermit> http get lkjlkjlkjlkj
37899 + C-Kermit> sho var http
37900 + \v(http_code) = 404
37901 + \v(http_connected) = 1
37902 + \v(http_host) = www.columbia.edu:80
37903 + \v(http_message) = Not Found
37904 + \v(http_security) = NULL
37907 + 2.2.6. The HTTP Command-Line Personality
37909 + If you invoke C-Kermit with the name "http" or "https", you can use a
37910 + special set of HTTP-specific command-line options. You can do this by
37911 + creating a symbolic linke "http" or "https" to the C-Kermit 8.0
37912 + executable, or by having a separate copy of it called "http" or
37913 + "https". Here's the usage message ("http -h"):
37915 + Usage: ./http host [ options... ]
37917 + -d Debug to debug.log.
37918 + -S Stay (issue command prompt when done).
37919 + -Y Do not execute Kermit initialization file.
37920 + -q Quiet (suppress most messages).
37921 + -u name Username.
37922 + -P password Password.
37923 + -g pathname Get remote pathname.
37924 + -p pathname Put remote pathname.
37925 + -H pathname Head remote pathname.
37926 + -l pathname Local path for -g, -p, and -H.
37927 + -z opt[=value] Security options...
37928 + cert=file Client certificate file
37929 + certsok Accept all certificates
37930 + key=file Client private key file
37932 + verify=n 0 = none, 1 = peer , 2 = certificate required
37934 + The "host" argument is the name of a Web host, e.g. www.columbia.edu.
37935 + The action options are -p, -g, and -H. If you give an action option,
37936 + Kermit does the action and then exits. If you give a host without an
37937 + action option, Kermit makes an HTTP connection to the host and then
37938 + gives you the C-Kermit prompt. Here's a simple example that fetches a
37939 + publicly readable Web page:
37941 + http www.columbia.edu -g kermit/index.html
37943 + If you need to access a website for which a username and password are
37944 + required, you can supply them on the command line with -u and -P. If
37945 + you include a username but omit the password, Kermit prompts you for
37948 + http www.columbia.edu -u olga -p kermit/index.html -l index.html
37951 + Note that when PUT'ing files to websites, you have to supply both the
37952 + -p (remote pathname) and -l (local path) options.
37954 + If your version of Kermit is built with SSL/TLS security, you can also
37955 + use the -z option to make secure HTTP (https) connections.
37957 + Finally, as noted in [184]Section 16, you can also give a URL instead
37958 + of a host name and options.
37960 + [ [185]Top ] [ [186]Contents ] [ [187]C-Kermit Home ] [ [188]Kermit
37962 + __________________________________________________________________________
37964 +3. THE BUILT-IN FTP CLIENT
37966 + 3.1. [189]Making and Managing FTP Connections
37967 + 3.2. [190]Making Secure FTP Connections
37968 + 3.3. [191]Setting FTP Preferences
37969 + 3.4. [192]Managing Directories and Files
37970 + 3.5. [193]Uploading Files With FTP
37971 + 3.6. [194]Downloading Files With FTP
37972 + 3.7. [195]Translating Character Sets
37973 + 3.8. [196]FTP Command Shortcuts
37974 + 3.9. [197]Dual Sessions
37975 + 3.10. [198]Automating FTP Sessions
37976 + 3.11. [199]Advanced FTP Protocol Features
37978 + Earlier versions of C-Kermit and K95 included an FTP command, but it
37979 + simply invoked an external FTP client. Now, by popular demand, Kermit
37980 + includes its own built-in FTP client that offers the following
37981 + advantages over traditional FTP clients (and its previous interface to
37984 + * Any of Kermit's built-in [200]security methods can be used to
37985 + establish and conduct secure FTP sessions with [201]FTP servers
37986 + that support these methods. (Security modules can be subject to
37987 + export restrictions.)
37988 + * Kermit's FTP client uses "passive mode" by default to avoid
37989 + blockage by firewalls and network address translators. Of course
37990 + active mode can be chosen too when needed.
37991 + * [202]Character sets can be translated as part of the transfer
37992 + process even when the FTP server does not support character-set
37993 + translation, including to/from the new Internet standard
37994 + international character set, [203]Unicode UTF-8. This includes
37995 + both the file's name and (for text files only) its contents.
37996 + * All of C-Kermit's [204]file-selection mechanisms are available:
37997 + size, date, name patterns and lists, exception lists, etc.
37998 + * [205]Atomic file movement capabilities are provided (delete, move,
37999 + or rename files automatically after successful transfer).
38000 + * The correct file type, "ascii" (i.e. text) or binary, is chosen
38001 + automatically for each file (explained in [206]Section 4), and any
38002 + mixture of text and binary files can be sent in a single
38003 + operation, even across platforms.
38004 + * Update mode ("don't bother transferring files that didn't change
38005 + since last time") and recovery (resumption of an interrupted
38006 + transfer from the point of failure) are available in both
38008 + * When uploading files from UNIX to UNIX, the file's permissions can
38009 + be preserved if desired.
38010 + * Recursive directory-tree PUTs are supported between any two
38011 + platforms that have tree-structured file systems. Recursive GETs
38012 + are supported between like platforms if the server cooperates and
38013 + between like or unlike platforms if the server supports MLSD
38014 + ([207]Section 3.11).
38015 + * When receiving files, all of Kermit's file collision actions are
38016 + available: backup, update, refuse, rename, etc.
38017 + * Multi-file transfers can be interrupted on a per-file basis,
38018 + automatically skipping to the next file.
38019 + * FTP sessions are [208]fully scriptable.
38020 + * An entire FTP session (connect, login, CD, upload or download,
38021 + logout) can be specified on the command line without using a
38023 + * All of Kermit's logging options and formats are available to keep
38024 + an accurate and complete record of each connection and file
38025 + transfer, and to aid in troubleshooting.
38026 + * All of Kermit's file-transfer display options are available
38027 + (fullscreen, brief, CRT, serial, none).
38030 + * Kermit doesn't give you those annoying per-file prompts every time
38031 + you start a multi-file transfer without remembering to give a
38032 + "prompt" command first :-).
38034 + [ [209]Top ] [ [210]FTP Top ] [ [211]FTP Client Overview ] [ [212]FTP
38035 + Script Tutorial ] [ [213]C-Kermit Home ] [ [214]Kermit Home ]
38036 + _________________________________________________________________
38038 + 3.1. Making and Managing FTP Connections
38040 + Each copy of Kermit can have one FTP connection open at a time. FTP
38041 + connections are independent of regular terminal connections; a
38042 + terminal connection (serial or network via SET LINE, DIAL, SET HOST,
38043 + TELNET, etc) may be, but need not be, open at the same time as an FTP
38044 + connection, and terminal connections can also be closed, and new
38045 + connections opened, without interfering with the FTP connection (and
38046 + vice versa). Thus, for example, Kermit can have an FTP connection and
38047 + a TELNET connection open to the same host simultaneously, using the
38048 + TELNET connection (e.g.) to send mail or take other desired actions as
38049 + various FTP actions complete. Of course, each copy of Kermit can do
38050 + only one thing at a time, so it can't (for example) transfer a file
38051 + with FTP and another file with Kermit protocol simultaneously.
38053 + A Kermit FTP session can be established by [215]command-line options,
38054 + by [216]URL, or by [217]interactive commands.
38056 + 3.1.1. Kermit Command-Line Options for FTP
38058 + The new command-line option '-9' (sorry, we're out of letters) can be
38059 + used when starting C-Kermit, telling it to make an FTP connection:
38061 + kermit -9 hostname
38063 + or if a non-default FTP port is needed:
38065 + kermit -9 hostname:port
38067 + You can also specify the username on the command line with the -M ("My
38068 + User ID") option that was already there for other connection types:
38070 + kermit -9 hostname -M olga
38072 + If you specify the username on the command line, Kermit uses it when
38073 + making the connection and does not prompt you for it (but it does
38074 + prompt you for the password if one is required).
38076 + Once the connection is made, you get the regular Kermit prompt, and
38077 + can give interactive commands such as the ones described below. When
38078 + you give a BYE command, Kermit closes the session and exits, just as a
38079 + regular FTP client would do. If you don't want Kermit to exit when you
38080 + give a BYE command, include the -S ("Stay") option on the command
38083 + Other Kermit command-line options that are not specific to non-FTP
38084 + connections should affect the FTP session in the expected ways; for
38085 + example, -i and -T force binary and text mode transfers, respectively.
38087 + File transfers can not be initiated on the "kermit -9" command line;
38088 + for that you need to use Kermit's FTP personality (next section) or
38089 + you can use URLs ([218]Section 3.1.3).
38090 + _________________________________________________________________
38092 + 3.1.2. The FTP Command-Line Personality
38094 + If you want to replace your regular FTP client with C-Kermit, you can
38095 + make a link called "ftp" to the C-Kermit binary (or you can store a
38096 + copy of the C-Kermit binary under the name "ftp"). When C-Kermit is
38097 + invoked with a program name of "ftp" (or "FTP", case doesn't matter),
38098 + it assumes the command-line personality of the regular FTP client:
38100 + ftp [ options ] hostname [ port ]
38102 + In this case the options are like those of a regular FTP client:
38104 + -d Debug: enables debug messages and creates a debug.log file.
38105 + -n No autologin: Kermit should not send your user ID automatically.
38106 + -t Packet trace: accepted but is treated the same as -d.
38107 + -v Verbose: accepted but ignored (operation is verbose by default).
38108 + -i Not interactive: accepted but ignored.
38110 + and the hostname can also be a URL (explained in [219]Section 3.1.3).
38111 + To specify a non-default TCP port for the FTP server, include the port
38112 + number or name after the hostname.
38114 + There are also some bonus options that allow you to execute an entire
38115 + FTP session from the shell command line, as long as you don't include
38116 + the -n option. These are not available with regular FTP clients, and
38117 + at least one of these options (-g) conflicts with UNIX ftp (where -g
38118 + means "no globbing", which does not apply to Kermit), and some of them
38119 + (like the options above) also conflict with regular Kermit
38120 + command-line options:
38122 + -m mode = "passive" (default) or "active"
38123 + -Y Don't execute the Kermit initialization file [1]
38124 + -q Quiet, suppresses all but error messages [1]
38125 + -S Stay, don't exit automatically [1]
38126 + -A Autologin anonymously [2]
38127 + -u name Username for autologin [2] (synonym: -M [1])
38128 + -P password Password for autologin (see cautions below) [2]
38129 + -D directory cd after autologin [2]
38130 + -b Binary mode [2]
38131 + -a Text ("ascii") mode [2] (synonym: -T [1])
38132 + -R Recursive (works with -p) [4]
38133 + -p files Files to put (upload) after autologin [2] (synonym: -s [1])
38134 + -g files Files to get (download) after autologin [3]
38136 + [1] Same as Kermit, not available in regular FTP clients.
38137 + [2] Conflicts with Kermit, not available in regular FTP clients.
38138 + [3] Same as Kermit, conflicts with regular FTP clients.
38139 + [4] Conflicts with Kermit, available in some FTP clients.
38141 + Fancier options such as restart, character-set translation, filename
38142 + collision selection, automatic move/rename/delete, etc, are not
38143 + available from the command line; for these you can use the commands
38144 + described in the following sections. The -R option might also work
38145 + with -g (GET) but that depends on the server.
38147 + The following security options are also available, explained in
38148 + [220]Section 3.2:
38150 + -k realm Kerberos 4 realm [4]
38151 + -f Kerberos 5 credentials forwarding [4]
38152 + -x autoencryption mode [4]
38153 + -c cipher SRP cipher type [4]
38154 + -H hash SRP encryption hash [4]
38155 + -z option Security options [4]
38157 + If you include -A or specify a name of "anonymous" or "ftp", you are
38158 + logged in anonymously and, in the absence of -P, Kermit automatically
38159 + supplies a password of "user@host", where "user" is your local user
38160 + ID, and "host" is the hostname of the computer where Kermit is
38161 + running. If you do not include -p or -g, Kermit enters command mode so
38162 + you can type commands or execute them from a script.
38164 + If you include -p or -g, Kermit attempts to transfer the specified
38165 + files and then exits automatically at the end of the transfer unless
38166 + you also included -S (Stay). It uses the "brief" file transfer display
38167 + (one line per file) unless you include the -q option to suppress it.
38169 + When uploading files with -p, Kermit switches automatically between
38170 + text and binary mode for each file.
38172 + When downloading, you can either specify a particular mode (text or
38173 + binary) to be used for all the files, or you can let Kermit select the
38174 + type for each file automatically, based on its name (see [221]Sections
38175 + 3.5 and [222]3.6 for greater detail). In UNIX be sure to quote any
38176 + wildcard characters to prevent the shell from expanding them, as shown
38177 + in the examples just below. Filename collisions are handled according
38178 + Kermit's FILE COLLISION setting (if specified in your Kermit
38179 + customization file; otherwise the default, which is BACKUP).
38181 + It should go without saying that the -P option should be used with
38182 + caution. In addition to the well-known risks of transmitting plaintext
38183 + passwords over the Internet, in this case the password also echos to
38184 + the screen if you type it, and can be seen in ps and w listings that
38185 + show the user's currently active command and command-line arguments.
38186 + Thus command-line FTP sessions are most appropriate for secure or
38187 + anonymous connections (those that do not require passwords).
38189 + Here's an example in which you download the latest C-Kermit "tarball"
38190 + from the Columbia University FTP archive:
38192 + ftp -A kermit.columbia.edu -bg kermit/archives/ckermit.tar.gz
38194 + This assumes that "ftp" is a symbolic link to C-Kermit. It logs you in
38195 + anonymously and gets the ckermit.tar.gz file in binary mode from the
38196 + kermit/archives directory.
38198 + Here's a slightly more ambitious example that illustrates CD'ing to
38199 + the desired server directory to get a group of files in text mode (in
38200 + this case the C-Kermit source files):
38202 + ftp -A kermit.columbia.edu -D kermit/f -ag "ck[cuw]*.[cwh]" makefile
38204 + In this case we CD to the kermit/f directory so we don't have to
38205 + include it in each file specification, and we quote the ck[cuw]*.[cwh]
38206 + specification so the shell doesn't expand it, since we have to pass it
38207 + as-is to the server. Note also that the quotes don't go around the
38208 + entire file list; only around each file specification that needs to be
38211 + Here's one more example, that uploads a debug log file in binary mode
38212 + to the Kermit incoming directory (as we might ask you to do when
38213 + following up on a problem report):
38215 + ftp -A kermit.columbia.edu -D kermit/incoming -bp debug.log
38217 + In this case the -D option is required to tell the server where to put
38218 + the incoming file.
38220 + Unless the -Y option is included, your Kermit initialization file
38221 + (.mykermrc in UNIX, K95.INI in Windows) is executed before the command
38222 + line options, so you can set any FTP-related preferences there, as
38223 + described in the subsequent sections.
38224 + _________________________________________________________________
38226 + 3.1.3. The FTP URL Interpreter
38228 + If Kermit is invoked with either its regular personality (as "kermit")
38229 + or its FTP personality (as "ftp"), you can also give a URL
38230 + (Universal Resource Locator) instead of a hostname and options,
38231 + with or without a username and password:
38232 + ftp ftp://user:password@host/path
38233 + ftp ftp://user@host/path
38234 + ftp ftp://@host/path (or ftp://:@host/path)
38235 + ftp ftp://host/path
38236 + kermit ftp://host/path
38238 + If the FTP personality is used, the service must be "ftp". In all
38239 + cases, a hostname or address must be included. If a user is included
38240 + but no password, you are prompted for the password. If a path
38241 + (filename) is included:
38242 + * If "@" is included without a user, Kermit prompts for the username
38244 + * If no user and no "@" are included, "anonymous" is used.
38245 + * GET is assumed.
38247 + If no path (and no action options) are included, an interactive FTP
38248 + session is started, as in this example:
38249 + ftp ftp://kermit.columbia.edu
38251 + If a path is included, but a username is not included, "anonymous" is
38252 + used and an appropriate user@host password is supplied automatically.
38253 + If authentication is successful, Kermit attempts to GET the file
38254 + indicated by the path or, if the path is the name of a directory, it
38255 + asks the server for a directory listing. In both cases, Kermit
38256 + disconnects from the server and exits after the operation is complete
38257 + (unless you have included the -S option on the command line).
38259 + Here's an example that gets a listing of the Kermit directory at the
38261 + ftp ftp://kermit.columbia.edu/kermit/
38263 + This example gets the top-level READ.ME file from the same directory:
38264 + ftp ftp://kermit.columbia.edu/kermit/READ.ME
38266 + Here's the same example, but requesting a text-mode transfer:
38267 + ftp -T ftp://kermit.columbia.edu/kermit/READ.ME
38268 + This illustrates that you can mix command-line options and URLs
38271 + Here's an example that logs in as a (fictitious) real user to get a
38273 + ftp ftp://olga@ftp.xyzcorp.com/resume.txt
38274 + The password is not included, so Kermit prompts for it.
38276 + This scheme allows Kermit to be used as the FTP helper of other
38277 + applications, such as Web browsers, with all its advantages over other
38278 + FTP clients (especially the ones that are built in to most Web
38279 + browsers), e.g. that it can be given wildcards, and it can pick text
38280 + and binary mode automatically for each file.
38282 + HINT: suppose somebody sends you an FTP URL in email, or you see it in
38283 + some text. If your terminal screen supports copy/paste, copy the url,
38284 + and then at the shell prompt type "kermit", a space, and then paste
38287 + $ kermit ftp://alpha.greenie.net/pub/mgetty/source/1.1/mgetty1.1.27-O
38289 + "$ is the shell prompt; the part you type is underlined, the rest is
38290 + pasted in. Kermit does the rest.
38291 + _________________________________________________________________
38293 + 3.1.4. Interactive FTP Session Establishment
38295 + As you read this and the following sections, bear in mind that any
38296 + command that can be given at the prompt can also be used in a script
38297 + program. Kermit's script programming language is the same as its
38298 + interactive command language. [223]CLICK HERE if you would like to
38299 + learn a bit more about script writing.
38301 + An FTP session is established with the FTP OPEN command:
38303 + FTP [ OPEN ] [ { /SSL, /TLS } ] hostname [ switches ] [ port ]
38304 + Opens an FTP connection to the given host on the given port
38305 + and, if FTP AUTOLOGIN is ON, also logs you in to the server,
38306 + prompting for username and password if necessary. If no port is
38307 + specified, the regular FTP protocol port (21) is used. The OPEN
38308 + keyword is optional (unless the hostname conflicts with one of
38309 + the FTP command keywords, which you can list by typing "ftp
38312 + The hostname can be an IP host name, numeric IP address, or if you
38313 + have a network directory active (SET NETWORK DIRECTORY; see Chapter 6
38314 + of [224]Using C-Kermit), an entry name in the directory. In the latter
38315 + case, if the given hostname matches exactly one entry, the associated
38316 + name or address is used; if it matches more than one, Kermit cycles
38317 + through them until one is found that can be opened; if it matches
38318 + none, then the hostname is used as-is. If a directory is active but
38319 + you want to bypass directory lookup, include an "=" sign at the
38320 + beginning of the hostname, and/or use a numeric IP address.
38322 + When an FTP connection is opened, the default file-transfer mode is
38323 + set to binary if the client and server platforms are alike (e.g. both
38324 + of them are some kind of UNIX), and to text ("ascii") if they are not
38325 + alike. This has no particular effect for uploading since Kermit
38326 + automatically switches between text and binary mode for each file, but
38327 + might be important for downloading. The connection is also set to
38328 + Stream mode and File structure. Record- or page-oriented file
38329 + transfers are not supported by C-Kermit's FTP client.
38331 + The optional FTP OPEN switches are:
38334 + Logs you in anonymously, automatically supplying username
38335 + "anonymous" and user@host as the password, based on your local
38336 + user and host names.
38340 + Overrides SET FTP AUTOLOGIN ON for this connection only.
38343 + Uses the given username to log you in, thus avoiding the Name:
38345 + Overrides SET FTP AUTOLOGIN OFF for this connection only.
38348 + Uses the given text as your password, thus avoiding the
38349 + Password: prompt. This switch is not recommended for use in
38350 + script files, which would be a security risk.
38353 + Uses the given text as your account (or secondary password,
38354 + depending on the requirements of the server; most servers do
38355 + not require or accept an account name). If an account is not
38356 + supplied, you are not prompted for one.
38359 + Opens the connection in passive mode. Passive mode is the
38360 + default in Kermit's FTP client, unlike in most others, since it
38361 + works better through firewalls. The /PASSIVE and /ACTIVE
38362 + switches apply only to the connection that is being opened, and
38363 + do not affect the global FTP PASSIVE-MODE setting.
38366 + Opens the connection in active mode. Use this switch if the
38367 + server does not support passive mode, or use the command SET
38368 + FTP PASSIVE-MODE OFF.
38371 + Added in C-Kermit 8.0.201. Tells C-Kermit not to send REST,
38372 + STRU, FEAT, and MODE commands to the server when the connection
38373 + is opened, since these have been reported to cause confusion in
38376 + When a username or password is missing, a prompt is issued at the
38377 + controlling terminal and you must type the response; the response can
38378 + not be scripted. Use the switches to avoid prompts, or one of the
38379 + secure authentication methods described in the next section, or see
38380 + [225]SET FTP AUTOLOGIN and the [226]FTP USER and similar commands
38381 + described later in this section.
38385 + ftp open kermit.columbia.edu /anonymous ; Open and log in anonymously
38386 + ftp kermit.columbia.edu /anonymous ; The OPEN keyword can be omitted
38387 + ftp xyzcorp.com ; Open and maybe prompt for username
38388 + ftp xyzcorp.com /user:olga ; Open and log in as olga
38389 + ftp testing.abccorp.com 449 ; Specify a special TCP port number
38390 + ftp testing.abccorp.com /user:olaf /password:secret 449
38392 + The FTP OPEN command succeeds if a connection was opened to the server
38393 + (even if the given username and password were not valid) and fails
38394 + otherwise (see [227]Section 3.8 for details).
38396 + When your FTP session is complete, you can terminate it as follows:
38399 + Closes the FTP connection if one was open. The FTP prefix can
38400 + be omitted if no other connection is open at the same time (see
38401 + [228]Section 3.8 for details). If a connection log is active,
38402 + an FTP record is written to it. If Kermit was started with the
38403 + -9 command-line option or with its FTP command-line
38404 + personality, and the -S (Stay) option was not given, AND there
38405 + is no other active connection, the FTP BYE command also exits,
38406 + just as it does on a regular FTP client. Synonyms: FTP CLOSE,
38407 + FTP QUIT (but if the FTP prefix is omitted from QUIT, this
38408 + becomes the regular Kermit QUIT command, which is equivalent to
38409 + EXIT; i.e. it closes the connection and exits from Kermit).
38411 + The following commands can be used to achieve greater control over the
38412 + connection and login process:
38414 + SET FTP ANONYMOUS-PASSWORD text
38415 + Allows you to choose the password text to be sent automatically
38416 + by Kermit when you open an FTP connection with the /ANONYMOUS
38419 + SET FTP AUTOLOGIN { ON, OFF }
38420 + If you give this command prior to opening an FTP connection, it
38421 + controls whether Kermit tries to log you in automatically as
38422 + part of the connection process. Normally ON, which means the
38423 + username and password are sent automatically (and prompted for
38424 + if they are not yet known). When OFF, FTP OPEN connects to the
38425 + server without logging in. OFF is equivalent to the -n
38426 + command-line option when using Kermit's FTP command-line
38429 + FTP USER name [ password [ account ] ]
38430 + Used to log in to an FTP server to which a connection has been
38431 + made without autologin, or when autologin failed. If the
38432 + password is furnished on the command line, it is used;
38433 + otherwise you are prompted for a password. An account may also
38434 + be furnished if required by the server; it is not required by
38435 + Kermit and is not prompted for if omitted. Synonyms: USER, FTP
38439 + Sends an account name to a server that supports accounts. If
38440 + the server does not support accounts, an error response occurs.
38441 + If the server does support accounts, the account is accepted if
38442 + it is valid and rejected if it is not. The account might be
38443 + used for charging purposes or it might be a secondary password,
38444 + or it might be used for any other purpose, such as an access
38445 + password for a particular disk. Servers that support accounts
38446 + might or might not allow or require the account to be sent
38447 + prior to login; usually it is sent after login, if at all.
38448 + Synonym: ACCOUNT.
38452 +set ftp autologin off ; One thing at a time please
38453 +ftp xyzcorp.com ; Try to make the connection
38454 +if fail exit 1 FTP connection failed ; Check that it was made
38455 +ftp user olga secret ; Now log in to the server
38456 +if fail exit 1 FTP login failed ; Check that it worked
38457 +ftp account 103896854 ; Login OK - send account
38458 +if fail echo WARNING - FTP ACCT failed ; Warn if problem
38459 +... ; (have session here)
38460 +bye ; Log out and disconnect
38462 + The following commands are used to control or get information about
38463 + the FTP connection. Any particular FTP server does not necessarily
38464 + support all of them.
38467 + Terminates a user session but leaves the connection open,
38468 + allowing a new login via FTP USER.
38470 + FTP IDLE [ number ]
38471 + Most FTP servers automatically log you out and and disconnect
38472 + your session if there has been no activity for a certain amount
38473 + of time. Use this command to ask the server to set its idle
38474 + limit to the given number of seconds. Omit the number to ask
38475 + the server to inform you of its current idle limit.
38477 + FTP STATUS [ filename ]
38478 + Asks the FTP server to send information about the current
38479 + session. The result is a free-format report that might include
38480 + server identification, username and login time, FTP protocol
38481 + settings, and file-transfer statistics. If a filename is given,
38482 + the server is supposed to send detailed information about the
38486 + Asks the FTP server to identify its operating system (Listed in
38487 + Internet Assigned Numbers, Operating System Names). Examples:
38488 + UNIX, VMS, VM/CMS, WINDOWS-NT. Unfortunately many variations
38489 + are allowed (e.g. LINUX-2.0, LINUX-2.2, FREEBSD, ULTRIX, etc,
38490 + instead of UNIX; WINDOWS-NT-3, WINDOWS-NT-3.5, WINDOWS-NT-3.51,
38491 + WINDOWS-NT-4, etc). The report might also include other
38492 + information like "Type L8", "Type I", or "Type A", indicating
38493 + the file-transfer mode.
38495 + FTP HELP [ keyword [ keyword [ ... ] ]
38496 + Asks the server to list the commands it supports. The response
38497 + is usually cryptic, listing FTP command mnemonics, not the
38498 + commands used by the client (since the server has no way of
38499 + knowing anything about the client's user interface). For
38500 + example, the PUT command is STOR in FTP protocol. If a keyword
38501 + is given, which should be an FTP protocol command,
38502 + slightly-more- detailed help is given about the corresponding
38503 + command (if the FTP server supports this feature). Examples:
38504 + "ftp help", "ftp help stor".
38507 + (Advanced) Sends an FTP SITE (site-specific) command. Usually
38508 + this means that the FTP server is asked to run an external
38509 + command with the given arguments. You might be able to find out
38510 + what SITE commands are available by sending "ftp help site" to
38511 + the server, but in general the availability of and response to
38512 + SITE commands is (not surprisingly) site specific.
38515 + (Advanced) Sends an FTP command in FTP protocol format. Use
38516 + this command to send commands to the server that the FTP client
38517 + might not know about.
38520 + Lists client (Kermit) FTP settings and information. Also SHOW
38521 + CONNECTION, SHOW COMMUNICATIONS.
38523 + HELP FTP [ keyword ]
38524 + Asks Kermit to list and describe its built-in FTP commands.
38526 + HELP SET FTP [ keyword ]
38527 + Asks Kermit to list and describe its built-in SET FTP commands.
38529 + [ [229]Top ] [ [230]FTP Top ] [ [231]C-Kermit Home ] [ [232]Kermit
38531 + _________________________________________________________________
38533 + 3.2. Making Secure FTP Connections
38535 + Also see: [233]Accessing IBM Information Exchange with Kermit.
38537 + In the previous section, you can see several examples of traditional
38538 + insecure authentication: username and password sent across the network
38539 + in clear text. Of course this is bad practice on at least two counts:
38540 + (1) storing passwords in files (such as script files) gives access to
38541 + the target systems to anybody who can obtain read access to your
38542 + scripts; and (2) sending this information over the network leaves it
38543 + open to interception by network sniffers or compromised hosts.
38545 + Because of the increasing need for security on the Internet, FTP
38546 + servers are beginning to appear that offer secure forms of
38547 + authentication, in which no information is sent over the network that
38548 + would allow anyone who intercepts it to usurp your identity and gain
38549 + your access rights.
38551 + Kermit provides an equivalent form of FTP security for each type of
38552 + IETF standard security implemented in Telnet. These include
38553 + GSSAPI-KERBEROS5, KERBEROS4, Secure Remote Password (SRP), and
38554 + Transport Layer Security (SSL and TLS). It does not presently include
38555 + SSL tunneling nor any form of SSH v1 or v2. When Kermit is built with
38556 + the necessary libraries, secure FTP connections are attempted by
38557 + default, in which all connections are authenticated and the command
38558 + and data channels are private.
38560 + The use of authentication and encryption for FTP connections can be
38561 + adjusted with the commands listed below, which are available only if
38562 + your version of Kermit was built with the corresponding security
38563 + options and libraries:
38565 + SET FTP AUTHTYPE { AUTOMATIC, GSSAPI-KRB5, KERBEROS4, SRP, SSL, TLS }
38566 + Specifies an ordered list of authentication methods to be
38567 + attempted when AUTOAUTHENTICATION is ON. The default list is:
38568 + GSSAPI-KRB5, SRP, KERBEROS_V4, TLS, SSL. If none of the
38569 + selected methods are supported by the server, an insecure login
38570 + is used as a fallback. Note, by the way, that SSL or TLS can be
38571 + used to secure an anonymous connection.
38573 + SET FTP AUTOAUTHENTICATION { ON, OFF }
38574 + Tells whether authentication should be negotiated by the FTP
38575 + OPEN command. Default is ON. Use SET FTP AUTOAUTHENTICATION OFF
38576 + to force a clear-text, unencrypted connection to FTP servers
38577 + (such as the one at the Kermit FTP site) that normally would
38578 + try to negotiate secure authentication and encryption.
38580 + SET FTP AUTOENCRYPTION { ON, OFF }
38581 + Tells whether encryption (privacy) should be negotiated by the
38582 + FTP OPEN command, which can happen only if secure
38583 + authentication is also negotiated. Default is ON.
38585 + SET FTP AUTOLOGIN { ON, OFF }
38586 + Tells Kermit whether to try logging in automatically when you
38587 + make an FTP connection, as opposed to letting you do it "by
38588 + hand" with the FTP USER command.
38590 + SET FTP COMMAND-PROTECTION-LEVEL { CLEAR, CONFIDENTIAL, PRIVATE, SAFE
38592 + Determines the level of protection applied to the command
38595 + CLEAR Data is sent in plaintext and not protected against tampering.
38596 + CONFIDENTIAL Data is encrypted but not protected against tampering.
38597 + PRIVATE Data is encrypted and is protected against tampering.
38598 + SAFE Data is sent in plaintext but protected against tampering.
38600 + The default is PRIVATE.
38602 + SET FTP CREDENTIAL-FORWARDING { ON, OFF }
38603 + Tells whether end-user credentials are to be forwarded to the
38604 + server if supported by the authentication method (GSSAPI-KRB5
38605 + only). This is often required to allow access to distributed
38606 + file systems (e.g. AFS.)
38608 + SET FTP DATA-PROTECTION-LEVEL { CLEAR, CONFIDENTIAL, PRIVATE, SAFE }
38609 + Tells what level of protection is applied to subsequent data
38610 + channels. The meanings of the protection-level keywords are the
38611 + same as for SET FTP COMMAND-PROTECTION-LEVEL. The default is
38614 + SET FTP SRP CIPHER name
38615 + Specifies the cipher to be used for encryption when SRP
38616 + authentication is in use. The list of possible choices is
38617 + computed based on the capabilities of the local SRP library and
38618 + includes NONE plus zero or more of the following:
38620 + BLOWFISH_ECB CAST5_ECB DES_ECB DES3_ECB
38621 + BLOWFISH_CBC CAST5_CBC DES_CBC DES3_CBC
38622 + BLOWFISH_CFB64 CAST5_CFB64 DES_CFB64 DES3_CFB64
38623 + BLOWFISH_OFB64 CAST5_OFB64 DES_OFB64 DES3_OFB64
38625 + The default is DES3_ECB.
38627 + SET FTP SRP HASH name
38628 + Specifies the hash to be used for data protection when SRP
38629 + authentication is in use. The choices are MD5 and SHA. The
38632 + Command-line options:
38635 + Specifies the realm to be used with Kerberos 4 authentication
38636 + (= SET AUTH K4 REALM name).
38639 + Enables forwarding of Kerberos 5 credentials to the host when
38640 + using GSSAPI authentication (= SET AUTH K5 FORWARDABLE ON).
38643 + Enables autoencryption (= SET FTP AUTOENCRYPTION ON).
38646 + Specifies the kind of cipher to be used for encryption with SRP
38647 + authentication. Equivalent to SET FTP SRP CIPHER, with the same
38648 + choices. If this option is not given, CAST5_CBC is used.
38651 + Specifies the hash to be used for encryption with SRP
38652 + authentication. Equivalent to SET FTP SRP HASH, with the same
38653 + choices. If this option is not given, SHA is used.
38656 + Turns on SSL/TLS debugging.
38659 + Requires secure connection.
38662 + Says to accept all certificates without checking validity.
38665 + Sets certificate verification mode to the given number, n:
38666 + 0 = no verification
38667 + 1 = verify certificate if presented
38668 + 2 = require verification of certificate
38671 + Specifies a file containing a client certificate to be
38672 + presented to the FTP server.
38675 + Specifies a file containing a private key matching the client
38679 + (nokrb4) Disables the use of Kerberos 4.
38683 + Disables the use of GSSAPI - Kerberos 5.
38687 + Disables use of SRP.
38691 + Disables the use of SSL.
38695 + Disables the use of TLS.
38697 + Caution: If your FTP connection is secured via AUTH TLS, it is not
38698 + possible to interrupt a file transfer. This is a limitation of all
38699 + known FTP servers that support AUTH TLS.
38701 + Note that when using certain security methods, such as SSL or TLS, you
38702 + may be prompted to confirm or verify certain actions or conditions,
38703 + for example, whether to accept self-signed certificates. This can
38704 + interfere with unattended operation of scripts; see [234]Section 3.10.
38706 + [ [235]Top ] [ [236]FTP Top ] [ [237]C-Kermit Home ] [ [238]Kermit
38708 + _________________________________________________________________
38710 + 3.3. Setting FTP Preferences FTP preferences can be set globally and
38711 + persistently with the commands in the following sections; many of
38712 + these can also be overridden on a per-command basis with switches that
38713 + have the same name.
38715 + 3.3.1. Logs, Messages, and Other Feedback
38717 + You can control the amount of feedback received from your FTP session
38718 + with the commands in this section. First, you can create a log of your
38719 + FTP transfers with the following commands:
38721 + SET TRANSACTION-LOG { VERBOSE, FTP, BRIEF }
38722 + Selects the log format. VERBOSE is the default, and is
38723 + described in [239]the manual. FTP chooses a WU-FTPD format, the
38724 + same as is used by the popular FTP server. BRIEF creates
38725 + per-file records in comma-separated-list format. For greater
38726 + detail, see [240]Section 4.17 of the [241]C-Kermit 7.0 Update
38729 + LOG TRANSACTIONS filename
38730 + Records FTP (or Kermit, or any other protocol) uploads and
38731 + downloads in the given file using the format selected by the
38732 + most recent SET TRANSACTION-LOG command, if any, or else the
38735 + FTP screen messages and displays are controlled by the following
38738 + SET TRANSFER DISPLAY { FULLSCREEN, CRT, SERIAL, BRIEF, NONE, OFF }
38739 + FTP transfers use Kermit's normal file-transfer display styles.
38740 + Use this command to choose the desired format; the default on
38741 + most platforms is FULLSCREEN. The display is automatically
38742 + disabled if Kermit is running in the background or in batch.
38743 + BRIEF is always used for command-line initiated transfers
38744 + (unless suppressed by -q). While a file-transfer is in
38745 + progress, you can interrupt it in the normal Kermit way by
38746 + typing one of the following keys or key combinations:
38747 + X - Cancel current file but go on to the next one (if any).
38748 + Z - Cancel the entire transfer. Ctrl-L or Ctrl-W - Refresh
38749 + the file-transfer display (if any).
38751 + SET FTP DISPLAY { FULLSCREEN, CRT, SERIAL, BRIEF, NONE, OFF }
38752 + Like SET TRANSFER DISPLAY, but applies only to FTP connections,
38753 + and does not affect Kermit- or other protocol file transfers.
38755 + SET QUIET { ON, OFF }
38756 + This command applies to Kermit in general, not just FTP. OFF by
38757 + default; when ON, it surpresses most messages from most
38758 + commands as well as the file-transfer display.
38760 + SET FTP PROGRESS-MESSAGES { ON, OFF }
38761 + Tells whether Kermit should print locally-generated feedback
38762 + messages for each non-file-transfer command. ON by default.
38764 + SET FTP VERBOSE-MODE { ON, OFF }
38765 + Tells whether to display all responses from the FTP server. OFF
38766 + by default. This shows all responses to all commands, except
38767 + when the file-transfer display is active, and unless you have
38768 + SET QUIET ON. When OFF, responses are shown only for commands
38769 + such as FTP PWD whose purpose is to display a response.
38771 + SET FTP DEBUG { ON, OFF }
38772 + Tells whether local client debugging information should be
38773 + displayed. OFF by default. When ON, the commands that are sent
38774 + to the server are shown, as well as its responses (even if
38775 + VERBOSE-MODE is OFF), plus additional informational messages
38776 + are printed regarding the progress of secure operations. Also,
38777 + the temporary file created by the [242]MGET command is not
38778 + deleted so you can see what's in it.
38780 + Set all of these to OFF when silent running is desired.
38782 + 3.3.2. Operational Preferences
38784 + FTP DISABLE new-protocol-feature-name
38785 + FTP ENABLE new-protocol-feature-name
38786 + Explained in [243]Section 3.11.
38788 + SET FTP AUTOLOGIN { ON, OFF }
38789 + If you give this command prior to opening an FTP connection, it
38790 + controls whether Kermit tries to log you in automatically as
38791 + part of the connection process. Normally ON, which means the
38792 + username and password are sent automatically (and prompted for
38793 + if they are not yet known). When OFF, FTP OPEN connects to the
38794 + server without logging in. OFF is equivalent to the -n
38795 + command-line option when using Kermit's FTP command-line
38796 + personality. See [244]Section 3.1.4 for usage.
38798 + SET FTP PASSIVE-MODE { ON, OFF }
38799 + ON by default, to avoid random TCP port assignment for data
38800 + connections, which can prevent FTP protocol from working
38801 + through firewalls and network address translators (for more on
38802 + these topics, see the [245]Kermit security reference. Set to
38803 + OFF in case the FTP server does not support passive mode, or in
38804 + case the client has problems with it (it has been observed, for
38805 + example, that when using passive mode, the SCO XENIX 2.3.4
38806 + TCP/IP stack hangs in the connect() call forever). Synonyms:
38807 + PASSIVE [ ON ], PASSIVE OFF, PASV [ ON ], PASV OFF.
38809 + SET FTP SEND-PORT-COMMANDS { ON, OFF }
38810 + This command determines whether the FTP client sends a new PORT
38811 + command to the server when accepting incoming data connections
38812 + (as when not using passive mode.) When PASSIVE-MODE is OFF and
38813 + SET SEND-PORT is OFF, the port that was originally specified is
38814 + reused. This is the default behavior for normal FTP clients but
38815 + it is not compatible with many firewalls.
38817 + SET FTP CHARACTER-SET-TRANSLATION { ON, OFF }
38818 + Whether to translate character sets when transferring files
38819 + with FTP (explained in [246]Section 3.7). OFF by default.
38821 + SET FTP SERVER-CHARACTER-SET name
38822 + Tells Kermit the character set used by the FTP server, UTF-8 by
38823 + default ([247]Section 3.7).
38825 + SET FTP SERVER-TIME-OFFSET delta-time
38826 + Tells Kermit to apply the given [248]delta time to file
38827 + timestamps provided by the server for its files; for use when
38828 + (for example) the server does not have its timezone set
38831 + SET FTP ERROR-ACTION { PROCEED, QUIT }
38832 + When transferring a group of files with FTP, and an error
38833 + occurs with one of the files, Kermit normally goes on the next
38834 + file. Use SET FTP ERROR-ACTION to QUIT to make Kermit stop the
38835 + transfer immediately and fail if an error occurs with any
38836 + single file in the group. Example: you have given Kermit a list
38837 + of files to send, and one of the files can not be found, or
38838 + read permission is denied. Note that cancelling a file by
38839 + typing 'X' during transfer is not considered an error (if you
38840 + want to cancel the entire transfer, type 'Z' or Ctrl-C).
38842 + SET FTP PERMISSIONS { AUTO, ON, OFF }
38843 + When uploading files with PUT or MPUT, this tells whether
38844 + Kermit should send each file's permissions. The default is OFF,
38845 + which means not to send permissions, in which case the uploaded
38846 + file's permissions are set by the FTP server according to its
38847 + own criteria. ON means to send them, AUTO means to send them
38848 + only if the client (Kermit) and server are on like platforms
38849 + (e.g. both UNIX). This command has no effect when downloading,
38850 + since the FTP protocol does not include a way for the server to
38851 + inform the client of a file's permissions. Also see [249]FTP
38852 + PUT /PERMISSIONS. Note that setting permissions after uploading
38853 + is likely to work (correctly or at all) only when the client
38854 + and server platforms are alike (e.g. both of them are some form
38855 + of UNIX). Also note that Windows files don't have permissions.
38856 + Also see [250]FTP CHMOD.
38858 + SET FTP DATES { ON, OFF }
38859 + When downloading files with GET or MGET, this tells whether
38860 + Kermit should try to set the received file's date from the
38861 + server's date. FTP DATES is ON by default. Note, however, that
38862 + FTP protocol does not allow date preservation when uploading.
38863 + So at best, SET FTP DATES ON can work only when downloading,
38864 + and then only when the server agrees to furnish file dates.
38866 + SET FTP FILENAMES { AUTO, CONVERTED, LITERAL }
38867 + When uploading (sending) files, this tells whether to convert
38868 + outbound filenames to "common form". This means allowing only
38869 + one period in a name, uppercasing any lowercase letters,
38870 + replacing spaces by underscores, etc. AUTOMATIC is the default,
38871 + meaning LITERAL when client and server are the same type of
38872 + system (e.g. UNIX) and CONVERTED otherwise. Special case: if
38873 + the setting is AUTOMATIC and the client is not UNIX and the
38874 + server identifies itself as UNIX, Kermit uses a less-strict
38875 + form of conversion, in which lowercase letters are not
38876 + uppercased and the filename can contain any number of periods,
38877 + but spaces are still converted to underscore. When receiving,
38878 + conversion generally means to change all-uppercase names to
38879 + lowercase and spaces to underscore.
38881 + SET FTP UNIQUE-SERVER-NAMES { ON, OFF }
38882 + Applies only to uploads. Tells the server to create new, unique
38883 + names for incoming files that have the same names as existing
38884 + files. OFF by default, in which case the server overwrites
38885 + existing files with new files of the same name. When ON, the
38886 + server uses its own built-in method for creating new names for
38887 + incoming files; for example, appending a period (.) and a
38888 + number to the name. CAUTION: Use this option only if you do not
38889 + need to refer to the file after it is uploaded, since FTP
38890 + protocol provides no mechanism for the client to find out what
38891 + name was assigned by the server.
38893 + SET FTP COLLISION { ... }
38894 + When downloading, what to do if an incoming file has the same
38895 + name as an existing file. Options are the same as for SET FILE
38896 + COLLISION. If this command is not given, Kermit's regular FILE
38897 + COLLISION setting is used. If this command is given, it
38898 + overrides the FILE COLLISION setting for FTP transfers only.
38899 + See [251]Section 3.6.2 for details.
38901 + SET FTP TYPE { TEXT, BINARY, TENEX }
38902 + Changes the default transfer mode. When sending (uploading)
38903 + files, this command has no effect unless you disable automatic
38904 + text/binary mode switching ([252]Section 4) with SET FILE SCAN
38905 + OFF or SET TRANSFER MODE MANUAL. When receiving (downloading)
38906 + files, this command establishes the transfer mode to be used
38907 + when a filename does not match any of Kermit's text or binary
38908 + filename patterns, unless you use SET FTP
38909 + GET-FILETYPE-SWITCHING or SET TRANSFER MODE MANUAL to disable
38910 + automatic switching, in which case, this command establishes
38911 + the transfer mode for all downloaded files. In all cases,
38912 + however, the FTP TYPE can be overridden in any GET or PUT
38913 + command by including a /TEXT (/ASCII), /BINARY, or /TENEX
38914 + switch. The FTP TYPE is independent of the Kermit FILE TYPE
38915 + setting. TENEX is used for sending 8-bit binary files to 36-bit
38916 + platforms such as TOPS-10, TOPS-20, and TENEX, and getting them
38917 + back again. Synonym: ASCII = TEXT. Note: there is also an FTP
38918 + TYPE command, which does what SET FTP TYPE does but also sends
38919 + a TYPE command to the server immediately if the given type is
38920 + different from the current one.
38922 + If you want want specific FTP preference settings to be in effect for
38923 + all your Kermit FTP sessions, put the desired SET FTP commands in your
38924 + Kermit customization file (~/.mykermrc in UNIX, K95CUSTOM.INI in
38927 + [ [253]Top ] [ [254]FTP Top ] [ [255]C-Kermit Home ] [ [256]Kermit
38929 + _________________________________________________________________
38931 + 3.4. Managing Directories and Files
38933 + In Kermit, commands for directory and file management can refer to:
38935 + * The local computer
38936 + * A remote computer when you have a connection to a Kermit server or
38938 + * A remote computer when you have a connection to an FTP server.
38940 + (There can also be an HTTP connection, but the commands in this
38941 + section don't apply to HTTP connections.)
38943 + Thus in general, each such command comes in three forms:
38945 + 1. With no prefix in C-Kermit 8.0.200, it refers to the local
38946 + computer (CD, DIR, etc). In C-Kermit 8.0.201 and later, however,
38947 + the "locus" switches to automatically to the remote FTP server
38948 + when you make an FTP connection (see the SET LOCUS description
38949 + [257]Section 7); thus C-Kermit 8.0.201 acts almost exactly like a
38950 + regular FTP client when it has an FTP connection, yet still acts
38951 + like itself on other kinds of connections.
38952 + 2. With the REMOTE prefix, it is for a Kermit server (REMOTE CD,
38954 + 3. With the FTP prefix, it's for an FTP server (FTP CD, FTP DIR).
38955 + 4. Also see [258]Section 3.8, which explains "R-commands" and
38958 + Kermit's FTP file and directory management commands are as follows.
38959 + When an R-command is included in the Synonyms list, be sure to read
38960 + [259]Section 3.8 about rules for use of R-commands.
38962 + FTP CD [ directory ]
38963 + Tells the FTP server to change its default (working) directory
38964 + to the one given, which usually must be expressed in the syntax
38965 + of the server platform (UNIX, VMS, etc). If the directory is
38966 + not specified, the result depends on the FTP server -- it might
38967 + complain that the command is illegal, or it might change to
38968 + your original login directory. Synonyms: FTP CWD (Change
38969 + Wording Directory); RCD.
38972 + Tells the FTP server to change its default (working) directory
38973 + to the parent directory of its current one (equivalent to
38974 + "cd .." in UNIX, or "cd [-]" in VMS). Synonyms: RCDUP, FTP UP.
38977 + Asks the FTP server to report ("print") its current working
38978 + directory. Synonym: RPWD.
38980 + FTP MKDIR directory
38981 + Asks the FTP server to create the directory whose name is
38982 + given. In general, the name must be in the syntax of the
38983 + server's file system, and it must be either absolute (a full
38984 + pathname) or relative to the server's current (working)
38985 + directory. This command fails if the directory can't be created
38986 + for any reason, including that it exists already. Synonym:
38989 + FTP RMDIR directory
38990 + Asks the FTP server to remove the directory whose name is
38991 + given. The rules are the same as for MKDIR, plus in most cases,
38992 + the server will not remove any directory unless it is empty.
38995 + FTP DIRECTORY [ filespec ] [ redirectors ]
38996 + Tells the FTP server to send a directory listing of the
38997 + specified files. If no filespec is given, the server lists all
38998 + files in its current working directory. The results are in
38999 + whatever format the server chooses to send them. You can use
39000 + UNIX-like redirectors to send the listing to a file or a
39001 + pipeline, exactly as with the regular Kermit client/server
39002 + REMOTE DIRECTORY command ([260]Using C-Kermit, Chapter 11).
39003 + Synonym: RDIRECTORY. Examples:
39005 + ftp dir ; Show listing of all files on screen
39006 + ftp dir *.txt ; List *.txt files on screen
39007 + ftp dir *.txt > somefile ; Put listing in somefile
39008 + ftp dir *.txt >> somefile ; Append listing to somefile
39009 + ftp dir *.txt | sort > somefile ; Put sorted listing in somefile
39010 + ftp dir | more ; Runs list through "more"
39011 + ftp dir | sort | more ; Runs list through "sort" and "more"
39013 + FTP VDIRECTORY [ filespec ] [ redirectors ]
39014 + "Verbose" directory. This is an alternative FTP DIRECTORY
39015 + command primarily for use with DECSYSTEM-20 (TOPS-20) FTP
39016 + servers, which send only filenames when given a DIRECTORY
39017 + command; the VDIRECTORY command makes them also send file
39018 + sizes, dates, and attributes.
39020 + FTP CHECK filespec
39021 + Asks the FTP server whether the given file exists or, if the
39022 + filespec contains wildcards, if any files match, and this
39023 + command succeeds or fails accordingly.
39025 + FTP MODTIME filename
39026 + Asks the FTP server, via the not-yet-standard FTP MDTM command,
39027 + to send the modification date and time of the given file. The
39028 + response should be a numeric string in the format:
39029 + yyyymmddhhmmssxxxxx... where yyyy is the year, mm is the month,
39030 + dd is the day, hh is the hour (0-23), mm is the minute, ss is
39031 + the second, and xxx... is the optional fraction of the second
39032 + (0 or more digits). The date and time is expressed in UTC (GMT,
39033 + Zulu, Zero-Meridian). The result is available programmatically
39034 + in the [261]\v(ftp_message) variable, and is understandable by
39035 + Kermit's date-time switches and functions. For example, suppose
39036 + we want to upload all local files that are newer than a
39037 + particular file on the server:
39039 + C-Kermit> ftp modtime signpost
39040 + C-Kermit> echo \v(ftp_message)
39041 + 20010807113542.014
39042 + C-Kermit> ftp mput /after:\v(ftp_message)GMT *
39044 + Note that we must append "GMT" to the date-time string to let
39045 + the /AFTER switch know the time is GMT rather than local.
39047 + FTP SIZE filename
39048 + Asks the FTP server to send the size (in bytes) of the given
39049 + file. The result might vary depending on whether the current
39050 + FTP TYPE is binary or text ("ascii"). For a reliable byte
39051 + count, do FTP TYPE BINARY first. The result is available
39052 + programmatically in the [262]\v(ftp_message) variable.
39054 + FTP CHMOD permissions filename
39055 + Tells the FTP server to set the permissions (protection) of the
39056 + given file to the ones given. The permissions and filename must
39057 + be given in whatever syntax is required by the server. Example
39058 + (for a UNIX-based FTP server):
39060 + ftp chmod 664 oofa.txt
39062 + Not all servers support this command. For non-UNIX-based
39063 + servers, you might need to use FTP QUOTE or FTP SITE and the
39064 + appropriate platform-specific FTP server command.
39066 + FTP UMASK [ number ]
39067 + This command is probably specific to UNIX-based servers; it
39068 + sets the UNIX "umask", which is the default permissions mask
39069 + for new (in this case, incoming) files. Crudely put, the UNIX
39070 + umask is an octal representation of a binary number in in which
39071 + a 1 bit stands for a permission bit that must be 0, and a 0 bit
39072 + stands for a permission bit that can be 0 or 1 depending on
39073 + other factors, such as the permissions of the parent directory.
39074 + Example: "umask 007" requires that new files are created
39075 + without read/write/execute world permission. If the number is
39076 + not specified, the server's current umask is reported.
39078 + FTP RENAME filename newname
39079 + Asks the FTP server to rename the file whose name is "filename"
39080 + to "newname". Works only for one file; can not be used with
39081 + wildcards. The server's interpretation of "newname" can vary
39082 + (in some cases it must be a filename, in others perhaps it can
39083 + also be a directory name, in which case if the filename denote
39084 + a regular file, the file might be moved to the given
39085 + directory). Some servers might allow files to be renamed
39086 + ("moved") between physical disks or partitions, others might
39087 + not. Synonym: RRENAME.
39089 + FTP DELETE [ switches ] filespec [ filespec [ ... ] ]
39090 + Tells the FTP server to delete the file or files listed. Each
39091 + file specification may, but need not, contain wildcard
39092 + characters to match multiple files. File specifications and
39093 + wildcard syntax must be those of the server. Any file
39094 + specifications that contain spaces must be enclosed in braces
39095 + or doublequotes. FTP DELETE switches are:
39097 + /ERROR-ACTION: /FILENAMES: /NOBACKUPFILES /QUIET
39098 + /EXCEPT: /LARGER-THAN: /NODOTFILES /NOPAGE
39099 + /PAGE /RECURSIVE /SMALLER-THAN:
39101 + When used with FTP DELETE, the /RECURSIVE switch deletes files
39102 + but not directories, and furthermore depends on the server
39103 + providing recursive file lists, which is not the normal
39104 + behavior. For further details, see the decriptions of these
39105 + switches in [263]Section 3.6. Synonyms: FTP MDELETE (Kermit
39106 + makes no distinction between DELETE and MDELETE); RDELETE.
39108 + FTP TYPE { TEXT, BINARY, TENEX }
39109 + Tells the FTP server to change its file-transfer type to the
39110 + one given, immediately. See [264]SET FTP TYPE for details.
39112 + [ [265]Top ] [ [266]FTP Top ] [ [267]C-Kermit Home ] [ [268]Kermit
39114 + _________________________________________________________________
39116 + 3.5. Uploading Files With FTP
39118 + Uploading means sending files from the client (Kermit) to the FTP
39119 + server. The basic command for uploading files with FTP is PUT:
39121 + FTP PUT [ switches ] [ filespec [ as-name ] ]
39122 + Uploads (sends) the file or files that match the file
39123 + specification, which may include wildcards, to the server. If
39124 + no filespec is given, the names of files to send are taken from
39125 + the /LISTFILE: file, if any, otherwise from the SEND-LIST, if
39126 + any. Unless you go out of your way to prevent it, Kermit
39127 + determines the transfer mode (text or binary) for each file
39128 + automatically, and switches automatically on a per-file basis.
39129 + If an as-name is given, the file is sent under that name
39130 + instead of its own (if an as-name is given with a wildcard
39131 + filespec, the result is a bit more complicated, and is
39132 + explained later in this section).
39134 + Unlike normal FTP clients, Kermit does not prompt you by default (or
39135 + at all) for each file; it just sends them, just as it does with Kermit
39136 + protocol. The filespec can be a literal filename or a Kermit pattern,
39139 + [269]http://www.columbia.edu/kermit/ckermit70.html#x4.9
39141 + Kermit patterns are equivalent to C-Shell patterns and provide a fair
39142 + amount of flexibility in selecting which files to send, which is
39143 + augmented by the file-selection switches presented in [270]Section
39146 + FTP MPUT [ switches ] filespec [ filespec [ ... ] ]
39147 + FTP MPUT is just like FTP PUT except it allows you to give more
39148 + than one file specification, and it does not allow an as-name
39149 + in the file list. However, as-names can be given to either PUT
39150 + or MPUT with the /AS-NAME: switch.
39152 + If a PUT or MPUT command results in one file being uploaded, it
39153 + succeeds if the file is uploaded completely and fails otherwise. If
39154 + more than one file is selected for upload, success or failure depends
39155 + on the [271]FTP ERROR-ACTION setting; if it is PROCEED (the default
39156 + setting), then the [M]PUT command succeeds if at least one of the
39157 + files was completely uploaded, and fails otherwise, If FTP
39158 + ERROR-ACTION is QUIT, the [M]PUT command succeeds if all selected
39159 + files were uploaded successfully, and fails if any file failed.
39161 + FTP uploads may be interrupted just like Kermit uploads. While the
39162 + transfer is in progress, type:
39164 + X to interrupt the current file and go on to the next file.
39165 + Z to cancel the current file and all remaining files.
39166 + ^C (Control-C): Like Z, but might act more quickly.
39168 + MPUT may be used as in regular FTP clients, but it is not required to
39169 + send multiple files; in Kermit it is required only if you want to give
39170 + multiple file specifications. Examples:
39172 + ftp put oofa.txt ; Send a single file oofa.txt
39173 + ftp put oofa.txt budget.txt ; Send single file oofa.txt as budget.txt
39174 + ftp put *.txt ; Send all *.txt files
39175 + ftp mput *.txt ; Send all *.txt files (same as "put *.txt")
39176 + ftp mput *.txt foo.bar ; Send all *.txt files plus foo.bar
39178 + The distinction between PUT and MPUT is important only when more than
39179 + one filespec is given, just like the distinction between Kermit SEND
39182 + ftp put oofa.txt budget.txt ; Send oofa.txt AS budget.txt
39183 + ftp mput oofa.txt budget.txt ; Send oofa.txt AND budget.txt
39185 + If the source file specification includes any path segments, for
39188 + put /tmp/oofa.txt
39189 + put subdir/another/andanother/oofa.txt
39191 + the path portion is stripped from the filename that is sent to the
39192 + server. However, if an as-name contains a path, it is retained.
39195 + ftp put /usr/doc/oofa.txt ; Send as "oofa.txt".
39196 + ftp put oofa.txt /tmp/oofa.txt ; Send as "/tmp/oofa.txt"
39198 + The latter example sends the file oofa.txt from your current local
39199 + directory to the server's /tmp directory. This works only if the
39200 + server uses the same directory notation that you used in the as-name
39201 + AND the given directory already exists on the server AND if you have
39202 + write access to it.
39204 + Use caution when uploading from a case-sensitive file system, such as
39205 + UNIX, to a file system that is not case sensitive, such as Windows or
39206 + VMS. If you have two files in UNIX, AA and aa and upload both of them,
39207 + the second one will overwrite the first. The only way around this
39208 + provided by FTP protocol is its "unique server names" feature (SET FTP
39209 + UNIQUE-SERVER-NAMES or the /UNIQUE switch described below).
39210 + _________________________________________________________________
39212 + 3.5.1. FTP PUT Switches
39214 + FTP PUT and MPUT are similar in format and behavior to the regular
39215 + Kermit SEND and MSEND commands, and they allow most of the same
39216 + optional switches:
39218 +C-Kermit>ftp put ? Filename, or switch, one of the following:
39219 + /after: /larger-than: /rename-to:
39220 + /array: /listfile: /server-character-set:
39221 + /as-name: /local-character-set: /server-rename-to:
39222 + /before: /move-to: /simulate
39223 + /binary /nobackupfiles /smaller-than:
39224 + /command /nodotfiles /tenex
39225 + /delete /nofollowlinks /text
39226 + /dotfiles /not-after: /transparent
39227 + /error-action: /not-before: /type:
39228 + /except: /permissions: /update
39229 + /filenames: /quiet /unique-server-names
39230 + /filter: /recover
39231 + /followlinks /recursive
39233 + Since most of these switches are common to Kermit's SEND and MSEND
39234 + commands, they described only briefly here. For greater detail see:
39236 + [272]http://www.columbia.edu/kermit/ckermit70.html#x1.5 (explanation
39238 + [273]http://www.columbia.edu/kermit/ckermit70.html#x4.7
39239 + (file-transfer switches)
39241 + First the file-selection switches:
39244 + /BEFORE:date-time
39245 + /NOT-AFTER:date-time
39246 + /NOT-BEFORE:date-time
39247 + Only send those files modified on or after or before the given
39248 + date and time. These switches can be combined to select files
39249 + modified between two date/times. Various date-time formats are
39250 + accepted; if the date-time contains spaces, it must be enclosed
39251 + in braces or doublequotes. See
39252 + [274]http://www.columbia.edu/kermit/ckermit70.html#x1.6 and
39253 + [275]Section 8.13 of this document for details about date-time
39254 + formats. Examples:
39256 + ftp put /after:{1 jan 2000 0:00:00} *
39257 + ftp put /after:-5days *
39259 + /LARGER-THAN:number
39260 + /SMALLER-THAN:number
39261 + Only send files larger (smaller) than the given number of bytes
39262 + (octets). These switches can be combined to select files in a
39263 + certain size range.
39265 + /TYPE:{TEXT,BINARY}
39266 + Only send files that are the given type, which is determined
39267 + for each file just before sending it by file scanning. BINARY
39268 + includes TENEX; if you have included a /TENEX switch, or
39269 + previously given a [SET] FTP TYPE TENEX command, binary files
39270 + are sent in TENEX, rather than BINARY mode.
39273 + [Don't] include files whose names begin with dot (.). By
39274 + default, such files are not included unless your filespec
39275 + explicitly mentions them.
39278 + Don't include files whose names end with .~nnn~, where nnn is a
39279 + number, e.g. oofa.txt.~27~. These are backup files created by
39280 + Kermit, EMACS, and other applications. By default, backup files
39284 + (UNIX only) Skip over symbolic links rather than following them
39285 + (default). This applies to wildcard and/or recursive [M]PUTs;
39286 + if a single filename is given, and it happens to be a symbolic
39287 + link, the file it points to is sent.
39290 + (UNIX only) Always follow (resolve) symbolic links, even in
39291 + wildcard or recursive [M]PUTs. Use with caution. Watch out for
39292 + circular links, endless loops, etc.
39295 + Exception list -- don't send files whose names match the given
39296 + pattern. See [276]Section 1.5.4 of the [277]C-Kermit 7.0 Update
39297 + Notes for details. If you want to exclude a directory from a
39298 + recursive [M]PUT, use /EXCEPT:{dirname/*}.
39301 + Sends the desired files from the current (or given) directory,
39302 + plus all directories beneath it, including empty directories,
39303 + replicating the directory structure on the server. No special
39304 + capabilities are required in the server, but of course your
39305 + login ID on the server must have the appropriate access and
39306 + permission to create directories. Recursive PUTs work not only
39307 + between like platforms (e.g. UNIX to UNIX) but also between
39308 + unlike ones (e.g. UNIX to VMS or Windows), in which case
39309 + text-file format differences are handled by Kermit's automatic
39310 + text/binary mode switching ([278]Section 4) and character-set
39311 + translation ([279]Section 3.7). Synonym: /SUBDIRECTORIES.
39314 + Send only files that have changed since last time ([280]Section
39318 + The "file" to be sent is an array, or a segment of one, rather
39319 + than a real file. In this case the other selection switches
39320 + don't apply. The array contents are sent in text mode, and each
39321 + array element is treated as a line. Example:
39323 + ftp put /as-name:array.txt /array:&a
39325 + (or, to send a segment of the array, /array:&a[100:199]). If
39326 + you don't include an /AS-NAME, a name of "_array_x_" is used
39327 + (where x is the array letter). If you include this switch, most
39328 + other switches are meaningless and ignored.
39331 + The "file" to be sent is the standard output of a command,
39332 + rather than a real file. It is sent in text or binary mode
39333 + according to the prevailing FTP TYPE, which can be overridden
39334 + with a /TEXT or /BINARY switch. Example: Example:
39336 + ftp put /command /as-name:{userlist} {finger | sort -r}
39338 + /LISTFILE:filename
39339 + Tells Kermit to obtain the list of files to be sent from the
39340 + file whose name is given. This file must contain one file
39341 + specification (which may be wild) per line. If the list
39342 + includes files from different directories, such as a recursive
39343 + listing of a directory tree, the paths are recreated on the
39344 + server (if possible) if you include the /RECURSIVE switch;
39345 + otherwise all the files are sent to the current directory on
39348 + Now the other switches:
39351 + If a single file is being sent, send it with the given text as
39352 + its name. If multiple files are being sent, the text must be a
39353 + template that includes variables such as \v(filename),
39354 + \v(filenumber), \v(ntime), to allow dynamic creation of each
39355 + name. The same applies to the as-name field of the FTP PUT
39356 + command. If this switch is not included (and an as-name is not
39357 + included as the second filename to PUT), each file is sent with
39363 + Forces this upload to take place in the given mode, regardless
39364 + of the current FTP TYPE setting, and without automatic
39365 + text/binary switching. /ASCII is a synonym for /TEXT.
39368 + Specifies that the file(s) is/are to be passed through the
39369 + given command or pipeline on their way to the server. Example:
39371 + ftp put /binary /filter:{gzip -c \v(filename)} /as-name:\v(filename).gz *
39374 + /LOCAL-CHARACTER-SET:name
39375 + /SERVER-CHARACTER-SET:name
39376 + Character-set translation for text files, explained in
39377 + [281]Section 3.7.
39379 + /ERROR-ACTION:{PROCEED,QUIT}
39380 + Overrides the prevailing [282]FTP ERROR-ACTION for the duration
39381 + of this PUT or MPUT command only.
39384 + Resume an interrupted transfer where from the point of
39385 + interruption (explained in [283]Section 3.5.2). Synonym:
39389 + Tells Kermit to delete each source file immediately after, and
39390 + only if, it has been uploaded completely and successfully.
39391 + This, in effect, moves the file from the client to the server.
39393 + /MOVE-TO:directory
39394 + Tells Kermit to move each source file to the named local
39395 + directory after, and only if, it has been uploaded completely
39396 + and successfully.
39398 + /RENAME-TO:template
39399 + Tells Kermit to rename each (local) source file according to
39400 + the given template after, and only if, it has been uploaded
39401 + completely and successfully. The template works as in /AS-NAME.
39403 + /SERVER-RENAME-TO:template
39404 + Tells Kermit to ask the server to rename each file according to
39405 + the given template as soon as, and only if, it has been
39406 + received completely and successfully. The template works as in
39407 + /AS-NAME. Requires write and rename access on the server, so
39408 + doesn't usually work with (e.g.) anonymous uploads to public
39409 + incoming areas where the permissions don't allow renaming.
39412 + ftp mput /server-rename:\v(filename).ok *
39413 + Appends ".ok" to each filename on the server when it's
39414 + finished uploading.
39416 + ftp mput /as-name:\v(filename).tmp /server-rename:\v(filename) *
39417 + This is the reverse of the previous example; it uses a
39418 + temporary name while uploading is in progress and reverts
39419 + the file to its real name when uploading is complete.
39421 + ftp mput /as-name:\v(filename)
39422 + /server-rename:../final/\v(filename) *
39423 + Moves the file from the working directory to a final
39424 + directory when the upload is complete, but in this case
39425 + you have to know the pathname syntax of the server. If
39426 + the rename fails, the [M]PUT command fails according to
39427 + the [284]FTP ERROR-ACTION selection.
39429 + /FILENAMES:{AUTOMATIC,CONVERTED,LITERAL}
39430 + Overrides the [285]FTP FILENAMES setting for this upload only.
39432 + /PERMISSIONS:{ON,OFF}
39433 + Overrides the [286]FTP PERMISSIONS setting for this upload
39437 + Tells Kermit to tell the server to give [287]unique names to
39438 + incoming files that would otherwise overwrite existing files
39439 + that have the same name. This switch conflicts with /UPDATE,
39440 + /RECOVER, /PERMISSIONS, and /SERVER-RENAME since the client has
39441 + no way of knowing the name assigned by the server.
39444 + Don't display file-transfer progress or statistics.
39447 + Shows which files would be sent without actually sending them.
39448 + Useful (for example) with /UPDATE (next section). The results
39449 + are shown in the file-transfer display (if it is not disabled)
39450 + and in the transaction log (if one is active). Hint: use SET
39451 + TRANSFER DISPLAY BRIEF.
39452 + _________________________________________________________________
39454 + 3.5.2. Update Mode
39456 + When you include the /UPDATE switch, this means to skip sending any
39457 + file that already exists on the server if the local file's
39458 + modification date/time is not later than that of the corresponding
39459 + file on the server. Here is a typical application for update mode:
39460 + Suppose that on Computer A, you maintain a large set of files (say, a
39461 + collection of Web pages and graphics images, or the source files for a
39462 + software application), and you need to keep a parallel copy on another
39463 + Computer, B. Of course you could upload the entire collection every
39466 + cd source-directory
39467 + ftp computerb.xyzcorp.com
39468 + ( authentication details... )
39469 + ftp cd target-directory
39470 + ftp put [ switches ] *
39472 + But if the total size is large or the network slow, this would be
39473 + unnecessarily time-consuming. Worse, if other users or sites had to
39474 + update whenever new files appeared in B's directory, this would cause
39475 + them unnecessary work. By including the /UPDATE switch:
39477 + ftp put /update [ other-switches ] *
39479 + only those files that changed since last time are uploaded. Here's how
39480 + it works. For each local file that is selected for uploading:
39482 + * The remote filename is determined in the normal way, according to
39483 + the [288]FTP FILENAMES setting, /FILENAMES switch, or the as-name,
39485 + * Kermit sends an MDTM (modification time) command for the
39486 + corresponding remote filename to the server.
39487 + * If the server does not understand the MDTM command, the file is
39489 + * If the server can't find a file with the given name, the file is
39491 + * If the local file's modification time is later than that of the
39492 + remote file, the file is sent.
39493 + * Otherwise -- the remote file exists but its modification time is
39494 + equal to or earlier than that of the local file -- the file is
39497 + All time comparisons take place in Coordinated Universal Time
39498 + (UTC)([289]1), also known as GMT or Zulu time: Timezone 0; standard
39499 + time, without daylight savings.
39501 + WARNING: Some FTP servers, such as Novell NWFTPD.NLM, ignore or
39502 + misimplement the FTP specification and send local time rather than
39505 + Update mode is useful only when always used in the same direction.
39506 + When you upload (PUT) a file with FTP, the destination file receives
39507 + the current timestamp on the server's computer, not the original
39508 + file's timestamp ([290]2). If you try to FTP PUT /UPDATE the same file
39509 + again, it will be skipped (as expected) since the remote copy is
39510 + newer. However, if you try to FTP GET /UPDATE the same file
39511 + ([291]Section 3.6), it will be transferred for the same reason.
39513 + To check the availability of PUT /UPDATE on a particular connection,
39514 + issue an FTP MODTIME command for a file that is known to exist on the
39515 + server. If it succeeds, PUT /UPDATE should work and in that case, you
39516 + can run a procedure like the one above every day: the first time, it
39517 + sends all the files; after that, it sends only the ones that changed.
39518 + If a transaction log is active, a notation is included for any files
39519 + that are skipped.
39522 + 1. Why is Coordinated Universal Time abbreviated UTC? From the
39523 + [292]National Institute of Standards and Technology FAQ: "In 1970
39524 + the Coordinated Universal Time system was devised by an
39525 + international advisory group of technical experts within the
39526 + International Telecommunication Union (ITU). The ITU felt it was
39527 + best to designate a single abbreviation for use in all languages
39528 + in order to minimize confusion. Since unanimous agreement could
39529 + not be achieved on using either the English word order, CUT, or
39530 + the French word order, TUC, the acronym UTC was chosen as a
39532 + 2. The Kermit FTP client is unusual in that, when downloading only,
39533 + it can set the received file's date from the file's date on the
39534 + server, but this should not affect the update feature. When
39535 + uploading to an FTP server, however, there is no mechanism for the
39536 + client to set the date of the uploaded file on the server.
39537 + _________________________________________________________________
39541 + Suppose that while you are uploading a large file over a slow
39542 + connection, the connection is lost before the entire file is
39543 + transferred. With most FTP clients, you would have to start over, thus
39544 + resending the portion of the file that was sent already, and that is
39545 + already on the server. But Kermit's /RECOVER switch (Synonym:
39546 + /RESTART) lets you continue an interrupted transfer from the point of
39547 + failure, thus transferring only the part that wasn't sent already. The
39548 + prerequisites for recovery are:
39550 + * The transfer must be in BINARY mode, or else the client and server
39551 + must reside on like systems (e.g. both on some form of UNIX).
39552 + * The FTP server must support the SIZE command.
39554 + Here's how it works. When you include the /RECOVER switch:
39556 + * Kermit checks for conflicting switches, such as /UPDATE and
39557 + /UNIQUE; if /RECOVER is given with these switches an error occurs.
39558 + If /RECOVER is given in other circumstances where it could serve
39559 + no useful purpose (e.g. with arrays, pipes, or filters), it is
39562 + If the switch is accepted, then for each selected file:
39564 + * If it is not binary (determined by scanning) and the client and
39565 + server are not on like platforms, recovery is canceled (the entire
39566 + file is sent). Otherwise:
39567 + * A SIZE command is sent for the file (using its remote name). If
39568 + the reply indicates the file was not found, or the SIZE command
39569 + was not understood, or any other kind of error, recovery is
39570 + canceled. Otherwise:
39571 + * A MDTM (modification time) command is sent for the file. If a
39572 + valid reply is received, and the modification time of the local
39573 + file is later than that of the remote file, recovery is canceled.
39575 + * If the sizes of the two files are identical, the file is not sent.
39577 + * Kermit seeks to the recovery spot in the local file, tells the
39578 + server to APPEND the data which is about to arrive to the remote
39579 + file, and then sends the data starting at the recovery point.
39581 + To safeguard file integrity, recovery is not attempted unless all the
39582 + preconditions are met. For the widest possible usefulness, APPEND is
39583 + used rather than RESTART. For stream transfers (the only kind that
39584 + Kermit supports) the results are the same.
39586 + By design, the /RECOVER switch can be included with any FTP PUT or
39587 + MPUT command, even if it specifies a group of files. This allows you
39588 + to resume an interrupted batch transfer from where it left off. The
39589 + files that were already completely sent are skipped, the file that was
39590 + interrupted is recovered, and the remaining files are uploaded.
39592 + By the way, it doesn't matter how the original partial file was
39593 + uploaded -- FTP, Kermit, Zmodem, etc: as long as the preconditions are
39594 + met, it can be recovered with FTP PUT /RECOVER, or for that matter
39595 + also using Kermit protocol and SEND /RECOVER.
39597 + A word of caution, however, when the original upload was in text mode
39598 + with character-set translation ([293]Section 3.7):
39600 + * If the original upload involved a translation from one single-byte
39601 + character set to another (e.g. Code Page 850 to Latin-1), recovery
39602 + is safe if you specify the same translations for the recovery. If
39603 + you don't, the resulting file will contain a mixture of character
39605 + * If the original upload involved a translation that changed the
39606 + size of the file (e.g. from an alphabetic Code Page or Latin
39607 + Alphabet to Unicode, or vice versa), recovery is NOT safe, even if
39608 + you specify the same translations.
39610 + Kermit has no way of knowing anything about the previous upload. As a
39611 + safeguard, an error occurs if you include /RECOVER and also specify a
39612 + character-set of UCS2 or UTF8, since recovery can't possibly work in
39613 + that situation. Otherwise, it's up to you to avoid unsafe recovery
39616 + [ [294]Top ] [ [295]FTP Top ] [ [296]C-Kermit Home ] [ [297]Kermit
39618 + _________________________________________________________________
39620 + 3.6. Downloading Files With FTP
39622 + Although uploading files with Kermit's FTP client is just as easy and
39623 + flexible as sending files with Kermit protocol, the same is not always
39624 + true for downloading because FTP servers lack some of the capabilities
39625 + of a Kermit server:
39627 + * If you want to get more than one file, you have to use MGET, not
39628 + GET, since the underlying FTP protocol is different in the two
39629 + cases. Kermit can't "autodetect" which one you mean, as it can
39630 + with PUT and MPUT, since it can't be expected to know the wildcard
39631 + syntax of the remote platform and/or FTP server (the same is true
39632 + for all other FTP clients). To complicate matters, FTP protocol
39633 + now includes two underlying mechanisms (NLST and MLSD) for
39634 + accomplishing MGET operations and, as explained in [298]Section
39635 + 3.11, the two behave differently.
39636 + * Automatic text-binary mode switching is not done by the server. It
39637 + can be done by the client (Kermit), but in this case it is not
39638 + based on a file scan (since there is no way for Kermit prescan a
39639 + server file), but rather on the filename, using C-Kermit 7.0
39640 + [299]filename patterns.
39641 + * Some options that are available with FTP PUT can not be used with
39642 + FTP [M]GET or don't work the same way:
39643 + /PERMISSIONS (FTP protocol has no mechanism for this).
39644 + /[NOT-]BEFORE, /[NOT-]AFTER (because of the timezone problem).
39645 + /RECOVER works only in binary mode. /RECURSIVE has limited
39648 + The commands for downloading are:
39650 + SET FILE DOWNLOAD-DIRECTORY [ directory ]
39651 + As with Kermit transfers, this command, if given, tells
39652 + C-Kermit where to store incoming files in the absence of a
39653 + specific as-name. If not given, incoming files are stored as
39654 + indicated by the as-name, if any, otherwise in the current
39655 + directory, just as with Kermit transfers. The more verbose
39656 + transfer display formats give the full pathname of each
39657 + received file, and, in case you have trouble finding a
39658 + downloaded file afterwards, its full path is also listed in the
39659 + transaction log (if you kept one), and you can also ask Kermit
39660 + where it went with the [300]WHERE command.
39662 + SET FTP GET-FILETYPE-SWITCHING { ON, OFF }
39663 + ON by default, causing Kermit to switch automatically into text
39664 + or binary mode for each file based on whether its name matches
39665 + a text pattern or binary pattern. Set this OFF, or use a /TEXT,
39666 + /BINARY, or /TENEX switch to defeat this feature. Use SHOW
39667 + PATTERNS to see the current pattern list.
39669 + [ FTP ] GET [ switches ] filename [ as-name ]
39670 + Asks the server to send the given file, and if it comes, stores
39671 + it locally under the given as-name, if any, otherwise under its
39672 + original name (modified according to the selected filename
39673 + conversion option), in your download directory, if you have
39674 + specified one, otherwise in the directory indicated in the
39675 + as-name, if any, otherwise in your current directory. If you
39676 + accidentally use a wildcard in the filename ("get *.txt") the
39677 + server will reply with a message like "File not found" (unless
39678 + there is a file whose name actually is "*.txt"). If FTP
39679 + GET-FILETYPE-SWITCHING is ON, and in the absence of any GET
39680 + switches to override it, the file is transferred in binary mode
39681 + if it matches any of Kermit's binary name patterns, and in text
39682 + mode if it matches any of Kermit's text name patterns, and in
39683 + the prevailing FTP TYPE if it matches none of these patterns.
39685 + [ FTP ] MGET [ switches ] filespec [ filespec [ filespec [ ... ] ] ]
39686 + Like GET, but for multiple files. One or more file
39687 + specifications can be given, and any or all (or none) of them
39688 + can contain wildcards or can be directory names. The file list
39689 + may not include an as-name, but you can still give one with the
39690 + /AS-NAME: switch.
39692 + In both the FTP GET and MGET commands, any filenames that contain
39693 + spaces must be enclosed in braces or doublequotes (see [301]Section 5
39696 + FTP downloads may be interrupted just like Kermit transfers. While the
39697 + transfer is in progress, type:
39699 + * X to interrupt the current file and go on to the next file.
39700 + * Z (or Control-C) to cancel the current file and all remaining
39703 + Before proceeding, a brief word about temporary files. In FTP
39704 + protocol, the MGET command works by requesting a file list from the
39705 + server, and then (internally) issuing a GET command (FTP RETR protocol
39706 + directive) for each file. The file list returned by the server can be
39707 + any size at all, so in case it is huge, we don't store it in memory;
39708 + instead we put it in a temporary file. For troubleshooting purposes,
39709 + you should be aware of two points:
39711 + 1. The location of the temporary file is chosen according the TMP or
39712 + TEMP environment variables. If neither of these variables is
39713 + defined, you might need to define it. In case there is not enough
39714 + space on the indicated disk or partition for the server's file
39715 + list, you might need to either clean up the temporary area, or
39716 + redefine the environment variable to indicate a different area
39717 + that has sufficient space.
39718 + 2. If you want to look at the list yourself, use SET FTP DEBUG ON.
39719 + This tells Kermit to (a) give you the full pathname of the
39720 + temporary file at the end of each MGET command, and (b) not to
39721 + delete it, as it normally does.
39722 + _________________________________________________________________
39724 + 3.6.1. FTP GET Switches
39726 + The following switches are available with FTP GET and MGET:
39729 + Specifies a text-mode transfer. Overrides the global FTP TYPE
39730 + setting and filename pattern-matching for the duration of the
39731 + current command only, All files are downloaded in text mode.
39735 + Specifies a binary-mode transfer. Overrides the global FTP TYPE
39736 + setting and filename pattern-matching for the duration of the
39737 + current command only. All files are downloaded in binary mode.
39740 + Like /BINARY but specifies a special binary transfer mode to be
39741 + used when getting 8-bit binary files from a 36-bit platform
39742 + such as TOPS-10, TOPS-20, or TENEX. All files are downloaded in
39743 + the special binary mode.
39746 + This instructs Kermit to try to recover an incomplete download
39747 + from the point of failure. Works only in binary mode, and only
39748 + if the server supports the (not-yet-standard) FTP "REST"
39749 + directive. See [302]Section 3.6.3 for details. Synonym:
39752 + /FILENAMES:{CONVERTED,LITERAL}
39753 + Overrides the [303]FTP FILENAMES (filename conversion) setting
39754 + for this download only, forcing incoming filenames to be either
39755 + converted or taken literally.
39758 + For GET, this is equivalent to giving an as-name after the
39759 + filename. For MGET, this is the only way to specify alternative
39760 + names for the incoming files. With MGET, the /AS-NAME text
39761 + should (must) contain a Kermit variable, usually \v(filename)
39762 + or \v(filenumber). Example:
39764 + mget /text /as-name:\v(filename).new *.c
39766 + This gets all ".c" files and stores them with "
39768 + .new" appended to their names. See the [304]C-Kermit 7.0 Update
39769 + Notes for details.
39772 + This specifies that the incoming file is to be written to the
39773 + standard input of a command, rather than to a file. The command
39774 + name is the as-name from the GET command or the /AS-NAME
39775 + argument. If you need to refer to the incoming file's name in
39776 + the command, use \v(filename). See the description of the
39777 + regular Kermit [305]GET /COMMAND command for details and
39781 + Transfers the files quietly; don't put up a file-transfer
39784 + /ERROR-ACTION:{QUIT,PROCEED}
39785 + This switch affects only MGET. If an error occurs with a
39786 + particular file, this tells whether to go on to the next file
39787 + (PROCEED) or to stop right away and fail (QUIT). The default is
39790 + The file selection switches are:
39792 + /EXCEPT:{pattern} or /EXCEPT:{{pattern}{pattern}{...}}
39793 + Exception list for MGET; skip downloading any file whose name
39794 + matches any of the given patterns (when using the second
39795 + format, up to 64 patterns may be specified). [306]CLICK HERE
39796 + for syntax details.
39798 + /SMALLER-THAN:number
39799 + Download only files whose size is smaller than the given number
39800 + of bytes (octets). Requires that the FTP server support the
39801 + SIZE or MLSD directive.
39803 + /LARGER-THAN:number
39804 + Download only files whose size is greater than the given number
39805 + of bytes. Requires that the FTP server support the SIZE or MLSD
39809 + During MGET, don't download any files whose names end with
39810 + backup suffixes (.~n~ where n is a number).
39813 + During MGET, don't download any files whose names begin with
39814 + period (.). Equivalent to /EXCEPT:{.*}.
39816 + /LISTFILE:local-filename
39817 + The given file contains a list of files to GET, one per line.
39818 + Filenames in the listfile can contain wildcard characters in
39819 + the syntax of the server. There is no limit on the number of
39820 + lines in the listfile.
39822 + /NAMELIST:local-filename
39823 + If this switch is given, then instead of actually retrieving
39824 + the selected files, the GET command retrieves a list of the
39825 + names of the files that would be retrieved, and places it in
39826 + the specifed file. The resulting file is an ordinary text file,
39827 + with one filename per line, suitable for reading by a person,
39828 + or processing by a computer program, including Kermit itself
39829 + (FOPEN / FREAD / FWRITE / FCLOSE), and as /FILELIST: file. If
39830 + the filename is omitted or given as "-" (dash, hyphen), the
39831 + list goes to the screen. NOTE: if you want a copy of the
39832 + complete list sent by the server, use SET FTP DEBUG ON, perform
39833 + an MGET, and the temporary file containing the list will be
39834 + kept rather than deleted (and Kermit tells you its name).
39836 + /UPDATE, /COLLISION:keyword
39837 + Explained in [307]Section 3.6.2.
39840 + This means to try to download an entire directory tree, rather
39841 + than just files from a particular directory. In fact, FTP
39842 + protocol does not provide a method to request a recursive
39843 + download (unless the server supports MLSD; see [308]Section
39844 + 3.11), so this works only if the FTP server does it anyway,
39845 + without being asked, as some do. In this case, Kermit detects
39846 + that names in the returned file list contain directory
39847 + separators, and therefore attempts to create the needed
39848 + directories as the files arrive. But this can work only if the
39849 + server is on the same kind of platform as the client, so the
39850 + pathname syntax can be recognized, and also because the server
39851 + does not switch between text and binary mode, which would be
39852 + vital for cross-platform transfers. Use with caution. Synonym:
39855 + Even when the server does not provide recursive file lists,
39856 + [M]GET /RECURSIVE forces Kermit to replicate any directory
39857 + structure implied or expressed by the server's file list. For
39860 + get somepath/somefile
39862 + Gets the file named somefile from the server's somepath
39863 + directory and puts it Kermit's current (or download) directory,
39866 + get /recursive somepath/somefile
39868 + creates the path locally and then puts the file in it.
39869 + Similarly for MGET:
39873 + downloads all the files in all the data subdirectories of all
39874 + the subdirectories of the server's current directory and stores
39875 + them locally in Kermit's current (or download) directory,
39878 + mget /recursive */data/*
39880 + re-creates the server's directory structure locally.
39882 + The FTP protocol does not include explicit mechanisms for recursion,
39883 + so Kermit builds upon what is available. Although an Internet draft
39884 + describes a mechanism ("MLSD") that would allow protocol-driven
39885 + recursion, similar to Kermit's File Attribute packets (circa 1984), it
39886 + has not yet attained RFC or standard status, and servers are not yet
39887 + widely available that offer this feature. In the meantime, the
39888 + effectiveness of MGET /RECURSIVE depends on the FTP server
39889 + implementation. If the server returns a recursive list in response to
39890 + the standard NLST command (whose behavior is ill-defined), Kermit's
39891 + FTP MGET /RECURSIVE command uses it to re-create the remote directory
39892 + tree locally. If the server supports MLSD, C-Kermit 8.0.206 and Kermit
39893 + 95 2.1 and later are able to sense it automatically and use it, as
39894 + described below in [309]Section 3.11.
39896 + The /BEFORE:, /AFTER:, /NOT-BEFORE:, and /NOT-AFTER: switches are not
39897 + available for downloading because of the confusion with timezones.
39898 + Would the given times be in the local timezone, the server's timezone,
39899 + or GMT? The FTP server's directory listings show its own local times
39900 + but since we don't know what timezone the server is in, there's no way
39901 + to reconcile our local times with the server's. Similarly,
39902 + /PERMISSIONS can't be preserved in downloads because FTP protocol
39903 + provides no means of querying the server for a file's permission.
39905 + Source-file disposition switches:
39908 + Each file that is downloaded successfully is to be deleted from
39909 + the server. Requires the appropriate file access rights on the
39912 + /SERVER-RENAME-TO:template
39913 + Asks the server to rename each (remote) source file immediately
39914 + after, and only if, it is sent correctly. See [310]PUT
39915 + /SERVER-RENAME-TO: for details.
39917 + Destination-file disposition switches:
39920 + Displays the incoming file on the screen rather than storing it
39921 + on disk. If this switch is given, the /RENAME-TO and /MOVE-TO
39922 + switches are ignored, the file-transfer display is suppressed,
39923 + and the given file(s) is/are shown on the screen. Can be used
39924 + with /FILTER, e.g.
39926 + get /text /to-screen /filter:more oofa.txt
39928 + In fact, you should always use /TO-SCREEN with /FILTER or
39929 + /COMMAND when the command would result in displaying the
39930 + incoming file on the screen; otherwise C-Kermit would have no
39931 + way of knowing to suppress its file transfer display (since it
39932 + can't be expected to know what the command or filter does).
39934 + /RENAME-TO:template
39935 + Each file that is downloaded is to be renamed as indicated if
39936 + and only if it was received completely and without error. The
39937 + template can be literal text or can contain variables that are
39938 + evaluated for each file. For MGET, the text must contain
39939 + variables; for GET it can be a literal string. The \v(filename)
39940 + variable contains the name of the current file, so:
39942 + ftp mget /rename-to:\v(filename).ok *
39944 + causes each file that is successfully downloaded to have ".ok"
39945 + appended to its name. For details see [311]Section 4.1 of the
39946 + [312]C-Kermit 7.0 Update Notes.
39949 + Just like /RENAME-TO:, except the text denotes the name of a
39950 + directory to which successfully downloaded files are to be
39951 + moved. If the directory does not exist, it is created.
39953 + The file transfer display does not show the /MOVE-TO or /RENAME-TO
39954 + value, since the incoming file has not yet been moved or renamed.
39955 + _________________________________________________________________
39957 + 3.6.2. Filename Collisions
39959 + What should happen if an incoming file has the same name as an
39960 + existing file in the same directory? By default, Kermit's FILE
39961 + COLLISION setting applies: BACKUP, RENAME, UPDATE, DISCARD, etc, as
39962 + described in [313]Using C-Kermit. Kermit's default FILE COLLISION
39963 + setting is BACKUP (rename the existing file and store the incoming
39964 + file under its own name) and therefore this is also the default FTP
39965 + collision action.
39967 + The name under which an incoming file is to be stored is determined as
39970 + * If an as-name was given, the as-name is used. Otherwise:
39971 + * If the client and server platforms are alike or [314]FTP FILENAMES
39972 + is set to LITERAL (or the /FILENAMES:LITERAL switch was given for
39973 + this download), the incoming filename is used literally.
39975 + * The incoming filename is converted to a form that is friendly to
39976 + the local platform. For UNIX, for example, incoming filenames that
39977 + are all uppercase (as they might be from, say, VMS or an IBM
39978 + mainframe) are converted to lowercase.
39980 + If the resulting name coincides with the name of a local file that
39981 + already exists, we have a filename collision. Collisions are handled
39982 + according to the currently selected collision action:
39984 + SET FTP COLLISION { BACKUP, RENAME, UPDATE, DISCARD, APPEND, OVERWRITE
39986 + This establishes a filename collision for FTP, separate from
39987 + the Kermit one. The initial FTP collision setting is inherited
39988 + from Kermit's FILE COLLISION setting when the first FTP command
39989 + is given, but subsequent changes to Kermit's FILE COLLISION
39990 + setting do not affect the FTP COLLISION setting. SHOW FTP tells
39991 + the current FTP COLLISION setting.
39993 + FTP GET /COLLISION:{BACKUP,RENAME,UPDATE,DISCARD,APPEND,OVERWRITE}
39994 + Overrides the current FTP COLLISION action for this download
39998 + This is equivalent to GET /COLLISION:UPDATE, and is included
39999 + for symmetry with PUT /UPDATE
40001 + FTP GET /UPDATE and /COLLISION:UPDATE mean to download only those
40002 + files whose modification dates on the server are later than those on
40003 + the client. Date-time comparisons are done in Coordinated Universal
40004 + Time (UTC, GMT, ZULU). The command:
40006 + FTP MGET /COLLISION:APPEND /AS-NAME:newfilename *.*
40008 + Downloads all matching remote files into a single local file (in
40009 + whatever order the server sends them).
40010 + _________________________________________________________________
40014 + Recovery is available for downloads too, but there are some
40015 + differences from the uploading case described in [315]Section 3.5.3:
40017 + * The transfer must be in BINARY mode. It can not be in text mode,
40018 + even if the FTP server is on the same kind of platform as Kermit,
40019 + and even if there is no character-set translation. The original
40020 + download must also have been in binary mode.
40021 + * The FTP server must support the REST ("restart") directive.
40022 + Unfortunately, this is not a standard command; at this writing, it
40023 + is described only in an Internet Draft, not an RFC or Internet
40024 + Standard, but nevertheless it is found in several popular FTP
40025 + servers, such as [316]ProFTPD.
40027 + Here's how download recovery works:
40029 + * Kermit checks for conflicting switches, such as /UPDATE, /COMMAND,
40030 + or /FILTER. If /RECOVER is given with these switches an error
40032 + * The prevailing transfer mode (SET FTP TYPE) must be BINARY. If it
40033 + is not, the /BINARY switch must have been included with the FTP
40036 + If the /RECOVER switch is accepted, then for each selected file:
40038 + * A SIZE command is sent for the file (using its remote name). If
40039 + the reply indicates the file was not found, or the SIZE command
40040 + was not understood, or any other kind of error, recovery is
40041 + canceled (i.e. the entire file is downloaded).
40042 + * If the sizes of the two files are identical, the file is not sent.
40044 + * Kermit sends the REST directive to the server, indicating the size
40045 + of the local file. If the server responds affirmatively, Kermit
40046 + opens the local file in append mode and appends the incoming data
40047 + to it. Otherwise, recovery is canceled and the entire file is
40050 + The /RECOVER switch can be included with any FTP GET or MGET command,
40051 + even if it specifies a group of files. This lets you resume an
40052 + interrupted batch transfer from where it left off. The files that were
40053 + already completely sent are skipped, the file that was interrupted is
40054 + recovered, and the remaining files are uploaded. BUT... unlike with
40055 + uploading, where this can be done with any mixture of text and binary
40056 + files, when downloading, it can only be done if all the files are
40059 + It doesn't matter how the original partial file was downloaded -- FTP,
40060 + Kermit, HTTP, Zmodem, etc: as long as the preconditions are met, it
40061 + can be recovered with FTP [M]GET /RECOVER, or for that matter also
40062 + with GET /RECOVER (using Kermit protocol).
40064 + [ [317]Top ] [ [318]FTP Top ] [ [319]C-Kermit Home ] [ [320]Kermit
40066 + _________________________________________________________________
40068 + 3.7. Translating Character Sets
40070 + A possibly unique feature of Kermit's FTP client is its ability to
40071 + convert character sets when transferring files in text mode,
40072 + independent of the capabilites of the FTP server, as well as to
40073 + translate the character sets of filenames regardless of transfer mode.
40074 + For compatibility with existing FTP clients, and because there is a
40075 + certain performance penalty, Kermit won't do this unless you ask for
40076 + it. If you enable this feature, you need to inform Kermit of the
40077 + character set (to be) used on the server and in some cases (explained
40078 + below) also the local file character set. This discussion assumes you
40079 + know a bit about character sets (as you must if you have to use them);
40080 + see Chapter 16 of [321]Using C-Kermit for a detailed treatment. The
40081 + Kermit commands for FTP character-set conversion are:
40083 + SET FTP CHARACTER-SET-TRANSLATION { ON, OFF }
40084 + Whether to translate character sets when transferring text
40085 + files with FTP. OFF by default. Set this to ON to enable
40086 + character-set translation for subsequent FTP uploads and
40089 + SET FTP SERVER-CHARACTER-SET [322]name
40090 + Text character set (to be) used by the server. Most FTP servers
40091 + are ignorant of character sets, so all translations are done
40092 + unilaterally by Kermit's FTP client. This means that when
40093 + downloading files, you must know in advance the character-set
40094 + used in the files you are downloading (and in their names).
40095 + When uploading, you must specify the character-set to which
40096 + local filenames and text-file contents are to be translated for
40097 + transmission to the server. If you SET FTP
40098 + CHARACTER-SET-TRANSLATION ON but do not specify an FTP
40099 + SERVER-CHARACTER-SET, [323]UTF8 is used, since this is the new
40100 + Internet standard international character set; it is upwards
40101 + compatible with ASCII and it encompasses most written languages
40102 + and therefore does not favor any particular group of people, as
40103 + any other default would do. If you SET FTP SERVER-CHARACTER-SET
40104 + to something (anything) when FTP CHARACTER-SET TRANSLATION is
40105 + OFF, this also sets the latter ON.
40107 + SET FILE CHARACTER-SET [324]name
40108 + This is the regular Kermit (non-FTP-specific) command for
40109 + identifying the character set (to be) used in local text files
40112 + TO REITERATE: If you SET FTP CHARACTER-SET TRANSLATION ON but do not
40113 + specify an FTP SERVER-CHARACTER-SET, outbound text files are converted
40114 + to UTF-8 and inbound text files are assumed to be UTF-8. If this is
40115 + not appropriate, be sure to also specify the desired FTP
40116 + SERVER-CHARACTER-SET.
40118 + You can use "special" (non-ASCII) characters in filenames in all the
40119 + client / server file management commands (FTP MKDIR, RMDIR, DIRECTORY,
40120 + VDIRECTORY, DELETE, etc), and also in file-transfer commands. When
40121 + giving commands such as FTP DIR (RDIR) and FTP PWD (RPWD), the reply
40122 + is translated too, so you can read it. In this example, the client and
40123 + server use entirely different codes to represent the special
40124 + characters of German:
40126 + C-Kermit> ftp xyzcorp.de /anonymous
40127 + C-Kermit> set ftp server-character-set latin1
40128 + C-Kermit> set file character-set german
40129 + C-Kermit> rcd Städte
40131 + "/pub/ftp/Städte is current directory"
40133 + -rw-rw---- 1 olaf 54018 Jan 6 17:58 Adenbüttel.txt
40134 + -rw-rw---- 1 ursula 373 Jan 5 15:19 Aßlar.txt
40135 + -rw-rw---- 1 gisbert 482 Jan 5 15:20 Blowatz.txt
40136 + -rw-rw---- 1 gudrun 124 Jan 5 15:19 Böblingen.txt
40137 + -rw-rw---- 1 olga 14348 Jan 7 14:23 Köln.txt
40139 + When the client and server file systems use different character sets,
40140 + you should take care to use only those characters that the two sets
40141 + share in common when creating filenames or text-file contents. For
40142 + example, PC code pages contain a lot line- and box-drawing characters,
40143 + and sometimes "smart quotes", etc, that are not found in ISO standard
40144 + 8-bit character sets. You should be especially careful to avoid using
40145 + such characters in filenames.
40147 + [ [325]C-Kermit Character Sets ]
40148 + _________________________________________________________________
40150 + 3.7.1. Character Sets and Uploading
40152 + Kermit's PUT and MPUT commands include full file-scanning
40153 + capabilities, as described in [326]Section 4. Thus if FTP
40154 + CHARACTER-SET-TRANSLATION is ON and your character-set associations
40155 + are set up appropriately, Kermit automatically switches on a per-file
40156 + basis between text and binary mode, and for each text file between
40157 + your chosen 7-bit text character set (e.g. ASCII or ISO 646 German),
40158 + 8-bit text (e.g. Latin-1 or Japanese EUC), UCS-2, and UTF-8, and
40159 + converts each of these automatically to the server character-set, and
40160 + furthermore automatically differentiates between the Little and Big
40161 + Endian forms of UCS-2, always sending in Big Endian form.
40163 + WARNING: It is not advisable to use UCS-2 (or any Unicode
40164 + transformation other than UTF-8) "on the wire", i.e. as a server
40165 + character set. Most FTP servers are not able to cope with it, since
40166 + it contains lots of 0 (NUL) characters. If you do use it, Kermit
40167 + does not translate filenames to or from UCS-2, for reasons well
40168 + known to C programmers (for example, UNIX APIs assume filename
40169 + strings are NUL-terminated). [327]UTF-8 is the preferred (and
40170 + standard) Unicode format for the Internet.
40172 + FTP character-set translations differ from the regular Kermit ones by
40173 + not restricting translations to a file-character-set /
40174 + transfer-character-set pair. You can have Kermit's FTP client
40175 + translate between any pair of character sets it knows about. You can
40176 + see the list of supported character sets by typing either of the
40179 + set ftp server-character-set ?
40180 + set file character-set ?
40182 + A typical list looks like this ([328]CLICK HERE for an explanation of
40185 + C-Kermit>set file char ? One of the following:
40186 + ascii cp869-greek hebrew-7 mazovia-pc
40187 + british cyrillic-iso hebrew-iso next-multinational
40188 + bulgaria-pc danish hp-roman8 norwegian
40189 + canadian-french dec-kanji hungarian portuguese
40190 + cp1250 dec-multinational iso2022jp-kanji shift-jis-kanji
40191 + cp1251-cyrillic dg-international italian short-koi
40192 + cp1252 dutch jis7-kanji spanish
40193 + cp437 elot927-greek koi8 swedish
40194 + cp850 elot928-greek koi8r swiss
40195 + cp852 euc-jp koi8u ucs2
40196 + cp855-cyrillic finnish latin1-iso utf8
40197 + cp858 french latin2-iso
40198 + cp862-hebrew german latin9-iso
40199 + cp866-cyrillic greek-iso macintosh-latin
40202 + Thus you can translate not only between private sets (like PC code
40203 + pages) and standard ones (like Latin-1) as in Kermit protocol, but
40204 + also between any given pair of private sets (e.g. CP852 and Mazovia).
40205 + All conversions go through Unicode as the intermediate character set,
40206 + resulting in a minimum of character loss, since Unicode is a superset
40207 + of all other character sets known to Kermit.
40209 + In addition to the SET commands listed above, the FTP PUT and MPUT
40210 + commands include switches that apply only to the current command:
40212 + /LOCAL-CHARACTER-SET:name
40213 + /SERVER-CHARACTER-SET:name
40214 + Use these switches to force a particular translation. These
40215 + switches override the global FTP CHARACTER-SET-TRANSLATION and
40216 + SERVER-CHARACTER-SET settings and also character-set
40217 + differentiation by file scanning for the duration of the PUT or
40218 + MPUT command. The file scan is still performed, however, to
40219 + determine whether the file is text or binary; thus these
40220 + switches do not affect binary files unless you also include the
40221 + /TEXT switch to force all files to be treated as text.
40223 + In other words, if you include one or both of these switches with a
40224 + PUT or MPUT command, they are used. Similarly, the /TRANSPARENT switch
40225 + disables character-set translation for the PUT or MPUT command despite
40226 + the prevailing FTP CHARACTER-SET-TRANSLATION and SERVER-CHARACTER-SET
40229 + When uploading, the FILE CHARACTER-SET setting is ignored unless you
40230 + have forced Kermit not to [329]scan local files by including a /TEXT
40231 + or /BINARY switch with your [M]PUT command, or by disabling automatic
40232 + text/binary switching in some other way.
40236 + 1. Suppose you have a CP852 (East European) text file that you want
40237 + to upload and store in ISO Latin Alphabet 2 encoding:
40238 + ftp put /local-char:cp852 /server-char:latin2 magyar.txt
40239 + 2. Suppose you always want your text files converted to Latin-2 when
40240 + uploading with FTP. Then put:
40241 + set ftp server-character-set latin2
40242 + in your Kermit customization file, and then you can omit the
40243 + /SERVER-CHARACTER-SET: switch from your FTP PUT commands:
40244 + ftp put /local-char:cp852 magyar.txt
40245 + 3. Now suppose that all the text files on your PC are written in
40246 + Hungarian, but they have a variety of encodings, and you don't
40247 + want to have to include the /LOCAL-CHARACTER-SET: switch on every
40248 + FTP PUT command, or (more to the point) you want to be able to
40249 + send a mixture of these files all at once. Put these commands in
40250 + your Kermit customization file:
40251 + set ftp server-character-set latin2 ; ISO 8859-2
40252 + set file default 7-bit-character-set hungarian ; ISO 646 Hungarian
40253 + set file default 8-bit-character-set cp852 ; PC East European Code Page
40254 + and now PUT and MPUT will automatically detect and switch among
40255 + ISO 646 Hungarian, Code Page 852, UTF-8, and UCS-2 encodings,
40256 + translating each one to Latin-2 for uploading:
40259 + And since binary files are also detected automatically, the latter can
40260 + be simplified to:
40264 + even when "*" matches a diverse collection of binary and text files,
40265 + because translations are skipped automatically for binary files.
40266 + _________________________________________________________________
40268 + 3.7.2. Character Sets and Downloading
40270 + The commands and switches are the same as for uploading, but automatic
40271 + character-set switching works differently, since Kermit can't scan the
40272 + server files in advance. Instead, the transfer mode (text or binary)
40273 + is based on the filenames; each name is compared with Kermit's list of
40274 + text name patterns and binary name patterns. If the name matches a
40275 + binary pattern (for example, if the filename is oofa.tar.gz and one of
40276 + the filename patterns is "*.gz"), the file is downloaded in binary
40277 + mode; otherwise if it matches a text pattern (e.g. oofa.txt matches
40278 + "*.txt"), it is transferred in text ("ascii") mode. Otherwise, it is
40279 + transferred in the prevailing FTP TYPE.
40281 + In C-Kermit 8.0, the pattern lists used with FTP GET are not the same
40282 + lists used with Kermit transfers, and can not be viewed with SHOW
40283 + PATTERNS, nor adjusted with ADD and REMOVE TEXT-PATTERNS and
40284 + BINARY-PATTERNS, or SET FILE TEXT-PATTERNS and BINARY-PATTERNS.
40285 + Configuration of the FTP patterns list will be added in a future
40290 + get /server-char:latin1 /local-char:cp850 Grüße.txt
40291 + In this command, the filename contains special characters,
40292 + which you enter using whatever character set your local
40293 + computer uses, in this case PC Code Page 850 (cp850). The
40294 + command tells Kermit (in case it didn't know already from its
40295 + FILE CHARACTER-SET setting) that the local character set is
40296 + cp850 and the server's character-set is ISO 8859-1 Latin
40297 + Alphabet 1 (latin1). Kermit translates the filename from cp850
40298 + to latin1 and sends the latin1 name to the server. Since it's a
40299 + text file (matches "*.txt"), its contents are translated to
40300 + cp850 on arrival, and it is saved with a cp850 name.
40302 + mget /text /server:latin1 /local:utf8 *.txt
40305 + + Tells C-Kermit that the server's files are encoded in ISO
40306 + 8859-1 Latin Alphabet 1.
40307 + + Tells C-Kermit to translate the incoming files into Unicode
40308 + UTF-8 for storage.
40309 + + Asks the server to send all ".txt" files in text mode.
40311 + mget /server:latin1 /local:utf8 *
40312 + Tells Kermit to get all files from the server's directory,
40313 + switching between text and binary mode based on the filename.
40314 + The names of all the files are translated (to UTF-8 in this
40315 + case), but contents are translated (also to UTF-8) only for
40318 + Note that any pair of 8-bit character sets is likely to have some
40319 + incompatibilities. Any characters in the source file that do not have
40320 + equivalents in the destination file's character set are converted to
40321 + question marks. This applies to both filenames and to text file
40324 + Also note that the server's ability to accept special characters in
40325 + filenames depends on the particular server. For example:
40329 + works with WU-FTPD, but:
40334 + _________________________________________________________________
40338 + [330]RFC2640, July 1999, specifies a method by which the FTP client
40339 + and server can negotiate the use of UTF8. However, RFC2640-capable
40340 + servers are rare to nonexistent at this writing, and in any case you
40341 + don't need them to be able to transfer text in UTF8. C-Kermit lets you
40342 + upload and download text files in any character set it knows about,
40343 + converting to or from any other character set it knows about, without
40344 + the knowledge, permission, or cooperation of the server, and
40345 + regardless of its capabilities.
40347 + [ [331]Top ] [ [332]FTP Top ] [ [333]C-Kermit Home ] [ [334]Kermit
40349 + _________________________________________________________________
40351 + 3.8. FTP Command Shortcuts
40353 + C-Kermit's FTP client coexists with other C-Kermit functions by
40354 + requiring the "ftp" prefix for each FTP-related command: FTP OPEN, FTP
40355 + GET, FTP BYE, and so on. For interactive use, however, this can be
40356 + rather awkward and sometimes surprising, for example when a GET
40357 + command starts a Kermit GET rather than an FTP GET. In fact, many
40358 + Kermit commands might just as easily apply to an FTP connection: GET,
40359 + PUT (SEND), BYE, and CLOSE. The following command lets you choose how
40360 + these commands are interpreted:
40362 + SET GET-PUT-REMOTE { AUTO, KERMIT, FTP }
40363 + Controls the orientation of GET, PUT, REMOTE and other
40364 + file-transfer and client/server commands that might apply to
40365 + either Kermit or FTP. The default setting is AUTO, meaning that
40366 + these commands apply to FTP if an FTP connection is open, and
40367 + to Kermit otherwise. KERMIT means they always apply to Kermit,
40368 + FTP means they always apply to FTP.
40370 + Here is a complete list of affected commands:
40372 + Kermit Command FTP Equivalent
40373 + (none) FTP [ OPEN ]
40380 + BINARY FTP TYPE BINARY
40381 + TEXT (or ASCII) FTP TYPE ASCII
40382 + SEND (or PUT) FTP PUT
40383 + MSEND (or MPUT) FTP MPUT
40384 + RESEND FTP PUT /RECOVER
40385 + CSEND FTP PUT /COMMAND
40388 + REGET FTP GET /RECOVER
40389 + REMOTE HELP (RHELP) FTP HELP
40390 + REMOTE CD (RCD) FTP CD (CWD)
40391 + REMOTE PWD (RPWD) FTP PWD
40392 + REMOTE DIRECTORY (RDIR) FTP DIRECTORY
40393 + REMOTE DELETE (RDEL) FTP DELETE
40394 + REMOTE MKDIR (RMKDIR) FTP MKDIR
40395 + REMOTE RMDIR (RRMDIR) FTP RMDIR
40396 + REMOTE RENAME (RRENAME) FTP RENAME
40397 + REMOTE TYPE (RTYPE) FTP TYPE
40398 + REMOTE EXIT (REXIT) FTP BYE
40400 + The commands in the right-hand column always access FTP. The commands
40401 + in the left column can access either Kermit protocol or FTP:
40403 + * When GET-PUT-REMOTE is set to KERMIT, or to AUTO when there is no
40404 + FTP connection, the commands in the left-hand column access Kermit
40405 + protocol, and those right-hand column are required for FTP.
40406 + * When GET-PUT-REMOTE is set to FTP, or to AUTO when there is an
40407 + active FTP connection, the commands in the left-hand column access
40408 + the FTP connection and can not be used to access Kermit protocol.
40409 + In this case, if you want to be able to use both Kermit protocol
40410 + and the FTP connection, you must SET GET-PUT-REMOTE KERMIT, and
40411 + then use the FTP commands in the right-hand column to access the
40414 + Note that file-management commands such as DIRECTORY, DELETE, CD, PWD,
40415 + MKDIR, RMDIR, HELP, RENAME, COPY, TYPE, and so on, always apply
40416 + locally, no matter what kind of connection you have. This is the
40417 + opposite of most FTP clients, where these commands are intended for
40418 + the server, and require an "L" prefix for local execution (e.g. "dir"
40419 + gets a directory listing from the server, "ldir" gets a local
40420 + directory listing). To illustrate with the CD command and a typical
40423 + Client Server Change Local Directory Change Remote Directory
40424 + FTP FTP lcd cd (cwd)
40425 + Kermit Kermit cd rcd, remote cd
40426 + Kermit FTP cd ftp cd, rcd, remote cd
40428 + Also note that not all REMOTE commands are useful with FTP, since FTP
40429 + servers do not offer the corresponding functions. These include:
40431 + * REMOTE ASSIGN - FTP servers don't have variables
40432 + * REMOTE COPY - FTP servers don't copy files
40433 + * REMOTE HOST - FTP servers don't execute host (shell) commands
40434 + * REMOTE KERMIT - FTP servers don't execute Kermit commands
40435 + * REMOTE PRINT - FTP servers don't print files
40436 + * REMOTE QUERY - FTP servers don't have variables
40437 + * REMOTE SET - FTP servers don't have Kermit settings
40438 + * REMOTE WHO - FTP servers don't send user lists
40440 + Finally note that command shortcuts do not apply to the HELP command.
40441 + For help about an FTP command, use (for example) "help ftp delete",
40442 + not "help delete" or "help rdelete".
40444 + [ [335]Top ] [ [336]FTP Top ] [ [337]C-Kermit Home ] [ [338]Kermit
40446 + _________________________________________________________________
40448 + 3.9. Dual Sessions
40450 + You can have an FTP session open at the same time as a regular Kermit
40451 + SET LINE or SET HOST (terminal) session. In this case, the default SET
40452 + GET-PUT-REMOTE AUTO setting should ensure that all "two-faced"
40453 + commands like GET, PUT, REMOTE, HANGUP, BYE, etc, apply to the Kermit
40454 + session, and all commands for the FTP session must include the FTP
40455 + prefix. To be absolutely certain, you can use SET GET-PUT-REMOTE
40458 + ftp foo.bar.baz.com
40461 + set host foo.bar.baz.com
40465 + Now you have both an FTP and Telnet connection to the same host (of
40466 + course they could also be to different hosts, and you could also have
40467 + a direct or dialed serial connection instead of a Telnet connection).
40468 + Now assuming you have a Kermit server on the far end of the Kermit
40471 + rcd incoming ; Changes Kermit server's directory (= REMOTE CD)
40472 + ftp cd incoming ; Changes FTP server's directory
40473 + put oofa.txt ; Sends a file on the Kermit connection
40474 + ftp put oofa.txt ; Sends a file on the FTP connection
40475 + bye ; Shuts down the Kermit connection
40476 + ftp bye ; Shuts down the FTP connection
40478 + Note that PUT and SEND are synonyms for both FTP and Kermit
40481 + You can also establish dual sessions on the Kermit command line:
40483 + kermit -j host1 -9 host2
40485 + This makes a Telnet connection to host1 and an FTP connection to
40488 + [ [339]Top ] [ [340]FTP Top ] [ [341]C-Kermit Home ] [ [342]Kermit
40490 + _________________________________________________________________
40492 + 3.10. Automating FTP Sessions
40494 + Most of Kermit's scripting features can be used to make and control
40495 + FTP sessions: FOR and WHILE loops, IF-ELSE and SWITCH constructions,
40496 + variables, arrays, built-in functions, and all the rest. You can't use
40497 + INPUT, MINPUT, OUTPUT, CLEAR, or SCRIPT on an FTP session, but these
40498 + are not needed since the FTP protocol is well defined.
40500 + [343]CLICK HERE for an FTP scripting tutorial.
40502 + 3.10.1. FTP-Specific Variables and Functions
40504 + The following variable tells whether an FTP connection is open:
40506 + \v(ftp_connected)
40507 + 1 if there is an active FTP connection, 0 if there isn't.
40509 + The FTP OPEN command sets:
40512 + The host to which the most recent FTP connection was made.
40515 + The security method negotiated for the current FTP session. The
40516 + value is "NULL" when no security is used. See [344]3.2. Making
40517 + Secure FTP Connections.
40520 + The OS type (UNIX, VMS, etc) of the FTP server host.
40522 + The FTP USER command (or FTP OPEN /USER:, or FTP with automatic login)
40526 + 1 if you are logged in to an FTP server, 0 if you are not.
40528 + The current COMMAND-PROTECTION-LEVEL and DATA-PROTECTION-LEVEL values
40529 + are reflected in:
40533 + The values are "clear", "confidential", "safe" or "private".
40534 + See [345]3.2. Making Secure FTP Connections.
40536 + The FTP GET-PUT-REMOTE setting is reflected in:
40538 + \v(ftp_getputremote)
40539 + The values are "auto", "ftp", or "kermit".
40541 + Every FTP command sets the \v(success) variable, as well as the
40542 + following two FTP-specific variables:
40545 + The standardized numeric FTP protocol code from the server's
40546 + response to the last client command, a 3-digit decimal number
40547 + defined in [346]RFC959. Briefly:
40549 + 1xx = Positive Preliminary Reply
40550 + 2xx = Positive Completion Reply
40551 + 3xx = Positive Intermediate Reply
40552 + 4xx = Transient Negative Completion Reply
40553 + 5xx = Permanent Negative Completion Reply
40556 + The text message, if any, from the server's response to the
40557 + last client command. If the most recent response had multiple
40558 + lines, this variable has only the final line. These messages
40559 + are not standardized and vary in format and content from server
40560 + to server. Synonym: \v(ftp_msg).
40562 + FTP file transfers set the regular Kermit transfer status variables:
40564 + \v(cps) Characters per second of most recent transfer.
40565 + \v(filespec) File specification used in most recent transfer.
40566 + \v(fsize) Size of file most recently transferred.
40567 + \v(tfsize) Total size of file group most recently transferred.
40568 + \v(xferstatus) Status of most recent transfer (0 = success, 1 = failure).
40569 + \v(tftime) Elapsed time of most recent transfer, in seconds.
40571 + During an FTP transfer, the per-file variables are:
40573 + \v(filename) Name of current file.
40574 + \v(filenumber) Ordinal file number in group (1, 2, 3, ...)
40575 + _________________________________________________________________
40579 + Let's begin with a simple example showing how to log in, send some
40580 + files, and log out:
40582 + define error if fail { ftp bye, stop 1 Error: \%1 }
40583 + set transact brief
40585 + ftp ftp.xyzcorp.com /anonymous
40586 + if fail stop 1 Connection failed
40587 + if not \v(ftp_loggedin) stop 1 Login failed
40592 + ftp put /delete *
40596 + First we define an error handling macro to be used after the
40597 + connection is made. Then we set up a brief-format transaction log to
40598 + keep a record of our file transfers. Then we make a connection to the
40599 + host and log in anonymously. The "if fail" command checks whether the
40600 + connection was made. The "if not" command checks whether login was
40601 + successful. Obviously the script should not continue unless both tests
40604 + Next we change to the server's 'incoming' directory and to our own
40605 + 'upload' directory, and send all the files that are in it (they can be
40606 + any mixture of text and binary files), deleting each source file
40607 + automatically after it is successfully uploaded. Each of these
40608 + operations is checked with the ERROR macro, which prevents the script
40609 + from continuing past a failure.
40611 + Finally we close the FTP session with the "bye" command.
40613 + Just like any other Kermit script, this one can be used in many ways:
40615 + * It can be stored in a file, and Kermit can be told to TAKE the
40617 + * In UNIX, it can be a "[347]kerbang" script and therefore run
40618 + directly from the shell prompt or as a cron job.
40620 + We could have used command shortcuts like "rcd", "put", and "bye", but
40621 + since they can be ambiguous under certain circumstances, it is better
40622 + to avoid them in scripts; they are intended mainly for convenience
40623 + during interactive use. However, if you wish to use the shortcuts in a
40624 + script, you can do it this way (error handling omitted for brevity):
40626 + local \%t ; Declare a local temporary veriable
40627 + assign \%t \v(ftp_getputremote) ; Save current FTP GET-PUT-REMOTE setting
40628 + set ftp get-put-remote ftp ; Choose FTP orientation
40629 + ftp xyzcorp.com /anonymous ; Open an FTP connection
40630 + get oofa.txt ; GET a file
40631 + put foo.bar ; PUT a file
40632 + rdel yesterday.log ; Delete a file on the server
40633 + bye ; Log out and disconnect from server.
40634 + set ftp get-put-remote \%t ; Restore previous GET-PUT-REMOTE setting
40636 + Of course, FTP scripts can also be written as macros. This lets you
40637 + pass parameters such as hostnames, usernames, and filenames to them:
40639 + define doftpget {
40640 + if < \v(argc) 4 end 1 Usage: \%0 host user remotefile [ localfile ]
40641 + ftp \%1 /user:\%2
40642 + if fail end 1 FTP OPEN \%1 failed
40643 + if not \v(ftp_loggedin) end 1 FTP LOGIN failed
40644 + ftp get {\%3} {\%4}
40645 + if fail end 1 FTP GET \%3 failed
40649 + Add this definition to your Kermit customization file, and it will
40650 + always be available when you start Kermit. This macro lets you
40651 + download a file with FTP by giving a single command, e.g.:
40653 + doftpget xyzcorp.com anonymous oofa.txt
40654 + _________________________________________________________________
40656 + 3.10.3. Automating Secure FTP Sessions
40658 + Often when making secure connections, you are prompted interactively
40659 + for certain information or permission to proceed. These prompts can
40660 + stop an automated procedure. To avoid them, you must give the
40661 + appropriate commands to disable them, and/or supply the prompted-for
40662 + information beforehand. Here are a few hints:
40664 + * Make sure that SET TAKE ERROR and SET MACRO ERROR are both OFF.
40665 + This is the default, but in case you have set either one of these
40666 + ON in your script or initialization file, this makes the script
40667 + halt on any kind of error. Normally you would want to check each
40668 + operation for success or failure and take appropriate action.
40669 + * On SSL and TLS connections, you may be asked whether it is OK to
40670 + proceed with a connection to server that presents a self-signed
40671 + certificate. You can use the SET AUTHENTICATION SSL (or TLS)
40672 + VERIFY or SET AUTH SSL (or TLS) CERTS-OK commands to avoid this
40673 + prompt by not requesting a certificate from the peer.
40674 + * (More to be added...)
40676 + [ [348]Top ] [ [349]FTP Top ] [ [350]FTP Script Tutorial ] [
40677 + [351]C-Kermit Home ] [ [352]Kermit Home ]
40678 + _________________________________________________________________
40680 + 3.11. Advanced FTP Protocol Features
40682 + The remainder of the FTP documention (through the end of Section 3) is
40683 + new to C-Kermit 8.0.206, but we leave it in black to prevent
40684 + headaches. Except for titles.
40685 + * [353]TERMINOLOGY
40686 + * [354]FEATURE NEGOTIATION
40687 + * [355]USING MGET: NLST VERSUS MLSD
40689 + * [357]REFERENCES
40691 + The new releases of [358]C-Kermit (8.0.206) and [359]Kermit 95 (2.1)
40692 + support new FTP protocol features from RFC 2389 as well as most of
40693 + what's in the Elz and Hethmon Extensions to FTP Internet Draft (see
40694 + [360]References). Some of these features, such as SIZE (request a
40695 + file's size), MDTM (request file's modification time), and REST
40696 + (restart interrupted transfer) have been widely implemented in FTP
40697 + clients and servers for years (as well as in the initial release of
40698 + the Kermit FTP clients). Others such as FEAT and MLSD are rarely seen
40699 + and are new to the upcoming Kermit releases. TVFS (Trivial Virtual
40700 + File Store) is supported implicitly, and the UTF-8 character-set is
40701 + already fully supported at the protocol and data-interchange level.
40703 + For Kermit users, the main benefit of the new FTP protocol extensions
40704 + is the ability to do recursive downloads. But the extensions also
40705 + introduce complications and tradeoffs that you should be aware of. Of
40706 + course Kermit tries to "do the right thing" automatically in every
40707 + case for backwards compatibility. But (as noted later) some cases are
40708 + inherently ambiguous and/or can result in nasty surprises, and for
40709 + those situations new commands and switches are available to give you
40710 + precise control over Kermit's behavior, in case the defaults don't
40711 + produce the desired results.
40712 + _________________________________________________________________
40714 + 3.11.1. Terminology Command-line FTP clients such as Kermit (as well
40715 + as the traditional FTP programs found on Unix, VMS, ..., even Windows)
40716 + have commands like PUT, MPUT, GET, MGET, and BYE, which they convert
40717 + into zero or more FTP protocol commands, such as NLST, RETR, QUIT. For
40718 + clarity, we'll use "command" to refer to commands given by the user to
40719 + the FTP client, and "directive" for FTP protocol commands sent by the
40720 + FTP client to the FTP server.
40721 + _________________________________________________________________
40723 + 3.11.2. Feature Negotiation New FTP protocol features are negotiated
40724 + by the client sending a FEAT directive and the server responding with
40725 + a list of (new) features it supports, or else with an error indication
40726 + if it does not support the FEAT directive at all, in which case the
40727 + client has to guess which new features it supports (Kermit guesses
40728 + that it supports SIZE and MDTM but not MLST). Note that the MLST
40729 + feature includes MLSD, which is not listed separately as a feature.
40731 + Guessing is nice when it works, but sometimes it doesn't, and some FTP
40732 + servers become confused when you send them a directive they don't
40733 + understand, or they do something you didn't want, sometimes to the
40734 + point of closing the connection. For this reason, Kermit lets you
40735 + override default or negotiated features with the following new
40738 + FTP { ENABLE, DISABLE } FEAT
40739 + Enables or disables the automatic sending of a FEAT directive
40740 + upon connection to an FTP server. Note that
40741 + FTP [ OPEN ] /NOINIT also inhibits sending the FEAT directive
40742 + (and several others) for the connection being OPEN'd, but
40743 + without necessarily disabling FEAT for subsequent connections
40744 + in the same Kermit instance. FEAT is ENABLED by default, in
40745 + which case many FTP servers are likely to reply:
40747 +500 'FEAT': command not understood
40749 + which is normally harmless (but you never know). (In C-Kermit
40750 + 8.0.208, this error message is suppressed unless you SET FTP
40753 + FTP ENABLE { MDTM, MLST, SIZE }
40754 + Enables the given directive for implicit use by the FTP GET and
40755 + MGET commands in case it has been disabled or erroneously
40756 + omitted by the server in its FEAT response. Note: MLSD can be
40757 + used in the FTP ENABLE and DISABLE commands as a synonym for
40758 + MLST. YOU MUST GIVE THIS COMMAND AFTER MAKING THE FTP
40761 + FTP DISABLE { MDTM, MLST, SIZE }
40762 + Disables implicit use of the given directive by GET or MGET in
40763 + case it causes problems; for example, because it makes
40764 + multifile downloads take too long or the server announces it
40765 + erroneously or misimplements it. Use DISABLE FEAT before making
40766 + a connection to prevent Kermit from sending the FEAT directive
40767 + as part of its initial sequence. Note that disabling FEAT,
40768 + SIZE, or MDTM does not prevent you from executing explicit FTP
40769 + FEATURES, FTP SIZE, or FTP MODTIME commands. Also note that
40770 + disabling SIZE prevents PUT /RESTART (recovery of interrupted
40771 + uploads) from working. YOU MUST GIVE THIS COMMAND AFTER MAKING
40772 + THE FTP CONNECTION.
40774 + To enable or disable more than one feature, use multiple FTP ENABLE or
40775 + FTP DISABLE commands. The SHOW FTP command shows which features are
40776 + currently enabled and disabled.
40779 + This command sends a FEAT directive to the server. In case you
40780 + have been disabling and enabling different features, this
40781 + resynchronizes Kermit's feature list with the server's. If the
40782 + server does not support the FEAT directive, Kermit's feature
40783 + list is not changed.
40785 + FTP OPTIONS directive
40786 + Informational only: the server tells what options, if any, it
40787 + supports for the given directive, e.g. MLST. Fails if the
40788 + server does not support the OPTS directive or if the directive
40789 + for which options are requested is not valid. The directive is
40790 + case-insensitive.
40792 + FTP SIZE filename
40793 + Sends a SIZE directive to the server for the given file. The
40794 + filename must not contain wildcards. The server responds with
40795 + an error if the file can't be found, is not accessible, or the
40796 + SIZE directive is not supported, otherwise with the length of
40797 + the file in bytes, which Kermit displays and also makes
40798 + available to you in its \v(ftp_message) variable. If the
40799 + directive is successful, Kermit (re-)enables it for internal
40800 + use by the GET and MGET directives on this connection.
40802 + FTP MODTIME filename
40803 + Works just like the SIZE directive except it sends an MDTM
40804 + directive. Upon success, the server sends modification
40805 + date-time string, which Kermit interprets for you and also
40806 + makes available in its \v(ftp_message) variable.
40808 + Whenever a SIZE or MDTM directive is sent implicitly and rejected by
40809 + the server because it is unknown, Kermit automatically disables it.
40810 + _________________________________________________________________
40812 + 3.11.3. Using MGET: NLST versus MLSD When you give an MGET command to
40813 + an FTP client, it sends a request to the FTP server for a list of
40814 + files, and then upon successful receipt of the list, goes through it
40815 + and issues a RETR (retrieve) directive for each file on the list (or
40816 + possibly only for selected files).
40818 + With the new FTP protocol extensions, now there are two ways to get
40819 + the list of files: the NLST directive, which has been part of FTP
40820 + protocol since the beginning, and the new MLSD directive, which is new
40821 + and not yet widely implemented. When NLST is used and you give a
40822 + command like "mget *.txt", the FTP client sends:
40826 + and the server sends back a list of the files whose names match, e.g.
40832 + Then when downloading each file, the client sends SIZE (if it wants
40833 + have a percent-done display) and MDTM (if it wants to set the
40834 + downloaded file's timestamp to match that of the original), as well as
40835 + RETR (to retrieve the file).
40837 + But when MLSD is used, the client is not supposed to send the filename
40838 + or wildcard to the server; instead it sends an MLSD directive with no
40839 + argument (or the name of a directory), and the server sends back a
40840 + list of all the files in the current or given directory; then the
40841 + client goes through the list and checks each file to see if it matches
40842 + the given pattern, the rationale being that the user knows only the
40843 + local conventions for wildcards and not necessarily the server's
40844 + conventions. So with NLST the server interprets wildcards; with MLSD
40847 + The interpretation of NLST wildcards by the server is not
40848 + necessarily required or even envisioned by the FTP protocol
40849 + definition (RFC 959), but in practice most clients and servers work
40852 + The principal advantage of MLSD is that instead of sending back a
40853 + simple list of filenames, it sends back a kind of database in which
40854 + each entry contains a filename together with information about the
40855 + file: type, size, timestamp, and so on; for example:
40857 +size=0;type=dir;perm=el;modify=20020409191530; bin
40858 +size=3919312;type=file;perm=r;modify=20000310140400; bar.txt
40859 +size=6686176;type=file;perm=r;modify=20001215181000; baz.txt
40860 +size=3820092;type=file;perm=r;modify=20000310140300; foo.txt
40861 +size=27439;type=file;perm=r;modify=20020923151312; foo.zip
40864 + (If the format of the file list were the only difference between NLST
40865 + and MLSD, the discussion would be finished: it would always be better
40866 + to use MLSD when available, and the MGET user interface would need no
40867 + changes. But there's a lot more to MLSD than the file-list format;
40870 + The client learns whether the server supports MLSD in FEAT exchange.
40871 + But the fact that the server supports MLSD doesn't mean the client
40872 + should always use it. It is better to use MLSD:
40874 + * On connections where the server imposes a time penalty for every
40875 + command, e.g. the Red Hat Rawhide server. With MLSD, the client
40876 + needs to send only one command (RETR) per file, whereas NLST
40877 + requires three (SIZE, RETR, and MDTM). Suppose there is a
40878 + 30-second delay for each command and 1000 files are to be fetched;
40879 + in that case, MLSD saves 60,000 seconds = 1000 minutes = 16 hours
40881 + * For recursive downloads since there is no dependable way to
40882 + download directory trees with NLST.
40884 + But it is better to use NLST:
40886 + * If you want only a couple short files out of a large directory. In
40887 + this case, NLST is the better choice since the server sends a list
40888 + of only the files you want, not a list of (say) a million files,
40889 + which can make a big difference on slow connections. For example,
40890 + suppose your wildcard matches three files of 1K each, but the
40891 + million-file listing is 80MB long, and your connection is through
40892 + a modem. The overhead of using MLSD is practically infinite.
40893 + * If the server supports wildcarding features not known to the
40894 + client, but that can be used to achieve desirable effects
40895 + otherwise unobtainable, such as "[dir...]*.txt" in VMS or AOS/VS
40896 + "except" clauses.
40897 + * If you have been given a wildcard string by an FTP site
40898 + administrator for fetching a specific group of files out of a
40899 + larger directory, e.g. "mget ck[cuw]*.[cwh] makefile", that is
40900 + expected to work with any client (an FTP site administrator can't
40901 + be expected to know the wildcard syntax of every FTP client).
40903 + But when using MLSD there are complications:
40905 + * MLSD wants either a blank argument (meaning the current directory)
40906 + or else the name of a specific directory. The client must not send
40907 + it a wildcard or a filename.
40908 + * But if the user's command is "mget xxx", how does the client know
40909 + whether to send "xxx" in the MLSD directive? It might be the name
40910 + of a directory on on the server, in which case it should be sent,
40911 + or it might be the name of a file on the server (or a wildcard),
40912 + in which case it must not be sent. Since the client knows its own
40913 + wildcard syntax, then in most cases it would be right to send
40914 + "MLSD" with no argument if xxx is wild, and to send "MLSD xxx" if
40916 + * But suppose the server's file system allows filename characters
40917 + that correspond with the client's wildcard syntax? For example:
40918 + "[abc]" could be either a valid VMS directory name or a wildcard
40919 + pattern used by the FTP client. What should the client do with
40920 + "mget [abc]"? In this case there must be a way for the user to
40921 + force sending the MGET argument as the MLSD argument.
40922 + * If "xxx" is a regular file in the server's current directory,
40923 + "mget xxx" works with NLST but not with MLSD.
40925 + To further complicate matters, NLST can (in theory) work just like
40926 + MLSD: if sent with a blank argument or a directory name, it is
40927 + supposed to return a complete list of files in the current or given
40928 + directory, which the client can match locally against some pattern. It
40929 + is not known if any FTP server or client does this but nevertheless,
40930 + it should be possible since this behavior can be inferred from RFC
40933 + In view of these considerations, and given the need to preserve the
40934 + traditional FTP client command structure and behavior so the software
40935 + will be usable by most people:
40937 + 1. The MGET command should produce the expected result in the common
40938 + cases, regardless of whether NLST or MLSD is used underneath.
40939 + 2. For anomalous cases, the user needs a way to control whether the
40940 + MGET argument is sent to the server or kept for local use.
40941 + 3. At the same time, the user might need a way to send a directory
40942 + name to the server, independent of any wildcard pattern.
40943 + 4. The user needs a way to force NLST or MLSD for a given MGET
40946 + By default, Kermit's MGET command uses MLSD if MLST is reported by the
40947 + server in its FEAT list. When MLSD is used, the filespec is sent to
40948 + the server if it is not wild (according to Kermit's own definition of
40949 + "wild" since it can't possibly know the server's definition). If the
40950 + filespec is wild it is held for local use to select files from the
40951 + list returned by the server. If MLST is not reported by the server or
40952 + is disabled, Kermit sends the MGET filespec with the NLST directive.
40954 + The default behavior can be overridden globally with FTP DISABLE MLST,
40955 + which forces Kermit to use NLST to get file lists. And then for
40956 + situations in which MLSD is enabled, the following MGET switches can
40957 + be used to override the defaults for a specific MGET operation:
40960 + Forces the client to send NLST. Example:
40965 + Forces the client to send MLSD (even if MLST is disabled).
40971 + When this switch is given, it forces the client to hold the
40972 + pattern for local use against the returned file list. If a
40973 + remote filespec is also given (e.g. the "blah" in "mget
40974 + /match:*.txt blah"), then it is sent as the NLST or MLSD
40975 + argument, presumably to specify the directory whose files are
40976 + to be listed. When the /MATCH switch is not given, the MGET
40977 + filespec is sent to the server if the directive is NLST or if
40978 + the filespec is not wild. Examples:
40980 + Command: With NLST: With MLSD:
40982 + mget *.txt NLST *.txt MLSD
40983 + mget foo NLST foo MLSD foo
40984 + mget /match:*.txt NLST MLSD
40985 + mget /match:*.txt foo NLST foo MLSD foo
40987 + In other words, the pattern is always intepreted locally unless MGET
40988 + uses NLST and no /MATCH switch was given.
40989 + _________________________________________________________________
40993 + 3.11.4.1. Downloading a Single File
40995 + There are no choices here, just use the FTP GET command. Kermit always
40996 + sends the RETR directive, and possibly SIZE and/or MDTM. The small
40997 + advantage of using MLST in this case is outweighed by the risk and
40998 + effort of coding a special case.
41000 + 3.11.4.2. Downloading a Group of Files from a Single Directory
41002 + This case presents tradeoffs, especially on slow connections:
41004 + * For downloading all or most of the files in a directory, MLSD is
41005 + better because it eliminates the need to send SIZE and MDTM for
41006 + each file. No special actions are required in this case; Kermit
41007 + uses MLSD automatically if the server supports it (unless you have
41009 + * For a small number of files from a large directory, NLST is better
41010 + because it bypasses downloading of a potentially huge file list
41011 + prior to the files themselves. If you have a connection to a
41012 + server that supports MLSD, use the /NLST switch to force NLST:
41014 +mget /nlst t[1234].h
41016 + * If the server supports MLSD but does not support separate SIZE or
41017 + MDTM directives, and you need the size and/or timestamp
41018 + information, MLSD is better; no special actions required.
41019 + * If the server supports MLSD but does not support the "size" and
41020 + "modify" facts, but it does support the SIZE or MDTM directives,
41021 + and you need the size and/or timestamp information, NLST is
41024 + 3.11.4.3. Downloading a Directory Tree
41026 + MLSD is the only choice for recursive downloads; they rarely, if ever,
41027 + work with NLST (the few cases where they do work rely on
41028 + extra-protocol "secret" notations for the NLST argument). No special
41029 + actions are required to force MLSD when the server supports it, unless
41030 + you have disabled it. Examples:
41033 + This tells the server to send all files and directories in the
41034 + tree rooted at its current directory.
41036 + MGET /RECURSIVE *.txt
41037 + This tells the server to send all *.txt files in the tree
41038 + rooted at its current directory.
41040 + MGET /MLSD /RECURSIVE *.txt
41041 + Same as the previous example but forces Kermit to send MLSD in
41042 + case it was disabled, or in case the server is known to support
41043 + it even though it did not announce it in its FEAT listing.
41045 + MGET /RECURSIVE /MATCH:*.zip archives
41046 + Tells the server to send all ZIP files in the tree rooted at
41047 + its "archives" directory.
41049 + MGET /RECURSIVE /MATCH:* [abc]
41050 + The server is running on VMS and you want it to send all the
41051 + files in the directory tree rooted at [ABC]. But since "[abc]"
41052 + looks just like a wildcard, you have to include a /MATCH:
41053 + switch to force Kermit to send "[abc]" as the MLSD argument.
41055 + In all cases in which the /RECURSIVE switch is included, the server's
41056 + tree is duplicated locally.
41058 + Although MLSD allows recursion and NLST does not, the MLSD
41059 + specification places a heavy burden on the client; the obvious,
41060 + straightforward, and elegant implementation (depth-first, the one
41061 + that Kermit currently uses) requires as many open temporary files
41062 + as the server's directory tree is deep, and therefore client
41063 + resource exhaustion -- e.g. exceeding the maximum number of open
41064 + files -- is a danger. Unfortunately MLSD was not designed with
41065 + recursion in mind. (Breadth-first traversal could be problematic
41066 + due to lack of sufficient navigation information.)
41068 + Of course all of Kermit's other MGET switches can be used too, e.g.
41069 + for finer-grained file selection (by date, size, etc), for moving or
41070 + renaming files as they arrive, to override Kermit's automatic per-file
41071 + text/binary mode switching, to pass the incoming files through a
41072 + filter, to convert text-file character sets, and so on.
41074 + 3.11.4.4. NLST/MLSD Summary Table
41076 + Here's a table summarizing MGET behavior when the server supports both
41077 + NLST and MLSD. /NLST and /MLSD switches are included for clarity to
41078 + indicate which protocol is being used, and the expected effects. In
41079 + practice you can omit the /NLST and /MLSD switches and the Kermit
41080 + client chooses the appropriate or desired protocol as described above.
41081 + Sample commands presume a Unix file system on the server, but of
41082 + course the server can have any file system or syntax at all.
41084 + User's Command FTP Sends Remarks
41085 + mget /nlst NLST Gets a list of all the files in the server's current
41086 + and downloads each file. The list includes names only, so Kermit also
41087 + must send SIZE and MDTM directives if size and timestamp information
41088 + is required (this is always true of NLST). Sending NLST without an
41089 + argument is allowed by the RFC959 NLST definition and by the Kermit
41090 + FTP client, but might not work with other clients, and also might not
41091 + work with every server.
41092 + mget /nlst foo NLST foo If "foo" is a directory, this gets a list of
41093 + all the files from the server's "foo" directory and downloads each
41094 + file; otherwise this downloads the file named "foo" (if any) from the
41095 + server's current directory.
41096 + mget /nlst *.txt NLST *.txt Gets a list of the files in the server's
41097 + current directory whose names match the pattern *.txt, and then
41098 + downloads each file from the list. Because we are using NLST, we send
41099 + the filespec (*.txt) to the server and the server interprets any
41101 + mget /nlst foo/*.txt NLST foo/*.txt Gets a list of the files in the
41102 + server's "foo" directory whose names match the pattern *.txt, and then
41103 + downloads each file from the list (server interprets wildcards).
41104 + mget /nlst /match:*.txt NLST Gets a list of all the files in the
41105 + server's current directory and then downloads each one whose name
41106 + matches the pattern *.txt (client interprets wildcards).
41107 + mget /nlst /match:*.txt foo NLST foo Gets a list of all the files in
41108 + the server's "foo" directory and then downloads each one whose name
41109 + matches the pattern *.txt (client interprets wildcards).
41110 + mget /mlsd MLSD Gets a list of all the files from the server's current
41111 + directory and then downloads each one. The list might include size and
41112 + timestamp information, in which case Kermit does not need to send SIZE
41113 + and MDTM directives for each file (this is always true of MLSD).
41114 + mget /mlsd foo MLSD foo Gets a list of all the files from the server's
41115 + "foo" directory (where the string "foo" does not contain wildcards)
41116 + and then downloads each one. If "foo" is a regular file and not a
41117 + directory, this command is supposed to fail, but some servers have
41118 + been observed that send the file.
41119 + mget /mlsd *.txt MLSD Gets a list of all the files from the server's
41120 + current directory and then downloads only the ones whose names match
41121 + the pattern "*.txt". Because we are using MLSD and the MGET filespec
41122 + is wild, we do not send the filespec to the server, but treat it as
41123 + though it had been given in a /MATCH: switch and use it locally to
41124 + match the names in the list.
41125 + mget /mlsd foo/*.txt MLSD This one won't work because MLSD requires
41126 + that the notions of server directory and filename-matching pattern be
41127 + separated. However, the client, which can't be expected to know the
41128 + server's file-system syntax, winds up sending a request that the
41129 + server will (or should) reject.
41130 + mget /mlsd /match:*.txt MLSD Gets a list of all the files from the
41131 + server's current directory and then downloads only the ones whose
41132 + names match the pattern "*.txt" (client interprets wildcards).
41133 + mget /mlsd /match:*.txt foo MLSD foo If "foo" is a directory on the
41134 + server, this gets a list of all the files from the server's "foo"
41135 + directory and then downloads only the ones whose names match the
41136 + pattern "*.txt" (client interprets wildcards). This leaves the server
41137 + CD'd to the "foo" directory; there's no way the client can restore the
41138 + server's original directory because MLSD doesn't give that
41139 + information, and since the client can not be expected to know the
41140 + server's file-system syntax, it would not be safe to guess. If "foo"
41141 + is a regular file, MLSD fails.
41142 + mget /mlsd foo bar MLSD This one is problematic. You're supposed to be
41143 + able to give MGET a list a filespecs; in this case we name two
41144 + directories. The client must change the server's directory to "foo" to
41145 + get the list of files, and then the files themselves. But then it has
41146 + no way to return to the server's previous directory in order to do the
41147 + same for "bar", as explained in the previous example.
41148 + mget /mlsd /match:* [abc] MLSD [abc] Including a /MATCH: switch forces
41149 + [abc] to be sent to the server even though the client would normally
41150 + think it was a wildcard and hold it for local interpretation. In this
41151 + example, [abc] might be a VMS directory name.
41152 + mget /mlsd /match:* t*.h MLSD t*.h Contrary to the MLSD specification,
41153 + some MLSD-capable FTP servers do interpret wildcards. This form of the
41154 + MGET command can be used to force a wildcard to be sent to the server
41155 + for interpretation.
41157 + When MLSD is used implicitly (that is, without an /MLSD switch given
41158 + to force the use of MLSD) and an MGET command such as "mget foo/*.txt"
41159 + fails, Kermit automatically falls back to NLST and tries again.
41160 + _________________________________________________________________
41162 + 3.11.5. References
41164 + 1. Postel, J., and J. Reynolds, File Transfer Protocol (FTP), RFC
41165 + 959, October 1985: [361]ftp://ftp.isi.edu/in-notes/rfc959.txt.
41166 + 2. Hethmon, P, and R. Elz, Feature negotiation mechanism for the File
41167 + Transfer Protocol, RFC 2389, August 1998:
41168 + [362]ftp://ftp.isi.edu/in-notes/rfc2389.txt.
41169 + 3. Elz, R, and P. Hethmon, Extensions to FTP, Internet Draft
41170 + draft-ietf-ftpext-mlst-16.txt, September 2002:
41171 + [363]http://www.ietf.org/internet-drafts/draft-ietf-ftpext-mlst-16
41173 + 4. [364]The Kermit FTP Client (overview).
41175 + [ [365]Top ] [ [366]FTP Top ] [ [367]C-Kermit Home ] [ [368]Kermit
41177 + __________________________________________________________________________
41181 + A new feature called file scanning is used in various contexts to
41182 + determine if a file is text or binary, and if it is text, what kind of
41183 + text. The overhead of file scanning is surprisingly tolerable, usually
41184 + about a quarter second per file. File scanning is now used instead of
41185 + filename patterns unless you SET FILE SCAN OFF, which restores the
41186 + previous behavior.
41188 + The primary benefit of file scanning is in file transfer. For all
41189 + practical purposes, now you can stop worrying about whether a file
41190 + should be sent in binary or text mode, or about sending mixtures of
41191 + text and binary files in a single operation, or configuring and
41192 + fine-tuning your lists of binary-file and text-file name patterns: now
41193 + it all just works.
41195 + File scanning is done by the file sender, which determines the type of
41196 + each file before it sends it and informs the receiver (Kermit or FTP
41197 + server) of the type. File scanning is NOT done by the receiver,
41198 + because it is the sender's responsibility to determine each file's
41199 + type, send the file in the right mode, and inform the receiver of the
41200 + mode. If both transfer partners are capable of this (or any other)
41201 + form of automatic text/binary mode switching, then files can be sent
41202 + in both directions with no worries about corruption due to
41203 + inappropriate transfer mode. (As noted in [369]Section 3, FTP servers
41204 + don't do this, so this discussion does not apply when using Kermit to
41205 + download from an FTP server.)
41207 + The rest of this section is mainly for the curious. If you don't read
41208 + it and simply accept all defaults, every file you send should go in
41209 + the appropriate mode automatically. As always, however, for
41210 + character-set translation to work for 7- and 8-bit character-set
41211 + files, the appropriate SET FILE CHARACTER-SET command(s) must have
41212 + been executed to identify their encoding (Kermit's default file
41213 + character-set is neutral ASCII except on platforms like HP-UX or
41214 + DG/UX, where the default file character-set is known). And of course,
41215 + receiving is another matter -- obviously the other Kermit must also
41216 + send each file in the appropriate mode.
41218 + Scanning is more reliable than filename patterns simply because
41219 + filenames are not reliable indicators of the file's contents. Classic
41220 + examples include ".doc" files, which are binary if Microsoft Word
41221 + documents but text on most other platforms, and ".com" files, which
41222 + are binary on DOS and Windows but text on VMS. Anyway, nobody knows
41223 + the naming conventions (if any) of all the applications (and persons!)
41224 + on your computer. Scanning, on the other hand, determines each file's
41225 + type by inspecting its contents rather than just looking at its name.
41227 + Also, file patterns -- even when they work as intended -- categorize
41228 + each file only as text or binary, whereas file scanning can make finer
41232 + Binary data, not to be converted in any way. Examples include
41233 + binary machine code (executable programs), graphics images
41234 + (GIF, JPG, etc), compressed files (Z, GZ, etc), archives and
41235 + packages (ZIP, TAR, RPM, etc), object files and libraries (OBJ,
41239 + Text encoded in a 7-bit character set such as ASCII or one of
41240 + the ISO 646 national versions. Kermit has no way to tell which
41241 + character is used, only that it's 7-bit text. Typical examples
41242 + include program source code, README files, Perl or Kermit
41243 + scripts, plain-text email, HTML, TeX, and various textual
41244 + encodings of binary files: Hex, Base64, etc. When sending such
41245 + files, the FILE DEFAULT 7BIT-CHARACTER-SET is used as the file
41246 + character-set, and then the appropriate transfer character set
41247 + is chosen from the associations list (ASSOCIATE, SHOW
41251 + Text encoded in an 8-bit character set such as Latin-1,
41252 + Latin-2, Latin/Hebrew, Latin/Cyrillic, KOI8, HP-Roman8, JIS X
41253 + 0208, Code Page 437, or Code Page 1252. Again, Kermit has no
41254 + way of knowing which particular set is in use, only that it's
41255 + 8-bit text. When sending such files, the FILE DEFAULT
41256 + 8BIT-CHARACTER-SET is used as the file character-set, and then
41257 + the appropriate transfer character set is chosen from the
41258 + associations list.
41261 + Unicode in its basic form, 16 bits (2 octets) per character.
41262 + When sending such files, UCS2 is the file character-set and the
41263 + byte order is identified automatically; the appropriate
41264 + transfer character set is chosen from the associations list.
41265 + Normally this would be UTF8. UTF-16 is not supported yet;
41266 + Kermit's Unicode translations are restricted to Plane 0, the
41267 + Base Multilingual Plane (BMP).
41270 + Unicode in its 8-bit transformation format. When sending such
41271 + files, UTF8 is the file character-set; the appropriate transfer
41272 + character set is chosen from the associations list, normally
41275 + File scanning is available in UNIX C-Kermit, in K-95, and to a limited
41276 + extent, in VMS C-Kermit (full scanning is problematic in VMS because
41277 + even plain-text files might contain binary record-format information).
41278 + The relevant commands are:
41280 + SET TRANSFER MODE { AUTOMATIC, MANUAL }
41281 + Tells whether the file-transfer mode (text or binary) should be
41282 + set by automatic or "manual" means. AUTOMATIC is the default,
41283 + which allows any of the automatic methods that are enabled to
41284 + do their jobs: FILE SCAN, FILE PATTERNS, peer recognition, etc.
41285 + MANUAL lets you control the transfer mode with the SET FILE
41286 + TYPE commands. As always, /TEXT and /BINARY switches on your
41287 + file-transfer commands override all other methods; if you give
41288 + one of these switches, scanning is not done. SHOW TRANSFER
41289 + displays the current TRANSFER MODE setting.
41291 + SET FILE SCAN { ON [ number ], OFF }
41292 + Turns this feature on and off. It's ON by default. When OFF,
41293 + the previous rules apply (SET FILE PATTERNS, etc). When ON is
41294 + given, you can also specify a number of bytes to be scanned.
41295 + The default is 49152 (= 48K). If a negative number is given,
41296 + the entire file is scanned, no matter how big, for maximum
41297 + certainty (for example, a PostScript file that appears to be
41298 + plain text might include an embedded graphic past the normal
41299 + scanning limit). SHOW FILE displays the current FILE SCAN
41302 + SET FILE DEFAULT 7BIT-CHARACTER-SET name
41303 + Tells the 7-bit character-set to use if scanning identifies a
41304 + 7-bit text file, e.g. GERMAN. SHOW FILE displays the current
41305 + SET FILE DEFAULT settings. So does SHOW CHARACTER-SETS.
41307 + SET FILE DEFAULT 8BIT-CHARACTER-SET name
41308 + Tells the 8-bit character-set to use if scanning identifies an
41309 + 8-bit text file, e.g. LATIN1. SHOW FILE and SHOW CHARACTER-SET
41312 + ASSOCIATE FILE-CHARACTER-SET fcs tcs
41313 + When sending files and a file character-set (fcs) is identified
41314 + by scanning, this tells C-Kermit which transfer character-set
41315 + (tcs) to translate it to. It also allows C-Kermit to set the
41316 + appropriate transfer character-set automatically whenever you
41317 + give a SET FILE CHARACTER-SET command.
41319 + ASSOCIATE TRANSFER-CHARACTER-SET tcs fcs
41320 + When receivinging files and a file arrives whose transfer
41321 + character-set (tcs) is announced by the sender, this command
41322 + tells C-Kermit which file character-set (fcs) to translate it
41323 + to. It also allows C-Kermit to set the appropriate file
41324 + character-set whenever you give a SET TRANSFER CHARACTER-SET
41327 + SET FILE CHARACTER-SET name
41328 + When given for a 7-bit set, also sets FILE DEFAULT
41329 + 7BIT-CHARACTER-SET to the same set. When given for an 8-bit
41330 + set, also sets FILE DEFAULT 8BIT-CHARACTER-SET to the same set.
41331 + If an ASSOCIATE FILE-CHARACTER-SET command has been given for
41332 + this set, also sets the corresponding transfer character-set.
41334 + DIRECTORY /XFERMODE [ filespec ]
41335 + Performs a file scan of the given files, listing the result for
41336 + each file. If FILE SCAN is OFF but PATTERNS are ON, the result
41337 + shown according to the current FILE TEXT-PATTERNS and
41338 + BINARY-PATTERNS, and are restricted to (B) and (T). When FILE
41339 + SCAN is ON, the results are:
41342 + (T)(7BIT) Text: 7-bit
41343 + (T)(8BIT) Text: 8-bit
41344 + (T)(UTF8) Text: Unicode UTF8
41345 + (T)(UCS2BE) Text: Unicode UCS2 Big Endian
41346 + (T)(UCS2LE) Text: Unicode UCS2 Little Endian
41348 + So you can use DIR /XFER to get a preview of how each file in a
41349 + selected group will be transferred. Everything to the right of
41350 + the (B) or (T) is new. If FILE SCAN is OFF, you only get the
41351 + (B) or (T) as before.
41353 + Note: Big and Little Endian refer to the ordering of bytes
41354 + within a computer word. Big Endian architecture is standard and
41355 + is used on most non-PC computers. Little Endian architecture is
41358 + To illustrate file-transfer with scanning, suppose you have a
41359 + directory containing a mixture of text and binary files, and each text
41360 + file can be 7-bit German ISO 646, 8-bit Latin-1, or Unicode in any of
41361 + the following forms: UCS2 Little Endian, UCS2 Big Endian, or UTF8
41362 + ([370]UTF-16 is not supported yet). Assuming all the built-in defaults
41363 + are in effect, the following three commands do the job:
41365 + set file char german ; This sets the default for 7-bit text files
41366 + set file char latin1 ; This sets the default for 8-bit text files
41369 + Each file is sent in the appropriate mode (text or binary), with text
41370 + files converted to the appropriate transfer character-set and labeled
41371 + so the receiver can convert them according to its own local
41374 + By the way, what if you want to inhibit character-set translation but
41375 + still allow automatic text/binary mode switching? Previously, you
41376 + could simply SET TRANSFER CHARACTER-SET TRANSPARENT. But now with file
41377 + scanning, the file and transfer character-sets are set automatically
41378 + per file. A new command was added for this purpose:
41380 + SET TRANSFER TRANSLATION { ON, OFF }
41381 + Enables and disables file-transfer character-set translation.
41382 + It is enabled by default.
41384 + When TRANSFER TRANSLATION is OFF but FILE SCAN is ON, files are still
41385 + scanned to see if they are text or binary, but no character-set
41386 + translation is done when they text: only the normal record-format
41389 + Like all SET commands, SET TRANSFER TRANSLATION is global and
41390 + persistent. You can also force a particular file-transfer command
41391 + (SEND, MSEND, GET, RECEIVE, TRANSMIT, etc) to not translate without
41392 + affecting the global translation settings by including the new
41393 + /TRANSPARENT switch, e.g.
41395 + send /transparent oofa.txt
41397 + As of C-Kermit 8.0.206, SET TRANSFER CHARACTER-SET TRANSPARENT implies
41398 + SET TRANSFER TRANSLATION OFF.
41400 + File scanning is also used in the TYPE command. The source file type
41401 + and character set are determined as above, and then the file is
41402 + automatically converted to your display character-set, line by line.
41403 + In Kermit 95, the display character-set is Unicode, perhaps converted
41404 + to your current console code page; in other versions of C-Kermit, it
41405 + is your current file character-set. Thus if you have the following set
41408 + SET FILE CHARACTER-SET (necessary in Unix but not K95)
41409 + SET FILE DEFAULT 7BIT CHARACTER-SET
41410 + SET FILE DEFAULT 8BIT CHARACTER-SET
41412 + then you should be able to TYPE any text file and see something
41413 + reasonable. For example, in Unix, if your DEFAULT 7BIT-CHARACTER-SET
41414 + is ITALIAN and your DEFAULT 8BIT-CHARACTER-SET is LATIN1, and your
41415 + FILE CHARACTER-SET is LATIN1, you can TYPE an Italian ISO 646 file, a
41416 + Latin-1 file, or any kind of Unicode file, and have it translated
41417 + automatically to Latin-1 for your display.
41419 + In the GUI version of Kermit 95, you can see mixtures of many
41420 + different scripts if the file is UTF8 or UCS2: Roman, Cyrillic,
41421 + Hebrew, Greek, Armenian, Georgian, etc, all on the same screen at
41424 + File scanning also adds a new criterion for file selection, i.e. to
41425 + select only text (or binary) files. Several commands now include a new
41426 + switch, /TYPE:{BINARY,TEXT,ALL}. BINARY means select only binary
41427 + regular files (not directories). TEXT means select only text files.
41428 + ALL means don't scan; select all files. Examples:
41430 + SEND /TYPE:BINARY *.*
41431 + Sends only binary files, skipping over text files.
41433 + NOTE: File scanning is NOT done when using external protocols (because
41434 + the external protocol programs, such as sz, are processing each file,
41437 + DIRECTORY /TYPE:TEXT
41438 + Lists only text files but not binary files.
41440 + DELETE /TYPE:BINARY foo.*
41441 + Deletes all foo.* files that are regular binary files but does
41442 + not delete any text files.
41444 + CHMOD /TYPE:BINARY 775 *
41445 + (UNIX) Changes the permissions of all binary files to 775.
41447 + When FILE SCAN is OFF and FILE PATTERNS are ON, behavior is as before
41448 + with PATTERNS ON, but with some improvements:
41450 + * Pathnames are now stripped prior to pattern matching.
41451 + * Backup suffixes (like .~3~) are stripped prior to pattern
41454 + [ [371]Top ] [ [372]Contents ] [ [373]C-Kermit Home ] [ [374]Kermit
41456 + __________________________________________________________________________
41458 +5. FILE AND DIRECTORY NAMES CONTAINING SPACES
41460 + Prior to the introduction of the graphical user interface (GUI), it
41461 + was inconceivable that file or directory names could contain spaces,
41462 + because space is a field delimiter in all command languages. GUIs,
41463 + however, use dialog boxes for filenames, so there is never any
41464 + question of distinguishing a filename from adjacent fields -- because
41465 + there are no adjacent fields -- and therefore it has become quite
41466 + common on computers that have GUIs to have file and directory names
41467 + composed of multiple words. Of course this poses problems for command
41468 + shells and other text-oriented programs.
41470 + Most command shells address these problems by allowing such names to
41471 + be enclosed in doublequotes, e.g.:
41473 + cd "c:\Program Files"
41475 + C-Kermit previously used braces for this:
41477 + cd {c:\Program Files}
41479 + which was not what most people expected. And even when braces were
41480 + used, Kermit had difficulties with completion, file menus, and so
41481 + forth, within braced fields.
41483 + C-Kermit 8.0 allows either doublequotes or braces to be used for
41488 + rename "this file" "that file"
41489 + rename {this file} "that file"
41490 + rename "this file" {that file}
41491 + cd {Program Files}
41492 + cd "Program Files"
41494 + Note that the doublequotes or brackets must enclose the whole file or
41495 + directory specification:
41497 + "c:\My Directory"
41501 + c:\"My Directory"
41503 + In C-Kermit 8.0, you can also use completion on these filenames, in
41504 + which case Kermit supplies the quotes (or braces) automatically.
41505 + Example (in which the current directory contains only one file whose
41506 + name starts with "th" and its full name is "this file" (without the
41507 + quotes, but with the space)):
41511 + Kermit repaints the filename field like this:
41515 + That is, it backspaces over the original "th" and then writes the
41516 + filename in doublequotes.
41518 + If completion is only partial, Kermit still supplies the quotes, but
41519 + in this case also beeps. To continue the filename, you must first
41520 + backspace over the closing quote. The closing quote is supplied in
41521 + this case to make sure that you can see the spaces, especially if they
41522 + are trailing. For example, if the current directory contains two files
41523 + whose names start with "th", and their fill names are "this file" and
41524 + "this other file":
41530 + cat "this "<Beep>
41532 + If it didn't print the closing quote, you would probably wonder why it
41535 + Also, if you begin a filename field with a doublequote or opening
41536 + brace, now you can use completion or get ?-help; this was never
41539 + C-Kermit>type "thi? Input file specification, one of the following:
41540 + this file this other file
41541 + C-Kermit>type "thi_
41543 + [ [375]Top ] [ [376]Contents ] [ [377]C-Kermit Home ] [ [378]Kermit
41545 + __________________________________________________________________________
41547 +6. OTHER COMMAND PARSING IMPROVEMENTS
41549 + 6.1. Grouping Macro Arguments
41551 + Doublequotes now can be used in macro invocations to group arguments
41552 + containing spaces, where previously only braces could be used:
41554 + define xx show args
41555 + xx one "this is two" three
41559 + Macro arguments at level 0 (\v(argc) = 4):
41562 + \%2 = this is two
41565 + Also, you can now quote braces and quotes in macro args (this didn't
41566 + work before). Examples:
41568 + xx "{" ; The argument is a single left brace
41569 + xx {"} ; The argument is a doublequote character
41571 + In case this new behavior interferes with your scripts, you can
41572 + restore the previous behavior with:
41574 + SET COMMAND DOUBLEQUOTING OFF
41576 + 6.2. Directory and File Name Completion
41578 + C-Kermit 8.0 also includes better completion for directory names, e.g.
41579 + in the CD command. If the name typed so far uniquely matches a
41580 + directory name, it is completed (as before), but now if the directory
41581 + contains any subdirectories, completion is partial (allowing you to
41582 + supply additional path segments without backspacing); otherwise it is
41585 + Completion has also been improved for file and directory names that
41586 + contain not only spaces (as described above) but also "metacharacters"
41587 + such as asterisk (*) and tilde (~): now the field is repainted if
41588 + necessary. For example, if the current directory contains only one
41589 + file whose name contains "blah", then in:
41593 + "*blah" is replaced by the filename. In earlier releases, the part
41594 + typed so far was left on the command line (and in the history buffer),
41595 + so even when the original command worked, the recalled version would
41596 + not. Similarly for ~ (the nearly-universal Unix notation for
41599 + type ~olga/x<Tab>
41601 + is repainted as (e.g.):
41603 + type /users/home/olga/x(Beep)
41605 + Speaking of command history, the new SHOW HISTORY command shows your
41606 + command history and recall buffer. SAVE COMMAND HISTORY saves it into
41607 + a file of your choice.
41609 + 6.3. Passing Arguments to Command Files
41611 + The method for passing arguments to command files has been improved.
41612 + Prior to C-Kermit 7.0 there was no provision for doing this. In
41613 + C-Kermit 7.0, the TAKE command was changed to allow arguments to be
41614 + given after the filename:
41616 + take commandfile arg1 arg2 ...
41618 + This was accomplished by replacing the current \%1, \%2, etc, with the
41619 + given arguments, since a new set of macro argument variables is
41620 + created only when a macro is executed, not a command file. It is much
41621 + more intuitive, however, if arguments to command files worked like
41622 + those to macros: the command file sees the arguments as its own \%1,
41623 + \%2, etc, but the caller's variables are not disturbed. C-Kermit 8.0
41624 + accomplishes this by automatically creating an intermediate temporary
41625 + macro to start the command file (if any arguments were given), thus
41626 + creating a new level of arguments as expected.
41628 + 6.4. More-Prompting
41630 + The familiar --more?-- prompt that appears at the end of each
41631 + screenful of command-response output now accepts a new answer: G (Go)
41632 + meaning "show all the rest without pausing and asking me any more
41633 + questions". P (Proceed) is a synonym for G.
41635 + 6.5. Commas in Macro Definitions
41637 + As noted in the [379]C-Kermit manual, comma is used to separate
41638 + commands in a macro definition. Even when the macro is defined on
41639 + multiple lines using curly-brace block-structure notation without
41640 + commas, the definition is still stored internally as a comma-separated
41641 + list of commands. Therefore special tricks are needed to include a
41642 + comma in a command. The classic example is:
41646 + if fail echo Sorry, blah failed...
41649 + This would result in Kermit trying to execute a "blah" command. This
41650 + could always be handled by enclosing the text in braces:
41654 + if fail echo {Sorry, blah failed...}
41657 + but doublequotes (more intuitive) should have worked too. Now they do:
41661 + if fail echo "Sorry, blah failed..."
41666 + As of version 8.0.201, C-Kermit on most platforms lets you access the
41667 + command history buffer with arrow keys, just as you always could with
41668 + control characters. The restrictions are:
41670 + 1. Only Up and Down arrow keys are accepted.
41671 + 2. Only 7-bit ANSI arrow-key sequences are understood (ESC followed
41672 + by [ or uppercase letter O, followed by uppercase letter A or (up)
41675 + This change was made to facilitate command recall in Linux-based PDAs
41676 + that don't have a Control key, or at least not one that's easily (or
41677 + always) accessible, such as the Sharp Zaurus SL5500.
41679 + [ [380]Top ] [ [381]Contents ] [ [382]C-Kermit Home ] [ [383]Kermit
41681 + __________________________________________________________________________
41683 +7. NEW COMMANDS AND SWITCHES
41685 + See [384]Section 4 for more about file scanning and the /TYPE: switch.
41687 + ASK[Q] [ /TIMEOUT:number /QUIET /DEFAULT:text ] variable [ prompt ]
41688 + The new optional /TIMEOUT: switch for ASK and ASKQ causes the
41689 + command to time out and and fail if no response is given within
41690 + the specified number of seconds, 1 or greater (0 or less means
41691 + no timeout, wait forever). This works just like SET ASK-TIMER,
41692 + except its effect is local to the ASK command with which it is
41693 + given and it does not disturb the global ask timer setting. The
41694 + new /QUIET switch tells Kermit not to print an error message if
41695 + the ASK or ASKQ command times out waiting for a response.
41697 + Version 8.0.211 adds the /DEFAULT:text switch for ASK-Class
41698 + commands (ASK, ASKQ, and GETOK). This lets you supply a default
41699 + answer in case the user supplies an empty answer or the
41700 + /TIMEOUT: switch was included and the time limit expired
41701 + without an answer. In both these cases, the command succeeds.
41704 + Equivalent to TYPE /NOPAGE.
41707 + Changes Kermit's local working directory to the parent of the
41708 + current one. Equivalent to "cd .." in UNIX or Windows, "cd [-]"
41709 + in VMS, "cd ^" in AOS/VS, etc; in other words, it's a
41710 + platform-independent way of moving one level up in a directory
41713 + CHMOD [ switches ] permission files
41714 + UNIX only. Sets file permissions for one or more files or
41715 + directories. The permission must be given as an octal number,
41716 + e.g. 664, 755. Switches: /DIRECTORIES, /FILES, /NOLIST, /PAGE,
41717 + /DOTFILES, /LIST, /NOPAGE, /RECURSIVE, /TYPE:{TEXT,BINARY,ALL},
41718 + /SIMULATE. The /TYPE: switch allows selection of only text or
41719 + binary files. For example, if you have a mixture of source
41720 + files and executables, you can use "chmod /files /type:text
41721 + 664" to give owner/group read/write and world read permission
41722 + to the text files, and "chmod /files /type:binary 775" to give
41723 + the same plus execute permission to the executables. Use
41724 + /SIMULATE to see which files would be affected, without
41725 + actually changing their permissions.
41727 + CLEAR KEYBOARD-BUFFER
41728 + Flushes any as-yet unread characters from the keyboard input
41729 + buffer. Useful for flushing typeahead in scripts.
41732 + When given at an interactive command prompt that was reached by
41733 + issuing a PROMPT command (described in this section) from a
41734 + script, this command returns to the script, continuing its
41735 + execution at the command after the PROMPT command. In this
41736 + context, CONTINUE is simply a more-intuitive synonym for END.
41738 + COPY, RENAME, and TRANSLATE
41739 + These commands now work on file groups if the target filename
41740 + is a directory, e.g. "copy oofa.* ..", "rename * ~olga/tmp/"
41742 + COPY /APPEND source destination
41743 + The source file specification can now include wildcards, in
41744 + which case all of the source files that match will go into the
41745 + destination file in alphabetical order by name.
41748 + Asks permission to delete each file before deleting it. In
41749 + C-Kermit 7.0, the answers were "yes" (or "ok") and "no".
41750 + C-Kermit 8.0 adds "go" (meaning, delete all the rest without
41751 + asking) and "quit" (cancel the DELETE command and return to the
41754 + DELETE /DIRECTORIES
41755 + Deletes not only files but also directories.
41757 + DELETE /RECURSIVE
41758 + Deletes all files that match the given file specification in
41759 + the current (or given) directory and all directories beneath
41763 + Prints only the number of files deleted and total size freed,
41764 + without listing each file.
41767 + Shorthand for DELETE /RECURSIVE /DIRECTORIES /DOTFILES/.
41768 + Equivalent to Windows DELTREE or Unix "rm -Rf". If no file
41769 + specification is given, the contents of the current directory,
41770 + plus all of its subdirectories and their contents, are deleted.
41772 + DELETE /TYPE:BINARY
41773 + Delete only regular binary files (requires FILE SCAN ON).
41775 + DELETE /TYPE:TEXT
41776 + Delete only regular text files (requires FILE SCAN ON).
41778 + DIRECTORY [ switches ] [ filespec [ filespec [ filespec ... ] ] ]
41779 + The DIRECTORY command now accepts more than one file
41780 + specification; e.g. "directory moon.txt sun.doc stars.*".
41782 + DIRECTORY /NORECURSIVE xxx
41783 + If xxx is a directory name, forces listing of the directory
41784 + itself rather than its contents.
41786 + DIRECTORY /FOLLOWLINKS xxx
41787 + (UNIX only) Tells the DIRECTORY command to follow symbolic
41788 + links. This not the default because it can cause endless loops.
41790 + DIRECTORY /NOFOLLOWLINKS xxx
41791 + (UNIX only) Tells the DIRECTORY command not to follow symbolic
41792 + links, but rather, merely to list them. This is the default.
41794 + DIRECTORY /OUTPUT:filename
41795 + Sends the results of the DIRECTORY command to the given file.
41797 + DIRECTORY /SUMMARY
41798 + Prints only the number of directories and files and the total
41799 + size, without listing each file.
41801 + DIRECTORY /TYPE:{TEXT,BINARY}
41802 + Shows only files of the selected type, based on file scan.
41804 + DIRECTORY /XFERMODE
41805 + Now shows results of file scan (see [385]Section 4).
41807 + FOPEN [ switches ] channel filename
41809 + As of version 8.0.211, FOPEN allows /dev/tty as a filename in
41810 + Unix-based operating systems.
41813 + (8.0.211) Trims any trailing blanks or tabs from the item (such
41814 + as a line of text) that it has read.
41817 + (8.0.211) Converts Horizontal Tab characters to the appropriate
41818 + number of spaces, based on VT100-like tab stops
41821 + GREP [ switches ] pattern files
41822 + Similar to Unix grep command: displays file lines that match
41823 + the given [386]pattern. Switches:
41825 + /COUNT[:variable]
41826 + Don't show the matching lines, just tell how many lines
41827 + match. If a variable name is specified, the count is
41828 + stored in the given variable.
41831 + Include files whose names begin with dot.
41834 + Show line numbers of matching lines.
41837 + only list the names of files that contain matching lines,
41838 + but not the lines themselves.
41841 + Skip backup files.
41844 + Ignore alphabetic case while pattern matching.
41847 + skip files whose names start with dot (period).
41850 + Suppress output but set SUCCESS or FAILURE according to
41854 + Look for lines that do not match the pattern.
41857 + Don't pause between screens of output.
41860 + Write results into the given file.
41863 + Pause between screens of output.
41866 + Search files in subdirectories too.
41868 + /TYPE:{TEXT,BINARY}
41869 + Search only files of the specified type.
41871 + Synonyms: FIND, SEARCH.
41873 + GETOK /TIMEOUT:n /QUIET /DEFAULT:text
41874 + The new /QUIET switch instructs GETOK, when given a timeout,
41875 + not to print an error message if it times out. As of 8.0.211, a
41876 + default answer can be supplied (see ASK).
41878 + HEAD [ switches ] filename
41879 + Equivalent to TYPE /HEAD [ other-switches ] filename.
41882 + Explains date-time formats, including timezone notation and
41886 + Explains the firewall negotiation capabilities of your version
41889 + KCD [ symbolic-directory-name ]
41890 + Changes Kermit's working directory to the named symbolic
41891 + directory, such as such as exedir, inidir, startup, download,
41892 + or and home. Type "kcd ?" for a list of symbolic directory
41893 + names known to your copy of Kermit, or give the new ORIENTATION
41894 + command for a more detailed explanation. If you give a KCD
41895 + command without a directory name, Kermit returns to its "home"
41896 + directory, which is determined in some way that depends on the
41897 + underlying operating system, but which you can redefine with
41898 + the (new) SET CD HOME command. Your home directory is shown by
41899 + SHOW CD and it's also the value of the \v(home) variable.
41902 + Displays the C-Kermit license.
41905 + When Kermit has a connection to a Kermit or FTP server, file
41906 + managment commands such as CD, DIRECTORY, and DELETE might be
41907 + intended for the local computer or the remote server. C-Kermit
41908 + 8.0.200 and earlier always executes these commands on the local
41909 + computer. If you want them executed by the remote server, you
41910 + have to prefix them with REMOTE (e.g. REMOTE CD) or use special
41911 + R-command aliases (e.g. RCD = REMOTE CD, RDIR = REMOTE DIR,
41912 + etc). But this feels unnatural to FTP users, who expect
41913 + unprefixed file management commands to be executed by the
41914 + remote server, rather than locally. C-Kermit 8.0.201 adds
41915 + automatic locus switching to present an FTP-like interface for
41916 + FTP connections and the normal Kermit interface for Kermit
41917 + connections, and a SET LOCUS command (described below) to
41918 + control whether or how this is done. For when LOCUS is REMOTE,
41919 + a new set of commands was added for local management: LCD
41920 + (Local CD), LDIR (Local DIR), etc. These are described below
41924 + Equivalent to TYPE /PAGE.
41927 + Displays symbolic directory names and the corresponding
41928 + variable names and values. The symbolic names, such as exedir,
41929 + inidir, startup, download, and home, can be used as arguments
41930 + to the new KCD command.
41933 + For use in a macro or command file: enters interactive command
41934 + mode within the current context ([387]Section 8.1). If the
41935 + optional text is included, the prompt is set to it. The text
41936 + can include variables, functions, etc, as in the SET PROMPT
41937 + command. They are evaluated each time the prompt is printed.
41938 + Unlike the SET PROMPT command, the text argument applies only
41939 + to the current command level. Thus you can have different
41940 + prompts at different levels.
41942 + REMOTE SET MATCH { DOTIFILE, FIFO } { ON, OFF }
41943 + Allows the client to tell the server whether wildcards sent to
41944 + the server should match dot files (files whose names begin with
41945 + period) or FIFOs (named pipes). See SET MATCH.
41947 + SET ATTRIBUTE RECORD-FORMAT { ON, OFF }
41948 + Allows control of the Kermit's Record-Format attribute. Set
41949 + this to OFF in case incoming file are refused due to unknown or
41950 + invalid record formats if you want to accept the file anyway
41951 + (and, perhaps, postprocess it to fix its record format).
41953 + SET CD HOME [ directory ]
41954 + Specifies the target directory for the CD and KCD commands,
41955 + when they are given without an argument, and also sets the
41956 + value of the \v(home) variable.
41958 + SET EXIT HANGUP { OFF, ON }
41959 + Normally ON, meaning that when Kermit exits, it also explicitly
41960 + hangs up the current SET LINE / SET PORT serial port according
41961 + to the current SET MODEM TYPE and SET MODEM HANGUP METHOD, and
41962 + closes the port device if it was opened by Kermit in the first
41963 + place (as opposed to inherited). SET EXIT HANGUP OFF tells
41964 + Kermit not to do this. This can't prevent the operating system
41965 + from closing the device when Kermit exits (and it's a "last
41966 + close") but if the port or modem have been conditioned to
41967 + somehow ignore the close and keep the connection open, at least
41968 + Kermit itself won't do anything explicit to hang it up or close
41971 + SET FILE EOF { CTRL-Z, LENGTH }
41972 + Specifies the end-of-file detection method to be used by
41973 + C-Kermit when sending and receiving text files, and in the TYPE
41974 + and similar text-file oriented commands. The normal and default
41975 + method is LENGTH. You can specify CTRL-Z when handling CP/M or
41976 + MS-DOS format text files, in which a Ctrl-Z (ASCII 26)
41977 + character within the file marks the end of the file.
41979 + SET FILE LISTSIZE number
41980 + Allocates space for the given number of filenames to be filled
41981 + in by the wildcard expander. The current number is shown by
41982 + SHOW FILE. If you give a command that includes a filename
41983 + containing a wildcard (such as "*") that matches more files
41984 + that Kermit's list has room for, you can adjust the list size
41985 + with this command.
41987 + SET FILE STRINGSPACE number
41988 + Allocates space for the given amount of filename strings for
41989 + use by the wildcard expander. The current number is shown by
41990 + SHOW FILE. The number is the total number of bytes of all the
41991 + file specifications that match the given wildcard.
41993 + If you need to process a bigger list of files than your computer
41994 + has memory for, you might be able use an external file list. The
41995 + Kermit SEND and the FTP PUT and GET commands accept a /LISTFILE:
41996 + switch, which gives the name of a file that contains the list of
41997 + files to be transferred. Example for UNIX:
41999 + !find . -print | grep / > /tmp/names
42000 + ftp put /update /recursive /listfile:/tmp/names
42002 + SET LOCUS { AUTO, LOCAL, REMOTE }
42003 + Added in C-Kermit 8.0.201. Sets the locus for unprefixed file
42004 + management commands such as CD, DIRECTORY, MKDIR, etc. When
42005 + LOCUS is LOCAL these commands act locally and a REMOTE (or R)
42006 + prefix (e.g. REMOTE CD, RCD, RDIR) is required to send file
42007 + management commands to a remote server. When LOCUS is REMOTE,
42008 + an L prefix is required to issue local file management commands
42009 + (e.g. LCD, LDIR). The word LOCAL can't be used as a prefix
42010 + since it is already used for declaring local variables. LOCUS
42011 + applies to all types of connections, and thus is orthogonal to
42012 + SET GET-PUT-REMOTE, which selects between Kermit and FTP for
42013 + remote file-transfer and management commands. The default LOCUS
42014 + is AUTO, which means we switch to REMOTE whenever an FTP
42015 + connection is made, and to LOCAL whenever a non-FTP connection
42016 + is made, and switch back accordingly whenever a connnection is
42017 + closed. So by default, Kermit behaves in its traditional manner
42018 + unless you make an FTP connection, in which case it acts like a
42019 + regular FTP client (but better :-) LOCUS applies to the
42020 + following commands:
42022 + Unprefixed Remote Local Description
42023 + CD (CWD) RCD LCD Change (Working) Directory
42024 + CDUP RCDUP LCDUP CD Up
42025 + PWD RPWD LPWD Print Working Directory
42026 + DIRECTORY RDIR LDIR Request a directory listinga
42027 + DELETE RDEL LDEL Delete (a) file(s)
42028 + RENEME RREN LREN Rename a file
42029 + MKDIR RMKDIR LMKDIR Create a directory
42030 + RMDIR RRMDIR LRMDIR Remove a directory
42032 + SET MATCH { DOTIFILE, FIFO } { ON, OFF }
42033 + Whether C-Kermit filename patterns (wildcards) should match
42034 + filenames that start with dot (period), or (Unix only) FIFOs
42035 + (named pipes). The defaults are to skip dotfiles in Unix but
42036 + match them elsewhere, and to skip FIFOs. Applies to both
42037 + interactive use and to server mode, when the server receives
42038 + wildcards, e.g. in a GET command. Also see REMOTE SET MATCH.
42040 + SET OPTIONS DIRECTORY /DOTFILES
42041 + Now works for server listings too (UNIX only). Give this
42042 + command prior to having Kermit enter server mode, and then it
42043 + will show files whose names begin with dot (period) when sent a
42044 + REMOTE DIRECTORY command.
42047 + (as well as the -q command-line option) Now applies also to:
42049 + + SET HOST connection progress messages.
42050 + + "Press the X or E key to cancel" file-transfer message.
42051 + + REMOTE CD response.
42052 + + REMOTE LOGIN response.
42054 + SET RECEIVE PERMISSIONS { ON, OFF }
42055 + Tells C-Kermit whether to set the permissions of incoming files
42056 + (received with Kermit protocol) from the permissions supplied
42057 + in the file's Attribute packet (if any). Normally ON. Also see
42058 + SET SEND PERMISSIONS.
42060 + SET ROOT directory
42061 + Like UNIX chroot, without requiring privilege. Sets the root
42062 + for file access, does not allow reference to or creation of
42063 + files outside the root, and can't be undone.
42065 + SET SEND PERMISSIONS { ON, OFF }
42066 + Tells C-Kermit whether to include file permissions in the
42067 + attributes it includes with each file when sending with Kermit
42068 + protocol. Also see SET RECEIVE PERMISSIONS.
42070 + SET TCP { HTTP-PROXY, SOCKS-SERVER } /USER:name /PASSWORD:text
42071 + These commands now allow specification of username and
42074 + SET TERMINAL . . .
42075 + (See [388]Section 12.)
42077 + SET TRANSFER MESSAGE [ text ]
42078 + Sets an initial text message to be displayed in the
42079 + file-transfer display. The transfer message is automatically
42080 + deleted once used, so must be set each time a message a
42081 + desired. Any variables in the message are evaluated at the time
42082 + the SET command is given. If the optional text is omitted, any
42083 + transfer message that is currently set is removed. Synonym: SET
42084 + XFER MSG. SHOW TRANSFER displays it if it has been set but not
42087 + SHOW COMMUNICATIONS
42088 + In C-Kermit 8.0, SHOW COMMUNICATIONS, when given in remote mode
42089 + (i.e. before any connection has been established), tells the
42090 + typical dialout device name for the particular platform on
42091 + which it's running (e.g. TXA0: for VMS, or /dev/cua0p0 for
42092 + HP-UX). On Unix platforms, it also tells the name of the
42093 + lockfile directory. This way, you have an idea of what the SET
42094 + LINE device name should look like, and if the SET LINE command
42095 + fails, you know the name of the directory or device that is
42096 + protected against you.
42098 + SHOW VARIABLES [ name [ name [ ... ] ] ]
42099 + In C-Kermit 8.0.201 you can request values of a list of
42100 + built-in (\v(xxx)) variables. Each name is a pattern, as
42101 + before, but now it a free pattern rather than an anchored one
42102 + (explained in [389]Section 8.12) so now "show var date time"
42103 + shows the values of all variables whose names include the
42104 + strings "date" or "time".
42106 + TAIL [ switches ] filename
42107 + Equivalent to TYPE /TAIL [ other-switches ] filename.
42109 + TRANSMIT /NOECHO [ other switches ] filename
42110 + The /NOECHO switch is equivalent to giving the command SET
42111 + TRANSMIT ECHO OFF prior to the TRANSMIT command, except the
42112 + switch affects only the command with which it was given and
42113 + does not affect the prevailing global setting.
42115 + TRANSMIT /NOWAIT [ other switches ] filename
42116 + The /NOWAIT switch is equivalent to giving the command SET
42117 + TRANSMIT PROMPT 0 prior to the TRANSMIT command, except the
42118 + switch affects only the command with which it was given and
42119 + does not affect the prevailing global setting.
42121 + TRANSMIT /NOWAIT /NOECHO /BINARY [ other switches ] filename
42122 + When the TRANSMIT command is given with the /NOWAIT, /NOECHO,
42123 + and /BINARY switches, this activates a special "blast the whole
42124 + file out the communications connection all at once" mode that
42125 + Kermit didn't have prior to version 8.0. There has been
42126 + increasing demand for this type of transmission with the advent
42127 + of devices that expect image (e.g. .JPG) or sound (e.g. .MP3)
42128 + files as raw input. The obvious question is: how does the
42129 + receiving device know when it has the whole file? This depends
42130 + on the device, of course; usually after a certain amount of
42131 + time elapses with nothing arriving, or else when Kermit hangs
42132 + up or closes the connection.
42134 + TYPE /CHARACTER-SET:name
42135 + Allows you to specify the character set in which the file to be
42136 + typed is encoded.
42139 + Adds line numbers.
42141 + TYPE /OUTPUT:filename
42142 + Sends the results of the TYPE command to the given file.
42144 + TYPE /TRANSLATE-TO:name
42145 + Used in conjunction with TYPE /CHARACTER-SET:xxx; allows you to
42146 + specify the character set in which the file is to be displayed.
42148 + TYPE /TRANSPARENT
42149 + Used to disable character-set translation in the TYPE command,
42150 + which otherwise can take place automatically based on file
42151 + scanning, even when /CHARACTER-SET and /TRANSLATE-TO switches
42155 + Parses the text, evaluating any backslash items in it (such as
42156 + function calls) but doesn't do anything further, except
42157 + possibly printing error messages. Useful for invoking functions
42158 + that have side effects without using or printing their direct
42159 + results, e.g. "void \fsplit(\%a,&a)".
42161 + Symbolic Links in UNIX
42163 + The UNIX versions of C-Kermit have had /FOLLOWLINKS and /NOFOLLOWLINKS
42164 + switches added to several commands to control the treatment of
42165 + symbolic links. Different commands deal differently with symbolic
42168 + Kermit SEND, FTP MPUT
42169 + /NOFOLLOWLINKS is the default, which means symbolic links are
42170 + skipped entirely. The alternative, /FOLLOWLINKS, should be used
42171 + with caution, since an innocent link might point to a whole
42172 + file system, or it might cause a loop. There is no way in
42173 + Kermit or FTP protocol to send the link itself. We either skip
42174 + them or follow them; we can't duplicate them.
42177 + /NOFOLLOWLINKS is the default, which means the DIRECTORY
42178 + command lists symbolic links in a way that shows they are
42179 + links, but it does not follow them. The alternative,
42180 + /FOLLOWLINKS, follows links and gives information about the
42181 + linked-to directories and files.
42184 + The DELETE command does not have link-specific switches. DELETE
42185 + never follows links. If you tell Kermit to delete a symbolic
42186 + link, it deletes the link itself, not the linked-to file. Ditto
42190 + The COPY command behaves just like the UNIX cp command; it
42191 + always follows links.
42194 + The RENAME command behaves just like the UNIX mv command; it
42195 + operates on links directly rather than following.
42197 + [ [390]Top ] [ [391]Contents ] [ [392]C-Kermit Home ] [ [393]Kermit
42199 + __________________________________________________________________________
42201 +8. OTHER SCRIPTING IMPROVEMENTS
42203 + 8.1. Performance and Debugging
42205 + A command cache for frequently used commands plus some related
42206 + optimizations increases the speed of compute-bound scripts by anywhere
42207 + from 50% to 1000%.
42209 + The new PROMPT command can be used to set breakpoints for debugging
42210 + scripts. If executed in a command file or macro, it gives you an
42211 + interactive command prompt in the current context of the script, with
42212 + all its variables, arguments, command stack, etc, available for
42213 + examination or change, and the ability to resume the script at any
42214 + point (END resumes it, Ctrl-C or STOP cancels it and returns to top
42217 + The new Ctrl-C trapping feature ([394]Section 8.14) lets you intercept
42218 + interruption of scripts. This can be used in combination with the
42219 + PROMPT command to debug scripts. Example:
42222 + echo INTERRUPTED BY CTRL-C...
42223 + echo The command stack has not yet been rolled back:
42225 + echo Type Ctrl-C again or use the END command to return to top level.
42229 + Adding this ON_CTRL definition to your script lets you interrupt it at
42230 + any point and get prompt that is issued at the current command level,
42231 + so you can query local variables, etc.
42233 + [ [395]Top ] [ [396]Contents ] [ [397]C-Kermit Home ] [ [398]Kermit
42235 + _________________________________________________________________
42237 + 8.2. Using Macros as Numeric Variables
42239 + A macro is a way to assign a value to a name, and then use the name to
42240 + refer to the value. Macros are used in two ways in Kermit: as
42241 + "subroutines" or functions composed of Kermit commands, which are
42242 + executed, or as variables to hold arbitrary values -- text, numbers,
42245 + When a macro is to be executed, its name is given as if it were a
42246 + C-Kermit command, optionally preceded by the word "do". When a macro
42247 + is used as a variable, it must be "escaped" with \m(xxx) (or
42248 + equivalent function, e.g. \s(xxx), \:(xxx), \fdefinition(xxx)), where
42249 + xxx is the macro name, for example:
42251 + define filename /usr/olga/oofa.txt
42252 + send \m(filename)
42254 + Of course variables can also hold numbers:
42257 + declare \&a[\m(size)]
42260 + if ( == \m(index) 3 ) echo The third value is: \&a[\m(index)]
42261 + evaluate index (\m(index) * 4)
42262 + if ( > \m(index) \m(size) ) echo Out of range!
42264 + But these are contexts in which only numbers are valid. C-Kermit 8.0
42265 + has been changed to treat non-escaped non-numeric items in strictly
42266 + numeric contexts as macro names. So it is now possible (but not
42267 + required) to omit the \m(...) notation and just use the macro name in
42271 + declare \&a[size]
42274 + if ( == index 3 ) echo The third value is: \&a[index]
42275 + evaluate index (index * 4)
42276 + if ( > index size ) echo Out of range!
42278 + This is especially nice for loops that deal with arrays. Here, for
42279 + example, is a loop that reverses the order of the elements in an
42280 + array. Whereas formerly it was necessary to write:
42282 + .\%n ::= \fdim(&a)
42283 + for \%i 1 \%n/2 1 {
42284 + .tmp := \&a[\%n-\%i+1]
42285 + .\&a[\%n-\%i+1] := \&a[\%i]
42286 + .\&a[\%i] := \m(tmp)
42289 + Recoding this to use macro names "i" and "n" instead of the backslash
42290 + variables \%i and \%n, we have:
42294 + .tmp := \&a[n-i+1]
42295 + .\&a[n-i+1] := \&a[i]
42296 + .\&a[i] := \m(tmp)
42299 + which reduces the backslash count to less than half. The final
42300 + statement in the loop could be written ".\&a[i] ::= tmp" if the array
42301 + contained only numbers (since ::= indicates arithmetic expression
42304 + Also, now you can use floating-point numbers in integer contexts (such
42305 + as array subscripts), in which case they are truncated to an integer
42306 + value (i.e. the fractional part is discarded).
42308 + Examples of numeric contexts include:
42310 + * Array subscripts.
42311 + * Any numeric function argument.
42312 + * Right-hand side of ::= assignments.
42313 + * EVALUATE command or \fevaluate() function expression.
42314 + * The INCREMENT or DECREMENT by-value.
42315 + * IF =, >, <, !=, >=, and <= comparands.
42316 + * The IF number construct.
42317 + * FOR-loop variables.
42318 + * STOP, END, and EXIT status codes.
42319 + * The INPUT timeout value.
42320 + * PAUSE, WAIT, SLEEP, MSLEEP intervals.
42321 + * The SHIFT argument.
42322 + * Numeric switch arguments, e.g. TYPE /WIDTH:number, SEND
42324 + * SCREEN MOVE-TO row and column number.
42325 + * Various SET DIAL parameters (timeout, retry limit, etc).
42326 + * Various SET SEND or RECEIVE parameters (packet length, window
42328 + * Various other SET parameters.
42332 + * S-Expressions (explained in [399]Section 9).
42334 + Macro names used in numeric contexts must not include mathematical
42335 + operators. Although it is legal to create a macro called "foo+bar", in
42336 + a numeric context this would be taken as the sum of the values of
42337 + "foo" and "bar". Any such conflict can be avoided, of course, by
42338 + enclosing the macro name in \m(...).
42340 + [ [400]Top ] [ [401]Contents ] [ [402]C-Kermit Home ] [ [403]Kermit
42342 + _________________________________________________________________
42344 + 8.3. New IF Conditions
42346 + Several new IF conditions are available:
42348 + IF DECLARED arrayname
42349 + Explained in [404]Section 8.6.
42352 + Allows a script to test whether a key was pressed without
42353 + actually trying to read it.
42355 + IF KERBANG (Unix only)
42356 + True if Kermit was started from a Kerbang script. This is
42357 + useful for knowing how to interpret the \&@[] and \&_[]
42358 + argument vector arrays, and under what conditions to exit.
42361 + This is just a synonym for IF NUMERIC, which is true if n
42362 + contains only digits (or, if n is a variable, its value
42363 + contains only digits).
42365 + By contrast, IF FLOAT n succeeds if n is a floating-point number OR an
42366 + integer (or a variable with floating-point or integer value).
42367 + Therefore, IF FLOAT should be used whenever any kind of number is
42368 + acceptable, whereas IF INTEGER (or IF NUMERIC) when only an integer
42371 + [ [405]Top ] [ [406]Contents ] [ [407]C-Kermit Home ] [ [408]Kermit
42373 + _________________________________________________________________
42375 + 8.4. The ON_UNKNOWN_COMMAND Macro
42377 + The new ON_UNKNOWN_COMMAND macro, if defined, is executed whenever you
42378 + give a command that is not known to C-Kermit; any operands are passed
42379 + as arguments. Here are some sample definitions:
42381 + DEF ON_UNKNOWN_COMMAND telnet \%1 ; Treat unknown commands as hostnames
42382 + DEF ON_UNKNOWN_COMMAND dial \%1 ; Treat unknown commands phone numbers
42383 + DEF ON_UNKNOWN_COMMAND take \%1 ; Treat unknown commands as filenames
42384 + DEF ON_UNKNOWN_COMMAND !\%* ; Treat unknown commands as shell commands
42386 + The ON_CD macro, if defined, is executed whenever Kermit is given a CD
42387 + (change directory) command (8.0.211). Upon entry to this macro, the
42388 + directory has already changed and the new directory string is
42389 + available in the \v(directory) variable, and also as the first
42392 + [ [409]Top ] [ [410]Contents ] [ [411]C-Kermit Home ] [ [412]Kermit
42394 + _________________________________________________________________
42396 + 8.5. The SHOW MACRO Command
42398 + The SHOW MACRO command has been changed to accept more than one macro
42401 + (setq a 1 b 2 c 3)
42407 + An exact match is required for each name (except that case doesn't
42408 + matter). If you include wildcard characters, however, a pattern match
42413 + shows all macros whose names start with a, b, or c, and end with x.
42415 + [ [413]Top ] [ [414]Contents ] [ [415]C-Kermit Home ] [ [416]Kermit
42417 + _________________________________________________________________
42421 + A clarification regarding references to array names (as opposed to
42422 + array elements): You can use array-name "abbreviations" like &a only
42423 + in contexts that expect array names, like ARRAY commands or array-name
42424 + function arguments such as the second argument of \fsplit(). In a
42425 + LOCAL statement, however, you have to write \&a[], since "local &a"
42426 + might refer to a macro named "&a".
42428 + In function arguments, however, you MUST use the abbreviated form:
42429 + \fsplit(\%a,&a) or \fsplit(\%a,&a[]). If you include the backslash (as
42430 + in "\fsplit(\%a,\&a[])") a parse error occurs.
42432 + Here are the new array-related commands:
42434 + IF DECLARED arrayname
42435 + Allows a script to test whether an array has been declared. The
42436 + arrayname can be a non-array backslash variable such as \%1 or
42437 + \m(name), in which case it is evaluated first, and the result
42438 + is treated as the array name. Otherwise, arrayname is treated
42439 + as in the ARRAY commands: it can be a, &a, &a[], \&a, \&a[],
42440 + \&a[3], \&a[3:9], etc, with the appropriate results in each
42441 + case. Synonym: IF DCL.
42443 + UNDECLARE arrayname
42444 + UNDECLARE is a new top-level command to undeclare an array.
42445 + Previously this could only be done with "declare \&a[0]" (i.e.
42446 + re-declare the array with a dimension of 0).
42448 + ARRAY LINK linkname arrayname
42449 + Creates a symbolic link from the array named by linkname (which
42450 + must be the name of an array that is not yet declared in the
42451 + current context) to the array named by arrayname (which must
42452 + the name of a currently declared array that is not itself a
42453 + link, or a variable containing the name of such an array). The
42454 + two names indicate the same array: if you change an array
42455 + element, the change is reflected in the link too, and vice
42456 + versa. If you undeclare the link, the real array is unaffected.
42457 + If you undeclare the real array, all links to it disappear. If
42458 + you resize an array (directly or through a link), all links to
42459 + it are updated automatically.
42461 + Array links let you pass array names as arguments to macros. For
42462 + example, suppose you had a program that needed to uppercase all the
42463 + elements of different arrays at different times. You could write a
42464 + macro to do this, with the array name as an argument. But without
42465 + array links, there would be no way to refer to the argument array
42466 + within the macro. Array links make it easy:
42468 + define arrayupper {
42470 + array link \&e[] \%1
42471 + for i 1 \fdim(&e) 1 { .\&e[i] := \fupper(\&e[i]) }
42473 + declare \&a[] = these are some words
42477 + The macro declares the array link LOCAL, which means it doesn't
42478 + conflict with any array of the same name that might exist outside the
42479 + macro, and that the link is destroyed automatically when the macro
42480 + exits. This works, by the way, even if the link name and the macro
42481 + argument name are the same, as long as the link is declared LOCAL.
42483 + As noted, you can't make a link to a nonexistent array. So when
42484 + writing a macro whose job is to create an array whose name is passed
42485 + as an argument, you must declare the array first (the size doesn't
42486 + matter as long as it's greater than 0). Example:
42488 + define tryme { ; Demonstration macro
42489 + local \&e[] ; We only need this inside the macro
42490 + array link \&e[] \%1 ; Make local link
42491 + shift ; Shift argument list
42492 + void \fsplit(\%*,&e) ; Split remainder of arg list into array
42494 + declare \&a[1] ; Declare target array in advance
42495 + tryme &a here are some words ; Invoke the macro with array name and words
42496 + show array a ; See the results
42498 + One final improvement allows the macro itself to declare the array
42499 + (this was not possible in earlier Kermit releases): if the array name
42500 + in the DECLARE command is a variable (and not an array name), or
42501 + includes variables, the resulting value is used as the array name. So:
42503 + define tryme { ; Demonstration macro
42504 + declare \%1[1] ; Preliminary declaration for target array
42505 + local \&e[] ; We only need this inside the macro
42506 + array link \&e[] \%1 ; Make local link
42507 + shift ; Shift argument list
42508 + void \fsplit(\%*,&e) ; Split remainder of arg list into array
42510 + tryme &a here are some words ; Invoke the macro with array name and words
42511 + show array a ; See the results
42513 + The SHOW ARRAY command now indicates whether an array name is a link.
42515 + Also see the descriptions of [417]\fjoin() and [418]\fsplit(), plus
42516 + [419]Section 8.10 on the MINPUT command, which shows how an entire
42517 + array (or segment of it) can be used as the MINPUT target list.
42519 + [ [420]Top ] [ [421]Contents ] [ [422]C-Kermit Home ] [ [423]Kermit
42521 + _________________________________________________________________
42523 + 8.7. New or Improved Built-in Variables and Functions
42525 + The following new built-in variables are available:
42527 + \v(buildid) A date string like "20000808" indicating when C-Kermit was
42529 + \v(ftime) Current time, secs since midnight, including fraction of se
42531 + \v(iprompt) The current SET PROMPT value
42532 + \v(sexp) The most recent S-Expression (see [424]Section 9)
42533 + \v(sdepth) The current S-Expression invocation depth ([425]Section 9)
42534 + \v(svalue) The value of the most recent S-Expression ([426]Section 9)
42536 + \v(ftp_code) Most recent FTP response code ([427]Section 3)
42537 + \v(ftp_connected) FTP connection status ([428]Section 3)
42538 + \v(ftp_cpl) FTP Command Protection Level ([429]Section 3.2)
42539 + \v(ftp_dpl) FTP Data Protection Level ([430]Section 3.2)
42540 + \v(ftp_getputremote) The current SET GET-PUT-REMOTE setting ([431]Section 3.8
42542 + \v(ftp_host) Name or IP address of FTP server ([432]Section 3)
42543 + \v(ftp_loggedin) FTP login status ([433]Section 3)
42544 + \v(ftp_message) Most recent FTP response message ([434]Section 3)
42545 + \v(ftp_security) FTP Security method ([435]Section 3.2)
42546 + \v(ftp_server) OS type of FTP server ([436]Section 3)
42548 + \v(http_code) Most recent HTTP response code
42549 + \v(http_connected) HTTP connection status
42550 + \v(http_host) Name or IP address of HTTP server
42551 + \v(http_message) Most recent HTTP response message
42552 + \v(http_security) TLS cipher used to secure the HTTP session
42554 + \v(hour) Hour of the day, 0 to 23.
42555 + \v(timestamp) Equivalent to "\v(ndate) \v(time)".
42557 + \v(log_debug) Current debug log file, if any.
42558 + \v(log_packet) Current packet log file, if any.
42559 + \v(log_session) Current session log file, if any.
42560 + \v(log_transaction) Current transaction log file, if any.
42561 + \v(log_connection) Current connection log file, if any.
42563 + The following new or improved built-in functions are available:
42565 + \fcmdstack() Allows programmatic access to the command stack.
42566 + \fcvtdate() [437]Section 8.13, format options added
42567 + \fdelta2secs() [438]Section 8.13
42568 + \fdostounixpath(s1) Converts a DOS filename to Unix format.
42569 + \fsplit() Now allows grouping/nesting in source string.
42570 + \fword() Allows the same grouping and nesting.
42571 + \fjoin(&a,s1,n1,n2) Copies an array into a single string.
42572 + \fsubstitute(s1,s2,s3) Substitutes characters within a string.
42573 + \freplace() Has new 4th "occurrence" argument.
42574 + \fsexpression() Evaluates an S-Expression (explained in [439]Section
42576 + \ftrim(), \fltrim() Now trim CR and LF by default, as well as SP and Tab.
42577 + \funixtodospath(s1) Converts a Unix filename to DOS format.
42578 + \fkeywordval(s1,c1) Assigns values to keywords (macros) (explained below)
42581 + Most functions that have "2" in their names to stand for the word "to"
42582 + can now also be written with "to", e.g. "\fdelta2secs(),"
42583 + \fdeltatosecs()."
42585 + \funtabify(string)
42586 + (New to 8.0.211) Replaces Horizontal Tab characters in the
42587 + given string with spaces based on VT100-like tab stops.
42589 + \fverify(s1,s2,n)
42590 + As of version 8.0.211, returns -1 if s2 is an empty string.
42591 + Previously it returned 0, making \fverify(abc,\%a) look as if
42592 + \%a was a string combosed of a's, b's, and/or c's when in fact
42593 + it contained nothing.
42596 + As of version 8.0.211, returns 0 if string is empty or missing.
42597 + Previously it returned the empty string, which made it unsafe
42598 + to use in arithmetic or boolean expressions.
42601 + New to version 8.0.211, its value is the INPUT SCALE-FACTOR
42602 + ([440]Section 8.10), default 1.0.
42604 + 8.7.1. The \fkeywordval() Function
42606 + \fkeywordval(s1,c1) is new to C-Kermit 8.0. Given a string s1 of the
42607 + form "name=value", it creates a macro with the given name and assigns
42608 + it the given value. If no value appears after the equal sign, any
42609 + existing macro of the given name is undefined. Blanks are
42610 + automatically trimmed from around the name and value. The optional c1
42611 + parameter is the assignment operator character, equal sign (=) by
42612 + default. This function is handy for processing keyword parameters or
42613 + any other form of parameter-value pair. Suppose, for example, you want
42614 + to write a macro that accepts keyword parameters rather than
42618 + local \%i modem hangup method device speed number
42619 + def number 5551234 ; Assign default parameter values
42621 + def modem usrobotics
42625 + for \%i 1 \v(argc)-1 1 { ; Parse any keyword parameters...
42626 + if not \fkeywordval(\&_[\%i]) end 1 Bad parameter: "\&_[\%i]"
42628 + set dial country \m(country)
42629 + set modem type \m(modem)
42630 + set modem hang \m(hangup)
42631 + set dial method \m(tone)
42632 + set line \m(device)
42634 + set speed \m(speed)
42637 + set dial display on
42639 + if success connect
42642 + In this example, all the defaults are set up inside the macro, and
42643 + therefore it can be invoked with no parameters at all. But if you want
42644 + to have the macro dial a different number, you can supply it as
42647 + mydial number=7654321
42649 + You can supply any number of keyword parameters, and you can give them
42652 + mydial number=7654321 hangup=modem speed=115200
42654 + 8.7.2. The \fsplit(), \fjoin(), and \fword() Functions
42656 + \fjoin(&a,s1,n1,n2) is also new; it creates a string from an array (or
42657 + a piece of one). &a is the name of the array (a range specifier can be
42658 + included); s1 is a character or string to separate each element in the
42659 + result string (can be omitted, in which case the elements are not
42660 + separated at all), and n1 is a grouping mask, explained below. If s1
42661 + is empty or not specified, the array elements are separated with
42662 + spaces. If you want the elements concatenated with no separator,
42663 + include a nonzero n2 argument. Given the array:
42665 + declare \&a[] = 0 1 2 3 4 5 6 7 8 9
42667 + you can get effects like this:
42669 + \fjoin(&a) 0 1 2 3 4 5 6 7 8 9
42670 + \fjoin(&a,:) 0:1:2:3:4:5:6:7:8:9
42671 + \fjoin(&a,{,}) 0,1,2,3,4,5,6,7,8,9
42672 + \fjoin(&a,...) 0...1...2...3...4...5...6...7...8...9
42673 + \fjoin(&a,,,1) 0123456789
42675 + \fsplit(), \fword(), \fstripb(), and \fjoin() accept a "grouping mask"
42676 + argument, n1, which is a number from 0 to 63, in which:
42678 + 1 = "" doublequotes
42680 + 4 = '' singlequotes
42681 + 8 = () parentheses
42682 + 16 = [] square brackets
42683 + 32 = <> angle brackets
42685 + These can be OR'd (added) together to make any number 0-63 (-1 is
42686 + treated the same as 63, 0 means no grouping). If a bit is on, the
42687 + corresponding kind of grouping is selected. (If more than 1 bit is set
42688 + for \fjoin(), only the lowest-order one is used.)
42690 + If you include the same character in the grouping mask and the include
42691 + list, the grouping mask takes precedence. Example:
42693 + def \%a a "b c d" e
42694 + \fsplit(\%a,&a[],,,-1) = 3 <-- doublequote used for grouping
42695 + \fsplit(\%a,&a[],,",-1) = 3 <-- doublequote still used for grouping
42697 + Nesting of matched left and right grouping characters (parentheses,
42698 + braces, and brackets, but not quotes) is recognized. Example:
42700 + def \%a a (b c <d e [f g {h i} j k] l m> n o) p
42701 + \fsplit(\%a,&a,,,0) = 16 (no grouping)
42702 + \fsplit(\%a,&a,,,2) = 15 (braces only)
42703 + \fsplit(\%a,&a,,,16) = 11 (square brackets only)
42704 + \fsplit(\%a,&a,,,32) = 7 (angle brackets only)
42705 + \fsplit(\%a,&a,,,63) = 3 (all)
42706 + \fsplit(\%a,&a,,,-1) = 3 (all)
42708 + \fsplit() and \fjoin() are "reciprocal" functions. You can split a
42709 + string up into an array and join it back into a new string that is
42710 + equivalent, as long as \fsplit() and \fjoin() are given equivalent
42711 + grouping masks, except that the type of braces might change. Example:
42713 + def \%a a {b c [d e] f g} "h i" j <k l> m
42714 + echo STRING=[\%a]
42715 + echo WORDS=\fsplit(\%a,&a,,,-1)
42717 + asg \%b \fjoin(&a,{ },2)
42719 + echo WORDS=\fsplit(\%b,&b,,,-1)
42722 + The arrays a and b are identical. The strings a and b are as follows:
42724 + \%a: a {b c [d e] f g} "h i" j <k l> m
42725 + \%b: a {b c [d e] f g} {h i} j {k l} m
42727 + It is possible to quote separator grouping characters with backslash
42728 + to override their grouping function. And of course to include
42729 + backslash itself in the string, it must be quoted too. Furthermore,
42730 + each backslash must be doubled, so the command parser will still pass
42731 + one backslash to \fsplit() for each two that it sees. Here are some
42732 + examples using \fsplit() with a grouping mask of 8 (treat parentheses
42733 + as grouping characters).
42739 + a b \\(c d e\\) f 6
42740 + a b \\\\(c d e\\\\) f 7
42742 + \fsplit() has also been changed to create its array (if one is given)
42743 + each time it is called, so now it can be conveniently called in a loop
42744 + without having to redeclare the array each time.
42746 + Incidentally... Sometimes you might want to invoke \fsplit() in a
42747 + situation where you don't care about its return value, e.g. when you
42748 + just want to fill the array. Now you can "call" \fsplit() or any other
42749 + function with the new [441]VOID command:
42751 + void \fsplit(\%a,&a)
42753 + \fsplit() and \fjoin() also accept a new, optional 6th argument, an
42754 + options flag, a number that can specify a number of options. So far
42755 + there is just one option, whose value is 1:
42758 + Normally separators are collapsed. So, for example,
42760 + \fword(Three little words,2)
42762 + returns "little" (the second word). Space is a separator, but
42763 + there are multiple spaces between each word. If the value 1 is
42764 + included in the option flag, however, each separator counts. If
42765 + two separators are adjacent, an empty word is produced between
42766 + them. This is useful for parsing (e.g.) comma-separated lists
42767 + exported from databases or spreadsheets.
42769 + 8.7.3. The \fcmdstack() Function
42771 + The new \fcmdstack() function gives access to the command stack:
42773 + \fcmdstack(n1,n2)
42774 + Arguments: n1 is the command stack level. If omitted, the
42775 + current level, \v(cmdlevel), is used. n2 is a function code
42776 + specifying the desired type of information:
42778 + 0 (default) = name of object at level n1.
42779 + 1 (nonzero) = object type (0 = prompt; 1 = command file; 2 = macro).
42781 + The default for n2 is 0.
42783 + The name associated with prompt is "(prompt)". Here's a loop that can
42784 + be included in a macro or command file to show the stack (similar to
42785 + what the SHOW STACK command does):
42787 + for \%i \v(cmdlevel) 0 -1 {
42788 + echo \%i. [\fcmdstack(\%i,1)] \fcmdstack(\%i,0)
42791 + In this connection, note that \v(cmdfile) always indicates the most
42792 + recently invoked active command file (if any), even if that file is
42793 + executing a macro. Similarly, \v(macro) indicates the most recently
42794 + invoked macro (if any), even if the current command source is not a
42795 + macro. The name of the "caller" of the currently executing object
42796 + (command file or macro) is:
42798 + \fcmdstack(\v(cmdlevel)-1)
42802 + \fcmdstack(\v(cmdlevel)-1,1)
42804 + To find the name of the macro that invoked the currently executing
42805 + object, even if one or more intermediate command files (or prompting
42806 + levels) are involved, use a loop like this:
42808 + for \%i \v(cmdlevel)-1 0 -1 {
42809 + if = \fcmdstack(\%i,1) 2 echo CALLER = \fcmdstack(\%i,0)
42812 + Of course if you make a macro to do this, the macro must account for
42813 + its own additional level:
42816 + for \%i \v(cmdlevel)-2 0 -1 {
42817 + if = \fcmdstack(\%i,1) 2 return \fcmdstack(\%i,0)
42822 + The built-in variable \v(cmdsource) gives the current command source
42823 + as a word ("prompt", "file", or "macro").
42825 + 8.7.4. The VOID Command
42827 + VOID is like ECHO in that all functions and variables in its argument
42828 + text are evaluated. but it doesn't print anything (except possibly an
42829 + error message if a function was invocation contained or resulted in
42830 + any errors). VOID sets FAILURE if it encounters any errors, SUCCESS
42833 + [ [442]Top ] [ [443]Contents ] [ [444]C-Kermit Home ] [ [445]Kermit
42835 + _________________________________________________________________
42837 + 8.8. The RETURN and END Commands
42839 + The execution of a macro is terminated in any of the following ways:
42841 + * With an END [ number [ message ] ] command. If a number is given,
42842 + the macro succeeds if the number is 0, and fails if it is not
42843 + zero; if a number is not given, the macro succeeds.
42844 + * With a STOP command, which works just like END except it peels
42845 + back the command stack all the way to top level.
42846 + * With a RETURN [ text ] command, in which case the macro always
42848 + * By running out of commands to execute, in which case the macro
42849 + succeeds or fails according the most recently executed command
42850 + that sets success or failure.
42852 + The same considerations apply to command files invoked by the TAKE
42855 + If a macro does not execute any commands that set success or failure,
42856 + then invoking the macro does not change the current SUCCESS/FAILURE
42857 + status. It follows, then, that the mere invocation of a macro does not
42858 + change the SUCCESS/FAILURE status either. This makes it possible to
42859 + write macros to react to the status of other commands (or macros), for
42864 + stop 1 SET LINE failed - please try another device.
42866 + set modem type usrobotics
42867 + set line /dev/cua0
42872 + By the way, none of this is news. But it was not explicitly documented
42873 + before, and C-Kermit 7.0 and earlier did not always handle the RETURN
42874 + statement as it should have.
42876 + [ [446]Top ] [ [447]Contents ] [ [448]C-Kermit Home ] [ [449]Kermit
42878 + _________________________________________________________________
42880 + 8.9. UNDEFINing Groups of Variables
42882 + The UNDEFINE command, which previously accepted one variable name, now
42883 + accepts a list of them, and also accepts wildcard notation to allow
42884 + deletion of variables that match a given pattern.
42886 + UNDEFINE [ switches ] name [ name [ name [ ... ] ] ]
42887 + Undefines the variables whose names are given. Up to 64 names
42888 + may be given in one UNDEFINE command.
42890 + If you omit the switches and include only one name, the UNDEFINE
42891 + command works as before.
42893 + Switches include:
42896 + Specifies that the names given are to treated as patterns
42897 + rather than literal variable names. Note: pattern matching
42898 + can't be used with array references; use the ARRAY command to
42899 + manipulate arrays and subarrays.
42902 + List the name of each variable to be undefined, and whether it
42903 + was undefined successfully ("ok" or "error"), plus a summary
42904 + count at the end.
42907 + List the names of the variables that would be deleted without
42908 + actually deleting them. Implies /LIST.
42910 + The UNDEFINE command fails if there were any errors and succeeds
42913 + The new _UNDEFINE command is like UNDEFINE, except the names are
42914 + assumed to be variable names themselves, which contain the names (or
42915 + parts of them) of the variables to be undefined. For example, if you
42916 + have the following definitions:
42919 + define foo This is some text
42925 + undefines the variable \%a, but:
42929 + undefines the macro foo.
42931 + Normal Kermit patterns are used for matching; metacharacters include
42932 + asterisk, question mark, braces, and square brackets. Thus, when using
42933 + the /MATCHING switch, if the names of the macros you want to undefine
42934 + contain any of these characters, you must quote them with backslash to
42935 + force them to be taken literally. Also note that \%* is not the name
42936 + of a variable; it is a special notation used within a macro for "all
42937 + my arguments". The command "undef /match \%*" deletes all \%x
42938 + variables, where x is 0..9 and a..z. Use "undef /match \%[0-9]" to
42939 + delete macro argument variables or "undef /match \%[i-n]" to delete a
42940 + range of \%x variables.
42942 + [ [450]Top ] [ [451]Contents ] [ [452]C-Kermit Home ] [ [453]Kermit
42944 + _________________________________________________________________
42946 + 8.10. The INPUT and MINPUT Commands
42948 + As of C-Kermit 8.0.211, the INPUT and MINPUT commands accept a switch:
42950 + [M]INPUT /NOMATCH timeout
42951 + The /NOMATCH switch allows INPUT or MINPUT to read incoming
42952 + material for the specified amount of time, without attempting
42953 + to match it with any text or patterns. When this switch is
42954 + included, the [M]INPUT command succeeds when the timeout
42955 + interval expires, with \v(instatus) set to 1, meaning "timed
42956 + out", or fails upon interruption or i/o error.
42958 + Also in version 8.0.211, there is a new way to apply a scale factor to
42959 + [M]INPUT timeouts:
42961 + SET INPUT SCALE-FACTOR floating-point-number
42962 + This scales all [M]INPUT timeouts by the given factor, allowing
42963 + time-sensitive scripts to be adjusted to changing conditions
42964 + such as congested networks or different-speed modems without
42965 + having to change each INPUT-class command. This affects only
42966 + those timeouts that are given in seconds, not as wall-clock
42967 + times. Although the scale factor can have a fractional part,
42968 + the INPUT timeout is still an integer. The new built-in
42969 + variable \v(inscale) tells the current INPUT SCALE-FACTOR.
42971 + The MINPUT command can be used to search the incoming data stream for
42972 + several targets simultaneously. For example:
42974 + MINPUT 8 one two three
42976 + waits up to 8 seconds for one of the words "one", "two", or "three" to
42977 + arrive. Words can be grouped to indicate targets that contain spaces:
42979 + MINPUT 8 nineteeen twenty "twenty one"
42981 + And of course you can also use variables in place of (or as part of)
42982 + the target names:
42984 + MINPUT 8 \%a \&x[3] \m(foo)
42986 + Until now you had to know the number of targets in advance when
42987 + writing the MINPUT statement. Each of the examples above has exactly
42990 + But suppose your script needs to look for a variable number of
42991 + targets. For this you can use arrays and \fjoin(), described in
42992 + [454]Section 8.7. Any number of \fjoin() invocations can be included
42993 + in the MINPUT target list, and each one is expanded into the
42994 + appropriate number of separate targets each time the MINPUT command is
42995 + executed. Example:
42997 + declare \&a[10] = one two three
42998 + minput 10 foo \fjoin(&a) bar
43000 + This declares an array of ten elements, and assigns values to the
43001 + first three of them. The MINPUT command looks for these three (as well
43002 + as the words "foo" and "bar"). Later, if you assign additional
43003 + elements to the array, the same MINPUT command also looks for the new
43006 + If an array element contains spaces, each word becomes a separate
43007 + target. To create one target per array element, use \fjoin()'s
43008 + grouping feature:
43010 + dcl \&a[] = {aaa bbb} {ccc ddd} {xxx yyy zzz}
43012 + minput 10 \fjoin(&a) <-- 7 targets
43013 + minput 10 \fjoin(&a,,2) <-- 3 targets
43015 + [ [455]Top ] [ [456]Contents ] [ [457]C-Kermit Home ] [ [458]Kermit
43017 + _________________________________________________________________
43019 + 8.11. Learned Scripts
43021 + C-Kermit now includes a simple script recorder that monitors your
43022 + commands, plus your actions during CONNECT mode, and automatically
43023 + generates a script program that mimics what it observed. You should
43024 + think of this feature as a script-writing ASSISTANT since, as you will
43025 + see [459]later in this section, the result generally needs some
43026 + editing to make it both secure and flexible. The script recorder is
43027 + controlled by the new LEARN command:
43029 + LEARN [ /ON /OFF /CLOSE ] [ filename ]
43030 + If you give a filename, the file is opened for subsequent
43031 + recording. The /ON switch enables recording to the current file
43032 + (if any); /OFF disables recording. /CLOSE closes the current
43033 + script recording file (if any). If you give a filename without
43034 + any switches, /ON is assumed.
43036 + The /OFF and /ON switches let you turn recording off and on during a
43037 + session without closing the file.
43041 + * All commands that you type (or recall) at the prompt are recorded
43042 + in the file except:
43043 + + LEARN commands are not recorded.
43044 + + The CONNECT command is not recorded.
43045 + + The TELNET command is converted to SET HOST /NETWORK:TCP.
43046 + * Commands obtained from macros or command files are not recorded.
43047 + * During CONNECT:
43048 + + Every line you type is converted to an OUTPUT command.
43049 + + The last prompt before any line you type becomes an INPUT
43051 + + Timeouts are calculated automatically for each INPUT command.
43052 + + A PAUSE command is inserted before each OUTPUT command just
43055 + Thus the script recorder is inherently line-oriented. It can't be used
43056 + to script character-oriented interactions like typing Space to a
43057 + "More?" prompt or editing a text file with VI or EMACS.
43059 + But it has advantages too; for example it takes control characters
43060 + into account that might not be visible to you otherwise, and it
43061 + automatically converts control characters in both the input and output
43062 + streams to the appropriate notation. It can tell, for example that the
43063 + "$ " prompt on the left margin in UNIX is really {\{13}\{10}$ },
43064 + whereas in VMS it might be {\{13}\{10}\{13}$ }. These sequences are
43065 + detected and recorded automatically.
43067 + A learned script should execute correctly when you give a TAKE command
43068 + for it. However, it is usually appropriate to edit the script a bit.
43069 + The most important change would be to remove any passwords from it.
43070 + For example, if the script contains:
43072 + INPUT 9 {\{13}\{10}Password: }
43073 + IF FAIL STOP 1 INPUT timeout
43075 + OUTPUT bigsecret\{13}
43077 + you should replace this by something like:
43079 + INPUT 9 {\{13}\{10}Password: }
43080 + IF FAIL STOP 1 INPUT timeout
43081 + ASKQ pswd Please type your password:
43083 + OUTPUT \m(pswd)\{13}
43085 + The LEARN command can't do this for you since it knows nothing about
43086 + "content"; it only knows about lines and can't be expected to parse or
43087 + understand them -- after all, the Password prompt might be in some
43088 + other language. So remember: if you use the LEARN command to record a
43089 + login script, be sure edit the resulting file to remove any passwords.
43090 + Also be sure to delete any backup copies your editor or OS might have
43091 + made of the file.
43093 + Other manual adjustments might also be appropriate:
43095 + * If the target of an INPUT command can vary, you can replace the
43096 + INPUT command with MINPUT and the appropriate target list, and/or
43097 + the target with a \fpattern(). For example, suppose you are
43098 + dialing a number that can be answered by any one of 100 terminal
43099 + servers, whose prompts are ts-00>, ts-01>, ts-02>, ... ts-99>. The
43100 + script records a particular one of these, but you want it to work
43101 + for all of them, so change (e.g.):
43102 + INPUT 10 ts-23> ; or whatever
43104 + INPUT 10 \fpattern(ts-[0-9][0-9]>)
43105 + * The INPUT timeout values are conservative, but they are based only
43106 + on a single observation; you might need to tune them.
43107 + * The PAUSE commands might not be necessary, or the PAUSE interval
43108 + might need adjustment.
43109 + * In case you made typographical errors during recording, they are
43110 + incorporated in your script; you can edit them out if you want to.
43112 + Here is a sample script generated by Kermit ("learn vms.ksc") in which
43113 + a Telnet connection is made to a VMS computer, the user logs in,
43114 + starts Kermit on VMS, sends it a file, and then logs out:
43116 + ; Scriptfile: vms.ksc
43117 + ; Directory: /usr/olga
43118 + ; Recorded: 20001124 15:21:23
43120 + SET HOST /NETWORK:TCP vms.xyzcorp.com
43121 + IF FAIL STOP 1 Connection failed
43123 + INPUT 7 {\{13}\{10}\{13}Username: }
43124 + IF FAIL STOP 1 INPUT timeout
43127 + INPUT 3 {\{13}\{10}\{13}Password: }
43128 + IF FAIL STOP 1 INPUT timeout
43130 + OUTPUT secret\{13}
43131 + INPUT 18 {\{13}\{10}\{13}$ }
43132 + IF FAIL STOP 1 INPUT timeout
43134 + OUTPUT set default [.incoming]\{13}
43135 + INPUT 12 {\{13}\{10}\{13}$ }
43136 + IF FAIL STOP 1 INPUT timeout
43138 + OUTPUT kermit\{13}
43139 + INPUT 15 {\{13}\{10}\{13}ALTO:[OLGA.INCOMING] C-Kermit>}
43140 + IF FAIL STOP 1 INPUT timeout
43142 + OUTPUT receive\{13}
43145 + INPUT 18 {\{13}\{10}\{13}ALTO:[OLGA.INCOMING] C-Kermit>}
43146 + IF FAIL STOP 1 INPUT timeout
43149 + INPUT 6 {\{13}\{10}\{13}$ }
43150 + IF FAIL STOP 1 INPUT timeout
43152 + OUTPUT logout\{13}
43156 + The commands generated by Kermit during CONNECT (INPUT, IF FAIL,
43157 + PAUSE, and OUTPUT) have uppercase keywords; the commands typed by the
43158 + user are in whatever form the user typed them (in this case,
43161 + [ [460]Top ] [ [461]Contents ] [ [462]C-Kermit Home ] [ [463]Kermit
43163 + _________________________________________________________________
43165 + 8.12. Pattern Matching
43167 + A pattern is a character string that is used to match other strings.
43168 + Patterns can contain metacharacters that represent special actions
43169 + like "match any single character", "match zero or more characters",
43170 + "match any single character from a list", and so on. The best known
43171 + application of patterns is in file specifications that contain
43172 + wildcards, as in "send *.txt", meaning "send all files whose names end
43175 + Patterns are also used in increasingly many other ways, to the extent
43176 + it is useful to point out certain important distinctions in the ways
43177 + in which they are used:
43179 + Anchored Patterns
43180 + If an anchored pattern does not begin with "*", it must match
43181 + the beginning of the string, and if it does not end with "*",
43182 + it must match the end of the string. For example, the anchored
43183 + pattern "abc" matches only the string "abc", not "abcde" or
43184 + "xyzabc" or "abcabc". The anchored pattern "abc*" matches any
43185 + string that starts with "abc"; the anchored pattern "*abc"
43186 + matches any string that ends with "abc"; the anchored pattern
43187 + "*abc*" matches any string that contains "abc" (including any
43188 + that start and/or end with it).
43190 + Floating Patterns
43191 + A floating pattern matches any string that contains a substring
43192 + that matches the pattern. In other words, a floating pattern
43193 + has an implied "*" at the beginning and end. You can anchor a
43194 + floating pattern to the beginning by starting it with "^", and
43195 + you can anchor it to the end by ending it with "$" (see
43199 + A wildcard is an anchored pattern that has the additional
43200 + property that "*" does not match directory separators.
43202 + This terminology lets us describe Kermit's commands with a bit more
43203 + precision. When a pattern is used for matching filenames, it is a
43204 + wildcard, except in the TEXT-PATTERNS and BINARY-PATTERNS lists and
43205 + /EXCEPT: clauses, in which case directory separators are not
43206 + significant (for example, a BINARY-PATTERN of "*.exe" matches any file
43207 + whose name ends in .exe, no matter how deeply it might be buried in
43208 + subdirectories). When Kermit parses a file specification directly,
43209 + however, it uses the strict wildcard definition. For example, "send
43210 + a*b" sends all files whose names start with "a" and end with "b" in
43211 + the current directory, and not any files whose names end with "b" that
43212 + happen to be in subdirectories whose names start with "a". And as
43213 + noted, wildcards are anchored, so "delete foo" deletes the file named
43214 + "foo", and not all files whose names happen to contain "foo".
43216 + Most other patterns are anchored. For example:
43218 + if match abc bc ...
43220 + does not succeed (and you would be surprised if it did!). In fact, the
43221 + only floating patterns are the ones used by commands or functions that
43222 + search for patterns in files, arrays, or strings. These include:
43224 + * The GREP and TYPE /MATCH commands.
43225 + * The \fsearch(), \frsearch(), and \farraylook() functions.
43227 + Thus these are the only contexts in which explicit anchors ("^" and
43228 + "$") may be used:
43231 + Prints all lines containing "abc" in all files whose names end
43235 + Prints all lines that start with "abc" in all ".txt" files.
43238 + Prints all lines that end with "abc" in all ".txt" files.
43241 + Prints all lines that start with "a" and end with "z" in all
43244 + Similarly for TYPE /PAGE, /fsearch(), /frsearch(), and \farraylook().
43246 + Here is a brief summary of anchored and floating pattern equivalences:
43248 + Anchored Floating
43254 + [ [464]Top ] [ [465]Contents ] [ [466]C-Kermit Home ] [ [467]Kermit
43256 + _________________________________________________________________
43258 + 8.13. Dates and Times
43260 + C-Kermit's comprehension of date-time formats is considerably expanded
43261 + in version 8.0. Any command that reads dates, including the DATE
43262 + command itself, or any switch, such as the /BEFORE: and /AFTER:
43263 + switches, or any function such as \fcvtdate(), now can understand
43264 + dates and times expressed in any ISO 8601 format, in Unix "asctime"
43265 + format, in FTP MDTM format, and in practically any format used in RFC
43266 + 822 or RFC 2822 electronic mail, with or without timezones, and in a
43267 + great many other formats as well. HELP DATE briefly summarizes the
43268 + acceptable date-time formats.
43270 + Furthermore, C-Kermit 8.0 includes a new and easy-to-use form of
43271 + date-time arithmetic, in which any date or time can be combined with a
43272 + "delta time", to add or subtract the desired time interval (years,
43273 + months, weeks, days, hours, minutes, seconds) to/from the given date.
43274 + And new functions are available to compare dates and to compute their
43277 + As you can imagine, all this requires quite a bit of "syntax". The
43280 + [ date ] [ time ] [ delta ]
43282 + Each field is optional, but in most cases (depending on the context)
43283 + there must be at least one field. If a date is given, it must come
43284 + first. If no date is given, the current date is assumed. If no time is
43285 + given, an appropriate time is supplied depending on whether a date was
43286 + supplied. If no delta is given, no arithmetic is done. If a delta is
43287 + given without a date or time, the current date and time are used as
43290 + Date-time-delta fields are likely to contain spaces (although they
43291 + need not; space-free forms are always available). Therefore, in most
43292 + contexts -- and notably as switch arguments -- date-time information
43293 + must be enclosed in braces or doublequotes, for example:
43295 + send /after:"8-Aug-2001 12:00 UTC" *.txt
43297 + Kermit's standard internal format for dates and times is:
43299 + yyyymmdd hh:mm:ss
43303 + 20010208 10:28:01
43305 + Date-times can always be given in this format. yyyy is the 4-digit
43306 + year, mm is the two-digit month (1-12; supply leading zero for
43307 + Jan-Sep), dd is the 2-digit day (leading zero for 1-9), hh is the hour
43308 + (0-23), mm the minute (0-59), ss the second (0-59), each with leading
43309 + zero if less than the field width. The date and time can be separated
43310 + by a space, an underscore, a colon, or the letter T. The time is in
43311 + 24-hour format. Thus the various quantites are at the following fixed
43315 + 1-4 Year (4 digits, 0000-9999)
43316 + 5-6 Month (2 digits, 1-12)
43317 + 7-8 Day (2 digits, 1-31)
43318 + 9 Date-Time Separator (space, :, _, or the letter T)
43319 + 10-11 Hour (2 digits, 0-23)
43320 + 12 Hour-Minute Separator (colon)
43321 + 13-14 Minute (2 digits, 0-59)
43322 + 15 Minute-Second Separator (colon)
43323 + 16-17 Second (2 digits, 0-59)
43327 + 19800526 13:07:12 26 May 1980, 13:07:12 (1:07:12PM)
43329 + This is the format produced by the DATE command and by any function
43330 + that returns a date-time. It is suitable for lexical comparison and
43331 + sorting, and for use as a date-time in any Kermit command. When this
43332 + format is given as input to a command or function, various date-time
43333 + separators (as noted) are accepted:
43335 + 19800526 13:07:12 26 May 1980, 13:07:12 (1:07:12PM)
43336 + 20010208_10:28:35 2 February 2001, 10:28:35 AM
43337 + 18580101:12:00:00 1 January 1858, noon
43338 + 20110208T00:00:00 2 February 2011, midnight
43340 + Certain other special date-time formats that are encountered on
43341 + computer networks are recognized:
43344 + This is a fixed format used by Unix, named after Unix's
43345 + asctime() ("ASCII time") function. It is always exactly 24
43346 + characters long. Example: Fri Aug 10 16:38:01 2001
43348 + Asctime with Timezone
43349 + This is like Asctime format, but includes a 3-character
43350 + timezone between the time and year. It is exactly 28 characters
43351 + long. Example: Fri Aug 10 16:38:01 GMT 2001
43354 + E-mail date-time formats are defined in [468]RFC 2822 with a
43355 + fair amount of flexibility and options. The following examples
43356 + are typical of e-mails and HTTP (web-page) headers:
43358 + Sat, 14 Jul 2001 11:49:29 (No timezone)
43359 + Fri, 24 Mar 2000 14:19:59 EST (Symbolic timezone)
43360 + Tue, 26 Jun 2001 10:19:45 -0400 (EDT) (GMT Offset + comment)
43363 + This is the date-time format supplied by FTP servers that
43364 + support the (not yet standard but widely used nevertheless)
43365 + MDTM command, by which the FTP client asks for a file's
43366 + modification time:
43368 + yyyymmddhhmmss[.ffff]
43370 + where yyyy is the 4-digit year, mm is the 2-digit month, and so
43371 + on, exactly 14 digits long. An optional fractional part
43372 + (fraction of second) may also be included, separated by a
43373 + decimal point (period). Kermit rounds to the nearest second.
43376 + 20020208102835.515 (8 February 2002 10:28:36 AM)
43380 + The date, if given, must precede the time and/or delta, and can be in
43381 + many, many formats. For starters, you can use several symbolic date
43382 + names in place of actual dates:
43385 + This is replaced by the current date and time. The time can not
43386 + be overriden (if you want to supply a specific time, use TODAY
43387 + rather than NOW).
43390 + This is replaced by the current date and a default time of
43391 + 00:00:00 is supplied, but can be overridden by a specific time;
43392 + for example, if today is 8 February 2002, then "TODAY" is
43393 + "20020802 00:00:00" but "TODAY 10:28" is "20020802 10:28:00".
43396 + Like TODAY, but one day later (if today is 8 February 2002,
43397 + then "TOMORROW" is "20020803 00:00:00" but "TOMORROW 16:30" is
43398 + "20020803 16:30:00").
43401 + Like TODAY, but one day earlier.
43403 + MONDAY, TUESDAY, WEDNESDAY, ..., SUNDAY
43404 + The date on the given day of the week, today or later. A
43405 + default time of 00:00:00 is supplied but can be overridden.
43406 + Example: "SATURDAY 12:00" means next Saturday (or today, if
43407 + today is Saturday) at noon.
43409 + You can give an explicit date in almost any conceivable format, but
43410 + there are some rules:
43412 + * If a date is given, it must have three fields: day, month, and
43413 + year; the order can vary (except that the month can not be last).
43414 + * If names are used for days, months, etc, they must be English.
43415 + * The year must lie between 0000 and 9999, inclusive.
43416 + * All calendar calculations use Gregorian dating, so calculated
43417 + dates for years prior to 1582 (or later, depending on the country)
43418 + will not agree with historical dates. Other forms of dating (e.g.
43419 + Hebrew, Chinese) are not supported.
43421 + Various date-field separators are accepted: hyphen, slash, space,
43422 + underscore, period. The same field separator (if any) must be used in
43423 + both places; for example 18-Sep-2001 but not 18-Sep/2001. Months can
43424 + be numeric (1-12) or English names or abbreviations. Month name
43425 + abbreviations are normally three letters, e.g. Apr, May, Jun, Jul.
43426 + Capitalization doesn't matter.
43428 + Here are a few examples:
43430 + 18 Sep 2001 (English month, abbreviated)
43431 + 18 September 2001 (English month, spelled out)
43432 + 2001 Sept 18 (Year, month, day)
43433 + 18-Sep-2001 (With hyphens)
43434 + 18/09/2001 (All numeric with slashes)
43435 + 18.09.2001 (Ditto, with periods)
43436 + 18_09_2001 (Ditto, with underscores)
43437 + 09/18/2001 (See below)
43438 + 2001/09/18 (See below)
43439 + September 18, 2001 (Correspondence style)
43440 + Sep-18-2001 (Month-day-year)
43441 + 20010918 (Numeric, no separators)
43443 + You can also include the day of the week with a specific date, in
43444 + which case it is accepted (if it is a valid day name), but not
43445 + verified to agree with the given date:
43447 + Tue, 18 Sep 2001 (Abbreviated, with comma)
43448 + Tue,18 Sep 2001 (Comma but no space)
43449 + Tue 18 Sep 2001 (Abbreviated, no comma)
43450 + Tuesday 18 Sep 2001 (Spelled out)
43451 + Tuesday, 18 Sep 2001 (etc)
43452 + Friday, 18 Sep 2001 (Accepted even if not Friday)
43454 + In all-numeric dates with the year last, such as 18/09/2001, Kermit
43455 + identifies the year because it's 4 digits, then decides which of the
43456 + other two numbers is the month or day based on its value. If both are
43457 + 12 or less and are unequal, the date is ambiguous and is rejected. In
43458 + all-numeric dates with the year first, the second field is always the
43459 + month and the third is the day. The month never comes last. A date
43460 + with no separators is accepted only if it is all numeric and has
43461 + exactly eight digits, and is assumed to be in yyyymmdd format.
43463 + 20010918 (18-Sep-2001 00:00:00)
43465 + or 14 digits (as in FTP MDTM format):
43467 + 20010918123456 (18-Sep-2001 12:34:56)
43469 + You can always avoid ambiguity by putting the year first, or by using
43470 + an English, rather than numeric, month. A date such as 09/08/2001
43471 + would be ambiguous but 2001/09/08 is not, nor is 09-Aug-2001.
43473 + Until the late 1990s, it was common to encounter 2-digit years, and
43474 + these are found to this day in old e-mails and other documents. Kermit
43475 + accepts these dates if they have English months, and interprets them
43476 + according to the windowing rules of [469]RFC 2822: "If a two digit
43477 + year is encountered whose value is between 00 and 49, the year is
43478 + interpreted by adding 2000, ending up with a value between 2000 and
43479 + 2049. If a two digit year is encountered with a value between 50 and
43480 + 99, or any three digit year is encountered, the year is interpreted by
43483 + If you need to specify a year prior to 1000, use leading zeros to
43484 + ensure it is not misinterpreted as a "non-Y2K-compliant" modern year:
43486 + 7-Oct-77 (19771007 00:00:00)
43487 + 7-Oct-0077 (00771007 00:00:00)
43491 + The basic time format is hh:mm:dd; that is hours, minutes, seconds,
43492 + separated by colons, perhaps with an optional fractional second
43493 + separated by a decimal point (period). The hours are in 24-hour
43494 + format; 12 is noon, 13 is 1pm, and so on. Fields omitted from the
43495 + right default to zero. Fields can be omitted from the left or middle
43496 + by including the field's terminating colon. Examples:
43498 + 11:59:59 (11:59:59 AM)
43499 + 11:59 (11:59:00 AM)
43501 + 11:59:59.33 (11:59:59 AM)
43502 + 11:59:59.66 (Noon)
43503 + 03:21:00 (3:21:00 AM)
43504 + 3:21:00 (3:21:00 AM)
43505 + 15:21:00 (3:21:00 PM)
43506 + :21:00 (00:21:00 AM)
43507 + ::01 (00:00:01 AM)
43508 + 11::59 (11:00:59 AM)
43510 + Leading zeros can be omitted, but it is customary and more readable to
43511 + keep them in the minute and second fields:
43513 + 03:02:01 (03:02:01 AM)
43514 + 3:02:01 (03:02:01 AM)
43515 + 3:2:1 (03:02:01 AM)
43517 + AM/PM notation is accepted if you wish to use it:
43519 + 11:59:59 (11:59:59 AM)
43520 + 11:59:59AM (11:59:59 AM)
43521 + 11:59:59A.M. (11:59:59 AM)
43522 + 11:59:59am (11:59:59 AM)
43523 + 11:59:59a.m. (11:59:59 AM)
43524 + 11:59:59PM (11:59:59 PM = 23:59:59)
43525 + 11:59:59P.M. (11:59:59 PM = 23:59:59)
43526 + 11:59:59pm (11:59:59 PM = 23:59:59)
43527 + 11:59:59p.m. (11:59:59 PM = 23:59:59)
43529 + You can omit the colons if you wish, in which case Kermit uses the
43530 + following rules to interpret the time:
43532 + 1. 6 digits is hh:mm:ss, e.g. 123456 is 12:34:56.
43533 + 2. 5 digits is h:mm:ss, e.g. 12345 is 1:23:45.
43534 + 3. 4 digits is hh:mm, e.g. 1234 is 12:34.
43535 + 4. 3 digits is h:mm, e.g. 123 is 1:23.
43536 + 5. 2 digits is hh, e.g. 12 is 12:00.
43537 + 6. 1 digit is h (the hour), e.g. 1 is 1:00.
43543 + 230 (02:30:00 AM)
43544 + 230pm (02:30:00 PM = 14:30:00)
43545 + 1115 (11:15:00 AM)
43546 + 2315 (11:15:00 PM = 23:15:00 PM)
43547 + 23150 (02:31:50 AM)
43548 + 231500 (23:15:00 PM)
43550 + 8.13.3. Time Zones
43552 + If a time is given, it can (but need not) be followed by a time zone
43553 + designator. If no time zone is included, the time is treated as local
43554 + time and no timezone conversions are performed.
43556 + The preferred time zone designator is the UTC Offset, as specified in
43557 + [470]RFC 2822: a plus sign or minus sign immediately followed by
43558 + exactly four decimal digits, signifying the difference in hh (hours)
43559 + and mm (minutes) from Universal Coordinated Time (UTC, also known as
43560 + Greenwich Mean Time, or GMT), with negative numbers to the West and
43561 + positive numbers to the East. For example:
43563 + Fri, 13 Jul 2001 12:54:29 -0700
43565 + indicates a local time of 12:54:29 that is 07 hours and 00 minutes
43566 + behind (less than, East of) Universal Time. The space is optional, so
43567 + the example could also be written as:
43569 + Fri, 13 Jul 2001 12:54:29-0700
43571 + The following symbolic time zones are also accepted, as specified by
43572 + [471]RFC 2822 and/or in ISO 8601:
43574 + GMT = +0000 Greenwich Mean Time
43575 + Z = +0000 Zulu (Zero Meridian) Time
43576 + UTC = +0000 Universal Coordinated Time
43577 + UT = +0000 Universal Time
43578 + EDT = -0400 Eastern (USA) Daylight Time
43579 + EST = -0500 Eastern (USA) Standard Time
43580 + CDT = -0500 Central (USA) Daylight Time
43581 + CST = -0600 Central (USA) Standard Time
43582 + MDT = -0600 Mountain (USA) Daylight Time
43583 + MST = -0700 Mountain (USA) Standard Time
43584 + PDT = -0700 Pacific (USA) Daylight Time
43585 + PST = -0800 Pacific (USA) Standard Time
43587 + Note that GMT, Z, UTC, and UT all express the same concept: standard
43588 + (not daylight) time at the Zero Meridian. UTC, by the way, is an
43589 + international standard symbol and does not correspond to the order of
43590 + the English words, Universal Coordinated Time, but it happens to have
43591 + the same initial letters as these words. Of course hundreds of other
43592 + symbolic timezones and variations exist, but they are not
43593 + standardized, and are therefore not supported by Kermit.
43595 + When a time zone is included with a time, the time is converted to
43596 + local time. In case the conversion crosses a midnight boundary, the
43597 + date is adjusted accordingly. Examples converting to EST (Eastern USA
43598 + Standard Time = -0500):
43600 + 11:30:00 = 11:30:00
43601 + 11:30:00 EST = 11:30:00
43602 + 11:30:00 GMT = 06:30:00
43603 + 11:30:00 PST = 14:30:00
43604 + 11:30:00Z = 06:30:00
43605 + 11:30PM GMT = 18:30:00
43606 + 11:30 -0500 = 11:30:00
43607 + 11:30 -0800 = 08:30:00
43608 + 11:30 +0200 = 04:30:00
43610 + Unlike most of Kermit's other date-time conversions, timezone
43611 + knowledge (specifically, the offset of local time from UTC) is
43612 + embodied in the underlying operating system, not in Kermit itself, and
43613 + any conversion errors in this department are the fault of the OS. For
43614 + example, most UNIX platforms do not perform conversions for years
43617 + 8.13.4. Delta Time
43619 + Date/time expressions can be composed of a date and/or time and a
43620 + delta time, or a delta time by itself. When a delta time is given by
43621 + itself, it is relative to the current local date and time. Delta times
43622 + have the following general format:
43624 + {+,-}[number units][hh[:mm[:ss]]]
43626 + In other words, a delta time always starts with a plus or minus sign,
43627 + which is followed by a "part1", a "part2", or both. The "part1", if
43628 + given, specifies a number of days, weeks, months, or years; "part2"
43629 + specifies a time in hh:mm:ss notation. In arithmetic terms, these
43630 + represents some number of days or other big time units, and then a
43631 + fraction of a day expressed as hours, minutes, and seconds; these are
43632 + to be added to or subtracted from the given (or implied) date and
43633 + time. The syntax is somewhat flexible, as shown by the following
43636 + +1 day (Plus one day)
43640 + + 1 day 3:00 (Plus one day and 3 hours)
43643 + +3:00:00 (Plus 3 hours)
43646 + +2 days (Plus 2 days)
43647 + -12 days 7:14:22 (Minus 12 days, 7 hours, 14 minutes, and 22 seconds)
43649 + The words "week", "month", and "year" can be used like "day" in the
43650 + examples above. A week is exactly equivalent to 7 days. When months
43651 + are specified, the numeric month number of the date is incremented or
43652 + decremented by the given number, and the year and day adjusted
43653 + accordingly if necessary (for example, 31-Jan-2001 +1month =
43654 + 03-Mar-2001 because February does not have 31 days). When years are
43655 + specified, they are added or subtracted to the base year. Examples
43656 + (assuming the current date is 10-Aug-2001 and the current time is
43659 + 18-Sep-2001 +1day (20010918 00:00:00)
43660 + today +1day (20010811 00:00:00)
43661 + now+1d (20010811 19:21:11)
43662 + + 1 day (20010811 19:21:11)
43663 + + 1 day 3:14:42 (20010811 22:35:54)
43664 + + 7 weeks (20010928 19:21:11)
43665 + +1d3:14:42 (20010811 22:35:54)
43666 + +1w3:14:42 (20010817 22:35:54)
43667 + +1m3:14:42 (20010910 22:35:54)
43668 + +1y3:14:42 (20020810 22:35:54)
43669 + 2 feb 2001 + 10 years (20110208 00:00:00)
43670 + 2001-02-08 +10y12 (20110208 12:00:00)
43671 + 31-dec-1999 23:59:59+00:00:01 (20000101 00:00:00)
43672 + 28-feb-1996 +1day (19960229 00:00:00) (leap year)
43673 + 28-feb-1997 +1day (19970301 00:00:00) (nonleap year)
43674 + 28-feb-1997 +1month (19970328 00:00:00)
43675 + 28-feb-1997 +1month 11:59:59 (19970328 11:59:59)
43676 + 28-feb-1997 +20years (20170228 00:00:00)
43677 + 28-feb-1997 +8000years (99970228 00:00:00)
43679 + For compatibility with VMS, the following special delta-time format is
43685 + (no spaces). The hyphen after the number indicates days. It
43686 + corresponds exactly to the Kermit notation:
43691 + The following forms all indicate exactly the same date and time:
43693 + 18-Sep-2001 12:34:56 +1-3:23:01
43694 + 18-Sep-2001 12:34:56 +1d3:23:01
43695 + 18-Sep-2001 12:34:56 +1 day 3:23:01
43697 + and mean "add a day plus 3 hours, 23 minutes, and 1 second" to the
43700 + Note that delta times are not at all the same as UTC offsets; the
43701 + former specifies an adjustment to the given date/time and the latter
43702 + specifies that the local time is a particular distance from Universal
43703 + Time, for example:
43705 + 11-Aug-2001 12:34:56 -0800 (20010811 16:34:56 -- UTC Offset)
43706 + 11-Aug-2001 12:34:56 -08:00 (20010811 04:34:56 -- Delta time)
43708 + If you give a time followed by a modifer that starts with a + or -
43709 + sign, how does Kermit know whether it's a UTC offset or a delta time?
43710 + It is treated as a UTC offset if the sign is followed by exactly four
43711 + decimal digits; otherwise it is a delta time. Examples (for USA
43712 + Eastern Daylight Time):
43714 + 11-Aug-2001 12:34:56 -0800 (20010811 16:34:56 -- UTC Offset)
43715 + 11-Aug-2001 12:34:56 -08:00 (20010811 04:34:56 -- Delta time)
43716 + 11-Aug-2001 12:34:56 -800 (20010811 04:34:56 -- Delta time)
43717 + 11-Aug-2001 12:34:56 -8 (20010811 04:34:56 -- Delta time)
43719 + The first example says that at some unknown place which is 8 hours
43720 + ahead of Universal Time, the time is 12:34:56, and this corresponds to
43721 + 16:34:56 in Eastern Daylight time. The second example says to subtract
43722 + 8 hours from the local time. The third and fourth are delta times
43723 + because, even though a colon is not included, the time does not
43724 + consist of exactly 4 digits.
43726 + When a delta time is written after a timezone, however, there is no
43727 + ambiguity and no syntax distinction is required:
43729 + 11-Aug-2001 12:34:56 -0800 -0800 (20010811 08:34:56)
43730 + 11-Aug-2001 12:34:56 -0800 -08:00 (Ditto)
43731 + 11-Aug-2001 12:34:56 -08:00 -08:00 (Illegal)
43733 + 8.13.5. The DATE Command
43735 + Obviously a great many combinations of date, time, time zone, and
43736 + delta time are possible, as well as many formatting options. The
43737 + purpose of all this flexibility is to comply with as many standards as
43738 + possible -- Internet RFCs, ISO standards, and proven corporate
43739 + standards -- as well as with notations commonly used by real people,
43740 + in order that dates and times from the widest variety of sources can
43741 + be assigned to a variable and used in any date-time field in any
43744 + You can test any date-and/or-time format with the DATE command, which
43745 + converts it to standard yyyymmdd hh:mm:ss format if it is understood,
43746 + or else gives an explicit error message (rather than just "BAD DATE"
43747 + as in previous C-Kermit releases) to indicate what is wrong with it.
43748 + Examples (on Tuesday, 31 July 2001 in New York City, Eastern Daylight
43749 + Time, UTC -0400):
43751 + DATE command argument Result
43752 + 12:30 20010731 12:30:00
43753 + 12:30:01 20010731 12:30:01
43754 + 12:30:01.5 20010731 12:30:02
43755 + 1230 20010731 12:30:00
43756 + 230 20010731 02:30:00
43757 + 230+1d 20010801 02:30:00
43758 + 230+1d3:00 20010801 05:30:00
43759 + 20010718 19:21:15 20010718 19:21:15
43760 + 20010718_192115 20010718 19:21:15
43761 + 20010718T192115 20010718 19:21:15
43762 + 18 Jul 2001 +0400 20010717 23:59:59
43763 + 18 Jul 2001 192115 20010718 19:21:15
43764 + 18 Jul 2001 192115.8 20010718 19:21:16
43765 + 18-Jul-2001T1921 20010718 19:21:00
43766 + 18-Jul-2001 1921Z 20010718 15:21:00
43767 + 18-Jul-2001 1921 GMT 20010718 15:21:00
43768 + 18-Jul-2001 1921 UTC 20010718 15:21:00
43769 + 18-Jul-2001 1921 Z 20010718 15:21:00
43770 + 18-Jul-2001 1921Z 20010718 15:21:00
43771 + 18-Jul-2001 1921 -04:00:00 20010718 19:21:00
43772 + 21-Jul-2001_08:20:00am 20010721 08:20:00
43773 + 21-Jul-2001_8:20:00P.M. 20010721 20:20:00
43774 + Fri Jul 20 11:26:25 2001 20010720 11:26:25
43775 + Fri Jul 20 11:26:25 GMT 2001 20010720 07:26:25
43776 + Sun, 9 Apr 2000 06:46:46 +0100 20000409 01:46:46
43777 + Sunday, 9 Apr 2000 06:46:46 +0100 20000409 01:46:46
43778 + now 20010731 19:41:12
43779 + today 20010731 00:00:00
43780 + today 09:00 20010731 09:00:00
43781 + tomorrow 20010801 00:00:00
43782 + tomorrow 09:00 20010801 09:00:00
43783 + tomorrow 09:00 GMT 20010801 05:00:00
43784 + yesterday 20010730 00:00:00
43785 + yesterday 09:00 20010730 09:00:00
43786 + + 3 days 20010803 00:00:00
43787 + +3 days 20010803 00:00:00
43788 + +3days 20010803 00:00:00
43789 + + 3days 20010803 00:00:00
43790 + + 3 days 09:00 20010803 09:00:00
43791 + + 2 weeks 20010814 00:00:00
43792 + + 1 month 20010831 00:00:00
43793 + - 7 months 20001231 00:00:00
43794 + + 10 years 20110731 00:00:00
43795 + friday 20010803 00:00:00
43796 + saturday 20010804 00:00:00
43797 + sunday 20010805 00:00:00
43798 + monday 20010806 00:00:00
43799 + tuesday 20010731 00:00:00
43800 + wednesday 20010801 00:00:00
43801 + thursday 20010802 00:00:00
43802 + friday 07:00 20010803 07:00:00
43803 + thursday 1:00pm 20010802 13:00:00
43804 + thursday 1:00pm GMT 20010802 09:00:00
43805 + Thu, 10 Nov 94 10:50:47 EST 19941110 10:50:47
43806 + Fri, 20 Oct 1995 18:35:15 -0400 (EDT) 19951020 18:35:15
43807 + 31/12/2001 20011231 00:00:00
43808 + 12/31/2001 20011231 00:00:00
43809 + 2001-July-20 20010720 00:00:00
43810 + 2001-September-30 20010930 00:00:00
43811 + 30-September-2001 20010930 00:00:00
43812 + Sep 30, 2001 12:34:56 20010930 12:34:56
43813 + September 30, 2001 20010930 00:00:00
43814 + September 30, 2001 630 20010930 06:30:00
43815 + September 30 2001 630 20010930 06:30:00
43816 + Sep-30-2001 12:34:59 20010930 12:34:59
43817 + 20010807113542.014 20010807 11:35.42
43818 + 20010807113542.014Z 20010807 07:35:42
43820 + 8.13.6. New Date-Time Functions
43822 + In the following descriptions, date-time function arguments are the
43823 + same free-format date-time strings discussed above, with the same
43824 + defaults for missing fields. They are automatically converted to
43825 + standard format internally prior to processing.
43828 + Converts the date-time d1 to standard format and local time.
43829 + This function is not new, but now it accepts a wider range of
43830 + argument formats that can include timezones and/or delta times.
43831 + If the first argument is omitted, the current date and time are
43832 + assumed. The optional second argument is a format code for the
43835 + n1 = 1: yyyy-mmm-dd hh:mm:ss (mmm = English 3-letter month
43837 + n1 = 2: dd-mmm-yyyy hh:mm:ss (ditto)
43838 + n1 = 3: yyyymmddhhmmss (all numeric)
43841 + Converts the date-time d1 to Universal Coordinated Time (UTC),
43842 + also known as GMT or Zulu or Zero-Meridian time. The default d1
43843 + is NOW. If d1 is a valid date-time, the UTC result is returned
43844 + in standard format, yyyymmdd hh:ss:mm.
43846 + \fcmpdates(d1,d2)
43847 + Compares two free-format date-times, d1 and d2, and, if both
43848 + arguments are valid, returns a number: -1 if d1 is earlier than
43849 + (before) d2; 0 if d1 is the same as d2; 1 if d1 is later than
43852 + \fdiffdates(d1,d2)
43853 + Computes the difference between two free-format date-times, d1
43854 + and d2. If both arguments are valid, returns a delta time which
43855 + is negative if d1 is earlier than (before) d2 and positive
43856 + otherwise. If d1 and d2 are equal, the result is "+0:00".
43857 + Otherwise, the result consists of the number of days, hours,
43858 + minutes, and seconds that separate the two date-times. If the
43859 + number of days is zero, it is omitted. If the number of days is
43860 + nonzero but the hours, minutes, and seconds are all zero, the
43861 + time is omitted. if the seconds are zero, they are omitted.
43864 + Converts a delta time to seconds. For example, "+1d00:00:01" to
43865 + 86401. Valid delta times must start with a + or - sign. Days
43866 + are accepted as time units, but not years, months, or weeks. If
43867 + the result would overflow a computer long word (as would happen
43868 + with 32-bit long words when the number of days is greater than
43869 + 24854), the function fails.
43871 + HINT: Although Kermit has a number of built-in date and time
43872 + variables, it doesn't have a single one suitable for writing a
43873 + timestamp. For this you would normally use something like "\v(ndate)
43874 + \v(time)". But \fcvtdate() (with no arguments) is equivalent: it
43875 + returns the current date and time in yyyymmdd hh:mm:ss format,
43876 + suitable for time stamping.
43878 + 8.13.7. Date-Time Programming Examples
43880 + Here's a macro that converts any date-time to UTC, which you might use
43881 + if C-Kermit didn't already have a \futcdate() function:
43884 + .local := \fcvtdate(\%*) ; 1.
43885 + .tmp := \fcvtdate(\m(local)UTC) ; 2.
43886 + .offset := \fdiffdate(\m(local),\m(tmp)) ; 3.
43887 + .utc := \fcvtdate(\m(local)\m(offset)) ; 4.
43891 + Brief explanation: Line 1 converts the macro argument, a free-format
43892 + date-time, to standard-format local time. Line 2 appends the "UTC"
43893 + timezone to the local time and converts the result to local time. In
43894 + other words, we take the same time as the local time, but pretend it's
43895 + UTC time, and convert it to local time. For example, if New York time
43896 + is 4 hours ahead of UTC, then 6:00pm New York time is 2:00pm UTC. Line
43897 + 3 gets the difference of the two results (e.g. "+04:00"). Line 4
43898 + appends the difference (delta time) to the local time, and converts it
43899 + again, which adds (or subtracts) the UTC offset to the given time.
43900 + Line 5 displays the result.
43902 + Here's a script that opens a web page, gets its headers into an array,
43903 + scans the array for the "Last-Modified:" header, and inteprets it:
43904 + http open www.columbia.edu
43905 + if fail stop 1 HTTP OPEN failed
43906 + http /array:a head index.html /dev/null
43907 + if fail stop 1 HTTP GET failed
43909 + for \%i 1 \fdim(&a) 1 {
43910 + .\%x := \findex(:,\&a[\%i])
43911 + if not \%x continue
43912 + .tag := \fleft(\&a[\%i],\%x-1)
43913 + .val := \fltrim(\fsubstr(\&a[\%i],\%x+1))
43914 + if ( eq "\m(tag)" "Last-Modified" ) {
43915 + echo HTTP Date: \m(val)
43916 + .rdate := \fcvtdate(\m(val))
43917 + echo {Standard Date (local): \m(rdate)}
43918 + echo {Standard Date (UTC): \futcdate(\m(rdate))}
43926 + HTTP Date: Mon, 13 Aug 2001 20:05:42 GMT
43927 + Standard Date (local): 20010813 16:05:42
43928 + Standard Date (UTC): 20010813 20:05:42
43930 + As you can see, Kermit had no trouble decoding the date-time-string
43931 + from the website, converting to local time, and converting back to UTC
43932 + with no conflicts or loss of information. If it had been in any other
43933 + known format, the result would have been the same.
43935 + Now suppose we want to download the web page only if it is newer than
43936 + our local copy. The \fdate(filename) function (which returns the
43937 + modification date-time of the given file) and the new \fcmpdates()
43938 + function make it easy. Insert the following just before the BREAK
43941 + if ( < 0 \fcmpdates(\m(rdate),\fdate(index.html)) ) {
43942 + echo GETTING index.html...
43943 + http get index.html index.html
43944 + if success echo HTTP GET OK
43946 + echo index.html: no update needed
43951 + This says, "if 0 is less than the comparison of the remote file date
43952 + and the local file date, get the remote file, otherwise skip it." And
43953 + it automatically reconciles the time-zone difference (if any).
43955 + It would be nice to be able to extend this script into a
43956 + general-purpose website updater, but unfortunately HTTP protocol
43957 + doesn't provide any mechanism for the client to ask the server for a
43958 + list of files, recursive or otherwise.
43960 + [ [472]Top ] [ [473]Contents ] [ [474]C-Kermit Home ] [ [475]Kermit
43962 + _________________________________________________________________
43964 + 8.14. Trapping Keyboard Interruption
43966 + Normally when you type Ctrl-C and Kermit is in command mode (as
43967 + opposed to CONNECT mode) with COMMAND INTERRUPTION ON (as it is unless
43968 + you have set it OFF), Kermit interrupts any command that is currently
43969 + in progress, and if a command file or macro is executing, rolls the
43970 + command stack back to top level, closing all open command files,
43971 + deactivating all macros, deallocating all local variables and arrays,
43972 + and leaving you at the command prompt.
43974 + Suppose, however, you want certain actions to occur when a script is
43975 + interrupted; for example, closing open files, writing log entries, or
43976 + displaying summary results. You can do this by defining a macro named
43977 + ON_CTRLC. When Ctrl-C is detected, and a macro with this name is
43978 + defined, Kermit executes it from the current command level, thus
43979 + giving it full access to the environment in which the interruption
43980 + occurred, including local variables and open files. Only when the
43981 + ON_CTRLC macro completes execution is the command stack rolled back to
43984 + Once the ON_CTRLC macro is defined, it can be executed only once. This
43985 + is to prevent recursion if the user types Ctrl-C while the ON_CTRLC
43986 + macro is executing. If you type Ctrl-C while the Ctrl-C macro is
43987 + active, this does not start a new copy of ON_CTRLC; rather, it returns
43988 + to the top-level command prompt. After the ON_CTRLC macro returns, it
43989 + has been removed from the macro table so if you want to use it again
43990 + or install a different Ctrl-C trap, you must execute a new DEFINE
43991 + ON_CTRLC command. In any case, as always when you interrupt a script
43992 + with Ctrl-C, its completion status is FAILURE.
43994 + Normally the ON_CTRLC macro would be defined in the command file or
43995 + macro to which it applies, and should be declared LOCAL. This way, if
43996 + the command file or macro completes successfully without being
43997 + interrupted, the ON_CTRLC definition disappears automatically.
43998 + Otherwise the definition would still be valid and the macro would be
43999 + executed, probably out of context, the next time you typed Ctrl-C.
44001 + Here's a simple example of a command file that sets a Ctrl-C trap for
44004 + local on_ctrlc ; Make Ctrl-C trap local to this command file.
44005 + define on_ctrlc { ; Define the ON_CTRLC macro.
44006 + echo Interrupted at \v(time).
44007 + echo Iterations: \%n
44009 + xecho Type Ctrl-C to quit
44010 + for \%n 1 999 1 { ; Prints a dot every second until interrupted.
44014 + echo Finished normally at \v(time) ; Get here only if not interrupted.
44016 + echo Iterations: \%n
44018 + This prints a summary no matter whether it completes normally or is
44019 + interrupted from the keyboard. In both cases the trap is automatically
44020 + removed afterwards.
44022 + For an example of how to use ON_CTRLC to debug scripts, see
44023 + [476]Section 8.1.
44025 + [ [477]Top ] [ [478]Contents ] [ [479]C-Kermit Home ] [ [480]Kermit
44027 + __________________________________________________________________________
44031 + This section is primarily for those who want to write
44032 + calculation-intensive scripts, especially if they require
44033 + floating-point arithmetic, and/or for those who are familiar with the
44034 + LISP programming language.
44036 + Ever since C-Kermit version 5 was released in 1988, scripting has been
44037 + one of its major attractions, and arithmetic is a key part of it.
44038 + Versions 5 and 6 included integer arithmetic only, using traditional
44039 + algebraic notation, e.g.:
44041 + echo \fevaluate(3*(2+7)/2)
44044 + C-Kermit 7.0 added support for floating-point arithmetic, but only
44045 + through function calls:
44047 + echo \ffpdivide(\ffpmultiply(3.0,\ffpadd(2.0,7.0)),2.0)
44050 + C-Kermit 8.0 introduces a third form of arithmetic that treats
44051 + integers and floating-point numbers uniformly, is easier to read and
44052 + write, and executes very quickly:
44054 + (/ (* 3 (+ 2 7)) 2)
44057 + But first some background.
44059 + The Kermit command and scripting language differs from true
44060 + programming languages (such as C or Fortran) in many ways; one of the
44061 + most prominent differences is the way in which variables are
44062 + distinguished from constants. In a command language, words are taken
44063 + literally; for example, the Unix shell:
44067 + displays the file named foo.bar. Whereas in a programming language
44068 + like C, words are assumed to be variables:
44070 + s = foo.bar; /* Assigns the value of foo.bar to the variable s */
44072 + To make a programming language take words literally, you have to quote
44073 + or "escape" them:
44075 + s = "foo.bar"; /* Assigns a pointer to the string "foo.bar" to the variable
44078 + The opposite holds for command languages: to get them to treat a word
44079 + as a variable rather than a constant, you have to escape them. For
44080 + example, in the Unix shell:
44082 + foo=123 ; Assign value 123 to variable foo.
44083 + echo foo ; Prints "foo"
44084 + echo $foo ; Prints "123"
44088 + define foo 123 ; Assign value 123 to variable foo.
44089 + echo 123 ; This prints "123".
44090 + echo foo ; This prints "foo".
44091 + echo \m(foo) ; This prints "123".
44093 + In other words, character strings (such as "foo" above) are
44094 + interpreted as literal strings, rather than variable names, except in
44095 + special commands like DEFINE that deal specifically with variable
44096 + names (or in numeric contexts as explained in [481]Section 8.2). The
44097 + special "escape" character (dollar sign ($) for the shell, backslash
44098 + (\) for Kermit) indicates that a variable is to be replaced by its
44101 + The requirement to escape variable names in command languages normally
44102 + does not impose any special hardship, but can add a considerable
44103 + notational burden to arithmetic expressions, which are typically full
44104 + of variables. Especially in Kermit when floating point numbers are
44105 + involved, where you must use special \ffpxxx() functions, e.g.
44106 + "\ffpadd(\m(a),\m(b))" rather than the simple "+" operator to add two
44107 + floating-point numbers together, because the original arithmetic
44108 + handler doesn't support floating point (this might change in the
44109 + future). To illustrate, the general formula for the area of a triangle
44112 + sqrt(s * (s - a) * (s - b) * (s - c))
44114 + where a, b, and c are the lengths of the triangle's three sides and:
44116 + s = (a + b + c) / 2
44118 + Except in special cases (e.g. a = 3, b = 4, c = 5), the result has a
44119 + fractional part so the computation must be done using floating-point
44120 + arithmetic. We can create a Kermit 7.0 function for this as follows:
44124 + assign s \ffpdiv(\ffpadd(\ffpadd(\%1,\%2),\%3),2.0)
44125 + assign t1 \ffpsub(\m(s),\%1)
44126 + assign t2 \ffpsub(\m(s),\%2)
44127 + assign t3 \ffpsub(\m(s),\%3)
44128 + return \ffpsqrt(\ffpmul(\m(s),\ffpmul(\m(t1),\ffpmul(\m(t2),\m(t3)))))
44131 + But as you can see, this is rather cumbersome. Note, in particular,
44132 + that arithmetic functions like \ffpadd(), \ffpmul(), etc, take exactly
44133 + two operands (like their symbolic counterparts + and *), so obtaining
44134 + the product of three or more numbers (as we do in this case) is
44137 + Using the alternative S-Expression notation, we can reduce this to a
44138 + form that is both easier to read and executes faster (the details are
44139 + explained later):
44142 + (let s (/ (+ \%1 \%2 \%3) 2.0))
44143 + (sqrt (* s (- s \%1) (- s \%2) (- s \%3)))
44146 + In both examples, the \%1..3 variables are the normal Kermit macro
44147 + arguments, referenced by the normal escaping mechanism. For increased
44148 + readability, we can also assign the macro arguments \%1, \%2, and \%3
44149 + to the letters a, b, and c corresponding to our formula:
44152 + (let a \%1 b \%2 c \%3)
44153 + (let s (/ (+ a b c) 2.0))
44154 + (sqrt (* s (- s a) (- s b) (- s c)))
44157 + And now the Kermit function reads almost like the original formula.
44158 + Here Kermit behaves more like a regular programming language. In an
44159 + S-Expression, macro names need not be escaped when they are used as
44160 + the names of numeric variables.
44162 + [ [482]Top ] [ [483]Contents ] [ [484]C-Kermit Home ] [ [485]Kermit
44164 + _________________________________________________________________
44166 + 9.1. What is an S-Expression?
44168 + The S-Expression concept is borrowed from the Lisp programming
44169 + language. "S-Expression" is short for Symbolic Expression (itself
44170 + sometimes shortened to SEXP). S-Expressions provide a kind of
44171 + Alternative Mini-Universe within the Kermit command language when the
44172 + regular rules don't apply, a universe enclosed in parentheses.
44174 + C-Kermit does not pretend to be a full Lisp interpreter; only the
44175 + arithmetic parts of Lisp have been incorporated: S-Expressions that
44176 + operate on numbers and return numeric values (plus extensibility
44177 + features described in [486]Section 9.8, which allow some degree of
44178 + string processing).
44180 + An S-Expression is a list of zero or more items, separated by spaces,
44181 + within parentheses. Examples:
44189 + If the S-Expression is empty, it has the NIL (empty) value. If it is
44190 + not empty and the first item is an operator (such as + or *), there
44191 + can be zero or more subsequent items, called the operands:
44195 + Here the operator is "+" and the operands are "1" and "2", and the
44196 + value of the S-Expression is the value of the operation (in this case
44197 + 3). The operator always comes first, which is different from the
44198 + familiar algebraic notation; this because S-Expression operators can
44199 + have different numbers of operands:
44203 + (+ 1 2 3 4 5 6 7 8 9)
44205 + If the first item in the S-Expression is not an operator, then it must
44206 + be a variable or a number (or a macro; see [487]Section 9.8), and the
44207 + S-Expression can only contain one item; in this case, the
44208 + S-Expression's value is the value of the variable or number:
44213 + Operands can be numbers, variables that have numeric values, functions
44214 + that return numbers, or other S-Expressions. To illustrate an
44215 + S-Expression within an S-Expression, observe that:
44219 + is equivalent to any of the following (plus an infinite number of
44223 + (+ (- 3 2) (/ 14 (+ 3 4)))
44225 + S-Expressions can be nested to any reasonable level; for example, the
44226 + value of the following S-Expression is 64:
44228 + (- (* (+ 2 (* 3 4)) (- 9 (* 2 2))) 6)
44230 + Operators have no precedence, implied or otherwise, since they can't
44231 + be mixed. The only exceptions are unary + and -, which simply indicate
44232 + the sign of a number:
44236 + Order of evaluation is specified entirely by parentheses, which are
44237 + required around each operator and its operands: (+ a (* b c)) instead
44240 + S-Expressions provide a simple and isolated environment in which
44241 + Kermit's macro names can be used without the \m(...) escaping that is
44242 + normally required. Given:
44250 + (+ \m(a) \m(b) \m(c))
44252 + is equivalent to:
44256 + Within an S-Expression, as in other strictly numeric contexts
44257 + ([488]Section 8.2), any operand that starts with a letter is treated
44258 + as a Kermit macro name. In this context, abbreviations are not
44259 + accepted; variable names must be spelled out in full. Alphabetic case
44260 + is not significant; "a" and "A" are the same variable, but both are
44261 + different from "area".
44263 + Of course, regular Kermit variables and functions can be used in
44264 + S-Expressions in the normal ways:
44266 + (* \v(math_pi) (^ \%r 2)) ; Area of a circle with radius \%r
44267 + (+ \fjoin(&a)) ; Sum of all elements of array \&a[]
44269 + [ [489]Top ] [ [490]Contents ] [ [491]C-Kermit Home ] [ [492]Kermit
44271 + _________________________________________________________________
44273 + 9.2. Integer and Floating-Point-Arithmetic
44275 + Normally, if all numbers in an S-Expression are integers, the result
44278 + (+ 1 1) ; Result is 2
44279 + (/ 9 3) ; Result is 3
44281 + If any of the operands is floating point, however, the result is also
44284 + (+ 1 1.0) ; Result is 2.0
44285 + (/ 9.0 3) ; Result is 3.0
44287 + If all the operands are integers but the result has a fractional part,
44288 + the result is floating point:
44290 + (/ 10 3) ; Result is 3.333333333333333
44292 + To force an integer result in such cases, use the TRUNCATE operator:
44294 + (truncate (/ 10 3)) ; Result is 3
44296 + Similarly, to force a computation to occur in floating point, you can
44297 + coerce one of its operands to FLOAT:
44299 + (+ 1 (float 1)) ; Result is 2.0
44301 + The result is also floating point if the magnitude of any integer
44302 + operand, intermediate result, or the result itself, is larger than the
44303 + maximum for the underlying machine architecture:
44307 + If the result is too large even for floating-point representation,
44308 + "Infinity" is printed; if it is too small to be distinguished from 0,
44311 + Large numbers can be used and large results generated, but they are
44312 + accurate only to the precision of the underlying machine. For example,
44315 + (+ 111111111111111111111 222222222222222222222)
44317 + should be 333333333333333333333, but 333333333333333300000.0 is
44318 + produced instead if the machine is accurate to only about 16 decimal
44319 + digits, even with coercion to floating-point. The order of magnitude
44320 + is correct but the least significant digits are wrong. The imprecise
44321 + nature of the result is indicated by the ".0" at the end. Contrast
44324 + (+ 111111111 222222222)
44326 + which produces an exact integer result.
44328 + [ [493]Top ] [ [494]Contents ] [ [495]C-Kermit Home ] [ [496]Kermit
44330 + _________________________________________________________________
44332 + 9.3. How to Use S-Expressions
44334 + S-Expressions may be given as commands to C-Kermit. Any command whose
44335 + first character is "(" (left parenthesis) is interpreted as an
44338 + If you enter an S-Expression at the C-Kermit> prompt, its result is
44341 + C-Kermit>(/ 10.0 3)
44342 + 3.333333333333333
44345 + If an S-Expression is executed within a macro or command file, its
44346 + value is not printed. However, you can control the printing action
44349 + SET SEXPRESSION ECHO { AUTO, ON, OFF }
44350 + AUTO is the default, meaning print the value at top level only;
44351 + ON means always print the value; OFF means never print it.
44353 + In any case, the value of the most recent S-Expression (and the
44354 + S-Expression itself) may be accessed programmatically through the
44355 + following variables:
44358 + The S-Expression most recently executed.
44361 + The value of the S-Expression most recently executed.
44363 + Besides issuing S-Expressions as commands in themselves, you can also
44364 + execute them anywhere within a Kermit command, but in this case they
44365 + must be enclosed in a function call (otherwise they are taken
44369 + The argument "s" is an S-Expression; the outer parentheses may
44370 + be omitted. The value of the S-Expression is returned. Note
44371 + that since S-Expressions usually contain spaces, some form of
44372 + grouping or quoting might be needed in some contexts:
44374 + echo \fsexpression((+ 1 1)) ; Outer parentheses may be included
44375 + echo \fsexpr(+ 1 1) ; Outer parentheses may be omitted
44376 + echo Value = "\fsexp(+ 1 a)" ; Can be embedded in strings
44377 + echo Value = \&a[\fsexp(/ b 2)] ; Can be used in array subscripts
44378 + if = {\fsexp(+ 1 1)} 2 { ; Braces needed here for grouping
44379 + echo One plus one still equals two
44382 + The IF statement illustrates how to use S-Expressions as (or in) IF or
44383 + WHILE conditions:
44385 + * Although S-Expressions and IF conditions are similar in
44386 + appearance, they are not interchangeable. Therefore you must use
44387 + \fsexpr() to let Kermit know it's an S-Expression rather than a
44388 + regular IF condition, or a boolean or algebraic expression within
44390 + * In contexts where a single "word" is expected, you must enclose
44391 + the \fsexp() invocation in braces if the S-Expression contains
44392 + spaces (and most of them do).
44394 + If an S-Expression is the last command executed in a macro, its value
44395 + becomes the return value of the macro; no RETURN command is needed.
44399 + (let s (/ (+ \%1 \%2 \%3) 2.0))
44400 + (sqrt (* s (- s \%1) (- s \%2) (- s \%3)))
44403 + This is equivalent to (but more efficient than):
44406 + (let s (/ (+ \%1 \%2 \%3) 2.0))
44407 + return \fsexp(sqrt (* s (- s \%1) (- s \%2) (- s \%3)))
44410 + When an S-Expression is entered as a command -- that is, the first
44411 + nonblank character of the command is a left parenthesis -- then it is
44412 + allowed to span multiple lines, as many as you like, until the first
44413 + left parenthesis is matched:
44432 + The S-Expression concept lends itself easily to embedding and
44433 + recursion, but the depth to which recursion can occur is limited by
44434 + the resources of the computer (memory size, address space, swap space
44435 + on disk) and other factors. There is no way that C-Kermit can know
44436 + what this limit is, since it varies not only from computer to
44437 + computer, but also from moment to moment. If resources are exhausted
44438 + by recursion, C-Kermit simply crashes; there's no way to trap this
44439 + error. However, you can set a depth limit on S-Expressions:
44441 + SET SEXPRESSION DEPTH-LIMIT number
44442 + Limits the number of times the S-Expression reader can invoke
44443 + itself without returning to the given number. The default limit
44444 + is 1000. This limit applies to S-Expressions embedded within
44445 + other S-Expressions as well as to S-Expressions that invoke
44446 + recursive macros. If the limit is exceeded, Kermit prints
44447 + "?S-Expression depth limit exceeded" and returns to its prompt.
44448 + More about recursion in [497]Section 9.8.
44450 + You can also test the depth programmatically:
44453 + The current S-Expression invocation depth. The depth includes
44454 + both nesting level and recursion. For example, in:
44455 + (foo (foo (foo (foo (foo))))), the innermost (foo) is at depth
44458 + Help, completion, and syntax checking are not available within an
44459 + S-Expression. If you type ? within an S-Expression, it says:
44461 + C-Kermit>(? S-Expression ("help sexp" for details)
44463 + As it says, typing "help sexp" will display a brief help text.
44465 + The SHOW SEXPRESSION command displays current SET SEXPRESSION settings
44466 + and related information.
44468 + [ [498]Top ] [ [499]Contents ] [ [500]C-Kermit Home ] [ [501]Kermit
44470 + _________________________________________________________________
44472 + 9.4. Summary of Built-in Constants and Operators
44474 + Three constants are built in:
44476 + * PI, whose value is the value of pi (the quotient of circumference
44477 + of any circle and its diameter, 3.141592653...) to the underlying
44478 + machine's precision;
44479 + * T, which always has the value 1, which signifies truth in Kermit
44480 + logical expressions or S-Expressions;
44481 + * NIL, which always has the empty value, and can serve as a False
44484 + These constants are specific to S-Expressions and are not visible
44485 + outside them. They may not be used as the target of an assignment. So,
44489 + assign t 0 Succeeds but this is not the same T!
44491 + E (the base of natural logarithms, 2.7182818184...) is not built in
44492 + since it is not intrinsic in most Lisp dialects. If you want E to be
44493 + the base of natural logarithms you can:
44497 + Operators are either symbols (such as "+") or words. Words must be
44498 + spelled out in full, not abbreviated. Differences of alphabetic case
44501 + The most basic operation in S-Expressions is evaluation:
44503 + EVAL [ s-expression or variable or number [ another [ another ... ] ]
44505 + Evaluates its operands and returns the value of the last one
44506 + evaluated. Examples:
44510 + (eval a) value of a
44511 + (eval (+ 1 a)) value of a+1
44512 + (eval (setq a 1) (setq b (+ a 0.5))) value of b (= a+0.5)
44514 + You can use "." as a shorthand for EVAL:
44520 + (. (setq a 1) (setq b (+ a 0.5)))
44522 + Opposite of EVAL is the operator that suppresses evaluation of its
44526 + The value (quote item) is "item". If the item is itself an
44527 + S-Expression, the result is the S-Expression with the outer
44528 + parentheses stripped. Examples:
44530 + (quote) (illegal)
44532 + (quote hello) hello
44533 + (quote (this is a string)) this is a string
44534 + (quote this is a string) (illegal)
44536 + A shorthand notation is also accepted for quoting:
44537 + 'a is equivalent to (quote a). And therefore:
44538 + '(a b c) is equivalent to (quote (a b c)).
44539 + More about quoting in [502]Section 9.8.
44542 + Is a combination of EVAL and QUOTE. It evaluates the item as an
44543 + S-Expression, and then puts quotes around the result (more
44544 + about this in [503]Section 9.8).
44546 + The following operators assign values to variables:
44548 + SETQ [ variable [ value [ variable [ value [ ... ] ] ] ] ]
44549 + Applies to global variables. For each variable given: if a
44550 + value is not given, the variable is undefined. If a value is
44551 + given, assigns the value to the variable. The value may be a
44552 + number, a variable, or anything that resolves to a number
44553 + including an S-Expression. Returns the value of the last
44554 + assignment. Examples:
44556 + (setq) Does nothing, returns NIL.
44557 + (setq a) Undefines a, returns NIL.
44558 + (setq a 1) Assigns 1 to a, returns 1.
44559 + (setq a 1 b 2) Assigns 1 to a, 2 to b, returns 2.
44560 + (setq a 1 b 2 c) Assigns 1 to a, 2 to b, undefines c, returns NIL.
44562 + To undefine a variable that is not the final one in the list, give it
44563 + a value of "()" or NIL:
44565 + (setq a () b 2) Undefines a, assigns 2 to b, returns 2.
44566 + (setq a nil b 2) Ditto.
44568 + Note that a variable can be used right away once it has a value:
44570 + (setq a 1 b a) Assigns 1 to a, the value of a (1) to b, returns 1.
44572 + The results of SETQ (when used with macro names) can be checked
44573 + conveniently with SHOW MACRO, e.g:
44577 + LET [ variable [ value [ variable [ value [ ... ] ] ] ] ]
44578 + Like SETQ, but applies to local variables. Note that "local" is
44579 + used in the Kermit sense, not the Lisp sense; it applies to the
44580 + current Kermit command level, not to the current S-Expression.
44582 + If you want to use SETQ or LET to assign a value to a backslash
44583 + variable such as \%a or \&a[2], you must double the backslash:
44586 + (setq \\%b (+ \%a 1))
44587 + (setq \\&a[2] (setq (\\%c (+ \%a \%b))))
44591 + * Double the backslash when you want to indicate the variable's
44593 + * Don't double the backslash when you want its VALUE.
44595 + See [504]Section 9.6 for a fuller explanation of variable syntax and
44598 + Here's a summary table of arithmetic operators; in the examples, a is
44601 + Operator Description Example Result
44602 + + Adds all operands (0 or more) (+ a b) 0.7
44603 + - Subtracts all operands (0 or more) (- 9 5 2 1) 1
44604 + * Multiplies all operands (0 or more) (* a (+ b 1) 3) -1.80
44605 + / Divides all operands (2 or more) (/ b a 2) -0.325
44606 + ^ Raise given number to given power (^ 3 2) 9
44607 + ++ Increments variables (++ a 1.2) 3.2
44608 + -- Decrements variables (-- a) 1
44609 + ABS Absolute value of 1 operand (abs (* a b 3)) 7.8
44610 + MAX Maximum of all operands (1 or more) (max 1 2 3 4) 4
44611 + MIN Minimum of all operands (1 or more) (min 1 2 3 4) 1
44612 + MOD (%) Modulus of all operands (1 or more) (mod 7 4 2) 1
44613 + FLOAT Convert an integer to floating-point (float 1) 1.0
44614 + TRUNCATE Integer part of floating-point operand (truncate 3.333) 3
44615 + CEILING Ceiling of floating-point operand (ceiling 1.25) 2
44616 + FLOOR Floor of floating-point operand (floor 1.25) 1
44617 + ROUND Operand rounded to nearest integer (round 1.75) 2
44618 + SQRT Square root of 1 operand (sqrt 2) 1.414..
44619 + EXP e (2.71828..) to the given power (exp -1) 0.367..
44620 + SIN Sine of angle-in-radians (sin (/ pi 2)) 1.0
44621 + COS Cosine of angle-in-radians (cos pi) -1.0
44622 + TAN Tangent of angle-in-radians (tan pi) 0.0
44623 + LOG Natural log (base e) of given number (log 2.7183) 1.000..
44624 + LOG10 Log base 10 of given number (log10 1000) 3.0
44626 + The ++ and -- operators are also assignment operators and work just
44627 + like SETQ and LET in their interpretations of operators and operands,
44630 + * Each target variable must already be defined and have a numeric
44632 + * The assignment value is the amount by which to increment or
44633 + decrement the variable.
44634 + * If an assignment value is not given, 1 is used.
44636 + If you include more than one variable-value pair in a ++ or --
44637 + expression, every variable (except, optionally, the last) must be
44638 + followed by a value. Examples:
44640 + (++ a) Equivalent to (setq a (+ a 1)) and to (++ a 1)
44641 + (++ a 2) Equivalent to (setq a (+ a 2))
44642 + (-- a (* 2 pi)) Equivalent to (setq a (- a (* 2 pi)))
44643 + (++ a 1 b 1 c 1 d) Equivalent to four SETQs incrementing a,b,c,d by 1.
44645 + Another group of operators forms the predicates. These return a "truth
44646 + value", in which 0 (or NIL) is false, and 1 or any other nonzero
44649 + Operator Description Example Result
44650 + = (or ==) Operands are equal (= 1 1.0) 1
44651 + != Operands are not equal (!= 1 1.0) 0
44652 + < Operands in strictly ascending order (< 1 2 3) 1
44653 + <= Operands in ascending order (<= 1 1 2 3) 1
44654 + > Operands in strictly descending order (> 3 2 1) 1
44655 + >= Operands in descending order (<= 3 3 2 1) 1
44656 + AND (&&) Operands are all true (and 1 1 1 1 0) 0
44657 + OR (||) At least one operand is true (or 1 1 1 1 0) 1
44658 + XOR Logical Exclusive OR (xor 3 1) 0
44659 + NOT (!) Reverses truth value of operand (not 3) 0
44661 + The Exclusive OR of two values is true if one value is true and the
44662 + other value is false.
44664 + And another group operates on bits within an integer word:
44666 + Operator Description Example Result
44667 + & Bitwise AND (& 7 2) 2
44668 + | Bitwise OR (| 1 2 3 4) 7
44669 + # Bitwise Exclusive OR (# 3 1) 2
44670 + ~ Reverses all bits (~ 3) -4
44672 + These operators coerce their operands to integer by truncation if
44673 + necessary. The result of bit reversal is hardware dependent.
44675 + The final category of operator works on truth values:
44677 + Operator Description Example Result
44678 + IF Conditional evaluation (if (1) 2 3) 2
44680 + IF (predicate) (s1) [ (s2) ]
44681 + The IF operator is similar to Kermit's IF command. If the
44682 + predicate is true (i.e. evaluates to a nonzero number), the
44683 + first S-Expression (s1) is evaluated and its value is returned.
44684 + Otherwise, if (s2) is given, it is evaluated and its value
44685 + returned; if (s2) is not given, nothing happens and the NIL
44686 + (empty) value is returned.
44688 + You can group multiple expressions in the s1 and s2 expressions using
44691 + (if (< a 0) (eval (setq x 0) (setq y 0)) (eval (setq x a) (setq y b)))
44695 + (if (< a 0) (. (setq x 0) (setq y 0)) (. (setq x a) (setq y b)))
44697 + Each operator has its own requirement as to number and type of
44698 + operands. In the following table, "number" means any kind of number --
44699 + integer or floating-point -- or a variable, function, macro, or
44700 + S-Expression that returns a number; "vname" means variable name,
44701 + "fpnumber" means a floating-point number (or anything that resolves to
44702 + one), and "integer" means integer (or anything that resolves to one).
44703 + "truthvalue" means anything that resolves to a value of zero or an
44704 + empty value (which indicates false) or a nonzero value (which
44705 + indicates true). "any" means any kind of value, including none at all.
44707 + Operator Number of operands Type of operands Returns
44708 + EVAL (.) 0 or more S-Expression Last value (default NIL)
44709 + STRING 1 S-Expression string
44710 + QUOTE (') 1 word string
44711 + SETQ 0 or more vname value pairs Last value (default NIL)
44712 + LET 0 or more vname value pairs Last value (default NIL)
44713 + + 0 or more number number (default 0)
44714 + - 0 or more number number (default 0)
44715 + * 0 or more number number (see note (1))
44716 + / 2 or more number number
44717 + ^ 2 or more number number
44718 + ++ 1 or more vname value pairs Result of last increment
44719 + -- 1 or more vname value pairs Result of last decrement
44720 + ABS 1 number number
44721 + MAX 1 or more number number
44722 + MIN 1 or more number number
44723 + MOD (%) 2 number number
44724 + FLOAT 1 number fpnumber
44725 + TRUNCATE 1 number integer
44726 + CEILING 1 number integer
44727 + FLOOR 1 number integer
44728 + ROUND 1 number integer
44729 + SQRT 1 number fpnumber
44730 + EXP 1 number fpnumber
44731 + SIN 1 number fpnumber
44732 + COS 1 number fpnumber
44733 + TAN 1 number fpnumber
44734 + LOG 1 number fpnumber
44735 + LOG10 1 number fpnumber
44736 + = (==) 1 or more number truthvalue
44737 + != 1 or more number truthvalue
44738 + < 1 or more number truthvalue
44739 + <= 1 or more number truthvalue
44740 + > 1 or more number truthvalue
44741 + >= 1 or more number truthvalue
44742 + AND (&&) 1 or more truthvalue truthvalue
44743 + OR (||) 1 or more truthvalue truthvalue
44744 + XOR 2 truthvalue truthvalue
44745 + NOT (!) 1 truthvalue truthvalue
44746 + & 1 or more number (see note 2) integer
44747 + | 1 or more number (see note 2) integer
44748 + # 2 number (see note 2) integer
44749 + ~ 1 number (see note 2) integer
44750 + IF 2 or 3 truthvalue,any,any any
44752 + Operators that don't require any arguments return the default values
44755 + 1. The value of "*", when used as an operator, is initially "1" and
44756 + the value of the most recent S-Expression thereafter, as in Franz
44757 + Lisp. This is handy when doing a series of calculations by hand:
44758 + C-Kermit>(* 13272.42 0.40)
44763 + 2. The bitwise operators coerce their operands to integer by
44766 + [ [505]Top ] [ [506]Contents ] [ [507]C-Kermit Home ] [ [508]Kermit
44768 + _________________________________________________________________
44772 + As noted elsewhere in this discussion, all backslash items (variables
44773 + such as \%a, macro parameters such as \%1, array elements such as
44774 + \&a[\%i], built-in variables such as \v(ndate), built-in functions
44775 + such as \fjoin(), macro names enclosed in \m(), \s(), or \:(), etc)
44776 + are evaluated at "top level" before the S-Expression is sent to the
44777 + S-Expression reader. To use a backslash variable as the target of an
44778 + assignment (e.g. by SETQ, LET, ++, or --), you must double the
44779 + backslash, e.g. (setq \\%r 1234). This is discussed at greater length
44780 + in the next section.
44782 + Thus S-Expression reader generally deals only with macro names (not
44783 + backslash items) as variables. It is important to understand how the
44784 + reader handles macro names. There are fundamentally two kinds of
44785 + S-Expressions: those that contain a single element, such as:
44789 + and those that contain more than one element:
44793 + If an S-Expression contains only one element, and it is the name of a
44794 + macro, the macro's definition is examined. If the definition is a
44795 + number (integer or floating-point, positive or negative), then this
44796 + becomes the value of the expression. If the definition starts with '
44797 + (apostrophe), then the quoted word or string is the value of the
44798 + expression (explained in [509]Section 9.8). Otherwise, the macro is
44799 + assumed to be composed of Kermit commands (possibly including
44800 + S-Expressions), which are executed. If the macro has a RETURN value,
44801 + or it executes an S-Expression as its last command, the result becomes
44802 + the value of the S-Expression; otherwise the result is empty.
44804 + For S-Expressions that contain more than one element, and the first
44805 + element is the name of a macro, then this macro is executed with the
44806 + arguments that are given, after the arguments are evaluated by the
44807 + S-Expression reader. Likewise, If the first element is a built-in
44808 + operator, then it is applied to the operands after they are evaluated.
44809 + In both cases, each operand is fed to the S-Expression reader
44810 + recursively for evaluation. If an operand is a number or a quoted
44811 + string, it is used as-is. But if it's a macro name, this degenerates
44812 + into the first case, and the previous paragraph applies.
44817 + (foo) Result: 123
44819 + (foo) Result: abc
44820 + define foo '(one two three)
44821 + (foo) Result: one two three
44822 + define foo return \frandom(1000)
44823 + (foo) Result: 713 (or other number)
44824 + define foo (+ a b)
44825 + (foo) Result: The sum of a and b
44827 + A more difficult example:
44830 + (foo) Result: ???
44832 + The result in the last example depends on the definition of abc:
44834 + * If it has no definition, an error occurs; otherwise:
44835 + * If the definition is an S-Expression, the result is the
44836 + S-Expression's value; otherwise:
44837 + * If the definition consists of Kermit commands, they are executed.
44838 + But in this case "(foo)" produces the empty result, because it
44839 + doesn't RETURN anything.
44841 + The use of macros as S-Expression operators is described in
44842 + [510]Section 9.8.
44844 + [ [511]Top ] [ [512]Contents ] [ [513]C-Kermit Home ] [ [514]Kermit
44846 + _________________________________________________________________
44848 + 9.6. Assignments and Scope
44850 + The assignment operators SETQ and LET apply to global and local
44851 + variables, respectively. SETQ and LET are standard Lisp operators
44852 + adapted to Kermit scoping rules. When the operands are numeric or
44853 + arithmetic, SETQ is equivalent to Kermit's EVALUATE command:
44858 + When the operand is a string, SETQ is equivalent to DEFINE:
44860 + (setq a '(this is a string))
44861 + define a this is a string
44863 + In the first case, both statements create a macro named "a" with a
44864 + value of 3. But in neither case is the macro "a" necessarily global.
44865 + If either of these commands executes in an environment (i.e. macro
44866 + invocation level) where a "local a" command has been given, the "a"
44867 + macro is global to that environment, but is not visible outside it.
44869 + LET is equivalent to the Kermit LOCAL command, followed by the
44870 + corresponding EVALUATE:
44874 + is equivalent to:
44879 + Again, "local" in this context applies to the Kermit macro invocation
44880 + stack, not to the S-Expression nesting level. To illustrate, recall
44881 + our "newarea" macro:
44884 + (let a \%1 b \%2 c \%3)
44885 + (let s (/ (+ a b c) 2.0))
44886 + (sqrt (* s (- s a) (- s b) (- s c)))
44889 + Because SETQ and LET expressions return a value, they can be placed
44890 + within a larger S-Expression. In this case we can replace the first
44891 + reference to the "s" variable by its defining expression:
44894 + (let a \%1 b \%2 c \%3)
44895 + (sqrt (* (let s (/ (+ a b c) 2.0)) (- s a) (- s b) (- s c)))
44898 + This would not work if LET were local to the S-Expression, but it
44899 + works nicely in the context of Kermit macros. The previous definition
44900 + is equivalent to:
44904 + (setq a \%1 b \%2 c \%3)
44905 + (sqrt (* (setq s (/ (+ a b c) 2.0)) (- s a) (- s b) (- s c)))
44908 + In both cases, the variables a, b, c, and s are local to the "newarea"
44909 + macro, and global within it.
44911 + Multiple assignments can be handled in several ways. Here is the
44912 + obvious way to initialize a series of variables to the same value:
44919 + Here is a more compact and efficient way of doing the same thing:
44921 + (setq a 0 b 0 c 0 s 0)
44923 + However, in case the value was more complex, it's better to put only
44924 + one copy of it in the S-Expression; in this case we rely on the fact
44925 + that SETQ returns the value of its last assignment:
44927 + (setq a (setq b (setq c (setq s (* x (^ y 2))))))
44929 + Similarly, to set a series of variables to x, x+1, x+2, ...
44931 + (setq c (+ (setq b (+ (setq a (+ (setq s x) 1)) 1)) 1))
44933 + In the last example, you can see why "last" does not always correspond
44934 + to "rightmost" (the leftmost variable "c" is assigned last).
44936 + If you are working with backslash variables like \%a or array elements
44937 + like \&a[1], remember two rules:
44938 + 1. Don't put spaces inside array brackets.
44939 + 2. You must double the backslash when using SETQ, LET, ++, or -- to
44940 + assign a value to a backslash variable.
44942 + Examples of assigning to a backslash variable:
44946 + (setq \\&a[x+1] 1)
44950 + Examples of referring to a backslash variable's value:
44952 + (setq a (+ \%a 1))
44953 + (setq b (+ \%a \&a[1]))
44957 + The special notation is required because all backslashed items (\%x
44958 + variables, array elements, built-in \v(xxx) variables, and \fxxx()
44959 + function invocations) are evaluated in a single pass BEFORE the
44960 + S-Expression is executed; any other approach would result in
44961 + unacceptable performance. So, for example, in:
44963 + declare \&a[] = 1 2 3
44966 + (setq \\%y (+ \%x \&a[1]))
44968 + the S-Expression becomes:
44970 + (setq \%y (+ 4 1))
44972 + before it is sent to the S-Expression evaluator. If the backslash had
44973 + not been doubled on the assignment target, the result would have been:
44977 + which is illegal because you can't assign a value to a number.
44978 + Conversely, if backslashes were doubled on right-hand-side values:
44980 + (setq \\%y (+ \\%x \\&a[1])
44982 + this too, would give an error (not numeric - "\%x").
44984 + If you omit the double backslash in the assignment target, the result
44985 + depends on whether the variable already has a value:
44987 + (setq \%a (* 3 3))
44989 + If \%a has a non-numeric single-word value, then this becomes the name
44990 + of the variable that is assigned by SETQ. To illustrate:
44995 + (setq \%a (* 3 3))
45001 + If \%a has no value, a numeric value, or a multiword value, an
45002 + "invalid assignment" error occurs.
45004 + [ [515]Top ] [ [516]Contents ] [ [517]C-Kermit Home ] [ [518]Kermit
45006 + _________________________________________________________________
45008 + 9.7. Conditional Expressions
45010 + The IF operator provides a compact form of decision-making within
45011 + S-Expressions. An IF expression can stand wherever a number might
45012 + stand, as long is it returns a number. Here's a quick way to obtain
45013 + the average value of all the elements in an array that contains only
45016 + (/ (+ \fjoin(&a)) (float \fdim(&a)))
45018 + This results in a "Divide by zero" error if the array is empty. If you
45019 + want to define the average value of an empty array to be 0 instead of
45020 + getting an error, you can use IF to check the array size:
45022 + (if \fdim(&a) (/ (+ \fjoin(&a)) (float \fdim(&a))) 0)
45026 + (if (not \fdim(&a)) 0 (/ (+ \fjoin(&a)) (float \fdim(&a))))
45028 + Of course, IF can fit anywhere else into an S-Expression:
45030 + (setq a (+ b (if (< c 0) 0 c)))
45032 + and the IF expression can be as complex as you like:
45034 + (setq a (+ b (if (and (or (> x 0) (> y 0)) (< c 0) (> d 1) (!= e 0)) 1 0)))
45036 + and the "then" and "else" parts can contain multiple S-Expressions
45037 + enclosed within (EVAL ...):
45039 + (if x (eval (...) (...) (...)) (eval (...) (...) (...)))
45041 + AND and OR operators are guaranteed to "short circuit". If any operand
45042 + of AND is false, none of the subsequent operands is evaluated;
45043 + likewise, if an OR operand is true, no further operands are evaluated.
45045 + Bear in mind that the S-Expression IF is not the same as Kermit IF;
45046 + the condition is only allowed to be an S-Expression or a variable or
45047 + number, not the whole list of possibilities you see when you type "if
45048 + ?" at the C-Kermit> prompt. But keep reading...
45050 + [ [519]Top ] [ [520]Contents ] [ [521]C-Kermit Home ] [ [522]Kermit
45052 + _________________________________________________________________
45054 + 9.8. Extensibility
45056 + To extend the capabilities of S-Expressions, you can use Kermit macro
45057 + names as operators, with the following limitations:
45059 + * The macro must not have the same name as a built-in operator.
45060 + * You must use the full macro name, not an abbreviation.
45062 + And with the following enhancement:
45064 + * If the last statement executed by the macro is an S-Expression,
45065 + its value is returned automatically. In other words:
45067 + define bump (++ \%1)
45069 + is equivalent to:
45071 + define bump return \fsexpression(++ \%1)
45073 + Here's an example in which we define a FIBONACCI operator that returns
45074 + the nth element, n >= 0, of the Fibonacci series, 0 1 1 2 3 5 8 13 21
45075 + 34 55, . . ., in which the first element is 0, the second is 1, and
45076 + each subsequent element is the sum of the two before it. This series
45077 + was devised by Leonardo Pisano, Filius Bonacci (Fibonacci for short)
45078 + in 1202 to describe how fast rabbits can breed, and also forms the
45079 + basis for the Golden Mean, the branching behavior of plants, the
45080 + spiral of a nautilus shell, etc. (Thanks to [523]Dat Thuc Nguyen for
45081 + December 2003 corrections to this section!)
45083 + We can write a FIBONACCI function as a macro easily with
45086 + define FIBONACCI {
45088 + (if (== \%1 1) 1 (+ (fibonacci (- \%1 2)) (fibonacci (- \%1 1)))))
45091 + You can read this as:
45093 + If the argument (\%1) is 0, return a result of 0; if it is 1,
45094 + return 1; otherwise:
45095 + return the sum of fibonacci(argument - 2) and fibonacci(argument -
45098 + Note that a RETURN statement is not needed, since S-Expressions
45099 + automatically set the return value of their containing macros.
45101 + For comparison, here's how it would be coded without S-Expressions:
45103 + define FIBONACCI {
45106 + } else if == \%1 1 {
45109 + return \feval(\fexec(fibonacci \feval(\%1-2)) -
45110 + + \fexec(fibonacci \feval(\%1-1)))
45114 + Now we can use the FIBONACCI function (whichever way you write it)
45115 + just as if it were a built-in operator:
45124 + Within S-Expressions only (not outside them), S-Expressions themselves
45125 + can be used as macro arguments:
45128 + (setq x (fibonacci (* a b )))
45130 + The value of the S-Expression (in this case "8"), and not the
45131 + S-Expression itself, is sent to the macro.
45133 + Your macro is responsible for argument validation and error handling.
45134 + A robust Fibonacci macro would be more like this:
45136 + define FIBONACCI {
45137 + if < \v(argc) 2 end 1 ?\%0: Missing argument
45138 + if > \v(argc) 2 end 1 ?\%0: Too many arguments
45139 + if not integer \%1 end 1 ?\%0: Integers only
45140 + if < \%1 1 end 1 ?\%0: Argument out of range
45142 + (if (== \%1 1) 1 (+ (fibonacci (- \%1 2)) (fibonacci (- \%1 1)))))
45145 + Recall that "END nonzero-number [ message ]" causes a macro invocation
45146 + to fail. When the macro is the operator in an S-Expression, this makes
45147 + the S-Expression fail too. Also note that our Fibonacci macro is just
45148 + an illustration, not a practical example. Since it is recursive (calls
45149 + itself), it won't work for large arguments because the call stack can
45150 + exceed available memory. See [524]Section 9.9.2 for a practical
45153 + Kermit macros, when used as S-Expression operators, can do anything at
45154 + all except initiate file transfers: they can print messages on the
45155 + screen, read and write files, interact with the user, and so on. For
45156 + example, here's a macro ASKME that asks you to enter a number, makes
45157 + sure that you did, and then returns its value for use in the
45163 + ask \%n { Number: }
45164 + if not def \%n continue
45165 + if not numeric \%n {
45166 + echo Not numeric - "\%n"
45173 + (setq a (* 2 (askme))) ; Get number from user, double it, assign result to a.
45175 + Here's a macro you can use to validate that a number is in a given
45179 + if != \v(argc) 4 end 1 ?\%0: Wrong number of arguments
45180 + if ( < \%1 \%2 || > \%1 \%3 ) return 0
45184 + The first argument is the number to be checked, the second is the
45185 + minimum acceptable value, the third is the maximum. You can use this
45186 + (for example) in IF conditions:
45188 + define yes echo \%1 IS OK
45189 + define no echo \%1 IS NOT OK
45191 + (setq a -1 b 999)
45192 + (if (inrange a 0 100) (yes a) (no a))
45193 + (if (inrange b -1000 +1000) (yes b) (no b))
45195 + This is just an illustration, of course; there's already a built-in
45196 + operator to let you do range checking without help from macros:
45198 + (if (<= 0 a 100) (yes a) (no a))
45199 + (if (<= -1000 b +1000) (yes b) (no b))
45201 + To send string parameters to a macro, some kind of quoting is required
45202 + to tell the S-Expression parser to take a given "word" literally
45203 + rather than replacing it by its value. For this we use the Lisp QUOTE
45206 + define length return \flength(\%1)
45207 + (length (quote abcdefghijklmnopqrstuvwxyz))
45210 + This causes the string "abcdefghijklmnopqrstuvwxyz" to be sent
45211 + literally to the LENGTH macro. Kermit, like Lisp, also offers a
45212 + shortcut for QUOTE, that lets us quote a word by prefixing it with a
45213 + single quote (') character, also called apostophe (ASCII 39):
45215 + (length 'abcdefghijklmnopqrstuvwxyz)
45218 + The two forms are equivalent.
45220 + How the macro treats its arguments is up to the macro. In the example
45221 + above, the argument is treated as a literal string. However, it can
45222 + also be treated as a variable name:
45224 + define string This is a string
45225 + define length return \flength(\m(\%1))
45229 + Note the construct \m(\%1). This means "the value of the macro whose
45230 + name is the value of
45231 + \%1". The value of \%1 in this case is the word "string", and the
45232 + value of the macro whose name is "string" is "This is a string".
45234 + What if the macro takes multiple arguments, or a variable number of
45235 + them? Here's a simple macro that prints a phrase that includes its
45238 + define complain echo It's too \%*!
45240 + (Recall that \%* means "all arguments".)
45242 + It can be called in the traditional way:
45244 + complain hot Result: "It's too hot!"
45245 + complain cold and wet Result: "It's too cold and wet!"
45247 + Or from an S-Expression if you quote the arguments:
45249 + (complain 'hot) Result: "It's too hot!"
45250 + (complain 'cold 'and 'wet) Result: "It's too cold and wet!"
45252 + To group multiple words into a single argument, use parentheses:
45254 + (complain (quote (cold and wet))) Result: "It's too cold and wet!"
45255 + (complain '(cold and wet)) Result: "It's too cold and wet!"
45257 + Note the difference:
45259 + (complain 'cold 'and 'wet) Three arguments
45260 + (complain '(cold and wet)) One argument
45262 + Since the COMPLAIN macro uses \%* to refer to all its arguments, no
45263 + matter how many, it doesn't care which form you use. But it makes a
45264 + difference in cases where the macro refers to its arguments
45267 + To illustrate, let's consider a macro that receives the name of a
45268 + macro and its argument list and executes it with its arguments,
45269 + without knowing how many arguments there are. The following LOOP macro
45270 + is used to execute the given macro with the given argument list the
45271 + requested number of times:
45273 + def loop { local i, for i 1 \%1 1 do \%2 \%3 }
45275 + Within the LOOP macro, the first argument (\%1) is the loop count, \%2
45276 + is the macro name, and \%3 is the argument list. When the LOOP macro
45277 + is invoked traditionally like this:
45279 + loop 3 complain hot
45281 + it prints "It's too hot!" three times. To invoke it from an
45282 + S-Expression, you must quote both the macro name as well as the
45283 + argument, since in this case the macro name itself is an argument:
45285 + (loop 3 'complain 'hot)
45287 + Now what if you need to send different or variable numbers of
45288 + arguments to the LOOP macro? The LOOP macro can handle it already,
45289 + provided you group the arguments into LOOP's third argument (\%3). In
45290 + Kermit syntax, without grouping:
45292 + loop 3 complain cold and wet
45294 + prints "It's too cold!" three times ("and wet" is lost); but with
45295 + grouping (either of the following two forms):
45297 + loop 3 complain {cold and wet}
45298 + loop 3 complain "cold and wet"
45300 + the LOOP macro prints "It's too cold and wet!" three times as desired.
45302 + To do the same thing in an S-Expression, just use the Lisp forms of
45303 + quoting instead of the Kermit forms; the following two are equivalent:
45305 + (loop 3 'complain (quote (cold and wet)))
45306 + (loop 3 'complain '(cold and wet))
45308 + Here's a similar example in which we write a macro that shows both the
45309 + name and the value of one or more other macros, whose names are given
45310 + as arguments (similar to "show macro"):
45314 + for \%i 1 \v(argc)-1 1 {
45315 + echo \&_[\%i] = \m(\&_[\%i])
45319 + (Recall that \&_[] is the macro's argument vector array, equivalent to
45320 + \%1, \%2, ...) The DISPLAY macro can be used in S-Expressions like
45323 + (setq a 1 b 2 c 3)
45324 + (display 'a 'b 'c 'd)
45333 + The names must be quoted to prevent their evaluation before they are
45334 + sent to the macro. This ability to pass variables "by name" to macros,
45335 + rather than by value, lets you write macros that change the values of
45336 + argument variables. For example, here's a macro that doubles the value
45337 + of its argument variable:
45339 + define double (++ \%1 \%1)
45341 + which you can call like this:
45346 + In the macro, \%1 is replace by the variable name "a"; "(++ a a)" adds
45347 + "a" to itself, and sets the value of "a" to the result.
45349 + There are no built-in operators other than QUOTE, ', and STRING for
45350 + handling strings in S-Expressions, but using just these, plus macros
45351 + that use Kermit's regular string-handling features, you can easily
45352 + extend S-Expressions to do string manipulation:
45354 + define len return \flen(\%1) Returns length of argument string
45355 + define cap return \fupper(\%1) Uppercase argument string
45356 + define rev return \freverse(\%1) Reverses argument string
45357 + define sub return \fsubstr(\%1,\%2,\%3) Returns substring of arg string
45359 + (len '(this is a string)) Result: 16
45360 + (rev '(this is a string)) Result: gnirts a si siht
45361 + (rev (cap '(this is a string))) Result: GNIRTS A SI SIHT
45362 + (sub (rev (cap '(this is a string))) 5 9) Result: TS A SI S
45364 + You can assign a string to a macro name as follows:
45366 + (setq foo '(this is a string))
45367 + (setq foo (quote (this is a string)))
45369 + The two are exactly equivalent. In both cases, the macro "foo" has the
45372 + '(this is a string)
45374 + so when it is retrieved it can be identified as a string rather than a
45375 + number or commands to be executed. Thus:
45377 + (setq foo (quote (this is a string)))
45379 + foo = '(this is a string)
45383 + Note the different results for "show macro foo" and "(foo)". The
45384 + former shows the internal definition; the latter evaluates the
45385 + variable, which removes the quoting. And perhaps more important, note
45386 + that if the apostrophe and surrounding parentheses were not stored as
45387 + part of the definition, (foo) would try to execute "this is a string"
45390 + Given the assignment above, the following work as expected:
45392 + (len foo) Result: 16
45393 + (rev foo) Result: gnirts a si siht
45394 + (rev (cap foo)) Result: GNIRTS A SI SIHT
45395 + (sub (rev (cap foo)) 5 8) Result: TS A SI S
45397 + Note that, unlike built-in S-Expression operators that return numbers
45398 + or truth values, these operators return strings. If you want to assign
45399 + their return values to other variables, you can do so:
45401 + (setq bar (rev (cap foo))) Result: GNIRTS A SI SIHT
45403 + But now the S-Expression processor doesn't know the value of "bar" is
45404 + supposed to be a string, rather than a macro to execute. For this you
45405 + need one final special operator, STRING. The STRING operator takes an
45406 + S-Expression as an operand, evaluates it, and then returns its value
45407 + enclosed in '(), so you can use the value as a string is subsequent
45408 + S-Expressions. Use STRING for referencing macros that return strings:
45410 + (setq bar (string (rev (cap foo)))) Result: '(GNIRTS A SI SIHT)
45412 + STRING is like QUOTE, except that it evaluates its operand before
45413 + applying the quoting, rather than taking the operand literally.
45415 + To reference backslash variables or functions that return string
45416 + values, you must use the regular quoting mechanisms:
45418 + (setq time '(\v(time)))
45419 + (setq date '(\v(date)))
45420 + assign \%r this is a string
45423 + That's because backslash items are evaluated BEFORE the S-Expression
45424 + parser ever sees them, and the values of \v(time) and so on are not
45425 + valid S-Expressions, so STRING won't like them.
45427 + Finally a brief word on the touchy topic of quoting. Suppose you want
45428 + to include (say) literal parentheses in a string that will later be
45429 + processed by the S-Expression reader (or \fsplit() or \fword()).
45430 + Normally, you can't do this because parentheses are meaningful in
45431 + these contexts. To defeat the normal parsing rules, you can quote the
45432 + parentheses with backslash. However, due to the many levels of string
45433 + processing involved, a surprisingly large amount of backslashes might
45434 + be required, for example:
45436 + (setq s '(a b (c d) \\\\\\\\\\\\\\\\(e f (g h) x\\\\\\\\\\\\\\\\) j k))
45438 + This is nearly impossible to explain(*). Instead, just remember two
45441 + * In situations like this, it's better to use DEFINE to create the
45442 + string, rather than SETQ. The example above requires only double
45443 + backslashes when DEFINE is used:
45444 + define s '(a b (c d) \\(e f (g h) x\\) j k)
45445 + * The level of quoting depends on how many levels of evaluation the
45446 + string must pass through, which is not always obvious. However,
45447 + the number of backslashes required in any given situation is
45448 + always a power of 2. So if 1 doesn't work, try 2; if 2 doesn't
45449 + work, try 4; if 4 doesn't work, try 8, 16, 32, and so on.
45451 + Considerations like this apply in any scripting language (shell, Tcl,
45452 + Perl, Python, etc). The situation is known as "Quoting Hell".
45454 + (*) If you really want an explanation, here it is:
45456 + * Every SEXP has its backslash items evaluated in a single pass at
45457 + top level before being passed to the SEXP reader, so \%1,
45458 + \v(ftime), etc, can be evaluated up front, freeing the SEXP reader
45459 + of having to know about such things, which in turn makes it much
45460 + more efficient. Therefore one level of quoting is lost right away,
45461 + and therefore you must double each backslash that is to be used as
45463 + * When the SEXP reader sees '\', it treats it as a quote; discards
45464 + it and keeps the next character. Thus '\\' becomes '\'. This would
45465 + be the end of it, except that:
45466 + * The SEXP reader must call itself recursively on its operands, so
45467 + we must double any quotes in the operands: 2^2 = 4.
45468 + * If the result is to be passed as an argument to a macro, the
45469 + backslashes must again be doubled, because the macro processor
45470 + evaluates the arguments before sending them to the macro: 2^3 = 8.
45471 + * If the macro itself is to see the quotes, rather than just the
45472 + result of the quoting, the quotes must be doubled again: 2^4 = 16.
45474 + Moral: To create string constants in which grouping characters must be
45475 + quoted, use DEFINE rather than SETQ.
45477 + [ [525]Top ] [ [526]Contents ] [ [527]C-Kermit Home ] [ [528]Kermit
45479 + _________________________________________________________________
45483 + 9.9.1. Statistics
45485 + The following program computes statistics -- means, maxima, mimima,
45486 + variance, standard deviation, and correlation -- from data stored in
45487 + parallel arrays, \&x[] and \&y[], which can contain any mixture of
45488 + integer and floating-point numbers: positive, negative, or zero. Array
45489 + setup and validation are not shown. Except for the traditional FOR
45490 + loop and printing the results at the end, the entire computation is
45491 + done with S-Expressions:
45493 +; Initialize sums, maxima, minima, and number of elements
45495 + (setq xsum 0 ysum 0 xsum2 0 ysum2 0 xysum 0)
45496 + (setq xmin (setq xmax \&x[1]) ymin (setq ymax \&y[1]))
45497 + (setq n \fdim(&x))
45499 +; Loop through elements and accumulate sums, maxima, and minima
45502 + (setq x \&x[i] y \&y[i]) ; Notational convenience
45503 + (setq xmax (max xmax x) ymax (max ymax y)) ; X and Y maxima
45504 + (setq xmin (min xmin x) ymin (min ymin y)) ; X and Y minima
45505 + (++ xsum x ysum y) ; X and Y sums
45506 + (++ xsum2 (^ x 2) ysum2 (^ y 2)) ; Sum of X and Y squares
45507 + (++ xysum (* x y)) ; Sum of XY products
45510 +; Calculate results
45512 + (setq xmean (/ xsum n) ymean (/ ysum n)) ; Mean X and Y
45513 + (setq xss (- xsum2 (/ (^ xsum 2) n))) ; Intermediate values
45514 + (setq yss (- ysum2 (/ (^ ysum 2) n)))
45515 + (setq xyss (- xysum (/ (* xsum ysum) n)))
45516 + (setq xvar (/ xss n) yvar (/ yss n)) ; X and Y variance
45517 + (setq sdx (sqrt xvar) sdy (sqrt yvar)) ; Std deviation in X and Y
45518 + (setq tmp (* xss yss))
45519 + (setq cc (if tmp (/ xyss (sqrt tmp)) 1.0)) ; Correlation coefficient
45520 + show macro xmean ymean xvar yvar sdx sdy cc ; Print the results
45522 + The final "if tmp" check accounts for the possibility that both arrays
45523 + contain all 0's. Results can also be printed with "echo CC = \m(cc)",
45524 + or any other desired way. Interestingly, if we had not needed the sum
45525 + of the squares and products, we could have obtained the sums, maxima,
45526 + and minima of the X's and Y's without a loop like this:
45528 + (setq xsum (+ \fjoin(&x)) ysum (+ \fjoin(&y)))
45529 + (setq xmax (max \fjoin(&x)) ymax (max \fjoin(&y)))
45530 + (setq xmin (min \fjoin(&x)) ymin (min \fjoin(&y)))
45532 + Any Kermit function that returns numbers or lists of numbers can be
45533 + included in an S-Expression as an operand.
45534 + _________________________________________________________________
45536 + 9.9.2. Practical Fibonacci Series
45538 + The recursive Fibonacci example given previously is simple and
45539 + elegant, but not very useful since it causes memory occupation to grow
45540 + each time it calls itself, until eventually both physical memory and
45541 + disk swap space are filled and the program crashes. Even for small
45542 + arguments, like 17, execution time can be prohibitive:
45544 + (setq t1 \v(ftime))
45545 + (setq result (fibonacci 17))
45546 + (setq t2 (- \v(ftime) t1))
45547 + echo FIBONACCI(17) = \m(result): TIME = \ffpround(t2,3)
45549 + prints (on a certain rather slow computer):
45551 + FIBONACCI(17) = 1597: TIME = 5.861
45553 + Any recursive function can be recoded iteratively. The result is not
45554 + as pretty, but execution is far less expensive:
45557 + (if (== \%3 0) (\%2) (fibiter (+ \%1 \%2) \%1 (- \%3 1)))
45559 + define FIBONACCI {
45560 + (fibiter 1 0 \%1)
45563 + Here's the result on the same computer for the same argument of 17:
45565 + FIBONACCI(17) = 1597: TIME = 0.015
45567 + (47 times faster.) Execution time increases proportionally to the size
45568 + of the argument in the iterative case, whereas in the recursive case
45569 + it goes up geometrically, quickly reaching infinity.
45571 + [ [529]Top ] [ [530]Contents ] [ [531]C-Kermit Home ] [ [532]Kermit
45573 + _________________________________________________________________
45575 + 9.10. Differences from Algebraic Notation
45579 + * Algebraic notation uses infix operators and normal rules of
45580 + operator precedence, with parentheses used to force exceptions to
45581 + the rules; many operations can be included in an expression.
45582 + S-Expressions use prefix operators with no intrinsic precedence;
45583 + each operation is enclosed in parentheses, and the arrangement of
45584 + parentheses determines precedence.
45585 + * Algebraic infix operators require two operands; S-Expression
45586 + prefix operators can accept a variable number of operands.
45587 + * You can use algebraic notation anywhere that C-Kermit accepts a
45588 + number, e.g. "echo \&a[((1+1)*2-1]", but you can use S-Expressions
45589 + only as top-level commands. You can, however, use either algebraic
45590 + or S-Expressions anywhere at all by enclosing them in \fevaluate()
45591 + or \fsexpression(), respectively.
45592 + * You can use any mixture of integer and floating-point numbers in
45593 + S-Expressions, but only integers are permitted in algebraic
45594 + expressions. Outside of S-Expressions, floating point arithmetic
45595 + is supported only by \ffp...() function calls.
45596 + * Operators and operands in S-Expressions must be separated by
45597 + spaces, e.g. "(+ a b)". Spaces are not required in algebraic
45598 + expressions: "((a+b)*c)".
45599 + * When assigning values to backslash variables (such as \%x or
45600 + \&a[2]) using SETQ or LET, you must double the backslash.
45602 + [ [533]Top ] [ [534]Contents ] [ [535]C-Kermit Home ] [ [536]Kermit
45604 + _________________________________________________________________
45606 + 9.11. Differences from Lisp
45608 + * Kermit has a lot of built-in operators not found in Lisp: ++, ^,
45610 + * Most dialects of real Lisp do not allow S-Expressions that don't
45611 + start with an operator, for example:
45613 + This expression can cause an error in Lisp (even if "a" has a
45614 + value), but is acceptable in Kermit, where it returns the value of
45615 + the variable "a". Similarly, (1) returns the value "1".
45616 + * In real Lisp, EVAL requires exactly one operand. In Kermit, it can
45617 + have 0, 1, 2, or more operands. It returns the value of the last
45618 + operand evaluated.
45619 + * Real Lisp SETQ and LET usually require an even number of operands.
45620 + Kermit allows an odd number, in which case the last (or only)
45621 + variable is undefined (i.e. deleted, destroyed).
45622 + * Kermit does not support ratios such as "7/8". Some Lisp dialects
45623 + accept ratios as numbers, and generate ratios when told to divide
45624 + two integers whose quotient is not a whole number; e.g. in Common
45626 + [13] USER(37): (/ (+ 1 2 3 4) 3)
45629 + * The result of (/ 10 3) is 3.333.... Some Lisp dialects truncate
45630 + the result to 3 since both operands are integers, some don't; some
45631 + give the result as a ratio. C-Kermit always gives a floating point
45632 + result when there is a fractional part. If you want an integer
45633 + result, you can use TRUNCATE, FLOOR, or CEILING, e.g. (truncate (/
45635 + * There is currently no "bignum" support. Large numbers can be used
45636 + and large results generated, but (as noted in [537]Section 9.2)
45637 + they are accurate only to the precision of the underlying machine.
45638 + \v(math_precision) gives the machine precision as a number of
45639 + decimal digits, e.g. 16.
45640 + * Scientific notation for floating-point numbers is not supported.
45641 + If the magnitude of a number is greater than the precision of the
45642 + underlying hardware, the less-significant digits are shown but
45643 + their values are meaningless. If it the number is too small to be
45644 + represented internally, it is shown as "0.0".
45645 + * Many Lisp features are omitted: List processing (CAR, CDR, etc),
45646 + DEFUN, Lisp-specific control structures, and so on.
45648 + [ [538]Top ] [ [539]Contents ] [ [540]C-Kermit Home ] [ [541]Kermit
45650 + __________________________________________________________________________
45654 + New commands and switches:
45656 + SET TRANSFER REPORT { OFF, ON }
45657 + Enables or disables the (new) one-line message printed by
45658 + Kermit after a remote-mode file transfer to indicate the source
45659 + and destination file, complete with path, to let you know where
45662 + SEND /TYPE:{TEXT,BINARY}
45663 + Sends only files of the given type (see [542]Section 4).
45665 + SEND /NOFOLLOWLINKS:
45666 + (UNIX only) Skip over symbolic links rather than following them
45667 + (default). This applies to wildcard and/or recursive SENDs; if
45668 + a single filename is given, and it happens to be a symbolic
45669 + link, the file it points to is sent.
45671 + SEND /FOLLOWLINKS:
45672 + (UNIX only) Follow (resolve) symbolic links. Watch out for
45673 + circular links, endless loops, etc.
45675 + SET SEND I-PACKETS { OFF, ON }
45676 + When sending commands to a Kermit server, this tells whether
45677 + command packets should be preceded by an I (information)
45678 + packet, which is used to synchronize parameters prior to
45679 + executing the command. Normally ON. The only reason to set this
45680 + OFF is for communicating with buggy Kermit servers that
45681 + misbehave when an I packet is sent to them. There is also a SET
45682 + RECEIVE I-PACKETS command, but presently it has no effect.
45684 + SET TRANSFER MESSAGE [ text ]
45685 + Sets an initial message to be shown in the Last Message field
45686 + of the fullscreen file-transfer display.
45688 + SET TRANSFER TRANSLATION { ON, OFF }
45689 + Inhibits or re-enables text-file transfer character-set
45690 + translation globally.
45692 + { SEND, MSEND, GET, RECEIVE } /TRANSPARENT
45693 + Inhibits character-set translation for this transfer only.
45695 + { GET, RECEIVE } /PIPES:{ON,OFF}
45696 + Overrides global TRANSFER PIPES setting for this transfer only;
45697 + ON allows incoming files with names like "!tar xf -" to be
45698 + opened as pipelines rather than regular files.
45700 + The following new "hot keys" are available when Kermit's file-transfer
45701 + display is visible:
45703 + D: Turn on debugging, open "debug.log" if not already open.
45704 + d: Turn off debugging but leave log open (if it was open).
45705 + T: Turn on debug-log timestamps.
45706 + t: Turn off debug-log timestamps.
45708 + Other improvements:
45709 + * SET FILE DOWNLOAD-DIRECTORY now works for external protocols (e.g.
45711 + * Improved automatic per-file text/binary switching, described in
45713 + * When sending a file group (e.g. "send *.*"), failure to open a
45714 + file is no longer fatal; now C-Kermit simply goes ahead to the
45716 + * Transaction log entries are now made for external protocols too.
45718 + [ [544]Top ] [ [545]Contents ] [ [546]C-Kermit Home ] [ [547]Kermit
45720 + __________________________________________________________________________
45722 +11. MODEMS AND DIALING
45724 + In C-Kermit 8.0, the default modem type for dialing has changed from
45725 + NONE (= DIRECT, meaning no modem) to GENERIC. This change should have
45726 + no impact on direct connections. For dialing, it means that, unless
45727 + you SET MODEM TYPE to a specific type, such as USROBOTICS or CONEXANT,
45730 + 1. The modem uses the Hayes AT command set.
45731 + 2. The modem supports error correction, data compression, and
45732 + hardware flow control and is already configured to use them.
45734 + In fact, Kermit assumes the modem is completely configured, and
45735 + therefore does not send it an initialization string or any
45736 + configuration commands. Instead, it sends only the simplest and most
45737 + portable commands:
45739 + ATQ0V1 Give dial result codes.
45740 + ATDTnumber Dial the number.
45742 + (or ATD or ATDP, as appropriate).
45744 + The new defaults work for direct connections and for most modern
45745 + modems on most platforms, and they work much faster than
45746 + "full-treatment" dialing. If the new defaults don't work for you, or
45747 + if you need to perform explicit modem configuations or interactions,
45748 + then set a specific modem type and use the SET MODEM and SET DIAL
45749 + commands as documented in Using C-Kermit.
45751 + WARNING: Don't use the generic modem on hosts that do not support
45752 + RTS/CTS flow control. If Xon/Xoff is in use on the serial port,
45753 + you'll need to select a particular modem type so Kermit knows what
45754 + command to give it to enable Xon/Xoff flow control between itself
45755 + and your serial port.
45757 + The following new modem types were added in C-Kermit 8.0:
45759 + lucent: Lucent Venus chipset
45760 + pctel: PCTel V.90 chipset
45761 + conexant: Conexant (ex-Rockwell) modem family
45762 + zoom-v32bis: New name for "Zoom"
45763 + zoom-v34 Zoom V.34
45764 + zoom-v90 Zoom V.90 56K
45765 + zoom-v92: Zoom V.92 with V.44 data compression
45766 + zoltrix-v34: New name for "zoltrix"
45767 + zoltrix-hsp-v90: Synonym for PCTel
45768 + zoltrix-hcf-v90: Synonym for ITU-T-V250
45769 + smartlink-v90: Synonym for usrobotics (same chipset)
45770 + acer-v90: Synonym for Rockwell-v90
45772 + New DIAL-related variables:
45774 + \v(dm_hf): Dial modifier: Wait for Hook-Flash.
45775 + \v(dm_wb): Dial modifier: Wait for Bong.
45777 + Finally, if dialing fails, Kermit now prints a context-sensitive hint
45778 + suggesting possible reasons and remedies.
45780 + Added in C-Kermit 8.0.201: Rudimentary support for Caller ID, for
45781 + use with the ANSWER command. If the modem reports Caller ID
45782 + information, Kermit stores it in variables that you can access after
45783 + the call is answered:
45785 + \v(callid_date) The date of the call
45786 + \v(callid_time) The time of the call
45787 + \v(callid_name) The name of the caller
45788 + \v(callid_nmbr) The telephone number of the caller
45789 + \v(callid_mesg) A message
45791 + The format of these items depends on the originating and answering
45792 + phone companies and the modems and their configuration.
45794 + Not very many modems support Caller ID, and those that do (a) tend to
45795 + have it disabled by default, and (b) use different commands to enable
45796 + it. A quick survey shows of some current models shows:
45799 + - ITU-T V.250: No
45800 + - Lucent Venus: No
45801 + - Diamond Supra: #CID=1
45802 + - Rockwell 56K: #CID=1
45804 + - Zoltrix: +VCID=1
45805 + - Conexant: +VCID=1
45807 + To use Kermit's Caller ID feature, you have to set the modem to wait
45808 + for at least two rings before answering, and you have to give the
45809 + command to enable Caller ID; for example (after choosing a modem with
45812 + set modem command autoanswer on ATS0=2#CID=1\{13}
45813 + set modem command autoanswer on ATS0=2+VCID=1\{13}
45815 + These commands can be undone with:
45817 + set modem command autoanswer on ATS0=1#CID=0\{13}
45818 + set modem command autoanswer on ATS0=1+VCID=0\{13}
45820 + Kermit presently has no built-in knowledge of the Caller ID
45821 + capabilities or commands of the modems in its database.
45823 + Since the variables can be accessed only after the call is answered,
45824 + the only way to refuse a call is to answer it, inspect the variables,
45825 + and then hang it up if desired.
45827 + [ [548]Top ] [ [549]Contents ] [ [550]C-Kermit Home ] [ [551]Kermit
45829 + __________________________________________________________________________
45831 +12. TERMINAL CONNECTION
45833 + Now that 7-bit connections are no longer the norm, the default
45834 + terminal bytesize (also called "data size" or "word size") in C-Kermit
45835 + 8.0 is 8 bits, rather than 7 bits as it was in C-Kermit 7.0 and
45838 + SET ESCAPE character
45839 + This command, which specifies your CONNECT-mode escape
45840 + character, allows you to specify any ASCII control character in
45841 + a variety of formats. C-Kermit 8.0.201 now also lets you
45842 + specify any 8-bit value, 128-255, as the escape character. In
45843 + the SET ESCAPE command, you can type the 8-bit character
45844 + literally or you can enter its numeric code. Here are examples
45845 + that you can enter from a terminal or console that uses the ISO
45846 + Latin-1 character set:
45848 + C-Kermit> set escape Ã
45849 + C-Kermit> set escape 195
45850 + C-Kermit> show escape
45851 + Escape character: Code 195 (Ã): enabled
45854 + Both of these commands set the escape character value to 195
45855 + (decimal), which happens to be uppercase letter A with Tilde in
45856 + Latin-1. SHOW ESCAPE and SHOW TERMINAL show the value, as does
45857 + the CONNECT message.
45859 + SET TERMINAL AUTODOWNLOAD ERROR { STOP, CONTINUE }
45860 + When Kermit has a terminal connection to another computer, and
45861 + a file transfer is initiated automatically because a Kermit
45862 + packet was received in CONNECT mode (i.e. in the terminal
45863 + screen), this command tells what Kermit should do if the
45864 + transfer fails. The default is to STOP, which leaves Kermit in
45865 + command mode with its file-transfer display showing, so you can
45866 + see that the transfer failed and why. If you SET TERMINAL
45867 + AUTODOWNLOAD ERROR CONTINUE, this causes Kermit to return
45868 + automatically to its terminal screen (i.e. resume its CONNECT
45869 + session) as if the transfer had succeeded; this can be
45870 + desirable if the entire session is under control of a
45871 + host-based script.
45873 + SET TERMINAL BYTESIZE { 7, 8 }
45874 + The byte size to use during CONNECT and INPUT command
45875 + execution, which can be more restrictive than the bytesize
45876 + implied by the current PARITY setting, but not less
45877 + restrictive. In C-Kermit 7.0 and earlier, the terminal bytesize
45878 + was 7 by default to protect against the likelihood that parity
45879 + was in use on the connection without the user's knowledge. When
45880 + the terminal bytesize is 8 (as it is in C-Kermit 8.0 and
45881 + later), the user will see garbage in this (increasingly
45882 + unlikely) situation. Note that 8 data bits are required for
45883 + most character sets other than ASCII: Latin-1, UTF-8, and so
45886 + A new command has been added to produce timestamped session logs:
45888 + SET TERMINAL SESSION-LOG TIMESTAMPED-TEXT
45889 + Records the terminal session in text mode (like SET TERMINAL
45890 + SESSION-LOG TEXT) but adds a timestamp at the beginning of each
45891 + line. The timestamp format is hh:mm:ss.nnn, and indicates the
45892 + time at which the first character of the line appeared.
45894 + In most UNIX versions (those built with the select()-capable CONNECT
45895 + module -- pretty much all the ones that have or could have TELNET
45896 + included), an idle timeout feature has been added:
45898 + SET TERMINAL IDLE-TIMEOUT number
45899 + If the number is not 0, then Kermit is to take an action when
45900 + the given amount of time passes with no activity during CONNECT
45901 + mode. If the number is positive it is the maximum number of
45902 + idle seconds; if number is negative it represents milliseconds
45903 + (thousandths of seconds). If 0 is given as the number, there
45904 + are no idle timeouts. Synonym: SET TERMINAL IDLE-LIMIT.
45906 + SET TERMINAL IDLE-ACTION { RETURN, HANGUP, EXIT, OUTPUT [ string ] }
45907 + The action to be taken upon an idle timeout in CONNECT mode.
45908 + RETURN to the prompt, HANGUP the connection, EXIT from Kermit,
45909 + or OUTPUT the given string (if no string is given, a NUL (ASCII
45910 + 0) character is sent).
45912 + SET TERMINAL IDLE-ACTION { TELNET-NOP, TELNET-AYT }
45913 + Actions that can be selected on Telnet connections only, that
45914 + might be useful if idle limits are enforced by the Telnet
45915 + server or in the TCP/IP protocol: TELNET-NOP sends a "NO
45916 + Operation" (do-nothing) command, which causes no response from
45917 + the server; TELNET-AYT sends an "Are You There" message to the
45918 + server, which should make the server send back a message.
45919 + Neither of these actions interferes with your remote session.
45921 + SET TERMINAL IDLE-ACTION is useful for connections to hosts or
45922 + services that automatically log you out after a certain amount of idle
45925 + set term idle-timeout 300
45926 + set term idle-action output \32
45928 + sends a space (as if you had pressed the space bar) every 300 seconds
45929 + (five minutes) while there is no activity (32 is the ASCII code for
45932 + When C-Kermit returns from CONNECT to command mode, the reason for the
45933 + transition is given in a new variable, \v(cx_status):
45935 + 0 No CONNECT command given yet.
45936 + 1 User escaped back manually.
45937 + 2 A trigger string was encountered.
45938 + 3 IKSD entered server mode.
45939 + 4 Application Program Command received from host.
45941 + 6 Telnet protocol error.
45942 + 7 Keystroke macro.
45943 + 8 Time limit exceeded.
45944 + 100 Internal error.
45945 + 101 Carrier required by not detected.
45946 + 102 I/O error on connection.
45947 + 103 Disconnected by host.
45948 + 104 Disconnected by user.
45949 + 105 Session limit exceeded.
45950 + 106 Rejected due to Telnet policy.
45951 + 107 Received kill signal.
45953 + Values 100 and above indicate there is no connection.
45955 + [ [552]Top ] [ [553]Contents ] [ [554]C-Kermit Home ] [ [555]Kermit
45957 + __________________________________________________________________________
45959 +13. CHARACTER SETS
45961 + See the section on [556]file scanning above, and the section on
45962 + character-set conversion in [557]FTP. Also:
45964 + * True support for CP1252 (rather than treating it as Latin-1).
45965 + * Proper handling of C1 values when converting ISO 8-bit text to
45967 + * TYPE /CHARACTER-SET: /TRANSLATE-TO: allows specific translations.
45968 + * The TRANSLATE command now works on multiple files.
45969 + * K_CHARSET environment variable to set the file character-set.
45970 + * SET TRANSFER TRANSLATION OFF.
45971 + * FTP client character-set translation ([558]Section 3.7).
45973 + [ [559]Top ] [ [560]Contents ] [ [561]C-Kermit Home ] [ [562]Kermit
45975 + __________________________________________________________________________
45977 +14. DIALOUT FROM TELNET TERMINAL SERVERS
45979 + For years, C-Kermit has supported dialing out from Telnet modem
45980 + servers (also called reverse terminal servers or access servers), but
45981 + until now there was no way for Kermit to control the communication
45982 + parameters (speed, parity, etc) on the serial port of the terminal
45983 + server; it had to use whatever was there.
45985 + But now, if you make a connection to a server that supports the Telnet
45986 + Com Port Control Option, [563]RFC 2217, you have the same degree of
45987 + control as you would have over a serial port on the computer where
45988 + Kermit is running: SET SPEED, SET FLOW, SET PARITY, SET STOP-BITS,
45989 + SHOW COMM, WAIT, SET CARRIER-WATCH, the modem-signal variables,
45990 + sending Break, and so on, apply to the connection between the terminal
45991 + server and the modem.
45993 + For example, using a Cisco Access Server 2509, where specifying a TCP
45994 + port in the 6000's selects a serial port that can be used for dialing
45997 + set host xxx 6001 ; xxx is the IP hostname or address of the server
45998 + (log in if necessary) ; With a script or by hand
45999 + set modem type usr ; Tell Kermit what kind of modem it has
46000 + set speed 57600 ; This affects the server's port
46001 + set flow rts/cts ; Ditto
46004 + The modem server might or might not require a login sequence. It might
46005 + also allow for automatic authentication, e.g. via Kerberos tickets.
46006 + NOTE: If the modem server requires a login sequence, then REDIAL might
46007 + not work as expected.
46009 + When you have a Telnet Com Port connection, your SET SPEED and SET
46010 + FLOW options change automatically to reflect the capabilities of the
46011 + server, rather than those of your local computer.
46013 + See the configuration manual for your server for additional
46014 + information. For example, how to set up the server to drop the Telnet
46015 + connection automatically when the telephone call is hung up (e.g.
46016 + "autohangup" on Cisco models).
46018 + For a Linux-based Telnet Com-Port server, click the Srdird link:
46020 + [ [564]Top ] [ [565]Contents ] [ [566]Sredird ] [ [567]C-Kermit Home ]
46021 + [ [568]Kermit Home ]
46022 + __________________________________________________________________________
46024 +15. COPING WITH BROKEN KERMIT PARTNERS
46026 + There are lots of faulty Kermit protocol implementations out there,
46027 + found mainly in 3rd-party products ranging from communications
46028 + software packages to file-transfer functions imbedded within devices.
46029 + This topic is covered [569]HERE for C-Kermit 7.0, but C-Kermit 8.0
46030 + adds some additional tricks.
46032 + SET ATTRIBUTE RECORD-FORMAT { ON, OFF }
46033 + Allows control of the Kermit's Record-Format attribute. Set
46034 + this to OFF in case incoming file are refused due to unknown or
46035 + invalid record formats if you want to accept the file anyway.
46037 + SET SEND I-PACKETS { ON, OFF }
46038 + A Kermit server is supposed to accept I-packets; this is how
46039 + the client lets the server know its capabilities and
46040 + preferences before sending a command. Apparently there is at
46041 + least one Kermit server implementation that does not accept
46042 + I-packets, and does not properly respond with an Error packet
46043 + if it gets one. To get around such situations in C-Kermit 8.0,
46044 + you can use SET SEND I-PACKETS OFF to inhibit the sending of I
46045 + packets. In this case, the client must be able to adjust to the
46046 + server's configuration, rather than the other way around as we
46049 + SET PROTOCOL KERMIT {} {} {}
46050 + C-Kermit 6.0 and later automatically send "autoupload" and
46051 + "autodownload" commands when in local mode and you give a file
46052 + transfer command. For example, if you tell kermit to "send
46053 + oofa.txt", Kermit sends "kermit -r" and a carriage return, in
46054 + case you had forgotten to start Kermit on the far end and told
46055 + it to receive a file. If a Kermit program had already been
46056 + started on the far end, it should harmlessly absorb this
46057 + string. However, some Kermit programs violate the Kermit
46058 + protocol definition and treat such strings as Kermit packets
46059 + even though they are not. In such cases, give this command to
46060 + set the Kermit protocol autoupload and download strings to
46061 + nothing, which tells Kermit not to send them. (This is not a
46062 + new feature, but it was not previously included in the "Coping"
46063 + section of the documentation.)
46065 + [ [570]Top ] [ [571]Contents ] [ [572]C-Kermit Home ] [ [573]Kermit
46067 + __________________________________________________________________________
46069 +16. NEW COMMAND-LINE OPTIONS
46071 + kermit -h Now prints a complete listing of its command-line options,
46072 + rather than an abbreviated list squeezed into a 24x80 space.
46074 + -dd Debug, like -d but adds timestamps
46075 + --version Shows C-Kermit version number.
46076 + --noperms Equivalent to SET ATTRIBUTE PROTECTION OFF.
46078 + Kermit now accepts a selection of URLs (Universal Resource Locators)
46079 + as its first command-line argument. These are:
46082 + Makes a Telnet connection to the given host (IP hostname or
46085 + ftp://[user[:password]@]hostname[/path...]
46086 + Makes an FTP connection to the given host (IP hostname or
46087 + address). If a username is given, Kermit tries to log you in;
46088 + if a password is given, it is used; if not, you are prompted
46089 + for one. If no username is given, an anonymous login is
46090 + performed. If a pathname is included, Kermit tries to GET the
46091 + given file. See [574]Section 3.1.3 for details.
46093 + ftps://[user[:password]@]hostname[/path...]
46094 + Makes a secure FTP connection over SSL.
46096 + telnets://[user[:password]@]hostname
46097 + Makes a secure Telnet connection over SSL.
46099 + kermit://[user[:password]@]hostname[/path...]
46100 + Makes a connection to an [575]Internet Kermit Server.
46102 + http://[user[:password]@]hostname[/path...]
46103 + Makes a connection to Web server.
46105 + https://[user[:password]@]hostname[/path...]
46106 + Makes a connection to secure Web server.
46108 + [ [576]Top ] [ [577]Contents ] [ [578]C-Kermit Home ] [ [579]Kermit
46110 + __________________________________________________________________________
46114 + In C-Kermit 8.0, we make an effort to keep passwords out of the debug
46115 + log. This can never be 100% effective, but it's better than before,
46116 + when there were no precautions at all. Whenever Kermit knows it's
46117 + prompting for, parsing, or transmitting a password, it temporarily
46118 + turns off logging and then turns it back on afterwards. This keeps the
46119 + debug log password-free in most common cases, but there can be no
46122 + As noted elsewhere, the new "-dd" command-line option selects a
46123 + timestamped debug log (equivalent to "set debug timestamps on", "log
46124 + debug debug.log").
46126 + C-Kermit 8.0 also supports a new timestamped session log via "set
46127 + session-log timestamped-text", "log session".
46129 + There have been requests for other kinds of logs, for example a
46130 + command log. These might be added at some point. One person wanted to
46131 + be able to log commands with timestamps, but only commands issued at
46132 + the prompt, not commands from files or macros, and also wanted a
46133 + header line at the beginning showing the date, user, and host. This
46134 + can be done as follows:
46136 + .filename := \v(home)commands.log ; (for example)
46137 + fopen /write \%c \m(filename)
46139 + fwrite /line \%c \v(date): User=\v(user) Host=\v(host)
46141 + set debug timestamps on
46142 + log debug {| grep "CMD(P)" >> \m(filename)} append
46145 + [ [580]Top ] [ [581]Contents ] [ [582]C-Kermit Home ] [ [583]Kermit
46147 + _________________________________________________________________
46149 + C-Kermit 8.0 Update Notes / [584]The Kermit Project / Columbia
46150 + University / 15 Dec 2003
46154 + 1. http://www.columbia.edu/kermit/ckermit80.html#contents
46155 + 2. http://www.columbia.edu/kermit/ckermit.html
46156 + 3. http://www.columbia.edu/kermit/index.html
46157 + 4. http://www.columbia.edu/kermit/ckermit80.html
46158 + 5. mailto:kermit-support@columbia.edu
46159 + 6. http://www.columbia.edu/kermit/
46160 + 7. http://www.kermit-project.org/
46161 + 8. http://www.columbia.nyc.ny.us/kermit/
46162 + 9. ftp://kermit.columbia.edu/kermit/f/COPYING.TXT
46163 + 10. ftp://kermit.columbia.edu/kermit/f/ckcmai.c
46164 + 11. http://www.columbia.edu/kermit/ckermit80.html#xv
46165 + 12. http://www.columbia.edu/kermit/ck60manual.html
46166 + 13. http://www.columbia.edu/kermit/ckermi70.html
46167 + 14. ftp://kermit.columbia.edu/kermit/f/ckermit70.txt
46168 + 15. http://www.columbia.edu/kermit/ckututor.html
46169 + 16. ftp://kermit.columbia.edu/kermit/f/ckuker.nr
46170 + 17. http://www.columbia.edu/kermit/security.htm
46171 + 18. http://www.columbia.edu/kermit/telnet.htm
46172 + 19. http://www.columbia.edu/kermit/ftpscripts.html
46173 + 20. http://www.columbia.edu/kermit/ckcbwr.html
46174 + 21. ftp://kermit.columbia.edu/kermit/f/ckcbwr.txt
46175 + 22. http://www.columbia.edu/kermit/ckubwr.html
46176 + 23. ftp://kermit.columbia.edu/kermit/f/ckubwr.txt
46177 + 24. http://www.columbia.edu/kermit/ckvbwr.html
46178 + 25. ftp://kermit.columbia.edu/kermit/f/ckvbwr.txt
46179 + 26. http://www.columbia.edu/kermit/ckuins.html
46180 + 27. ftp://kermit.columbia.edu/kermit/f/ckuins.txt
46181 + 28. http://www.columbia.edu/kermit/ckvins.html
46182 + 29. ftp://kermit.columbia.edu/kermit/f/ckvins.txt
46183 + 30. http://www.columbia.edu/kermit/ckccfg.html
46184 + 31. ftp://kermit.columbia.edu/kermit/f/ckccfg.txt
46185 + 32. http://www.columbia.edu/kermit/ckcplm.html
46186 + 33. ftp://kermit.columbia.edu/kermit/f/ckcplm.txt
46187 + 34. http://www.columbia.edu/kermit/iksd.html
46188 + 35. http://www.columbia.edu/kermit/skermit.html
46189 + 36. http://www.columbia.edu/kermit/ckermit80.html#top
46190 + 37. http://www.columbia.edu/kermit/ckermit.html
46191 + 38. http://www.columbia.edu/kermit/index.html
46192 + 39. http://www.columbia.edu/kermit/ckermit80.html#x0
46193 + 40. http://www.columbia.edu/kermit/ckermit80.html#x1
46194 + 41. http://www.columbia.edu/kermit/ckermit80.html#x2
46195 + 42. http://www.columbia.edu/kermit/ckermit80.html#x2.1
46196 + 43. http://www.columbia.edu/kermit/ckermit80.html#x2.2
46197 + 44. http://www.columbia.edu/kermit/ckermit80.html#x2.2.1
46198 + 45. http://www.columbia.edu/kermit/ckermit80.html#x2.2.2
46199 + 46. http://www.columbia.edu/kermit/ckermit80.html#x2.2.3
46200 + 47. http://www.columbia.edu/kermit/ckermit80.html#x2.2.4
46201 + 48. http://www.columbia.edu/kermit/ckermit80.html#x2.2.5
46202 + 49. http://www.columbia.edu/kermit/ckermit80.html#x2.2.6
46203 + 50. http://www.columbia.edu/kermit/ckermit80.html#x3
46204 + 51. http://www.columbia.edu/kermit/ckermit80.html#x3.1
46205 + 52. http://www.columbia.edu/kermit/ckermit80.html#x3.1.1
46206 + 53. http://www.columbia.edu/kermit/ckermit80.html#x3.1.2
46207 + 54. http://www.columbia.edu/kermit/ckermit80.html#x3.1.3
46208 + 55. http://www.columbia.edu/kermit/ckermit80.html#x3.1.4
46209 + 56. http://www.columbia.edu/kermit/ckermit80.html#x3.2
46210 + 57. http://www.columbia.edu/kermit/ckermit80.html#x3.3
46211 + 58. http://www.columbia.edu/kermit/ckermit80.html#x3.4
46212 + 59. http://www.columbia.edu/kermit/ckermit80.html#x3.5
46213 + 60. http://www.columbia.edu/kermit/ckermit80.html#x3.5.1
46214 + 61. http://www.columbia.edu/kermit/ckermit80.html#x3.5.2
46215 + 62. http://www.columbia.edu/kermit/ckermit80.html#x3.5.3
46216 + 63. http://www.columbia.edu/kermit/ckermit80.html#x3.6
46217 + 64. http://www.columbia.edu/kermit/ckermit80.html#x3.6.1
46218 + 65. http://www.columbia.edu/kermit/ckermit80.html#x3.6.2
46219 + 66. http://www.columbia.edu/kermit/ckermit80.html#x3.6.3
46220 + 67. http://www.columbia.edu/kermit/ckermit80.html#x3.7
46221 + 68. http://www.columbia.edu/kermit/ckermit80.html#x3.7.1
46222 + 69. http://www.columbia.edu/kermit/ckermit80.html#x3.7.2
46223 + 70. http://www.columbia.edu/kermit/ckermit80.html#x3.8
46224 + 71. http://www.columbia.edu/kermit/ckermit80.html#x3.9
46225 + 72. http://www.columbia.edu/kermit/ckermit80.html#x3.10
46226 + 73. http://www.columbia.edu/kermit/ckermit80.html#x3.10.1
46227 + 74. http://www.columbia.edu/kermit/ckermit80.html#x3.10.2
46228 + 75. http://www.columbia.edu/kermit/ckermit80.html#x3.10.3
46229 + 76. http://www.columbia.edu/kermit/ckermit80.html#x3.11
46230 + 77. http://www.columbia.edu/kermit/ckermit80.html#x4
46231 + 78. http://www.columbia.edu/kermit/ckermit80.html#x5
46232 + 79. http://www.columbia.edu/kermit/ckermit80.html#x6
46233 + 80. http://www.columbia.edu/kermit/ckermit80.html#x6.1
46234 + 81. http://www.columbia.edu/kermit/ckermit80.html#x6.2
46235 + 82. http://www.columbia.edu/kermit/ckermit80.html#x6.3
46236 + 83. http://www.columbia.edu/kermit/ckermit80.html#x6.4
46237 + 84. http://www.columbia.edu/kermit/ckermit80.html#x6.5
46238 + 85. http://www.columbia.edu/kermit/ckermit80.html#x6.6
46239 + 86. http://www.columbia.edu/kermit/ckermit80.html#x7
46240 + 87. http://www.columbia.edu/kermit/ckermit80.html#x8
46241 + 88. http://www.columbia.edu/kermit/ckermit80.html#x8.1
46242 + 89. http://www.columbia.edu/kermit/ckermit80.html#x8.2
46243 + 90. http://www.columbia.edu/kermit/ckermit80.html#x8.3
46244 + 91. http://www.columbia.edu/kermit/ckermit80.html#x8.4
46245 + 92. http://www.columbia.edu/kermit/ckermit80.html#x8.5
46246 + 93. http://www.columbia.edu/kermit/ckermit80.html#x8.6
46247 + 94. http://www.columbia.edu/kermit/ckermit80.html#x8.7
46248 + 95. http://www.columbia.edu/kermit/ckermit80.html#x8.8
46249 + 96. http://www.columbia.edu/kermit/ckermit80.html#x8.9
46250 + 97. http://www.columbia.edu/kermit/ckermit80.html#x8.10
46251 + 98. http://www.columbia.edu/kermit/ckermit80.html#x8.11
46252 + 99. http://www.columbia.edu/kermit/ckermit80.html#x8.12
46253 + 100. http://www.columbia.edu/kermit/ckermit80.html#x8.13
46254 + 101. http://www.columbia.edu/kermit/ckermit80.html#x8.14
46255 + 102. http://www.columbia.edu/kermit/ckermit80.html#x9
46256 + 103. http://www.columbia.edu/kermit/ckermit80.html#x9.1
46257 + 104. http://www.columbia.edu/kermit/ckermit80.html#x9.2
46258 + 105. http://www.columbia.edu/kermit/ckermit80.html#x9.3
46259 + 106. http://www.columbia.edu/kermit/ckermit80.html#x9.4
46260 + 107. http://www.columbia.edu/kermit/ckermit80.html#x9.5
46261 + 108. http://www.columbia.edu/kermit/ckermit80.html#x9.6
46262 + 109. http://www.columbia.edu/kermit/ckermit80.html#x9.7
46263 + 110. http://www.columbia.edu/kermit/ckermit80.html#x9.8
46264 + 111. http://www.columbia.edu/kermit/ckermit80.html#x9.9
46265 + 112. http://www.columbia.edu/kermit/ckermit80.html#x9.10
46266 + 113. http://www.columbia.edu/kermit/ckermit80.html#x9.11
46267 + 114. http://www.columbia.edu/kermit/ckermit80.html#x10
46268 + 115. http://www.columbia.edu/kermit/ckermit80.html#x11
46269 + 116. http://www.columbia.edu/kermit/ckermit80.html#x12
46270 + 117. http://www.columbia.edu/kermit/ckermit80.html#x13
46271 + 118. http://www.columbia.edu/kermit/ckermit80.html#x14
46272 + 119. http://www.columbia.edu/kermit/ckermit80.html#x15
46273 + 120. http://www.columbia.edu/kermit/ckermit80.html#x16
46274 + 121. http://www.columbia.edu/kermit/ckermit80.html#x17
46275 + 122. http://www.columbia.edu/kermit/ckermit80.html#top
46276 + 123. http://www.columbia.edu/kermit/ckermit.html
46277 + 124. http://www.columbia.edu/kermit/index.html
46278 + 125. http://www.columbia.edu/kermit/ckuins.html#x5
46279 + 126. http://www.columbia.edu/kermit/ckuins.html
46280 + 127. http://www.columbia.edu/kermit/ckermit80.html#x5
46281 + 128. http://www.columbia.edu/kermit/ckermit80.html#x2.2
46282 + 129. http://www.columbia.edu/kermit/ckermit80.html#contents
46283 + 130. http://www.columbia.edu/kermit/ckermit80.html#x15
46284 + 131. http://www.columbia.edu/kermit/ckermit80.html#x3.7
46285 + 132. http://www.columbia.edu/kermit/ckermit80.html#ftpdates
46286 + 133. http://www.columbia.edu/kermit/ckermit80.html#ftpcheck
46287 + 134. http://www.columbia.edu/kermit/ckermit80.html#ftpnamelist
46288 + 135. http://www.columbia.edu/kermit/ckermit80.html#srvrename
46289 + 136. http://www.columbia.edu/kermit/ckermit80.html#ftpvdir
46290 + 137. http://www.columbia.edu/kermit/ckermit80.html#setftptype
46291 + 138. http://www.columbia.edu/kermit/ckermit80.html#x3.6
46292 + 139. http://www.columbia.edu/kermit/ckermit80.html#x15
46293 + 140. http://www.columbia.edu/kermit/ckermit80.html#x8.7
46294 + 141. http://www.columbia.edu/kermit/ckermit80.html#x2.1
46295 + 142. http://www.columbia.edu/kermit/ckermit80.html#x2.2
46296 + 143. http://www.columbia.edu/kermit/ckermit80.html#x8.14
46297 + 144. http://www.columbia.edu/kermit/ckermit80.html#x8.13
46298 + 145. http://www.columbia.edu/kermit/ckermit80.html#x8.13
46299 + 146. http://www.columbia.edu/kermit/ckututor.html
46300 + 147. http://www.columbia.edu/kermit/ckuins.html
46301 + 148. http://www.columbia.edu/kermit/skermit.html
46302 + 149. http://www.columbia.edu/kermit/ckermit80.html#setlocus
46303 + 150. http://www.columbia.edu/kermit/ckermit80.html#lcommands
46304 + 151. http://www.columbia.edu/kermit/ckermit80.html#ftpuser
46305 + 152. http://www.columbia.edu/kermit/ckermit80.html#showvar
46306 + 153. http://www.columbia.edu/kermit/ckermit80.html#callerid
46307 + 154. http://www.columbia.edu/kermit/ckermit80.html#x6.6
46308 + 155. http://www.columbia.edu/kermit/ckermit80.html#x0
46309 + 156. http://www.columbia.edu/kermit/ckermit80.html#x3.11
46310 + 157. http://www.columbia.edu/kermit/ckermit80.html#top
46311 + 158. http://www.columbia.edu/kermit/ckermit80.html#contents
46312 + 159. http://www.columbia.edu/kermit/ckermit.html
46313 + 160. http://www.columbia.edu/kermit/index.html
46314 + 161. http://www.columbia.edu/kermit/ckermit80.html#x0
46315 + 162. http://www.columbia.edu/kermit/ckermit80.html#top
46316 + 163. http://www.columbia.edu/kermit/ckermit80.html#contents
46317 + 164. http://www.columbia.edu/kermit/ckermit.html
46318 + 165. http://www.columbia.edu/kermit/index.html
46319 + 166. http://www.columbia.edu/kermit/k95.html
46320 + 167. http://www.columbia.edu/kermit/sshclient.html
46321 + 168. http://www.columbia.edu/kermit/skermit.html
46322 + 169. http://www.columbia.edu/kermit/skermit.html
46323 + 170. http://www.columbia.edu/kermit/sshclien.htm
46324 + 171. http://www.columbia.edu/kermit/ckermit80.html#x3
46325 + 172. ftp://ftp.isi.edu/in-notes/rfc1738.txt
46326 + 173. http://www.columbia.edu/kermit/ckermit80.html#x2.2.2
46327 + 174. http://www.columbia.edu/kermit/ckermit80.html#x2.2.1
46328 + 175. ftp://ftp.isi.edu/in-notes/rfc2396.txt
46329 + 176. ftp://ftp.isi.edu/in-notes/rfc2616.txt
46330 + 177. http://www.columbia.edu/kermit/ckermit80.html#x2.2.3
46331 + 178. ftp://ftp.isi.edu/in-notes/rfc2616.txt
46332 + 179. http://www.columbia.edu/kermit/ckermit80.html#x8.13.7
46333 + 180. http://www.columbia.edu/kermit/security.htm#x5.4
46334 + 181. http://www.columbia.edu/kermit/security.htm#x15
46335 + 182. http://www.columbia.edu/kermit/security.htm#x6.2
46336 + 183. http://www.columbia.edu/kermit/security.html
46337 + 184. http://www.columbia.edu/kermit/ckermit80.html#x16
46338 + 185. http://www.columbia.edu/kermit/ckermit80.html#top
46339 + 186. http://www.columbia.edu/kermit/ckermit80.html#contents
46340 + 187. http://www.columbia.edu/kermit/ckermit.html
46341 + 188. http://www.columbia.edu/kermit/index.html
46342 + 189. http://www.columbia.edu/kermit/ckermit80.html#x3.1
46343 + 190. http://www.columbia.edu/kermit/ckermit80.html#x3.2
46344 + 191. http://www.columbia.edu/kermit/ckermit80.html#x3.3
46345 + 192. http://www.columbia.edu/kermit/ckermit80.html#x3.4
46346 + 193. http://www.columbia.edu/kermit/ckermit80.html#x3.5
46347 + 194. http://www.columbia.edu/kermit/ckermit80.html#x3.6
46348 + 195. http://www.columbia.edu/kermit/ckermit80.html#x3.7
46349 + 196. http://www.columbia.edu/kermit/ckermit80.html#x3.8
46350 + 197. http://www.columbia.edu/kermit/ckermit80.html#x3.9
46351 + 198. http://www.columbia.edu/kermit/ckermit80.html#x3.10
46352 + 199. http://www.columbia.edu/kermit/ckermit80.html#x3.11
46353 + 200. http://www.columbia.edu/kermit/security.htm
46354 + 201. http://www.columbia.edu/kermit/security.htm#servers
46355 + 202. http://www.columbia.edu/kermit/ckcsets.html
46356 + 203. http://www.columbia.edu/kermit/unicode.html
46357 + 204. http://www.columbia.edu/kermit/ckermi70.htm#x1.5.4
46358 + 205. http://www.columbia.edu/kermit/case10.html
46359 + 206. http://www.columbia.edu/kermit/ckermit80.html#x4
46360 + 207. http://www.columbia.edu/kermit/ckermit80.html#x3.11
46361 + 208. http://www.columbia.edu/kermit/ftpscripts.html
46362 + 209. http://www.columbia.edu/kermit/ckermit80.html#top
46363 + 210. http://www.columbia.edu/kermit/ckermit80.html#ftp
46364 + 211. http://www.columbia.edu/kermit/ftpclient.html
46365 + 212. http://www.columbia.edu/kermit/ftpscripts.html
46366 + 213. http://www.columbia.edu/kermit/ckermit.html
46367 + 214. http://www.columbia.edu/kermit/index.html
46368 + 215. http://www.columbia.edu/kermit/ckermit80.html#x3.1.1
46369 + 216. http://www.columbia.edu/kermit/ckermit80.html#x3.1.3
46370 + 217. http://www.columbia.edu/kermit/ckermit80.html#x3.1.4
46371 + 218. http://www.columbia.edu/kermit/ckermit80.html#x3.1.3
46372 + 219. http://www.columbia.edu/kermit/ckermit80.html#x3.1.3
46373 + 220. http://www.columbia.edu/kermit/ckermit80.html#x3.2
46374 + 221. http://www.columbia.edu/kermit/ckermit80.html#x3.5
46375 + 222. http://www.columbia.edu/kermit/ckermit80.html#x3.6
46376 + 223. http://www.columbia.edu/kermit/ftpscripts.html
46377 + 224. http://www.columbia.edu/kermit/ckb2.htm
46378 + 225. http://www.columbia.edu/kermit/ckermit80.html#ftpautolog
46379 + 226. http://www.columbia.edu/kermit/ckermit80.html#ftpuser
46380 + 227. http://www.columbia.edu/kermit/ckermit80.html#x3.8
46381 + 228. http://www.columbia.edu/kermit/ckermit80.html#x3.8
46382 + 229. http://www.columbia.edu/kermit/ckermit80.html#top
46383 + 230. http://www.columbia.edu/kermit/ckermit80.html#ftp
46384 + 231. http://www.columbia.edu/kermit/ckermit.html
46385 + 232. http://www.columbia.edu/kermit/index.html
46386 + 233. http://www.columbia.edu/kermit/ibm_ie.html
46387 + 234. http://www.columbia.edu/kermit/ckermit80.html#x3.10
46388 + 235. http://www.columbia.edu/kermit/ckermit80.html#top
46389 + 236. http://www.columbia.edu/kermit/ckermit80.html#ftp
46390 + 237. http://www.columbia.edu/kermit/ckermit.html
46391 + 238. http://www.columbia.edu/kermit/index.html
46392 + 239. http://www.columbia.edu/kermit/ck60manual.html
46393 + 240. http://www.columbia.edu/kermit/ckermit70.html#x4.17
46394 + 241. http://www.columbia.edu/kermit/ckermit70.html
46395 + 242. http://www.columbia.edu/kermit/ckermit80.html#x3.6
46396 + 243. http://www.columbia.edu/kermit/ckermit80.html#x3.11
46397 + 244. http://www.columbia.edu/kermit/ckermit80.html#x3.1.4
46398 + 245. http://www.columbia.edu/kermit/security.html
46399 + 246. http://www.columbia.edu/kermit/ckermit80.html#x3.7
46400 + 247. http://www.columbia.edu/kermit/ckermit80.html#x3.7
46401 + 248. http://www.columbia.edu/kermit/ckermit80.html#x8.13.4
46402 + 249. http://www.columbia.edu/kermit/ckermit80.html#permswitch
46403 + 250. http://www.columbia.edu/kermit/ckermit80.html#ftpchmod
46404 + 251. http://www.columbia.edu/kermit/ckermit80.html#x3.6.2
46405 + 252. http://www.columbia.edu/kermit/ckermit80.html#x4
46406 + 253. http://www.columbia.edu/kermit/ckermit80.html#top
46407 + 254. http://www.columbia.edu/kermit/ckermit80.html#ftp
46408 + 255. http://www.columbia.edu/kermit/ckermit.html
46409 + 256. http://www.columbia.edu/kermit/index.html
46410 + 257. http://www.columbia.edu/kermit/ckermit80.html#x7
46411 + 258. http://www.columbia.edu/kermit/ckermit80.html#x3.8
46412 + 259. http://www.columbia.edu/kermit/ckermit80.html#x3.8
46413 + 260. http://www.columbia.edu/kermit/ckb2.htm
46414 + 261. http://www.columbia.edu/kermit/ckermit80.html#x3.10
46415 + 262. http://www.columbia.edu/kermit/ckermit80.html#x3.10
46416 + 263. http://www.columbia.edu/kermit/ckermit80.html#x3.6
46417 + 264. http://www.columbia.edu/kermit/ckermit80.html#setftptype
46418 + 265. http://www.columbia.edu/kermit/ckermit80.html#top
46419 + 266. http://www.columbia.edu/kermit/ckermit80.html#ftp
46420 + 267. http://www.columbia.edu/kermit/ckermit.html
46421 + 268. http://www.columbia.edu/kermit/index.html
46422 + 269. http://www.columbia.edu/kermit/ckermit70.html#x4.9
46423 + 270. http://www.columbia.edu/kermit/ckermit80.html#x3.5.1
46424 + 271. http://www.columbia.edu/kermit/ckermit80.html#erroraction
46425 + 272. http://www.columbia.edu/kermit/ckermit70.html#x1.5
46426 + 273. http://www.columbia.edu/kermit/ckermit70.html#x4.7
46427 + 274. http://www.columbia.edu/kermit/ckermit70.html#x1.6
46428 + 275. http://www.columbia.edu/kermit/ckermit80.html#x8.13
46429 + 276. http://www.columbia.edu/kermit/ckermi70.htm#x1.5.4
46430 + 277. http://www.columbia.edu/kermit/ckermi70.htm
46431 + 278. http://www.columbia.edu/kermit/ckermit80.html#x4
46432 + 279. http://www.columbia.edu/kermit/ckermit80.html#x3.7
46433 + 280. http://www.columbia.edu/kermit/ckermit80.html#x3.5.2
46434 + 281. http://www.columbia.edu/kermit/ckermit80.html#x3.7
46435 + 282. http://www.columbia.edu/kermit/ckermit80.html#erroraction
46436 + 283. http://www.columbia.edu/kermit/ckermit80.html#x3.5.2
46437 + 284. http://www.columbia.edu/kermit/ckermit80.html#erroraction
46438 + 285. http://www.columbia.edu/kermit/ckermit80.html#ftpfilenames
46439 + 286. http://www.columbia.edu/kermit/ckermit80.html#ftpperms
46440 + 287. http://www.columbia.edu/kermit/ckermit80.html#ftpunique
46441 + 288. http://www.columbia.edu/kermit/ckermit80.html#ftpfilenames
46442 + 289. http://www.columbia.edu/kermit/ckermit80.html#note_utc
46443 + 290. http://www.columbia.edu/kermit/ckermit80.html#note_date
46444 + 291. http://www.columbia.edu/kermit/ckermit80.html#x3.6
46445 + 292. http://www.boulder.nist.gov/timefreq/faq/faq.htm#10:
46446 + 293. http://www.columbia.edu/kermit/ckermit80.html#x3.7
46447 + 294. http://www.columbia.edu/kermit/ckermit80.html#top
46448 + 295. http://www.columbia.edu/kermit/ckermit80.html#ftp
46449 + 296. http://www.columbia.edu/kermit/ckermit.html
46450 + 297. http://www.columbia.edu/kermit/index.html
46451 + 298. http://www.columbia.edu/kermit/ckermit80.html#x3.11
46452 + 299. http://www.columbia.edu/kermit/ckermi70.htm#x4.3
46453 + 300. http://www.columbia.edu/kermit/ckermit70.html
46454 + 301. http://www.columbia.edu/kermit/ckermit80.html#x5
46455 + 302. http://www.columbia.edu/kermit/ckermit80.html#x3.6.3
46456 + 303. http://www.columbia.edu/kermit/ckermit80.html#ftpfilenames
46457 + 304. http://www.columbia.edu/kermit/ckermi70.htm#x4.1
46458 + 305. http://www.columbia.edu/kermit/ckermi70.htm#x4.2.2
46459 + 306. http://www.columbia.edu/kermit/ckermi70.htm#x1.5.4
46460 + 307. http://www.columbia.edu/kermit/ckermit80.html#x3.6.2
46461 + 308. http://www.columbia.edu/kermit/ckermit80.html#x3.11
46462 + 309. http://www.columbia.edu/kermit/ckermit80.html#x3.11
46463 + 310. http://www.columbia.edu/kermit/ckermit80.html#srvrename
46464 + 311. http://www.columbia.edu/kermit/ckermi70.htm#x4.1
46465 + 312. http://www.columbia.edu/kermit/ckermi70.htm
46466 + 313. http://www.columbia.edu/kermit/ckb2.htm
46467 + 314. http://www.columbia.edu/kermit/ckermit80.html#ftpfilenames
46468 + 315. http://www.columbia.edu/kermit/ckermit80.html#x3.5.3
46469 + 316. http://www.proftpd.net/
46470 + 317. http://www.columbia.edu/kermit/ckermit80.html#top
46471 + 318. http://www.columbia.edu/kermit/ckermit80.html#ftp
46472 + 319. http://www.columbia.edu/kermit/ckermit.html
46473 + 320. http://www.columbia.edu/kermit/index.html
46474 + 321. http://www.columbia.edu/kermit/ckb2.htm
46475 + 322. http://www.columbia.edu/kermit/ckcsets.html
46476 + 323. http://www.columbia.edu/kermit/unicode.html
46477 + 324. http://www.columbia.edu/kermit/ckcsets.html
46478 + 325. http://www.columbia.edu/kermit/ckcsets.html
46479 + 326. http://www.columbia.edu/kermit/ckermit80.html#x4
46480 + 327. http://www.columbia.edu/kermit/utf8.html
46481 + 328. http://www.columbia.edu/kermit/ckcsets.html
46482 + 329. http://www.columbia.edu/kermit/ckermit80.html#x4
46483 + 330. ftp://ftp.isi.edu/in-notes/rfc2640.txt
46484 + 331. http://www.columbia.edu/kermit/ckermit80.html#top
46485 + 332. http://www.columbia.edu/kermit/ckermit80.html#ftp
46486 + 333. http://www.columbia.edu/kermit/ckermit.html
46487 + 334. http://www.columbia.edu/kermit/index.html
46488 + 335. http://www.columbia.edu/kermit/ckermit80.html#top
46489 + 336. http://www.columbia.edu/kermit/ckermit80.html#ftp
46490 + 337. http://www.columbia.edu/kermit/ckermit.html
46491 + 338. http://www.columbia.edu/kermit/index.html
46492 + 339. http://www.columbia.edu/kermit/ckermit80.html#top
46493 + 340. http://www.columbia.edu/kermit/ckermit80.html#ftp
46494 + 341. http://www.columbia.edu/kermit/ckermit.html
46495 + 342. http://www.columbia.edu/kermit/index.html
46496 + 343. http://www.columbia.edu/kermit/ftpscripts.html
46497 + 344. http://www.columbia.edu/kermit/ckermit80.html#x3.2
46498 + 345. http://www.columbia.edu/kermit/ckermit80.html#x3.2
46499 + 346. ftp://ftp.isi.edu/in-notes/rfc959.txt
46500 + 347. http://www.columbia.edu/kermit/ckscripts.html
46501 + 348. http://www.columbia.edu/kermit/ckermit80.html#top
46502 + 349. http://www.columbia.edu/kermit/ckermit80.html#ftp
46503 + 350. http://www.columbia.edu/kermit/ftpscript.html
46504 + 351. http://www.columbia.edu/kermit/ckermit.html
46505 + 352. http://www.columbia.edu/kermit/index.html
46506 + 353. http://www.columbia.edu/kermit/ckermit80.html#x3.11.1
46507 + 354. http://www.columbia.edu/kermit/ckermit80.html#x3.11.2
46508 + 355. http://www.columbia.edu/kermit/ckermit80.html#x3.11.3
46509 + 356. http://www.columbia.edu/kermit/ckermit80.html#x3.11.4
46510 + 357. http://www.columbia.edu/kermit/ckermit80.html#x3.11.5
46511 + 358. http://www.columbia.edu/kermit/ckermit.html
46512 + 359. http://www.columbia.edu/kermit/k95.html
46513 + 360. http://www.columbia.edu/kermit/ckermit80.html#x3.11.5
46514 + 361. ftp://ftp.isi.edu/in-notes/rfc959.txt
46515 + 362. ftp://ftp.isi.edu/in-notes/rfc2389.txt
46516 + 363. http://www.ietf.org/internet-drafts/draft-ietf-ftpext-mlst-16.txt
46517 + 364. http://www.columbia.edu/kermit/ftpclient.html
46518 + 365. http://www.columbia.edu/kermit/ckermit80.html#top
46519 + 366. http://www.columbia.edu/kermit/ckermit80.html#ftp
46520 + 367. http://www.columbia.edu/kermit/ckermit.html
46521 + 368. http://www.columbia.edu/kermit/index.html
46522 + 369. http://www.columbia.edu/kermit/ckermit80.html#x3
46523 + 370. http://www.columbia.edu/kermit/ckermit80.html#ucs2
46524 + 371. http://www.columbia.edu/kermit/ckermit80.html#top
46525 + 372. http://www.columbia.edu/kermit/ckermit80.html#contents
46526 + 373. http://www.columbia.edu/kermit/ckermit.html
46527 + 374. http://www.columbia.edu/kermit/index.html
46528 + 375. http://www.columbia.edu/kermit/ckermit80.html#top
46529 + 376. http://www.columbia.edu/kermit/ckermit80.html#contents
46530 + 377. http://www.columbia.edu/kermit/ckermit.html
46531 + 378. http://www.columbia.edu/kermit/index.html
46532 + 379. http://www.columbia.edu/kermit/ckb2.htm
46533 + 380. http://www.columbia.edu/kermit/ckermit80.html#top
46534 + 381. http://www.columbia.edu/kermit/ckermit80.html#contents
46535 + 382. http://www.columbia.edu/kermit/ckermit.html
46536 + 383. http://www.columbia.edu/kermit/index.html
46537 + 384. http://www.columbia.edu/kermit/ckermit80.html#x4
46538 + 385. http://www.columbia.edu/kermit/ckermit80.html#x4
46539 + 386. http://www.columbia.edu/kermit/ckermit80.html#x8.12
46540 + 387. http://www.columbia.edu/kermit/ckermit80.html#x8.1
46541 + 388. http://www.columbia.edu/kermit/ckermit80.html#x12
46542 + 389. http://www.columbia.edu/kermit/ckermit80.html#x8.12
46543 + 390. http://www.columbia.edu/kermit/ckermit80.html#top
46544 + 391. http://www.columbia.edu/kermit/ckermit80.html#contents
46545 + 392. http://www.columbia.edu/kermit/ckermit.html
46546 + 393. http://www.columbia.edu/kermit/index.html
46547 + 394. http://www.columbia.edu/kermit/ckermit80.html#x8.14
46548 + 395. http://www.columbia.edu/kermit/ckermit80.html#top
46549 + 396. http://www.columbia.edu/kermit/ckermit80.html#contents
46550 + 397. http://www.columbia.edu/kermit/ckermit.html
46551 + 398. http://www.columbia.edu/kermit/index.html
46552 + 399. http://www.columbia.edu/kermit/ckermit80.html#x9
46553 + 400. http://www.columbia.edu/kermit/ckermit80.html#top
46554 + 401. http://www.columbia.edu/kermit/ckermit80.html#contents
46555 + 402. http://www.columbia.edu/kermit/ckermit.html
46556 + 403. http://www.columbia.edu/kermit/index.html
46557 + 404. http://www.columbia.edu/kermit/ckermit80.html#x8.6
46558 + 405. http://www.columbia.edu/kermit/ckermit80.html#top
46559 + 406. http://www.columbia.edu/kermit/ckermit80.html#contents
46560 + 407. http://www.columbia.edu/kermit/ckermit.html
46561 + 408. http://www.columbia.edu/kermit/index.html
46562 + 409. http://www.columbia.edu/kermit/ckermit80.html#top
46563 + 410. http://www.columbia.edu/kermit/ckermit80.html#contents
46564 + 411. http://www.columbia.edu/kermit/ckermit.html
46565 + 412. http://www.columbia.edu/kermit/index.html
46566 + 413. http://www.columbia.edu/kermit/ckermit80.html#top
46567 + 414. http://www.columbia.edu/kermit/ckermit80.html#contents
46568 + 415. http://www.columbia.edu/kermit/ckermit.html
46569 + 416. http://www.columbia.edu/kermit/index.html
46570 + 417. http://www.columbia.edu/kermit/ckermit80.html#fjoin
46571 + 418. http://www.columbia.edu/kermit/ckermit80.html#fsplit
46572 + 419. http://www.columbia.edu/kermit/ckermit80.html#x8.10
46573 + 420. http://www.columbia.edu/kermit/ckermit80.html#top
46574 + 421. http://www.columbia.edu/kermit/ckermit80.html#contents
46575 + 422. http://www.columbia.edu/kermit/ckermit.html
46576 + 423. http://www.columbia.edu/kermit/index.html
46577 + 424. http://www.columbia.edu/kermit/ckermit80.html#x9
46578 + 425. http://www.columbia.edu/kermit/ckermit80.html#x9
46579 + 426. http://www.columbia.edu/kermit/ckermit80.html#x9
46580 + 427. http://www.columbia.edu/kermit/ckermit80.html#x3
46581 + 428. http://www.columbia.edu/kermit/ckermit80.html#x3
46582 + 429. http://www.columbia.edu/kermit/ckermit80.html#x3.2
46583 + 430. http://www.columbia.edu/kermit/ckermit80.html#x3.2
46584 + 431. http://www.columbia.edu/kermit/ckermit80.html#x3.8
46585 + 432. http://www.columbia.edu/kermit/ckermit80.html#x3
46586 + 433. http://www.columbia.edu/kermit/ckermit80.html#x3
46587 + 434. http://www.columbia.edu/kermit/ckermit80.html#x3
46588 + 435. http://www.columbia.edu/kermit/ckermit80.html#x3.2
46589 + 436. http://www.columbia.edu/kermit/ckermit80.html#x3
46590 + 437. http://www.columbia.edu/kermit/ckermit80.html#x8.13
46591 + 438. http://www.columbia.edu/kermit/ckermit80.html#x8.13
46592 + 439. http://www.columbia.edu/kermit/ckermit80.html#x9
46593 + 440. http://www.columbia.edu/kermit/ckermit80.html#x8.10
46594 + 441. http://www.columbia.edu/kermit/ckermit80.html#x8.7.4
46595 + 442. http://www.columbia.edu/kermit/ckermit80.html#top
46596 + 443. http://www.columbia.edu/kermit/ckermit80.html#contents
46597 + 444. http://www.columbia.edu/kermit/ckermit.html
46598 + 445. http://www.columbia.edu/kermit/index.html
46599 + 446. http://www.columbia.edu/kermit/ckermit80.html#top
46600 + 447. http://www.columbia.edu/kermit/ckermit80.html#contents
46601 + 448. http://www.columbia.edu/kermit/ckermit.html
46602 + 449. http://www.columbia.edu/kermit/index.html
46603 + 450. http://www.columbia.edu/kermit/ckermit80.html#top
46604 + 451. http://www.columbia.edu/kermit/ckermit80.html#contents
46605 + 452. http://www.columbia.edu/kermit/ckermit.html
46606 + 453. http://www.columbia.edu/kermit/index.html
46607 + 454. http://www.columbia.edu/kermit/ckermit80.html#x8.7
46608 + 455. http://www.columbia.edu/kermit/ckermit80.html#top
46609 + 456. http://www.columbia.edu/kermit/ckermit80.html#contents
46610 + 457. http://www.columbia.edu/kermit/ckermit.html
46611 + 458. http://www.columbia.edu/kermit/index.html
46612 + 459. http://www.columbia.edu/kermit/ckermit80.html#scriptedit
46613 + 460. http://www.columbia.edu/kermit/ckermit80.html#top
46614 + 461. http://www.columbia.edu/kermit/ckermit80.html#contents
46615 + 462. http://www.columbia.edu/kermit/ckermit.html
46616 + 463. http://www.columbia.edu/kermit/index.html
46617 + 464. http://www.columbia.edu/kermit/ckermit80.html#top
46618 + 465. http://www.columbia.edu/kermit/ckermit80.html#contents
46619 + 466. http://www.columbia.edu/kermit/ckermit.html
46620 + 467. http://www.columbia.edu/kermit/index.html
46621 + 468. ftp://ftp.isi.edu/in-notes/rfc2822.txt
46622 + 469. ftp://ftp.isi.edu/in-notes/rfc2822.txt
46623 + 470. ftp://ftp.isi.edu/in-notes/rfc2822.txt
46624 + 471. ftp://ftp.isi.edu/in-notes/rfc2822.txt
46625 + 472. http://www.columbia.edu/kermit/ckermit80.html#top
46626 + 473. http://www.columbia.edu/kermit/ckermit80.html#contents
46627 + 474. http://www.columbia.edu/kermit/ckermit.html
46628 + 475. http://www.columbia.edu/kermit/index.html
46629 + 476. http://www.columbia.edu/kermit/ckermit80.html#x8.1
46630 + 477. http://www.columbia.edu/kermit/ckermit80.html#top
46631 + 478. http://www.columbia.edu/kermit/ckermit80.html#contents
46632 + 479. http://www.columbia.edu/kermit/ckermit.html
46633 + 480. http://www.columbia.edu/kermit/index.html
46634 + 481. http://www.columbia.edu/kermit/ckermit80.html#x8.2
46635 + 482. http://www.columbia.edu/kermit/ckermit80.html#top
46636 + 483. http://www.columbia.edu/kermit/ckermit80.html#contents
46637 + 484. http://www.columbia.edu/kermit/ckermit.html
46638 + 485. http://www.columbia.edu/kermit/index.html
46639 + 486. http://www.columbia.edu/kermit/ckermit80.html#x9.8
46640 + 487. http://www.columbia.edu/kermit/ckermit80.html#x9.8
46641 + 488. http://www.columbia.edu/kermit/ckermit80.html#x8.2
46642 + 489. http://www.columbia.edu/kermit/ckermit80.html#top
46643 + 490. http://www.columbia.edu/kermit/ckermit80.html#contents
46644 + 491. http://www.columbia.edu/kermit/ckermit.html
46645 + 492. http://www.columbia.edu/kermit/index.html
46646 + 493. http://www.columbia.edu/kermit/ckermit80.html#top
46647 + 494. http://www.columbia.edu/kermit/ckermit80.html#contents
46648 + 495. http://www.columbia.edu/kermit/ckermit.html
46649 + 496. http://www.columbia.edu/kermit/index.html
46650 + 497. http://www.columbia.edu/kermit/ckermit80.html#x9.8
46651 + 498. http://www.columbia.edu/kermit/ckermit80.html#top
46652 + 499. http://www.columbia.edu/kermit/ckermit80.html#contents
46653 + 500. http://www.columbia.edu/kermit/ckermit.html
46654 + 501. http://www.columbia.edu/kermit/index.html
46655 + 502. http://www.columbia.edu/kermit/ckermit80.html#x9.8
46656 + 503. http://www.columbia.edu/kermit/ckermit80.html#x9.8
46657 + 504. http://www.columbia.edu/kermit/ckermit80.html#x9.6
46658 + 505. http://www.columbia.edu/kermit/ckermit80.html#top
46659 + 506. http://www.columbia.edu/kermit/ckermit80.html#contents
46660 + 507. http://www.columbia.edu/kermit/ckermit.html
46661 + 508. http://www.columbia.edu/kermit/index.html
46662 + 509. http://www.columbia.edu/kermit/ckermit80.html#x9.8
46663 + 510. http://www.columbia.edu/kermit/ckermit80.html#x9.8
46664 + 511. http://www.columbia.edu/kermit/ckermit80.html#top
46665 + 512. http://www.columbia.edu/kermit/ckermit80.html#contents
46666 + 513. http://www.columbia.edu/kermit/ckermit.html
46667 + 514. http://www.columbia.edu/kermit/index.html
46668 + 515. http://www.columbia.edu/kermit/ckermit80.html#top
46669 + 516. http://www.columbia.edu/kermit/ckermit80.html#contents
46670 + 517. http://www.columbia.edu/kermit/ckermit.html
46671 + 518. http://www.columbia.edu/kermit/index.html
46672 + 519. http://www.columbia.edu/kermit/ckermit80.html#top
46673 + 520. http://www.columbia.edu/kermit/ckermit80.html#contents
46674 + 521. http://www.columbia.edu/kermit/ckermit.html
46675 + 522. http://www.columbia.edu/kermit/index.html
46676 + 523. mailto:thucdat@hotmail.com
46677 + 524. http://www.columbia.edu/kermit/ckermit80.html#x9.9.2
46678 + 525. http://www.columbia.edu/kermit/ckermit80.html#top
46679 + 526. http://www.columbia.edu/kermit/ckermit80.html#contents
46680 + 527. http://www.columbia.edu/kermit/ckermit.html
46681 + 528. http://www.columbia.edu/kermit/index.html
46682 + 529. http://www.columbia.edu/kermit/ckermit80.html#top
46683 + 530. http://www.columbia.edu/kermit/ckermit80.html#contents
46684 + 531. http://www.columbia.edu/kermit/ckermit.html
46685 + 532. http://www.columbia.edu/kermit/index.html
46686 + 533. http://www.columbia.edu/kermit/ckermit80.html#top
46687 + 534. http://www.columbia.edu/kermit/ckermit80.html#contents
46688 + 535. http://www.columbia.edu/kermit/ckermit.html
46689 + 536. http://www.columbia.edu/kermit/index.html
46690 + 537. http://www.columbia.edu/kermit/ckermit80.html#x9.2
46691 + 538. http://www.columbia.edu/kermit/ckermit80.html#top
46692 + 539. http://www.columbia.edu/kermit/ckermit80.html#contents
46693 + 540. http://www.columbia.edu/kermit/ckermit.html
46694 + 541. http://www.columbia.edu/kermit/index.html
46695 + 542. http://www.columbia.edu/kermit/ckermit80.html#x4
46696 + 543. http://www.columbia.edu/kermit/ckermit80.html#x4
46697 + 544. http://www.columbia.edu/kermit/ckermit80.html#top
46698 + 545. http://www.columbia.edu/kermit/ckermit80.html#contents
46699 + 546. http://www.columbia.edu/kermit/ckermit.html
46700 + 547. http://www.columbia.edu/kermit/index.html
46701 + 548. http://www.columbia.edu/kermit/ckermit80.html#top
46702 + 549. http://www.columbia.edu/kermit/ckermit80.html#contents
46703 + 550. http://www.columbia.edu/kermit/ckermit.html
46704 + 551. http://www.columbia.edu/kermit/index.html
46705 + 552. http://www.columbia.edu/kermit/ckermit80.html#top
46706 + 553. http://www.columbia.edu/kermit/ckermit80.html#contents
46707 + 554. http://www.columbia.edu/kermit/ckermit.html
46708 + 555. http://www.columbia.edu/kermit/index.html
46709 + 556. http://www.columbia.edu/kermit/ckermit80.html#x4
46710 + 557. http://www.columbia.edu/kermit/ckermit80.html#x3.7
46711 + 558. http://www.columbia.edu/kermit/ckermit80.html#x3.7
46712 + 559. http://www.columbia.edu/kermit/ckermit80.html#top
46713 + 560. http://www.columbia.edu/kermit/ckermit80.html#contents
46714 + 561. http://www.columbia.edu/kermit/ckermit.html
46715 + 562. http://www.columbia.edu/kermit/index.html
46716 + 563. ftp://ftp.isi.edu/in-notes/rfc2217.txt
46717 + 564. http://www.columbia.edu/kermit/ckermit80.html#top
46718 + 565. http://www.columbia.edu/kermit/ckermit80.html#contents
46719 + 566. ftp://kermit.columbia.edu/kermit/sredird/
46720 + 567. http://www.columbia.edu/kermit/ckermit.html
46721 + 568. http://www.columbia.edu/kermit/index.html
46722 + 569. http://www.columbia.edu/kermit/ckermi70.htm#x4.22
46723 + 570. http://www.columbia.edu/kermit/ckermit80.html#top
46724 + 571. http://www.columbia.edu/kermit/ckermit80.html#contents
46725 + 572. http://www.columbia.edu/kermit/ckermit.html
46726 + 573. http://www.columbia.edu/kermit/index.html
46727 + 574. http://www.columbia.edu/kermit/ckermit80.html#x3.1.3
46728 + 575. http://www.columbia.edu/kermit/cuiksd.html
46729 + 576. http://www.columbia.edu/kermit/ckermit80.html#top
46730 + 577. http://www.columbia.edu/kermit/ckermit80.html#contents
46731 + 578. http://www.columbia.edu/kermit/ckermit.html
46732 + 579. http://www.columbia.edu/kermit/index.html
46733 + 580. http://www.columbia.edu/kermit/ckermit80.html#top
46734 + 581. http://www.columbia.edu/kermit/ckermit80.html#contents
46735 + 582. http://www.columbia.edu/kermit/ckermit.html
46736 + 583. http://www.columbia.edu/kermit/index.html
46737 + 584. http://www.columbia.edu/kermit/index.html
46739 +++ ckermit-212/ckcplm.txt
46742 + C-Kermit Program Logic Manual
46745 + [1]The Kermit Project
46746 + [2]Columbia University
46748 + As of: C-Kermit 8.0.211, 10 April 2004
46749 + This page last updated: Sat Apr 10 16:45:30 2004 (New York USA Time)
46751 + IF YOU ARE READING A PLAIN-TEXT version of this document, note that
46752 + this file is a plain-text dump of a Web page. You can visit the
46753 + original (and possibly more up-to-date) Web page here:
46755 + [3]http://www.columbia.edu/kermit/ckcplm.html
46757 + [ [4]C-Kermit Home ] [ [5]Kermit Home ]
46758 + ________________________________________________________________________
46762 + 1. [6]INTRODUCTION
46764 + 3. [8]SOURCE CODE PORTABILITY AND STYLE
46766 + 4.A. [10]Group A: Library Routines
46767 + 4.B. [11]Group B: Kermit File Transfer
46768 + 4.C. [12]Group C: Character-Set Conversion
46769 + 4.D. [13]Group D: User Interface
46770 + 4.E. [14]Group E: Platform-Dependent I/O
46771 + 4.F. [15]Group F: Network Support
46772 + 4.G. [16]Group G: Formatted Screen Support
46773 + 4.H. [17]Group H: Pseudoterminal Support
46774 + 4.I. [18]Group I: Security
46775 + I. [19]APPENDIX I: FILE PERMISSIONS
46776 + ________________________________________________________________________
46780 + The Kermit Protocol is specified in the book Kermit, A File Transfer
46781 + Protocol by Frank da Cruz, Digital Press / Butterworth Heinemann,
46782 + Newton, MA, USA (1987), 379 pages, ISBN 0-932376-88-6. It is assumed
46783 + the reader is familiar with the Kermit protocol specification.
46785 + This file describes the relationship among the modules and functions
46786 + of C-Kermit 5A and later, and other programming considerations.
46787 + C-Kermit is designed to be portable to any kind of computer that has a
46788 + C compiler. The source code is broken into many files that are grouped
46789 + according to their function, as shown in the [20]Contents.
46791 + C-Kermit has seen constant development since 1985. Throughout its
46792 + history, there has been a neverending tug-of-war among:
46794 + a. Functionality: adding new features, fixing bugs, improving
46796 + b. Adding support for new platforms.
46797 + c. "Buzzword 1.0 compliance".
46799 + The latter category is the most frustrating, since it generally
46800 + involves massive changes just to keep the software doing what it did
46801 + before in some new setting: e.g. the K&R-to-ANSIC conversion (which
46802 + had to be done, of course, without breaking K&R); Y2K (not a big deal
46803 + in our case); the many and varied UNIX and other API "standards";
46806 + [ [21]Contents ] [ [22]C-Kermit ] [ [23]Kermit Home ]
46807 + ________________________________________________________________________
46811 + C-Kermit source files begin with the two letters "ck", for example
46812 + ckutio.c. Filenames are kept short (6.3) for maximum portability and
46813 + (obviously I hope) do not contain spaces or more than one period. The
46814 + third character in the name denotes something about the function group
46815 + and the expected level of portability:
46817 + a General descriptive material and documentation (text)
46818 + b BOO file encoders and decoders (obsolete)
46819 + c All platforms with C compilers (*)
46820 + d Data General AOS/VS
46821 + e Reserved for "ckermit" files, like ckermit.ini, ckermit2.txt
46825 + i Commodore Amiga (Intuition)
46829 + m Macintosh with Mac OS 1-9
46830 + n Microsoft Windows NT/2000/XP
46831 + o OS/2 and/or Microsoft Windows 9x/ME/NT/2000/XP
46832 + p Plan 9 from Bell Labs
46834 + r DEC PDP-11 with RSTS/E (never used, open for reassigment)
46835 + s Atari ST GEMDOS (last supported in version 5A(189))
46836 + t DEC PDP-11 with RT-11 (never used, open for reassigment)
46837 + u Unix-based operating systems (*)
46838 + v VMS and OpenVMS
46839 + w Wart (Lex-like preprocessor, platform independent)
46847 + _ Encryption modules
46849 + (*) In fact there is little distinction between the ckc*.* and cku*.*
46850 + categories. It would make more sense for all cku*.* modules to be
46851 + ckc*.* ones, except ckufio.c, ckutio.c, ckucon.c, ckucns.c, and
46852 + ckupty.c, which truly are specific to Unix. The rest (ckuus*.c,
46853 + ckucmd.c, etc) are quite portable.
46855 + One hint before proceeding: functions are scattered all over the
46856 + ckc*.c and cku*.c modules, where function size has begun to take
46857 + precedence over the desirability of grouping related functions
46858 + together, the aim being to keep any particular module from growing
46859 + disproportionately large. The easiest way (in UNIX) to find out in
46860 + what source file a given function is defined is like this (where the
46861 + desired function is foo()...):
46863 + grep ^foo\( ck*.c
46865 + This works because the coding convention has been to make function
46866 + names always start on the left margin with their contents indented,
46870 +foo(x,y) int x, y; {
46874 + Also note the style for bracket placement. This allows
46875 + bracket-matching text editors (such as EMACS) to help you make sure
46876 + you know which opening bracket a closing bracket matches, particularly
46877 + when the opening bracket is above the visible screen, and it also
46878 + makes it easy to find the end of a function (search for '}' on the
46881 + Of course EMACS tags work nicely with this format too:
46883 + $ cd kermit-source-directory
46884 + $ etags ck[cu]*.c
46886 + Esc-X Visit-Tags-Table<CR><CR>
46888 + (but remember that the source file for ckcpro.c is [24]ckcpro.w!)
46892 + * Tabs should be set every 8 spaces, as on a VT100.
46893 + * All lines must no more than 79 characters wide after tab
46895 + * Note the distinction between physical tabs (ASCII 9) and the
46896 + indentation conventions, which are: 4 for block contents, 2 for
46897 + most other stuff (obviously this is not a portability issue, just
46900 + [ [25]Contents ] [ [26]C-Kermit ] [ [27]Kermit Home ]
46901 + ________________________________________________________________________
46903 + 3. SOURCE CODE PORTABILITY AND STYLE
46905 + C-Kermit was designed in 1985 as a platform-independent replacement
46906 + for the earlier Unix Kermit. c-Kermit's design was expected to promote
46907 + portability, and judging from the number of platforms to which it has
46908 + been adapted since then, the model is effective, if not ideal
46909 + (obviously if we had it all to do over, we'd change a few things). To
46910 + answer the oft-repeated question: "Why are there so many #ifdefs?",
46913 + * Many of them are related to feature selection and program size,
46914 + and so need to be there anyway.
46915 + * Those that treat compiler, library, platform, header-file, and
46916 + similar differences have built up over time as hundreds of people
46917 + all over the world adapted C-Kermit to their particular
46918 + environments and sent back their changes. There might be more
46919 + politically-correct ways to achieve portability, but this one is
46920 + natural and proven. The basic idea is to introduce changes that
46921 + can be selected by defining a symbol, which, if not defined,
46922 + leaves the program exactly as it was before the changes.
46923 + * Although it might be possible to "clean up" the "#ifdef mess",
46924 + nobody has access to all the hundreds of platforms served by the
46925 + #ifdefs to check the results.
46927 + And to answer the second-most-oft-repeated question: "Why don't you
46928 + just use GNU autoconfig / automake / autowhatever instead of
46929 + hard-coding all those #ifdefs?" Answers:
46931 + * The GNU tools are not available on all the platforms where
46932 + C-Kermit must be built and I wouldn't necessarily trust them if
46934 + * Each platform is a moving target, so the tools themselves would
46935 + need to updated before Kermit could be updated.
46936 + * It would only add another layer of complexity to an already
46938 + * Conversion at this point would not be practical unless there was a
46939 + way to test the results on all the hundreds of platforms where
46940 + C-Kermit is supposed to build.
46942 + When writing code for the system-indendent C-Kermit modules, please
46943 + stick to the following coding conventions to ensure portability to the
46944 + widest possible variety of C preprocessors, compilers, and linkers, as
46945 + well as certain network and/or email transports. The same holds true
46946 + for many of the "system dependent" modules too; particularly the Unix
46947 + ones, since they must be buildable by a wide variety of compilers and
46948 + linkers, new and old.
46950 + This list does not purport to be comprehensive, and although some
46951 + items on it might seem far-fetched, they would not be listed unless I
46952 + had encountered them somewhere, some time. I wish I had kept better
46953 + records so I could cite specific platforms and compilers.
46955 + * Try to keep variable and function names unique within 6
46956 + characters, especially if they are used across modules, since 6 is
46957 + the maximum for some old linkers (actually, this goes back to
46958 + TOPS-10 and -20 and other old DEC OS's where C-Kermit never ran
46959 + anyway; a more realistic maximum is probably somewhere between 8
46960 + and 16). We know for certain that VAX C has a 31-character max
46961 + because it complains -- others might not complain, but just
46962 + silently truncate, thus folding two or more routines/variables
46964 + * Keep preprocessor symbols unique within 8 characters; that's the
46965 + max for some preprocessors (sorry, I can't give a specific
46966 + example, but in 1988 or thereabouts, I had to change character-set
46967 + symbols like TC_LATIN1 and TC_LATIN2 to TC_1LATIN and TC_2LATIN
46968 + because the digits were being truncated and ignored on a platform
46969 + where I actually had to build C-Kermit 5A; unfortunately I didn't
46970 + note which platform -- maybe some early Ultrix version?)
46971 + * Don't create preprocessor symbols, or variable or function names,
46972 + that start with underscore (_). These are usually reserved for
46973 + internal use by the compiler and header files.
46974 + * Don't put #include directives inside functions or { blocks }.
46975 + * Don't use the #if or #elif preprocessor constructions, only use
46976 + #ifdef, #ifndef, #define, #undef, and #endif.
46977 + * Put tokens after #endif in comment brackets, e.g.
46978 + #endif /* FOO */.
46979 + * Don't indent preprocessor statements - # must always be first char
46981 + * Don't put whitespace after # in preprocessor statements.
46982 + * Don't use #pragma, even within #ifdefs -- it makes some
46983 + preprocessors give up.
46984 + * Same goes for #module, #if, etc - #ifdefs do NOT protect them.
46985 + * Don't use logical operators in preprocessor constructions.
46986 + * Avoid #ifdefs inside argument list to function calls (I can't
46987 + remember why this one is here, but probably needn't be; we do this
46989 + * Always cast strlen() in expressions to int:
46990 + if ((int)strlen(foo) < x)...
46991 + * Any variable whose value might exceed 16383 should be declared as
46992 + long, or if that is not possible, then as unsigned.
46993 + * Avoid typedefs; they might be portable but they are very confusing
46994 + and there's no way to test for their presence or absence at
46995 + compile time. Use preprocessor symbols instead if possible; at
46996 + least you can test their definitions.
46997 + * Unsigned long is not portable; use a preprocessor symbol (Kermit
46998 + uses ULONG for this).
46999 + * Long long is not portable. If you really need it, be creative.
47000 + * Similarly 1234LL is not portable, nor almost any other constant
47001 + modifier other than L.
47002 + * Unsigned char is not portable, use CHAR (a preprocessor symbol
47003 + defined in the Kermit header files) and always take precautions
47004 + against character signage (more about this [28]below).
47005 + * Don't use initializers with automatic arrays or structs: it's not
47007 + * Don't use big automatic arrays or structs in functions that might
47008 + be called recursively; some platforms have fixed-size stacks (e.g.
47009 + Windows 9x: 256K) and recursive functions crash with stack
47010 + overflow. Even when there is not a compiler limitation, this
47011 + causes memory to be consumed without bound, and can end up filling
47013 + * Don't assume that struct assignment performs a copy, or that it
47015 + * Don't use sizeof to get the size of an array; someone might come
47016 + along later and and change it from static to malloc'd. Always use
47017 + a symbol to refer to the array's size.
47018 + * Don't put prototypes for static functions into header files that
47019 + are used by modules that don't contain that function; the link
47020 + step can fail with unresolved references (e.g. on AOS/VS).
47021 + * Avoid the construction *++p (the order of evaluation varies; it
47022 + shouldn't but at least one compiler had a bug that made me include
47024 + * Don't use triple assignments, like a = b = c = 0; (or quadruple,
47025 + etc). Some compilers generate bad code for these, or crash, etc
47026 + (some version of DEC C as I recall).
47027 + * Some compilers don't allow structure members to have the same
47028 + names as other identifiers. Try to give structure members unique
47030 + * Don't assume anything about order of evaluation in boolean
47031 + expressions, or that they will stop early if a required condition
47032 + is not true, e.g.:
47033 + if (i > 0 && p[i-1] == blah)
47034 + can still dump core if i == 0 (hopefully this is not true of any
47035 + modern compiler, but I would not have said this if it did not
47036 + actually happen somewhere).
47037 + * Don't have a switch() statement with no cases (e.g. because of
47038 + #ifdefs); this is a fatal error in some compilers.
47039 + * Don't put lots of code in a switch case; move it out to a separate
47040 + function; some compilers run out of memory when presented with a
47041 + huge switch() statement -- it's not the number of cases that
47042 + matters; it's the overall amount of code.
47043 + * Some compilers might also limit the number of switch() cases, e.g.
47045 + * Don't put anything between "switch() {" and "case:" -- switch
47046 + blocks are not like other blocks.
47047 + * Don't jump into or out of switches.
47048 + * Don't make character-string constants longer than about 250 bytes.
47049 + Longer strings should be broken up into arrays of strings.
47050 + * Don't write into character-string constants (obviously). Even when
47051 + you know you are not writing past the end; the compiler or linker
47052 + might have put them into read-only and/or shared memory, and/or
47053 + coalesced multiple equal constants so if you change one you change
47055 + * Don't depend on '\r' being carriage return.
47056 + * Don't depend on '\n' being linefeed or for that matter any SINGLE
47058 + * Don't depend on '\r' and '\n' being different (e.g. as separate
47060 + * In other words, don't use \n or \r to stand for specific
47061 + characters; use \012 and \015 instead.
47062 + * Don't code for "buzzword 1.0 compliance", unless "buzzword" is K&R
47063 + and "1.0" is the first edition.
47064 + * Don't use or depend on anything_t (size_t, pid_t, etc), except
47065 + time_t, without #ifdef protection (time_t is the only one I've
47066 + found that is accepted everywhere). This is a tough one because
47067 + the same function might require (say) a size_t arg on one
47068 + platform, whereas size_t is unheard of on another; or worse, it
47069 + might require a totally different data type, like int or long or
47070 + some other typedef'd thing. It has often proved necessary to
47071 + define a symbol to stand for the type of a particular argument to
47072 + a particular library or system function to get around this
47074 + * Don't use or depend on internationalization ("i18n") features,
47075 + wchar_t, locales, etc, in portable code; they are not portable.
47076 + Anyway, locales are not the right model for Kermit's
47077 + multi-character-set support. Kermit does all character-set
47078 + conversion itself and does not use any external libraries or
47080 + * In particular, don't use any library functions that deal with wide
47081 + characters or Unicode in any form. These are not only nonportable,
47082 + but a constantly shifting target (e.g. the ones in glibc).
47083 + * Don't make any assumption about signal handler type. It can be
47084 + void, int, long, or anything else. Always declare signal handlers
47085 + as SIGTYP (see definition in ckcdeb.h and augment it if necessary)
47086 + and always use SIGRETURN at exit points from signal handlers.
47087 + * Signals should always be re-armed to be used again (this barely
47088 + scratches the surface -- the differences between BSD/V7 and System
47089 + V and POSIX signal handling are numerous, and some platforms do
47090 + not even support signals, alarms, or longjmps correctly or at all
47091 + -- avoid all of this if you can).
47092 + * On the other hand, don't assume that signals are disarmed after
47093 + being raised. In some platforms you have to re-arm them, in others
47095 + * Don't call malloc() and friends from a signal handler; don't do
47096 + anything but setting integer global variables in a signal handler.
47097 + * malloc() does not initialize allocated memory -- it never said it
47098 + did. Don't expect it to be all 0's.
47099 + * Did You Know: malloc() can succeed and the program can still dump
47100 + core later when it attempts to use the malloc'd memory? (This
47101 + happens when allocation is deferred until use and swap space is
47103 + * memset(), memmove(), and memcpy() are not portable, don't use them
47104 + without protecting them in ifdefs (we have USE_MEMCPY for this).
47105 + bzero()/bcopy() too, except we're guaranteed to have
47106 + bzero()/bcopy() when using the sockets library (not really). See
47107 + examples in the source.
47108 + * Don't assume that strncpy() stops on the first null byte -- most
47109 + versions always copy the number of bytes given in arg 3, padding
47110 + out with 0's and overwriting whatever was there before. Use
47111 + C-Kermit ckstrncpy() if you want predictable non-padding behavior,
47112 + guaranteed NUL-termination, and a useful return code.
47113 + * DID YOU KNOW.. that some versions of inet_blah() routines return
47114 + IP addresses in network byte order, while others return them local
47115 + machine byte order? So passing them to ntohs() or whatever is not
47116 + always the right thing to do.
47117 + * Don't use ANSI-format function declarations without #ifdef
47118 + CK_ANSIC, and always provide an #else for the non-ANSI case.
47119 + * Use the Kermit _PROTOTYP() macro for declaring function
47120 + prototypes; it works in both the ANSI and non-ANSI cases.
47121 + * Don't depend on any other ANSI preprocessor features like
47122 + "pasting" -- they are often missing or nonoperational.
47123 + * Don't assume any C++ syntax or semantics.
47124 + * Don't use // as a comment introducer. C is not C++.
47125 + * Don't declare a string as "char foo[]" in one module and "extern
47126 + char * foo" in another, or vice-versa: this causes core dumps.
47127 + * With compiler makers falling all over themselves trying to outdo
47128 + each other in ANSI strictness, it has become increasingly
47129 + necessary to cast EVERYTHING. This is increasingly true for char
47130 + vs unsigned char. We need to use unsigned chars if we want to deal
47131 + with 8-bit character sets, but most character- and string-oriented
47132 + APIs want (signed) char arguments, so explicit casts are
47133 + necessary. It would be nice if every compiler had a
47134 + -funsigned-char option (as gcc does), but they don't.
47135 + * a[x], where x is an unsigned char, can produce a wild memory
47136 + reference if x, when promoted to an int, becomes negative. Cast it
47137 + to (unsigned), even though it ALREADY IS unsigned.
47138 + * Be careful how you declare functions that have char or long
47139 + arguments; for ANSI compilers you MUST use ANSI declarations to
47140 + avoid promotion problems, but you can't use ANSI declarations with
47141 + non-ANSI compilers. Thus declarations of such functions must be
47142 + hideously entwined in #ifdefs. Example: latter:
47143 + int /* Put character in server command buffer */
47147 + putsrv(c) char c;
47148 + #endif /* CK_ANSIC */
47151 + *srvptr = '\0'; /* Make sure buffer is null-terminated */
47154 + * Be careful how you return characters from functions that return
47155 + int values -- "getc-like functions" -- in the ANSI world. Unless
47156 + you explicitly cast the return value to (unsigned), it is likely
47157 + to be "promoted" to an int and have its sign extended.
47158 + * At least one compiler (the one on DEC OSF/1 1.3) treats "/*" and
47159 + "*/" within string constants as comment begin and end. No amount
47160 + of #ifdefs will get around this one. You simply can't put these
47161 + sequences in a string constant, e.g. "/usr/local/doc/*.*".
47162 + * Avoid putting multiple macro references on a single line, e.g.:
47163 + putchar(BS); putchar(SP); putchar(BS)
47165 + This overflows the CPP output buffer of more than a few C
47166 + preprocessors (this happened, for example, with SunOS 4.1 cc, which
47167 + evidently has a 1K macro expansion buffer).
47169 + C-Kermit needs constant adjustment to new OS and compiler releases.
47170 + Every new OS release shuffles header files or their contents, or
47171 + prototypes, or data types, or levels of ANSI strictness, etc. Every
47172 + time you make an adjustment to remove a new compilation error, BE VERY
47173 + CAREFUL to #ifdef it on a symbol unique to the new configuration so
47174 + that the previous configuration (and all other configurations on all
47175 + other platforms) remain as before.
47177 + Assume nothing. Don't assume header files are where they are supposed
47178 + to be, that they contain what you think they contain, that they define
47179 + specific symbols to have certain values -- or define them at all!
47180 + Don't assume system header files protect themselves against multiple
47181 + inclusion. Don't assume that particular system or library calls are
47182 + available, or that the arguments are what you think they are -- order,
47183 + data type, passed by reference vs value, etc. Be conservative when
47184 + attempting to write portable code. Avoid all advanced features.
47186 + If you see something that does not make sense, don't assume it's a
47187 + mistake -- it might be there for a reason, and changing it or removing
47188 + is likely to cause compilation, linking, or runtime failures sometime,
47189 + somewhere. Some huge percentage of the code, especially in the
47190 + platform-dependent modules, is workarounds for compiler, linker, or
47193 + But finally... feel free to violate any or all of these rules in
47194 + platform-specific modules for environments in which the rules are
47195 + certain not to apply. For example, in VMS-specific code, it is OK to
47196 + use #if, because VAX C, DEC C, and VMS GCC all support it.
47198 + [ [29]Contents ] [ [30]C-Kermit ] [ [31]Kermit Home ]
47199 + ________________________________________________________________________
47201 + 3.1. Memory Leaks
47203 + The C language and standard C library are notoriously inadequate and
47204 + unsafe. Strings are arrays of characters, usually referenced through
47205 + pointers. There is no native string datatype. Buffers are fixed size,
47206 + and C provides no runtime bounds checking, thus allowing overwriting
47207 + of other data or even program code. With the popularization of the
47208 + Internet, the "buffer exploit" has become a preferred method for
47209 + hackers to hijack privileged programs; long data strings are fed to a
47210 + program in hopes that it uses unsafe C library calls such as strcpy()
47211 + or sprintf() to copy strings into automatic arrays, thus overwriting
47212 + the call stack, and therefore the routine's return address. When such
47213 + a hole is discovered, a "string" can be constructed that contains
47214 + machine code to hijack the program's privileges and penetrate the
47217 + This problem is partially addressed by the strn...() routines, which
47218 + should always be used in preference to their str...() equivalents
47219 + (except when the copy operation has already been prechecked, or there
47220 + is a good reason for not using them, e.g. the sometimes undesirable
47221 + side effect of strncpy() zeroing the remainder of the buffer). The
47222 + most gaping whole, however, is sprintf(), which performs no length
47223 + checking on its destination buffer, and is not easy to replace.
47224 + Although snprintf() routines are starting to appear, they are not yet
47225 + widespread, and certainly not universal, nor are they especially
47226 + portable, or even full-featured.
47228 + For these reasons, we have started to build up our own little library
47229 + of C Library replacements, ckclib.[ch]. These are safe and highly
47230 + portable primitives for memory management and string manipulation,
47234 + Like strncpy but returns a useful value, doesn't zero buffer.
47237 + Opposite of atoi()
47240 + Opposite of atol()
47243 + Returns character as string
47246 + Used with ck?to?() as a safe sprintf() replacement for up to 4
47250 + Like ckmakmsg() but accepts up to 12 items
47252 + More about library functions in [32]Section 4.A.
47254 + [ [33]Contents ] [ [34]C-Kermit ] [ [35]Kermit Home ]
47255 + ________________________________________________________________________
47257 + 3.2. The "char" vs "unsigned char" Dilemma
47259 + This is one of the most aggravating and vexing characteristics of the
47260 + C language. By design, chars (and char *'s) are SIGNED. But in the
47261 + modern era, however, we need to process characters that can have (or
47262 + include) 8-bit values, as in the ISO Latin-1, IBM CP 850, or UTF-8
47263 + character sets, so this data must be treated as unsigned. But some C
47264 + compilers (such as those based on the Bell UNIX V7 compiler) do not
47265 + support "unsigned char" as a data type. Therefore we have the macro or
47266 + typedef CHAR, which we use when we need chars to be unsigned, but
47267 + which, unfortunately, resolves itself to "char" on those compilers
47268 + that don't support "unsigned char". AND SO... We have to do a lot of
47269 + fiddling at runtime to avoid sign extension and so forth.
47271 + Some modern compilers (e.g. IBM, DEC, Microsoft) have options that say
47272 + "make all chars be unsigned" (e.g. GCC "-funsigned-char") and we use
47273 + them when they are available. Other compilers don't have this option,
47274 + and at the same time, are becoming increasingly strict about type
47275 + mismatches, and spew out torrents of warnings when we use a CHAR where
47276 + a char is expected, or vice versa. We fix these one by one using
47277 + casts, and the code becomes increasingly ugly. But there remains a
47278 + serious problem, namely that certain library and kernel functions have
47279 + arguments that are declared as signed chars (or pointers to them),
47280 + whereas our character data is unsigned. Fine, we can can use casts
47281 + here too -- but who knows what happens inside these routines.
47283 + [ [36]Contents ] [ [37]C-Kermit ] [ [38]Kermit Home ]
47284 + ________________________________________________________________________
47288 + When C-Kermit is on the far end of a connection, it is said to be in
47289 + remote mode. When C-Kermit has made a connection to another computer,
47290 + it is in local mode. (If C-Kermit is "in the middle" of a multihop
47291 + connection, it is still in local mode.)
47293 + On another axis, C-Kermit can be in any of several major states:
47296 + Reading and writing from the job's controlling terminal or
47297 + "console". In this mode, all i/o is handled by the Group E
47298 + conxxx() (console i/o) routines.
47301 + Reading and writing from the communicatons device. In this
47302 + mode, all i/o is handled by the Group E ttxxx() (terminal i/o)
47306 + Reading from the keyboard with conxxx() routines and writing to
47307 + the communications device with ttxxx() routines AND vice-versa.
47309 + When in local mode, the console and communications device are
47310 + distinct. During file transfer, Kermit may put up a file-transfer
47311 + display on the console and sample the console for interruption
47314 + When in remote mode, the console and communications device are the
47315 + same, and therefore there can be no file-transfer display on the
47316 + console or interruptions from it (except for "in-band" interruptions
47319 + [ [39]Contents ] [ [40]C-Kermit ] [ [41]Kermit Home ]
47320 + ________________________________________________________________________
47322 + 4.A. Group A: Library Functions
47324 + Library functions, strictly portable, can be used by all modules on
47325 + all platforms: [42]ckclib.h, [43]ckclib.c.
47327 + (To be filled in... For now, see [44]Section 3.1 and the comments in
47330 + [ [45]Contents ] [ [46]C-Kermit ] [ [47]Kermit Home ]
47331 + ________________________________________________________________________
47333 + 4.B. Group B: Kermit File Transfer
47335 + The Kermit protocol kernel. These files, whose names start with "ckc
47336 + are supposed to be totally portable C, and are expected to compile
47337 + correctly on any platform with any C compiler. "Portable" does not
47338 + mean the same as as "ANSI" -- these modules must compile on 10- and
47339 + 20-year old computers, with C preprocessors, compilers, and/or linkers
47340 + that have all sorts of restrictions. The Group B modules do not
47341 + include any header files other than those that come with Kermit
47342 + itself. They do not contain any library calls except from the standard
47343 + C library (e.g. printf()). They most certainly do not contain any
47344 + system calls. Files:
47347 + For use by C compilers that don't allow -D on the command line.
47350 + ASCII character symbol definitions.
47353 + System-independent signal-handling definitions and prototypes.
47356 + Originally, debugging definitions. Now this file also contains
47357 + all definitions and prototypes that are shared by all modules
47361 + Kermit protocol symbol definitions.
47364 + Character-set-related symbol definitions (see next section).
47367 + The main program. This module contains the declarations of all
47368 + the protocol-related global variables that are shared among the
47372 + The protocol module itself, written in "wart", a lex-like
47373 + preprocessor that is distributed with Kermit under the name
47376 + [56]ckcfns.c, [57]ckcfn2.c, [58]ckcfn3.c
47377 + The protocol support functions used by the protocol module.
47379 + [59]Group B modules may call upon functions from [60]Group E, but not
47380 + from [61]Group D modules (with the single exception that the main
47381 + program invokes the user interface, which is in Group D). (This last
47382 + assertion is really only a conjecture.)
47384 + [ [62]Contents ] [ [63]C-Kermit ] [ [64]Kermit Home ]
47385 + ________________________________________________________________________
47387 + 4.C. Group C: Character-Set Conversion
47389 + Character set translation tables and functions. Used by the [65]Group
47390 + B, protocol modules, but may be specific to different computers. (So
47391 + far, all character character sets supported by C-Kermit are supported
47392 + in [66]ckuxla.c and [67]ckuxla.h, including Macintosh and IBM
47393 + character sets). These modules should be completely portable, and not
47394 + rely on any kind of system or library services.
47397 + Character-set definitions usable by all versions of C-Kermit.
47400 + Character-set definitions for computer "?", e.g. [69]ckuxla.h
47401 + for UNIX, [70]ckmxla.h for Macintosh.
47404 + Character-set translation tables and functions for computer
47405 + "?", For example, CKUXLA.C for UNIX, CKMXLA.C for Macintosh. So
47406 + far, these are the only two such modules. The UNIX module is
47407 + used for all versions of C-Kermit except the Macintosh version.
47410 + Unicode definitions
47415 + Here's how to add a new file character set in the original
47416 + (non-Unicode modules). Assuming it is based on the Roman (Latin)
47417 + alphabet. Let's call it "Barbarian". First, in ck?xla.h, add a
47418 + definition for FC_BARBA (8 chars maximum length) and increase
47419 + MAXFCSETS by 1. Then, in ck?xla.c:
47421 + * Add a barbarian entry into the fcsinfo array.
47422 + * Add a "barbarian" entry to file character set keyword table,
47424 + * Add a "barbarian" entry to terminal character set keyword table,
47426 + * Add a translation table from Latin-1 to barbarian: yl1ba[].
47427 + * Add a translation table from barbarian to Latin-1: ybal1[].
47428 + * Add a translation function from Barbarian to ASCII: xbaas().
47429 + * Add a translation function from Barbarian to Latin-1: xbal1().
47430 + * Add a translation function from Latin-1 to Barbarian: xl1ba().
47431 + * etc etc for each transfer character set...
47432 + * Add translation function pointers to the xls and xlr tables.
47434 + Other translations involving Barbarian (e.g. from Barbarian to
47435 + Latin-Cyrillic) are performed through these tables and functions. See
47436 + ckuxla.h and ckuxla.c for extensive examples.
47438 + To add a new Transfer Character Set, e.g. Latin Alphabet 9 (for the
47439 + Euro symbol), again in the "old" character-set modules:
47443 + + Add a TC_xxxx definition and increase MAXTCSETS accordingly.
47445 + In ck?xla.h (since any transfer charset is also a file charset):
47447 + + Add an FC_xxxx definition and increase MAXFCSETS accordingly.
47451 + + Add a tcsinfo[] entry.
47452 + + Make a tcstab[] keyword table entry.
47453 + + Make an fcsinfo[] table entry.
47454 + + Make an fcstab[] keyword table entry.
47455 + + Make a tcstab[] keyword table entry.
47456 + + If necessary, make a langinfo[] table entry.
47457 + + Make entries in the function pointer arrays.
47458 + + Provide any needed functions.
47460 + As of C-Kermit 7.0, character sets are also handled in parallel by the
47461 + new (and very large) Unicode module, ckcuni.[ch]. Eventually we should
47462 + phase out the old way, described just above, and operate entirely in
47463 + (and through) Unicode. The advantages are many. The disadvantages are
47464 + size and performance. To add a character to the Unicode modules:
47468 + + (To be filled in...)
47472 + + (To be filled in...)
47474 + [ [74]Contents ] [ [75]C-Kermit ] [ [76]Kermit Home ]
47475 + ________________________________________________________________________
47477 + 4.D. Group D: User Interface
47479 + This is the code that communicates with the user, gets her commands,
47480 + informs her of the results. It may be command-line oriented,
47481 + interactive prompting dialog, menus and arrow keys, windows and mice,
47482 + speech recognition, telepathy, etc. The one provided is command-and
47483 + prompt, with the ability to read commands from various sources: the
47484 + console keyboard, a file, or a macro definition. The user interface
47485 + has three major functions:
47487 + 1. Sets the parameters for the file transfer and then starts it. This
47488 + is done by setting certain (many) global variables, such as the
47489 + protocol machine start state, the file specification, file type,
47490 + communication parameters, packet length, window size, character
47492 + 2. Displays messages on the user's screen during the file transfer,
47493 + using the screen() function, which is called by the group-1
47495 + 3. Executes any commands directly that do not require Kermit
47496 + protocol, such as the CONNECT command, local file management
47497 + commands, parameter-setting commands, FTP client commands, etc.
47499 + If you plan to imbed the [77]Group B, files into a program with a
47500 + different user interface, your interface must supply an appropriate
47501 + screen() function, plus a couple related ones like chkint() and
47502 + intmsg() for handling keyboard (or mouse, etc) interruptions during
47503 + file transfer. The best way to find out about this is to link all the
47504 + C-Kermit modules together except the ckuu*.o and ckucon.o modules, and
47505 + see which missing symbols turn up.
47507 + C-Kermit's character-oriented user interface (as opposed to the
47508 + Macintosh version's graphical user interface) consists of the
47509 + following modules. C-Kermit can be built with an interactive command
47510 + parser, a command-line-option-only parser, a graphical user interface,
47511 + or any combination, and it can even be built with no user interface at
47512 + all (in which case it runs as a remote-mode Kermit server).
47516 + The command parsing primitives used by the interactive command
47517 + parser to parse keywords, numbers, filenames, etc, and to give
47518 + help, complete fields, supply defaults, allow abbreviations and
47519 + editing, etc. This package is totally independent of Kermit,
47520 + but does depend on the [80]Group E functions.
47523 + Definitions of symbols used in Kermit's commands.
47526 + Kermit's interactive command parser, including the script
47527 + programming language: [82]ckuusr.c (includes top-level keyword
47528 + tables); [83]ckuus2.c (HELP command text); [84]ckuus3.c (most
47529 + of the SET command); [85]ckuus4.c (includes variables and
47530 + functions); ckuus[567].c (miscellaneous);
47533 + The command-line-option parser.
47536 + User interface functions common to both the interactive and
47537 + command-line parsers.
47540 + Version heralds for different implementations.
47543 + The (old, uucp-like) SCRIPT command
47546 + The DIAL command. Includes specific knowledge of many types of
47549 + Note that none of the above files is actually Unix-specific. Over time
47550 + they have proven to be portable among all platforms where C-Kermit is
47551 + built: Unix, VMS, AOS/VS, Amiga, OS-9, VOS, etc etc. Thus the third
47552 + letter should more properly be "c", but changing it would be too
47555 + ck?con.c, ckucns.c
47556 + The CONNECT command. Terminal connection, and in some cases
47557 + (Macintosh, Windows) also terminal emulation. NOTE: As of
47558 + C-Kermit 7.0, there are two different CONNECT modules for UNIX:
47559 + [91]ckucon.c -- the traditional, portable, fork()-based version
47560 + -- and [92]ckucns.c, a new version that uses select() rather
47561 + than forks so it can handle encryption. ckucns.c is the
47562 + preferred version for Unix; ckucon.c is not likely to keep pace
47563 + with it in terms of upgrades, etc. However, since select() is
47564 + not portable to every platform, ckucon.c will be kept
47565 + indefinitely for those platforms that can't use ckucns.c. NOTE:
47566 + SunLink X.25 support is available only in ckucon.c.
47569 + Modules having to do with authentication and encryption. Since
47570 + the relaxation of USA export laws, they are included with the
47571 + general source-code distribution. Secure C-Kermit binaries can
47572 + be built using special targets in the standard makefile.
47573 + However, secure prebuilt binaries may not be distributed.
47575 + For other implementations, the files may, and probably do, have
47576 + different names. For example, the Macintosh graphical user interface
47577 + filenames start with "ckm". Kermit 95 uses the ckucmd and ckuus*
47578 + modules, but has its own CONNECT command modules. And so on.
47580 + Here is a brief description of C-Kermit's "user interface interface",
47581 + from ckuusr.c. It is nowhere near complete; in particular, hundreds of
47582 + global variables are shared among the many modules. These should, some
47583 + day, be collected into classes or structures that can be passed around
47584 + as needed; not only for purity's sake, but also to allow for multiple
47585 + simultaneous communication sessions and or user interfaces. Our list
47586 + of things to do is endless, and reorganizing the source is almost
47587 + always at the bottom.
47589 + The ckuus*.c modules (like many of the ckc*.c modules) depend on the
47590 + existence of C library features like fopen, fgets, feof, (f)printf,
47591 + argv/argc, etc. Other functions that are likely to vary among
47592 + operating systems -- like setting terminal modes or interrupts -- are
47593 + invoked via calls to functions that are defined in the [93]Group E
47594 + platform-dependent modules, ck?[ft]io.c. The command line parser
47595 + processes any arguments found on the command line, as passed to main()
47596 + via argv/argc. The interactive parser uses the facilities of the cmd
47597 + package (developed for this program, but, in theory, usable by any
47598 + program). Any command parser may be substituted for this one. The only
47599 + requirements for the Kermit command parser are these:
47601 + 1. Set parameters via global variables like duplex, speed, ttname,
47602 + etc. See [94]ckcmai.c for the declarations and descriptions of
47604 + 2. If a command can be executed without the use of Kermit protocol,
47605 + then execute the command directly and set the sstate (start state)
47606 + variable to 0. Examples include SET commands, local directory
47607 + listings, the CONNECT command.
47608 + 3. If a command requires the Kermit protocol, set the following
47610 + sstate string data
47611 + 'x' (enter server mode) (none)
47612 + 'r' (send a 'get' command) cmarg, cmarg2
47613 + 'v' (enter receive mode) cmarg2
47614 + 'g' (send a generic command) cmarg
47615 + 's' (send files) nfils, cmarg & cmarg2 OR cmlist
47616 + 'c' (send a remote host command) cmarg
47618 + cmlist is an array of pointers to strings.
47619 + cmarg, cmarg2 are pointers to strings.
47620 + nfils is an integer (hmmm, probably should be an unsigned long).
47623 + A filename string (possibly wild), or:
47624 + a pointer to a prefabricated generic command string, or:
47625 + a pointer to a host command string.
47628 + The name to send a single file under, or:
47629 + the name under which to store an incoming file; must not
47631 + If it's the name for receiving, a null value means to
47632 + store the file under the name it arrives with.
47635 + A list of nonwild filenames, such as passed via argv.
47637 + nfils is an integer, interpreted as follows:
47638 + -1: filespec (possibly wild) in cmarg, must be expanded
47640 + 0: send from stdin (standard input).
47641 + >0: number of files to send, from cmlist.
47643 + The screen() function is used to update the screen during file
47644 + transfer. The tlog() function writes to a transaction log (if TLOG is
47645 + defined). The debug() function writes to a debugging log (if DEBUG is
47646 + defined). The intmsg() and chkint() functions provide the user i/o for
47647 + interrupting file transfers.
47649 + [ [95]Contents ] [ [96]C-Kermit ] [ [97]Kermit Home ]
47650 + ________________________________________________________________________
47652 + 4.E. Group E: Platform-Dependent I/O
47654 + Platform-dependent function definitions. All the Kermit modules,
47655 + including the command package, call upon these functions, which are
47656 + designed to provide system-independent primitives for controlling and
47657 + manipulating devices and files. For Unix, these functions are defined
47658 + in the files [98]ckufio.c (files), [99]ckutio.c (communications), and
47659 + [100]ckusig.c (signal handling).
47661 + For VMS, the files are [101]ckvfio.c, ckvtio.c, and [102]ckusig.c (VMS
47662 + can use the same signal handling routines as Unix). It doesn't really
47663 + matter what the files are called, except for Kermit distribution
47664 + purposes (grouping related files together alphabetically), only that
47665 + each function is provided with the name indicated, observes the same
47666 + calling and return conventions, and has the same type.
47668 + The Group E modules contain both functions and global variables that
47669 + are accessed by modules in the other groups. These are now described.
47671 + (By the way, I got this list by linking all the C-Kermit modules
47672 + together except ckutio and ckufio. These are the symbols that ld
47673 + reported as undefined. But that was a long time ago, probably circa
47676 + 4.E.1. Global Variables
47679 + Pointer to string containing command for deleting files.
47680 + Example: char *DELCMD = "rm -f "; (UNIX)
47681 + Example: char *DELCMD = "delete "; (VMS)
47682 + Note trailing space. Filename is concatenated to end of this
47683 + string. NOTE: DELCMD is used only in versions that do not
47684 + provide their own built-in DELETE command.
47687 + Pointer to string containing command for listing files when a
47688 + filespec is given.
47689 + Example: char *DIRCMD = "/bin/ls -l "; (UNIX)
47690 + Example: char *DIRCMD = "directory "; (VMS)
47691 + Note trailing space. Filename is concatenated to end of this
47692 + string. NOTE: DIRCMD is used only in versions that do not
47693 + provide their own built-in DIRECTORY command.
47696 + Pointer to string containing command for listing files when a
47697 + filespec is not given. (currently not used, handled in another
47699 + Example: char *DIRCMD2 = "/bin/ls -ld *";
47700 + NOTE: DIRCMD2 is used only in versions that do not provide
47701 + their own built-in DIRECTORY command.
47704 + Pointer to string containing command to display current
47706 + Example: char *PWDCMD = "pwd ";
47707 + NOTE: PWDCMD is used only in versions that do not provide their
47708 + own built-in PWD command.
47711 + Pointer to command to display free disk space in current
47712 + device/directory.
47713 + Example: char *SPACMD = "df .";
47714 + NOTE: SPACMD is used only in versions that do not provide their
47715 + own built-in SPACE command.
47718 + Pointer to command to display free disk space in another
47719 + device/directory.
47720 + Example: char *SPACM2 = "df ";
47721 + Note trailing space. Device or directory name is added to this
47722 + string. NOTE: SPACMD2 is used only in versions that do not
47723 + provide their own built-in SPACE command.
47726 + Pointer to command for displaying the contents of a file.
47727 + Example: char *TYPCMD = "cat ";
47728 + Note trailing space. Device or directory name is added to this
47729 + string. NOTE: TYPCMD is used only in versions that do not
47730 + provide their own built-in TYPE command.
47733 + Pointer to command for displaying logged-in users.
47734 + Example: char *WHOCMD = "who ";
47735 + Note trailing space. Specific user name may be added to this
47739 + Flag for whether program is running in foreground (0) or
47740 + background (nonzero). Background operation implies that screen
47741 + output should not be done and that all errors should be fatal.
47744 + Flag for who is to echo console typein:
47745 + 1: The program (system is not echoing).
47746 + 0: The OS, front end, terminal, etc (not this program).
47749 + Pointer to string that names the computer and operating system.
47750 + Example: char *ckxsys = " NeXT Mach 1.0";
47751 + Tells what computer system ckxv applies to. In UNIX Kermit,
47752 + this variable is also used to print the program herald, and in
47753 + the SHOW VERSION command.
47756 + Pointer to version/edit info of ck?tio.c module.
47757 + Example: char *ckxv = "UNIX Communications Support, 6.0.169, 6
47759 + Used by SHOW VERSION command.
47762 + Like ckxsys, but briefer.
47763 + Example: char *ckzsys = " 4.3 BSD";
47764 + Tells what platform ckzv applies to. Used by the SHOW VERSION
47768 + Pointer to version/edit info of ck?fio.c module.
47769 + Example: char *ckzv = "UNIX File support, 6.0.113, 6 Sep 96";
47770 + Used by SHOW VERSION command.
47773 + Default flow control. 0 = none, 1 = Xon/Xoff, ... (see FLO_xxx
47774 + symbols in ckcdeb.h)
47775 + Set by Group E module. Used by [103]ckcmai.c to initialize flow
47776 + control variable.
47779 + Default location. 0 = remote, 1 = local. Set by Group E module.
47780 + Used by ckcmai.c to initialize local variable. Used in various
47781 + places in the user interface.
47784 + Default parity. 0 = none, 'e' = even, 'o' = odd, 'm' = mark,
47785 + 's' = space. Set by Group E module. Used by ckcmai.c to
47786 + initialize parity variable.
47789 + Default communication device. Set by Group E module. Used in
47790 + many places. This variable should be initialized the the symbol
47791 + CTTNAM, which is defined in ckcdeb.h, e.g. as "/dev/tty" for
47792 + UNIX, "TT:" for VMS, etc. Example: char *dftty = CTTNAM;
47795 + Array of string pointers to filenames that matched the most
47796 + recent wildcard match, i.e. the most recent call to zxpand().
47797 + Used (at least) by command parsing package for partial filename
47800 + int tilde_expand;
47801 + Flag for whether to attempt to expand leading tildes in
47802 + directory names (used in UNIX only, and then only when the
47803 + symbol DTILDE is defined.
47806 + The protocol being used to communicate over a network device.
47807 + Values are defined in ckcnet.h. Example: NP_TELNET is network
47808 + protocol "telnet".
47811 + The maximum length for a filename, exclusive of any device or
47812 + directory information, in the format of the host operating
47816 + The maximum length for a fully specified filename, including
47817 + device designator, directory name, network node name, etc, in
47818 + the format of the host operating system, and including all
47822 + File descriptor of the communication device. -1 if there is no
47823 + open or usable connection, including when C-Kermit is in remote
47824 + mode. Since this is not implemented everywhere, references to
47825 + it are in #ifdef CK_TTYFD..#endif.
47827 + [ [104]Contents ] [ [105]C-Kermit ] [ [106]Kermit Home ]
47828 + ________________________________________________________________________
47832 + These are divided into three categories: file-related functions (B.1),
47833 + communication functions (B.2), and miscellaneous functions (B.3).
47835 + 4.E.2.1. File-Related Functions
47837 + In most implementations, these are collected together into a module
47838 + called ck?fio.c, where ? = "u" ([107]ckutio.c for Unix), "v"
47839 + ([108]ckvtio.c for VMS), [109]etc. To be totally platform-independent,
47840 + C-Kermit maintains its own file numbers, and provides the functions
47841 + described in this section to deal with the files associated with them.
47842 + The file numbers are referred to symbolically, and are defined as
47843 + follows in ckcker.h:
47845 + #define ZCTERM 0 /* Console terminal */
47846 + #define ZSTDIO 1 /* Standard input/output */
47847 + #define ZIFILE 2 /* Current input file for SEND command */
47848 + #define ZOFILE 3 /* Current output file for RECEIVE command */
47849 + #define ZDFILE 4 /* Current debugging log file */
47850 + #define ZTFILE 5 /* Current transaction log file */
47851 + #define ZPFILE 6 /* Current packet log file */
47852 + #define ZSFILE 7 /* Current session log file */
47853 + #define ZSYSFN 8 /* Input from a system function (pipe) */
47854 + #define ZRFILE 9 /* Local file for READ command */ (NEW)
47855 + #define ZWFILE 10 /* Local file for WRITE command */ (NEW)
47856 + #define ZMFILE 11 /* Auxilliary file for internal use */ (NEW)
47857 + #define ZNFILS 12 /* How many defined file numbers */
47859 + In the descriptions below, fn refers to a filename, and n refers to
47860 + one of these file numbers. Functions are of type int unless otherwise
47861 + noted, and are listed mostly alphabetically.
47865 + Checks the file number n. Returns:
47866 + -1: File number n is out of range
47867 + 0: n is in range, but file is not open
47868 + 1: n in range and file is open
47871 + iswild(filspec) char *filespec;
47872 + Checks if the file specification is "wild", i.e. contains
47873 + metacharacters or other notations intended to match multiple
47874 + filenames. Returns:
47879 + isdir(string) char *string;
47880 + Checks if the string is the name of an existing directory. The
47881 + idea is to check whether the string can be "cd'd" to, so in
47882 + some cases (e.g. DOS) it might also indicate any file
47883 + structured device, such as a disk drive (like A:). Other
47884 + nonzero returns indicate system-dependent information; e.g. in
47885 + VMS isdir("[.FOO]") returns 1 but isdir("FOO.DIR;1") returns 2
47886 + to indicate the directory-file name is in a format that needs
47887 + conversion before it can be combined with a filename. Returns:
47888 + 0: not a directory (including any kind of error)
47889 + 1: it is an existing directory
47892 + zfcdat(name) char *name;
47893 + Returns modification (preferably, otherwise creation) date/time
47894 + of file whose name is given in the argument string. Return
47895 + value is a pointer to a string of the form yyyymmdd hh:mm:ss,
47896 + for example 19931231 23:59:59, which represents the local time
47897 + (no timezone or daylight savings time finagling required).
47898 + Returns the null string ("") on failure. The text pointed to by
47899 + the string pointer might be in a static buffer, and so should
47900 + be copied to a safe place by the caller before any subsequent
47901 + calls to this function.
47904 + zfnqfp(fn, buflen, buf) char * fn; int buflen; char * buf;
47905 + Given the filename fn, the corresponding fully qualified,
47906 + absolute filename is placed into the buffer buf, whose length
47907 + is buflen. On failure returns a NULL pointer. On success
47908 + returns a pointer to a struct zfnfp containing pointers to the
47909 + full pathname and to just the filename, and an int giving the
47910 + length of the full pathname. All references to this function in
47911 + mainline code must be protected by #ifdef ZFNQFP..#endif,
47912 + because it is not present in all of the ck*fio.c modules. So if
47913 + you implement this function in a version that did not have it
47914 + before, be sure to add #define ZFNQFP in the appropriate spot
47915 + in ckcdeb.h or in the build-procedure CFLAGS.
47918 + zcmpfn(s1,s2) char * s2, * s2;
47919 + Compares two filenames to see if they refer to the same.
47920 + Internally, the arguments can be converted to fully qualified
47921 + pathnames, e.g. with zfnqfp(), realpath(), or somesuch. In Unix
47922 + or other systems where symbolic links exist, the link should be
47923 + resolved before making the comparison or looking at the inodes.
47925 + 0: Files are not identical.
47926 + 1: Files are identical.
47929 + zfseek(pos) long pos;
47930 + Positions the input pointer on the current input file to the
47931 + given position. The pos argument is 0-based, the offset
47932 + (distance in bytes) from beginning of the file. Needed for
47933 + RESEND, PSEND, and other recovery operations. This function is
47934 + not necessarily possible on all systems, e.g. record-oriented
47935 + systems. It should only be used on binary files (i.e. files we
47936 + are sending in binary mode) and stream-oriented file systems.
47942 + zchdir(dirnam) char *dirnam;
47943 + Changes current or default directory to the one given in
47949 + zchki(fn) char *fn;
47950 + Check to see if file with name fn is a regular, readable,
47951 + existing file, suitable for Kermit to send -- not a directory,
47952 + not a symbolic link, etc. Returns:
47953 + -3: if file exists but is not accessible (e.g.
47955 + -2: if file exists but is not of a readable type (e.g. a
47957 + -1: on error (e.g. file does not exist, or fn is garbage);
47958 + >=0: (length of file) if file exists and is readable.
47959 + Also see isdir(), zgetfs().
47962 + zchkpid(pid) unsigned long pid;
47964 + 1: If the given process ID (e.g. pid in UNIX) is valid and
47969 + zgetfs(fn) char *fn;
47970 + Gets the size of the given file, regardless of accessibility.
47971 + Used for directory listings. Unlike zchki(), should return the
47972 + size of any kind of file, even a directory. zgetfs() also
47973 + should serve as a mini "get file info" function that can be
47974 + used until we design a better one, by also setting some global
47976 + int zgfs_link = 1/0 = file is (not) a symbolic link.
47977 + int zgfs_dir = 1/0 = file is (not) a directory.
47978 + char linkname[] = if zgfs_link != 0, name of file link points
47981 + -1: on error (e.g. file does not exist, or fn is garbage);
47982 + >=0: (length of file) if file exists and is readable.
47985 + zchko(fn) char *fn;
47986 + Checks to see if a file of the given name can be created.
47988 + -1: if file cannot be created, or on any kind of error.
47989 + 0: if file can be created.
47992 + zchkspa(fn,len) char *f; long len;
47993 + Checks to see if there is sufficient space to store the file
47994 + named fn, which is len bytes long. If you can't write a
47995 + function to do this, then just make a dummy that always returns
47996 + 1; higher level code will recover from disk-full errors. The
47997 + receiving Kermit uses this function to refuse an incoming file
47998 + based on its size, via the attribute mechanism. Returns:
48000 + 0: if there is not enough space.
48001 + 1: if there is enough space.
48004 + zchin(n,c) int n; int *c;
48005 + Gets a character from file number n, return it in c (call with
48007 + -1: on failure, including EOF.
48008 + 0: on success with character in c.
48011 + zchout(n,c) int n; char c;
48012 + Writes the character c to file number n. Returns:
48018 + Closes file number n. Returns:
48023 + zdelet(fn) char *name;
48024 + Attempts to delete (remove, erase) the named file. Returns:
48026 + 1: if file was deleted successfully.
48030 + Returns a pointer to the system-dependent numeric
48031 + permissions/protection string for file f, or NULL upon failure.
48032 + Used if CK_PERMS is defined.
48036 + Returns a pointer to the system-dependent symbolic
48037 + permissions/protection string for file f, or NULL upon failure.
48038 + Used if CK_PERMS is defined. Example: In UNIX zgperm(f) might
48039 + return "100770", but ziperm() might return "-rwxrwx---". In
48040 + VMS, zgperm() would return a hexadecimal string, but ziperm()
48041 + would return something like "(RWED,RWED,RE,)".
48045 + Returns a pointer to the name of the current directory, folder,
48046 + etc, or a NULL pointer if the current directory cannot be
48047 + determined. If possible, the directory specification should be
48048 + (a) fully specified, e.g. as a complete pathname, and (b) be
48049 + suitable for appending a filename. Thus, for example, Unix
48050 + directory names should end with '/'. VMS directory names should
48051 + look like DEV:[NAME] (rather than, say, NAME.DIR;1).
48055 + Returns a pointer to a string containing the user's home
48056 + directory, or NULL upon error. Should be formatted like
48061 + Fill buffer from input file. This function is used by the macro
48062 + zminchar(), which is defined in ckcker.h. zminchar() manages
48063 + its own buffer, and calls zinfill() to fill it whenever it
48064 + becomes empty. It is used only for sending files, and reads
48065 + characters only from file number ZIFILE. zinfill() returns -1
48066 + upon end of file, -2 upon fatal error, and -3 upon timeout
48067 + (e.g. when reading from a pipe); otherwise it returns the first
48068 + character from the buffer it just read.
48072 + Kills the current job, session, process, etc, logs out,
48073 + disappears. Used by the Kermit server when it receives a BYE
48074 + command. On failure, returns -1. On success, does not return at
48075 + all! This function should not be called until all other steps
48076 + have been taken to close files, etc.
48079 + zstrip(fn,&fn2) char *fn1, **fn2;
48080 + Strips device and directory, etc, from file specification fn,
48081 + leaving only the filename (including "extension" or "filetype"
48082 + -- the part after the dot). For example DUA0:[PROGRAMS]OOFA.C;3
48083 + becomes OOFA.C, or /usr/fdc/oofa.c becomes oofa.c. Returns a
48084 + pointer to result in fn2.
48087 + zsetperm(char * file, unsigned int code)
48088 + Set permissions of file to given system-dependent code. 0: On
48093 + zsetroot(char * dir)
48094 + Sets the root for the user's file access, like Unix chroot(),
48095 + but does not require privilege. In Unix, this must be
48096 + implemented entirely by Kermit's own file access routines.
48099 + -1: Invalid argument
48101 + -3: Internal error
48102 + -4: Access to given directory denied
48103 + -5: New root not within old root
48106 + zinroot(char * file)
48107 + If no root is set (zsetroot()), returns 1.
48108 + Otherwise, if given file is in the root, returns 1.
48109 + Otherwise, returns 0.
48112 + zltor(fn,fn2) char *fn1, *fn2;
48113 + Local-To-Remote filename translation. OBSOLETE: replaced by
48114 + nzltor() (q.v.). Translates the local filename fn into a format
48115 + suitable for transmission to an arbitrary type of computer, and
48116 + copies the result into the buffer pointed to by fn2.
48117 + Translation may involve (a) stripping the device and/or
48118 + directory/path name, (b) converting lowercase to uppercase, (c)
48119 + removing spaces and strange characters, or converting them to
48120 + some innocuous alphabetic character like X, (d) discarding or
48121 + converting extra periods (there should not be more than one).
48122 + Does its best. Returns no value. name2 is a pointer to a
48123 + buffer, furnished by the caller, into which zltor() writes the
48124 + resulting name. No length checking is done.
48128 + nzltor(fn,fn2,convert,pathnames,max) char *fn1,*fn2; int
48129 + convert,pathnames,max;
48130 + Replaces zltor(). This new version handles pathnames and checks
48131 + length. fn1 and fn2 are as in zltor(). This version is called
48132 + unconditionally for each file, rather than only when filename
48133 + conversion is enabled. Pathnames can have the following values:
48135 + PATH_OFF: Pathname, if any, is to be stripped
48136 + PATH_REL: The relative pathname is to be included
48137 + PATH_ABS: The full pathname is to be included
48139 + After handling pathnames, conversion is done to the result as
48140 + in the zltor() description if convert != 0; if relative or
48141 + absolute pathnames are included, they are converted to UNIX
48142 + format, i.e. with slash (/) as the directory separator. The max
48143 + parameter specifies the maximum size of fn2. If convert > 0,
48144 + the regular conversions are done; if convert < 0, minimal
48145 + conversions are done (we skip uppercasing the letters, we allow
48146 + more than one period, etc; this can be used when we know our
48147 + partner is UNIX or similar).
48149 + #endif /* NZLTOR */
48152 + nzxpand(fn,flags) char *fn; int flags;
48153 + Replaces zxpand(), which is obsolete as of C-Kermit 7.0.
48155 + fn = Pointer to filename or pattern.
48156 + flags = option bits:
48157 + flags & ZX_FILONLY Match regular files
48158 + flags & ZX_DIRONLY Match directories
48159 + flags & ZX_RECURSE Descend through directory tree
48160 + flags & ZX_MATCHDOT Match "dot files"
48161 + flags & ZX_NOBACKUP Don't match "backup files"
48162 + flags & ZX_NOLINKS Don't follow symlinks.
48164 + Returns the number of files that match fn, with data structures
48165 + set up so the first file (if any) will be returned by the next
48166 + znext() call. If ZX_FILONLY and ZX_DIRONLY are both set, or
48167 + neither one is set, files and directories are matched. Notes:
48169 + 1. It is essential that the number returned by nzxpand() reflect
48170 + the actual number of filenames that will be returned by
48171 + znext() calls. In other words:
48172 + for (n = nzxpand(string,flags); n > 0; n--) {
48174 + printf("%s\n", buf);
48176 + should print all the file names; no more, no less.
48177 + 2. In UNIX, DOS, OS-9, etc, where directories contain entries
48178 + for themselves (.) and the superior directory (..), these
48179 + should NOT be included in the list under any circumstances,
48180 + including when ZX_MATCHDOT is set.
48181 + 3. Additional option bits might be added in the future, e.g. for
48182 + sorting (sort by date/name/size, reverse/ascending, etc).
48183 + Currently this is done only in higher level code (through a
48184 + hack in which the nzxpand() exports its filename array, which
48185 + is not portable because not all OS's can use this mechanism).
48188 + zmail(addr,fn) char *addr, fn;
48189 + Send the local, existing file fn as e-mail to the address addr.
48192 + 2: if mail delivered but temp file can't be deleted
48193 + -2: if mail can't be delivered
48196 + zmkdir(path) char *path;
48197 + The path can be a file specification that might contain
48198 + directory information, in which the filename is expected to be
48199 + included, or an unambiguous directory specification (e.g. in
48200 + UNIX it must end with "/"). This routine attempts to create any
48201 + directories in the given path that don't already exist. Returns
48202 + 0 or greater success: no directories needed creation, or else
48203 + all directories that needed creation were created successfully;
48204 + the return code is the number of directories that were created.
48205 + Returns -1 on failure to create any of the needed directories.
48208 + zrmdir(path) char *path;
48209 + Attempts to remove the given directory. Returns 0 on success,
48210 + -1 on failure. The detailed semantics are open -- should it
48211 + fail if the directory contains any files or subdirectories,
48212 + etc. It is probably best for this routine to behave in whatever
48213 + manner is customary on the underlying platform; e.g. in UNIX,
48214 + VMS, DOS, etc, where directories can not be removed unless they
48218 + znewn(fn,s) char *fn, **s;
48219 + Transforms the name fn into a filename that is guaranteed to be
48220 + unique. If the file fn does not exist, then the new name is the
48221 + same as fn; Otherwise, it's different. this function does its
48222 + best, returns no value. New name is created in caller's space.
48223 + Call like this: znewn(old,&new);. The second parameter is a
48224 + pointer to the new name. This pointer is set by znewn() to
48225 + point to a static string in its own space, so be sure to the
48226 + result to a safe place before calling this function again.
48229 + znext(fn) char *fn;
48230 + Copies the next file name from a file list created by zxpand()
48231 + into the string pointed to by fn (see zxpand). If no more
48232 + files, then the null string is placed there. Returns 0 if there
48233 + are no more filenames, with 0th element the array pointed to by
48234 + fn set to NUL. If there is a filename, it is stored in the
48235 + array pointed to by fn and a positive number is returned. NOTE:
48236 + This is a change from earlier definitions of this function
48237 + (pre-1999), which returned the number of files remaining; thus
48238 + 0 was the return value when returning the final file. However,
48239 + no mainline code ever depended on the return value, so this
48240 + change should be safe.
48243 + zopeni(n,fn) int n; char *fn;
48244 + Opens the file named fn for input as file number n. Returns:
48249 + zopeno(n,fn,zz,fcb) int n; char *name; struct zattr *zz; struct
48251 + Attempts to open the named file for output as file number n. zz
48252 + is a Kermit file attribute structure as defined in ckcdeb.h,
48253 + containing various information about the file, including its
48254 + size, creation date, and so forth. This function should attempt
48255 + to honor as many of these as possible. fcb is a "file control
48256 + block" in the traditional sense, defined in ckcdeb.h,
48257 + containing information relevant to complicated file systems
48258 + like VMS (RMS), IBM MVS, etc, like blocksize, record length,
48259 + organization, record format, carriage control, etc. Returns:
48265 + Dumps a file output buffer. Used with the macro zmchout()
48266 + defined in ckcker.h. Used only with file number ZOFILE, i.e.
48267 + the file that is being received by Kermit during file transfer.
48273 + zprint(p,fn) char *p, *f;
48274 + Prints the file with name fn on a local printer, with options
48277 + 3: if file sent to printer but can't be deleted
48278 + -3: if file can't be printed
48281 + zrename(fn,fn2) char *fn, *fn2;
48282 + Changes the name of file fn to fn2. If fn2 is the name of an
48283 + existing directory, or a file-structured device, then file fn
48284 + is moved to that directory or device, keeping its original
48285 + name. If fn2 lacks a directory separator when passed to this
48286 + function, an appropriate one is supplied. Returns:
48291 + zcopy(source,dest) char * source, * dest;
48292 + Copies the source file to the destination. One file only. No
48293 + wildcards. The destination string may be a filename or a
48294 + directory name. Returns:
48297 + -2: source file is not a regular file.
48298 + -3: source file not found.
48299 + -4: permission denied.
48300 + -5: source and destination are the same file.
48305 + zlocaltime(char *)
48306 + Call with: "yyyymmdd hh:mm:ss" GMT/UTC date-time. Returns
48307 + pointer to local date-time string "yyyymmdd hh:mm:ss" on
48308 + success, NULL on failure.
48311 + zrtol(fn,fn2) char *fn, *fn2;
48312 + Remote-To-Local filename translation. OBSOLETE: replaced by
48313 + nzrtol(). Translates a "standard" filename to a local filename.
48314 + For example, in Unix this function might convert an
48315 + all-uppercase name to lowercase, but leave lower- or mix-case
48316 + names alone. Does its best, returns no value. New name is in
48317 + string pointed to by fn2. No length checking is done.
48321 + nzrtol(fn,fn2,convert,pathnames,max) char *fn1,*fn2; int
48322 + convert,pathnames,max;
48323 + Replaces zrtol. Like zrtol but handles pathnames and checks
48324 + length. See nzltor for detailed description of parameters.
48326 + #endif /* NZLTOR */
48329 + zsattr(xx) struct zattr *xx;
48330 + Fills in a Kermit file attribute structure for the file which
48331 + is to be sent, namely the currently open ZIFILE. Note that this
48332 + is not a very good design, but we're stuck with it. Callers
48333 + must ensure that zsattr() is called only on real files, not on
48334 + pipes, internally generated file-like objects such as server
48335 + REMOTE command responses, etc. Returns:
48337 + 0: on success with the structure filled in.
48338 + If any string member is null, it should be ignored by the
48340 + If any numeric member is -1, it should be ignored by the
48344 + zshcmd(s) char *s;
48345 + s contains to pointer to a command to be executed by the host
48346 + computer's shell, command parser, or operating system. If the
48347 + system allows the user to choose from a variety of command
48348 + processors (shells), then this function should employ the
48349 + user's preferred shell. If possible, the user's job
48350 + (environment, process, etc) should be set up to catch keyboard
48351 + interruption signals to allow the user to halt the system
48352 + command and return to Kermit. The command must run in ordinary,
48353 + unprivileged user mode. If possible, this function should
48354 + return -1 on failure to start the command, or else it should
48355 + return 1 if the command succeeded and 0 if it failed.
48359 + zshcmd() and zsyscmd() should set this to the command's actual
48360 + exit status code if possible.
48363 + zsyscmd(s) char *s;
48364 + s contains to pointer to a command to be executed by the host
48365 + computer's shell, command parser, or operating system. If the
48366 + system allows the user to choose from a variety of command
48367 + processors (shells), then this function should employ the
48368 + system standard shell (e.g. /bin/sh for Unix), so that the
48369 + results will always be the same for everybody. If possible, the
48370 + user's job (environment, process, etc) should be set up to
48371 + catch keyboard interruption signals to allow the user to halt
48372 + the system command and return to Kermit. The command must run
48373 + in ordinary, unprivileged user mode. If possible, this function
48374 + should return -1 on failure to start the command, or else it
48375 + should return 1 if the command succeeded and 0 if it failed.
48378 + z_exec(s,args) char * s; char * args[];
48379 + This one executes the command s (which is searched for using
48380 + the system's normal searching mechanism, such as PATH in UNIX),
48381 + with the given argument vector, which follows the conventions
48382 + of UNIX argv[]: the name of the command pointed to by element
48383 + 0, the first arg by element 1, and so on. A null args[] pointer
48384 + indicates the end of the arugment list. All open files must
48385 + remain open so the exec'd process can use them. Returns only if
48389 + zsinl(n,s,x) int n, x; char *s;
48390 + Reads a line from file number n. Writes the line into the
48391 + address s provided by the caller. Writing terminates when
48392 + newline is read, but with newline discarded. Writing also
48393 + terminates upon EOF or if length x is exhausted. Returns:
48394 + -1: on EOF or error.
48398 + zsout(n,s) int n; char *s;
48399 + Writes the string s out to file number n. Returns:
48404 + zsoutl(n,s) int n; char *s;
48405 + Writes the string s out to file number n and adds a line
48406 + (record) terminator (boundary) appropriate for the system and
48407 + the file format. Returns:
48412 + zsoutx(n,s,x) int n, x; char *s;
48413 + Writes exactly x characters from string s to file number n. If
48414 + s has fewer than x characters, then the entire string s is
48415 + written. Returns:
48417 + >= 0: on success, the number of characters actually written.
48420 + zstime(fn,yy,x) char *fn; struct zattr *yy; int x;
48421 + Sets the creation date (and other attributes) of an existing
48422 + file, or compares a file's creation date with a given date.
48425 + fn: pointer to name of existing file.
48426 + yy: Pointer to a Kermit file attribute structure in which yy->date.val
48427 + is a date of the form yyyymmdd hh:mm:ss, e.g. 19900208 13:00:00, which
48428 + is to be used for setting or comparing the file date. Other attributes
48429 + in the struct can also be set, such as the protection/permission (See
48430 + [110]Appendix I), when it makes sense (e.g. "yy->lprotect.val" can be
48431 + set if the remote system ID matches the local one).
48432 + x: A function code: 0 means to set the file's creation date as given.
48433 + 1 means compare the date from the yy struct with the file's date.
48436 + -1: on any kind of error.
48437 + 0: if x is 0 and the file date was set successfully.
48438 + 0: if x is 1 and date from attribute structure > file
48440 + 1: if x is 1 and date from attribute structure <= file
48444 + zstrip(name,name2) char *name, **name2;
48445 + Strips pathname from filename "name". Constructs the resulting
48446 + string in a static buffer in its own space and returns a
48447 + pointer to it in name2. Also strips device name, file version
48448 + numbers, and other "non-name" material.
48451 + zxcmd(n,s) char *s;
48452 + Runs a system command so its output can be accessed as if it
48453 + were file n. The command is run in ordinary, unprivileged user
48455 + If n is ZSTDIO or ZCTERM, returns -1.
48456 + If n is ZIFILE or ZRFILE, then Kermit reads from the command,
48457 + otherwise Kermit writes to the command.
48458 + Returns 0 on error, 1 on success.
48461 + zxpand(fn) char *fn;
48462 + OBSOLETE: Replaced by nzxpand(), q.v.
48467 + Returns the number of files returned by the most recent
48468 + nzxpand() call, and resets the list to the beginning so the
48469 + next znext() call returns the first file. Returns -1 if zxpand
48470 + has not yet been called. If this function is available,
48471 + ZXREWIND should be defined; otherwise it should not be
48474 + #endif /* ZXREWIND */
48477 + xsystem(cmd) char *cmd;
48478 + Executes the system command without redirecting any of its i/o,
48479 + similar (well, identical) to system() in Unix. But before
48480 + passing the command to the system, xsystem() ensures that all
48481 + privileges are turned off, so that the system command executes
48482 + in ordinary unprivileged user mode. If possible, xsystem()
48483 + returns the return code of the command that was executed.
48485 + 4.E.2.2. IKSD Variables and Functions
48487 + These must be implemented in any C-Kermit version that is to be
48488 + installed as an Internet Kermit Service Daemon (IKSD). IKSD is
48489 + expected to be started by the Internet Daemon (e.g. inetd) with its
48490 + standard i/o redirected to the incoming connection.
48493 + Nonzero if anonymous logins allowed.
48495 + extern int inserver;
48496 + Nonzero if started in IKSD mode.
48498 + extern int isguest;
48499 + Nonzero if IKSD and user logged in anonymously.
48501 + extern char * homdir;
48502 + Pointer to user's home directory.
48504 + extern char * anonroot;
48505 + Pointer to file-system root for anonymous users.
48507 + Existing functions must make "if (inserver && isguest)" checks for
48508 + actions that would not be legal for guests: zdelete(), zrmdir(),
48509 + zprint(), zmail(), etc.
48512 + zvuser(name) char * name;
48513 + Verifies that user "name" exists and is allowed to log in. If
48514 + the name is "ftp" or "anonymous" and ckxanon != 0, a guest
48515 + login is set up. Returns 0 if user not allowed to log in,
48516 + nonzero if user may log in.
48519 + zvpass(string) char * string;
48520 + Verifies password of the user from the most recent zvuser()
48521 + call. Returns nonzero if password is valid for user, 0 if it
48522 + isn't. Makes any appropriate system log entries (IKSD logins,
48523 + failed login attempts, etc). If password is valid, logs the
48524 + user in as herself (if real user), or sets up restricted
48525 + anonymous access if user is guest (e.g. changes file-system
48526 + root to anonroot and sets isguest = 1).
48530 + Begins any desired system logging of an IKSD session.
48534 + Terminates an IKSD session. In most cases this is simply a
48535 + wrapper for exit() or doexit(), with some system logging added.
48537 + 4.E.2.3. Privilege Functions
48539 + These functions are used by C-Kermit to adapt itself to operating
48540 + systems where the program can be made to run in a "privileged" mode,
48541 + e.g. setuid or setgid in Unix. C-Kermit should NOT read and write
48542 + files or start subprocesses as a privileged program. This would
48543 + present a serious threat to system security. The security package has
48544 + been installed to prevent such security breaches by turning off the
48545 + program's special privileges at all times except when they are needed.
48547 + In UNIX, the only need Kermit has for privileged status is access to
48548 + the UUCP lockfile directory, in order to read, create, and destroy
48549 + lockfiles, and to open communication devices that are normally
48550 + protected against the user (see the [111]Unix C-Kermit Installation
48551 + Instructions for discussion). Therefore, privileges should only be
48552 + enabled for these operations and disabled at all other times. This
48553 + relieves the programmer of the responsibility of putting expensive and
48554 + unreliable access checks around every file access and subprocess
48557 + Strictly speaking, these functions are not required in all C-Kermit
48558 + implementations, because their use (so far, at least) is internal to
48559 + the Group E modules. However, they should be included in all C-Kermit
48560 + implementations for operating systems that support the notion of a
48561 + privileged program (UNIX, RSTS/E, what others?).
48565 + Determine whether the program is running in privileged status.
48566 + If so, turn off the privileges, in such a way that they can be
48567 + turned on again when needed. Called from sysinit() at program
48568 + startup time. Returns:
48570 + nonzero on failure, in which case the program should halt
48575 + If the program is not privileged, this function does nothing.
48576 + If the program is privileged, this function returns it to
48577 + privileged status. priv_ini() must have been called first.
48580 + nonzero on failure
48584 + Turns privileges off (if they are on) in such a way that they
48585 + can be turned back on again. Returns:
48587 + nonzero on failure
48591 + Turns privileges off in such a way that they cannot be turned
48592 + back on. Returns:
48594 + nonzero on failure
48598 + Attempts to turns privileges off in such a way that they can be
48599 + turned on again later. Then checks to make sure that they were
48600 + really turned off. If they were not really turned off, then
48601 + they are cancelled permanently. Returns:
48603 + nonzero on failure
48605 + 4.E.2.4. Console-Related Functions
48607 + These relate to the program's "console", or controlling terminal, i.e.
48608 + the terminal that the user is logged in on and types commands at, or
48609 + on a PC or workstation, the actual keyboard and screen.
48612 + conbin(esc) char esc;
48613 + Puts the console into "binary" mode, so that Kermit's command
48614 + parser can control echoing and other treatment of characters
48615 + that the user types. esc is the character that will be used to
48616 + get Kermit's attention during packet mode; puts this in a
48617 + global place. Sets the ckxech variable. Returns:
48622 + concb(esc) char esc;
48623 + Put console in "cbreak" (single-character wakeup) mode. That
48624 + is, ensure that each console character is available to the
48625 + program immediately when the user types it. Otherwise just like
48626 + conbin(). Returns:
48632 + Returns a number, 0 or greater, the number of characters
48633 + waiting to be read from the console, i.e. the number of
48634 + characters that the user has typed that have not been read yet
48639 + Returns the speed ("baud rate") of the controlling terminal, if
48640 + known, otherwise -1L.
48643 + congks(timo) int timo;
48644 + Get Keyboard Scancode. Reads a keyboard scan code from the
48645 + physical console keyboard. If the timo parameter is greater
48646 + than zero, then times out and returns -2 if no character
48647 + appears within the given number of seconds. Upon any other kind
48648 + of error, returns -1. Upon success returns a scan code, which
48649 + may be any positive integer. For situations where scan codes
48650 + cannot be read (for example, when an ASCII terminal is used as
48651 + the job's controlling terminal), this function is identical to
48652 + coninc(), i.e. it returns an 8-bit character value. congks() is
48653 + for use with workstations whose keyboards have Alternate,
48654 + Command, Option, and similar modifier keys, and Function keys
48655 + that generate codes greater than 255.
48659 + Console get modes. Gets the current console terminal modes and
48660 + saves them so that conres() can restore them later. Returns 1
48661 + if it got the modes OK, 0 if it did nothing (e.g. because
48662 + Kermit is not connected with any terminal), -1 on error.
48665 + coninc(timo) int timo;
48666 + Console Input Character. Reads a character from the console. If
48667 + the timo parameter is greater than zero, then coninc() times
48668 + out and returns -2 if no character appears within the given
48669 + number of seconds. Upon any other kind of error, returns -1.
48670 + Upon success, returns the character itself, with a value in the
48671 + range 0-255 decimal.
48674 + conint(f,s) SIGTYP (*f)(), (*s)();
48675 + Sets the console to generate an interrupt if the user types a
48676 + keyboard interrupt character, and to transfer control the
48677 + signal-handling function f. For systems with job control, s is
48678 + the address of the function that suspends the job. Sets the
48679 + global variable "backgrd" to zero if Kermit is running in the
48680 + foreground, and to nonzero if Kermit is running in the
48681 + background. See ckcdeb.h for the definition of SIGTYP. No
48686 + Console no interrupts. Disable keyboard interrupts on the
48687 + console. No return value.
48691 + Writes character c to the console terminal. Returns:
48692 + 0 on failure, 1 on success.
48695 + conol(s) char *s;
48696 + Writes string s to the console. Returns -1 on error, 0 or
48697 + greater on success.
48700 + conola(s) char *s[]; {
48701 + Writes an array of strings to the console. Returns -1 on error,
48702 + 0 or greater on success.
48705 + conoll(s) char *s;
48706 + Writes string s to the console, followed by the necessary line
48707 + termination characters to put the console cursor at the
48708 + beginning of the next line. Returns -1 on error, 0 or greater
48713 + Restores the console terminal to the modes obtained by congm().
48714 + Returns: -1 on error, 0 on success.
48717 + conxo(x,s) int x; char *s;
48718 + Write x characters from string s to the console. Returns 0 or
48719 + greater on success, -1 on error.
48723 + Returns a pointer to the designator of the console keyboard
48724 + type. For example, on a PC, this function would return "88",
48725 + "101", etc. Upon failure, returns a pointer to the empty
48728 + 4.E.2.5. Communications Functions
48730 + The communication device is the device used for terminal emulation and
48731 + file transfer. It may or may not be the same device as the console,
48732 + and it may or may not be a terminal (serial-port) device; it could
48733 + also be a network connection. For brevity, the communication device is
48734 + referred to here as the "tty". When the communication device is the
48735 + same as the console device, Kermit is said to be in remote mode. When
48736 + the two devices are different, Kermit is in local mode.
48740 + Returns the number of characters that have arrived at the
48741 + communication device but have not yet been read by ttinc(),
48742 + ttinl(), and friends. If communication input is buffered (and
48743 + it should be), this is the sum of the number of unread
48744 + characters in Kermit's buffer PLUS the number of unread
48745 + characters in the operating system's internal buffer. The call
48746 + must be nondestructive and nonblocking, and as inexpensive as
48747 + possible. Returns:
48748 + 0: or greater on success,
48749 + 0: in case of internal error,
48750 + -1: or less when it determines the connection has been broken,
48751 + or there is no connection.
48753 + That is, a negative return from ttchk() should reliably
48754 + indicate that there is no usable connection. Furthermore,
48755 + ttchk() should be callable at any time to see if the connection
48756 + is open. When the connection is open, every effort must be made
48757 + to ensure that ttchk returns an accurate number of characters
48758 + waiting to be read, rather than just 0 (no characters) or 1 (1
48759 + or more characters), as would be the case when we use select().
48760 + This aspect of ttchk's operation is critical to successful
48761 + operation of sliding windows and streaming, but "nondestructive
48762 + buffer peeking" is an obscure operating system feature, and so
48763 + when it is not available, we have to do it ourselves by
48764 + managing our own internal buffer at a level below ttinc(),
48765 + ttinl(), etc, as in the UNIX version (non-FIONREAD case).
48767 + An external global variable, clsondisc, if nonzero, means that
48768 + if a serial connection drops (carrier on-to-off transition
48769 + detected by ttchk()), the device should be closed and released
48774 + Closes the communication device (tty or network). If there were
48775 + any kind of exclusive access locks connected with the tty,
48776 + these are released. If the tty has a modem connection, it is
48777 + hung up. For true tty devices, the original tty device modes
48778 + are restored. Returns:
48784 + Flush communications input buffer. If any characters have
48785 + arrived but have not yet been read, discard these characters.
48786 + If communications input is buffered by Kermit (and it should
48787 + be), this function flushes Kermit's buffer as well as the
48788 + operating system's internal input buffer. Returns:
48794 + Flush tty output buffer. If any characters have been written
48795 + but not actually transmitted (e.g. because the system has been
48796 + flow-controlled), remove them from the system's output buffer.
48797 + (Note, this function is not actually used, but it is
48798 + recommended that all C-Kermit programmers add it for future
48799 + use, even if it is only a dummy function that returns 0
48804 + Looks for the modem signals CTS, DSR, and CTS, and returns
48805 + those that are on in as its return value, in a bit mask as
48806 + described for ttwmdm, in which a bit is on (1) or off (0)
48807 + according to whether the corresponding signal is on (asserted)
48808 + or off (not asserted). Return values:
48809 + -3: Not implemented
48810 + -2: if the line does not have modem control
48812 + >=0: on success, with bit mask containing the modem signals.
48816 + Returns the current tty speed in BITS (not CHARACTERS) per
48817 + second, or -1 if it is not known or if the tty is really a
48818 + network, or upon any kind of error. On success, the speed
48819 + returned is the actual number of bits per second, like 1200,
48820 + 9600, 19200, etc.
48824 + Get terminal window size. Returns -1 on error, 0 if the window
48825 + size can't be obtained, 1 if the window size has been
48826 + successfully obtained. Upon success, the external global
48827 + variables tt_rows and tt_cols are set to the number of screen
48828 + rows and number of screen columns, respectively. As this
48829 + function is not implemented in all ck*tio.c modules, calls to
48830 + it must be wrapped in #ifdef CK_TTGWSIZ..#endif. NOTE: This
48831 + function must be available to use the TELNET NAWS feature
48832 + (Negotiate About Window Size) as well as Rlogin.
48836 + Hang up the current tty device. For real tty devices, turn off
48837 + DTR for about 1/3-1/2 second (or other length of time,
48838 + depending on the system). If the tty is really a network
48839 + connection, close it. Returns:
48841 + 0: if it does not even try to hang up.
48842 + 1: if it believes it hung up successfully.
48846 + Turns off all pending timer interrupts.
48849 + ttinc(timo) int timo; (function is old, return codes are new)
48850 + Reads one character from the communication device. If timo is
48851 + greater than zero, wait the given number of seconds and then
48852 + time out if no character arrives, otherwise wait forever for a
48853 + character. Returns:
48854 + -3: internal error (e.g. tty modes set wrong)
48855 + -2: communications disconnect
48856 + -1: timeout or other error
48857 + >=0: the character that was read.
48858 + It is HIGHLY RECOMMENDED that ttinc() be internally buffered so
48859 + that calls to it are relatively inexpensive. If it is possible
48860 + to to implement ttinc() as a macro, all the better, for example
48863 + #define ttinc(t) ( (--txbufn >= 0) ? txbuf[ttbufp++] : txbufr(t) )
48865 + (see description of txbufr() below)
48868 + ttinl(dest,max,timo,eol,start,turn) int max,timo,turn; CHAR
48869 + *dest, eol, start;
48870 + ttinl() is Kermit's packet reader. Reads a packet from the
48871 + communications device, or up to max characters, whichever
48872 + occurs first. A line is a string of characters starting with
48873 + the start character up to and including the character given in
48874 + eol or until the length is exhausted, or, if turn != 0, until
48875 + the line turnaround character (turn) is read. If turn is 0,
48876 + ttinl() *should* use the packet length field to detect the end,
48877 + to allow for the possibility that the eol character appears
48878 + unprefixed in the packet data. (The turnaround character is for
48879 + half-duplex linemode connections.)
48881 + If timo is greater than zero, ttinl() times out if the eol
48882 + character is not encountered within the given number of seconds
48885 + The characters that were input are copied into "dest" with
48886 + their parity bits stripped if parity is not none. The first
48887 + character copied into dest should be the start character, and
48888 + the last should be the final character of the packet (the last
48889 + block check character). ttinl() should also absorb and discard
48890 + the eol and turn characters, and any other characters that are
48891 + waiting to be read, up until the next start character, so that
48892 + subsequent calls to ttchk() will not succeed simply because
48893 + there are some terminators still sitting in the buffer that
48894 + ttinl() didn't read. This operation, if performed, MUST NOT
48895 + BLOCK (so if it can't be performed in a guaranteed nonblocking
48896 + way, don't do it).
48898 + On success, ttinl() returns the number of characters read.
48899 + Optionally, ttinl() can sense the parity of incoming packets.
48900 + If it does this, then it should set the global variable ttprty
48901 + accordingly. ttinl() should be coded to be as efficient as
48902 + possible, since it is at the "inner loop" of packet reception.
48904 + -1: Timeout or other possibly correctable error.
48905 + -2: Interrupted from keyboard.
48906 + -3: Uncorrectable i/o error -- connection lost, configuration
48908 + >=0: on success, the number of characters that were actually
48909 + read and placed in the dest buffer, not counting the trailing
48914 + Outputs the character c to the communication line. If the
48915 + operation fails to complete within two seconds, this function
48916 + returns -1. Otherwise it returns the number of characters
48917 + actually written to the tty (0 or 1). This function should only
48918 + be used for interactive, character-mode operations, like
48919 + terminal connection, script execution, dialer i/o, where the
48920 + overhead of the signals and alarms does not create a
48921 + bottleneck. (THIS DESCRIPTION NEEDS IMPROVEMENT -- If the
48922 + operation fails within a "certain amount of time"... which
48923 + might be dependent on the communication method, speed, etc. In
48924 + particular, flow-control deadlocks must be accounted for and
48925 + broken out of to prevent the program from hanging indefinitely,
48929 + ttol(s,n) int n; char *s;
48930 + Kermit's packet writer. Writes the n characters of the string
48931 + pointed to to by s. NOTE: It is ttol's responsibility to write
48932 + ALL of the characters, not just some of them. Returns:
48933 + -1: on a possibly correctable error (so it can be retried).
48934 + -3: on a fatal error, e.g. connection lost.
48935 + >=0: on success, the actual number of characters written (the
48936 + specific number is not actually used for anything).
48939 + ttopen(ttname,lcl,modem,timo) char *ttname; int *lcl, modem,
48941 + Opens a tty device, if it is not already open. ttopen must
48942 + check to make sure the SAME device is not already open; if it
48943 + is, ttopen returns successfully without doing anything. If a
48944 + DIFFERENT device is currently open, ttopen() must call ttclos()
48945 + to close it before opening the new one.
48950 + character string - device name or network host
48954 + If called with lcl < 0, sets value of lcl as
48956 + 0: the terminal named by ttname is the job's
48957 + controlling terminal.
48958 + 1: the terminal named by ttname is not the job's
48959 + controlling terminal.
48960 + If the device is already open, or if the requested
48961 + device can't be opened, then lcl remains (and is
48965 + Less than zero: this is the negative of the network
48966 + type, and ttname is a network host name. Network
48967 + types (from [112]ckcnet.h:
48969 + NET_TCPB 1 TCP/IP Berkeley (socket) (implemented in [113]ckutio.c)
48970 + NET_TCPA 2 TCP/IP AT&T (streams) (not yet implemented)
48971 + NET_DEC 3 DECnet (not yet implemented)
48973 + Zero or greater: ttname is a terminal device name.
48974 + Zero means a direct connection (don't use modem
48975 + signals). Positive means use modem signals
48976 + depending on the current setting of ttcarr (see
48980 + > 0: number of seconds to wait for open() to return
48981 + before timing out.
48982 + <=0: no timer, wait forever (e.g. for incoming
48984 + For real tty devices, ttopen() attempts to gain
48985 + exclusive access to the tty device, for example in
48986 + UNIX by creating a "lockfile" (in other operating
48987 + systems, like VMS, exclusive access probably
48988 + requires no special action).
48991 + Copies its arguments and the tty file descriptor to
48992 + global variables that are available to the other
48993 + tty-related functions, with the lcl value altered as
48994 + described above. Gets all parameters and settings
48995 + associated with the line and puts them in a global area,
48996 + so that they can be restored by ttres(), e.g. when the
48997 + device is closed.
49001 + -5: if device is in use
49002 + -4: if access to device is denied
49003 + -3: if access to lock mechanism denied
49004 + -2: upon timeout waiting for device to open
49005 + -1: on other error
49008 + ttpkt(speed,flow,parity) long speed; int flow, parity;
49009 + Puts the currently open tty device into the appropriate modes
49010 + for transmitting and receiving Kermit packets.
49015 + if speed > -1, and the device is a true tty device,
49016 + and Kermit is in local mode, ttpkt also sets the
49020 + if in the range 0-3, ttpkt selects the
49021 + corresponding type of flow control. Currently 0 is
49022 + defined as no flow control, 1 is Xon/Xoff, and no
49023 + other types are defined. If (and this is a horrible
49024 + hack, but it goes back many years and will be hard
49025 + to eradicate) flow is 4, then the appropriate tty
49026 + modes are set for modem dialing, a special case in
49027 + which we talk to a modem-controlled line without
49028 + requiring carrier. If flow is 5, then we require
49032 + This is simply copied into a global variable so
49033 + that other functions (like ttinl, ttinc, etc) can
49037 + Copies its arguments to global variables, flushes the
49038 + terminal device input buffer.
49046 + Enables the given type of flow control on the open serial
49047 + communications device immediately. Arguments are the FLO_xxx
49048 + values from ckcdeb.h, except FLO_DIAL, FLO_DIAX, or FLO_AUTO,
49049 + which are not actual flow-control types. Returns 0 on success,
49055 + Returns a pointer to an array of longs, or NULL on failure. On
49056 + success, element 0 of the array contains number, n, indicating
49057 + how many follow. Elements 1-n are serial speeds, expressed in
49058 + bits per second, that are legal on this platform. The user
49059 + interface may use this list to construct a menu, keyword table,
49062 + #endif /* TTSPDLIST */
49066 + Restores the tty device to the modes and settings that were in
49067 + effect at the time it was opened (see ttopen). Returns:
49072 + ttruncmd(string) char * string;
49073 + Runs the given command on the local system, but redirects its
49074 + input and output to the communication (SET LINE, SET PORT, or
49075 + SET HOST) device. Returns:
49080 + ttscarr(carrier) int carrier;
49081 + Copies its argument to a variable that is global to the other
49082 + tty-related functions, and then returns it. The values for
49083 + carrier are defined in ckcdeb.h: CAR_ON, CAR_OFF, CAR_AUTO.
49084 + ttopen(), ttpkt(), and ttvt() use this variable when deciding
49085 + how to open the tty device and what modes to select. The
49086 + meanings are these:
49088 + CAR_OFF: Ignore carrier at all times.
49089 + CAR_ON: Require carrier at all times, except when dialing. This means,
49090 + for example, that ttopen() could hang forever waiting for carrier if
49091 + it is not present.
49092 + CAR_AUTO: If the modem type is zero (i.e. the connection is direct),
49093 + this is the same as CAR_OFF. If the modem type is positive, then heed
49094 + carrier during CONNECT (ttvt mode), but ignore it at other times
49095 + (packet mode, during SET LINE, etc). Compatible with pre-5A versions
49096 + of C-Kermit. This should be the default carrier mode.
49098 + Kermit's DIAL command ignores the carrier setting, but
49099 + ttopen(), ttvt(), and ttpkt() all honor the carrier option in
49100 + effect at the time they are called. None of this applies to
49101 + remote mode (the tty device is the job's controlling terminal)
49102 + or to network host connections (modem type is negative).
49106 + Sends a BREAK signal on the tty device. On a real tty device,
49107 + send a real BREAK lasting approximately 275 milliseconds. If
49108 + this is not possible, simulate a BREAK by (for example)
49109 + dropping down some very low baud rate, like 50, and sending a
49110 + bunch of null characters. On a network connection, do the
49111 + appropriate network protocol for BREAK. Returns:
49117 + Like ttsndb(), but sends a "Long BREAK" (approx 1.5 seconds).
49118 + For network connections, it is identical to ttsndb().
49119 + Currently, this function is used only if CK_LBRK is defined (as
49120 + it is for UNIX and VMS).
49123 + ttsspd(cps) int cps;
49124 + For serial devices only, set the device transmission speed to
49125 + (note carefully) TEN TIMES the argument. The argument is in
49126 + characters per second, but transmission speeds are in bits per
49127 + second. cps are used rather than bps because high speeds like
49128 + 38400 are not expressible in a 16-bit int but longs cannot be
49129 + used because keyword-table values are ints and not longs. If
49130 + the argument is 7, then the bps is 75, not 70. If the argument
49131 + is 888, this is a special code for 75/1200 split-speed
49132 + operation (75 bps out, 1200 bps in). Returns:
49133 + -1: on error, meaning the requested speed is not valid or
49135 + >=0: on success (don't try to use this value for anything).
49138 + ttvt(speed,flow) long speed; int flow;
49139 + Puts the currently open tty device into the appropriate modes
49140 + for terminal emulation. The arguments are interpreted as in
49141 + ttpkt(). Side effects: ttvt() stores its arguments in global
49142 + variables, and sets a flag that it has been called so that
49143 + subsequent calls can be ignored so long as the arguments are
49144 + the same as in the last effective call. Other functions, such
49145 + as ttopen(), ttclose(), ttres(), ttvt(), etc, that change the
49146 + tty device in any way must unset this flag. In UNIX Kermit,
49147 + this flag is called tvtflg.
49150 + ttwmdm(mdmsig,timo) int mdmsig, timo;
49151 + Waits up to timo seconds for all of the given modem signals to
49152 + appear. mdmsig is a bit mask, in which a bit is on (1) or off
49153 + (0) according to whether the corresponding signal is to be
49154 + waited for. These symbols are defined in ckcdeb.h:
49155 + BM_CTS (bit 0) means wait for Clear To Send
49156 + BM_DSR (bit 1) means wait for Data Set Ready
49157 + BM_DCD (bit 2) means wait for Carrier Detect
49159 + -3: Not implemented.
49160 + -2: This line does not have modem control.
49161 + -1: Timeout: time limit exceeded before all signals were
49166 + ttxin(n,buf) int n; CHAR *buf;
49167 + Reads x characters from the tty device into the specified buf,
49168 + stripping parity if parity is not none. This call waits
49169 + forever, there is no timeout. This function is designed to be
49170 + called only when you know that at least x characters are
49171 + waiting to be read (as determined, for example, by ttchk()).
49172 + This function should use the same buffer as ttinc().
49175 + txbufr(timo) int timo;
49176 + Reads characters into the internal communications input buffer.
49177 + timo is a timeout interval, in seconds. 0 means no timeout,
49178 + wait forever. Called by ttinc() (and possibly ttxin() and
49179 + ttinl()) when the communications input buffer is empty. The
49180 + buffer should be called ttxbuf[], its length is defined by the
49181 + symbol TXBUFL. The global variable txbufn is the number of
49182 + characters available to be read from ttxbuf[], and txbufp is
49183 + the index of the next character to be read. Should not be
49184 + called if txbufn > 0, in which case the buffer does not need
49185 + refilling. This routine returns:
49186 + -2: Communications disconnect
49188 + >=0: A character (0 - 255) On success, the first character that
49189 + was read, with the variables txbufn and txbufp set
49190 + appropriately for any remaining characters.
49191 + NOTE: Currently this routine is used internally only by the
49192 + UNIX and VMS versions. The aim is to make it available to all
49193 + versions so there is one single coherent and efficient way of
49194 + reading from the communications device or network.
49196 + 4.E.2.6. Miscellaneous system-dependent functions
49199 + ztime(s) char **s;
49200 + Returns a pointer, s, to the current date-and-time string in s.
49201 + This string must be in the fixed-field format associated with
49202 + the C runtime asctime() function, like: "Sun Sep 16 13:23:45
49203 + 1973\n" so that callers of this function can extract the
49204 + different fields. The pointer value is filled in by ztime, and
49205 + the data it points to is not safe, so should be copied to a
49206 + safe place before use. ztime() has no return value. As a side
49207 + effect, this routine can also fill in the following two
49208 + external variables (which must be defined in the
49209 + system-dependendent modules for each platform):
49210 + long ztusec: Fraction of seconds of clock time, microseconds.
49211 + long ztmsec: Fraction of seconds of clock time, milliseconds.
49212 + If these variables are not set by zstime(), they remain at
49213 + their initial value of -1L.
49217 + Returns the current value of the elapsed time counter in
49218 + seconds (see rtimer), or 0 on any kind of error.
49223 + Returns the current value of the elapsed time counter in
49224 + seconds, as a floating point number, capable of representing
49225 + not only whole seconds, but also the fractional part, to the
49226 + millisecond or microsecond level, whatever precision is
49227 + available. Requires a function to get times at subsecond
49228 + precision, as well as floating-point support. That's why it's
49231 + #endif /* GFTIMER */
49235 + Sleeps (pauses, does nothing) for m milliseconds (a millisecond
49236 + is one thousandth of a second). Returns:
49242 + Sets the elapsed time counter to zero. If you want to time how
49243 + long an operation takes, call rtimer() when it starts and
49244 + gtimer when it ends. rtimer() has no return value.
49249 + Sets the elapsed time counter to zero. If you want to time how
49250 + long an operation takes, call rftimer() when it starts and
49251 + gftimer when it ends. rftimer() has no return value. Note:
49252 + rftimer() is to be used with gftimer() and rtimer() is to be
49253 + used with gtimer(). See the rftimer() description.
49255 + #endif /* GFTIMER */
49259 + Does whatever needs doing upon program start. In particular, if
49260 + the program is running in any kind of privileged mode, turns
49261 + off the privileges (see priv_ini()). Returns:
49267 + Does whatever needs doing upon program exit. Returns:
49273 + Suspends the Kermit process, puts it in the background so it
49274 + can be continued ("foregrounded") later. Returns:
49275 + -1: if this function is not supported.
49278 + [ [114]Contents ] [ [115]C-Kermit ] [ [116]Kermit Home ]
49279 + ________________________________________________________________________
49281 + 4.F. Group F: Network Support
49283 + As of version 5A, C-Kermit includes support for several networks.
49284 + Originally, this was just worked into the ttopen(), ttclos(), ttinc(),
49285 + ttinl(), and similar routines in [117]ckutio.c. But this made it
49286 + impossible to share this code with non-UNIX versions, like VMS,
49287 + AOS/VS, OS/2, etc. So as of edit 168, network code has been separated
49288 + out into its own module and header file, ckcnet.c and ckcnet.h:
49290 + [118]ckcnet.h: Network-related symbol definitions.
49291 + [119]ckcnet.c: Network i/o (TCP/IP, X.25, etc), shared by most
49293 + [120]cklnet.c: Network i/o (TCP/IP, X.25, etc) specific to Stratus
49296 + The routines and variables in these modules fall into two categories:
49298 + 1. Support for specific network packages like SunLink X.25 and TGV
49300 + 2. support for specific network virtual terminal protocols like CCITT
49301 + X.3 and TCP/IP Telnet.
49303 + Category (1) functions are analogs to the tt*() functions, and have
49304 + names like netopen, netclos, nettinc, etc. Group A-D modules do not
49305 + (and must not) know anything about these functions -- they continue to
49306 + call the old Group E functions (ttopen, ttinc, etc). Category (2)
49307 + functions are protocol specific and have names prefixed by a protocol
49308 + identifier, like tn for telnet x25 for X.25.
49310 + ckcnet.h contains prototypes for all these functions, as well as
49311 + symbol definitions for network types, protocols, and network- and
49312 + protocol- specific symbols, as well as #includes for the header files
49313 + necessary for each network and protocol.
49315 + The following functions are to be provided for networks that do not
49316 + use normal system i/o (open, read, write, close):
49320 + To be called from within ttopen() when a network connection is
49321 + requested. Calling conventions and purpose same as Group E
49326 + To be called from within ttclos() when a network connection is
49327 + being closed. Calling conventions and purpose same as Group E
49332 + To be called from within ttchk(). Calling conventions and
49333 + purpose same as Group E ttchk().
49337 + To be called from within ttflui(). Calling conventions and
49338 + purpose same as Group E ttflui().
49342 + To send a network break (attention) signal. Calling conventions
49343 + and purpose same as Group E ttsndbrk().
49347 + To get a character from the network. Calling conventions same
49348 + as Group E ttsndbrk().
49352 + Send a "character" (byte) to the network. Calling conventions
49353 + same as Group E ttoc().
49357 + Send a "line" (sequence of bytes) to the network. Calling
49358 + conventions same as Group E ttol().
49360 + Conceivably, some systems support network connections simply by
49361 + letting you open a device of a certain name and letting you do i/o to
49362 + it. Others (like the Berkeley sockets TCP/IP library on UNIX) require
49363 + you to open the connection in a special way, but then do normal i/o
49364 + (read, write). In such a case, you would use netopen(), but you would
49365 + not use nettinc, nettoc, etc.
49367 + VMS TCP/IP products have their own set of functions for all network
49368 + operations, so in that case the full range of netxxx() functions is
49371 + The technique is to put a test in each corresponding ttxxx() function
49372 + to see if a network connection is active (or is being requested), test
49373 + for which kind of network it is, and if necessary route the call to
49374 + the corresponding netxxx() function. The netxxx() function must also
49375 + contain code to test for the network type, which is available via the
49376 + global variable ttnet.
49378 + [ [121]Contents ] [ [122]C-Kermit ] [ [123]Kermit Home ]
49379 + ______________________________________________________________________
49381 + 4.F.1. Telnet Protocol
49383 + (This section needs a great deal of updating...)
49385 + As of edit 195, Telnet protocol is split out into its own files, since
49386 + it can be implemented in remote mode, which does not have a network
49389 + [124]ckctel.h: Telnet protocol symbol definitions.
49390 + [125]ckctel.c: Telnet protocol.
49392 + The Telnet protocol is supported by the following variables and
49396 + Nonzero if telnet protocol initialized, zero otherwise.
49400 + Initialize the telnet protocol (send initial options).
49404 + Send a telnet option.
49408 + Receive and act on a telnet option from the remote.
49412 + Send terminal type using telnet protocol.
49413 + ______________________________________________________________________
49415 + 4.F.2. FTP Protocol
49417 + (To be filled in...)
49418 + ______________________________________________________________________
49420 + 4.F.3. HTTP Protocol
49422 + (To be filled in...)
49423 + ______________________________________________________________________
49425 + 4.F.4. X.25 Networks
49427 + These routines were written SunLink X.25 and have since been adapted
49428 + to at least on one other: IBM AIXLink/X.25.
49432 + Reads and prints X.25 diagnostics
49436 + X.25 out of band signal handler
49440 + Sends X.25 interrupt packet
49444 + Resets X.25 virtual circuit
49448 + Clear X.25 virtual circuit
49460 + Resets X.25 Q-bit
49464 + Reads n characters from X.25 circuit.
49468 + Read a Kermit packet from X.25 circuit.
49470 + [ [126]Contents ] [ [127]C-Kermit ] [ [128]Kermit Home ]
49471 + ______________________________________________________________________
49473 + 4.F.5. Adding New Network Types
49475 + Example: Adding support for IBM X.25 and Hewlett Packard X.25. First,
49476 + add new network type symbols for each one. There are already some
49477 + network types defined for other X.25 packages:
49479 + NET_SX25 is the network-type ID for SunLink X.25.
49480 + NET_VX25 is the network-type ID for VOS X.25.
49482 + So first you should new symbols for the new network types, giving them
49483 + the next numbers in the sequence, e.g.:
49485 +#define NET_HX25 11 /* Hewlett-Packard X.25 */
49486 +#define NET_IX25 12 /* IBM X.25 */
49488 + This is in ckcnet.h.
49490 + Then we need symbols to say that we are actually compiling in the code
49491 + for these platforms. These would be defined on the cc command line:
49493 + -DIBMX25 (for IBM)
49496 + So we can build C-Kermit versions for AIX and HP-UX both with and
49497 + without X.25 support (since not all AIX and IBM systems have the
49498 + needed libraries, and so an executable that was linked with them might
49501 + Then in ckcnet.h:
49505 +#endif /* IBMX25 */
49509 +#endif /* HPX25 */
49511 + And then use ANYX25 for code that is common to all of them, and IBMX25
49512 + or HPX25 for code specific to IBM or HP.
49514 + It might also happen that some code can be shared between two or more
49515 + of these, but not the others. Suppose, for example, that you write
49516 + code that applies to both IBM and HP, but not Sun or VOS X.25. Then
49517 + you add the following definition to ckcnet.h:
49519 +#ifndef HPORIBMX25
49521 +#define HPORIBMX25
49524 +#define HPORIBMX25
49525 +#endif /* IBMX25 */
49526 +#endif /* HPX25 */
49527 +#endif /* HPORIBMX25 */
49529 + You can NOT use constructions like "#if defined (HPX25 || IBMX25)";
49530 + they are not portable.
49532 + [ [129]Contents ] [ [130]C-Kermit ] [ [131]Kermit Home ]
49533 + ________________________________________________________________________
49535 + 4.G. Group G: Formatted Screen Support
49537 + So far, this is used only for the fullscreen local-mode file transfer
49538 + display. In the future, it might be extended to other uses. The
49539 + fullscreen display code is in and around the routine screenc() in
49542 + In the UNIX version, we use the curses library, plus one call from the
49543 + termcap library. In other versions (OS/2, VMS, etc) we insert dummy
49544 + routines that have the same names as curses routines. So far, there
49545 + are two methods for simulating curses routines:
49547 + 1. In VMS, we use the Screen Management Library (SMG), and insert
49548 + stubs to convert curses calls into SMG calls.
49549 + 2. In OS/2, we use the MYCURSES code, in which the stub routines
49550 + actually emit the appropriate escape sequences themselves.
49552 + Here are the stub routines:
49555 + tgetent(char *buf, char *term)
49556 + Arguments are ignored. Returns 1 if the user has a supported
49557 + terminal type, 0 otherwise. Sets a global variable (for
49558 + example, "isvt52" or "isdasher") to indicate the terminal type.
49561 + move(int row, int col)
49562 + Sends the escape sequence to position the cursor at the
49563 + indicated row and column. The numbers are 0-based, e.g. the
49564 + home position is 0,0.
49568 + Sends the escape sequence to clear the screen.
49572 + Sends the escape sequence to clear from the current cursor
49573 + position to the end of the line.
49575 + In the MYCURSES case, code must be added to each of the last three
49576 + routines to emit the appropriate escape sequences for a new terminal
49579 + clearok(curscr), wrefresh()
49580 + In real curses, these two calls are required to refresh the
49581 + screen, for example after it was fractured by a broadcast
49582 + message. These are useful only if the underlying screen
49583 + management service keeps a copy of the entire screen, as curses
49584 + and SMG do. C-Kermit does not do this itself.
49586 + [ [133]Contents ] [ [134]C-Kermit ] [ [135]Kermit Home ]
49587 + ________________________________________________________________________
49589 + 4.H. Group H: Pseudoterminal Support
49591 + (To be filled in...)
49592 + ________________________________________________________________________
49594 + 4.I. Group I: Security
49596 + (To be filled in...)
49598 + [ [136]Contents ] [ [137]C-Kermit ] [ [138]Kermit Home ]
49599 + ________________________________________________________________________
49601 + APPENDIX I. FILE PERMISSIONS
49603 + I.1. Format of System-Dependent File Permissions in A-Packets
49605 + The format of this field (the "," attribute) is interpreted according
49606 + to the System ID ("." Attribute).
49608 + For UNIX (System ID = U1), it's the familiar 3-digit octal number, the
49609 + low-order 9 bits of the filemode: Owner, Group, World, e.g. 660 =
49610 + read/write access for owner and group, none for world, recorded as a
49611 + 3-digit octal string. High-order UNIX permission bits are not
49614 + For VMS (System ID = D7), it's a 4-digit hex string, representing the
49615 + 16-bit file protection WGOS fields (World,Group,Owner,System), in that
49616 + order (which is the reverse of how they're shown in a directory
49617 + listing); in each field, Bit 0 = Read, 1 = Write, 2 = Execute, 3 =
49618 + Delete. A bit value of 0 means permission is granted, 1 means
49619 + permission is denied. Sample:
49621 + r-01-00-^A/!FWERMIT.EXE'"
49622 + s-01-00-^AE!Y/amd/watsun/w/fdc/new/wermit.exe.DV
49623 + r-02-01-^A]"A."D7""B8#119980101 18:14:05!#8531&872960,$A20B-!7(#512@ #.Y
49626 + A VMS directory listing shows the file's protection as (E,RWED,RED,RE)
49627 + which really means (S=E,O=RWED,G=RED,W=RE), which is reverse order
49628 + from the internal storage, so (RE,RED,RWED,E). Now translate each
49629 + letter to its corresponding bit:
49631 + RE=0101, RED=1101, RWED=1111, E=0010
49633 + Now reverse the bits:
49635 + RE=1010, RED=0010, RWED=0000, E=1101
49637 + This gives the 16-bit quantity:
49641 + This is the internal representation of the VMS file permission; in
49646 + as shown in the sample packet above.
49648 + The VMS format probably would also apply to RSX or any other FILES-11
49651 + I.2. Handling of Generic Protection
49653 + To be used when the two systems are different (and/or do not recognize
49654 + or understand each other's local protection codes).
49656 + First of all, the book is wrong. This should not be the World
49657 + protection, but the Owner protection. The other fields should be set
49658 + according to system defaults (e.g. UNIX umask, VMS default protection,
49659 + etc), except that no non-Owner field should give more permissions than
49662 + [ [139]Top ] [ [140]Contents ] [ [141]C-Kermit Home ] [ [142]Kermit
49664 + _________________________________________________________________
49667 + C-Kermit Program Logic Manual / [143]The Kermit Project /
49668 + [144]Columbia University / [145]kermit@columbia.edu / 10 April 2004
49672 + 1. http://www.columbia.edu/kermit/
49673 + 2. http://www.columbia.edu/
49674 + 3. http://www.columbia.edu/kermit/ckcplm.html
49675 + 4. http://www.columbia.edu/kermit/ckermit.html
49676 + 5. http://www.columbia.edu/kermit/index.html
49677 + 6. http://www.columbia.edu/kermit/ckcplm.html#x1
49678 + 7. http://www.columbia.edu/kermit/ckcplm.html#x2
49679 + 8. http://www.columbia.edu/kermit/ckcplm.html#x3
49680 + 9. http://www.columbia.edu/kermit/ckcplm.html#x4
49681 + 10. http://www.columbia.edu/kermit/ckcplm.html#x4.A
49682 + 11. http://www.columbia.edu/kermit/ckcplm.html#x4.B
49683 + 12. http://www.columbia.edu/kermit/ckcplm.html#x4.C
49684 + 13. http://www.columbia.edu/kermit/ckcplm.html#x4.D
49685 + 14. http://www.columbia.edu/kermit/ckcplm.html#x4.E
49686 + 15. http://www.columbia.edu/kermit/ckcplm.html#x4.F
49687 + 16. http://www.columbia.edu/kermit/ckcplm.html#x4.G
49688 + 17. http://www.columbia.edu/kermit/ckcplm.html#x4.H
49689 + 18. http://www.columbia.edu/kermit/ckcplm.html#x4.I
49690 + 19. http://www.columbia.edu/kermit/ckcplm.html#xa1
49691 + 20. http://www.columbia.edu/kermit/ckcplm.html#contents
49692 + 21. http://www.columbia.edu/kermit/ckcplm.html#contents
49693 + 22. http://www.columbia.edu/kermit/ckermit.html
49694 + 23. http://www.columbia.edu/kermit/index.html
49695 + 24. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.w
49696 + 25. http://www.columbia.edu/kermit/ckcplm.html#contents
49697 + 26. http://www.columbia.edu/kermit/ckermit.html
49698 + 27. http://www.columbia.edu/kermit/index.html
49699 + 28. http://www.columbia.edu/kermit/ckcplm.html#x3.2
49700 + 29. http://www.columbia.edu/kermit/ckcplm.html#contents
49701 + 30. http://www.columbia.edu/kermit/ckermit.html
49702 + 31. http://www.columbia.edu/kermit/index.html
49703 + 32. http://www.columbia.edu/kermit/ckcplm.html#x4.A
49704 + 33. http://www.columbia.edu/kermit/ckcplm.html#contents
49705 + 34. http://www.columbia.edu/kermit/ckermit.html
49706 + 35. http://www.columbia.edu/kermit/index.html
49707 + 36. http://www.columbia.edu/kermit/ckcplm.html#contents
49708 + 37. http://www.columbia.edu/kermit/ckermit.html
49709 + 38. http://www.columbia.edu/kermit/index.html
49710 + 39. http://www.columbia.edu/kermit/ckcplm.html#contents
49711 + 40. http://www.columbia.edu/kermit/ckermit.html
49712 + 41. http://www.columbia.edu/kermit/index.html
49713 + 42. ftp://kermit.columbia.edu/kermit/c-kermit/ckclib.h
49714 + 43. ftp://kermit.columbia.edu/kermit/c-kermit/ckclib.c
49715 + 44. http://www.columbia.edu/kermit/ckcplm.html#x3.1
49716 + 45. http://www.columbia.edu/kermit/ckcplm.html#contents
49717 + 46. http://www.columbia.edu/kermit/ckermit.html
49718 + 47. http://www.columbia.edu/kermit/index.html
49719 + 48. ftp://kermit.columbia.edu/kermit/c-kermit/ckcsym.h
49720 + 49. ftp://kermit.columbia.edu/kermit/c-kermit/ckcasc.h
49721 + 50. ftp://kermit.columbia.edu/kermit/c-kermit/ckcsig.h
49722 + 51. ftp://kermit.columbia.edu/kermit/c-kermit/ckcdeb.h
49723 + 52. ftp://kermit.columbia.edu/kermit/c-kermit/ckcker.h
49724 + 53. ftp://kermit.columbia.edu/kermit/c-kermit/ckcxla.h
49725 + 54. ftp://kermit.columbia.edu/kermit/c-kermit/ckcmai.c
49726 + 55. ftp://kermit.columbia.edu/kermit/c-kermit/ckcpro.w
49727 + 56. ftp://kermit.columbia.edu/kermit/c-kermit/ckcfns.c
49728 + 57. ftp://kermit.columbia.edu/kermit/c-kermit/ckcfn2.c
49729 + 58. ftp://kermit.columbia.edu/kermit/c-kermit/ckcfn3.c
49730 + 59. http://www.columbia.edu/kermit/ckcplm.html#x4.B
49731 + 60. http://www.columbia.edu/kermit/ckcplm.html#x4.E
49732 + 61. http://www.columbia.edu/kermit/ckcplm.html#x4.D
49733 + 62. http://www.columbia.edu/kermit/ckcplm.html#contents
49734 + 63. http://www.columbia.edu/kermit/ckermit.html
49735 + 64. http://www.columbia.edu/kermit/index.html
49736 + 65. http://www.columbia.edu/kermit/ckcplm.html#x4.B
49737 + 66. ftp://kermit.columbia.edu/kermit/c-kermit/ckuxla.c
49738 + 67. ftp://kermit.columbia.edu/kermit/c-kermit/ckuxla.h
49739 + 68. ftp://kermit.columbia.edu/kermit/c-kermit/ckcxla.h
49740 + 69. ftp://kermit.columbia.edu/kermit/c-kermit/ckuxla.h
49741 + 70. ftp://kermit.columbia.edu/kermit/c-kermit/ckmxla.h
49742 + 71. ftp://kermit.columbia.edu/kermit/c-kermit/ck?xla
49743 + 72. ftp://kermit.columbia.edu/kermit/c-kermit/ckcuni.h
49744 + 73. ftp://kermit.columbia.edu/kermit/c-kermit/ckcuni.c
49745 + 74. http://www.columbia.edu/kermit/ckcplm.html#contents
49746 + 75. http://www.columbia.edu/kermit/ckermit.html
49747 + 76. http://www.columbia.edu/kermit/index.html
49748 + 77. http://www.columbia.edu/kermit/ckcplm.html#x4.B
49749 + 78. ftp://kermit.columbia.edu/kermit/c-kermit/ckucmd.h
49750 + 79. ftp://kermit.columbia.edu/kermit/c-kermit/ckucmd.c
49751 + 80. http://www.columbia.edu/kermit/ckcplm.html#x4.E
49752 + 81. ftp://kermit.columbia.edu/kermit/c-kermit/ckuusr.h
49753 + 82. ftp://kermit.columbia.edu/kermit/c-kermit/ckuusr.c
49754 + 83. ftp://kermit.columbia.edu/kermit/c-kermit/ckuus2.c
49755 + 84. ftp://kermit.columbia.edu/kermit/c-kermit/ckuus3.c
49756 + 85. ftp://kermit.columbia.edu/kermit/c-kermit/ckuus4.c
49757 + 86. ftp://kermit.columbia.edu/kermit/c-kermit/ckuusy.c
49758 + 87. ftp://kermit.columbia.edu/kermit/c-kermit/ckuusx.c
49759 + 88. ftp://kermit.columbia.edu/kermit/c-kermit/ckuver.h
49760 + 89. ftp://kermit.columbia.edu/kermit/c-kermit/ckuscr.c
49761 + 90. ftp://kermit.columbia.edu/kermit/c-kermit/ckudia.c
49762 + 91. ftp://kermit.columbia.edu/kermit/c-kermit/ckucon.c
49763 + 92. ftp://kermit.columbia.edu/kermit/c-kermit/ckucns.c
49764 + 93. http://www.columbia.edu/kermit/ckcplm.html#x4.E
49765 + 94. ftp://kermit.columbia.edu/kermit/c-kermit/ckcmai.c
49766 + 95. http://www.columbia.edu/kermit/ckcplm.html#contents
49767 + 96. http://www.columbia.edu/kermit/ckermit.html
49768 + 97. http://www.columbia.edu/kermit/index.html
49769 + 98. ftp://kermit.columbia.edu/kermit/c-kermit/ckufio.c
49770 + 99. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
49771 + 100. ftp://kermit.columbia.edu/kermit/c-kermit/ckusig.c
49772 + 101. ftp://kermit.columbia.edu/kermit/c-kermit/ckvfio.c
49773 + 102. ftp://kermit.columbia.edu/kermit/c-kermit/ckusig.c
49774 + 103. ftp://kermit.columbia.edu/kermit/c-kermit/ckcmai.c
49775 + 104. http://www.columbia.edu/kermit/ckcplm.html#contents
49776 + 105. http://www.columbia.edu/kermit/ckermit.html
49777 + 106. http://www.columbia.edu/kermit/index.html
49778 + 107. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
49779 + 108. ftp://kermit.columbia.edu/kermit/c-kermit/ckvtio.c
49780 + 109. http://www.columbia.edu/kermit/ckcplm.html#x2
49781 + 110. http://www.columbia.edu/kermit/ckcplm.html#xa1
49782 + 111. http://www.columbia.edu/kermit/ckuins.html
49783 + 112. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.h
49784 + 113. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
49785 + 114. http://www.columbia.edu/kermit/ckcplm.html#contents
49786 + 115. http://www.columbia.edu/kermit/ckermit.html
49787 + 116. http://www.columbia.edu/kermit/index.html
49788 + 117. ftp://kermit.columbia.edu/kermit/c-kermit/ckutio.c
49789 + 118. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.h
49790 + 119. ftp://kermit.columbia.edu/kermit/c-kermit/ckcnet.c
49791 + 120. ftp://kermit.columbia.edu/kermit/c-kermit/cklnet.c
49792 + 121. http://www.columbia.edu/kermit/ckcplm.html#contents
49793 + 122. http://www.columbia.edu/kermit/ckermit.html
49794 + 123. http://www.columbia.edu/kermit/index.html
49795 + 124. ftp://kermit.columbia.edu/kermit/c-kermit/ckctel.h
49796 + 125. ftp://kermit.columbia.edu/kermit/c-kermit/ckctel.c
49797 + 126. http://www.columbia.edu/kermit/ckcplm.html#contents
49798 + 127. http://www.columbia.edu/kermit/ckermit.html
49799 + 128. http://www.columbia.edu/kermit/index.html
49800 + 129. http://www.columbia.edu/kermit/ckcplm.html#contents
49801 + 130. http://www.columbia.edu/kermit/ckermit.html
49802 + 131. http://www.columbia.edu/kermit/index.html
49803 + 132. ftp://kermit.columbia.edu/kermit/c-kermit/ckuusx.c
49804 + 133. http://www.columbia.edu/kermit/ckcplm.html#contents
49805 + 134. http://www.columbia.edu/kermit/ckermit.html
49806 + 135. http://www.columbia.edu/kermit/index.html
49807 + 136. http://www.columbia.edu/kermit/ckcplm.html#contents
49808 + 137. http://www.columbia.edu/kermit/ckermit.html
49809 + 138. http://www.columbia.edu/kermit/index.html
49810 + 139. http://www.columbia.edu/kermit/ckcplm.html#top
49811 + 140. http://www.columbia.edu/kermit/ckcplm.html#contents
49812 + 141. http://www.columbia.edu/kermit/ckermit.html
49813 + 142. http://www.columbia.edu/kermit/index.html
49814 + 143. http://www.columbia.edu/kermit/index.html
49815 + 144. http://www.columbia.edu/
49816 + 145. mailto:kermit@columbia.edu
49818 +++ ckermit-212/ckaaaa.txt
49820 +ckaaaa.txt 10 Apr 2004
49822 + C-KERMIT VERSION 8.0.211
49823 + OVERVIEW OF FILES
49825 + Communications software for UNIX and (Open)VMS.
49827 + And in former versions also for:
49828 + Stratus VOS, AOS/VS, QNX,
49829 + Plan 9, OS-9, Apollo Aegis, and the Commodore Amiga.
49830 + The Apple Macintosh, the Atari ST.
49832 + The Kermit Project - Columbia University
49834 + http://www.columbia.edu/kermit/ - kermit@columbia.edu
49837 + Copyright (C) 1985, 2004,
49838 + Trustees of Columbia University in the City of New York.
49839 + All rights reserved. See the C-Kermit COPYING.TXT file or the
49840 + copyright text in the ckcmai.c module for disclaimer and permissions.
49845 + C-Kermit is documented in the book "Using C-Kermit", Second Edition, by
49846 + Frank da Cruz and Christine M. Gianone, Digital Press, ISBN 1-55558-164-1,
49847 + supplementated by Web-based updates for C-Kermit 7.0 and 8.0.
49851 + Name Included Last Updated
49853 + Unix Yes 8.0.211 10 Apr 2004
49854 + (Open)VMS No 8.0.208 10 Apr 2004
49855 + Windows (K95) Yes 8.0.208 14 Mar 2003 (K95 2.1)
49856 + OS/2 (K95) Yes 8.0.208 14 Mar 2003 (K95 2.1)
49857 + DG AOS/VS No 7.0.196 1 Jan 2000
49858 + Stratus VOS No 7.0.196 1 Jan 2000
49859 + Bell Plan 9 No 7.0.196 1 Jan 2000
49860 + Microware OS-9 No 7.0.196 1 Jan 2000
49861 + Commodore Amiga No 7.0.196 1 Jan 2000
49862 + Macintosh No 5A(190) 16 Aug 1994 (Mac Kermit 0.991)
49863 + Atari ST No 5A(189) 30 Jun 1993
49865 +QUICK START FOR FTP USERS
49867 + If you have a Web browser, go to:
49869 + http://www.columbia.edu/kermit/ckermit.html
49871 + And take it from there. Otherwise...
49873 + The definitive FTP source for Kermit software is kermit.columbia.edu.
49874 + Kermit software obtained from other FTP sites is not necessarily complete
49875 + or up to date, and may have been modified.
49877 +C-Kermit for UNIX computers that have a C compiler and 'make' program:
49879 + Directory kermit/archives, binary mode, file cku211.tar.Z or cku211.tar.gz
49881 + This is a compressed tar archive of UNIX C-Kermit source code, makefile, and
49882 + other files. It unpacks into its current directory, so download it into a
49883 + fresh directory. Transfer in binary mode, uncompress (or gunzip), untar (tar
49884 + xvf cku211.tar), and then give the appropriate "make" command to build for
49885 + your UNIX system; read the comments in the makefile and ckuins.txt for
49890 + If you have VMS UNZIP, get the file kermit/archives/ckv211.zip in binary
49891 + mode, unzip, and build with CKVKER.COM.
49893 +Others: In the kermit/f or kermit/test directories under the appropriate
49894 +prefixes, explained below.
49899 +Installation procedures depend on the system. Please read the CK?INS.TXT,
49900 +if any, file for your system (?=U for UNIX, V for VMS, etc). Please note
49901 +the naming and placement for the initialization files:
49904 + The standard initialization file. Please leave it as is unless you
49905 + know what you are doing and (if you are changing it or replacing it
49906 + for others to use) you are prepared to support it. Rename this file
49907 + to .kermrc in UNIX, OS-9, BeBox, or Plan 9. In Stratus VOS, rename
49908 + it ckermit.ini (lowercase). On multiuser systems, it goes either in the
49909 + (or EACH) user's home (login) directory, or else in a common shared
49910 + place if C-Kermit has been configured to look in that place (see
49911 + ckccfg.txt for details).
49914 + A *sample* customization file. On multiuser OS's, a copy of this file
49915 + goes in each user's home directory, and then each user edits it to suit
49916 + her needs and preferences; e.g. by defining macros for their common
49919 + DIALING DIRECTORIES
49920 + Dialing directory files can be system-wide, per-group, or per-user, or
49921 + any combination. For example, there can be a corporate wide directory
49922 + shared by all users, a supplemental directory for each division or
49923 + department, and a personal directory for each user. Simply be sure the
49924 + dialing directory files are identified a SET DIAL DIRECTORY command in
49925 + the user's (or the system-wide) C-Kermit initialization file, or in the
49926 + environment variable (logical name, symbol) K_DIAL_DIRECTORY. (The
49927 + standard initialization file looks by default in the user's home or login
49928 + directory.) When installing C-Kermit on multiuser platforms from which
49929 + users will dial out, you can also set environment variables for area
49930 + code, country code, and the various dialing prefixes as described on page
49931 + 478 of "Using C-Kermit" (second edition), so users don't have to worry
49932 + about defining these items themselves. Network directories and service
49933 + directories can also be set up in a similar manner.
49936 + In UNIX, the general C-Kermit man page (or one of the versions tailored
49937 + for a specific platform, like HP-UX or Solaris) should be installed in
49938 + the appropriate place. In VMS, the VMS help topic (CKVKER.HLP) should
49939 + be installed as described in CKVINS.TXT. Plain-text documentation such
49940 + as CKERMIT2.TXT should be put in whatever place people are accustomed
49943 +FILES AND FILE NAMING CONVENTIONS
49945 +C-Kermit is a family of Kermit programs for many different computer systems.
49946 +The program shares a common set of system-independent file transfer protocol
49947 +modules, written in the C language. System-dependent operations are collected
49948 +into system-specific modules for each system.
49950 +C-Kermit file names all start with the letters "CK", followed by a single
49951 +letter indicating the subgroup. When referring to these files in the UNIX,
49952 +AOS/VS, or VOS environments, use lowercase letters, rather than the uppercase
49953 +letters shown here. Subgroups:
49955 + _: Security/Authentication/Encryption code, possibly regulated by law
49956 + a: General descriptive material and documentation
49957 + b: BOO file encoders and decoders (obsolete)
49958 + c: All platforms with C compilers
49959 + d: Data General AOS/VS
49960 + e: Reserved for "ckermit" files, like CKERMIT.INI, CKERMIT80.TXT
49964 + i: Commodore Amiga (Intuition)
49968 + m: Macintosh with Mac OS
49969 + n: Microsoft Windows NT
49970 + o: OS/2 and/or Microsoft Windows 95/98/ME/NT/2000/XP/...
49971 + p: Bell Labs Plan 9
49973 + r: DEC PDP-11 with RSTS/E (reserved)
49974 + s: Atari ST GEMDOS (last supported in version 5A(189))
49975 + t: DEC PDP-11 with RT-11 (reserved)
49976 + u: UNIX or environments with UNIX-like C libraries
49977 + v: VMS and OpenVMS
49978 + w: Wart (Lex-like preprocessor, used with all systems)
49983 + 4: IBM AS/400 (reserved)
49985 + 9: Microware OS-9
49989 + ckaaaa.txt - This file
49990 + ckufio.c - File i/o for UNIX
49991 + ckstio.c - Communications i/o for the Atari ST
49992 + makefile - makefile for building UNIX C-Kermit
49993 + ckpker.mk - makefile for building Plan 9 C-Kermit
49994 + ckvker.com - build procedure for VMS C-Kermit
49996 +IMPORTANT FILES (use lowercase names on UNIX, VOS, or AOS/VS):
49998 + ckaaaa.txt - This file (overview of the C-Kermit files).
49999 + For system-specific distributions, this will normally
50000 + be replaced by a system-specific READ.ME file.
50002 + ckermit70.txt - Updates: Supplement to "Using C-Kermit", 2nd Ed, for 7.0.
50003 + ckermit80.txt - Updates: Supplement to "Using C-Kermit", 2nd Ed, for 8.0.
50004 + ckututor.txt - C-Kermit Tutorial for Unix (plain text)
50005 + ckcbwr.txt - "Beware file" (limitations, known bugs, hints), general.
50006 + ckermit.ini - Standard initialization file (rename to .kermrc in UNIX, OS-9)
50007 + ckermod.ini - Sample customization file (rename to .mykermrc in UNIX, OS-9)
50009 +The following can be found at the Kermit FTP site:
50011 + ckermit.kdd - Sample dialing directory file (rename to .kdd in UNIX, OS-9)
50012 + ckermit.knd - Sample dialing directory file (rename to .knd in UNIX, OS-9)
50013 + ckermit.ksd - Sample services directory file (rename to .ksd in UNIX, OS-9)
50014 + ckedemo.ksc - Demonstration macros from "Using C-Kermit"
50015 + ckepage.ksc - Ditto
50016 + ckevt.ksc - Ditto
50018 +UNIX-specific files:
50020 + ckuins.txt - UNIX-specific installation instructions.
50021 + ckubwr.txt - UNIX-specific beware file.
50022 + ckuker.nr - "man page" for UNIX.
50024 +VMS-specific files:
50026 + ckvins.txt - VMS-specific installation instructions.
50027 + ckvbwr.txt - VMS-specific beware file
50028 + ckvker.hlp - VMS C-Kermit HELP topic (needs updating).
50030 +DG AOS/VS-specific files:
50032 + ckdins.txt - Data General AOS/VS C-Kermit installation instructions
50033 + ckdbwr.txt - AOS/VS "beware" file
50034 + ckd*.cli - Procedures for building AOS/VS C-Kermit
50036 +The following files are of interest mainly to programmers and historians
50037 +(find them at the Kermit ftp site):
50039 + ckcker.ann - Release announcements.
50040 + ckccfg.txt - Configuration information (feature selection), general.
50041 + ckcplm.txt - Program logic manual (for programmers).
50042 + ckc211.txt - Program update history for edit 201-211.
50043 + ckc200.txt - Program update history for edit 198-200 (big)
50044 + ckc197.txt - Program update history for edit 195-197 (big)
50045 + ckc190.txt - Program update history for edits 189-190 (big).
50046 + ckc188.txt - Program update history, edits 179-188 (big).
50047 + ckc178.txt - Program edit history, 5A edits through 178 (very big).
50048 + ckcv4f.txt - Program edit history, version 4F.
50049 + ckcv4e.txt - Program edit history, version 4E.
50053 +If you have FTP access to kermit.columbia.edu (also known as
50054 +kermit.cc.columbia.edu, ftp.cc.columbia.edu), you can also retrieve various
50055 +C-Kermit binaries from the directory kermit/bin/ck*.*, or more conventiently
50056 +from the web page:
50058 + http://www.columbia.edu/kermit/ck80binaries.html
50060 +Test versions would be in kermit/test/bin/ck*.*. Be sure to transfer these
50061 +files in binary mode. The READ.ME file in that directory explains what's
50066 +The source files for the UNIX version (all UNIX versions) are available in
50067 +kermit/archives/ckuNNN.tar.Z, approximately 1MB in size. Transfer this file
50068 +in binary mode. This is a compressed tar archive. There is also a gzip'd
50069 +version, cku211.tar.gz. To get the binary tar archive:
50071 + mkdir kermit (at shell prompt, make a Kermit directory)
50072 + cd kermit (make it your current directory)
50074 + ftp kermit.columbia.edu (make an ftp connection)
50075 + user: anonymous (log in as user "anonymous", lower case!)
50076 + password: (use your email id as a password)
50077 + cd kermit/archives (go to the archives directory)
50078 + type binary (specify binary file transfer)
50079 + get cku211.tar.Z (get the tar archive) (or get cku192.tar.gz)
50080 + bye (disconnect and exit from ftp)
50082 + uncompress cku211.tar.Z (at the shell prompt, uncompress the archive)
50083 + tar xvf cku211.tar (extract the files from the tar archive)
50084 + make xxx (build C-Kermit for your system)
50086 +(where "xxx" is the makefile entry appropriate for your system.)
50088 +All C-Kermit source and other text files are also kept separately in the
50089 +kermit/f directory. The files necessary to build a particular implementation
50090 +of C-Kermit are listed in the appropriate makefile or equivalent:
50092 + UNIX: makefile (or rename ckuker.mak to makefile)
50093 + 2.11 BSD: ckubs2.mak (rename to makefile), ckustr.sed
50094 + Plan 9: ckpker.mk (rename to mkfile)
50095 + Macintosh: ckmker.mak (rename to kermit.make, use MPW C 3.2)
50096 + VMS: CKVKER.COM (DCL) (and optionally also CKVKER.MMS)
50097 + or CKVOLD.COM (for VMS 4.x)
50098 + Amiga: CKIKER.MAK (Aztec C) or CKISAS.MAK (SAS C)
50099 + Atari ST: CKSKER.MAK
50100 + OS-9: ck9ker.mak or ck9ker.gcc
50101 + AOS/VS: ckdmak.cli, ckdcc.cli, ckdlnk.cli
50102 +Stratus VOS: cklmak.cm
50104 +Minimal source files for building selected versions (these patterns get all
50105 +the files you need, and in some cases maybe a few extra):
50107 + UNIX: ck[cuw]*.[cwh] (including QNX, Plan 9, and BeBox)
50108 + UNIX: ck[cuw_]*.[cwh] (Unix with security modules)
50109 + VMS: ck[cuwv]*.[cwh]
50110 + Mac: ck[cuwm]*.[cwhr]
50111 + AOS/VS: ck[cuwd]*.[cwh]
50112 + VOS: ck[cwhl]*.[cwh]
50113 + Amiga: ck[cuwi]*.[cwh]
50114 + Atari: ck[cuws]*.[cwh]
50115 + OS-9: ck[cuw9]*.[cwha]
50117 +For a detailed, specific source file list for this C-Kermit release, see the
50118 +file ckcxxx.txt, where xxx is the current C-Kermit edit number, such as 211.
50120 +Finally, here is a more detailed description of the C-Kermit file naming
50121 +conventions. A C-Kermit filename has the form:
50123 + CK<system><what>.<type>
50127 +<system> is described earlier in this file;
50129 +<type> is the file type (use lowercase on UNIX, VOS, or AOS/VS):
50131 + c: C language source
50132 + h: Header file for C language source
50133 + w: Wart preprocessor source, converted by Wart (or Lex) to a C program
50134 + r: Macintosh resource file (8-bit text)
50135 + a: Assembler source
50138 + nr: Nroff/Troff text formatter source for UNIX "man page"
50139 + mss: Scribe text formatter source
50140 + ps: Typeset material to be printed on a PostScript printer
50141 + hlp: A VMS Help topic
50143 + ini: Initialization file
50144 + ksc: A Kermit Script to be executed by the TAKE command
50145 + kdd: A Kermit Dialing Directory
50146 + knd: A Kermit Network Directory
50147 + ksd: A Kermit Services Directory
50149 + mak: A Makefile or other build procedure (often needs renaming)
50150 + com: (VMS only) a DCL command procedure
50151 + cli: (AOS/VS only) a command procedure
50152 + cmd: (OS/2 only) a Rexx command procedure
50154 + boo: "boo"-encoded executable program, decode with CKBUNB program.
50155 + hex: "hex"-encoded executable program, decode with CKVDEH program (VMS only).
50156 + hqx: BinHex'd Macintosh Kermit program, decode with BinHex version 4.0.
50157 + uue: A uuencoded binary file, decode with uudecode or (DG only) CKDECO.
50159 + def: An OS/2 linker definitions file.
50160 + sh: A UNIX shell script.
50161 + sed: A UNIX sed (editor) script.
50162 + str: A file of character strings extracted from C-Kermit (BSD 2.1x only).
50164 +<what> is mnemonic (up to 3 characters) for what's in the file:
50166 +NOTE: After C-Kermit 6.0, text filetypes such as .DOC and .HLP were changed
50167 +to .TXT to avoid confusion in Windows-based Web browsers, which would
50168 +otherwise mistake them for Microsoft Word or Windows Help documents.
50170 + aaa: A "read-me" file, like this one
50171 + ins: Installation instructions or procedures
50172 + bwr: "Beware" file -- things to watch out for, hints and tips
50173 + plm: Program Logic Manual
50174 + ker: General C-Kermit definitions, information, documentation
50176 + nnn: Digits: C-Kermit edit number (e.g. cku211.tar.gz)
50177 + cmd: Command parsing
50178 + con: CONNECT command
50179 + cns: CONNECT command (UNIX only - version that uses select(), not fork())
50180 + deb: Debug/Transaction Log formats, Typedefs
50181 + dia: Modem/Dialer control
50182 + fio: System-depdendent File I/O
50183 + fns: Protocol support functions
50184 + fn2: More protocol support functions (and FN3, ...)
50185 + lib: Common library routines module
50186 + mai: Main program
50187 + net: Network i/o module
50189 + scr: SCRIPT command
50190 + tel: Telnet protocol module
50191 + tio: System-dependent communications i/o & control and interrupt handing
50192 + sig: Signal handling module
50193 + usr: Interactive/script user interface
50194 + us2: More user interface (mainly help text)
50195 + us3: Still more user interface (and USR4, USR5, USR6, USR7)
50196 + usx: Common user interface functions
50197 + usy: Command-line parsing
50198 + xla: Character set translation module
50199 + uni: Unicode support
50200 + pty: Pseudoterminal support
50201 + mdb: Malloc-debugging module (not included in real builds)
50202 + str: Strings module (only for 2.xBSD)
50204 +(End of ckaaaa.txt)