From C20211@UK.AC.PLYMOUTH.PRIME-A Wed Apr 7 14:15 GMT 1993 Via: uk.ac.plymouth; Wed, 7 Apr 93 14:15:46 GMT Date: Wed, 07 Apr 93 15:13:41 From: John Horne Subject: Prime Kermit 8.15 - file 3 To: syspds In-Reply-To: Your message of Fri, 19 Mar 1993 16:21:30 +0000 (GMT) Status: RO From : John Horne, Computing Service, Polytechnic South West. Email : C20211 @ UK.AC.PSW.PA Kermit - Version 8.00, for PRIMOS revisions 21 and 22. This new version of Kermit (8.00) replaces the previous version (7.57). Initially I was asked to investigate some problems our users were having with large (>100k) files. However, the code seemed to be getting a bit old and messy. So it seemed somewhat easier to look at all of the code. This version should work exactly as the old version, but there is more functionality in it and the use of packets should be more efficient. The error handling has been much improved, and I think that this will cure most problems that users use to have. All the previous known bugs have been sorted out in the code. Where possible version 6 of the Kermit Protocol Manual has been followed. The documentation included will show users the new commands available. Below are some of the main changes, but for more details it will be necessary to look at the code. Options on the command line and to parameter settings may be abbreviated to some extent; i.e. YES may be given as Y, OK, or just Carriage Return; FILE_TYPE may be abbreviated to FT, and so on. The following changes are in the new version of Kermit : 1) 17/01/90 : Many commonly used constants have been put into COMMON, these include character constants, CTRL-A in 7-bit and 8-bit ASCII, etc. 2) 17/01/90 : All of the code has been looked at, and "cosmetically" tidied up. 3) 17/01/90 : Unused subroutines/functions have been removed; others have been replaced as in-line code; and yet others re-written to make more use of COMMON variables. 4) 17/01/90 : "Transparent" mode has been made available. This is basically when NO parity is used; 8-bit parity checks are done. The code was there before but not available to the user (why?). This also means that parity can be SET or given on the command line itself. 5) 17/01/90 : Most of the previous code did not check for ANY error messages from the PRIMOS subroutines used - I think this is where most of the bugs came from. Nearly all of the subroutines are now checked for errors and appropriate action is taken. Meaningful messages will be displayed to the user, or a number given. A number means real big trouble! Some of the old subroutines have been replaced by new ones, and some old code replaced by PRIMOS subroutines. Only inconsequential subroutines have been left un-checked, e.g. file-units not closed, but since file-units are dynamically allocated it doesn't matter whether they are closed or not. 6) 17/01/90 : The use of pathnames has been extensively adopted. This will allow more flexibility for the user; they don't have to continuously change directories now. The code is also more robust, since the subroutines will easily handle pathnames, rather than the code having to attach all over the place and then to attach back (this is asking for trouble). 7) 17/01/90 : The LOG file is now checked to see if it is already in use. The CLOSE command has been added, so that the user may close it now if they wish. 8) 17/01/90 : The type of file system object being SENT is now checked. It is only possible to send SAM, DAM, or CAM files. An error message is displayed if the user tries to send a directory of any sort. 9) 17/01/90 : There are more command line options available; -HELP will show you them. The help message has been tidied up, and -USAGE added just to show the syntax. The options may also be used before entering interactive mode. The options -SEND, -RECEIVE, and -SERVER are checked for compatability; and if none of them are present then interactive mode is entered. The values of any command line options are also checked for syntax; the code is now more robust. 10) 17/01/90 : Some subroutines/functions have had their arguments changed or removed; whilst others have become functions and vice-versa. 11) 17/01/90 : The INCOMPLETE variable may now be SET. This will/will not keep files that arrive incomplete depending on the setting. 12) 17/01/90 : The POUND variable may also be SET. This will convert pound signs correctly for files sent to and from DOS machines. If it causes problems, then SET it to OFF. 13) 17/01/90 : The CONVERT command has been made available. This will "convert" a file to PRIME format. Basically it sets the 8th-bit throughout the file, and sets the end of line correctly to line-feed. The code was there before, but not shown in HELP at all. 14) 17/01/90 : File attributes may be used now by Kermit - this is SETtable. For files sent, the file size is sent in bytes and Kbytes; and the files date/time of creation (DTC) is sent. For files received the file size is checked against the available disk space quota; the DTC is set if present and the user has O or P rights in the directory, and the file type is used to determine the method of storage. Note that according to the Protocol the DTC should be used, NOT the date/time last modified which was previously coded. Any files which are too big to be sent or received result in a warning message. If wildcards are used then it will continue with smaller files. This keeps in line with the Protocol. The last part is also useful when transfering large files; previously the whole thing would just bomb out, and the user would have to start again. 15) 17/01/90 : The TAKE command may now be nested to 25 levels. Previously the user would simply tread on the previous file with no warning or anything! POP is available to exit the current TAKE file, and return to the previous file - if any. Also STOP has been coded to exit ALL of the users TAKE files. 16) 17/01/90 : More generic commands are available; Disk USAGE (or SPACE), RENAME, COPY, WHO (although this isn't too good), and SEND (or MESSAGE). 17) 17/01/90 : Some of the messages displayed have been "cosmetically" changed. 18) 17/01/90 : Sending files with DOS wildcards from the PRIME is a dubious area since it requires knowing what the user MEANS! The special case "*.*" is taken to mean send ALL files, not just ones of 2 components. Other cases are translated as "*" to "@", and "?" to "+". 19) 17/01/90 : The received timeout is now used, rather than just using 2 minutes as a fixed time. If necessary it may be possible to reset the timeout on the local Kermit. 20) 17/01/90 : The PUSH command has been added to enable the user to jump to PRIMOS. Kermit is re-entered either by using the S (START) command, or REN (for Re-ENter). REN is a bit more reliable; it depends on what the user does at PRIMOS level. Kermit itself may be invoked again, and PUSHed from again. The limit to this is set per-user by the sites' PRIME system administrator. (Here at PSW users can do it about 10 times.) 21) 17/01/90 : The code is more robust in the checking of values given for the quoting and 8-bit quoting characters, and for the parity being used. Previously it would have violated the Protocol by allowing the characters to be the same. 22) 17/01/90 : It is now possible to avoid received file name collisions. This is a SETtable option. The new file name is sent with the F packet acknowledgement, so this may be printed out by the local Kermit. The new file name tries to append four digits to the files' prefix, or if necessary it will overwrite the last characters of the prefix. 23) *>SOURCE>(XFER_MODE, CONVERT_FILE).PLP, *>INSERT>COMMON.INS.PLP 26/01/90 : The subroutine XFER_MODE had some octal characters in it which prevented sites from receiving the file correctly from Lancaster (U.K.). Extra variables in COMMON are now used to hold these values, which are calculated when Kermit is invoked. The CONVERT command was not working correctly (if at all). The code has been changed to handle end-of-file conditions better. The subroutine used to write out the file has been changed, as have some of the error messages produced by the CONVERT command. 24) *>SOURCE>@@, *>INSERT>@@ 02/02/90 : To enable the source code to be transmitted over various networks successfully some of the code lines have been reduced in length. All of the source code lines are now 80 characters or less in length. This may make the code a little bit less readable, but does not affect its functionality in any way. 25) *>KERMIT.BUILD.CPL, *>INSERT>(KERMIT, PRIMOS).INS.PLP, *>SOURCE>(UTILITIES, SETUP_TRANS_CHAR).PLP 09/02/90 : The build program will now allow the -BINARY option to be passed to the PLP compiler. This allows the redirection of the binary file, or the prevention of any binary file being produced by using the relevant PLP -BINARY options. The default is still to the sub-directory *>OBJ. The above 5 files have had their initial comment lines changed so that all of the build and source files received from a distribution site may be more easily identified. Each file is seperated by a line of hyphens. This is then followed by a blank line, and then a single comment line. This begins with the characters "/* ". The upper case characters following it are the subroutine name, and end with the character sequence " -- ". It is intended that an editor is used to seperate out the files. The build file and insert files will need to be seperated individually. I hope this is of some help. 26) *>SOURCE>(SEND_PACKET, COMND).PLP 12/02/90 : Minor changes to some of the conditional statements logic in the subroutine SEND_PACKET. In the subroutine COMND a window size of 0 will now display a message stating that no windowing will be performed. An invalid window size will now show the correct message; previously it gave garbage at the end of the message. 27) *>INSERT>(COMMON, CONSTANTS).INS.PLP, *>SOURCE>(KERMIT_INIT, OPEN_INPUT, READ_INPUT, SET_PARAMS, GET_DTC, PRS_SEND_INIT, LOG_PACKET, CHANGE_DIR, COMND, GENERIC_CMD, WRITE_OUTPUT, CONVERT_FILE, REC_SWITCH).PLP 15/02/90 : Peter Mason's (SHEFFIELD UNIVERSITY, U.K.) code has been incorporated to allow ASCII files containing long lines to be transmitted. This worked fine for binary files, but ASCII/Text files would previously be truncated to 1022 characters. Some more commonly used constants have been replaced by variables or %REPLACE identifiers. 28) *>SOURCE>(CLOSE_OUTPUT, GET_DTC).PLP 16/02/90 : If file attributes are in use then the files' Date/Time last modified (DTM) attribute is set as well as the Date/Time of creation (DTC). Whilst the Kermit Protocol states that the DTC should be used, this is historical and the DTM is of more use to users. The DTM is also sent instead of the DTC in the attribute packet. This is now version 8.01 (unreleased). 29) *>SOURCE>(UTILITIES, WRITE_IBUF, WRITE_OUTPUT, OPEN_OUTPUT, KERMIT_INIT).PLP, *>INSERT>COMMON.INS.PLP 07/03/90 : Lines ending in just a LF are handled correctly now. This will allow POSTSCRIPT files to be transferred. A NUL character is appended to the LF, if necessary, to maintain the word alignment. When receiving a file the file type (text or binary) cannot change once the file has started to be written to disk. Previously it was possible for certain files to change type when the last part of the file was received. The logic of some conditional tests has also been changed. 30) *>SOURCE>(READ_INPUT, KERMIT_INIT, WRITE_IBUF, OPEN_OUTPUT).PLP, *>INSERT>COMMON.INS.PLP 21/03/90 : Corrected the handling of repeat characters. Sometimes the packet would become too large when two characters were repeated, since these two are actually written out individually and NOT packed together. This has also enabled us to simplify some other parts of the code. 31) *>SOURCE>GENERIC_CMD.PLP, *>INSERT>PRIMOS.INS.PLP 29/03/90 : The generic command COPY now uses different subroutines to perform the copy. This makes it faster, and also allows the copying of binary files. Previously these files would become corrupted. The declared entry for the Primos subroutine RDLIN$ has been removed since it is not used. 32) *>SOURCE>PRS_SEND_INIT.PLP 06/04/90 : Removed a redundant WHEN statement. 33) *>SOURCE>(SEND_SWITCH, KERMIT_INIT, READ_INPUT).PLP, *>INSERT>COMMON.INS.PLP 10/04/90 : The bug fix 30 above caused the packet length to drop to about 86 characters for most packets. This seemed to be getting too low a value. The character handling code in READ_INPUT has been re-written so as to get the packet as full as possible before sending it. Most packets are now filled to about 93 characters. 34) *>SOURCE>(NEXT_FILE, OPEN_LOG, KERMIT, GET_ERROR_MSG, COMND, LOG_PACKET, CHANGE_DIR, REC_SWITCH, GENERIC_CMD, SET_PATH).PLP 11/04/90 : Minor changes to some logical character comparisons where null strings are involved. 35) *>SOURCE>@@, *>INSERT>@@, *>KERMIT.BUILD.CPL 18/04/90 : Version 8.10 (unreleased) received from Matthew Sutter in U.S.A. New functionality with the CONNECT command for connecting the Prime to other Computers, rather than just to micro-computers. Also allows the SETting of the AMLC line number and baud rate for the CONNECT command. Code included to SET the ESCAPE character for the CONNECT command, and also recognition of some escape sequences as sub-commands to CONNECT. Added code for BYE, FINISH, GET, INPUT, OUTPUT, PAUSE, and CLEAR commands. Help screens updated for the new commands. 36) *>SOURCE>@@, *>INSERT>@@ 20/04/90 : Version 8.11 (unreleased) received from Matthew Sutter in U.S.A. Some bug fixes and code improvements to version 8.10. The MORE subroutine added for the help screens. 37) *>SOURCE>@@, *>INSERT>@@ 23/04/90 : Version 8.12. Further bug fixes and some code improvements. Code added for the "0" sub-command to CONNECT, and allow the PAUSE command to accept a 24-hour clock time. 38) *>SOURCE>COMND.PLP 01/05/90 : Test for the remote server being present in the BYE and FINISH commands. Made the SET FILE_TYPE command identical to the FILE_TYPE command line option. It now recognizes "FT" or any sub-string of "FILE_TYPE". The SHOW command has similarly changed. Minor text message changes. 39) *>SOURCE>(ASSIGN, XFER_MODE).PLP 27/06/90 : Changed the half-duplex settings so as NOT to echo LF after a CR. Requested by Ted Flory (BRIDGEWATER COLLEGE, U.S.A). 40) *>SOURCE>(ASSIGN, COMND, KERMIT_INIT, BK_HNDLR, REC_PACKET, REC_AMLC, PRS_SEND_INIT).PLP, *>INSERT>CONSTANTS.INS.PLP 06/07/90 : The receive timeout has been changed from minutes to seconds, previously the timeout would be rounded up to the nearest minute, but this is not necessary. Also the timer is turned off as soon as a valid start-of-packet character has been received, and NOT after the packet has been processed. Some minor code changes in parameter passing now prevent Primos POINTER_FAULT$ errors occuring when receiving data using an AMLC line. The AMLC baud rates of 9600, 2400, 4800, 19200 have now been replaced by CLOCK, JUMPER_1, JUMPER_2, and JUMPER_3. This now allows for the fact that these values are machine/configuration dependant. The default values are shown, but the actual values will have to be obtained from the system administrator. The other baud rates of 110, 134.5, 300, and 1200 are fixed within Primos, so the Kermit default baud rate has now also changed to 1200, the Prime default baud rate. 41) *>SOURCE>(KERMIT, KERMIT_INIT, OPEN_LOG, COMND).PLP, *>INSERT>(COMMON, CONSTANTS).INS.PLP 17/07/90 : The log file pathname is now shown with the "SHOW ALL" or "SHOW LOG" commands. The send and receive packet maximum retry count is now settable, and will also be shown with the "SHOW" or "SHOW RETRIES" commands. The send and receive packet timeout may also be shown with the "SHOW" or "SHOW TIMEOUT" commands. The send packet timeout is also settable. 42) *>SOURCE>OPEN_INPUT.PLP 23/07/90 : The internal subroutine to perform automatic file type checking was actually doing a bit more than it ought to, and likewise for specific file types some internal buffers were not being initialised. This gave rise to the problem that interrupted file transfers would corrupt the next file sent if a specific file type was previously set. 43) *>SOURCE>(REC_SWITCH, SEND_SWITCH, KERMIT_INIT, SET_PARAMS, COMND).PLP, *>INSERT>COMMON.INS.PLP 07/08/90 : The sliding windows code has been corrected. The default window value is 6, but it is, of course, settable. A value of 0 is now illegal, non- windowing is actually performed by the windowing code but with a window size of 1. All of the previous non-windowing code has been removed. 44) *>SOURCE>SERVER.PLP 08/08/90 : Timeouts by the server are not now NAKed since this only seems to cause problems for the local kermit. The Prime will still log that timeouts have occured though. 45) *>SOURCE>@@, *>INSERT>@@ 09/08/90 : Version 8.12 received from Matt Sutter (U.S.A). New code for seperate packet and/or session logging. Bug fixes to the repeat character processing, and AMLC line handling. 46) *>SOURCE>@@, *>INSERT>@@ 10/08/90 : Version 8.13 (unreleased). Merged version 8.12 (U.S.A) with all known previous bug fixes. 47) *>KERMIT.BUILD.CPL, *>INSERT>@@, *>SOURCE>(ASSIGN, COMND, CONNECT, DISCARD_OUTPUT, GENERIC_CMD, GET_LEN, INPUT, KERMIT_INIT, MATCH_FILE, OPEN_INPUT, OPEN_LOG, OPEN_OUTPUT, REN_HNDLR, SEND_PACKET, SERVER, SET_PATH, XFER_MODE).PLP 25/10/90 : Version 8.14. Corrected the setting of the terminal to/from half/full-duplex mode, the initial setting is now correctly restored. The REMOTE SPACE command will now also show the disk space available, since it is useful for those users without quota restrictions. The asynchronous line baud rate is now only checked for a valid rate when set. Valid rates are determined by PRIME. When the line is assigned to set the baud rate, checking will be done by PRIMOS as to whether the hardware actually supports the requested rate. The CLOSE command with no option will now close any one open log file, but not if both are open. Unimplemented server commands are now reported as such. Files which are at the MFD level are now handled correctly, previously their pathname would become corrupted. GET_USER_INFO is a new subroutine to determine some of the users PRIMOS environment variables. It is called when Kermit is invoked, and when the user re-enters Kermit after a PUSH command since they may have changed their environment whilst at PRIMOS level. For ASCII files the exact file length in bytes is now sent. Previously the length did not take account of space compression characters, so the file length sent was usually less than its true length. 48) *>INSERT>(CONSTANTS, COMMON).INS.PLP, *>SOURCE>(KERMIT, KERMIT_INIT, COMND).PLP 11/02/91 : Added the -INIT option to the command line. By default an initialization file, called PRIME_KERMIT.INIT, will be run if it exists in the current directory. An alternate pathname may be used if it is specified on the command line. 49) *>SOURCE>(COMND, CONNECT, READ_INPUT, SETUP_TRANS_CHAR, WRITE_OUTPUT).PLP 28/04/92 : Version 8.15. The use of Kermit over asynchronous lines with no parity did not work very well. There is now better checking, and clearing of the parity bit, for lines which do not have parity set. Requested by Andy Kurtz at Lincoln National Information Services. 50) *>SOURCE>KERMIT_INIT.PLP 01/05/92 : Initialize the variable REM_NPAD which indicates the number of remote padding characters to use. This is needed for the first packet sent to the remote system.