Summary of C-Kermit changes from 4E(072) to 5A(129)

Last update: Thu Mar 29 02:09:23 1990

Kermit Protocol Features:
  Performance improvements (see below)
  Transfer of files with international character set translation (see below)
  Sending and recognition of file attribute (A) packets:
    File size, creation date, file type, character set, system ID.
    Control of use of individual attributes via SET ATTRIBUTES.
  Automatic entry into binary or text mode when receiving files that specify
    the file type in the attribute packet.
  New MAIL and REMOTE PRINT commands (work in both directions).
  REMOTE SET commands are now supported in both directions.
  GET, BYE, FINISH, REMOTE commands now work in both local & remote modes.
  SET ATTRIBUTES ON/OFF can be used to enable/disable attribute packets.
  DISABLE and ENABLE commands to control access to server functions.
  Program exit status code now reflects protocol success/failure.

International Character Sets
  SET FILE CHARACTER-SET { ASCII, many NRCs, LATIN1, DEC-MCS }
  SET TRANSFER CHARACTER-SET { TRANSPARENT, LATIN1 }
  SET LANGUAGE { same as NRCs }
  TRANSLATE local files.
  Character set information is conveyed in attribute packets.
  Automatic recognition and translation of character set of incoming file
    when reported properly in attribute packet.

File Transfer Performance Improvements:
  Sliding windows, can be used with packets of any length.
  Maximum packet size increased to 2000.
  Low-level packet readers and writers recoded for increased efficiency.
  Dynamic sizing of packets based on error history.
  Flow control during packet i/o now possible on UNIX.

Macros and variables:
  DEFINE macros and variables.
  ASSIGN variable's current value to another variable.
  INCREMENT and DECREMENT numeric variables by 1 (or any other number).
  Execute macros using DO or just by giving their name.
  Arguments are passed as parameters \%1..\%9
  Global variables \%a...\%z (and others).
  Access to environment variables via \$(name).
  Access to builtin Kermit named variables via \V(name), e.g. \V(count).
  Builtin functions for string manipulation and integer arithmetic.
  User-defined functions with return values.
  Backslash notation for special characters as in MS-DOS Kermit.
  Dynamically allocated space for macro names, definitions, and return values.
  Variables and backslash codes in all commands are fully expanded.
  Maximum macro definition length is 1024 characters.

Scripts:
  INPUT, OUTPUT, REINPUT, PAUSE, GOTO, IF, ASK, ASKQ, ECHO, STOP, POP, RETURN.
  INPUT, PAUSE, and WAIT interruptible from keyboard.
  SET INPUT, SET TAKE, SET MACRO commands.
  WRITE <log> <string which may contain variables & functions>.
  OPEN and READ lines from a file.
  Counted loops.
  Trailing comments ; like this one.
  Command line continuation using hyphen (-) or backslash (\).
  Relaxed prefixing rules; backslashes no longer have to be doubled.
  Conditional branching or execution of commands via IF; the IF command:
    May have an ELSE part.
    IF NOT can be used to reverse the truth of the following conditions.
    IF <, IF =, IF > for comparison of numeric variables.
    IF LLT, IF EQUAL, IF LGT for string comparison.
    IF COUNT for looping.
    IF EXIST for files.
    IF DEFINED for variable and macro names.
    IF SUCCESS, IF FAILURE based on success of previous command.
  C-Kermit's script language is in most ways compatible with MS-DOS Kermit's.

Other
  New support for OS/2, includes VT100 and Tektronix terminal emulation.
  On BSD-based UNIX systems, support for TCP/IP connections via SET HOST.
  SET FILE COLLISION { APPEND, BACKUP, DISCARD, RENAME, REPLACE, UPDATE }
  Tilde-expansion in local UNIX filenames (~ = home directory).
  Alternative initialization filename specifiable on command line with -y.
  New TRANSMIT command, interruptible by Ctrl-C, plus SET/SHOW TRANSMIT.
  New TYPE command, interruptible by Ctrl-C.
  New DELETE command.
  New RENAME command.
  Command synonyms added for compatibility with MS-DOS Kermit: RUN, PUSH, etc.
  And for UNIX: ls, rm (???)
  SHOW command broken into SHOW FILE, SHOW PROTOCOL, SHOW COMMUNICATIONS, etc.
  SET SPEED no longer required with SET LINE - current speed used by default.
  Speed used to adjust timeouts, to prevent unnecessary retransmissions.
  New SET CARRIER command to control whether carrier required on external line.
  Support for Xon/Xoff flow control now actually can work on BSD systems.
  Support for new modems in the DIAL command.
  More detailed and accurate statistics reporting.
  New debugging display available during CONNECT.
  Under UNIX, Kermit no longer appears idle while transferring files.
  Many new additions and improvements to UNIX makefile.
  Many bugs fixed.

Incompatibilities with MS-DOS Kermit:
  Macro arguments are on a stack to allow nested macro calls.
  Macro arguments are cleared and reassigned at each macro invocation.
  Macro definitions can be longer (1024 vs 255).
  If a variable is given as part of a command, only the first word is used.
  INPUT and REINPUT require a timeout parameter.
  REINPUT does not use (or need) its timeout.
  SET INPUT DEFAULT-TIMEOUT has no effect.
  PAUSE and WAIT only take arguments in seconds, not hh:mm:ss.
  WAIT command does not test for modem signals.
  No IF ALARM or IF ERRORLEVEL.
  No specific terminal emulation, SET KEY, SET TERMINAL (except BYTESIZE), etc,
    except in OS/2 and Macintosh versions.
  No \Kverbs.
  Macro and TAKE-file echo and error action are separately controllable.
  \%0 is available to macro as macro name.
  Trailing comments are allowed on interactive commands and within macros.
  Syntax of WRITE command is different (simpler).

Tested on:
  SUN-4 with SUN OS 4.0 (both BSD and System V R3 environments)
  Encore 510 (UMAX 4.3)
  NeXT (Mach 1.0)
  DEC MicroVAX (Ultrix 2.0)
  DEC VAX with 4.1, 4.2, 4.3 BSD
  Generic AT&T System III, System V R2 and earlier
  Generic AT&T System V R3 and later
  SCO Xenix/386, Xenix/286
  AT&T 7300 UNIX PC
  Tandy 6000 / Microsoft Xenix 68000 3.02
  DIAB DS90 68010 / DNIX 5.2
  IBM PS/2 family (OS/2)

Needs testing on:
  (many, many, many, ...)

BACKSLASH NOTATION

\ (backslash) in any command means what follows is not ordinary text, but
rather a code, variable, or function whose value is to be substituted into the
command at that point.

The character after the backslash identifies which kind of quantity this is:
  % - A user-defined variable
  $ - an environment variable
  v - (or V) a built-in variable
  f - (or F) a function
  d - (or D) a decimal number
  o - (or O) an octal number
  x - (or X) a hexadecimal number
  \ - the backslash character itself
  b - (or B) the BREAK signal (OUTPUT command only)
  a decimal digit - a 1-3 digit decimal number.

Numbers:
  \{...} A grouped number, braces discarded, e.g. \{17}5 != \175
  \nnn (1-3 decimal digits) replaced by binary number 0-255, e.g. \13 = CR.
  \dnnn or \Dnnn - Same as above
  \onnn or \Onnn (1-3 octal digits) replaced by binary number 0-255.
  \xnn or \Xnn (2 hexadecimal digits) replaced by binary number 0-255.

Variables:

All variables have character string values.  When used in a numeric sense
(as in the IF <, IF =, IF >, INCREMENT, and DECREMENT commands), they are
automatically converted to numbers.

User-defined variables have names \%a, \%b, ... \%z.  Case is insigificant
(\%a is the same variable as \%A).  These variables are set via the DEFINE,
ASSIGN, or ASK commands, and are global, i.e. available at all times from
within any macro or take file, after they are defined.

Macro parameters are assigned automatically upon macro invocation.  They are
\%0, \%1, ... \%9.  \%0 is the macro name, \%1 is the first parameter, etc.
Parameters are individual words or series of words grouped by braces.
Variables that do not have corresponding parameters are undefined (empty).  
Macro parameters are local to the macro they are passed to.  If macro A
invokes macro B, macro B gets its own set of parameters, which are separate
from macro A's, so that macro A still has its own parameters available after
macro B has completed.  The variables \%0...\%9 may be used as global
variables at "top level", when no macros are active, by assigning values to
them with DEFINE, ASSIGN, or ASK.

Built-in variables are read-only, you cannot change them.  They are:
  \v(date): current date in dd mmm yyyy format (e.g. 8 Feb 1990 or 10 Nov 1990)
  \v(time): current time in hh:mm:ss 24-hour clock format (e.g. 13:45:23).
  \v(argc): number of arguments passed to currently active macro.
  \v(count): current value of COUNT (loop control via SET COUNT, IF COUNT).
  \v(directory): current directory.
  \v(version): numeric version number of C-Kermit.
  \v(success): 0 or 1, corresponding to failure or success of most recent cmd.

Functions are of the form \fname(args).  The F and the name can be upper or
lower case.  The args are a comma-separated list of arguments.  The function
reference replaced by its value.  For example:

  define \%a ABC123XYZ
  echo [[\Flower(\%a)]]

shows [[abc123xyz]].  The following functions are defined.

String functions that return a string:
 \Fliteral(arg)     - Copies its argument literally, without any evaluation.
 \Fsubstr(s,n,m)    - Substring of string s starting at position n, length m.
 \Flower(s)         - Converts the string agument s to lowercase.
 \Fupper(s)         - Converts the string agument s to uppercase.
 \Freverse(s)       - Reverses the string argument, s.
 \Frepeat(s,n)      - Repeats the string s n times.
 \Flpad(x,n,c)      - Left-pads the string s with char c in an n-char field.

String functions that return a number:
 \Flength(arg1)     - Returns the length of the string arg1.
 \Findex(arg1,arg2) - Returns the position of string arg2 in string arg1.

Integer arithmetic functions:
 \Fmax(arg1,arg2)   - Returns the maximum of its two numeric arguments.
 \Fmin(arg1,arg2)   - Returns the minimum of its two numeric arguments.
 \Fmod(arg1,arg2)   - Returns numeric modulus of arg1 and arg2.
 \Feval(arg1)       - Evaluates the enclosed arithmetic expression.

\Feval() evaluates ordinary arithmetic expressions containing the operators
+, -, *, /, ^, and many others.

\Fexecute(name arg1 arg2 ...) executes a macro and returns its value.
\Fval() returns the value of the most recently executed macro.
