Summary of C-Kermit changes from 4E(072) to 5A(150) Last update: Mon Jun 25 18:49:30 1990 This is a very short overview of the new features of C-Kermit 5A. 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 client access to server functions. International Character Sets SET FILE CHARACTER-SET { ASCII, many NRCs, LATIN1, DEC-MCS } SET TRANSFER CHARACTER-SET { TRANSPARENT, LATIN1, ASCII } SET LANGUAGE { Italian, Norwegian, Portuguese, German, French, etc. } to enable language-specific transliterations, like umlaut-u to ue, when transfer or file character set is ASCII. 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. Correct operation in "8-bit clean" Unix and VMS environments. File Transfer Improvements: Sliding windows, up to 31 window slots. Maximum packet size increased to 9024. Sliding windows and long packets can be used together. Packet buffers allocated dynamically, overall size specifiable by user. Low-level packet readers and writers recoded for increased efficiency. Dynamic sizing of packets based on error history. Automatic parity detection during packet operations. 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. Execute built-in string and arithmetic functions. Define your own functions. Arguments are passed as parameters \%1..\%9 Global variables \%a...\%z (and others). Arrays \&a[]..\&z[]. Access to environment variables via \$(name). Access to builtin Kermit named variables via \V(name), e.g. \V(count). Backslash notation as in MS-DOS Kermit. Dynamically allocated space for macro names and definitions. 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, END commands. INPUT, PAUSE, and WAIT interruptible from keyboard. SET INPUT, SET TAKE, SET MACRO commands. WRITE . OPEN, READ, WRITE, and CLOSE local files. FOR loops, which may be nested. BREAK and CONTINUE for FOR loops. Trailing comments ; like this one. Command line continuation using hyphen (-) or backslash (\). Relaxed prefixing rules; backslashes no longer 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 condition. IF <, IF =, IF > for numeric variables. IF EQUAL, LLT, 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. Extended IF statement (XIF) allows nested, compound parts. C-Kermit's script language is in most ways a proper superset of the script language of MS-DOS Kermit 3.0. Other On 4.x BSD-based UNIX systems, support for TCP/IP connections via SET HOST. SET FILE COLLISION { APPEND, BACKUP, DISCARD, OVERWRITE, RENAME, UPDATE } Tilde-expansion in local UNIX filenames (~ = home directory). Alternative initialization filename specifiable on command line with -y. New TYPE command, interruptible by Ctrl-C. New DELETE command. New RENAME command. New TRANSMIT command, interruptible by Ctrl-C, plus SET/SHOW TRANSMIT. Command synonyms added for compatibility with MS-DOS Kermit: RUN, PUSH, etc. And with UNIX: RM, LS, etc. SHOW command divided into SHOW FILE, SHOW PROTOCOL, SHOW COMMUNICATIONS, etc. SET SPEED no longer required with SET LINE - current speed used by default. 75/1200 Split-speed communication in Berkeley UNIX. Terminal interrupt (Ctrl-C) now returns to prompt rather than exiting. Improved control over modem signals. Improved interaction with Hayes modems & support for many new modem types. Compatibility with new and distributed (struct dirent) file systems. Improved use of UUCP lockfiles. Improved operation and security when run setuid. Improved handling of disk-full and disk-write errors. More detailed statistics reporting. New debugging display available during CONNECT. Text and binary mode options for session log. Support for new modems in the DIAL command. Under UNIX, Kermit no longer appears "idle" while transferring files. Program exit status code now reflects protocol success/failure. EXIT n explicitly sets program's exit status code to n. Many new additions and improvements to UNIX makefile. Simplification and expansion of makefile configuration options. New documentation - user manual, man page, improved built-in help text. 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: AT&T 3B2 AT&T 7300 UNIX PC, 3B1 AT&T System III, System V R2 and earlier, many platforms AT&T System V R3 and later, many platforms Berkeley UNIX 4.1, 4.2, 4.3, many platforms Apple Macintosh AUX Data General Aviion DEC MicroVAX (Ultrix 2.0) DEC VAX (various models, Ultrix 3.x) DEC VAX with 4.1, 4.2, 4.3 BSD, AT&T System V R2 DECstation 3100, Ultrix DIAB DS90 68010 / DNIX 5.2 and 5.3 Encore 510 (UMAX 4.3) HP-9000 HP-UX IBM 370-series mainframe, AIX/370 Masscomp/Concurrent RTU 4.x MIPS (???) NCR Tower 1632, System V NeXT (Mach 1.0) Pyramid SCO UNIX/386 SCO Xenix/386 SUN-4 with SUN OS 4.0, 4.1 (both BSD and System V R3 environments) Tandy 6000 / Microsoft Xenix 68000 3.02 Other systems: Apple Macintosh, MAC OS. In progress. IBM OS/2 (includes VT100 and Tektronix terminal emulation). In progress. VAX/VMS. In progress. Commodore Amiga: In progress. Data General AOS/VS: Volunteers needed! Apollo Aegis: Volunteers needed! Needs testing on: Many, many, many... (*** skip the rest in the announcement ***) 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 simple (scalar) variable & - an array reference $ - 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. Arrays must be declared before use: DECLARE \&A[20] declares an array called \&a (case doesn't matter) with 20 elements. Arrays are global, and their elements are referred to with a subscript, as \&a[12] or \&a[\%i]. 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(input): current INPUT buffer contents. \v(line): current communication device or network host. \v(version): numeric version number of C-Kermit. \v(success): 1 or 0 depending on success or failure of previous command. Built-in 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 define \%b ...\Flower(\%a)... Results in a value of ...abc123xyz... for \%b. Functions include: String functions that return a string: \Fliteral(arg1) - Copies its argument literally, without any evaluation. \Fsubstr(arg1,arg2,arg3) - Substring of arg1 starting at arg2, length arg3. \Flower(arg1) - Converts arg1 to lowercase. \Fupper(arg1) - Converts arg1 to uppercase. \Freverse(arg1) - Reverses the string argument. \Frepeat(arg1,arg2) - Repeats arg1 arg2 times. \Fvalue() - Value of most recent RETURN statement. \Fexecute(macro args) - Execute a macro, return its RETURN value if any. \Fcontents(variable) - Returns the definition (contents) of a variable. \Fdefinition(macro) - Returns the definition of the named macro. String functions that return a number: \Flength(arg1) - Returns the length of the string arg1. \Findex(arg1,arg2,arg3) - 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. \Flpad(string,n,c) - Left-pads a string out to length n with character c. \Frpad(string,n,c) - Right-pads a string out to length n with character c. File functions: \Ffiles(filespec) - Returns the number of files that match the specification. \Fnextfile() - Returns the next filename that matches the \Ffiles() file specification. The names of built-in functions and variables can be abbreviated to their minimum unique length, for example \feval(1+1), \v(dir), etc.