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mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmKERMIT_INFO 644 0 3 16253 3511571445 5575 mmand: tar xvf /dev/f0 ckaaaa.hlp Then use more(1), lp(1), or some other utility, to read the ckaaaa.hlp file that you just extracted from the diskette. To extract the executable KERMIT for use with PRO/VENIX V2.0 from the kit, insert the second diskette in drive zero and issue the following command: (cd /usr/bin; tar xvf /dev/f0 kermit) This will place the executable file in the /usr/bin directory, which is normally included in the For your convenience, and also to facilitate support-related activities, a copy of KERMIT is included in this distribution. KERMIT is a terminal emulator and file transfer program, capable of transferring text and binary files with error checking and recovery. KERMIT was developed at the Columbia University Center for Computing Activities, and carries the following copyright notice: Copyright (c) 1985, Trustees of Columbia University in search list specified by the PATH variable. The file can be used on both the Professional 380 and the Professional 350. Page 2 If you wish to use KERMIT to do file transfers, you will need to get a version of KERMIT running on the host as well. The easiest way is probably to get a magnetic tape from Columbia, or possibly from a users' group or from a network (e.g., USENET). You can also the City of New York. Permission is granted to any individual or institution to use, copy, or redistribute this software so long as it is not sold for profit, provided this copyright notice is retained. Note that no support of KERMIT is provided by Digital Equipment Corporation. Also note that this is a preliminary version of KERMIT, that changes are still being made to it, and that you may encounter some problems withsend the C sources, assuming they are appropriate, from your Professional to the host. Send them to the host using cu(1), which does no error checking. Then either send them again (while maintaining the first set) and compare the second set with the first set and correct any problems, or use the sum(1) command (if available) on the local and remote copies to see if any of the files need to be resent. Once this bootstrapping procedure is completed, you it. You may write to the following address to inquire about obtaining an up-to-date collection of Kermit programs: Kermit Distribution Columbia University Center for Computing Activities 612 West 115th Street New York, New York 10025 The KERMIT distribution you are receiving includes two diskettes, both in tar(1) format. The first one, labelled "KERMIT 4C(053)+ diskette #1", contains sources and related files for building C-Kercan then use KERMIT to get updated sources or binaries of itself from your Professional, from dial-in networks, etc. In addition to information in the KERMIT files included in the kit (e.g., ckaaaa.hlp, ckuker.bwr, DECnotes), you should note the following when using KERMIT with PRO/VENIX V2.0: o When using KERMIT to do terminal emulation, type Control-S to "freeze" the display and Control-Q to restore it, rather than usingmit on a UNIX or UNIX-like system. The second one, labelled "KERMIT 4C(053)+ diskette #2", contains an executable KERMIT image for use with PRO/VENIX V2.0, some documentation on using and building KERMIT, and also additional sources and related files for building C-Kermit for VMS. For information on using and building KERMIT, change your default directory if desired using cd(1), insert the second diskette in drive zero, and issue the following co the HOLD SCREEN key. o To build a version of KERMIT that will run on both the Professional 380 and the Professional 350, extract all the files from the first diskette, rename ckuker.mak to makefile, and issue a "make sys3nid" command. make(1) will produce an executable file named "wermit", which you can rename to /usr/bin/kermit after testing it. o If using a Professional 380, you may inofficially" accepted by Columbia. The DECnotes file on the second diskette contains some information that was sent to Columbia about the changes that Digital has made, and also includes some problem reports, suggestions, etc. KERMIT now supports Digital's DF03-AC, DF100 series, and DF200 series modems. You may redial the last number dialed on the DF100 and DF200 modems by simply issuing the DIAL command without any arguments. You can also store dialing stialing. Changed the call to 'ttopen' to pass the address of 'local' rather than it's value. Close the line rather than hang it up on failures, since this might get around some unnecessary problems caused by trying to re-open it. It is believed that every function that "needs" the line does an explicit call to 'ttopen' anyway. Declare handlers AFTER establishing "jump vector" for them. Change success message to "Call competed" and beep the bell, if quiet is not enabled. CKUSCR.C: Changed statstead issue a "make sys3" command to produce a version of KERMIT with slightly better performance, and also one that can be debugged using adb(1). KERMIT cannot easily be debugged on the Professional 350 because adb cannot be used with code-mapped programs. o The C optimizer will issue a warning about running out of space when compiling ckuus2.c. Do not be concerned. rings in the modem's memory and invoke them from KERMIT (e.g., DIAL $WORK, DIAL B). UNIX is a trademark of AT&T. VENIX is a trademark of VenturCom, Inc. igital has made, and also includes some problem reports, suggestions, etc. KERMIT now supports Digital's DF03-AC, DF100 series, and DF200 series modems. You may redial the last number dialed on the DF100 and DF200 modems by simply issuing the DIAL command without any arguments. You can also store dialing sto The linker, ld(1), will issue a warning about switching to a -m option when "wermit" is linked using a "make sys3nid" command. Again, do not be concerned. In addition to information in the KERMIT files included in the kit you should note the following when using KERMIT with VMS: o Contrary to the file-naming conventions mentioned in CKAAAA.HLP, VMS C-KERMIT is built using some of the "UNIX" files as well aDECnotes 644 0 3 14065 3510607670 5431 s the VMS-specific ones. Page 3 o If you have problems running CKWART, try compiling CKWART.C without optimization. Alternatively, you can omit the use of CKWART and use the CKCPRO.C file that is included in the kit. o VMS C-KERMIT appears not to be interruptable. You will have to send it a FINISH command from a local KERMIT, or abort the VMS process CKCMAI.C: Call to hack_vms_open_console (see CKVTIO). CKCFNS.C: Removed a ZRTOL-related debugging call, since debugging statements were added to ZLTOR and ZRTOL (in CKVFIO) themselves. CKUCON.C: Made source lines for 'hlpmsg' more consistent, alphabetized the entries, and added a H(angup) entry as somebody had apparently done for CKVCON. Appended a space to the "Command>" prompt. Added the code to support the H(angup) option. CKUDIA.C: Merged in Joe Orost's support for US Robotics 212A modem, from another terminal line. o There is also a BLISS-32 (and hence MACRO-32) version of KERMIT for VMS. It has been around a while and is somewhat faster and more stable than the C version. Contact Columbia University if you want a copy of it. Digital has recently made some changes to the KERMIT files and has sent those changes to Columbia University. This kit includes the changed versions, which have not yet been "which included making 'dmode_prompt' and 'wake_prompt' be strings rather than single characters, and correspondingly updating 'waitFor'. More explicit specification of DF03 as "DF03-AC". The "-AA" is not an autodial modem. Changes to DF100 and DF200 dial strings and comments to allow use of the modem's memory to store and dial numbers. Modularization of some of the failure paths to hopefully provide consistent failure handling, as well as reduced code size. Added the ability to interrupt the d\r and/or \n from each line and for an explicit \r\n. 'hack_vms_open_console' added to allow display of command-line help. --------------------------------------------------------------------------- The following changes were NOT made, but it is suggested that somebody do so. CKUFIO.C: You should probably add debugging statements to ZLTOR and ZRTOL in CKUFIO as was done in CKVFIO. CKUTIO.C: It would be "friendlier" if the lock-checking code asked you if you wanted to remove the file, and then did using LAT (Local Area Transport) terminal connections, you may need to use a lower baud rate or shorter send packets when transferring from your "terminal" to the host. Some LAT software doesn't expect "fast typing" from the terminal direction. VMS VAX-C V2 allows DEFINEs by a command line qualifer, and CKVKER.COM makes use of this to include debugging and transaction logging code if it believes that VAX-C V2 is being used. VAX-C V1 had no such feature. If you want the DEBUG and TLOG symbols definso if desired, rather than telling you what command to use to do it. Make a change to 'conola' as was done for CKVTIO if it won't break anything, and then modify the corresponding arrays. CKUKER.BWR: When modifying or writing KERMIT code, do NOT pass a routine (e.g., "signal") the address of a static function. Doing so may break VENIX code mapping. If you must pass the address of the routine, make it global and pick a "non-generic" name for it that will hopefully be unique and yet informative. ed for use with VAX-C V1, modify the CKCDEB.H file. , you may need to use a lower baud rate or shorter send packets when transferring from your "terminal" to the host. Some LAT software doesn't expect "fast typing" from the terminal direction. VMS VAX-C V2 allows DEFINEs by a command line qualifer, and CKVKER.COM makes use of this to include debugging and transaction logging code if it believes that VAX-C V2 is being used. VAX-C V1 had no such feature. If you want the DEBUG and TLOG symbols definic 'timeInt' handler to global 'scrtime', to avoid possible problems with VENIX code mapping (see CKUKER.BWR below). CKUTIO.C: Treat hangup of a closed line as success rather than failure. CKUUS2.C: Replaced TAB character in help entries for '-q' and '-d' options with spaces. CKUUSR.C: Created a 'doconnect' function, to be called by the CONNECT and DIAL commands. Appended a space to the default "C-Kermit>" prompt. DIAL now automatically invokes CONNECT if dialing is successful. Modified modem Change some of the function names in CKxTIO to use the name "string" when a new-line is not implied, and "line" when it is. Current usage of the word "line" is sometimes misleading. A control-S typed at the keyboard doesn't always seem to "take" when doing terminal emulation under PRO/VENIX V2. Perhaps other systems as well? PRO/VENIX V2 (and some other systems) are having DTR-dropping problems. With PRO/VENIX V2, a workaround is to get the system to ignore the modem control signals and treat th-type display code to avoid some redundant testing. CKVCON.C: Made source lines for 'hlpmsg' more consistent, alphabetized the entries, and removed explicit occurrences of \r\n (see CKVTIO). Appended a space to the "Command>" prompt. CKVFIO.C: Modified ZLTOR to strip the version number and include debug info. Modified ZRTOL to preserved the version number and include debug info. CKVKER.COM: Automatically determine C Run-Time library to use. Save and restore command-file verification. Exit on e line as a direct line by issuing a "setline -d xxx" command, where "xxx" is the device node (e.g., com1). KERMIT under PRO/VENIX V2 (and probably other systems) doesn't find long (?) file names (e.g., ckvker.com.dif, ckvmak.com.dif) when doing a "send *.dif", even with file names set to literal locally. A "dir *.com.dif" shows them there, and they can be sent individually. The VMS C-Kermit, unlike the BLISS-KERMIT, is NOT interruptable, either with ^C or ^Y. The latter can be interrupted by twerrors. Display additional "progress" information. Avoid use of LNK$LIBRARY in case user had it defined. Use CCMAKE to check/compile CKCPRO and CKWART. Allow external definition of C-Compiler options. Make the DCL somewhat more efficient. CKVMAK.COM: Save and restore command-file verification. Exit on errors. Determine output file specification more efficiently with F$PARSE. CKVTIO.C: Treat hangup of a closed line as success rather than failure. Modified 'conola' to removed any trailing o (?) ^Ys. The "REMOTE xxx" commands to VMS C-KERMIT do not appear to work, nor does "! xxx" locally from VMS C-Kermit. A problem with the "system" call or subprocess spawning is suspected. VMS C-KERMIT is less efficient than BLISS-KERMIT, and may require the use of lower baud rates or shorter send packets when sending TO it. KERMIT under PRO/VENIX V2 on the PRO 350 is (not suprisingly) less responsive than on the PRO 380, and may necessitate the use of lower baud rates or shorter packets. If  5 A- A B A @ A-  A    wf7TB A@ C@ppC`pw@P 7AB@7 ĵ7> wI#EEFNuwfAW @w* f175 e w  5w7|7x7t7p7l7h7d7`7\7X7T7P7L7H7D7@7<7874707,7(7$7 77777 777f&$ &  7  w @5   6  H  7 6wN 5%U޺ EҺ%U Ⱥ%EE UE EE0U7%E~w]xT5 N% % 5 (%E5 (%  6  H 7 w@ r yB5 V@OKGC ? ; 7 3 /  7 K  , X   `  5 NQD "%nD " 7 455 5 u-u @@5u5 N   h N @ h @5 N    NNm @@@m7 ~ w7 Ff@wXwT&wf@wwxwf@w ww w7dw(w 7&;B= 0 6=;2=.=ܶ% 7::  :B z :   : X 7:w7%< ww<  Ufw47 4 T4 N% D : 7t ~ wp7^j4  wT7B 84<  8  .47 (4 4&  % 3  N  N  3w7 3         7 3w7 3_*3_p z3 \3 %7X3wN 7fE5 8343@E7@E73w7 3 m2w7 5  NAAm u- @@m@w 6 7<f %NfC >e%_HCf   fC >e7 <e; B5fef %  7;f,C.Ne  fe5C >e; B5fef %  7n;f>C >e7 N; P;&N NGC "%.; H$; ffC >e_: :T: N%T: N%T: N%:C}C7 2wNf2 %5NfD >e NDD >e@7@ D2w@fe,2 %7 2+& 5EE5 f5@@mAEH u-@E@- @w "  N @ h 7 1 Nf~1 %5( 55EE5 5@@mAEH u-@E@-   @   7 1 dw "  N @ h  ,5 kermit 755 2 2 306512 3511566771 5314 >eNCC >e:\C >e_7j n: wl `:  V:  J: H@:72 4: 2ET: N% d Rwb 9 (%59 HN 6 79wT9 N% 7 9 T9 N%  w7v N T5@@mp@@m wV  76>C/f 5 @5Cfe %& Z f ` C " wNeCf\ J%& l% F(yV"? 0  6 >  67 % $7 Ie e%(7>  &ڷַ7з> ^N& BF7C  %5!"BA  D & r&@rr @`   w& BAN   C 5 N & A-  A B A @ A-  A    w 7C  5!BAf  r@rr `  wBA  C& Z  \C >e \ ` &\Cfe %& Z Ne f\ ` \C . f ` !D 7 57 8N ` 5w%$\ 4 5fef %N H7 7 7\ rw7 7wN 5%U̻ E%U %EE UUE EE0U~7~%Efw]`T6 N% % 6 (%E6 (% fe %w7Nf %w7v N T5f %wb7P 5 @ @m  @ @mȋw.7N D %w 7 . 7 -8  w 75 !fe& %5 @%`w "  N @ h fe& %5 @   %%ަD_>\d#fT$ R !!  A @D DE5%E= 7vN %wn@ Df v 7DN %w<@ Df v @ DF v 7N %wNf@ D& %7N %fe@ D& %w%@ D @ D@E&  A @D DAEH@EE% @ DE 7@  xDN$FF >eN%F "% w@ D7$Nef."#T#$',%z%F&'(X)) (_>8#H !"""`$$^%%~/.$&2'(J5<)27)*4 ,,0--16678r82_>T%$%&"!&, &r%:##$T$$>&h&&l, ,.$ _>~    !P!%3!%V"X.2f2,,  5$ffEF >eG%NfVF >e@E5NffF >ef ` 5fuF >e%A@wuuNfF >e% 78@e55  @ A H wNFF >eu @@m/ NFF >e Ffe 0 @@m0fe ` 5feF >eNfeF >e 7N rw -$'|(F-v3+:33355^8r6f1@_>J2H,//& ''((4'r(+4 _>^:8)f&'(&%8*(=!9b'**85H:n=<27 _>:>>v0T?>/`>~>5^00849v86580`706?55"66/5L;.!P-$?* @ D(03417@@ @=  =wz7hj5  fF >e@e5u //5 @e5 =u.X Nef 0  fF >ew@@ =X ~#. %}7z F 5uN | wX 7BF wD72Ne   w( *7B_$FN H H F 6  HN %F  HN %G N@99j95 _>"<9d<<._>V&n&1^%p11%&$!(%$N#f#*0!+&2%H%"""".0 &$Z-,!r.j+-"#&0*<**_>1&2017R & ^ wL7:NfVE >e@ DcE^E >eN  . * fdE >eN tE  EE >e <  H p 5u@5@55 @ ȥ/u IG@G >e ff >e fJGff e $N HMGf  7& 7. _|#7   7 7  5-%w7f %7ȣȪOG >ew|7j vepf 0 =r fVG >eX w.75 5 5 _%}  @e@-* =  5Ȧ @   @EE@7| |0D  T`0 N%  wV7DNe Fu5 Ne Fu5 AWpuA-@w7 x5uNe L=w7&T& N%JT& N%8T& N%/w7 / wγp/E $!JT& N%5%  R @w67$ $/ Lwh /E UEE8T& N%w7 . w7 .&T& N%7(w%%Ef ~ A 1D@ DfE >e@ DE :@ D70NfE >eN   <(@ DEE >ew %Ef ~ A 1D@ DE : f f&f p%#  @ &D R @ DFE >e@ D7BN % w<% f' 8@ %D@ %D@ D @ 0 D7 N %w@ D @ Deum~ N 5@-5@ N \Gf %wb7P 55/ @w6 5`G @0  u@pu5 @@mH  %/@@m%  //7hN 5//@e |Gfe 0 @e57 ͐wwfef "% N @5 Zw 74@e5   =N (_(N . ,Nf 0 N T5`=wb7\wV7P7XwVN N N w7rhؕ(Ne & feH e HxH >e F 7H& &  Pe w hNe  Ne 7H%B  H H 5%; tHH X 5%( B$ RL Fֻ 0 H6Hֻ 0 & H e IH >e ֻI >e I >e < 5   f^S $e_&7 Nef  m/ =Nf@& "%Z=Nef  %M5@I f 6 51? -Nef 4 "Nef 0 Ne T@m5/N f@& "%ff % N Hw7 Gf % e  N T 5ƫ@m%N 0 ewm wP7> @ 5 *?w$ 7 55w?    uu}*  5f(I $ew7z  w$7w77wX R ’x& &  Pe& I e    0 ?ֻ  5$& ֻ"I xe ֻ& &  PeeTw NLF T%& ֻ&I 0e 6I& &  Pe@wl7Z $ Dj 7 T   & VIFI2& dIWI e ’IeI e II e ~xII fe w7uu 7L޴wִ86 Fw$ww`7N J- %^_!%^: &%7 N L-7 tN L_!%bfZ \ NTFe p D7 6@E5@E5    u% % @A@x5@-З Ɨ  -  - p |0w77 ^_" Z-R@e7@ @5  7r7lNe & fI 0e "=-8II e  II e JI e Бʑ!JJ e w7d fe 0 "J Neֻ ֻfe 0  ֻ#J >e fe)J >eֻ   wz w$7w7 7wNe :4@ * F $e 2ֻ F PeNe& &  Pe1JTN&  Peevw pnh v%& ֻ2J5 & - @5 @-@5 E5%@%_%?@A@x5u]  #% "%  eЙw ʙeʙw ęf  w n j@ 5 7 ? w7@  w7@  VGG >ewt 7^ GG >eGG >e  77$7  pG7#7  V 7xx L7 w-^XHG >e@ww- Te & fe:J :e F7v >J >e : w7 w7w7w4@ *X $e X Peew  %& EJ |e w7   e F54@ *fD $ewx7f4@ * * "SJZ $e7 & JUJ=J& Z $e& JJ e JJ e JJ re nhJJ65  @$`pGGH >e(H!H >eޔ0Ԕ8H)H76 #7 # w. ް p l5  Ne  %5ew ew  @E% " @E7X`ZTNHH9H >e8QHIH >e  wN 787 7 7 7 ̖7 ʖ wҖ7̖wƖ77ȖwƖ7  777& P Rw7 Ne & fRH be  Ve w7 4@ *J&  B $e 7D7>Ne & fJ e =-8JJ e ܍KJ e 1KK e LK2K e w72e =@&e p@e p@"@xp@e p@#   @&@Y@e0p@~@0  w*7N T5 @eZ7\% ZP@ @e5 27( 7 "h  w7@@m0N  N : & f =M e wT& f RM e 7$  w} @ A H pM >e   wM >e 7\77N7H |ݹ M >e7j4 . 57& 7l@wVfefe 6%5- fefe 6%5 5 5% M 0 E fefe 6%5 -J fefe >e=5 @@mAAH@@ @@mȭ_d' }-@@m fe[N >e5 0@@mAp@@moNgN >e@@m@@mv_d'@0 u-@@m0NfepN >eu- _'@ _+ xMNe He 5u_+ @N~N& >e@NN& >ef& Q Pe_d'Ne N5E?te 5@Ee 5 v@NN& >e@74@ @e7@ @@@x77@ @e 7 @ @#7@ -@7z% %@%`h%`Z v N %YD>&6%N.7 *@ @e7%%@ @7% %@ %`% 77  N w"7NMK >eb`KXK >eNiKaK >e<rKjK >e: 6%5 -2%T%Q%N7t B55 @p2 - BA12 @me" BA12 Ne BA12 @ B7zA12 u@  BA12 @02(  xM3 He  BA12 A3 N5@E?te  BA12 @E3 T5E ve N BA12  BA12 x BA12 @02@7Z2  J 7``w`^{KsK >e&K|K >eKK >e KK >e KK >e KK >e KK >e KK >ew7 KK >e & KK \e A b>_4 L 0@e:ֻ 0 ԈֻK >e &ֻ 5ֻL >e  w,7V LK >eֻ 5u & ֻ#L >eff4Lֻ ne ֻ& w X8 7`Vw`Tw N B2  2f @& Pewn7\ @ o s@EŀҘ e  m@Uw"@EAWtE@x5EAWtE@x5EA E@x5%op@5@AWt@P7 N N5E?t@mEw75  @E@55`@ @wT7B5 5 A ֗E@A@xE5A@vCp  xx5uA vCBxEuA@vCp  xx5u@  Pew w _ 37h :w| fEL >eSLKL >e 5aLTL >eNf   fbL >eNef  Nef  5nLfL >e  feoLsL& &  Pe& Lfe "e  feL >e _(47Lf L   LL >ew" fL >e  @e5 f Nfe 0  feL >e n 5@w7M& (Y $e4@ *w7rNf &Y $e4@ *wT7BM& N $ew67$ 5  d      be@-zr2  2d % Pe f F2  w7N :E $eM& &  Pewj7XN :ؒ@& $ew@7. :R $ew7wA r@}w7M  w7 55 5MM(Ne  W Nefe  Nfe 0  feL >eNe   feL >e& feL e _5Nef 0  fM_v57 w77wM&  w7 |7 v  v  n M& M& &  Pe 72 7> 7wv7d  (  %ֻ  MM >e& (MM e )M&  1M*M >e2M& &  Pe7 7w77 4|3M 0 r >eM4 T PeTw M >e5  @5@ % %QNNM >e5 NNN >eu@5 @ _ *h@e="NN >e@5 8@ _ * @e=,N#N >e@5 @ _ *@9N-N >eSIN@e5t@e=bFN:N >eNLNGN >eNZNMN% 7`\  7B_H.\_0  _H.\_0\_0^ R _._V. ,  _.\  _._V. H  _._V. \\   d R _. l _.  N 5\ 5]  _.N  _._V. p  r _. h_.   : %]  _._V. :_. _._V.     _._V. $_O` .Nk` . lo` .%7r `u` >e7 6%N T7`7 7z5% V5mL6ޭڭ` >eN`` >e@ O x^ N` . N 75  5 \}@w H dZ V` .N` . l` .%N` . 7 7L55V5%N  (5N`` >e`` >eN`` .7 l T ^  2 5]L W] >ej]& &  _4 fe % %w  z] >e  5f  ]x   <  ]  z7 ~   n 7 h ` ] z]& &  Pew7r=;fl %7`l@ A H>=w*7N lf %@@mw7 (=,= le^ . w77 =777w7>em4Na >e@ _+ x^@wt 4N Neff e5 _* x^ a . 7^a <4 EN /a . N N 743a >eNeff e5Ba >e% r    \R N 5_(%MaAWpAmAmj3uN]a . N  aa >e@_0)Neff e5%lAWpAmfoa .e%NN& >euuf NNNe T5E ve @5@E?te 5@Ee 5 $@NN& >e@NN& >e@NN& >euuu NN f @& Pe@_'7 N 5ON >e @wh @E5NO O >e7* %nw 7r 5%OO >eN,O&O >e zv^5 555 Z3@Ep?l h%b7w< w7 \u@=  wX7F%  Ni^ . w2Neff %5^^ >e   N^ .  = @7^^Neff %5N^ . N^N  N  }@wR7@ 57n;^v5% R5N 7D;N = m.;N^ >e@ _$ x]@w }@-?%;u-7 x59O-O >e   @p 5  N ~e5@0N:O >eNJO@O >e%!   u-A 7`pw`nw hA 7`Vw`Tw N w7 $5@!t@m O5% $ xVO 6 J ! H       7   C  G  [   | w @ȋ = __ >e N 5  N_ .  N_N 5u%%N<_% %N[_ Nu_ .N_ . N N 79     | 5_"N = 9e5* =  5 =  __L# __L# W-  .9e5_ . N   7_"_ .N|""V  F \< & ` 70 (  8 7 _. * & ` 7 pX R  _V._H.   7 _.X R  X X@ t_.X R  X\  _H.\ _V.\  _V.=\|  _H.T\b  _H.i\ {\& &  Pe_. Z|\& &  Pe _. 8 _H.}\  _H.\/7t_ . N8e5* =  5 =  __L# __L#` . |5    A 5 u V2` .l4` .%_$7*?wڵ  7 5779`5% 5N 77m7N:` >eNJ`G` >e@ 8 x] }@ȋ@NK` . N N 77 w    5   zE r5%w _1 %\_*2%  b f%  % _0䥷  fE  @E?ڇ և |. _*2 7 `. P?  fE  @E? ~TVP 7 .*%?5 \ fE  @E?8 4?  ? 7l_/% %  %%%_1%꼬b . 7 b-?   ZW .%   xcw 7p @ _' xT . . lNe("H %5] "f  !5fef % T ::%wN 0 Vxk >evup e5@ 5@wrwJ@ hNe x e5 >eNfF@ n% e5 \5w_V Ne ݌ e5fD@ t -ddN_*2b .?PL H% v:%6 X  > : H%b .? % b .? ܣ%֣ Σ ȣ7 ,_x0%%% ?lb .%)  fE  @E? &, % B >5 %4_. R  8 4b ._x070 5 % 䢷 ࢵ   ̢ Ȣ?Ģ¢@w7 7 +=     } ތg e5 V xLNe h5_!  7 _V  e5_.! 5@_2!w_V  e5_.! f5w_V ^@_B!" ._ ?>gΉ e5_! 5_.!w@_V IHf܉ e5_! 5_.!%W 7w_V oNLd e5_.! 5_2!w_V wvf e5_! Z5_.!w|T_V Ne| %5_.!N  * = *w7 @ w~͵ 7\ 5 @@ =  @w27 u=w 7b Fw7_5 @_5@_5*/ &_5 / &_5/ &_5|{ &_5{ &_5{ &_5{ &_5| &_5e| &_5| &_5. &_5b ,_5b ,_5b ,_5"c ,_5||a e5%@_5%@_5 \  5@_5N 2_5L. &_5B. &_5 _V %  0 ܍e e5_! " J r _% _% _.& _& ._R Ne ݍ e5ffe t%5_!% wf_!wZ_!Ne 1 e5ffe n%5_!% w_!w_!Ne b4 e5ffe t%5_!% w_!w_!Ne d e5ffe n%5_!% wH_!w@_!Ne Î exa ._)a .Na . 5 *2AWpAmf % AWpAmf  AWpAmN  u- jla .%_<*Na_|)74aa >e 725% w@ b .  $  5m1Na >e@  x$^6 2 b,b .l]b .%77( 7֏7Џw 7 5 p  -1+0 7r0-z||`n e5%@R%@K  5@=N 88| &32} &.} &)} &$~ &  5@~ .  ) xhc w_37 <  5@N  w 74   5@$5   @ @mȋ @ @m& v   w<7$_Z8%,c ,_V8 @_V8@_F86c ,_V8~  _V8  Y  _V8ro . _V8@c ,v0 n d Z -0w7vB0 :bb . wb7PN 5%w<5 "NAWpAmf  JNfAWpAmf % G G @ @-NfAWpAmf % 7@ = AWpAmANfAWpAmf % } AWpAmA@5 7>5 5 5 ubgb >e֦zbvb >eb{b >e b >e_*2 555 ._V8   _V8 g  _V8h  . \ T π .  .I  ہ  T  p ܂ % o  ^ ڃ  T  NA    @  S  υ  *  S  φ   .%   xcwN_z678_%\c ,T @N@C &FF &A| &<ȇ &7 &2j &- &( &# 2  5@  @w .%^ 5} 7n @wn%Nŏ . % 5} 7$8 _+@_+ xNe %5@_+Nf >e5@e5_*%ؖ"7Ζ Ŀ2fe %   f2 >e_*G .@% OE%? S .@e55)%    %% %} ƍ E 5% = ѓf eN N fړNfN ff铰N 7L4 _2@ _3 xNf f ff e 4  wf f "f eN T5@@mȥ @@mN(f %.N T5@@mȥ @@mf f f/f fN f f f9N T5@@mȥ @@mNfBf e_2N T5@@mȥ @@mf f ffIf e _2f f U   @e5~ f >effC e7$ _+Ne %5_(Ef  _+NeӐ %5_(ՐԐfD_+ Z  5_(ؐא֐Hn@ِ %5_(cXNe %5_(SNeA %5_(CBfU*Ne^D %5_(T_p*Ne_ %5_(fW e7w@ _( @  5_( ._27b . * 7j7h_!` >e %g@ %r8%c0 ( %s %r %v %v     < % %s̟ %vğ%r%x  X@ >7 6 @7 ,  h  , X   `wL5@ 5 $ _T eҚКʚ >eȥ- d7 5_%@a _% x ĞT x u h ~}|F 7 .w@f >eÑ‘f@& e7NRN T5   @ _/ xƊđ zN  @ 7^w^@m%Kő z7 ]Ƒ N @e7`]%N]ʑ z7 ]f fˑfe eNeב zJ xe]%N]ؑ z7 ~]ّ zep]e h]%Nb]ߑ z7 T] ze F]e>]%N8] z7 *] ze] z N @ f ff 0fe e Ne e7~ x vh b  L @  7z5̙e7™eȥ- ޗ   :  %  % % %7    < 4 ̘V >esb_" ZW @k eޘ ܘ ؘИȥ- r _"_"_" Rw@ |ev t%nfȥ-ɘ T`_"@ܘ 8e2Ne T7`\_,Y_,D f f `ev_,.|\ x\%N8 z7 f\@ _,9 z? :_-wm2\%N,\; zw\N _,< zN w[_,wm[%N[= zw[N z_,f ff >fe e _ -F_,7~P .C 6@ l 0W-, nfe %Ne& &  Pe& &  PeĒ& &  & &  Pew7   w 5 >e  0%*"ȥ-  0 &   75/ >e b@ %_"@6 e %ȥ-P  5 z%w@_"] _"J_"B_":_"s _"@} e %ȥ- 5e  x|@7_"7 _"7 _" _#7 5b @w7N "%& f 2e  w7n 05ffe t%5_!% w_!w_!Ne Ŏ e5ffe n%5_!% w_!w_!0J$ %Ne [ e5_! D  5_!N z5 N\ . _V w62z .%_V 5_.!7b@ r y@wV  7 K  , X   `  7@ e5  R5} @w7N >e_1 _$1 _D1& &  Pe   5E & &  Pe& &  Pe !(& &  Pe-&  Pe:&  PeGP &  PeTB &  Pea$ & t& &  PeJ_0& &  Pe(_0& &  Pe _/70 l _1@ _@2 xN fff el  wN œf %Nʓf %ГN f N "e& f e wB70ʛ .% 8 p7*(?$  0 /  Z  Z  ~ 7ޘ 7 ֘  >e ) & 0   ~ 7 7    # >e nwF74 :$ >e w"7  T ; .7 Ŀ Ŀ   %ޗ%֗=ė Ŀf % _)  %{_+N _*7"7Nefe e5 %_,_+|N 0 N >e? p@ %5 _, 25_, | >ej  b >esH :_-_* 5_,x& _-_*dn e5%_+ _,N b_*NebD % _`+  5Kc  5u@5@55 @ ȥ/u  kff e= @ ~ zH@\  *& @7  8L jblʔ e5{k >eN  & xF ܗ | %Ζ   Ŀ   7 L_' 8 8wp7^  B 0 6  `  l  ՜ >e7^7   7z7   77   &  je 77 d N $w7 N T5e =Nf 0 @@m  fnff e $+  5  5 5@-%N  N   _*rq: e5_, 2  5_+@ < xV _*@ } .%b . \VBa* .espj .eN| w .%_*¡_* 5_,:_+ x5_,ס . ve be~x Nenh? :e _ . } .   . .  wp7^} =Nf  5f  5 f    >egw7.@ -_5 xZ  .  . w@ 5_, N)('L e7: 5_, Nej* % N | N :hB fiVj e5%j . k J5@@ = xN f77 V _* H_*7 7 6 ._*7"7 _*_*%|Ƣ_+Nefe e5 %_+_+ _+N 0 j5_+L ~  1Ŀ_*N :S .  q >e Š_* . _+7   .% 0  .5 *AWp- f AWpNd .  m' o! s$ . #) - vң . eݣ  . . ^  . .%F#, .  0*1 . 4 .   ӝ_*787 N . _*Ne( %5 N 5 :5@_*NeF) %5NH e_+NedN %5Ne 5%  5 >i_*F_&+ _*n@Ԟ %5%%9%DF> Ŀd % ՞   Ŀ %   r| n_*R_*f(fe   n  B . F . L .   X .%   .%   .%t & &Τ .eZ x & & .eL + . < .O . p _j .s . V  . . <  . . "  .եå . ݥ . .  .  . .  .  . . P' . * ./ . n@ . C .H .w7@ , xNefK `n@Q: %5R >e% Ne _, Y .Ne _* 0 f   p@ %5%_,%Ne _-Vfʔ e5 _*Ɵf e5%ǟ_+ _,N _*Ne %5_,N _*p@0 %5%_,%_,1 >e *5_,vx j_-_* \>_+z]f e5%%5&@wfNepNeNeզN . N 0  p5@  xN 7 N  5N 0 7,@7R N  5NP 0 7$@7 N  70N 0 &  e    JeNe & f e 7̆_>87  N  7l.N 0   >e "| >eNe  #f%% `  % r ~ @@& V @  |  @ R @@@& V @  | , R @N @ N@& %@ V %   z V5  0 _( 0 0 A-%_l# O_b# _r# E 5  K%_l# _( _x'5  EA1@    %d@0 _(@e X .z b@ %  % :wn .%7Ȫ @ V/ Z ذ . &  e      5 _J >:7 6 4 . &> 5 ȥ-  :  ȥ-N  M .& pc ^e _-   2 N  4 .& LA e _-7@ _z/@@@x >e7w`7N ~ wJ78< 'i . . @e5קf %Ne :_2< ~ %xvb@ % T .%JF & .%/ .f . *P .   r  zҨ   5 @5a h E  : E5 / ,N  %N  7 x E5-Z B V% :7   f ^    . _( x _( V _$      & 3 _(_(: B _(M U _(` c h _(p x _(   wr 5 , :f ^ bEN  N  5%Xf  57 vpŀX fw-`Xf  xNX %7 & F  5  zE@w7n %  @A@xNf %@w:7( ŀ@-@ B5 N Vw@@ 5@ r y67 T  < 7 <"E dJNT 55    1 G_V& E5 &  50@ _% E5AB_V&135 %r ~ > .   _"7R ~ wN7<7 J5 %,@0 p*-"~_* 5 r y@ _*@ _*@ _*@_*@?_*@~_*@'_*@"_*@_*l_*@0Z RwF  !  4      1 9%    7& %&  }B } e m o sY  a P o z_=7lr ~ wh7Vr ~ wR7@ @ VN R w,7 E!@ w7N T5N T@5@@mHNffNm % w  7 @j  ^  wz7hH5   ._"=  _@e5& ( *@_*@E5 "@t E@P5 @t ʮƮE@P5@pT  ! &@ E _( $_( %_( &_( 'dZ% JFE7D: *,Wp ŸE`w@ ׵ _j(7: 5 T5%e5`f f Re  &   &e w|55 @@m0 %   h OJ @ >f %Ne :_"b@ %  5LN T5uou@5H }@5l N, .eN .  . * )  r h5H @  xs . w .ײ@W  ֔@E&  î@E? ɮ  7v  7f%   @ @ & #3 T  _$ T_$J5 @@mAAmp @ @- EAAm1Ne T%*@@m V/fe Z Nfe %  77  @  & fe  e v :_ +7L5 5 T5& ; e    h A @M   B V/Q   >#  @ B= N   U @  @wb, R7FwN& WF ̋ ~w"7D \ ^3! Vwff@U@f@A)w΅f@7D  fE  w@E<EE 7tD %3 3s  Ksp$ a& f e  w  r+Հwf/7D 5 0 "Wp C0` +  x   w| 7dDCB 5 Ԕ @wH76D %@ w7 rE% b -\V  R DN   wN3 5$  %`@& f e5ޖ`ؖۖ $ʖ Ȗ @  `  D %7DCB  w| 7fD  ND @ e-  $&& %4 E %  4 E%    -  D  L H %?`@u@& ff e5B ` $  @  ` @ %wl 5$N T5Nf& %@fy"w$ 7D  Lt!%  A~tep$ Wte te ep$ < @ 4 wtf@7V x 6& ~ 7xx w>7, w7 5 f e     Ne 5@-%    %@w@fwd@e7\,Xwf@fw7> fw }7Dڣ  & # w 7vDC ԥ==̋ wZf BR70 jff #%w&7D ff #%w7D _$ _$_$ r) w_ U"@q_/@u %w7 @e5ff % Їw7 @55@e5Neff %=wfwRxw fw|w<|̋ 7.| ,|e 5 e*f ff e 5u ee5  = A@_Bw JU5   5 5  5     U &  C ~CB5W-o0ʋW-x0 ʋ x5ʕX05-eW-da5+Z5V S v r@ r ! f e0 9e'5e= !ApӋC~ @ AB f5wHBA 5u`u` u`ff`Nw҅fwRmNJVw>wm8fw(Vwxw r@@AZZ &~ ##BBC-Kermit, 4C(053)+1 21 Jun 85C-Kermit Server Commands Supported: GET filespec REMOTE CWD [directory] REMOTE SPACE [directory] SEND filespec REMOTE DIRECTORY [filespec] REMOTE HOST command FINISH REMOTE DELETE filespec REMOTE WHO [user] REMOTE HELP REMOTE TYPE filespec BYE C-Kermit server starting. R &ew5  @0   Wp ` e0eӕ?7ZDCB@ N   @ ȕ N E&  @ @ EH @ N   @ ȕ w7 e-*w7D w   H  4 44  7,D4  w$   -  7D E%B: 0#$^@E<EE eturn to your local machine by typing its escape sequence for closing the connection, and issue further commands from there. To shut down the C-Kermit server, issue the FINISH or BYE command and then reconnect. BBBB Unix tty I/O, 4C(029)+1, 26 Jun 85 AT&T System III/System V/dev/ttyttopen/dev/tty Same as CTTNAM ttyname(0) ttyname ctermid ttynameExclusive access to %s denied Access denied by lockttopen, ttyfd lcl lock file/usr/spool/uu% @EE@E54 fe& %% ) %"E%E%    -  D  wD   @EE&  @EE< 7DD  $4 $  @   & %  wR 7 ,e !e vu@t 5 r $ rf5`5` @5e vu@t 5NeR  u-@E%  u- HRwt & & e  H 7@DCԔw:fwww,w$ޅf@w4w fww|8w 7DCԋ Ԕw75 uDC5 5 5  % _) @wnك e@-U +U U  #U 0U  `u5 U5  . >u5 u-u @  A Z@me@ u%| | ,%|N ,% 2B:@m@e &e U?rU?_/ a7 ?ުU 7!ڪΪҪe_f/7DE -w7C5  5N D-wA vuA-u@ f& >% @ ` ݂@ ` ` f@w2 7NeTf N%  w7DCB 5Ԕ @wfwnwjwf25 Jun 85putfil zchout write error, setting czseengetpkt, entering with next tgetpkt exact fitgetpkt leftover osizegetpkt eof/eotcanned: cxseen czseenTransaction beginsTransaction beginssinit: sndsrcToo many filesFile not foundFile not foundNo readable file to sendNo readable file to sendstdinSending fromsinit: nfils filnam cmdstrReceiving asFailure to openCan't open file *** Discarding end of file file characters communication line in communication%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% line out End of transaction files total file characters communication line in communication line out sfile pktnamSending assxpackSending from:D *** interrupted, sending discard request end of file file characters communication line in communication line out End of transaction files total file characters communication line in communication line out spar: data spsiz timint npad padch eol ctlq ebq ebqflg chklen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%%%%%%%%%%%%%%%%%!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%rptq rptflggnfile: czseenTransaction cancelledgnfile: cmlist filnamgnfile cmlist: nfilsgnfile znext: filnamgnfile skipping:not sent, reasonopeni sndsrc file number ok zopeni okCan't open filecould not be opened openi failedopeno: name open cancelledopeno: xname exists, new name openo failedFailure to openopeno ok, name2DiscardedDiscardedClosedhelp textChanged directory toFailed to change directory tosyscmdsyscmd zopeni oksyscmd zopeni failed"("`",**&+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%%%%%%%%%%%%%%%%%"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%%%%%%%%%%%%%%%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Timed out.User typed ^Crpack: inlinrpack: inlin ok, recpktentering rpack with irpack starting at i pkt lenrpack: nrpack: typerpack: bctu pbl data length packet chk chk[j] chk array, jrpack: chk should be xchk[0]= xchk[1]= bct2's don't compare xchk[0]= xchk[1]= xchk[2]= bct3's don't compareinchr ttinc after parityinlin: speed maxtinlin inchrinlin timeouts[[<.b.z....../:/^//// 0&0<0X0t00000.1L1T1p111111N2x2222%%%%   %%%% unredirected stdinr zopenizopeni zopeno fp[]=stdoutwzopeno can't open fp[n] chkfn: file number out of range?File number out of range - %d zchki stat failszchki skipping:zchki stat ok: access failed: access ok: length i./zchko access failed:zchko access ok:zltor name2HOMEHOME/bin/sh/dev/nulltrouble duping stdout in routine zxcmd trouble duping stderr in routine zxcmd zxcmd...-crzxpandznext~%dmalloc fails in splitpath()././GC-Kermit functions, 4C(041)+1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Wart Versi`5j5~5t5~5~5~53\46.866.866.86 7.8.8.8.8 7.8.8.8.87.87.8.8.8.87.8.8v787888888888888888888 Usage: kermit [-x arg [-x arg]...[-yyy]..]] x is an option that requires an argument, y an option with no argument: actions (* options also require -l and -b) -- -s file(s) send (use '-s -' to send from stdin) -r receive -k receive to stdout * -g file(s) get remote file(s) from server (quote wildcards) -a name aon 1A(003) 27 May 85C-Kermit Protocol Module 4C(026), 12 Jun 85User cancelled transactionCan't do system commandUnimplemented server functionCan't change directoryCan't list directoryCan't remove fileCan't send helpCan't type fileCan't check spaceCan't do who commandUnimplemented generic server functionCan't open fileXZCan't execute commandCan't open fileCan't open fileSorry, you must 'set speed' firstproto ttopen localCan't open lineproto ttopen localCan't condition lineEnteringlternate name, used with -s, -r, -g -x enter server mode * -f finish remote server * -c connect before transaction * -n connect after transaction -h help - print this message settings -- -l line communication line device -b baud line speed, e.g. 1200 -i binary file or Unix-to-Unix -p x parity, x is one of e,o,m,s,n -t line turnaround handshak server mode on C-Kermit server done6^N[^"$""""#$&&&&r&r&&&(h(((' ((6(t)),)+,),)4)4))*+,++,+,Z,Unix cmd package V1A(021), 19 Jun 85Command? %scmnum: illegal radix - %d cmnum: cmfld ?not a number - %s Output file ?Wildcards not allowed - %s ?Write permission denied - %s cmifi: getwd *wild ?No files match - %s ?Too many files match - %s ?Read permission denied - %s ?File not readable - %s ?File not found - %s %s ?No files match - %s ?Te = xon, half duplex -w don't write over preexisting files -q be quiet during file transfer -d log debugging info to debug.log If no action command is included, enter interactive dialog. Type ? for a list of commands, type 'help x' for any command x. While typing commands, use the following special characters: DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed. CTRL-W: Delete the most recent word typed. CTRL-U: Delete the cuoo many files match - %s %s Input file specification %s ?No files match - %s ?Too many file match - %s , one of the following: %s%scmfld: getwd x%s Please complete this field %s %s%scmtxt, cmflgscmtxt: getwd x%s Text string %s %s%s ?Unexpected return code from getwd() - %d cmkey: table length cmflgs zzcmkey: getwd ?Ambiguous - %s ?Invalid - %s %s cmkey: defaultcmkey: esc ?Invalid - %s %s cmkey: addbuf %s %s%s ?Invalid One of the following: %s, one of therrent line. CTRL-R: Redisplay the current line. ? (question mark) display help on the current command or field. ESC (Escape or Altmode) Attempt to complete the current field. \ (backslash) include the following character literally. From system level, type 'kermit -h' to get help about command line args. Shut down and log out a remote Kermit serverClose one of the following logs: session, transaction, packet, debugging -- 'help log' for further info.Connect to a remote system via t following: %s%s %d - Unexpected return code from getwd cmcfm: cmflgscmcfm: getwd?Not confirmed - %s ?Not confirmed - %s Type a carriage return to confirm the command %s%s %s getwd: cmdbuf bp pp cmdbufclear     %s%s ?Buffer full d"dQddd e(eOeeee fPfffffgKg~ggg+h`hhhigjjj kkklm3n4nJnnnnoeooo9p{pp qTqqqr$rkrlrs}s~sXtt"uhuuuu"vlvvvvvDwwwwAxxxx yOyyyzzbzzz?{{{3~533~53~534~54 4,484D4~5~5P4~5~5~5~5~5~5 4h4t4~5444L5V5he tty device given in the most recent 'set line' commandFormat: 'get filespec'. Tell the remote Kermit server to send the named files. If filespec is omitted, then you are prompted for the remote and local filenames separately.Record information in a log file: debugging Debugging information, to help track down (default debug.log) bugs in the C-Kermit program. packets Kermit packets, to help track down protocol problems. (packet.log) session Terminal ; type 'help set ?' to see what's available. Type of packet block check to be used for error detection, 1, 2, or 3. Type 1 is standard, and catches most errors. Types 2 and 3 specify more rigorous checking at the cost of higher overhead. Not all Kermit programs support types 2 and 3. set file: names, type, warning, display. 'names' are normally 'converted', which means file names are converted to 'common form' during transmission; 'literal' means use filenames literally (useful between like sy', normally 28 (Control-\) Type of flow control to be used. Choices are 'xon/xoff' and 'none'.normally xon/xoff.Decimal ASCII value for character to use for half duplex line turnaroundhandshake. Normally, handshaking is not done.Device name of communication line to use. Normally %s. If you set the line to other than %s, then Kermit will be in 'local' mode; 'set line' will reset Kermit to remote mode. If the line has a modem, and if the modem-dialer is set to direct, thiscommand causes waiting fosession, during CONNECT command. (session.log) transactions Names and statistics about files transferred. (transact.log) Syntax: script text Login to a remote system using the text provided. The login script is intended to operate similarly to uucp "L.sys" entries. A login script is a sequence of the form: expect send [expect send] . . . where 'expect' is a prompt or message to be issued by the remote site, and 'send' is the names, numbers, etc, to return. The send may also be tstems). 'type' is normally 'text', in which conversion is done between Unix newlines and CRLF line delimiters; 'binary' means to do no conversion. Use 'binary' for executable programs or binary data. 'warning' is 'on' or 'off', normally off. When off, incoming files will overwrite existing files of the same name. When on, new names will be given to incoming files whose names are the same as existing files. 'display' is normally 'on', causing file transfer progress to be displayed on your screenhe keyword EOT, to send control-d, or BREAK, to send a break. Letters in send may be prefixed by ~ to send special characters. These are: ~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don't append a return, and ~o[o[o]] for octal of a character. As with some uucp systems, sent strings are followed by ~r unless they end with ~c. Only the last 7 characters in each expect are matched. A null expect, e.g. ~0 or two adjacent dashes, causes a short delay. If you expect that a sequence when in local mode. 'set display off' is useful for allowing file transfers to proceed in the background. The 'remote' command is used to send file management instructions to a remote Kermit server. There should already be a Kermit running in server mode on the other end of the currently selected line. Type 'remote ?' to see a list of available remote commands. Type 'help remote x' to get further information about a particular remote command 'x'. Change Working Directory, equivalent to Unix 'might not arrive, as with uucp, conditional sequences may be expressed in the form: -send-expect[-send-expect[...]] where dashed sequences are followed as long as previous expects fail. Format: 'receive [filespec]'. Wait for a file to arrive from the other Kermit, which must be given a 'send' command. If the optional filespec is given, the (first) incoming file will be stored under that name, otherwise it will be stored under the name it arrives with.Format: 'send file1 [file2]'. File1 may concd' commandDelete a local file or filesDial a number using modem autodialerDisplay a directory of local filesDisplay the rest of the command on the terminal, useful in command files.Exit from the Kermit program, closing any open logs.Tell the remote Kermit server to shut down without logging out.Remote commandParameterIssue a command to the Unix shell (space required after '!')Display current values of 'set' parameters; 'show version' will display program version information for each of the C-Ketain wildcard characters '*' or '?'. If no wildcards, then file2 may be used to specify the name file1 is sent under; if file2 is omitted, file1 is sent under its own name.Enter server mode on the currently selected line. All further commands will be taken in packet form from the other Kermit program.The 'set' command is used to establish various communication or file parameters. The 'show' command can be used to display the values of 'set' parameters. Help is available for each individual parameterrmit modules.Display disk usage in current device, directoryDisplay statistics about most recent file transferTake Kermit commands from the named file. Kermit command files may themselves contain 'take' commands, up to a reasonable depth of nesting.Not available yet - %s Number of seconds to wait before sending first packet after 'send' command.During 'connect': 'full' means remote host echoes, 'half' means this programdoes its own echoing.%sDecimal ASCII value for escape character during 'connectlisting of the named file(s).Ask remote Kermit server to tell you what services it provides.Send a command to the remote system in its own command language through the remote Kermit server.Ask the remote Kermit server to tell you about its disk space.Ask the remote Kermit server to type the named file(s) on your screen.Ask the remote Kermit server to list who's logged in, or to give information about the specified user.%snot working yet - %s   %-cation required rfilop=> , Size: %ld [OK] [discarded] [interrupted]Skipping *** screen() called with bad status ***%s: %ld%s: %ld*** screen() called with bad object ***Type escape (%s) followed by:CTRL-F to cancel file, CTRL-R to resend current packetCTRL-B to cancel batch, CTRL-A for status report: conchk^A Status report: file type: binarytext file number characters block check compression 8th-bit prefixing^B - Cancelling Batch ^F - Cancelling File ^R - Rese;IW_ow|  eŋmʋϋoӋsً݋D""""!>!H!!F !!'"#'''F Z 'F F F #'#''''f$'F T###R''(N*~***++++++*++"++R+x+$-N-x--,,,---.d.j.|.....111122 2.2v2222<3J3\33123fullhalfdisplaynamestypewarningend-of-packetpacket-lengthpad-characterpaddingstart-of-packettimeoutnonexon/xoffbellcresclfnonexoffxonconvertending [Ignored] %s%s%c =%d [%s] [%s]=%d %s=%d %s[%s] %s[%s]=%d ?Invalid format for debug() - %d %s %ld %s %ld [%s] [%s] %ld %s: %ld %s %s %s %s: %ld ?Invalid format for tlog() - %ld Ɩ%%%%%%%%%%%%%%%#$#*%%"Z## %%R"$%#%6% %<"h"%%%%! "('1 6 ; B FKOTV^eg)nsz~ !"$Ś֚ۚ r a carrier detect (e.g. on a hayes type modem).This can be used to wait for incoming calls.To use the modem to dial out, first set modem-dialer (e.g., to hayes), thenset line, next issue the dial command, and finally connect.Type of modem for dialing remote connections. Needed to indicate modem canbe commanded to dial without 'carrier detect' from modem. Many recentlymanufactured modems use 'hayes' protocol. Type 'set modem ?' to see whattypes of modems are supported by this program.Parity to usdliteralbinarytextevenmarknoneoddspaceoffon...Use 'set send' or 'set receive' instead. Type 'help set send' or 'help set receive' for more info. Device nameSorry, can't open lineset line 1Number of seconds before starting to send5XYDELA: yfullDecimal ASCII code for escape characterFile parameterhow to handle filenamesconvertedtype of filetext?unexpected file parameter xon/xoffnonetype of modem, direct means nonedirectnoneProgram's command promptC-Kermit>Parameter fe during terminal connection and file transfer:even, odd, mark, space, or none. Normally none.Prompt string for this program, normally 'C-Kermit>'.Communication line speed for external tty line specified in most recent'set line' command. Any of the common baud rates: 0, 110, 150, 300, 600, 1200, 1800, 2400, 4800, 9600.Specify parameters for inbound packets:End-Of-Packet (ASCII value), Packet-Length (94 or less),Padding (amount, 94 or less), Pad-Character (ASCII value),Start-Of-Packet (ASCII valueor inbound packetsParameter for outbound packetsDecimal ASCII code for packet terminator0Maximum number of characters in a packet90Decimal ASCII code for packet-start character1How many padding characters for inbound packets0Decimal ASCII code for inbound pad character0Interpacket timeout interval5 Speed setting can only be done on an external line You must 'set line' before issuing this command Baud rate for %s?Unsupported line speed - %d %s: %d baud Not working yet - %s onsetnum ), and Timeout (94 seconds or less),all specified as decimal numbers.Specify parameters for outbound packets:End-Of-Packet (ASCII value), Packet-Length (94 or less),Padding (amount, 94 or less), Pad-Character (ASCII value),Start-Of-Packet (ASCII value), and Timeout (94 seconds or less),all specified as decimal numbers.%sNot available yet - %s Ask remote Kermit server to change its working directory.Ask remote Kermit server to delete the named file(s).Ask remote Kermit server to provide directory ?Sorry, 94 is the maximum ?Not in ASCII control range - %d Remote directory nameXZCWD: take file ends prematurely in 'remote cwd' pswd from take file Password: ? Password of remote directory Password: passwordName of remote file(s) to deleteRemote directory or file specificationCommand for remote systemRemote file(s) to print on remote printerConfirm, or remote directory nameRemote file specificationRemote user name, or carriage returnnot working yet - %s ?File specifilid parityinvalid argument, type 'kermit -h' for help Fatal: %s Fatal: %s - %s Error -!byeccloseconnectcwddialdirectoryechoexitfinishgethelplogquitrreceiveremotesscriptsendserversetshowspacestatisticstakebaudblock-checkdelayduplexend-of-packetescape-characterfileflow-controlhandshakelinemodem-dialerpacket-lengthpad-characterpaddingparitypromptreceivesendspeedstart-of-packettimeoutcwddeletedirectoryhelphostspacetypewhodebuggingpacketssessiont mode: localremote, modem-dialer: %s Parity: evenoddmarkspacenoneinvalid - %d, duplex: half, full, flow: xon/xoffnone%d, handshake: %d none Delay: %d Send timeout: %d, receive timeout: %d Send padding: %d, pad character: %d Receive padding: %d pad character: %d Send Packet start: %d, end: %d, length: %d Receive Packet start: %d, end: %d, length: %d Block check: %d File parameters: Names: converted literal Type: binary text Warning: on off ransactionsparametersversions%s,%s Type ? for help C-Kermit> /.kermrcrinit file.kermrcrinit fileno init fileterminal interrupt... Command too long for internal bufferCommandtop-level cmkeyKermit command error in background executionKermit command error: take file terminated.Debug Log ClosedTransaction Log Closedsetgen You have to 'set line' first Name of local directory, or carriage returnWhich log to close?You must tell which log ?Debugging log wasn't open ?Packet lo Display: off on Init File: %s.kermrc Logs: Debugging: %snone Packets: %snone Session: %snone Transactions: %snone Name of debugging log filedebug.logName of packet log filepacket.logName of session log filesession.logName of transaction log filetransact.log ?Unexpected log designator - %d Transaction Log:Debug Log :Bcyɩ>H>Connect Command for Unix, V4C(012)+2 27 Jun 85Sorry, you must 'set line' first Sorry, you must 'set speed' firg wasn't open ?Session log wasn't open ?Transaction log wasn't open ?Unexpected log designator - %ld Number to be dialedDirectory/file specification.%s %sMaterial to be echoed%s You have to 'set line' first You have to 'set line' first Name of remote file(s), or carriage returntake file ends prematurely in 'get'take file ends prematurely in 'get' Remote file specification: Name of remote file(s) cmtxt(cancelled) Local name to store it under: Local file name(cancelled) C-Kermst Your escape character is not ASCII - %d Sorry, can't open %sConnecting thru %s, speed %d. The escape character is %s (%d). Type the escape character followed by C to get back, or followed by ? to see other options. (Session logged to %s.) Sorry, can't condition console terminal Sorry, Can't condition communication line Can't send character[Back at Local System] Can't get character C to close the connection, or: B to send a BREAK H to hang up the phone S for status 0 (/6 >CIYaelv{()((+,,8,3 3****+5+4+5H+55,5,--B- /550/555555-/05F021T112|335@4555f,p/ 8B8R8b888869User Interface 4C(048)+, 26 Jun 85xargvaction-l and -b required-a without -s, -r, or -gunredirected -k can only be used in local modeconflicting actionsconflicting actionsconflicting actionsconflicting actionsconit commandhelpWhat to log?You must specify what is to be logged Text of login scriptName under which to store the file, or CRcmofi cmarg2 You have to 'set line' first Remote Kermit server command?You must specify a command for the remote server File(s) to send?A file specification is required Send: wildName to send it withSending: as:Parameter?You must specify a parameter to set Unix shell command to execute/bin/sh-i-cparameters Versions: %s %s %s %s %s %s for%s flicting actionsinvalid argument bundling after -s-missing filename for -s-s: too many -'sinvalid mixture of filenames and '-' in -ssending from terminal not allowedconflicting actionsinvalid argument bundling after -gmissing filename for -ginvalid argument bundling after -amissing name in -ainvalid argument bundling after -lcommunication line device name missing/dev/ttylocalinvalid argument bundlingmissing baudunsupported baud ratedebug.loginvalid argument bundlingmissing parityinva%s for%s %s %s %s Nothing to show... Most recent transaction -- files: %ld total file characters : %ld communication line in : %ld communication line out : %ld block check type used : %d compression : yes no 8th bit prefixing : yes no ?Take files nested too deeply C-Kermit command file?A file specification is required ?Wildcards not allowed in command file name rtakeCan't open command file - %s Failure to openNot available - %s Line: %s, speed: %d, |""""%(%%`&&&'(&2'Dial Command, V2.0(007) 28 Jun 85BbPpTt XYR D '%s' =%s=%s#=W%s!% $D :T%s ,AT AT DT %s >k :%s Kk *D ?%s %s ,ATS2=01 OK ATTD%s % $cermetekdf03-acdf100-seriesdf200-seriesdirectgendatacommhayespenrilracalvadicunknownusrobotics-212aventelSorry, you must 'set modem' first Sorry, you must 'set line' first Sorry, you must 'set speed' first Sorry, can't open %sDialing thru %s, sprotocol driver not attachedNo CSI structure availableLevel 2 halted ((((( H /bin/shsh-c;0 !/dev/F(d(o0(x)f)e)gt)cz)s(lV(u)r'h(null)00eed %d, number %s. The timeout for completing the call is %d seconds. Type the interrupt character to abort the dialing. Sorry, Can't hang up tty line Sorry, Can't condition communication line No connection made within the allotted time. Dialing interrupted. Failed (""). Cannot initialize modem. No ConnectionAU 1 AttachedBusyDisconnectedErrorNo answerNo dial toneSpeed:ON LINENO CONNECTCONNECTNO CARRIEROKBUSYNO RINGON LINEFAILED CALLONLINE!BUSYDEAD PHONECall completed"86~`crt0.oexitiotcmap>CMSIZEcm_stk`ckcmai.o2~main2argcargvckutio.o. b))*Script Command, V2.0(006)+1 26 Jun 85expecting sequencegot it (null sequence)received sequence: returning with got-it codesending sequence EOTBREAKSorry, you must 'set line' first Sorry, you must 'set speed' first Sorry, can't open %sExecuting script thru %s, speed %d. The logon string is: %s Logon command string: Sorry, Can't condition communication line Logged on! Logged on!Sorry, logon failed Logon failed^%c%c +/dev/ttyPF_brnulsB_sjbuf_jjbuf_lkfB_conifB_cgmfB_xlocalB_ttyfdB_escchr_kerldB_ttold_ttraw_tttvt_ccold&_ccraw8_cccbrkJ_flfnam\_hasLockB_inbufcB_ungotnB_conescB_ttnmsv~ttopenttnamelclmodemxcname_ttlock ~ttclos,_ttunlck ~tthangdttc_save~ttres_xxlast ~xxlast sci_look4lk` ~look4lk` ttnamedeviceM:/ESTEDTDay Mon 00 00:00:00 1900 SunMonTueWedThuFriSatJanFebMarAprMayJunJulAugSepOctNovDecTZ77 7%/etc/passwdrr<<ZsƵ-Error 0Not ownerNo such file or directoryNo such processInterrupted system callI/O errorNo such device or addressArg list too longExec format errorBad file numberNo child processesNo more processesNot enough spacePermission ddevnamelockfillockdirlckcmd~ttlock ttyfdlck_fill4lpid_buf~ttunlck ~ttpkt speedflows~ttvt speedflows~ttsspd speedsspdok~ttflui ~timerh"~esctrp8~conintTf~connoi~myreadinbuf_itinbufreadit~myunrdch~ttchkxn~ttxinnbufx~ttols to send a null ? for help escape character twice to send the escape character. Command> CTRL-%c'%c' Connected thru , speed %d, evenoddspacemark parity, logging to Ϋ  !$&'() -/2479#>@DEFG2QR,UWZ\#`c2fhkmqrstuvz|,rª֪&:ìЬ׬   eniedBad addressBlock device requiredDevice busyFile existsCross-device linkNo such deviceNot a directoryIs a directoryInvalid argumentFile table overflowToo many open filesNot a typewriterText file busyFile too largeNo space left on deviceIllegal seekRead-only file systemToo many linksBroken pipeArgument out of domainResult too largeNo message of desired typeIdentifier removedChannel number out of rangeLevel 2 not synchronizedLevel 3 haltedLevel 3 resetLink number out of rangePnx~ttocVc~ttinl~destmaxtimoeol xyc~ttinctimonch~ttsndbxspd~msleepRmt1t2tarrayt3~ztimesclock_st~congm~concb escx~conbinresc~conres~conocc~conxoxs~conol sG~canned$buf~tinit^%~rinit%dtp~sinit$&xtpxname~sipkt'x~rcvfil(x~reof<)~reot)tp~sfile*pktnam~sxpack ,~sdata,len~seof0-~seot-tp~rpar.data~spar~/datalenx~sdebu1len~gnfile2xy~openi4namexfilnoxname~openoJ5nalen~conolaFsi~conollzs~conchkxn~coninctimonchckufio.o_pid_fcount_mtchs_mtchptr~zkselfD~zopeni\nname~zopenofnname~zcloseTn~zchinnca~zsout ns~zsoutlRns~zsoutxnsx~zchoutnmename2xnamexp~opent6~clsif6~clsof27~sndhlp7~cwd8vdir~syscmdr8prefixsuffixcpckcfn2.o,C~input, lennumtypenumtry~spack"!typenumlendat ij~dopar:#chab~chk1#pktchk~chk2$pktchkp~chk3T$scqcrcc~chkfnn~zchkinamebufxy~zchko nameixssp~zdelet!name~zrtol!namename2~zltor."namename2workcpppdc~zchdir#dirnamhd~zhomeT#~zxcmdd#comandpipesshpathshnameshptrpdefShel~zclosf$wstat~zxpand$fn~z~ack$~ack1$%s~nackT%~resendr%w~errpkt&reason~scmd>&tdat~srinith&~nxtpkt&num~sigint&~rpack&lndatijxdonepstartpblchkxchkttype~inchr ,timoc~inlinl,ijkmaxteckcpro.oQ_vstatePO_vcmdRO_xb~wartnext,%fn~znewnz%fnsbufbpxplenndtmax_sspace_freeptr_resptr_remlen_numfnd~splitpaF&pheadcurprvi~fgen'patresarrylenheadscratchsptr~travers'plsofarendcurfddir_entrdirbufstatbufeos~addresu(strl.cactnoxs~proto2xckucmd.o$W_bpd_ppf_nph~cmsetp$ ssxsy~cmsavp~ sn~prompt ~cmres ~cmini d~stripq!st~cmnumP!xhlpxdefradixn xs~cmofi!xhlpxdefxpxs~cmifiV"xhlpxdefxpwild i~iswildX)strc~match)patternstringpsavessaveckcfns.o*_memptr_cmdstr_sndsrcZ_memstr\_t^_next`~encstr smp~encodeH aa7b8~decode!buffnaa7b8~putsrv"c~puttrm"c~putfil"c~getpkt8#maxsizeileftoverG~getch`$xabxxcysp~chkwld%s~cmfld%xhlpxdefxpxxc~cmtxt$'xhlpxdefxpxxcj~cmkey|(tablenxhlpxdef iyzzzxcxp~cmcfm+xxc~clrhlp,~addhlp,sj~dmphlp -~lookupF-tablecmdnxn9stpckucon.o_env_con~conn_inH:~conect^:pidparent_incerrmsgerp~hconne@_turnch#@@_duplex#B@_escape#D@_delay#F@_mdmtyp#H@_filcnt$D_flci$H_flco$L_tlci$P_tlco$T_ffc ivcmdlen~getwdX.cinword4^quoteechofignore~addbuff2cplen~setatm2cpap~digits3s~lower:3sn~testv3xmckuus2.oj_hlp1b~usage3_tophlpb_hmxxbyeb_hmxxclob_hmxxconb_hmxxgetb_hmxxlgb_hmxxlogb_hmxxrc"c_hmxxsen(c_hmxxser*c_hmhset,c_hmxychk6c_hmxyf@c_hmhrmt\c~dohlp3xxxtolSloV ~ttolSloV smillisec_waitFor| ~waitFor| sc_didWeGe ~didWeGe srlri_reset!~reset!~dial.!telnbrcijwaitctstatuserrmsgerppmdminfaugmdmtymdmEchonpcckuscr.oĪ_EXP_ALR_seq_buf_s_got_it_no_cr_alrmRng~scrtimeD(_sequencZ(~sequencZ(icoct_chary~hmsg5sx~hmsga5sxi~dohsetr6xx~dohrmt^8xxxckuus3.o&p~doprm& xxxyzsz~chkspd4'x~seton'prmxy~setnum'prmxy~setcc((prmxy~dormtr(xxxssbufs2~rfilop+s_recvSeq*~recvSeq*egottraceil_chstrV/_outSeqJ,~outSeqJ,sbldelayretCode~loginP-cmdstrsaveAlme~chstrV/cscprintf.osprintf.Nchdir.ochown.otimes.o޲ctermid.ctime.oldiv.ogetpwuidgetuid.o*dup.o4sleep.oZalarm.oZfputc.ohfdopen.ogetgid.o&atoi.o0strncpy.fputs.okill.osetbuf.ogetppit~screenH,fcns plenbuf~intmsg/nbuf~chkint/chcn~debugf1fs1s2n slsp~tlogJ2fs1s2n s4spxckuusr.o~cmdlin4 x~doarg!xzxp_doconne%~doconne%x~fatal%msgd.getpwentfgets.o̽memchr.orew.ostrtol.olrem.ofcntl.ostrcmp.ocreat.operror.oerrlst.opstrncmp.ppause.opipe.ofprintf.puts.omemccpy.lmul.o0filbuf.o0setjmp.octype.osystem.oexecl.oexit.ofork.osignal.owait.ogetenv.otime.oNfopen.offindiop.unlink.oaccess.ostrlen.ogetpid.o(tolower.2toupper.Httyname.^strcpy.oVlseek.onread.onopen.onfs~ermsg(&msg~cmdinif&~trapb'~parser'xxcbncbp~doexit8)exitstat~bldlen*strdestlen~setgen8*typearg1arg2arg3 upstrcp~docmd*cxxyspsavepidshpathshnameshptrpdefShelwstatistatqstat~shopar5i~dolog8xys~deboptat.ostat.ostrcat.odoprnt.offltpr.o0strout.oCMSIZEcm_stk`_exit"$_environ$start"mcount"<_main"2_versio#@_hlptxt#@_srvtxt#@_spsiz#@_rpsiz# @_timint# @_rtimo#@_timef#@_npad#@_mypadn#@_chklen#@_bctr#@_bctu#@_ebq#@_ebqflg#d"d_getuid"j_chown"p_zclose"_zclosf"_fclose"_zchin"__filbuf"_zsout"_fputs"v_zsoutl"_zsoutx"_zchout"__flsbuf"_zchki"_stat"_zchko"_zdelet"_zrtol"__ctype#_tolower"_zltor"_toupper"_zchdir"_getenv"_chdir"|_zhome"_pipe"_fork"_dup"_getpwui"_execl"_fdopen"_wait"_zxpand"_fgen" _znext"_znewn"_atoi"_sprintf"_splitpa"_malloc"_fatal"_t_docmd"_bldlen"_dial"_dolog"_login"_shopar"_connv#$_loginv#_dialv#p_i$"_active$$_temp$&_lbuf$X_conn_in"_doesc"_pause"_hconne"_dialtim"_dialint"_scrtime"__doprnt"cerror"_timezon#_dayligh#_tzname#_localti"_asctime"_tzset"_gmtime"ldiv"lmul"B_setpwen"_getpwen"_endpwen"_dup2"__findio"__bufend#$_lseek"__wrtchk"__xflsbu"_memccpy"__bufsyn"__stdbravers""_free"_addresu"(_iswild"._match"4_fnsv#G_encstr":_getpkt"F_encode"L_decode"R_putsrv"X_puttrm"^_putfil"d_getch"j_canned"p_tinit"v_nack"_rinit"|_tlog"J_spar"_rpar"_ack1"_sinit"_screen"P_errpkt"_gnfile"_sleep"_spack"$_sipkt"_rcvfil"_openo"_intmsg"V_reof"_clsof"_reot"_sfile"_openi"_nxtpkt"*_sxpack"_sdata"_seof"_seot"_sdebu"uf#~__smbuf$ _rewind" _fgetpwe"_strtol"_memchr"_fflush"_sys_ner#_sys_err#`__findbu"__lastbu#"cm_pnt#^cm_off#\__exit"_par_uid$_freopen"_fstat"fltcvt"__strout"__cleanu" _sbrk",_brk"2_realloc"8_memcpy">__sibuf$__sobuf$_end$~cmstart">et"_gmtime"ldiv"lmul"B_setpwen"_getpwen"_endpwen"_dup2"__findio"__bufend#$_lseek"__wrtchk"__xflsbu"_memccpy"__bufsyn"__stdb$X_tfc$\_deblog#J@_pktlog#L@_seslog#N@_tralog#P@_displa#R@_stdouf#T@_xflg#V@_hcflg#X@_fncnv#Z@_binary#\@_warn#^@_quiet#`@_local#b@_server#d@_cnflg#f@_cxseen#h@_czseen#j@_sstate#l@_cmarg#n@_cmarg2#p@_cmlist$`_xargv$b_xargc$dcsav"_dftty#B_strcpy"0_dfloc#B_dfprty#B_dfflow#B_cmdlin"_proto"_conoll"z_conect"_doexit"_cmdini"_parser"cret"_ckxv#B_ckxsys#B_backgrd#B_ckxech#B_t_opent"_clsif"_sndhlp"_cwd"_syscmd"_input"0_rpack"6_chkint"\_resend"<_dopar"B_chk1"H_chk2"N_chk3"T_ack"Z_scmd"`_srinit"f_sigint"l_inlin"r_inchr"x_wartv#LO_protv#NO_state#TO_wart"~_tbl#O_cmdv#]_psetf#]_cc#]_dpx#]_hw#]_hc#]_hh$h_hx$j_cmprom$l_dfprom#]_cmerrp$_cmflgs$_cmdbuf$_hlpbuf$_atmbuf$_filbuf$_cmsetp"_cmsavp"_promptopen"_open"6_strncpy"_debug">_strcmp"_isatty"<_ttyname"B_strncmp"_ctermid"__iob#_fprintf""_close"H_ioctl"N_ttclos",_tthang"d_ttres"_msleep"R_fcntl"(_strlen"T_strcat"Z_access"`_system"f_printf"._getpid"l_creat"4_write"_unlink"r_ttpkt" _ttsspd" _ttflui" _ttvt" _perror":_timerh""_longjmp"~_esctrp"8_signal"_conint"T_connoi"_myread"_read"_myunrd"_ttchk"_ttxin"t"_cmres"_cmini"_stripq"_cmnum"_cmfld"_digits"_cmofi"_chkwld"_cmifi"_getwd"_setatm"_addbuf"_clrhlp"_addhlp"_dmphlp"_cmtxt"_cmkey"_lookup"_test"_cmcfm"_lower"_usage"_dohlp" _hmsg"&_hmsga",_nrmt#_remcmd#_dohrmt"2_nprm#_prmtab#n_dohset"8_puts"_fputc"_blktab#p_dpxtab#_filtab#_nfilp#_srtab#_nsrtab#̉_flotab#Ή_nflo#ډ_hshtab#܉_n_ttol"_ttoc"V_ttinl"~_alarm"@_setjmp"h_ttinc"_ttsndb"_conol" _times"F_ztime"_time"x_ctime"L_congm"_concb" _setbuf"R_conbin"r_conres"_conoc"_conxo"_conola"F_conchk"_coninc"_errno$f_ckzv#D_ckzsys#D_DIRCMD#D_DELCMD#D_TYPCMD#D_PWDCMD#D_SPACMD#D_SPACM2#D_WHOCMD#D_fp#D_zkself"_getppid"X_kill"^_zopeni"_chkfn"_zxcmd"_ermsg"_fopen"~_zopeno"_getgihsh#_fntab#_fttab#_partab# _npar#>_onoff#@_doprm"b_seton"h_setnum"n_setcc"t_nmdm#_mdmtab#d_line$_lp$_chkspd"z_dormt"_tlevel$¿_tfile$Ŀ_fgets"_setgen"_rfilop"lrem"_chstr"_userv#x_debfil$_pktfil$_sesfil$P_trafil$_n$_cflg$_action$_repars$_cwdf#z_homdir$_cmdstr$_doarg"_debopn"_cmdtab#ʔ_ncmd#l_logtab# _nlog#8_shotab#:_trap" upd: Program change log bwr: A "beware" file - list of known bugs, restrictions ann: The text of an announcement of a particular version bld: Instructions for building mak: A Unix Makefile (should be renamed to "makefile") com: (VMS only) a DCL command procedure is a single character to tell what system the file applies to: a: Descriptive material, documentation c: All systems with C compilers m: Macintosh u: Unix or systems that simulate (some features of) Unix v: VAX/VMS ckc40.ann 644 0 3 12276 3507351136 5445 w: Wart (really belongs in 'c' category, but...) is mnemonic (up to 3 characters) for what's in the file aaa: A "read-me" file, like this one cmd: Command parsing con: Connect command deb: Debug/Transaction Log formats, Typedefs dia: Modem/Dialer control fio: System-depdendent File I/O fns: Protocol support functions fn2: More protocol support functions ker: General C-Kermit definitions, information, documentation mai: Main program pro: Protocol scr: Script command tio: Sy 5-Feb-85 16:10:22-EST,5392;000000000000 Mail-From: SY.FDC created at 5-Feb-85 16:09:41 Date: Tue 5 Feb 85 16:09:41-EST From: Frank da Cruz Subject: Info-Kermit Digest V2 #1 -- New Unix Kermit To: Info-Kermit-Members@CU20B.ARPA cc: Info-Unix@BRL-TGR.ARPA Reply-To: Info-Kermit@CU20B Queries-To: Info-Kermit-Request@CU20B Info-Kermit Digest Tue, 5 Feb 1985 Volume 2 : Number 1 ANNOUNCEMENTS - New Unix Kermit Available for Testing ----------------------------------stem-dependent terminal i/o & control and interrupt handing usr: User interface us2: More user interface us3: Still more user interface Examples: ckaaaa.hlp - This file ckufio.c - File i/o for Unix ckmtio.c - Terminal i/o for Macintosh ckuker.mss - Scribe source for for Unix C-Kermit Kermit User Guide chapter ckuker.nr - Nroff source file for Unix C-Kermit man page ckuker.mak - Makefile for building Unix C-Kermit (rename to makefile) ckmker.mak - Makefile for building Macintosh C-Kermit under U------------------------------------ My apologies for the long delay since the last issue of the Info-Kermit Digest, which was Vol.1, No.46, dated 31 December 1984. This first issue of Volume 2 is to announce a test release of the new Unix Kermit. In subsequent issues, I'll attempt to catch up on other overdue items. A new Kermit program has been written in C, initially for 4.2 Berkeley Unix. The features of this program include: . Full implementation of the Kermit protocol, except for Attribute packetckaaaa.hlp 644 0 3 5633 3507351136 5730 nix/SUMACC Macintosh Kermit adds a few additional items to this list: hqx: binhex'd Macintosh resource (binhex version 4) sed: sed script for massaging ckcpro.c to make it smaller rc: rmaker input file (text) rsrc: (or rsr) 8-bit binary Macintosh resource def: Macintosh definitions header key: key redefinition package ke2: more key redefinition package ke3: still more key redefinition package kkc: common defs between ckmkey and ckmker rem: remote server command moduleC-Kermit File Naming Conventions: (Version 4C, 30 May 1985) File names will be lowercase on Unix systems, and probably will be uppercase on other systems. C-Kermit file names are of the form: ck. where: is the file type: c: C language source h: Header file for C language source w: Wart preprocessor source, converted by Wart (or Lex) to a C program nr: Nroff/Troff text formatter source mss: Scribe text formatter source doc: Documentation hlp: Help text res: resource info sav: settings saver module scr: screen (conflicts with name of script module, should be changed) sfp: standard file package sum: sumacc workarounds utl: utilities All the files necessary to build a particular implementation of C-Kermit are listed in the appropriate makefile or equivalent: Unix: ckuker.mak Macintosh: ckmker.mak VAX/VMS: ckvker.com (end of ckaaaa.hlp) redefinition package kkc: common defs between ckmkey and ckmker rem: remote server command moduleth IBM mainframes Several items on the wish list were not done for lack of time. They will probably be added in the future: . File attributes . Command macros . Login scripts . Raw file transmit The new program is called "C-Kermit" because it is intended as a basis for Kermit programs for any systems that have C compilers. Its version number is 4.0, to distinguish it from earlier releases of Unix Kermit, the most recent of which was 3.0. This prerelease test version of the program runs only under Berk UUCP from Oklahoma State University, Stillwater, OK. Here's how to UUCP to OK State: You need to set up "okstate" as a site in your "L.sys" UUCP dialing file using the information listed below. You can then issue the following command on your system: uucp okstate\!/u/kermit/ck\* /usr/spool/uucppublic (this example will retrieve the new Unix version of Kermit) The "/usr/spool/uucppublic" is chosen as the destination on your system since the destination must be WIDE OPEN (drwxrwxrwx) to everyone. eley Unix 4.2. We also intend to bring it to the following systems within the coming weeks: . DEC Pro-350 and Pro-380 with Venix (a Unix v7 derivative) . Amdahl UTS on IBM 370-series mainframes . Apple Macintosh (maybe) Support for other systems will have to be added elsewhere. The program is being "pre-released" at this time for two reasons: 1. It seems to be perfectly usable on Berkeley 4.2 systems, and is an improvement over the previous version. 2. The modular design may need some adjustment to You should not remove files from your uucppublic until the entire transfer is complete including any redials that are necessary. If you do remove some files our system may retransmit them, resulting in a higher phone bill for you. -- UUCP Login information -- Site Name : okstate Phone number : (405) 624-6953 (one line only) Login name : uucpker Password : thefrog Hours : 10:00pm - 10:00am central time (7 day per week) Problem : okstate!uucp-support (UUCP) reports : uuaccommodate certain systems. Before a great deal of additional coding is done, it is highly desirable to get the design and specification of the system-dependent modules stable. Therefore, please take the files, read the documentation, try running the program on your Berkeley Unix system if you have one, and send comments or bug reports to me as soon as you can. If you have a Unix system that is not Berkeley Unix, or a non-Unix system with a C compiler, please take a look at the system-dependent modcp-support%okstate@csnet-relay (ARPA) The phone number is for 300/1200 baud (bell compatible). ------------------------------ End of Info-Kermit Digest ************************* ------- resulting in a higher phone bill for you. -- UUCP Login information -- Site Name : okstate Phone number : (405) 624-6953 (one line only) Login name : uucpker Password : thefrog Hours : 10:00pm - 10:00am central time (7 day per week) Problem : okstate!uucp-support (UUCP) reports : uuules to see how they could be adapted to your system; again, if you have any suggestions or criticisms of the design, please let me know. I'm particularly interested in issues of portability. After a round or two of this, perhaps the design can be agreed upon, and then those who would like to contribute support for Version 6, System III, System V, Xenix, PC/IX, etc etc, can do so without fear of running into other people's changes for other systems. Before attempting to adapt C-Kermit to a new system, plckc42.ann 644 0 3 6004 3507351137 5420 s: - Acts as server - Talks to server - All packet encoding and error checking options are provided - File transfer interruption - Filename collision avoidance - Binary and text file transfer . Modular construction for easy portability to other systems . An interactive command parser as well as Unix-style command line arguments . Command and initialization files . Piped operation . Improved terminal connect, with optional logging . Logs for debugging, packets, and transactions . Communication wiease let me know so I can tell you whether someone else is already at work on the same thing, and perhaps put you in touch. The files are on CU20B as KER:CK*.*, available via anonymous FTP. The file CKERMI.DOC provides user-level documentation as well as a description of the program organization and hints for adapting it to new systems. Within several days the files should also be available on BITNET via KERMSRV (to get started with KERMSRV, type SMSG RSCS MSG CUVMA KERMSRV HELP), and to Unix systems via 6-Mar-85 21:53:46-EST,3104;000000000000 Mail-From: SY.FDC created at 6-Mar-85 21:53:20 Date: Wed 6 Mar 85 21:53:20-EST From: Frank da Cruz Subject: Info-Kermit Digest V2 #9, C-Kermit Release #2 To: Info-Kermit@CU20B.ARPA, Info-Micro@BRL-VGR.ARPA, Info-Unix@BRL.ARPA Reply-To: Info-Kermit@CU20B Queries-To: Info-Kermit-Request@CU20B Info-Kermit Digest Wed, 6 Mar 1985 Volume 2 : Number 9 Second Pre-Release of C-Kermit for Unix ------------------------- bringing the program up on the Macintosh. The files are available via anonymous FTP from Internet host CU20B (Internet number 192.5.43.128) as KER:CK*.*. They will appear at okstate (for uucp'ing) and on KERMSRV (BITnet) shortly. If you plan to adapt this program to a new system, be sure to let me know quickly so I can prevent duplication of effort and can put people with similar interests in touch with each other. ------------------------------ End of Info-Kermit Digest ************************* ------------------------------------------------- Date: Wed 6 Mar 85 21:43:12-EST From: Frank da Cruz Subject: Second Pre-Release of C-Kermit for Unix To: Info-Kermit@CU20B This is to announce the second "pre-release" of C-Kermit. The first pre-release (version 4.0) occurred a month ago; the program included support only for Berkeley Unix. This new release (4.2) includes support for: . 4.x Berkeley Unix (VAX, SUN) . Generic AT&T System III, System V . Microsoft Xenix for the PC/AT . Interact--- nging the program up on the Macintosh. The files are available via anonymous FTP from Internet host CU20B (Internet number 192.5.43.128) as KER:CK*.*. They will appear at okstate (for uucp'ing) and on KERMSRV (BITnet) shortly. If you plan to adapt this program to a new system, be sure to let me know quickly so I can prevent duplication of effort and can put people with similar interests in touch with each other. ------------------------------ End of Info-Kermit Digest ************************* ----ive on the PC/XT (PC/IX) and other systems . DEC Professional 3xx with Venix 1.0 . NCR Tower All reported bugs have been fixed (or at least fixes have been attempted), and many of the restrictions lifted. "Dial" and "script" commands have been added, along with code to support modem control and dialers, uucp line locking, and the like. The program itself has been somewhat reorganized to be more adaptable to small environments: the larger modules have been split; long character strings have been shortenedckc4c.ann 644 0 3 12127 3507351137 5524 . Most of the new work was done by Herm Fischer of Litton Data Systems, Van Nuys CA (HFISCHER@USC-ISIB), and there were also contributions from many others in the form of bug reports and/or fixes. NCR Tower support came from John Bray at Auburn University. The new makefile (distributed as CKERMI.MAK) embodies procedures for building all the different versions. Since the program now runs on a variety computers, large and small, it would seem relatively safe to begin adding support for other systems witho30-May-85 19:29:36-EDT,5278;000000000000 Mail-From: SY.FDC created at 30-May-85 19:29:10 Date: Thu 30 May 85 19:29:10-EDT From: Frank da Cruz Subject: Info-Kermit Digest V2 #32 To: Info-Kermit@CU20B.ARPA Reply-To: Info-Kermit@CU20B Queries-To: Info-Kermit-Request@CU20B Info-Kermit Digest Thu, 30 May 1985 Volume 2 : Number 32 C-Kermit Version 4C for Unix, VMS, and the Macintosh ---------------------------------------------------------------------- This is to annut fear that the program will have to be completely reorganized (again). The only systems supported by C-Kermit so far are Unix systems; rather than create a separate ckx and ckz module for each such system (since these systems tend to differ in small places, but still have much in common), conditional compilation was used within these modules. If C-Kermit is to be adapted to non-Unix systems, then a full replacement of the ckx and/or ckz modules is probably indicated. This is what we will probably do inounce version 4C of C-Kermit for Unix, the Apple Macintosh, and VAX/VMS. C-Kermit is a version of Kermit written modularly in C, implementing the entire Kermit file transfer protocol (except for attribute packets), designed for modularity and transportability. This version of Kermit has been in "field test" for about a month, and is being released at this time because most of the major goals for it have been met, namely: . Most known bugs in release 4.2 fixed . Support for new systems added and tested . because the SUMACC system cannot produce swappable segments. If someone wants to take the trouble to translate the Macintosh-specific modules to one of the native Macintosh C development systems that supports segment loading, then additional functionality can be added without worrying about exceeding memory. (If you want to volunteer to do this, please contact us first!) The VAX/VMS implementation is more an exercise in portability than a real Kermit implementation. It mostly works, but does not possesckuker.bwr 644 0 3 26431 3507351145 6041 A few new functions incorporated At this point, C-Kermit should be considered a fairly stable base upon which to add support for new systems -- the interface between the system-dependent and portable modules seems to have settled down -- and to add new features. A few highlights: Systems Supported: . Berkeley Unix 4.1 and 4.2 (but not yet 2.9) . AT&T Unix System III and derivatives (Xenix/286, PC/IX, etc) . AT&T Unix System V and derivatives . Bell Unix Version 7 . DEC Pro-350 with Venix Versis the intimate knowledge of the VMS environment that the Stevens Institute of Technology Bliss language implementation has. Still, it may be useful to sites that do not have a Bliss compiler but do have the VAX-11 C compiler. Documentation includes a Unix Kermit manual (CKUKER.DOC, Scribe source CKUKER.MSS), a Macintosh Kermit manual (CKMKER.DOC,.MSS), various help files (CK*.HLP), program update histories (CK*.UPD), and "beware" files (CK*.BWR). The Unix and Macintosh manuals are new chapters for the Keron 1 . NCR Tower 1632, OS 1.02 . VAX/VMS . Apple Macintosh New features since version 4.2, common to all implementations: . Many features redesigned to promote portability. . Compile-time options to eliminate debugging and logging code to reduce size and boost performance. . Packet parameters separately settable for inbound & outbound packets. . Protocol operation improved here & there, many bugs fixed. New features for Unix implementation (and VMS): . Command line continuation . Supmit User Guide, but the Guide itself has not yet been reissued to include these chapters; a new revision of the manual will appear after MS-DOS Kermit 2.28 is announced. The files are in KER:CK*.*, available from host CU20B via anonymous FTP on the Internet. Within a few days, they will also be available from BITnet via KERMSRV at CUVMA. In addition, Macintosh Kermit diskettes will be sent out to selected sites (Apple University Consortium schools and a few others; our capacity to reproduce diskettes is port for additional modem-dialers . Improved performance for Pro/Venix . Better (but still not perfect) determination of local vs remote mode in 'set line' . User's preferred shell is used for "!" commands, rather than always sh. (A complete list of Unix/VMS updates is in CKUKER.UPD.) New Features (since 0.7) for Macintosh: . A key redefinition package is now provided. . I/O errors, such as disk full or write protected, now handled better. . Separate boxes for inbound & outbound packet paralimited, so we can't do mass mailings). And of course, the new files will be included henceforth on our Kermit distribution tapes. The files that had been in for testing purposes have been removed. Thanks to all the folks on the network who participated in the test and helped to work out the bugs, particularly Dave Tweten (AMES-NAS), Marco Papa (USC), Dan Schullman (DEC), Lawrence Afrin (Clemson U), and many others too numerous to mention. Please report any problems to Info-Kermit@CU20B. -----meters in protocol settings dialog. (A complete list of Macintosh updates is in CKMKER.UPD.) The Macintosh implementation is built using the Stanford University Medical Center's SUMACC cross development system, which runs on VAX computers under Unix (or VMS with Eunice). MacKermit fits on a standard 128K Mac, but just barely. The key configurator is a separate program, because this additional functionality added to Kermit itself would not fit into a 128K Mac. The memory restriction is a problem only------------------------- End of Info-Kermit Digest ************************* ------- henceforth on our Kermit distribution tapes. The files that had been in for testing purposes have been removed. Thanks to all the folks on the network who participated in the test and helped to work out the bugs, particularly Dave Tweten (AMES-NAS), Marco Papa (USC), Dan Schullman (DEC), Lawrence Afrin (Clemson U), and many others too numerous to mention. Please report any problems to Info-Kermit@CU20B. -----o be reorganized so that a minimal Kermit can be built for any system, and then frills can be added on if desired -- interactive command parser, help strings, dial command, script command, etc. - There's not a full enough set of features available from command line invocation. Commands like "bye" are missing. - Conditionalizations are not done clearly. In some cases it might be better to have compile-time flags for features, rather than systems, or generic system names, rather than specific vee Pro/Venix V1, ttyname(0) returns a meaningful string like "/dev/console", from which one can tell if the job is remote. Others, like bsd, just return the tty number, like "/dev/ttyi6", from which you can't tell anything. (Note, System V has a nice function ctermid() which helps a lot, but other Unixes don't have it). - Local mode file transfer display could be improved. On tty-style displays, the "percent done" could be shown by doing something like "0...1...2...3...4...5...6...7...8...ndor/machine names, to avoid excessive nesting of compile-time variables. Note that constructions like "#ifdef FOO | BAR" are avoided because many compilers don't understand them; the alternative is to repeat code under different conditionals (to accomplish an OR) or to include it within nested conditionals (AND), sometimes applying De Morgan's law to achieve the desired result... - It might also be better to have a -D in the makefile for the system name, rather than hard-coding it into the ck9...". - Interrupt handling is not done particularly well, and if the program crashes or is halted while it has the terminal in a not-normal mode during command parsing or file transfer, the terminal mode is not restored, and lock files are not cleaned up. - The shell's interrupt, delete, and kill characters may interfere or conflict with those used by the Kermit command parser. In any case, there is no way to change Kermit's editing characters to conform to user's taste. - "status" command neC-Kermit Version 4C(052): Status, Bugs, and Problems As of: 18 June 1985 Note: Version numbering system changed from decimal notation (like 4.2) to number-letter notation (like 4C) to avoid confusion with Berkeley Unix version numbers. See ckuker.upd for list of bugs fixed since 4C(050). -- SUPPORT FOR DIFFERENT SYSTEMS: -- 4.2BSD: "make bsd" works. Should work on VAX, SUN, and Pyramid. 4.1BSD: "make bsd" should work for this too (did not in C-Kermit v4.2). 4.3BSD: untested, "make bsd" should work. [xz]*.c modules. - Program's return code might be wrong in some cases (in 4.0, it was always zero; in 4C some attempt is made to return correct codes for failure and success). Also see note about VMS return codes, below. - The default prompt might be set from the makefile with -DPROMPT. - Need more 'set' commands: . set incomplete (file disposition) {keep,discard} . set retry-threshhold n - The program could be a little bit less cavalier in its treatment of files. For instance, when receiving2.9BSD: Support is in but untested: "make bsd29" Version 7: works ok on the systems tested so far using "make v7", but some fiddling with the make file is necessary for proc table definitions; see the makefile and also ckuv7.hlp for details. PC/IX: should work ok with "make pcix". ATT 3Bx systems: should work ok with "make att3bx". Most other System V or System III based systems can build a working Kermit with "make sys3" PDP-11's running a System III or V based Unix and which have no I & D space sho a file (with "warning" turned off) it will overwrite any existing file of the same name. That's ok, but what if the user types ^F or ^B to interrupt the transfer? This does not save the existing file -- it's already been destroyed by the open() of the new copy, which in turn is discarded as a result of the interruption. Maybe Kermit should always make a temporary, unique name for incoming files, and then rename them to their real names only after the transfer is complete. But that's no gould use "make sys3nid". For other Unix systems, see the makefile. VAX/VMS: support added by Stew Rubenstein at Harvard and Martin Minow at DEC. Has to be built with CKV*.COM, needs development to handle all the VMS/RMS features and to improve performance. Has its own build procedure. See CKV*.*. Macintosh: Support added at Columbia, has own makefile, etc. See CKM*.*. -- BUG LIST -- General problems: - Too many features, program is too big, source is too large to fit on some disks. Needs tod on systems (like the Macintosh) that don't have disk space to burn. - Local versus remote mode is not, and probably can not, be determined automatically upon startup. For instance, on a workstation (e.g. a DEC Pro-380/Venix) upon which the user usually logs on through the console device, the program is configured to be in local mode by default. However, if a user logs in to this workstation through the "back port", the program doesn't know it should be in remote mode. On some systems, likduring execution of a take file return directly to command level, rather than pop to the invoking take file (why?). - Some users report that the program should make no internal distinction between running in foreground or background (why?). - Since kermit opens and closes the communication line with each command line invocation, it is not convenient to use it in scripts in which it is repeatedly invoked (e.g. a print spooler). - Variable names are sometimes confusing, especially the send/receivot allow users to manipulate dialers directly. - Should allow user to break out of a dial command that is obviously going to fail (e.g. user entered wrong number). - Should support a "phone book" (this would actually go in ckuus*.c). ckuus*.c: - The send command should have the same syntax as the get command to allow multiple filenames to be given on a single line: send foo bar baz <-- send all these files or: send Local file(s) to send: foo bar baz Name(s) to send it/them under: x y e parameter pairs (spsiz/rpsize, mystch/stchr, npad/mypadn, rtimo/timint, etc). This is mostly history... they tend to agree with the names used in other Kermit programs. Still, they should probably be changed. Ditto for some of the procedure names. - When the C-Kermit server is given a host command (or even some generic commands like 'space'), it might have to think for a long time before returning output. In this case, it should set a timer while waiting for input from the fork and whenz The latter form could be risky, of course, when mixed with wildcards, and in any case would require major rewriting of many parts of the program. - Certain kinds of quoting don't work, e.g. echo "this \07 should ring". - Baud rate selection currently requires user to type a number, which is then verified against a system-dependent table. Better to have a baud rate keyword (cmkey) table defined in the system-dependent module, so user can abbreviate (e.g. '9' for '9600'). - No way to put commever the timer goes off, it should send a null data packet to prevent the other Kermit from timing out. - When connecting back to C-Kermit after a transaction, or after finishing the server, it may be necessary to type a ^Q to clear up an XOFF deadlock. There's not much the Kermit program can do about this... ckufio.c: - ckufio currently goes to a lot of trouble to traverse the directory in order to expand "*" and "?" in wildcards. Maybe it should just fork the user's customary shell and have ents in take files. Cure: Add an invisible ";" or "#" "command" for full-line comments. Trailing comments would be harder. - ckuus2.c makes the C optimizer run out of space under PC/IX and some other systems. Protocol (ckcpro.w, ckcfn*.c): - No way to interrupt a protocol transaction until after it starts successfully. For instance, no way to interrupt the timeouts and retransmissions of the initial packet when the other side is not responding, except for killing the whole program. Cure: ceds timing info, maybe also effective baud rate. - Status info should be updated only for real file transfers, not transactions like "finish". - "!" command requires a space after, contrary to the Unix user's normal expectation. - Many people have asked for a system-wide startup file similar to the user's .kermrc file, perhaps with a conditional way to escape from it if the user has her own .kermrc file. This notion might be extended to include the entire hierarchy system -- home -- current diit do the expansion. This would allow fancier filespecs to be given, like "~/ck*.[cwh]". But it would slow down features like filename completion and menus in the interactive command parser. (Find out how Unix FTP does it...) ckvfio.c: - zltor does not strip version numbers from outbound filenames. ckutio.c: - There should be a timed option for ttoc(), for use during connect. - There's no good way to select baud rates higher than 9600. Most Unix systems don't supply symbols for them (unlessrectory. - It would also be desirable to have a way of specifying alternate startup files on the command line, so that aliases could be defined for running Kermit on certain lines, at certain speeds, etc. - A deeper problem with the initialization files is that the file is only taken when the program enters interactive command dialog. To be consistent, it should also be taken when the program is run via command line arguments. - Some users report that it would be more desirable to have an error you use EXTA, EXTB), and even when they do, the program has no way of knowing whether a specific port serial controller supports those rates. - UUCP Lock files are left behind if the program crashes or is interrupted in a way that is not trapped. - Use of RAW|TANDEM in 4.1 BSD gives only unidirectional, not bidirectional, flow control -- xoff's from the terminal are treated as data rather than control signals. Symptom: possible loss of characters during CONNECT. ckudia.c: - Some systems do nalog box pop up during protocol on the Macintosh... ckucon.c: - Doesn't do any particular kind of terminal emulation. It wasn't meant to. Filters can be used for this. Or a replacement module can be written (as has been done for the Macintosh). - Performance is poor on systems that can't check the input buffer. See the horrendous code that was added for V7 to get around this (peeking into tty buffers in kernal memory). - As structured, connect mode can't include commands to toggle logging o Yes Transfer binary files: Yes Wildcard send: Yes File transfer interruption: Yes Filename collision avoidance: Yes Can time out: Yes 8th-bit prefixing: Yes Repeat count prefixing: Yes Alternate block checks: Yes Terminal emulation: Yes Communication settings: Yes Transmit BREAK: Yes Support for dialout modems: Yes IBM mainfn and off or to change settings, because the fork that reads keyboard input doesn't share variables with the fork that does port i/o. - The program may become stuck if the two sides get into an XOFF deadlock. There should probably be a timer around (or in) the ttoc() call. systems that can't check the input buffer. See the horrendous code that was added for V7 to get around this (peeking into tty buffers in kernal memory). - As structured, connect mode can't include commands to toggle logging orame communication: Yes Transaction logging: Yes Session logging: Yes Debug logging: Yes Packet logging: Yes Act as server: Yes Talk to server: Yes Advanced server functions: Yes Local file management: Yes Command/Init files: Yes UUCP and multiuser line locking: Yes File attributes packets: No Command macros: ckuker.doc 644 0 3 253343 3507351145 6040 No Raw file transmit: No C-Kermit provides traditional Unix command line operation as well as inter- active command prompting and execution. The command line options provide ac- cess to a minimal subset of C-Kermit's capabilities; the interactive command set is far richer. UNIX KERMIT Page 119 On systems with dialout modems, C-Kermit can use its command file and login script facilities to replicate the fiUNIX KERMIT (Chapter of Kermit User Guide) Page 118 9. UNIX KERMIT Program: Frank da Cruz, Bill Catchings, Jeff Damens, Columbia University; Herm Fischer, Encino CA; contributions by many others. Language: C Documentation: Frank da Cruz, Herm Fischer Version: 4C(052) Date: June 1985 C-Kermit is a completely new implementation of Kermit, written modularly and transportably in C. The protocol state transition table is written in warle transfer functionality of UUCP among heterogeneous operating systems, including the use of scheduled (e.g. late night) unattended operation. 9.1. The Unix File System Consult your Unix manual for details about the file system under your version of Unix. For the purposes of Kermit, several things are worth briefly noting. Unix files generally have lowercase names, possibly containing one or more dots or other special characters. Unix directories are tree-structured. Directory levels are sepheck for keyboard "interrupts" during the send-init process, set c[xz]seen. But doing this will make the state table a lot more complicated... Maybe change ^C trap to get back to command mode rather than exit the program. - When parity is in use and the other Kermit cannot do 8th bit prefixing, the user is not warned that binary files will not be transferred correctly. This can be easily remedied by calling screen(SCR_WM,...) after the send-init exchange has occurred, but this would make a dit, a (not proprietary) lex-like preprocessor for C. System-dependent primitive func- tions are isolated into separately compiled modules so that the program should be easily portable among Unix systems and also to non-Unix systems that have C compilers. This document applies to Unix implementations of C-Kermit. Unix Kermit Capabilities At A Glance: Local operation: Yes Remote operation: Yes Login scripts: Yes Transfer text files: arated by "/" characters. For example, /usr/foo/bar denotes the file bar in the directory /usr/foo. Wildcard or "meta" characters allow groups of files to be specified. "*" matches any string; "?" matches any single character. When C-Kermit is invoked with file arguments specified on the Unix command line, the Unix shell (Bourne Shell, C-Shell, etc) expands the meta characters itself, and in this case a wider variety is available. For example, kermit -s ~/ck[x-z]*.[ch] is expanded by Control-B: Interrupt the entire Batch of files, terminate the transaction. Control-R: Resend the current packet Control-A: Display a status report for the current transaction. These interrupt characters differ from the ones used in other Kermit implemen- tations to avoid conflict with Unix shell interrupt characters. With System III and System V implementations of Unix, interrupt commands must be preceeded by the 'connect' escape character (e.g. control-\). CAUTION: If Control-F the Berkeley C-Shell into a list of all the files in the user's home directory (~/) that start with the characters "ck", followed by a single character x, y, or z, followed by zero or more characters, followed by a dot, followed by one of the characters c or h. Internally, the C-Kermit program it- self expands only the "*" and "?" meta characters. Unix files are linear streams of 8-bit bytes. Text files consist of 7-bit AS- CII characters, with the high-order bit off (0), and lines separated by or Control-B is used to cancel an incoming file, and a file of the same name previously existed, and the "file warning" feature is not enabled, then the previous copy of the file will dis- appear. 9.3. Command Line Operation The C-Kermit command line syntax has been changed from that of earlier releases of Unix Kermit to conform to the "Proposed Syntax Standards for Unix System Commands" put forth by Kathy Hemenway and Helene Armitage of AT&T Bell Laboratories in Unix/World, the Unix newline character, which is linefeed (LF, ASCII 10). This distinguishes Unix text files from those on most other ASCII systems, in which lines are separated by a carriage-return linefeed sequence (CRLF, ASCII 13 followed by ASCII 10). Binary files are likely to contain data in the high bits of the file bytes, and are not treated in terms of lines. When transferring files, C-Kermit will convert between upper and lower case filenames and between LF and CRLF line terminators auto Vol.1, No.3, 1984. The rules that apply are: - Command names must be between 2 and 9 characters ("kermit" is 6). - Command names must include lower case letters and digits only. - An option name is a single character. - Options are delimited by '-'. - Options with no arguments may be grouped (bundled) behind one delimiter. - Option-arguments cannot be optional. - Arguments immediately follow options, separated by whitespace. - The order of options does not matter. matically, unless told to do otherwise. When binary files must be transferred, the program must be instructed not to perform LF/CRLF conversion (-i on the command line or "set file type binary" interactively; see below). 9.2. File Transfer If C-Kermit is in local mode, the screen (stdout) is continously updated to show the progress of the file transer. A dot is printed for every four data packets, other packets are shown by type: I Exchange Parameter Information R Receive Initia- '-' preceded and followed by whitespace means standard input. A group of bundled options may end with an option that has an argument. The following notation is used in command descriptions: fn A Unix file specification, possibly containing the "wildcard" charac- ters `*' or `?' (`*' matches all character strings, `?' matches any single character). fn1 A Unix file specification which may not contain `*' or `?'. rfn A remote file specification in the remote system'te S Send Initiate UNIX KERMIT Page 120 F File Header G Generic Server Command C Remote Host Command N Negative Acknowledgement (NAK) E Fatal Error T Indicates a timeout occurred Q Indicates an invalid packet was received % Indicates a packet was retransmitted You may type (to stdin) certain "interrupt" commands during file transfer: Control-F: Interrupt the current File, and go on to the next (if any).s own syntax, which UNIX KERMIT Page 121 may denote a single file or a group of files. rfn1 A remote file specification which should denote only a single file. n A decimal number between 0 and 94. c A decimal number between 0 and 127 representing the value of an ASCII character. cc A decimal number between 0 and 31, or else exactly 127, representing the value of an ASCII control character. [ he first file is affected by the -a option: kermit -ra baz stores the first incoming file under the name baz. -x Begin server operation. May be used in either local or remote mode. Before proceeding, a few words about remote and local operation are necessary. C-Kermit is "local" if it is running on PC or workstation that you are using directly, or if it is running on a multiuser system and transferring files over an external communication line -- not your job's co\*.\? -f Send a 'finish' command to a remote server. -c Establish a terminal connection over the specified or default com- munication line, before any protocol transaction takes place. Get back to the local system by typing the escape character (normally Control-Backslash) followed by the letter 'c'. -n Like -c, but after a protocol transaction takes place; -c and -n may both be used in the same command. The use of -n and -c is illustra] Any field in square braces is optional. {x,y,z} Alternatives are listed in curly braces. C-Kermit command line options may specify either actions or settings. If C-Kermit is invoked with a command line that specifies no actions, then it will issue a prompt and begin interactive dialog. Action options specify either protocol transactions or terminal connection. -s fn Send the specified file or files. If fn contains wildcard (meta) characters, the Unix shell expands it inntrolling terminal or con- sole. C-Kermit is remote if it is running on a multiuser system and transfer- ring files over its own controlling terminal's communication line, connected to your PC or workstation. If you are running C-Kermit on a PC, it is in local mode by default, with the "back port" designated for file transfer and terminal connection. If you are running C-Kermit on a multiuser (timesharing) system, it is in remote mode un- less you explicitly point it at an external line for file tto a list. If fn is '-' then kermit sends from standard input, which must come from a file: kermit -s - < foo.bar or a parallel process: ls -l | kermit -s - You cannot use this mechanism to send terminal typein. If you want to send a file whose name is "-" you can precede it with a path name, as in kermit -s ./- -r Receive a file or files. Wait passively for files to arrive. -k Receive (passively) a file orransfer or terminal connection. The following command sets C-Kermit's "mode": -l dev Line -- Specify a terminal line to use for file transfer and terminal connection, as in kermit -l /dev/ttyi5 When an external line is being used, you might also need some additional op- tions for successful communication with the remote system: -b n Baud -- Specify the baud rate for the line given in the -l option, as in kermit -l /dev/ttyi5 -b 9600 This optio files, sending them to standard output. This option can be used in several ways: kermit -k Displays the incoming files on your screen; to be used only in "local mode" (see below). kermit -k > fn1 Sends the incoming file or files to the named file, fn1. If more than one file arrives, all are concatenated together into the single file fn1. kermit -k | command Pipes the incoming data (singln should always be included with the -l option, since the speed of an external line is not necessarily what you expect. -p x Parity -- e,o,m,s,n (even, odd, mark, space, or none). If parity is other than none, then the 8th-bit prefixing mechanism will be used for transferring 8-bit binary data, provided the opposite Kermit agrees. The default parity is none. -t Specifies half duplex, line turnaround with XON as the handshake character. Thee or multiple files) to the indicated command, as in kermit -k | sort > sorted.stuff UNIX KERMIT Page 122 -a fn1 If you have specified a file transfer option, you may specify an alter- nate name for a single file with the -a option. For example, kermit -s foo -a bar sends the file foo telling the receiver that its name is bar. If more than one file arrives or is sent, only t following commands may be used only with a C-Kermit which is local -- ei- ther by default or else because the -l option has been specified. UNIX KERMIT Page 123 -g rfn Actively request a remote server to send the named file or files; rfn is a file specification in the remote host's own syntax. If fn happens to contain any special shell characters, like '*', these must be quoted, as in kermit -g xis appended to the name if it has the same name as an existing file which would otherwise be overwritten. If the -a option is included, then the same rules apply to its argument. The file transfer display shows any trans- formations performed upon filenames. During transmission, files are encoded as follows: - Control characters are converted to prefixed printables. - Sequences of repeated characters are collapsed via repeat counts, if UNIX KERMIT mmands. This allows other work to be done while file transfers proceed in the background. kermit -l /dev/ttyi6 -b 9600 -g foo.\* > foo.log < /dev/null & UNIX KERMIT Page 125 This command is like the previous one, except the file transfer display has been redirected to the file foo.log. Standard input is also redirected, to prevent C-Kermit from sampling it for interruption commands. kermit -iwx This command starts up C-Kerm Page 124 the other Kermit is also capable of repeated-character compression. - If parity is being used on the communication line, data characters with the 8th (parity) bit on are specially prefixed, provided the other Kermit is capable of 8th-bit prefixing; if not, 8-bit binary files cannot be successfully transferred. - Conversion is done between Unix newlines and carriage-return-linefeed sequences unless the -i option was specified. Commanit as a server. Files are transmitted with no newline/carriage-return-linefeed conversion; the -i option is necessary for bi- nary file transfer and useful for Unix-to-Unix transfers. Incoming files that have the same names as existing files are given new, unique names. kermit -l /dev/ttyi6 -b 9600 This command sets the communication line and speed. Since no action is specified, C-Kermit issues a prompt and enters an interactive dialog with you. Any settings given on the command lineted below. On a timesharing system, the -l and -b options will also have to be included with the -r, -k, or -s options if the other Kermit is on a remote system. Several other command-line options are provided: -i Specifies that files should be sent or received exactly "as is" with no conversions. This option is necessary for transmitting binary files. It may also be used to slightly boost efficiency in Unix-to-Unix trans- fers of text files by eliminating CRLF/d Line Examples: kermit -l /dev/ttyi5 -b 1200 -cn -r This command connects you to the system on the other end of ttyi5 at 1200 baud, where you presumably log in and run Kermit with a 'send' command. After you escape back, C-Kermit waits for a file (or files) to arrive. When the file transfer is completed, you are again connected to the remote system so that you can logout. kermit -l /dev/ttyi4 -b 1800 -cntp m -r -a foo This command is like the preceding one, except the remote system in newline conversion. -w Write-Protect -- Avoid filename collisions for incoming files. -q Quiet -- Suppress screen update during file transfer, for instance to allow a file transfer to proceed in the background. -d Debug -- Record debugging information in the file debug.log in the cur- rent directory. Use this option if you believe the program is mis- behaving, and show the resulting log to your local kermit maintainer. -h Help -- Display a brief synopsithis case uses half duplex communication with mark parity. The first file that arrives is stored under the name foo. kermit -l /dev/ttyi6 -b 9600 -c | tek This example uses Kermit to connect your terminal to the system at the other end of ttyi6. The C-Kermit terminal connection does not provide any particular terminal emulation, so C-Kermit's standard i/o is piped through a (hypothetical) program called tek, which performs (say) Tektronix emulation. kermit -l /dev/ttyi6 -b 9600s of the command line options. The command line may contain no more than one protocol action option. Files are sent with their own names, except that lowercase letters are raised to upper, pathnames are stripped off, certain special characters like (`~') and (`#') are changed to `X', and if the file name begins with a period, an `X' is inserted before it. Incoming files are stored under their own names except that uppercase letters are lowered, and, if -w was specified, a "generation number" -nf This command would be used to shut down a remote server and then connect to the remote system, in order to log out or to make further use of it. The -n option is invoked after -f (-c would have been invoked before). kermit -l /dev/ttyi6 -b 9600 -qg foo.\* & This command causes C-Kermit to be invoked in the background, getting a group of files from a remote server (note the quoting of the `*' character). No dis- play occurs on the screen, and the keyboard is not sampled for interruption coe used to speed up Kermit file transfers: compress file | kermit -is - (sender) kermit -ik | uncompress (receiver) UNIX KERMIT Page 126 Exit Status Codes: Unix Kermit returns an exit status of zero, except when a fatal error is en- countered, where the exit status is set to one. With background operation (e.g., `&' at end of invoking command line) driven by scripted interactive com- mands (redirected standard input -- Enter any of the above characters into the command, literally. To enter a backslash, type two backslashes in a row (\\). A backslash at the end of a command line causes the next line to be treated as a continuation line; this is useful for readability in com- mand files, especially in the 'script' command. UNIX KERMIT Page 127 You may type the editing characters (DEL, ^W, etc) repeatedly, to de and/or take files), any failed interactive command (such as failed dial or script attempt) causes the fatal error exit. 9.4. Interactive Operation C-Kermit's interactive command prompt is "C-Kermit>". In response to this prompt, you may type any valid command. C-Kermit executes the command and then prompts you for another command. The process continues until you instruct the program to terminate. Commands begin with a keyword, normally an English verb, such as "send". You may omit trailinglete all the way back to the prompt. No action will be performed until the command is entered by typing carriage return, linefeed, or formfeed. If you make any mis- takes, you will receive an informative error message and a new prompt -- make liberal use of `?' and ESC to feel your way through the commands. One impor- tant command is "help" -- you should use it the first time you run C-Kermit. Interactive C-Kermit accepts commands from files as well as from the keyboard. When you enter interacti characters from any keyword, so long as you specify suf- ficient characters to distinguish it from any other keyword valid in that field. Certain commonly-used keywords (such as "send", "receive", "connect") have special non-unique abbreviations ("s" for "send", "r" for "receive", "c" for "connect"). Certain characters have special functions during typein of interactive com- mands: ? Question mark, typed at any point in a command, will produce a message explaining what ve dialog, C-Kermit looks for the file .kermrc in your home or current directory (first it looks in the home directory, then in the current one) and executes any commands it finds there. These commands must be in interactive format, not Unix command-line format. A "take" command is also provided for use at any time during an interactive session. Command files may be nested to any reasonable depth. Here is a brief list of C-Kermit interactive commands: ! Execute a Unix shell command remain in force during the dialog, un- less explicitly changed. kermit This command starts up Kermit interactively with all default settings. The next example shows how Unix Kermit might be used to send an entire direc- tory tree from one Unix system to another, using the tar program as Kermit's standard input and output. On the orginating system, in this case the remote, type (for instance): tar cf - /usr/fdc | kermit -is - This causes tar to send the directory /usr/fdc (and all its fiis possible or expected at that point. Depending on the context, the message may be a brief phrase, a menu of keywords, or a list of files. ESC (The Escape or Altmode key) -- Request completion of the current keyword or filename, or insertion of a default value. The result will be a beep if the requested operation fails. DEL (The Delete or Rubout key) -- Delete the previous character from the command. You may also use BS (Backspace, Controlles and all its subdirectories and all their files...) to standard output instead of to a tape; kermit receives this as standard input and sends it as a binary file. On the receiving system, in this case the local one, type (for instance): kermit -il /dev/ttyi5 -b 9600 -k | tar xf - Kermit receives the tar archive, and sends it via standard output to its own copy of tar, which extracts from it a replica of the original directory tree. A final example shows how a Unix compression utility might b-H) for this function. ^W (Control-W) -- Erase the rightmost word from the command line. ^U (Control-U) -- Erase the entire command. ^R (Control-R) -- Redisplay the current command. SP (Space) -- Delimits fields (keywords, filenames, numbers) within a com- mand. HT (Horizontal Tab) may also be used for this purpose. CR (Carriage Return) -- Enters the command for execution. LF (Linefeed) or FF (formfeed) may also be used for this purpose. \ (Backslash) get Get files from a remote Kermit server. help Display a help message for a given command. log Open a log file -- debugging, packet, session, transaction. quit Same as 'exit'. receive Passively wait for files to arrive. remote Issue file management commands to a remote Kermit server. script Execute a login script with a remote system. send Send files. server Begin server operation. set Set various parame(as described above, or as specified by the 'set file names' command). If the second form of the 'send' command is used, i.e. with fn1 denoting a single Unix file, rfn1 may be specified as a name to send it un- der. The 'send' command may be abbreviated to 's', even though 's' is not a unique abbreviation for a top-level C-Kermit command. The wildcard (meta) characters `*' and `?' are accepted in fn. If `?' is to be included, it must be prefixed by `\' to override its normal function of provid- ingters. show Display values of 'set' parameters. space Display current disk space usage. statistics Display statistics about most recent transaction. take Execute commands from a file. The 'set' parameters are: block-check Level of packet error detection. delay How long to wait before sending first packet. duplex Specify which side echoes during 'connect'. escape-character Prefix for "escape commands" during 'connect'. file help. `*' matches any string, `?' matches any single character. Other notations for file groups, like `[a-z]og', are not available in interactive commands (though of course they are available on the command line). When fn contains `*' or `?' characters, there is a limit to the number of files that can be matched, which varies from system to system. If you get the message "Too many files match" then you'll have to make a more judicious selection. If fn was of the form usr/longnameSet various file parameters. flow-control Communication line full-duplex flow control. handshake Communication line half-duplex turnaround character. line Communication line device name. modem-dialer Type of modem-dialer on communication line. parity Communication line character parity. prompt Change the C-Kermit program's prompt. receive Parameters for inbound packets. UNIX KERMIT Page 128 /anotherlongname/* then C-Kermit's string space will fill up rapidly -- try doing a cwd (see below) to the path in question and reissuing the command. Note -- C-Kermit sends only from the current or specified directory. It does not traverse directory trees. If the source directory contains subdirectories, they will be skipped. Conversely, C-Kermit does not create directories when receiving files. If you have a need to do this, you can pipe tar through C-Kermit, as shown in the example send Parameters for outbound packets. speed Communication line speed. The 'remote' commands are: cwd Change remote working directory. delete Delete remote files. directory Display a listing of remote file names. help Request help from a remote server. host Issue a command to the remote host in its own command language space Display current disk space usage on remote system. type Display a remote file on yo on page 125, or under System III/V Unix you can use cpio. Another Note -- C-Kermit does not skip over "invisible" files that match the file specification; Unix systems usually treat files whose names start with a dot (like .login, .cshrc, and .kermrc) as invisible. Similarly for "temporary" files whose names start with "#". UNIX KERMIT Page 129 THE 'RECEIVE' COMMAND Syntax: receive - or - receive fn1 P, or start a shell. bye Terminate and log out a remote Kermit server. close Close a log file. connect Establish a terminal connection to a remote system. cwd Change Working Directory. dial Dial a telephone number. directory Display a directory listing. echo Display arguments literally. exit Exit from the program, closing any open logs. finish Instruct a remote Kermit server to exit, but not log out. ur screen. who Display who's logged in, or get information about a user. Most of these commands are described adequately in the Kermit User Guide. Spe- cial aspects of certain Unix Kermit commands are described below. THE 'SEND' COMMAND Syntax: send fn - or - send fn1 rfn1 Send the file or files denoted by fn to the other Kermit, which should be run- ning as a server, or which should be given the 'receive' command. Each file is sent under its own name assively wait for files to arrive from the other Kermit, which must be given the 'send' command -- the 'receive' command does not work in conjunction with a server (use 'get' for that). If fn1 is specified, store the first incoming file under that name. The 'receive' command may be abbreviated to 'r'. THE 'GET' COMMAND: Syntax: get rfn or: get rfn fn1 Request a remote Kermit server to send the named file or files. Since a remote utes a Unix shell command remote help Lists these capabilities Note that the Unix Kermit server cannot always respond to a BYE command. It will attempt to do so using "kill()", but this will not work on all systems or under all conditions. If the Kermit server is directed at an external line (i.e. it is in "local mode") then the console may be used for other work if you have 'set file dis- play off'; normally the program expects the console to be used to observe file transfers afile specification (or list) might contain spaces, which normally delimit fields of a C-Kermit command, an alternate form of the command is provided to allow the inbound file to be given a new name: type 'get' alone on a line, and you will be prompted separately for the remote and local file specifications, for example C-Kermit>get Remote file specification: foo Local name to store it under: bar As with 'receive', if more than one file arrives as a result of the 'get' com- mand, only nd enter status queries or interruption commands. The way to get C-Kermit into background operation from interactive command level varies from system to system (e.g. on Berkeley Unix you would halt the program with ^Z and then use the C-Shell 'bg' command to continue it in the background). The more common method is to invoke the program with the desired command line arguments, including "-q", and with a terminating "&". When the Unix Kermit server is given a 'remote host' command, it executes itthe first will be stored under the alternate name given by fn1; the remaining files will be stored under their own names if possible. If a `?' is to be included in the remote file specification, you must prefix it with `\' to suppress its normal function of providing help. If you have started a multiline 'get' command, you may escape from its lower- level prompts by typing a carriage return in response to the prompt, e.g. C-Kermit>get Remote file specification: foo Local name to store it under using the shell invoked upon login to the remote system, e.g. the Bourne shell or the Berkeley C-Shell. THE 'REMOTE', 'BYE', AND 'FINISH' COMMANDS: C-Kermit may itself request services from a remote Kermit server. In addition to the 'send' and 'get' commands, the following may also be used: remote cwd [directory] If the optional remote directory specification is included, you will be prompted on a separate line for a password, which will not echo as you : Type a carriage return here (cancelled) C-Kermit> THE 'SERVER' COMMAND: The 'server' command places C-Kermit in "server mode" on the currently selected communication line. All further commands must arrive as valid Kermit packets from the Kermit on the other end of the line. The Unix Kermit server can respond to the following commands: Command Server Response get Sends files send Receives files bye type it. remote delete rfn delete remote file or files. remote directory [rfn] directory listing of remote files. remote host command command in remote host's own command language. remote space disk usage report from remote host. remote type [rfn] display remote file or files on the screen. remote who [user] display information about who's logged in. remote help display remote server's capabilities. bye and finish: When Attempts to log itself out UNIX KERMIT Page 130 finish Exits to level from which it was invoked remote directory Sends directory lising remote delete Removes files remote cwd Changes working directory remote type Sends files to your screen remote space Reports about its disk usage remote who Shows who's logged in remote host Exec connected to a remote Kermit server, these commands cause the remote server to terminate; 'finish' returns it to Kermit or system command level (depending on the implementation or how the program was invoked); 'bye' also requests it to log itself out. UNIX KERMIT Page 131 THE 'LOG' AND 'CLOSE' COMMANDS: Syntax: log {debugging, packets, session, transactions} [ fn1 ] C-Kermit's progres a listing of the names, modes, sizes, and dates of files matching fn (which defaults to `*'). Equivalent to `ls -l'. cwd [directory-name] Changes Kermit's working directory to the one given, or to the your default directory if the directory name is omitted. Like 'cd', affects only the Kermit process and any processes it may subsequently create. space UNIX KERMIT Page 132 Display information about disk space and/or qscape back to your local Kermit and issue a 'receive' command. Normally 5 seconds. duplex {full, half} For use during 'connect'. Specifies which side is doing the echoing; 'full' means the other side, 'half' means C-Kermit must echo typein itself. escape-character cc For use during 'connect' to get C-Kermit's attention. The escape character acts as a prefix to an 'escape command', for instance to close the connec- tion and return to C-Kermit or Unix command level. s may be logged in various ways. The 'log' command opens a log, the 'close' command closes it. In addition, all open logs are closed by the 'exit' and 'quit' commands. A name may be specified for a log file; if the name is omitted, the file is created with a default name as shown below. log debugging This produces a voluminous log of the internal workings of C-Kermit, of use to Kermit developers or maintainers in tracking down suspected bugs in the C-Kermit program. Use of this featureuota in the current directory and device. ! [command] The command is executed by the Unix shell. If no command is specified, then an interactive shell is started; exiting from the shell, e.g. by typing Control-D, will return you to C-Kermit command level. C-Kermit at- tempts to use your preferred, customary shell. Use the `!' command to provide file management or other functions not explicitly provided by C-Kermit commands. The `!' command has certain dramatically slows down the Kermit protocol. Default name: debug.log. log packets This produces a record of all the packets that go in and out of the com- munication port. This log is of use to Kermit maintainers who are tracking down protocol problems in either C-Kermit or any Kermit that C-Kermit is connected to. Default name: packet.log. log session This log will contain a copy of everything you see on your screen during the 'connect' command, except for locpeculiarities: - At least one space must separate the '!' from the shell command. - A 'cd' command executed in this manner will have no effect -- use the C-Kermit 'cwd' command instead. THE 'SET' AND 'SHOW' COMMANDS: Since Kermit is designed to allow diverse systems to communicate, it is often necessary to issue special instructions to allow the program to adapt to peculiarities of the another system or the communication path. These instruc- tional messages or interaction with local escape commands. Default name: session.log. log transactions The transaction log is a record of all the files that were sent or received while transaction logging was in effect. It includes time stamps and statistics, filename transformations, and records of any errors that may have occurred. The transaction log allows you to have long unattended file transfer sessions without fear of missing some vital screen message. Des are accomplished by the 'set' command. The 'show' command may be used to display current settings. Here is a brief synopsis of settings available in the current release of C-Kermit: block-check {1, 2, 3} Determines the level of per-packet error detection. "1" is a single- character 6-bit checksum, folded to include the values of all bits from each character. "2" is a 2-character, 12-bit checksum. "3" is a 3-character, 16-bit cyclic redundancy check (CRC). The fault name: transact.log. The 'close' command explicitly closes a log, e.g. 'close debug'. Note: Debug and Transaction logs are a compile-time option; C-Kermit may be compiled without these logs, in which case it will run faster, it will take up less space on the disk, and the commands relating to them will not be present. LOCAL FILE MANAGEMENT COMMANDS: Unix Kermit allows some degree of local file management from interactive com- mand level: directory [fn] Displays higher the block check, the better the error detection and correction and the higher the resulting overhead. Type 1 is most commonly used; it is supported by all Kermit implementations, and it has proven adequate in most circumstances. Types 2 or 3 would be used to advantage when transferring 8-bit binary files over noisy lines. delay n How many seconds to wait before sending the first packet after a 'send' command. Used in remote mode to give you time to etext, which means that conversion is done between Unix newline characters and the carriage-return/linefeed sequences required by the canonical Kermit file transmission format, and in common use on non- Unix systems. Binary means to transmit file contents without conver- sion. Binary (`-i' in command line notation) is necessary for binary files, and desirable in all Unix-to-Unix transactions to cut down on overhead. warning {on, off} inal connection, e.g. /dev/ttyi3. If you specify a device name, Kermit will be in local mode, and you should remember to issue any other necessary 'set' commands, such as 'set speed'. If you omit the device name, Kermit will revert to its default mode of operation. When Unix Kermit enters lo- cal mode, it attempts to synchronize with other programs (like uucp) that use external communication lines so as to prevent two programs using the same line at once. The method useNormally off, which means that incoming files will silently overwrite existing files of the same name. When on (`-w' on command line) Kermit will check if an arriving file would overwrite an existing file; if so, it will construct a new name for the arriving file, of the form foo~n, where foo is the name they share and n is a "generation number"; if foo exists, then the new file will be called foo~1. If foo and foo~1 ex- ist, the new file will be foo~d is the "uucp lock file", explained in more detail later. modem-dialer {direct, hayes, racalvadic, ventel, ...} The type of modem dialer on the communication line. "Direct" indicates ei- ther there is no dialout modem, or that if the line requires carrier detec- tion to open, then 'set line' will hang waiting for an incoming call. "Hayes", "Ventel", and the others indicate that 'set line' (or the -l argument) will prepare for a subsequent 'dial' command for the The normal escape character is Control-Backslash (28). The escape character is also used in System III/V implementations, to prefix interrupt commands during file transfers. file {display, names, type, warning} Establish various file-related parameters: UNIX KERMIT Page 133 display {on, off} Normally 'on'; when in local mode, display progress of file transfers on the screen (stdout), and listen to 2, and so on. If the new name would be longer than the maximum length for a filename, then characters would be deleted from the end first, for instance, thelongestname on a system with a limit of 14 characters would become thelongestn~1. CAUTION: If Control-F or Control-B is used to cancel an incom- ing file, and a file of the same name previously existed, and the "file warning" feature is not enabled, then the previous copy the keyboard (stdin) for inter- ruptions. If off (-q on command line) none of this is done, and the file transfer may proceed in the background oblivious to any other work concurrently done at the console terminal. names {converted, literal} Normally converted, which mean that outbound filenames have path specifications stripped, lowercase letters raised to upper, tildes and extra periods changed to X's, and an X inserted in front of any naof the file will disappear. flow-control {none, xon/xoff} Normally xon/xoff for full duplex flow control. Should be set to 'none' if the other system cannot do xon/xoff flow control, or if you have issued a 'set handshake' command. If set to xon/xoff, then handshake should be set to none. This setting applies during both terminal connection and file transfer. handshake {xon, xoff, cr, lf, bell, esc, none} Normally none. Otherwise, half-duplex communication line turnaroume that starts with period. Incoming files have uppercase letters lowered. Literal means that none of these conversions are done; there- fore, any directory path appearing in a received file specification must exist and be write-accessible. When literal naming is being used, the sender should not use path names in the file specification unless the same path exists on the target system and is writable. type {binary, text} Normally nd hand- shaking is done, which means Unix Kermit will not reply to a packet until it has received the indicated handshake character or has timed out waiting for it; the handshake setting applies only during file transfer. If you UNIX KERMIT Page 134 set handshake to other than none, then flow should be set to none. line [device-name] The device name for the communication line to be used for file transfer and termlow). end-of-packet cc Specifies the control character needed by the other Kermit to recognize the end of a packet. C-Kermit sends this character at the end of each packet. Normally 13 (carriage return), which most Kermit implemen- tations require. Other Kermits require no terminator at all, still others may require a different terminator, like linefeed (10). packet-length n Specify the maximum packet length to send. Normally 90. her Kermit to terminate its packets with the specified character. packet-length n Specify the maximum packet length to that you want the other Kermit to send. Normally 90. pad-character cc C-Kermit normally does not need to have incoming packets preceded with pad characters. This command allows C-Kermit to request the other Ker- mit to use cc as a pad character. Default cc is NUL, ASCII 0. padding n How many pad characters to ask Shorter packet lengths can be useful on noisy lines, or with systems or front ends or networks that have small buffers. The shorter the packet, the higher the overhead, but the lower the chance of a packet being cor- rupted by noise, and the less time to retransmit corrupted packets. pad-character cc Designate a character to send before each packet. Normally, none is sent. Outbound padding is sometimes necessary for communicating with UNIXfor, normally 0. start-of-packet cc Change the prefix C-Kermit looks for on inbound packets to correspond with what the other Kermit is sending. timeout n Normally, each Kermit partner sets its packet timeout interval based on what the opposite Kermit requests. This command allows you to override the normal procedure and specify a timeout interval for Unix Kermit to use when waiting for packets from the other Kermit. If you specify 0, t KERMIT Page 135 slow half duplex systems that provide no other means of line turnaround control. It can also be used to send special characters to communica- tions equipment that needs to be put in "transparent" or "no echo" mode, when this can be accomplished in by feeding it a certain control character. padding n How many pad characters to send, normally 0. start-of-packet cc hen no timeouts will occur, and Unix Kermit will wait forever for ex- pected packets to arrive. UNIX KERMIT Page 136 speed {0, 110, 150, 300, 600, 1200, 1800, 2400, 4800, 9600} The baud rate for the external communication line. This command cannot be used to change the speed of your own console terminal. Many Unix systems are set up in such a way that you must give this command after a 'set line' command before yogiven dialer. Support for new dialers is added from time to time, so type 'set modem ?' for a list of those supported in your copy of Kermit. See the description of the 'dial' command parity {even, odd, mark, space, none} Specify character parity for use in packets and terminal connection, nor- mally none. If other than none, C-Kermit will seek to use the 8th-bit prefixing mechanism for transferring 8-bit binary data, which can be used successfully only if the The normal Kermit packet prefix is Control-A (1); this command changes the prefix C-Kermit puts on outbound packets. The only reasons this should ever be changed would be: Some piece of equipment somewhere be- tween the two Kermit programs will not pass through a Control-A; or, some piece of of equipment similarly placed is echoing its input. In the latter case, the recipient of such an echo can change the packet prefix for outbound packetsother Kermit agrees; if not, 8-bit binary data cannot be successfully transferred. prompt [string] The given string will be substituted for "C-Kermit>" as this program's prompt. If the string is omitted, the prompt will revert to "C-Kermit>". send parameter Establish parameters to use when sending packets. These will be in effect only for the initial packet sent, since the other Kermit may override these parameters during the protocol parameter exchange (unless noted be to be different from that of arriving pack- ets, so that the echoed packets will be ignored. The opposite Kermit must also be told to change the prefix for its inbound packets. timeout n Specifies the number of seconds you want the other Kermit to wait for a packet before timing it out and requesting retransmission. receive parameter Establish parameters to request the other Kermit to use when sending pack- ets. end-of-packet cc Requests the otrmit maintainers. THE 'STATISTICS' COMMAND: The statistics command displays information about the most recent Kermit protocol transaction, including file and communication line i/o, as well as what encoding options were in effect (such as 8th-bit prefixing, repeat-count compression). THE 'TAKE' AND 'ECHO' COMMANDS: Syntax: take fn1 The 'take' command instructs C-Kermit to execute commands from the named file. The file may contain any in the commands as well as their output, you could feed the command file to C-Kermit via redirected stdin, as in 'kermit < cmdfile' Errors encountered during execution of take files (such as failure to complete dial or script operations) cause termination of the current take file, popping to the take file that invoked it, or to interactive level. When kermit is ex- ecuted in the background, errors during execution of a take file are fatal. THE 'CONNECT' COMMAND: The conteractive C-Kermit commands, including 'take'; com- mand files may be nested to any reasonable depth. The 'echo' command may be used within command files to issue greetings, announce progress, etc. Command files are in exactly the same syntax as interactive commands. Note that this implies that if you want to include special characters like question mark or backslash that you would have to quote with backslash when typing in- teractive commands, you must quote these characters the same waynect command links your terminal to another computer as if it were a lo- cal terminal to that computer, through the device specified in the most recent 'set line' command, or through the default device if your system is a PC or workstation. All characters you type at your keyboard are sent out the com- munication line, all characters arriving at the communication port are dis- played on your screen. Current settings of speed, parity, duplex, and flow- control are honored. If you have is in command files. Long lines may be continued by ending them with a single backslash. Command files may be used in lieu of command macros, which have not been imple- mented in this version of C-Kermit. For instance, if you commonly connect to a system called 'B' that is connected to ttyh7 at 4800 baud, you could create a file called b containing the commands set line /dev/ttyh7 set speed 4800 echo Connecting to System B... connect and then simply type 'take b' (or 't b' since no other commasued a 'log session' command, everything you see on your screen will also be recorded to your session log. This provides a way to "capture" files from systems that don't have Kermit programs available. To get back to your own system, you must type the escape character, which is Control-Backslash (^\) unless you have changed it with the 'set escape' com- mand, followed by a single-character command, such as 'c' for "close connection". Single-character commands include: c Cnds begin with the letter 't') whenever you wished to connect to system B. For connecting to IBM mainframes, a number of 'set' commands are required; UNIX KERMIT Page 137 these, too, are conveniently collected into a 'take' file like this one: set speed 1200 set parity mark set handshake xon set flow-control none set duplex half An implicit 'take' command is executed upon your .kermrc file upon C-Kermit's initial entry into ilose the connection b Send a BREAK signal 0 (zero) send a null s Give a status report about the connection ^\ Send Control-Backslash itself (whatever you have defined the escape character to be, typed twice in a row sends one copy of it). UNIX KERMIT Page 138 Uppercase and control equivalents for these letters are also accepted. A space typed after the escape character is ignored. Any other character will pru can use the line. 'set baud' is an acceptable synomym for 'set speed'. THE 'SHOW' COMMAND: Syntax: show {parameters, versions} The show command displays the values of all the 'set' parameters described above. If you type 'show versions', then C-Kermit will display the version numbers and dates of all its internal modules. You should use the 'show versions' command to ascertain the vintage of your Kermit program before reporting problems to Kenteractive dialog. The .kermrc file should contain 'set' or other commands you want to be in effect at all times. For instance, you might want override the default action when incoming files have the same names as existing files -- in that case, put the command set file warning on in your .kermrc file. On some non-Unix systems that run C-Kermit, this file might have a different name, such as kermit.ini. Commands executed from take files are not echoed at the terminal. If you want to seeoduce a beep. The connect command simply displays incoming characters on the screen. It is assumed any screen control sequences sent by the host will be handled by the firmware in your terminal or PC. If terminal emulation is desired, then the connect command can invoked from the Unix command line (-c or -n), piped through a terminal emulation filter, e.g. kermit -l /dev/acu -b 1200 -c | tek 'c' is an acceptable non-unique abbreviation for 'connect'. Tor message to be issued by the remote site, and send is the string (names, numbers, etc) to return. The send may also be the keyword EOT, to send Control-D, or BREAK, to send a break signal. Letters in send may be prefixed by `~' to send special characters. These are: ~b backspace ~s space ~q `?'(trapped by Kermit's command interpreter) ~n linefeed ~r carriage return ~t tab ~' single quote ~~ tilde ~" double quote ~x XON (Control-Q) ~c doHE 'DIAL' COMMAND: Syntax: dial telephone-number-string This command controls dialout modems. The telephone-number-string may contain modem-dialer commands, such as comma for Hayes pause, or `&' for Ventel dial- tone wait and `%' for Ventel pause. Because modem dialers have strict requirements to override the carrier-detect signal most Unix implementations expect, the sequence for dialing is more rigid than most other C-Kermit procedures. Example one: kermit -l /dev/cul0 -b 1200 C-Kermit>set n't append a carriage return ~o[o[o]] an octal character ~d delay approx 1/3 second during send ~w[d[d]] wait specified interval during expect, then time out As with some uucp systems, sent strings are followed by ~r unless they have a ~c. Only the last 7 characters in each expect are matched. A null expect, e.g. ~0 or two adjacent dashes, causes a short delay before proceeding to the next send sequence. A null expect always succeeds. As with uucp, if the expect string does not arrivemodem-dialer hayes hint: abbreviate set m h C-Kermit>dial 9,5551212 Connected! C-Kermit>connect hint: abbreviate c logon, request remote server, etc. C-Kermit> ... C-Kermit>quit hint: abbreviate q this disconnects modem, and unlocks line. Example two: kermit C-Kermit>set modem-dialer ventel C-Kermit>set line /dev/cul0 C-Kermit>dial 9&5551212% Connected! C-Kermit> ... Example three: kermit C-Kermit>take my-dial-procedure Connected! , the script attempt fails. If you expect that a sequence might not arrive, as with uucp, conditional se- UNIX KERMIT Page 140 quences may be expressed in the form: -send-expect[-send-expect[...]] where dashed sequences are followed as long as previous expects fail. Timeouts for expects can be specified using ~w; ~w with no arguments waits 15 seconds. Expect/send transactions can be easily be debugged by logging transactions. Thi UNIX KERMIT Page 139 file my-dial-procedure: set modem hayes set line /dev/tty99 dial 5551212 connect For Hayes dialers, two important switch settings are #1 and #6. #1 should be up so that the DTR is only asserted when the line is 'open'. #6 should be up so carrier-detect functions properly. Switches #2 (English versus digit result codes) and #4 (Hayes echoes modem commands) may be in either position. s records all exchanges, both expected and actual. Note that `\' characters in login scripts, as in any other C-Kermit interactive commands, must be doubled up. A line may be ended with a single `\' for con- tinuation. Example one: Using a modem, dial a UNIX host site. Expect "login" (...gin), and if it doesn't come, simply send a null string with a ~r. (Some Unixes require either an EOT or a BREAK instead of the null sequence, depending on the particular site's "logger" program.) After p THE 'SCRIPT' COMMAND: Syntax: script expect send [expect send] . . . "expect" has the syntax: expect[-send-expect[-send-expect[...]]] This command facilitates logging into a remote system and/or invoking programs or other facilities after login on a remote system. This login script facility operates in a manner similar to that commonly used by the Unix uucp System's "L.sys" file entries. A login script is a sequence of the form: expect send [expect send] . . . where expect is a prompt roviding user id and password, respond "x" to a question-mark prompt, expect the Bourne shell "$" prompt (and send return if it doesn't arrive). Then cd to directory kermit, and run the program called "wermit", entering the interactive connect state after wermit is loaded. set modem-dialer ventel set line /dev/tty77 set baud 1200 dial 9&5551212 script gin:--gin:--gin: smith ssword: mysecret ~q x $--$ \ cd~skermit $ wermit connect Example two: Using a modem, dial the Telenet network. level by typing a question mark at any point. A slightly more verbose form of help is available through the 'help' command. The 'help' command with no arguments prints a brief summary of how to enter commands and how to get further help. 'help' may be followed by one of the top-level C-Kermit command keywords, such as 'send', to request information about a command. Commands such as 'set' and 'remote' have a further level of help. Thus you may type 'help', 'help set', or 'help set parity'; ea/usr/spool/uucp/LCK..ttyi6 In this case, you would look up user fdc to find out how soon the line will be- come free. This convention requires that the uucp directory be publicly readable and writable. If it is not, the program will issue an appropriate warning message, but will allow you to proceed at your own risk (and the risk of anyone else who might also be using the same line). If no lock file is found, Unix Kermit will attempt create one, thus preventing anyone who subsequently tries to rThis network expects three returns with slight delays between them. These are sent following null expects. The single return is here sent as a null string, with a return appended by default. Four returns are sent to be safe before looking for the prompt. Then the Telenet id and password are entered. Then telenet is instructed to connect to a host site (c 12345). The host has a data switch, and to "which system" it responds "myhost". This is followed by a TOPS-20 logon, and a request to ch will provide a successively more detailed level of help. UNIX KERMIT Page 142 THE 'EXIT' AND 'QUIT' COMMANDS: These two commands are identical. Both of them do the following: - Attempt to insure that the terminal is returned to normal. - Relinquish access to any communication line assigned via 'set line'. - Relinquish any uucp and multiuser locks on the communications line. - Hang up the modem, if the co load Kermit, set even parity, and enter the server mode. Files are then exchanged. The commands are in a take file; note the continuation of the 'script' command onto several lines using the `\' terminator. UNIX KERMIT Page 141 set modem-dialer hayes set line /dev/cul0 set baud 1200 dial 9,5551212 set parity even script ~0 ~0 ~0 ~0 ~0 ~0 ~0 ~0 @--@--@ id~saa001122 = 002211 @ \ c~s12345 ystem-c~s12345-ystem myhost @ joe~ssecmmunications line supports data terminal ready. - Close any open log files. After exit from C-Kermit, your default directory will be the same as when you started the program. The 'exit' command is issued implicitly whenever C-Kermit halts normally, e.g. after a command line invocation, or after certain kinds of interruptions. 9.5. UUCP Lock Files Unix has no standard way of obtaining exclusive access to an external com- munication line. When you issue the 'set line' command to Unix ret @ kermit \ > set~sparity~seven > server send some.stuff get some.otherstuff bye quit Since these commands may be executed totally in the background, they can also be scheduled. A typical shell script, which might be scheduled by cron, would be as follows (csh used for this example): # #keep trying to dial and log onto remote host and exchange files #wait 10 minutes before retrying if dial or script fail. # while ( 1 ) kermit < tonight.cmd & if ( ! $statuKermit, Unix would normally grant you access to the line even if some other process is making use of it. The method adopted by most Unix systems to handle this situation is the "UUCP lock file". UUCP, the Unix-to-Unix Copy program, creates a file in its directory (usually /usr/spool/uucp, on some systems /etc/locks) with a name like LCK..name, where name is the device name, for in- stance tty07. Unix Kermit uses UUCP lock files in order to avoid conflicts with UUCP, tip, or othes ) break sleep 600 end File tonight.cmd might have two takes in it, for example, one to take a file with the set modem, set line, set baud, dial, and script, and a second take of a file with send/get commands for the remote server. The last lines of tonight.cmd should be a bye and a quit. THE 'HELP' COMMAND: Syntax: help or: help keyword or: help {set, remote} keyword Brief help messages or menus are always available at interactive command r programs that follow this convention. Whenever you attempt to access an external line using the 'set line' command or `-l' on the command line, Kermit looks in the UUCP directory for a lock file corresponding to that device. For instance, if you 'set line /dev/ttyi6' then Kermit looks for the file /usr/spool/uucp/LCK..ttyi6 If it finds this file, it gives you an error message and a directory listing of the file so that you can see who is using it, e.g. -r--r--r-- 1 fdc 4 May 7 13:02 9.6. C-Kermit under Berkeley or System III/V Unix: C-Kermit may be interrupted at command level or during file transfer by typing Control-C. The program will perform its normal exit function, restoring the terminal and releasing any lock. If a protocol transaction was in progress, an error packet will be sent to the opposite Kermit so that it can terminate cleanly. C-Kermit may be invoked in the background ("&" on shell commmand line). If a background process is "killed", the user will havely. C-Kermit runs in local mode on the Pro-3xx when invoked from the con- sole; the default device is /dev/com1.dout. When connected to a remote system (using C-Kermit's 'connect' command), Pro/Venix itself (not Kermit) provides VT52 terminal emulation. Terminal operation at high speeds (like 9600 baud) requires xon/xoff flow control, which unfortunately interferes with applica- tions such as the EMACS that use Control-Q and Control-S as commands. When logging in to a Pro-3xx (or any work to manually remove any lock file and may need to restore the modem. This is because the kill signal (kill(x,9)) cannot be trapped by Kermit. During execution of a system command ('directory', 'cwd', or `!'), C-Kermit can often be returned to command level by typing a single Control-C. (With System III/V, the usual interrupt function (often the DEL key) is replaced by Control-C.) Under Berkeley Unix only: C-Kermit may also be interrupted by ^Z to put the process in the background. station) through the "back port", it may be necessary to give the command "set line /dev/tty" in order to get C-Kermit to function correctly in remote mode (on a system in which it normally expects to be operating in local mode). 9.8. C-Kermit under VAX/VMS Version 4C of C-Kermit can be built using VAX-11 C to run under VMS. Most of the descriptions in this manual hold true, but it should be noted that as of this writing the VMS support is not thoroughly tested, and no explicit support exisun Kermit, UUCP, tip, or similar programs on the same line from gaining access until you release the line. If Kermit could not create the lock file (for instance because the uucp directory is write- protected), then you will receive a warning message but will be allowed to proceed at your -- and everyone else's -- risk. When Kermit terminates nor- mally, your lock file is removed. UNIX KERMIT Page 143 When a lock-creating program In this case the terminal is not restored. You will have to type Control-J followed by "reset" followed by another Control-J to get your terminal back to normal. Control-C, Control-Z, and Control-\ lose their normal functions during terminal connection and also during file transfer when the controlling tty line is being used for packet i/o. If you are running C-Kermit in "quiet mode" in the foreground, then interrupt- ing the program with a console interrupt like Control-C will not restore theabruptly terminates, e.g. because it crashes or is killed via shell command, the lock file remains in the uucp directory, spuriously indicating that the line is in use. If the lock file is owned by yourself, you may remove it. Otherwise, you'll have to get the owner or the system manager to remove it, or else wait for a system task to do so; uucp sup- ports a function (uuclean) which removes these files after a predetermined age -- uucp sites tend to run this function periodically via cron terminal to normal conversational operation. This is because the system call to enable console interrupt traps will cause the program to block if it's run- ning in the background, and the primary reason for quiet mode is to allow the program to run in the background without blocking, so that you can do other work in the foreground. If C-Kermit is run in the background ("&" on shell commmand line), then the in- terrupt signal (Control-C) (and System III/V quit signal) are ignored. This preventab. Locking is not needed, or used, if communications occur over the user's login terminal line (normally /dev/tty). It may be seen that line locking is fraught with peril. It is included in Unix Kermit only because other Unix communication programs rely on it. While it is naturally desirable to assure exclusive access to a line, it is also un- desirable to refuse access to a vacant line only because of a spurious lock file, or because the uucp directory is not appropriately protected. ts an interrupt signal intended for a foreground job (say a compilation) UNIX KERMIT Page 144 from being trapped by a background Kermit session. 9.7. C-Kermit on the DEC Pro-3xx with Pro/Venix Version 1 The DEC Professional 300 series are PDP-11/23 based personal computers. Venix Version 1 is a Unix v7 derivative. It should not be confused with Venix Ver- sion 2, which is based on ATT System V; these comments apply to Venix Version 1 on do, the program has no way of knowing whether a specific port's serial i/o controller supports those rates. 4. Modem controls: If a connection is made over a communication line UNIX KERMIT Page 145 (rather than on the controlling terminal line), and that line has modem controls, (e.g. data terminal ready and carrier detection implementation), returning to the shell level will disconnect the seconds after modifying that file be- fore the logger sees it and actually disables the line. 7. Using C-Kermit on Local Area Networks: C-Kermit can successfully operate at speeds up to 9600 baud over LANs. Testing has, however, shown that most processors, whether PC/XTs with PC/IX, or Vaxes, need flow control at these rates. A command, "set flow x" should be issued to each end of this form of connection. If the LAN is the sort with an interface ca conversation. In that case, one should use interactive mode com- mands, and avoid use of piped shell-level operation (also see 'set modem-dialer' and 'dial' commands.) 5. Login Scripts: The present login scripts implementation follows the Unix conventions of uucp's "L.sys" file, rather than the normal Ker- mit "INPUT/OUTPUT" style, so there's no way to arbitrarily mingle script output with Kermit commands (e.g. changing parity or duplex in the middle ofrd (or box, like the Sytek), then the interface card/box must be programmed to handle the flow control characters (xon and xoff) at the card/box level (rather than forwarding these characters to the remote site). This is be- cause packetizing LANs will not deliver the xoff character to the other end, after packetization, until long after the receive buffer has been overrun. 8. Resetting terminal after abnormal termination or kill: When C-Kermit terminates a script). 6. Dial-out vs dial-in communications lines: C-Kermit requires a dial-out line for the "set line" or "-l" options. Most systems have some lines dedicated to dial-in, which they enable "loggers" on, and some lines available for dial-out. Where a line must be shared be- tween dial-in and dial-out, several options are available (though they are, strictly speaking, outside the pervue of C-Kermit). A simple shell program can be used to change di abnormally (say, for example, by a kill command issued by the operator) the user may need to reset the terminal state. If commands do not seem to be accepted at the shell prompt, try UNIX KERMIT Page 146 Control-J "stty sane" Control-J (use "reset" on Berkeley Unix). That should take the terminal out of "raw mode" if it was stuck there. 9. Remote host commands may time-out on lengthts for the various types of VMS files and their attributes. The C-Kermit init file for VMS is called KERMIT.INI. 9.9. C-Kermit on the Macintosh The "protocol kernel" of C-Kermit is also used by Columbia's Macintosh Kermit. The user and system interface is entirely different, and is covered in a separate document. 9.10. C-Kermit Restrictions and Known Bugs 1. Comments in commands: There is no way to include comments in com- mands, either in take files or interactively. 2. Editirectionality of the line if your Unix has the enable(8) and disable(8) commands. In that case, the shell program could "grep" a "who" to see if anybody is logged onto the desired line; if not, it could "disable" the line. The shell program will need to be set-uID'ed to root. The shell program can be called from kermit prior to a dial command, e.g., "! mydisable.shellprog". Prior to the final "quit" from C-Kermit, another shell program coulng characters: The program's interactive command interrupt, delete, and kill characters are Control-C, Delete (or Backspace), and Control-U, respectively. There is currently no way to change them to suit your taste or match those used by your shell, in case those are different. 3. High baud rates: There's no way to specify baud rates higher than 9600 baud. Most Unix systems don't supply symbols for them (unless you use EXTA, EXTB), and even when theyd be executed to "enable" the line again. This program also needs to be set-uID'ed to root. If your Unix lacks the enable(8) and disable(8) commands, another common technique works if your system supports the /etc/ttys file. A shell program could call up an awk program to find the line in the file and set the enable byte to 0 (to directly disable the line). Likewise, it can be reenabled by a counterpart at the end. It may be necessary to pause for 60Though login scripts appear to work properly on most processors, in the case of the PC/XT with PC/IX, it appears that longer scripts need to be broken up into shorter scripts (invoked sequentially from the take file). This is because the portion of the script handler which checks if an opera- tion timed out seems to leave the processor in a strange state (i.e. hung). 9.11. How to Build C-Kermit for a Unix System The C-Kermit files, as distributed from - list of known bugs upd: Program update log mak: Makefile is a single character to tell what system the file applies to: a: Descriptive material, documentation c: All systems with C compilers m: Macintosh u: Unix v: VAX/VMS w: Wart is mnemonic (up to 3 characters) for what's in the file: aaa: A "read-me" file, like this one cmd: Command parsing con: Connect command deb: Debug/Transaction Log formats, Typedefs dia: Modem/Dialer control Columbia, all begin with the prefix "ck". You should make a directory for these files and then cd to it. A makefile is provided to build C-Kermit for various Unix systems (there are separate makefiles for VMS and the Macintosh). As distributed, the makefile has the name "ckuker.mak". You should rename it to "makefile" and then type "make xxx", where xxx is the symbol for your system, for instance "make bsd" to make C-Kermit for 4.x BSD Unix. The result will be a program called "wermi fio: System-depdendent File I/O fns: Protocol support functions fn2: More protocol support functions ker: General C-Kermit definitions, information, documentation mai: Main program pro: Protocol scr: Script command tio: System-dependent terminal i/o & control and interrupt handing usr: User interface us2: More user interface us3: Still more user interface Examples: ckufio.c File i/o for Unix ckmtio.c Terminal i/o for Macintosh ckuker.mss Scribe source fot". You should test this to make sure it works; if it does, then you can rename it to "kermit" and install it for general use. See the makefile for a list of the systems supported and the corresponding "make" arguments. 9.12. Adapting C-Kermit to Other Systems C-Kermit is designed for portability. The level of portability is indicated in parentheses after the module name: "C" means any system that has a C compiler that conforms to the description in "The C Programming Language" by Kernighan & Ritchir for Kermit User Guide chapter ckuker.nr Nroff source file for Unix C-Kermit man page The following material discusses each of the C-Kermit modules briefly. ckcmai.c, ckcker.h, ckcdeb.h (Cf): This is the main program. It contains declarations for global variables and a small amount of code to initialize some variables and invoke the com- mand parser. In its distributed form, it assumes that command line ar- guments are passed to it via argc and argv. Since this portion ofe (Prentice-Hall, 1978). "Cf" is like "C", but also requires "standard" features like printf and fprintf, argument passing via argv/argc, and so on, as described in Kernighan & Ritchie. "Unix" means the module should be useful un- der any Unix implementation; it requires features such as fork() and pipes. Anything else means that the module is particular to the indicated system. C-Kermit file names are of the form: ck. where the part before the dot is no more than 6 charact code is only several lines long, it should be easy to replace for systems that have different styles of user interaction. The header files define symbols and UNIX KERMIT Page 148 macros used by the various modules of C-Kermit. ckcdeb.h is the only header file that is included by all the C-Kermit modules, so it contains not only the debug format definitions, but also any compiler-dependent typedefs. ckway activity: Using "remote host" to instruct the C-Kermit server to invoke Unix func- tions (like "make") that might take a long time to produce output can cause timeout conditions. 10. XOFF deadlocks: When connecting back to C-Kermit after a trans- action, or after finishing the server, it may be necessary to type a Control-Q to clear up an XOFF deadlock. There's not much the program can do about this... 11. PC/IX Login Scripts -- Unfound Bug: ers long, the part after the dot no more than 3 characters long, and: is the file type: UNIX KERMIT Page 147 c: C language source h: Header file for C language source w: Wart preprocessor source, converted by Wart (or Lex) to a C program nr: Nroff/Troff text formatter source mss: Scribe text formatter source doc: Documentation hlp: Help text bld: Instructions for building the program bwr: A "beware" filert.c (Cf), ckcpro.w (C): The ckcpro module embodies the Kermit protocol state table and the code to accomplish state switching. It is written in "wart", a language which may be regarded as a subset of the Unix "lex" lexical analyzer generator. Wart implements enough of lex to allow the ckprot module to function. Lex it- self was not used because it is proprietary. The protocol module ckcpro.w is read by wart, and a system-independent C program is produced. The syn- taxh, ckuusr.c, ckuus2.c, ckuus3.c (Unix): This is the "user interface" for C-Kermit. It includes the command parser, the screen output functions, and console input functions. The command par- ser comes in two pieces -- the traditional Unix command line decoder (which is quite small and compact), and the interactive keyword parser (which is rather large). This module is fully replacable; its interface to the other modules is very simple, and is explained at the beginning of the of a Wart program is illustrated by ckcpro.w, and is described in ckwart.doc. ckcfns.c (C): The module contains all the Kermit protocol support functions -- packet formation, encoding, decoding, block check calculation, filename and data conversion, protocol parameter negotiation, and high-level interaction with the communication line and file system. To accommodate small systems, this module has been split into two -- ckcfns.c and ckcfn2.c. ckutio.c: This module source file. The ckuser module also includes code to execute any commands directly which don't require the Kermit protocol -- local file management, etc. The module is rated "Unix" because it makes occasional use of the UNIX KERMIT Page 149 system() function. Note that while ckuser is logically one module, it has been split up into three C source files, plus a header file for the symbols they share in ccontains the system-dependent primitives for communication line i/o, timers, and interrupts for the various versions of Unix. Certain im- portant variables are defined in this module, which determine whether C-Kermit is by default remote or local, what the default communication device is, and so forth. The tio module maintains its own private database of file descriptors and modes for the console terminal and the file trans- fer communication line so that other modulom- mon. This is to accommodate small systems that cannot handle big modules. ckuusr.c has the command line and top-level interactive command parser; ckuus2.c has the help command and strings; ckuus3 has the set and remote commands along with the logging, screen, and "interrupt" functions. ckucmd.c, ckucmd.h (Cf): This is an interactive command parsing package developed for C-Kermit. It is written portably enough to be usable on any system that has a C compiler that ses (like ckcfns or the terminal connect module) need not be concerned with them. The variations among Unix implementations with respect to terminal control and timers are accom- modated via conditional compilation. ckufio.c: This module contains system-dependent primitives for file i/o, wildcard (meta character) expansion, file existence and access checking, and system command execution for the various versions of Unix. It maintains an inter- nal database of i/o "chaupports functions like printf. The file name parsing functions depend upon primitives defined in the fio module; if these primitives can- not be supplied for a certain system, then the filename parsing functions can be deleted, and the package will still be useful for parsing keywords, numbers, arbitrary text strings, and so forth. The style of interaction is the same as that found on the DECSYSTEM-20. ckucon.c (Unix): This is the connect module. As supplied, it should nnels" (file pointers in this case) for the files C-Kermit cares about -- the input file (the file which is being sent), the output file (the file being received), the various logs, the screen, and so forth. This module varies little among Unix implementations except for the wildcard expansion code; the directory structure of 4.2bsd Unix is dif- ferent from that of other Unix systems. Again, variation among Unix sys- tems is selected using conditional compilation. ckuusr.operate in any Unix en- vironment, or any C-based environment that provides the fork() function. The module requires access to global variables that specify line speed, parity, duplex, flow control, etc, and invokes functions from the tio module to accomplish the desired settings and input/output, and functions from the fio module to perform session logging. No terminal emulation is performed, but since standard i/o is used for the console, this may be pipeoccur which is necessary to run programs larger than 64K on a non-I-and-D-space machine. - Keep strings short; many compilers have restrictive maximum lengths. - Keep (f,s)printf formats short. If these exceed some compiler de- pendent maximum (say, 128) memory will be overwritten and the program will probably core dump. - Do not introduce system dependencies into ckcpro.w or ckcfn*.c. - If a variable is a character, declare as CHAR, not int, to prevent the varioue. .TP .I n A decimal number between 0 and 94. .TP .I c A decimal number between 0 and 127 representing the value of an ASCII character. .TP .I cc A decimal number between 0 and 31, or else exactly 127, representing the value of an ASCII control character. .TP .B [ ] Any field in square braces is optional. .TP {\fIx,y,z\fR} Alternatives are listed in curly braces. .RE 1 .PP .I Kermit command line options may specify either actions or settings. If .I Kermit is invoked with a command line that specifies no ad through a terminal emulation filter. The ckucon function may be en- tirely replaced, so long as the global settings are honored by its replace- ment. PC implementations of C-Kermit may require the ck?con module to do screen control, escape sequence interpretation, etc, and may also wish to write special code to get the best possible performance. ckudia.c (Unix): This is the dialer module. As supplied, it handles Hayes, Ventel, Penril, Racal-Vadic, and several other modemss sign extension and byte swapping foulups that occur when characters are placed in integer variables. In general, remember that this program will have to be compilable by old com- pilers and runnable on small systems. me compiler de- pendent maximum (say, 128) memory will be overwritten and the program will probably core dump. - Do not introduce system dependencies into ckcpro.w or ckcfn*.c. - If a variable is a character, declare as CHAR, not int, to prevent the variou. ckuscr.c (Unix): This is the login script module. As supplied, it handles uucp-style scripts. Moving C-Kermit to a new system entails: 1. Creating a new tio module in C, assembler, or whatever language is most appropriate for system programming on the new system. If the system is Unix-like, then support may be added within the ckutio.c module itself. 2. Creating a new fio module, as above. 3. If the system is not Unix-like, then a new ckuser module mackuker.nr 644 0 3 34200 3507351146 5660 y be re- quired, as well as a different invocation of it from ckmain. 4. If the distributed connect module doesn't work or performs poorly, then it may be replaced. For instance, interrupt-driven i/o may be required, especially if the system doesn't have forks. UNIX KERMIT Page 150 Those who favor a different style of user/program interaction from that provided in ckuusr.c may replace the entire module, for ins.TH KERMIT 1C LOCAL .SH NAME kermit \- kermit file transfer .SH SYNOPSIS .B kermit [ option ...] [file ...] .SH DESCRIPTION .I Kermit is a file transfer program that allows files to be moved between machines of many different operating systems and architectures. This man page describes version 4C of the program. .PP Arguments are optional. If .I Kermit is executed without arguments, it will enter command mode. Otherwise, .I kermit will read the arguments off the command line and interpret them. .RE 1 .PP Ttance with one that provides a mouse/window/icon environment, a menu/function-key environment, etc. A few guidelines should be followed to maintain portability: - Keep variable and function names to 6 characters or less. Don't use identifiers that are distinguished from one another only by al- phabetic case. - Keep modules small. For instance, on a PDP-11 it is necessary to keep the code segment of each module below 8K in order to allow the segment mapping to he following notation is used in command descriptions: .RE 1 .TP 8 .I fn A Unix file specification, possibly containing either of the "wildcard" characters '*' or '?' ('*' matches all character strings, '?' matches any single character). .TP .I fn1 A Unix file specification which may not contain '*' or '?'. .TP .I rfn A remote file specification in the remote system's own syntax, which may denote a single file or a group of files. .TP .I rfn1 A remote file specification which should denote only a single fil.6v kermit -s foo -a bar .IP sends the file foo telling the receiver that its name is bar. If more than one file arrives or is sent, only the first file is affected by the .B \-a option: .sp 0.6v kermit -ra baz .IP stores the first incoming file under the name baz. .TP .B \-x Begin server operation. May be used in either local or remote mode. .RE 1 .PP Before proceeding, a few words about remote and local operation are necessary. .I Kermit is "local" if it is running on a PC or workstatny special shell characters, like '*', these must be quoted, as in .sp 0.6v kermit -g x\\*.\\? .TP .B \-f Send a 'finish' command to a remote server. .TP .B \-c Establish a terminal connection over the specified or default communication line, before any protocol transaction takes place. Get back to the local system by typing the escape character (normally Control-Backslash) followed by the letter 'c'. .TP .B \-n Like .B \-c, but after a protocol transaction takes place; .B \-c and .B \-n may boion that you are using directly, or if it is running on a multiuser system and transferring files over an external communication line \(em not your job's controlling terminal or console. .I Kermit is remote if it is running on a multiuser system and transferring files over its own controlling terminal's communication line, connected to your PC or workstation. .PP If you are running .I Kermit on a PC, it is in local mode by default, with the "back port" designated for file transfer and terminal connection. th be used in the same command. The use of .B \-n and .B \-c is illustrated below. .RE 1 .PP On a timesharing system, the .B \-l and .B \-b options will also have to be included with the .BR \-r , .BR \-k , or .B \-s options if the other .I Kermit is on a remote system. .PP If .I kermit is in local mode, the screen (stdout) is continously updated to show the progress of the file transer. A dot is printed for every four data packets, other packets are shown by type (e.g. 'S' for Send-Init), 'T' is printctions, then it will issue a prompt and begin interactive dialog. Action options specify either protocol transactions or terminal connection. .RE .SS COMMAND LINE OPTIONS .TP 8 .BI \-s " fn" Send the specified file or files. If .I fn contains wildcard (meta) characters, the Unix shell expands it into a list. If .I fn is '-' then .I Kermit sends from standard input, which must come from a file: .sp 0.6v kermit -s - < foo.bar .sp 0.6v or a parallel process: .sp 0.6v ls -l | kermi If you are running .I Kermit on a multiuser (timesharing) system, it is in remote mode unless you explicitly point it at an external line for file transfer or terminal connection. The following command sets .IR Kermit 's "mode": .RE 1 .TP 8 .BI \-l " dev" Line \(em Specify a terminal line to use for file transfer and terminal connection, as in .sp 0.6v kermit -l /dev/ttyi5 .RE 1 .PP When an external line is being used, you might also need some additional options for successful communication wit -s - .IP You cannot use this mechanism to send terminal typein. If you want to send a file whose name is "-" you can precede it with a path name, as in .sp 0.6v kermit -s ./- .TP .B \-r Receive a file or files. Wait passively for files to arrive. .TP .B \-k Receive (passively) a file or files, sending them to standard output. This option can be used in several ways: .sp 0.6v kermit -k .IP Displays the incoming files on your screen; to be used only in "local mode" (see below). .sp 0.6th the remote system: .TP .BI \-b " n" Baud \(em Specify the baud rate for the line given in the .B \-l option, as in .sp 0.6v kermit -l /dev/ttyi5 -b 9600 .IP This option should always be included with the .B \-l option, since the speed of an external line is not necessarily what you expect. .TP .BI \-p " x" Parity \(em .BR e , .BR o , .BR m , .BR s , .B n (even, odd, mark, space, or none). If parity is other than none, then the 8th-bit prefixing mechanism will be used for transferring 8-biv kermit -k > fn1 .IP Sends the incoming file or files to the named file, .I fn1. If more than one file arrives, all are concatenated together into the single file .I fn1. .sp 0.6v kermit -k | command .IP Pipes the incoming data (single or multiple files) to the indicated command, as in .sp 0.6v kermit -k | sort > sorted.stuff .TP .BI \-a " fn1" If you have specified a file transfer option, you may specify an alternate name for a single file with the .B -a option. For example, .sp 0t binary data, provided the opposite .I Kermit agrees. The default parity is none. .TP .B \-t Specifies half duplex, line turnaround with XON as the handshake character. .RE 1 .PP The following commands may be used only with a .I Kermit which is local \(em either by default or else because the .B \-l option has been specified. .TP 8 .BI \-g " rfn" Actively request a remote server to send the named file or files; .I rfn is a file specification in the remote host's own syntax. If .I fn happens to contain aewline conversion. .TP .B \-w Write-Protect \(em Avoid filename collisions for incoming files. .TP .B \-q Quiet \(em Suppress screen update during file transfer, for instance to allow a file transfer to proceed in the background. .TP .B \-d Debug \(em Record debugging information in the file debug.log in the current directory. Use this option if you believe the program is misbehaving, and show the resulting log to your local .I Kermit maintainer. .TP .B \-h Help \(em Display a brief synopsis of the commandkslashes in a row (\\\\). A single backslash immediately preceding a carriage return allows you to continue the command on the next line. .RE 1 .PP You may type the editing characters (DEL, ^W, etc) repeatedly, to delete all the way back to the prompt. No action will be performed until the command is entered by typing carriage return, linefeed, or formfeed. If you make any mistakes, you will receive an informative error message and a new prompt \(em make liberal use of '?' and ESC to feel your way throug line options. .RE 1 .PP The command line may contain no more than one protocol action option. .SS INTERACTIVE OPERATION .RE 1 .PP .IR Kermit 's interactive command prompt is "C-Kermit>". In response to this prompt, you may type any valid command. .I Kermit executes the command and then prompts you for another command. The process continues until you instruct the program to terminate. .PP Commands begin with a keyword, normally an English verb, such as "send". You may omit trailing characters from any keywh the commands. One important command is "help" \(em you should use it the first time you run .I Kermit. .PP Interactive .I Kermit accepts commands from files as well as from the keyboard. When you enter interactive mode, .I Kermit looks for the file .kermrc in your home or current directory (first it looks in the home directory, then in the current one) and executes any commands it finds there. These commands must be in interactive format, not Unix command-line format. A "take" command is also provideord, so long as you specify sufficient characters to distinguish it from any other keyword valid in that field. Certain commonly-used keywords (such as "send", "receive", "connect") have special non-unique abbreviations ("s" for "send", "r" for "receive", "c" for "connect"). .PP Certain characters have special functions in interactive commands: .PP .TP 8 .B ? Question mark, typed at any point in a command, will produce a message explaining what is possible or expected at that point. Depending on the conted for use at any time during an interactive session. Command files may be nested to any reasonable depth. .PP Here is a brief list of .I Kermit interactive commands: .PD 0.6v .TP 12 .B ! Execute a Unix shell command. .TP .B bye Terminate and log out a remote .I Kermit server. .TP .B close Close a log file. .TP .B connect Establish a terminal connection to a remote system. .TP .B cwd Change Working Directory. .TP .B dial Dial a telephone number. .TP .B directory Display a directory listing. .TP .B echo Died when there's a timeout, and '%' for each retransmission. In addition, you may type (to stdin) certain "interrupt" commands during file transfer: .IP Control-F: Interrupt the current File, and go on to the next (if any). .IP Control-B: Interrupt the entire Batch of files, terminate the transaction. .IP Control-R: Resend the current packet .IP Control-A: Display a status report for the current transaction. .RE .IP These interrupt characters differ from the ones used in other .I Kermit implementations xt, the message may be a brief phrase, a menu of keywords, or a list of files. .TP 8 .B ESC (The Escape or Altmode key) \(em Request completion of the current keyword or filename, or insertion of a default value. The result will be a beep if the requested operation fails. .TP 8 .B DEL (The Delete or Rubout key) \(em Delete the previous character from the command. You may also use BS (Backspace, Control-H) for this function. .TP .B ^W (Control-W) \(em Erase the rightmost word from the command line. .TP .B to avoid conflict with Unix shell interrupt characters. With System III and System V implementations of Unix, interrupt commands must be preceeded by the escape character (e.g. control-\\). .RE .PP Several other command-line options are provided: .TP 8 .B \-i Specifies that files should be sent or received exactly "as is" with no conversions. This option is necessary for transmitting binary files. It may also be used to slightly boost efficiency in Unix-to-Unix transfers of text files by eliminating CRLF/n^U (Control-U) \(em Erase the entire command. .TP .B ^R (Control-R) \(em Redisplay the current command. .TP .B SP (Space) \(em Delimits fields (keywords, filenames, numbers) within a command. HT (Horizontal Tab) may also be used for this purpose. .TP .B CR (Carriage Return) \(em Enters the command for execution. .B LF (Linefeed) or .B FF (formfeed) may also be used for this purpose. .TP .B \e (Backslash) \(em Enter any of the above characters into the command, literally. To enter a backslash, type two bacExecute a login script with a remote system. .TP .B send Send files. .TP .B server Begin server operation. .TP .B set Set various parameters. .TP .B show Display values of 'set' parameters. .TP .B space Display current disk space usage. .TP .B statistics Display statistics about most recent transaction. .TP .B take Execute commands from a file. .sp 1 .PP The 'set' parameters are: .TP 21 .B block-check Level of packet error detection. .TP .B delay How long to wait before sending first packet. .TP .B duplex ckuker.upd 644 0 3 30673 3507351146 6043 Specify which side echoes during 'connect'. .TP .B escape-character Character to prefix "escape commands" during 'connect'. .TP .B file Set various file parameters. .TP .B flow-control Communication line full-duplex flow control. .TP .B handshake Communication line half-duplex turnaround character. .TP .B line Communication line device name. .TP .B modem-dialer Type of modem-dialer on communication line. .TP .B parity Communication line character parity. .TP .B prompt Change the .I Kermit program's promC-KERMIT FOR UNIX, CHANGES FROM 4C(052) TO 4C(053), 21 JUNE 85: ckcfn2.c: . Change dopar() to be of type CHAR. . Fix dopar() to calculate odd parity correctly. ckucon.c, ckuscr.c: . Add "extern CHAR dopar();" declarations. C-KERMIT FOR UNIX, CHANGES FROM 4C(050) TO 4C(052), 18 JUNE 85: ckcfns.c: . Repair rpar() and spar() handling of 8th bit prefix negotiation. . In sinit(), when sending from stdin, allow "-a name" to work. . In rcvfil(), guard against receiving a null F packet. ckcmai.c: . Change hlppt. .TP .B receive Set various parameters for inbound packets. .TP .B send Set various parameters for outbound packets. .TP .B speed Communication line speed. .sp 1 .PP The 'remote' commands are: .TP 12 .B cwd Change remote working directory. .TP .B delete Delete remote files. .TP .B directory Display a listing of remote file names. .TP .B help Request help from a remote server. .TP .B host Issue a command to the remote host in its own command language. .TP .B space Display current disk space utxt[] to contain less than 256 characters (for Xenix) ckcpro.c: . In proto() call ttopen() with a temp, x, rather than "local", then only set local if x was set. ckucmd.c: . In cmifi(), make y long rather than int. This was making 16-bit machines erroneously report that files longer than 32K could not be found. ckuker.mak (makefile): . Change symbol 3BX to ATT3BX (has to start with letter) . Remove line continuations in the middle of strings . Add entry for sys3nid (System III/V on PDP-11 with no Isage on remote system. .TP .B type Display a remote file on your screen. .TP .B who Display who's logged in, or get information about a user. .SH FILES .ta \w"$HOME/.kermrc "u $HOME/.kermrc \fIKermit\fR initialization commands .br \&./.kermrc more \fIKermit\fR initialization commands .PD .SH SEE ALSO cu(1C), uucp(1C) .br Frank da Cruz and Bill Catchings, .IR "Kermit User's Guide" , Columbia University, 6th Edition .SH DIAGNOSTICS The diagnostics produced by .I Kermit itself are intended to be self-explan&D space) ckufio.c: . Add appropriate #ifdef for TOWER1 in zkself() . Add 2.9bsd identification string ckutio.c: . Move definition of CTTNAM from here to ckcdeb.h, so it can be shared. . In initrawq() (for V7 only) read the proc table again after fork(). . Change symbol 3BX to ATT3BX. . Get rid of the (void) casts in strxxx() invocations -- the proliferation of conditionals was getting ridiculous, and it was only to please lint. . In conbin() for Sys III/V, open terminal in 7-bit, parity-enabled mode rsplay arguments literally. .TP .B exit Exit from the program, closing any open logs. .TP .B finish Instruct a remote .I Kermit server to exit, but not log out. .TP .B get Get files from a remote .I Kermit server. .TP .B help Display a help message for a given command. .TP .B log Open a log file \(em debugging, packet, session, transaction. .TP .B quit Same as 'exit'. .TP .B receive Passively wait for files to arrive. .TP .B remote Issue file management commands to a remote .I Kermit server. .TP .B script atory. .SH BUGS See recent issues of the Info-Kermit digest (on ARPANET or Usenet), or the file ckuker.bwr, for a list of bugs. n about a user. .SH FILES .ta \w"$HOME/.kermrc "u $HOME/.kermrc \fIKermit\fR initialization commands .br \&./.kermrc more \fIKermit\fR initialization commands .PD .SH SEE ALSO cu(1C), uucp(1C) .br Frank da Cruz and Bill Catchings, .IR "Kermit User's Guide" , Columbia University, 6th Edition .SH DIAGNOSTICS The diagnostics produced by .I Kermit itself are intended to be self-explanather than 8-bit, no-parity mode (some sites actually use parity). . In conint(), trap and ignore QUIT signal, trap SIGHUP and handle like SIGINT. This prevents lock files from being left behind after hangup or quit. . In connoi(), turn off traps for SIGQUIT, SIGHUP. . In ttopen(), add Sys III/V code using ctermid() to better determine remote/ local status when stdin redirected. If not Sys III/V and stdin redirected, assume local, rather than remote, so that "set speed" and other local-mode only CRLF. ckcfns.c, ckcfn2.c (formerly ckfns.c, ckfns2.c): . change all calls to screen() to new form. . fix bug in sfile() that sometimes prevented literal names from working. . don't translate send-as names in sfile, always use them literally. . change input() to always resend() after getting a NAK. . change getpkt to clear leftovers when starting new file (next = -1), so that filenames in F pkt wouldn't have garbage after previous file was interrupted. . Change call to zchin() to use new calling convecommands will work. . Add 2.9bsd identification string . Make new ANYBSD symbol to select 4.1, 4.2, and 2.9. In some cases, all 3 work the same, in others, 2.9 and 4.2 are the same, 4.1 special. ckuus*.c: . In command line invocation, base local/remote determination on CTTNAM. . In "set line" only ask ttopen() to set local/remote if not default tty. . Ignore SIGQUIT and SIGINT signals while inferior shell active in XXSHE:. Previously, both Kermit and the inferior shell would catch them. . In XYLINE: cntion so bytes with hi bit on won't be confused with eof on some systems. . Reset czseen in seof, not in clsif, so that remote ^X while C-Kermit sending will result in correct Z packet with D in data. . In resend(), don't send any packet if packet buffer is empty. . Un-hardwire getch() from Unix newline text file convention. . Fix bug that sometimes resulted in contents of R or X packet having first character doubled. . Fix bug in getpkt that prevented leftovers from being transmitted after end of fall ttopen() with a temp, x, rather than "local", then only set local if x was set. . Change message "status report..." to "status report:" to avoid dot confusion. C-KERMIT FOR UNIX, CHANGES FROM VERSION 4.2(030) TO 4C(050), 30 May 85: All files except ckwart.* have been renamed according to a consistent convention, see ckaaaa.hlp for an explanation. Copyright notices added to every module, so we can't be enjoined from distributing our own program if we give the right to other organizations, like Berkile. . Have tinit() clear c[xz]seen and filnam to prevent bad things happening after interruption or emergency protocol exit. . Have syscmd() return 0 if called with null string. This allows single process systems like the Macintosh to act as servers, even if they can't do commands like remote directory. . Send out initial nak when doing receive, so that there will be something in the packet buffer to resend. . Check for failure return code from zchout, to catch disk full errors, etc. . When servereley, to distribute it. ckwart.c . Move the #define in the txt1 string to not start on a new line. . Fix the comments printed by wart so they can't be construed as comments by the compiler that compiles wart. . Include formfeed among the skipped-over whitespace characters. . Add wart version information. ckcdeb.h (formerly ckdebu.h): Forget about typedefing LONG to be unsigned long -- it causes too many problems for PDP-11 C compilers, etc. Just let LONG be long. If symbols DEBUG and TLOG not defin getting input from a system function, call zopeni() on new ZSYSFN channel, rather than circumventing zopeni() by calling zopen(). . Clean up inlin() a little, use maxt vs MAXTRY consistently. . Change rpack,spack,rpar,spar,etc to use the new, separated send/receive packet parameters (padding,timeout,eol,soh,etc). ckcker.h (formerly ckermi.h): . Removed #include and from ckermi.h. Macintosh does not need all that... (thanks, Bill) . Remove include of ckdebu.h (now ckcdeb.h). . ed (e.g. in Makefile), then define null macros to replace calls to the debug() and tlog() functions, to save space and execution time. Program is too big for Macintosh with these functions compiled in. Establish a symbol NLCHAR. If this symbol is defined, then text (ascii) files are stored with a single character (such as lf or cr) terminating each line, and this character is the value of NLCHAR. If not defined, then the system uses CRLF. When NLCHAR is defined, C-Kermit maps between that character andAdd defs for LF and NUL. . Add def for new ZSYSFN file i/o channel. ckcpro.w (formerly ckprot.w) Protocol Module: . Add "a" state to cancel any transaction. . Remove entries for input='N', since this is now handled by input(). . Fix "a" state to not cause "OK" message when files closed. ckucmd.c (formerly ckcmd.c) Unix Command Package: . Set global cmerrp (error prefix) to be same as prompt, but with '>' stripped. . Allow interactive command continuation using trailing '\'. . Change "*bp++ == NUL;" in gx internal variables that hold size to also be long. (Same change to ckvfio.c.) Also, change ckcfns.c and ckucmd.c to declare 'long zchki();'. ckutio.c (formerly ckxunx.c and ckxbsd.c): Started from Charles Brooks's 4.2 ckxunx.c, which is the original C-Kermit release 4.2 version, to which he added 4.1bsd support. . Added the following for Pro/Venix Version 1: - Filled in msleep() using alarm(-clockticks). - Filled in conchk() and ttchk() using TIOCQCNT. - Changed default tty name (dftty) #ifdef's . In 'set line', put speed back to -1 if not local. . Change "*xargv++;" in cmdlin() to simply "xargv++;". . Change all "if (x = (cmcfm()) < 0)" to "if ((x = cmcfm()) < 0)". . In ckuus3, change "turnch == y" to "turnch = y"; this bug prevented "set handshake" from working. . Add code in shopar() to look up and display modem type correctly. . Change "set line" code to have ttopen() figure out local/remote mode. . Fix "set line" not to erroneously set ttname if it ttopen fails. . In remote cwd parsetwd() to simply "bp++;". . Test for CR as well as NL for line termination (for Apollo Aegis). . In ckucmd.h, #define getchar specially for VMS and Aegis. . In cmfld, return(0) from filling out default when ESC typed; this prevents "log trans transact.log transact.log transact.log ..." . In cmtxt, preserve pointers & counts across calls in case of reparse. . In getwd, return -1, NOT -2, if ^U (line kill) is typed. ckucon.c (formerly ckconu.c) Connect module: . When writing to session log,to be "/dev/com1.dout". - Added line locking via /usr/spool/uucp/LCK..devname and TIOCEXCL. . Changed local variable c from int to CHAR in ttinl(). . Let CEB's code to hangup line upon close in 4.1bsd also work for 4.2bsd. . Removed flock() from ttopen(), call ttlock() before trying to open tty. . Corrected some places where alarms & signals were not turned off. . Changed calling convention for ttopen() to allow it to set the "local" variable, since ttopen can call the system to figure out whether a g make some minimal attempt to recover from disk full or other i/o errors (just turn off logging flag). . Add baud and parity info to status display. ckudia.c (formerly ckdial.c) Dial command: . Support added for Racal-Vadic, Cermetek, Penril, General Datacomm. . Use msleep() for higher precision timing. ckufio.c (formerly ckzunx.c, and before that ckzbsd.c): Started from Charles Brooks's 4.2 ckzunx.c, which is the original C-Kermit release 4.2 version, to which he added 4.1bsd support. . Fixed zltor(iven device is the job's controlling tty. Also had to change all modules that call ttopen() to pass this variable by reference instead of by value. . In ttopen, copy ttname string into a static ttnmsv string global to ckutio module, rather than just copying the pointer (which is pointing at a moving target). Should fix PC/IX tthang() problem. . Add support for AT&T 3B-series under 3BX conditional; initially, it just follows UXIII conditional, but uses special uucp lock file name. ckuusr.c, ck) to only count dots after the last '/'. . Declared malloc as "char *malloc()". . Change fprintf(fp[n],s) to fputs(s, fp[n]) in zsout & zsoutl. . Added zkself() function to log self out, for use by server "bye". . Changed calling convention for zchin() to allow 68000's etc to return EOF. . Make zopeno() chown the file to self, in case program set[ug]id'd. . Changed znewn() to try not to contruct a name that is too long. . Merge in Gregg Wonderly's v7 support. . Make various changes to v7 support to fit procuus2.c, ckuus3.c (formerly ckuser.c, ckusr2.c, ckusr3.c): . all occurrences of printf(s) replaced by printf("%s",s) or puts(s). . shortening of remaining long strings. . continuation lines now allowed in commands if line ends with "\". . make "dir" command arg default to ".", not "*", to prevent recursive listing. . make "!" command with no args do system("$SHELL"). . removed redundant definitions of ncmd, nrmt, nprm. . totally redefined and rewrote screen() function. . Change send-as to use cmtxt, not cmf table stuff to other systems. . (023) Changed zopeni(), when called with new ZSYSFN channel number, to invoke zxcmd() to start a fork and get its fd; also changed zclose() and chkfn() accordingly. . (024) In zchki(), allowed 0 as well as S_IFREG as S_IFMT value for ordinary file; Sys V stat() can return either of these values for an ordinary file. Also, insert missing #else in zkself(). . (025) declare zchki() to be of type 'long', so that it can return valid file sizes for big files. Also fild; remove cmcfm. . Fix send command to wait for confirmation after wild filespec (this was broken by send-as change above, few people saw it). . Put 'log debug' command in #ifdef DEBUG . Put 'log transaction' command in #ifdef TLOG . Use 'transact.log' as default name for transaction log, rather than 'transaction.log', which is too long for all but 4.2bsd Unixes. . Use symbols for exit() & doexit() return codes, not hardwired 0 and 1. . Use symbol for name of init file. . Put Unix-specific messages in Date: Fri, 17 May 85 18:53:43 CDT From: Gregg Wonderly Subject: Additional C-Kermit Implementation Notes for Version 7 UNIX The Version 7 implementation takes advantage of some information present in the UNIX kernal to obtain the count of characters available for input from a particular file descriptor. The function initrawq() is used to obtain the kernal address of this value. It is a structure value that is associated with the clist for the file descriptor passed. T be declared in something like: extern int nproc; This value is the number (Maximum that is) of process entries in the "proc" array. BOOTNAME is the name of the kernal image on your system. On our system, it is "/edition7". On others, it is probably "/unix", or something close. The nlist() function uses this file to look for the addresses of the kernal variables "proc", and "nproc". to the variable NPROCNAME. On our system, this is defined as "NPROCNAME=nproc". This should alsohe struture member is the "rawq" count of characters available. The include file on our system shows this value as the first "int" in the structure. The operations in initrawq() cause the child process to "block", trying to read from the "tty" file descriptor. Then, by looking through the "proc" structures, we find the proper process, and get its "wchan" pointer. This is a pointer to the clist in question, in the kernal memory. The "wchan" address can then be used as an offset by lseckwart.doc 644 0 3 7662 3507351155 6011 ing, accept CR as well as NL as password terminator. . In local directory command, use DIRCMD rather than "ls -l ". . In screen() function SCR_QE, print long argument with %ld so the ^A status report doesn't show all 0's on systems where ints and longs are different length (%ld was already used in the other screen functions). . Fix multiline 'get' parsing to allow editing (required fixes to ckucmd.c). . Add conditionals for init file name for various systems. . Phase out the following set commands: seek to select the proper address in the kernal (/dev/kmem) to read from. By reading the first "int" at this address, we obtain a count of the characters available on the raw input queue. The MAKE variables PROC, NPROCNAME, BOOTNAME, are necessary to get around different naming conventions across systems. The variable PROC is the name given to the process structure array on your system. The include file (or some facsimile) should contain a declaration of the form: extern struct prt end-of-packet, set start-of-packet, set timeout, set padding & pad-ch. Replace by set send (each of these) and set receive (each of these), to allow inbound & outbound packet parameters to be set separately. . Put new set send/receive params in show command display. . Add version info for ckudia and ckuscr to 'sho ver'. . Add init file name to 'sho param'. . Replace system("pwd") in XXCWD code with system(PWDCMD), defined in ckufio. ame for various systems. . Phase out the following set commands: seoc *proc; or extern struct proc proc[]; The name of the pointer/array, is what you are concerned with. It may be something like "_proc", "proc", or some deriviation. You should define the MAKE variable PROC to this string, whatever it may be. On our system, I use "PROC=proc". If your definition is for an array, then you should define the MAKE variable DIRECT to be "-DDIRECT", as it is in the MAKEFILE. If your definition is for a pointer to the array, then you should remove the definition of DIRECckuv7.hlp 644 0 3 5636 3507351151 5566 T, so the the line reads "DIRECT=" (no value here). This is necessary for the routine to properly locate the "proc" array. If you have an array declaration, then the call to nlist() will return the address of the array. However, if you have a pointer, then nlist() returns the address of the pointer. This requires one extra level of dereference to obtain the address of the array. The same thing applies to the variable NPROCNAME. On our system, this is defined as "NPROCNAME=nproc". This should alsoable */ - { s = -1; BEGIN mantissa; } /* Look for sign */ 0 { m = 0; BEGIN mantissa; } /* Got digit, start mantissa */ 1 { m = 1; BEGIN mantissa; } . { fatal("bad input"); } /* Detect bad format */ 0 { m *= 2; } /* Accumulate mantissa */ 1 { m = 2 * m + 1; } $ { printf("%d\n", s * m); return; } . { f = 0.0; d = 1; BEGIN fraction; } /* Start fraction */ 0 { d *= 2; } /* Accumulate state declarations and the state transition table. It loops through calls to input(), using the result to index into a big case statement it has created from the state table. Wart is invoked as follows: wart (Input from stdin, output to stdout) wart fn1 (Input from fn1, output to stdout) wart fn1 fn2 (Input from fn1, output to fn2. Example: wart a.w a.c) Wart programs have the conventional filetype '.w'. as in lex. The wart() function is generated by the wart program based on the fraction */ 1 { d *= 2; f += 1.0 / d; } $ { printf("%f\n", s * (m + f) ); return; } . { fatal("bad input"); } %% input() { /* Define input() function */ int x; return(((x = *b++) == '\0') ? '$' : x ); } fatal(s) char *s; { /* Error exit */ fprintf(stderr,"fatal - %s\n",s); exit(1); } main(argc,argv) int argc; char **argv; { /* Main program */ if (argc < 1) exit(1); b = *++argv; state = sign; /* Initialize state */ wartckvcon.c 644 0 3 12664 3510607670 5474 (); /* Invoke state switcher */ exit(0); /* Done */ } The wart program accepts as input a C program containing lines that start with "%" or sections delimited by "%%". The directive "%states" declares the program's states. The section enclosed by "%%" markers is the state table, with entries of the form X { action } which is read as "if in state with input X perform { action }" The optional field tells the current state or states the program must be in to perchar *connv = "Connect Command, V4.2(007)+1 27 Jun 85"; /* C K V C O N -- Dumb terminal connection to remote system, for VMS */ /* Adapted from the Unix C-Kermit connect module by S. Rubenstein for systems without fork(). This version of conect() uses contti(&c, &src) to return when a character is available from either the console or the comm line, to allow sending/receiving without breaking connection. */ #include "ckcker.h" #include #include #include #include int state, s = 1, m = 0, d; float f; char *b; %states sign mantissa fraction /* Declare wart states */ %% /* Begin state trn matching or range notation is provided. The input character is obtained from the input() function, which you must define. It should be alphanumeric, or else one of the characters ".% -$@" (quotes not included). Note that the program above recognize the binary point '.' through a ruse. The action is a series of zero or more C language statements, enclosed in curly braces. The BEGIN macro is defined simply to be "state = ", as in lex. The wart() function is generated by the wart program based on the be signed integer to pass thru -1, which is the modem disconnection signal, and is different from the character 0377 */ char errmsg[50], *erp; if (!local) { printf("Sorry, you must 'set line' first\n"); return(-2); } if (speed < 0) { printf("Sorry, you must 'set speed' first\n"); return(-2); } if ((escape < 0) || (escape > 0177)) { printf("Your escape character is not ASCII - %d\n",escape); return(-2); } if (ttopen(ttname,&local,mdmtyp)] = { " ", /* leave a blank line */ "C to close the connection, or:", " B to send a BREAK", " H to hang up the phone", " S for status", " 0 to send a null", " ? for help", " escape character twice to send the escape character.", " ", /* leave a blank line */ "" }; conola(hlpmsg); /* Print the help message. */ conol("Command> "); /* Prompt for command. */ c = coninc(0); conoc(c); /* Echo it. */ conoll(""); doesc(c); } /* C H S T R -- Make a printable string ou < 0) { erp = errmsg; sprintf(erp,"Sorry, can't open %s",ttname); perror(errmsg); return(-2); } printf("Connecting thru %s, speed %d.\r\n",ttname,speed); printf("The escape character is %s (%d).\r\n",chstr(escape),escape); printf("Type the escape character followed by C to get back,\r\n"); printf("or followed by ? to see other options.\r\n"); if (seslog) printf("(Session logged to %s.)\r\n",sesfil); /* Condition console terminal and communication line */ if (cont of a character */ char * chstr(c) int c; { static char s[8]; char *cp = s; if (c < SP) { sprintf(cp,"CTRL-%c",ctl(c)); } else sprintf(cp,"'%c'\n",c); cp = s; return(cp); } /* D O E S C -- Process an escape character argument */ doesc(c) char c; { int d; c &= 0177; if (c == escape) { /* Send escape character */ d = dopar(c); ttoc(d); } else { /* Or else look it up below. */ if (bin(escape) < 0) { printf("Sorry, can't condition console terminal\n"); return(-2); } if (ttvt(speed,flow) < 0) { conres(); printf("Sorry, Can't condition communication line\n"); return(-2); } /* cont'd... */ /* ...connect, cont'd */ active = 1; do { int src; contti(&c, &src); if (src < 0) { /* Comm line hangup or other error */ printf("\r\nC-Kermit: Communications line failure\r\n"); active = 0; } else if (src) { /* Character from commisupper(c)) c = tolower(c); if (iscntrl(c)) c += 'a' - '\001'; if (c == 'c') { /* Close connection */ active = 0; conol("\r\n"); } else if (c == 'b') { /* Send a BREAK */ ttsndb(); } else if (c == 'h') { /* Hang up the line */ tthang(); } else if (c == 's') { /* Status */ conol("\r\nConnected thru "); conoll(ttname); if (seslog) { . line */ c &= 0177; /* Got a char, strip parity. */ conoc(c); /* Put it on the screen. */ if (seslog) zchout(ZSFILE,c); /* If logging, log it. */ n = ttchk(); /* Any more left in buffer? */ if (n > 0) { if (n > LBUFL) n = LBUFL; /* Get them all at once. */ if ((n = ttxin(n,lbuf)) > 0) { for (i = 0; i < n; i++) lbuf[i] &= 0177; conxo(n,lbuf); if (seslog) zsoutx(ZSFILE,lbuf,n); } } } else { /* Character from console */ c &= 0177; if (c conol(", logging to "); conol(sesfil); } } else if (c == '?') { /* Help */ hconne(); } else if (c == '0') { /* Send a null */ c = '\0'; d = dopar(c); ttoc(d); } else if (c != SP) { /* Space, ignore */ conoc(BEL); /* Invalid esc arg, beep */ } } } Connected thru "); conoll(ttname); if (seslog) { mp.h> #ifndef SIGUSR1 #define SIGUSR1 16 #endif extern int local, speed, escape, duplex, parity, flow, seslog, mdmtyp; extern char ttname[], sesfil[]; int i, active; /* Variables global to this module */ char *chstr(); #define LBUFL 100 /* Line buffer */ char lbuf[LBUFL]; /* C O N E C T -- Perform terminal connection */ conect() { int pid, /* process id of child (modem reader) */ parent_id, /* process id of parent (keyboard reader) */ n; int c; /* c is a character, but must == escape) { /* Look for escape char */ c = coninc(0) & 0177; doesc(c); } else { /* Ordinary character */ ttoc(dopar(c)); if (duplex) { /* Half duplex? */ conoc(c); /* Yes, also echo it. */ if (seslog) zchout(ZSFILE,c); /* And maybe log it. */ } } } } while (active); cancio(); conres(); printf("\r\nC-Kermit Disconnected\r\n"); return(0); } /* H C O N N E -- Give help message for connect. */ hconne() { int c; static char *hlpmsg[ckvfio.c 644 0 3 37707 3510607671 5500 name) -- Delete the named file. zxpand(string) -- Expands the given wildcard string into a list of files. znext(string) -- Returns the next file from the list in "string". zxcmd(cmd) -- Execute the command in a lower fork. zclosf() -- Close input file associated with zxcmd()'s lower fork. zrtol(n1,n2) -- Convert remote filename into local form. zltor(n1,n2) -- Convert local filename into remote form. zchdir(dirnam) -- Change working directory. zhome()char *ckzv = "VMS file support, 1.0(004)+5, 25 Jun 85"; char *ckzsys = " Vax/VMS"; /* C K V F I O -- Kermit file system support for VAX/VMS */ /* Stew Rubenstein, Harvard University Chemical Labs */ /* (c) 1985 President and Fellows of Harvard College */ /* Based on CKZUNX.C, 4.1(015) 28 Feb 85 */ /* Also, Martin Minow, Digital Equipment Corporation, Maynard MA */ /* Adapted from ckufio.c, by... */ /* F. da Cruz, Columbia University Center for Computing Activities */ /* Edit history * 005 25-Jun-8 -- Return pointer to home directory name string. zkself() -- Log self out */ /* Includes */ #include "ckcker.h" #include "ckcdeb.h" #include #include #include #include #include #include #include #define MAXWLD 500 /* Maximum wildcard filenames */ /* Declarations */ FILE *fp[ZNFILS] = { /* File pointers */ NULL, NULL, NULL, NULL, NULL, NULL, NULL }; static int fcount; /* Number of files in wild g5 DS modified zrtol to preserve version number, added debug * 004 25-Jun-85 DS modified zltor to strip version number, added debug * 003 20-Mar-85 MM fixed fprintf bug in zsout.c * 004 21-Mar-84 MM create text files in variable-stream. * 005 8-May-85 MM filled in zkself (not tested), fixed other minor bugs */ /* Definitions of some VMS system commands */ char *DIRCMD = "DIRECTORY "; /* For directory listing */ char *DELCMD = "DELETE "; /* For file deletion */ char *TYPCMD = "TYPE "; /* For typinroup */ char *getenv(), *strcpy(); /* For finding home directory */ static char *mtchs[MAXWLD], /* Matches found for filename */ **mtchptr; /* Pointer to current match */ /*** Z K S E L F -- Log self out ***/ /*** (someone please check if this works in VMS) ***/ zkself() { return (kill(0,9)); } /* Z O P E N I -- Open an existing file for input. */ zopeni(n,name) int n; char *name; { debug(F111," zopeni",name,n); debug(F101," fp","",(int) fp[n]); if (chkfn(n) != 0) g a file */ char *SPACMD = "DIRECTORY/TOTAL"; /* Space/quota of current directory */ char *SPACM2 = "DIRECTORY/TOTAL "; /* Space/quota of current directory */ char *WHOCMD = "SHOW USERS"; /* For seeing who's logged in */ /* Functions (n is one of the predefined file numbers from ckermi.h): zopeni(n,name) -- Opens an existing file for input. zopeno(n,name) -- Opens a new file for output. zclose(n) -- Closes a file. zchin(n) -- Gets the next character from an input file.return(0); if (n == ZSYSFN) { /* Input from a system function? */ return(zxcmd(name)); /* Try to fork the command */ } if (n == ZSTDIO) { /* Standard input? */ if (isatty(0)) { fprintf(stderr,"?Terminal input not allowed\n"); debug(F110,"zopeni: attempts input from unredirected stdin","",0); return(0); } fp[ZIFILE] = stdin; return(1); } fp[n] = fopen(name,"r"); /* Real file. */ debug(F111," zopeni", name, (int) fp[n]); if (fp[n] == NULL) perror(name); /* zsout(n,s) -- Write a null-terminated string to output file, buffered. zsoutl(n,s) -- Like zsout, but appends a line terminator. zsoutx(n,s,x) -- Write x characters to output file, unbuffered. zchout(n,c) -- Add a character to an output file, unbuffered. zchki(name) -- Check if named file exists and is readable, return size. zchko(name) -- Check if named file can be created. znewn(name,s) -- Make a new unique file name based on the given name. zdelet( +1, want a useful message */ return((fp[n] != NULL) ? 1 : 0); } /* Z O P E N O -- Open a new file for output. */ zopeno(n,name) int n; char *name; { int fildes; extern int binary; debug(F111," zopeno",name,n); if (chkfn(n) != 0) return(0); if ((n == ZCTERM) || (n == ZSTDIO)) { /* Terminal or standard output */ fp[ZOFILE] = stdout; debug(F101," fp[]=stdout", "", (int) fp[n]); return(1); } /* * Create "binary" output files as fixed-block 512 byte records. U T -- Write a string to the given file, buffered. */ zsout(n,s) int n; char *s; { if (chkfn(n) < 1) return(-1); fputs(s, fp[n]); /* Don't use fprintf here MM */ return(0); } /* Z S O U T L -- Write string to file, with line terminator, buffered */ zsoutl(n,s) int n; char *s; { if (chkfn(n) < 1) return(-1); fputs(s, fp[n]); /* Don't use fprintf MM */ putc('\n', fp[n]); return(0); } /* Z S O U T X -- Write x characters to file, unbuffered. */ zsoutx(n,s,x) inte; { delete(name); } /* Z R T O L -- Convert remote filename into local form */ /* For VMS, we eliminate all special characters and truncate */ /* * Doesn't allow the longer file specifications that VMS V4 supports. * Assumes version number delimited by semicolon (;) rather than period (.). */ /* Should really use RMS to identify file specification components. -- DS */ zrtol(name,name2) char *name, *name2; { char *cp; int count; count = 9; /* max file name length */ fo * This should permit copying task images. It is rumored that * Vax C will null-fill an incomplete final block. * * Create all debugging files (and normal output files) in * "vanilla" RMS -- variable length, implicit carriage control. * This way, old brain-damaged programs aren't suprised by * bizarre Unix-styled files. */ if (n == ZOFILE && binary != 0) fildes = creat(name, 0, "mrs=512", "rfm=fix"); else fildes = creat(name, 0, "rat=cr", "rfm=var"); fp[n] n, x; char *s; { if (chkfn(n) < 1) return(-1); return(write(fp[n]->_file,s,x)); } /* Z C H O U T -- Add a character to the given file. */ zchout(n,c) int n; char c; { if (chkfn(n) < 1) return(-1); if (n == ZSFILE) return(write(fp[n]->_file,&c,1)); /* Use unbuffered for session log */ else { if (putc(c,fp[n]) == EOF) /* If true, maybe there was an error */ return(ferror(fp[n])); /* Check to make sure */ else /* Otherwise... */ return(0); /* There was no error= (fildes == -1) ? NULL : fdopen(fildes, "w"); if (fp[n] == NULL) perror(name); /* +1, print useful msg */ if (n == ZDFILE && isatty(fileno(fp[n]))) setbuf(fp[n],NULL); /* Make debugging file unbuffered */ debug(F101, " fp[n]", "", (int) fp[n]); return((fp[n] != NULL) ? 1 : 0); } /* Z C L O S E -- Close the given file. */ zclose(n) int n; { if (chkfn(n) < 1) return(0); if ((fp[n] != stdout) && (fp[n] != stdin)) fclose(fp[n]); fp[n] = NULL; return(1); } /* Z C H I N . */ } } /* C H K F N -- Internal function to verify file number is ok */ /* Returns: -1: File number n is out of range 0: n is in range, but file is not open 1: n in range and file is open */ chkfn(n) int n; { switch (n) { case ZCTERM: case ZSTDIO: case ZIFILE: case ZOFILE: case ZDFILE: case ZTFILE: case ZPFILE: case ZSFILE: break; default: debug(F101,"chkfn: file number out of range","",n); fprintf(stderr,"?File number out of range - %d\n",n); return(-1); -- Get a character from the input file. */ static int subprocess_input = 0, sub_count; static int input_mbxchn, output_mbxchn, child_pid = 0; static char *sub_ptr, sub_buf[200]; get_subprc_line() { struct { short status, size, trm, trmsize; } subiosb; if ((SYS$QIOW(0, output_mbxchn, IO$_READVBLK, &subiosb, 0, 0, sub_buf, sizeof sub_buf, 0, 0, 0, 0) & 7) != 1 || (subiosb.status & 7) != 1) return(-1); if (subiosb.size == 29 && strncmp(sub_buf, ">>> END OF KERMIT COMMAND <<<", subios } return( (fp[n] == NULL) ? 0 : 1 ); } /* Z C H K I -- Check if input file exists and is readable */ /* Returns: >= 0 if the file can be read (returns the size). -1 if file doesn't exist or can't be accessed, -2 if file exists but is not readable (e.g. a directory file). -3 if file exists but protected against read access. */ /* For Berkeley Unix, a file must be of type "regular" to be readable. Directory files, special files, and symbolic links are not readable. */ lob.size) == 0) { subprocess_input = 0; return(-1); } sub_buf[subiosb.size] = '\n'; sub_buf[subiosb.size + 1] = '\0'; sub_count = subiosb.size; sub_ptr = sub_buf; return(0); } zchin(n,c) int n; char *c; { int a; if (n == ZIFILE && subprocess_input) { if (--sub_count < 0) if (get_subprc_line()) return(-1); a = *sub_ptr++; } else { if (chkfn(n) < 1) return(-1); a = getc(fp[n]); } if (a == EOF) return(-1); *c = (a & 0377); return(0); } /* Z S Ong zchki(name) char *name; { int x; long pos; x = open(name, 0); if (x < 0) { debug(F111,"zchki stat fails",name,errno); return(-1); } pos = lseek(x, 0, 2); close(x); return(pos); } /* Z C H K O -- Check if output file can be created */ /* Returns -1 if write permission for the file would be denied, 0 otherwise. */ zchko(name) char *name; { return(0); /* Always creates new version */ } /* Z D E L E T -- Delete the named file. */ zdelet(name) char *namnam; return((chdir(hd) == 0) ? 1 : 0); } /* Z H O M E -- Return pointer to user's home directory */ char * zhome() { return(getenv("HOME")); } /* Z X C M D -- Run a system command so its output can be read like a file */ zxcmd(comand) char *comand; { char input_mbxnam[10], output_mbxnam[10]; char cmdbuf[200]; if (child_pid == 0) { struct dsc$descriptor_s inpdsc, outdsc; struct { short buflen, code; char *bufadr; short *retlen; } itmlst[2]; SYS$CREMBX(0, &xt znext() call. */ zxpand(fn) char *fn; { fcount = fgen(fn,mtchs,MAXWLD); /* Look up the file. */ if (fcount > 0) { mtchptr = mtchs; /* Save pointer for next. */ } debug(F111,"zxpand",mtchs[0],fcount); return(fcount); } /* Z N E X T -- Get name of next file from list created by zxpand(). */ /* Returns >0 if there's another file, with its name copied into the arg string, or 0 if no more files in list. */ znext(fn) char *fn; { if (fcount-- > 0) strcpy(fn,*mtchptr++); elseinput_mbxchn, 0, 0, 0, 0, 0); itmlst[0].buflen = sizeof input_mbxnam; itmlst[0].code = DVI$_DEVNAM; itmlst[0].bufadr = input_mbxnam; itmlst[0].retlen = 0; itmlst[1].buflen = 0; itmlst[1].code = 0; SYS$GETDVI(0, input_mbxchn, 0, itmlst, 0, 0, 0, 0); SYS$WAITFR(0); SYS$CREMBX(0, &output_mbxchn, 0, 0, 0, 0, 0); itmlst[0].buflen = sizeof output_mbxnam; itmlst[0].bufadr = output_mbxnam; SYS$GETDVI(0, output_mbxch *fn = '\0'; debug(F111,"znext",fn,fcount+1); return(fcount+1); } /* Z N E W N -- Make a new name for the given file */ znewn(fn,s) char *fn, **s; { static char buf[100]; char *bp, *xp; int len = 0, n = 0, d = 0, t; strcpy(buf, fn); /* Version numbers are handled by OS */ *s = buf; } /* Wildcard expansion for VMS is easy; we just use a run-time library call. */ fgen(pat,resarry,len) char *pat,*resarry[]; int len; { struct dsc$descriptor_s file_spec, result, der ( cp = name2; *name != '\0'; name++ ) { switch ( *name ) { case '.': /* file type delimiter */ { count = 3; /* max file type length */ *cp++ = '.'; break; } case ';': /* file version delimiter */ { count = 5; /* max file version length */ *cp++ = ';'; break; } default: { if (count > 0 && isalnum(*name) ) { --count; *cp++ = islower(*name) ? toupper(*name) : *name; } break; } } } *cp = '\0'; debug(F110,"zrtol: ",nan, 0, itmlst, 0, 0, 0, 0); SYS$WAITFR(0); inpdsc.dsc$w_length = strlen(input_mbxnam); inpdsc.dsc$b_dtype = DSC$K_DTYPE_T; inpdsc.dsc$b_class = DSC$K_CLASS_S; inpdsc.dsc$a_pointer = input_mbxnam; outdsc.dsc$w_length = strlen(output_mbxnam); outdsc.dsc$b_dtype = DSC$K_DTYPE_T; outdsc.dsc$b_class = DSC$K_CLASS_S; outdsc.dsc$a_pointer = output_mbxnam; LIB$SPAWN(0, &inpdsc, &outdsc, &1, 0, &child_pid); SYS$QIOW(0, inputme2,0); } /* Z L T O R -- Convert filename from local format to common form. */ /* Should really use RMS to identify file specification components. -- DS */ zltor(name,name2) char *name, *name2; { char *cp, *pp; for (cp = pp = name; *cp != '\0'; cp++) { /* strip path name */ if (*cp == ']' || *cp == ':') { pp = cp; pp++; } } for ( ; --cp >= pp; ) /* from end to beginning... */ { if ( ! isdigit ( *cp ) ) /* if not a numeric digit */ { if ( *cp == '-' ) _mbxchn, IO$_WRITEVBLK | IO$M_NOW, 0, 0, 0, "$ SET NOON", 10, 0, 0, 0, 0); } strcpy(cmdbuf, "$ "); strcat(cmdbuf, comand); SYS$QIOW(0, input_mbxchn, IO$_WRITEVBLK | IO$M_NOW, 0, 0, 0, cmdbuf, strlen(cmdbuf), 0, 0, 0, 0); SYS$QIOW(0, input_mbxchn, IO$_WRITEVBLK | IO$M_NOW, 0, 0, 0, "$ WRITE SYS$OUTPUT \">>> END OF KERMIT COMMAND <<<\"", 50, 0, 0, 0, 0); subprocess_input = 1; sub_count = 0; return(1); } /* Z C L O S F - close the suprocess output file. /* if a negative number */ --cp; /* skip over the minus sign */ if ( *cp == ';' ) /* if the version delimiter (;) */ *cp = '\0'; /* make it the end of the string */ break; } } cp = name2; /* If nothing before dot, */ if (*pp == '.') *cp++ = 'X'; /* insert 'X' */ strcpy(cp,pp); debug(F110,"zltor: ",name2,0); } /* Z C H D I R -- Change directory */ zchdir(dirnam) char *dirnam; { char *hd; if (*dirnam == '\0') hd = getenv("HOME"); else hd = dir*/ zclosf() { } /* Z K I L L F - kill the subprocess used for host commands */ /* The return value is 1 if the subprocess was killed successfully. */ /* -1 if there was no subprocess to kill. */ zkillf() { if (child_pid == 0) return(-1); return((SYS$DELPRC(&child_pid) & 7) == 1); } /* Z X P A N D -- Expand a wildcard string into an array of strings */ /* Returns the number of files that match fn1, with data structures set up so that first file (if any) will be returned by the nent], pat, plen); strncpy(resarry[count] + plen, rp, slen); resarry[count][slen + plen] = '\0'; ++count; } #ifdef DVI$_ALT_HOST_TYPE lib$find_file_end(&context); /* Only on V4 and later */ #endif if (status == RMS$_FNF) return(0); if (status == RMS$_NMF) return(count); return(-1); } system(s) char *s; { struct dsc$descriptor_s cmd; zxcmd(s); while (!get_subprc_line()) fputs(sub_buf, stdout); putchar('\n'); } len + plen + 1); if (plen != 0) strncpy(resarry[couDEBUG"",""TLOG"")" !V2 options $ C_LIBRARY = "SYS$LIBRARY:VAXCRTL.OLB" !V2 lib $ IF F$SEARCH(C_LIBRARY) .NES. "" THEN GOTO FOUND_LIB $! $ CC_VER_OPTS = "" !V1 options $ C_LIBRARY = "SYS$LIBRARY:CRTLIB.OLB" !V1 lib $ IF F$SEARCH(C_LIBRARY) .NES. "" THEN GOTO FOUND_LIB $! $ WRITE SYS$OUTPUT "Unable to locate C Run-Time Library." $ GOTO ABNORMAL_EXIT $FOUND_LIB: $ WRITE SYS$OUTPUT "Using ",C_LIBRARY," as the C Run-Time Library." $! $! Define CC options to be used, if not explicitly supplied. $! $ IF "''CCckvker.com 644 0 3 7602 3510607671 6007 _OPTIONS'" .EQS. "" - THEN CC_OPTIONS = "/NOLIST" + CC_VER_OPTS $ WRITE SYS$OUTPUT "Using CC options of ",CC_OPTIONS,"." $! $ CCMAKE CKCFN2.C "" 'CC_OPTIONS' $ CCMAKE CKCFNS.C "" 'CC_OPTIONS' $ CCMAKE CKCMAI.C "" 'CC_OPTIONS' $! $ IF F$SEARCH("CKWART.EXE") .EQS. "" THEN GOTO DO_WART $ IF F$SEARCH("CKCPRO.C") .EQS. "" THEN GOTO DO_WART $ IF F$SEARCH("CKCPRO.OBJ") .EQS. "" THEN GOTO DO_WART $ SRC_TIME = F$FILE_ATTRIBUTES("CKCPRO.W", "CDT") ! get creation time $ OUT_TIME = F$FILE_ATTRIBUTES("CKCPRO.OBJ", "C$ SAVE_VERIFY = 'F$VERIFY(0) + F$VERIFY(0'CKVKER_VERIFY' .GT. 0) $ ON CONTROL_Y THEN GOTO ABNORMAL_EXIT $ ON WARNING THEN GOTO ABNORMAL_EXIT $! $! CKVKER.COM 1.0 (001)+2 25-June-1985 $! $! Build Kermit modules. $! $! Note: this command file implements a very limited "make" capability. $! If you change ckwart.c, you must delete ckwart.exe $! If you change any header files, you must delete all .obj files. $! $! IF YOU HAVE TROUBLE COMPILING OR RUNNING SOME OF THE GENERATED CODE, $! TRY COMPILING WITHOUT OPTIMDT") ! for both files. $ IF F$CVTIME(SRC_TIME) .GES. F$CVTIME(OUT_TIME) THEN GOTO DO_WART $ WRITE SYS$OUTPUT "CKCPRO.OBJ", " is up to date." $ GOTO DONE_WART $DO_WART: $ IF F$SEARCH("CKWART.EXE") .NES. "" THEN GOTO GOT_WART $! CCMAKE CKWART.C "" 'CC_OPTIONS'/NOOPTIMIZATION $ CCMAKE CKWART.C "" 'CC_OPTIONS' $ WRITE SYS$OUTPUT "Linking WART..." $ LINK/EXECUTABLE=CKWART/NOMAP - CKWART.OBJ,'C_LIBRARY'/LIBRARY $GOT_WART: $ WRITE SYS$OUTPUT "Executing WART..." $ WART = "$SYS$DISK:[]CKWART" $ WART CKCPRO.W CKCPflt; long context; int count, slen, status, plen; char *pp, *rp, result_string[256], *strchr(); file_spec.dsc$w_length = strlen(pat); file_spec.dsc$b_dtype = DSC$K_DTYPE_T; file_spec.dsc$b_class = DSC$K_CLASS_S; file_spec.dsc$a_pointer = pat; result.dsc$w_length = sizeof result_string; result.dsc$b_dtype = DSC$K_DTYPE_T; result.dsc$b_class = DSC$K_CLASS_S; result.dsc$a_pointer = result_string; deflt.dsc$w_length = 3; deflt.dsc$b_dtype = DSCIZATION. $! $! input: $! CKVKER_VERIFY If defined and positive, causes verification $! of this command file. $! CC_OPTIONS Optional list of qualifiers for use when compiling $! (e.g., "/list/debug=all", "/define=xxx", etc.). $! Remember to enclose symbol names, etc. in quotes $! so that DCL won't convert them to uppercase. $! $! Modifications: $! $! 24-Jun-85 Automatically determine C Run-Time library to use. $! Save and restore verification, and exit on errors. $! Display additional "progress" $K_DTYPE_T; deflt.dsc$b_class = DSC$K_CLASS_S; deflt.dsc$a_pointer = "*.*"; count = 0; context = 0; pp = strchr(pat, ']'); if (pp == 0) pp = strchr(pat, ':'); if (pp == 0) plen = 0; else plen = pp - pat + 1; while (count < len && (status = LIB$FIND_FILE(&file_spec, &result, &context, &deflt)) == RMS$_NORMAL) { rp = strchr(result_string, ']') + 1; slen = strchr(rp, ' ') - rp; resarry[count] = malloc(slen + plen + 1); if (plen != 0) strncpy(resarry[couinformation. $! Avoid use of LNK$LIBRARY in case user had it defined. $! Use CCMAKE to compile CKCPRO and CKWART. $! -- Dan Schullman $! $! 25-Jun-85 Allow external specification of CC options, and $! provide some defaults. -- Dan Schullman $! $! Define command to be used in conditionally compiling C sources. $! $ IF "''CCMAKE'" .EQS. "" THEN CCMAKE = "@CKVMAK.COM" $! $! Determine which version of the C compiler is being used, $! and define version-specific stuff. $! $ CC_VER_OPTS = "/DEFINE=(""VCON,CKVFIO,CKVTIO, - 'C_LIBRARY'/LIBRARY $ GOTO NORMAL_EXIT $! $! Abnormal exit. $! $ABNORMAL_EXIT: $ STATUS = $STATUS !save failure status $ IF STATUS THEN STATUS = "%X08000002" !force error if neccessary $ GOTO EXIT $! $! Normal exit. $! $NORMAL_EXIT: $ STATUS = $STATUS !save success status $! $! Exit. $! $EXIT: $ EXIT ('STATUS' .OR. %X10000000) + F$VERIFY(SAVE_VERIFY) * 0 g WERMIT..." $ LINK/EXECUTABLE=WERMIT/NOMAP - CKCFN2,CKCFNS,CKCMAI,CKCPRO,CKUCMD,CKUDIA,CKUSCR,- CKUUS2,CKUUS3,CKUUSR,CKUT_TIME) THEN GOTO MUST_PROCESS $ WRITE SYS$OUTPUT OUTPUT," is up to date." $ GOTO NORMAL_EXIT $! $! Come here to build OUTPUT from SOURCE $! $MUST_PROCESS: $! $! Insert commands to create OUTPUT from SOURCE here, for example: $! $ WRITE SYS$OUTPUT OUTPUT, " <= ", SOURCE $ CC/NOLIST/OBJECT='OUTPUT''P3' 'SOURCE' $ GOTO NORMAL_EXIT $! $! Abnormal exit. $! $ABNORMAL_EXIT: $ STATUS = $STATUS !save failure status $ IF STATUS THEN STATUS = "%X08000002" !force error if neccessary $ GOTO EXIT $! $! Normal exit. $ckvmak.com 644 0 3 4216 3510607671 5774 ! $NORMAL_EXIT: $ STATUS = $STATUS !save success status $! $! Exit. $! $EXIT: $ EXIT ('STATUS' .OR. %X10000000) + F$VERIFY(SAVE_VERIFY) * 0 $MUST_PROCESS: $! $! Insert commands to create OUTPUT from SOURCE here, for example: $! $ WRITE SYS$OUTPUT OUTPUT, " <= ", SOURCE $ CC/NOLIST/OBJECT='OUTPUT''P3' 'SOURCE' $ GOTO NORMAL_EXIT $! $! Abnormal exit. $! $ABNORMAL_EXIT: $ STATUS = $STATUS !save failure status $ IF STATUS THEN STATUS = "%X08000002" !force error if neccessary $ GOTO EXIT $! $! Normal exit. $$ SAVE_VERIFY = 'F$VERIFY(0) + F$VERIFY(0'CKVMAK_VERIFY' .GT. 0) $ ON CONTROL_Y THEN GOTO ABNORMAL_EXIT $ ON WARNING THEN GOTO ABNORMAL_EXIT $! $! CKVMAK.COM 1.0 (001)+ 24-June-1985 $! $! The SOURCE file is processed to create the OUTPUT file. This command $! checks creation dates and does not compile if both files are present $! and the OUTPUT file is newer (younger) than the SOURCE file. $! $! Usage: $! $! CKVMAK [SOURCE [OUTPUT [P3]]] $! $! input: $! P1 Source file specification. $! P2 Output file specickvmak.hlp 644 0 3 1107 3507351153 5772 fication. The name defaults to that $! of the source file, and the type defaults to ".OBJ". $! P3 Additional qualifiers for the CC command. $! CKVMAK_VERIFY If defined and positive, causes verification $! of this command file. $! $! Modifications $! $! 24-Jun-85 Save and restore verification, and exit on any $! errors. Use F$PARSE to default the name and $! type of the output file. -- Dan Schullman $! $ SOURCE = P1 $ IF SOURCE .EQS. "" THEN INQUIRE SOURCE "C Source File" $ SOURCE = F$PARSE(SOURCE,"To build C-Kermit for VMS, use the CKVKER.COM DCL procedure, which in turn uses the CKVMAK.COM DCL procedure to compile each module that needs compiling. CKVMAK.COM checks the creation date of the C source and object files, skipping compilation if the object is up to date. Note that it doesn't check header file dates, and thus cannot replace the Unix make utility, or the Dec MMS product. Note that sites that currently use Vax C, version 1 (on VMS Version 3) may need to edit the definition of LNK$LIBRARY iRO.C $ CCMAKE CKCPRO.C "" 'CC_OPTIONS' $DONE_WART: $! $ CCMAKE CKUCMD.C "" 'CC_OPTIONS' $ CCMAKE CKUDIA.C "" 'CC_OPTIONS' $ CCMAKE CKUSCR.C "" 'CC_OPTIONS' $ CCMAKE CKUUS2.C "" 'CC_OPTIONS' $ CCMAKE CKUUS3.C "" 'CC_OPTIONS' $ CCMAKE CKUUSR.C "" 'CC_OPTIONS' $ CCMAKE CKVCON.C "" 'CC_OPTIONS' $ CCMAKE CKVFIO.C "" 'CC_OPTIONS' $ CCMAKE CKVTIO.C "" 'CC_OPTIONS' $ WRITE SYS$OUTPUT "Linking WERMIT..." $ LINK/EXECUTABLE=WERMIT/NOMAP - CKCFN2,CKCFNS,CKCMAI,CKCPRO,CKUCMD,CKUDIA,CKUSCR,- CKUUS2,CKUUS3,CKUUSR,CK.C") $ OUTPUT = F$PARSE(P2,".OBJ",SOURCE) $! $! Continue at must_process if either file is missing or the source is younger $! A missing SOURCE is, of course, an error -- but one that should be $! caught by the "normal" command. $! $ IF F$SEARCH(SOURCE) .EQS. "" THEN GOTO MUST_PROCESS $ IF F$SEARCH(OUTPUT) .EQS. "" THEN GOTO MUST_PROCESS $ SRC_TIME = F$FILE_ATTRIBUTES(SOURCE, "CDT") ! get creation time $ OUT_TIME = F$FILE_ATTRIBUTES(OUTPUT, "CDT") ! for both files. $ IF F$CVTIME(SRC_TIME) .GES. F$CVTIME(On CKVKER.COM, as noted in the commentary at the beginning of the file. urn uses the CKVMAK.COM DCL procedure to compile each module that needs compiling. CKVMAK.COM checks the creation date of the C source and object files, skipping compilation if the object is up to date. Note that it doesn't check header file dates, and thus cannot replace the Unix make utility, or the Dec MMS product. Note that sites that currently use Vax C, version 1 (on VMS Version 3) may need to edit the definition of LNK$LIBRARY igrd -- Flag indicating program executing in background ( & on end of shell command). Used to ignore INT and QUIT signals. vms_status -- status returned by most recent system service which may be used for error reporting. Functions for assigned communication line (either external or console tty): ttopen(ttname,local,mdmtyp) -- Open the named tty for exclusive access. ttclos() -- Close & reset the tty, releasing any access lock. ttpkt(speed,flow) -- Put the tty in packckvtio.c 644 0 3 62246 3510607671 5512 et mode and set the speed. ttvt(speed,flow) -- Put the tty in virtual terminal mode. or in DIALING or CONNECTED modem control state. ttinl(dest,max,timo) -- Timed read line from the tty. ttinc(timo) -- Timed read character from tty. ttchk() -- See how many characters in tty input buffer. ttxin(n,buf) -- Read n characters from tty (untimed). ttol(string,length) -- Write a string to the tty. ttoc(c) -- Write a characchar *ckxv = "VMS tty I/O, 1.0(012), 26 Jun 85"; /* C K V T I O -- Terminal and Interrupt Functions for VAX/VMS */ /* Edit History * * 012 26 Jun 85 DS Treat hangup of closed line as success. * 011 26 Jun 85 DS Modified conola to output \r\n. * 010 21 Jun 85 MM Added "hack_vms_open_console()" routine * 009 18 Jun 85 FdC Move def of CTTNAM to ckcdeb.h so it can be shared. * 008 11 Jun 85 MM Fix definition of CTTNAM * * 007 16-May-85 FdC Changed calling convention of ttopen(), make it * ter to the tty. ttflui() -- Flush tty input buffer. */ /* Functions for console terminal: congm() -- Get console terminal modes. concb(esc) -- Put the console in single-character wakeup mode with no echo. conbin(esc) -- Put the console in binary (raw) mode. conres() -- Restore the console to mode obtained by congm(). conoc(c) -- Unbuffered output, one character to console. conol(s) -- Unbuffered output, null-terminated string to the console. conola(s) -- Unbu set value of its argument "lcl", to tell whether * C-Kermit is in local or remote mode. * * 006 8-May-85 MM Got rid of "typeahead buffer" code as it didn't * solve the problem of data overruns at 4800 Baud. * Added vms "read a char" routine that checks for * CTRL/C, CTRL/Z, etc. */ /* C-Kermit interrupt, terminal control & i/o functions for VMS systems */ /* S. Rubenstein, Harvard University Chemical Labs */ /* (c) 1985 President and Fellows of Harvard Collffered output, array of lines, each followed by CRLF conxo(n,s) -- Unbuffered output, n characters to the console. conchk() -- Check if characters available at console (bsd 4.2). Check if escape char (^\) typed at console (System III/V). coninc(timo) -- Timed get a character from the console. conint() -- Enable terminal interrupts on the console if not background. connoi() -- Disable terminal interrupts on the console if not background. contti() -- Get a character from either consolege */ char *ckxsys = " Vax/VMS"; /* Variables available to outside world: dftty -- Pointer to default tty name string, like "/dev/tty". dfloc -- 0 if dftty is console, 1 if external line. dfprty -- Default parity dfflow -- Default flow control ckxech -- Flag for who echoes console typein: 1 - The program (system echo is turned off) 0 - The system (or front end, or terminal). functions that want to do their own echoing should check this flag before doing so. backe or tty, whichever is first. Time functions msleep(m) -- Millisecond sleep ztime(&s) -- Return pointer to date/time string */ /* Includes */ #include "ckcker.h" #include /* Unix Standard i/o */ #include /* Interrupts */ #include /* Longjumps */ #include #include #include #include #include #include #include "ckcdeb.h" /* Formats for debug() */ /* Declarations */ /* dftty is the device nameSS_S; b.dsc$a_pointer = buf; SYS$GETMSG(vms_status, &blen, &b, 0, 0); buf[blen] = '\0'; sprintf(msg, "%s: %s\n", s, buf); ermsg(msg); } /* T T O P E N -- Open a tty for exclusive access. */ /* Returns 0 on success, -1 on failure. */ ttopen(ttname,lcl,modem) char *ttname; int *lcl, modem; { if (ttychn != 0) return(0); /* If already open, ignore this call */ ttychn = vms_assign_channel(ttname); if (ttychn == 0) return(-1); if (!CHECK_ERR("ttopen: SYS$QIOW", T; ttraw.basic &= ~TT$M_WRAP & ~TT$M_HOSTSYNC & ~TT$M_TTSYNC; if (!CHECK_ERR("ttpkt: SYS$QIOW", SYS$QIOW(0, ttychn, IO$_SETMODE, 0, 0, 0, &ttraw, sizeof ttraw, s, 0, 0, 0))) return(-1); ttflui(); /* Flush any pending input */ return(0); } /* T T V T -- Condition communication line for use as virtual terminal */ ttvt(speed,flow) int speed, flow; { extern char ttname[]; int s; if (ttychn == 0) return(-1); /* Not open. */ s = ttsspd(speed); /* Check the of the default device for file transfer */ /* dfloc is 0 if dftty is the user's console terminal, 1 if an external line */ char *dftty = "TT:"; int dfloc = 0; /* Default location is remote */ int dfprty = 0; /* Parity (0 = none) */ int dfflow = 1; /* Xon/Xoff flow control */ int batch = 0; /* Assume interactive */ int ckxech = 0; /* 0 if system normally echoes console characters, else 1 */ int vms_status; /* Used for system service return status */ /* Structures used withinSYS$QIOW(0, ttychn, IO$_SENSEMODE, 0, 0, 0, &ttold, sizeof ttold, 0, 0, 0, 0))) return(-1); /* Tell whether local or remote */ *lcl = (strcmp(ttname,CTTNAM) == 0) ? 0 : 1; tttvt = ttold; ttraw = ttold; /* * Possibly add "purge I/O" call here. */ return(0); } vms_assign_channel(ttname) char *ttname; { int channel; struct dsc$descriptor_s d; d.dsc$w_length = strlen(ttname); d.dsc$a_pointer = ttname; d.dsc$b_class = DSC$K_CLASS_S; d.dsc$b_dty this module */ struct tt_mode { char class, type; short width; int basic : 24; char length; long extended; }; struct iosb_struct { short status, size, terminator, termsize; }; /* Declarations of variables global within this module */ static int conif = 0, /* Console interrupts on/off flag */ cgmf = 0, /* Flag that console modes saved */ ttychn = 0, /* TTY i/o channe; */ conchn = 0, /* Console i/o channel */ con_queued = 0, /* console i/o queued in cope = DSC$K_DTYPE_T; if (!CHECK_ERR("vms_assign_channel: SYS$ASSIGN", SYS$ASSIGN(&d, &channel, 0, 0))) return(0); else return(channel & 0xFFFF); } /* T T C L O S -- Close the TTY, releasing any lock. */ ttclos() { if (ttychn == 0) return(0); /* Wasn't open. */ ttres(); /* Reset modes. */ if (!CHECK_ERR("ttclos: SYS$DASSGN", SYS$DASSGN(ttychn))) return(-1); ttychn = 0; /* Mark it as closed. */ return(0); } /* T T R E S -- Restore terminal to "normal" mode. ntti() */ tt_queued = 0, /* tty i/o queued in contti() */ conch, /* console input character buffer */ ttch; /* tty input character buffer */ static struct iosb_struct coniosb, ttiosb; static char escchr; /* Escape or attn character */ static struct tt_mode ttold, ttraw, tttvt, /* for communication line */ ccold, ccraw, cccbrk; /* and for console */ /* Event flags used for I/O completion testing */ #define CON_EFN 1 #define TTY_EFN 2 #define TIM_EFN 3 #define SUCCESS(x) (( */ ttres() { /* Restore the tty to normal. */ if (ttychn == 0) return(-1); /* Not open. */ sleep(1); /* Wait for pending i/o to finish. */ debug(F101,"ttres, ttychn","",ttychn); if (!CHECK_ERR("ttres: SYS$QIOW", SYS$QIOW(0, ttychn, IO$_SETMODE, 0, 0, 0, &ttold, sizeof ttold, 0, 0, 0, 0))) return(-1); return(0); } /* T T P K T -- Condition the communication line for packets. */ /* or for modem dialing */ #define DIALING 4 /* flags (via flow) for modem handling *(vms_status = (x)) & 7) == 1) #define CHECK_ERR(s,x) (SUCCESS(x) ? 1 : print_msg(s)) #if 0 /* These aren't used */ static int inbufc = 0; /* stuff for efficient raw line */ static int ungotn = -1; /* pushback to unread character */ #endif /* P R I N T _ M S G -- Log an error message from VMS */ print_msg(s) char *s; { struct dsc$descriptor_s b; short blen; char buf[80], msg[120]; b.dsc$w_length = sizeof buf; b.dsc$b_dtype = DSC$K_DTYPE_T; b.dsc$b_class = DSC$K_CLA/ #define CONNECT 5 /* If called with speed > -1, also set the speed. */ /* Returns 0 on success, -1 on failure. */ ttpkt(speed,flow) int speed, flow; { extern char ttname[]; int s; if (ttychn == 0) return(-1); /* Not open. */ s = ttsspd(speed); /* Check the speed */ #ifdef TT2$M_PASTHRU ttraw.extended |= TT2$M_PASTHRU; #else ttraw.basic |= TT$M_PASSALL; #endif #ifdef TT2$M_ALTYPEAHD ttraw.extended |= TT2$M_ALTYPEAHD; #endif ttraw.basic |= TT$M_NOECHO | TT$M_EIGHTBIt Functions */ /* C O N I N T -- Console Interrupt setter */ conint(f) int (*f)(); { /* Set an interrupt trap. */ if (batch) return; /* must ignore signals in bkgrd */ if (conif) return; /* Nothing to do if already on. */ /* check if invoked in background -- if so signals set to be ignored */ if (signal(SIGINT,SIG_IGN) == SIG_IGN) { batch = 1; /* means running in background */ return; } signal(SIGINT,f); /* Function to trap to. */ conif = 1; /* Flag console the number of characters read as the value of function, or 0 upon end of file, or -1 if an error occurred. Times out & returns error if not completed within "timo" seconds. */ ttinl(dest,max,timo,eol) int max,timo; char *dest; { int x, y, c; int trmmsk[2], func; if (ttychn == 0) return(-1); /* Not open. */ trmmsk[0] = 0; trmmsk[1] = 1 << eol; /* Assumes eol is a control char */ func = IO$_READVBLK; if (timo > 0) func |= IO$M_TIMED; if (!CHECK_ERR("ttinl: SYS$QIOW", interrupts on. */ } /* C O N N O I -- Reset console terminal interrupts */ connoi() { /* Console-no-interrupts */ if (batch) return; /* must ignore signals in bkgrd */ signal(SIGINT,SIG_DFL); conif = 0; } /* T T C H K -- Tell how many characters are waiting in tty input buffer */ ttchk() { struct { short count; char first; char reserved1; long reserved2; } t; return (/* inbufc + (ungotn >= 0) + -- 006 Note: unused */ (CHECK_ERR("ttchk: SYS$QIOW", SYS$QIOW(0, SYS$QIOW(0, ttychn, func, &ttiosb, 0, 0, dest, max, timo, trmmsk, 0, 0)) || ttiosb.status == SS$_TIMEOUT /* Check separately so no err msg */ || !CHECK_ERR("ttinl: ttiosb.status",ttiosb.status)) return(-1); return(ttiosb.size); } /* T T I N C -- Read a character from the communication line */ ttinc(timo) int timo; { int n; CHAR ch; int trmmsk[2], func; if (ttychn == 0) return(-1); /* Not open. */ trmmsk[0] = 0; trmmsk[1] = 0; func = IO$_READVBLK; if (ti speed */ #ifdef TT2$M_PASTHRU ttraw.extended |= TT2$M_PASTHRU; #else ttraw.basic |= TT$M_PASSALL; #endif #ifdef TT2$M_ALTYPEAHD ttraw.extended |= TT2$M_ALTYPEAHD; #endif ttraw.basic |= TT$M_NOECHO | TT$M_EIGHTBIT | TT$M_HOSTSYNC | TT$M_TTSYNC; ttraw.basic &= ~TT$M_WRAP; if (!CHECK_ERR("ttvt: SYS$QIOW", SYS$QIOW(0, ttychn, IO$_SETMODE, 0, 0, 0, &ttraw, sizeof ttraw, s, 0, 0, 0))) return(-1); } /* T T S S P D -- Return the internal baud rate code for 'speed'. */ int spettychn, IO$_SENSEMODE|IO$M_TYPEAHDCNT, 0, 0, 0, &t, sizeof t, 0, 0, 0, 0)) ? t.count : 0)); } /* T T X I N -- Get n characters from tty input buffer */ ttxin(n,buf) int n; char *buf; { int x; long trmmsk[2]; trmmsk[0] = 0; trmmsk[1] = 0; if (!CHECK_ERR("ttxin: SYS$QIOW", SYS$QIOW(0, ttychn, IO$_READVBLK, &ttiosb, 0, 0, buf, n, 0, trmmsk, 0, 0)) || !CHECK_ERR("ttxin: ttiosb.status",ttiosb.status)) return(-1); buf[n] = '\0'; return(ttiosb.size); } /* T T O eds[] = { 110, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 0 } ; static int speedcodes[] = { TT$C_BAUD_110, TT$C_BAUD_150, TT$C_BAUD_300, TT$C_BAUD_600, TT$C_BAUD_1200, TT$C_BAUD_1800, TT$C_BAUD_2400, TT$C_BAUD_4800, TT$C_BAUD_9600, TT$C_BAUD_19200 } ; int ttsspd(speed) int speed; { int s; char msg[50]; if (speed < 0) /* 006 Unknown speed fails */ return (0); for (s = 0; speeds[s] != 0 && speeds[s] != speed; s++) ; if (speeds[s] != 0) return(speedcodes[s]); elL -- Similar to "ttinl", but for writing. */ /* * This probably should be buffered with a flush command added. */ ttol(s,n) int n; char *s; { int x; if (ttychn == 0) return(-1); /* Not open. */ if (CHECK_ERR("ttol: SYS$QIOW", SYS$QIOW(0, ttychn, IO$_WRITEVBLK, 0, 0, 0, s, n, 0, 0, 0, 0))) x = 0; else x = -1; debug(F111,"ttol",s,n); if (x < 0) debug(F101,"ttol failed","",x); return(x); } /* T T O C -- Output a character to the communication line */ ttoc(c) charse { sprintf(msg,"Unsupported line speed - %d\n",speed); ermsg(msg); ermsg("Current speed not changed\n"); return(-1); } } /* T T F L U I -- Flush tty input buffer */ ttflui() { long n; if (ttychn == 0) return(-1); /* Not open. */ if (!CHECK_ERR("ttflui: SYS$QIOW", SYS$QIOW(0, ttychn, IO$_READVBLK|IO$M_TIMED|IO$M_PURGE, 0, 0, 0, &n, 0, 0, 0, 0, 0))) perror("flush failed"); #if 0 /* Note: unused */ inbufc = 0; ungotn = -1; #endif return(0); } /* Interrup c; { if (ttychn == 0) return(-1); /* Not open. */ if (CHECK_ERR("ttoc: SYS$QIOW", SYS$QIOW(0, ttychn, IO$_WRITEVBLK, 0, 0, 0, &c, 1, 0, 0, 0, 0))) return(0); else return(-1); } /* T T I N L -- Read a record (up to break character) from comm line. */ /* If no break character encountered within "max", return "max" characters, with disposition of any remaining characters undefined. Otherwise, return the characters that were read, including the break character, in "dest" and UD_50, 0, 0, 0))) return(-1); x = 0; if (!CHECK_ERR("ttsndb: writing nulls", SYS$QIOW(0, ttychn, IO$_WRITEVBLK, 0, 0, 0, &x, 2, 0, 0, 0, 0))) return(-1); if (!CHECK_ERR("ttsndb: SETMODE(2)", SYS$QIOW(0, ttychn, IO$_SETMODE, 0, 0, 0, &ttchr, sizeof ttchr, ttiosb.size, 0, 0, 0))) return(-1); return(0); } /* T T H A N G -- Hang up the communications line */ tthang() { if (ttychn == 0) return(0); /* Not open. */ tt_cancel(); if (!CHECK_ERR("tthang: SYS$QIOW", SYS$QITERM) batch = 1; else { if (conchn == 0 && (conchn = vms_assign_channel("SYS$INPUT:")) == 0) return(-1); debug(F101, "congm: conchn", "", conchn); if (!CHECK_ERR("congm: SYS$QIOW", SYS$QIOW(0, conchn, IO$_SENSEMODE, 0, 0, 0, &ccold, sizeof ccold, 0, 0, 0, 0))) return(-1); ccraw = cccbrk = ccold; } cgmf = 1; /* Flag that we got them. */ return(0); } /* C O N C B -- Put console in cbreak mode. */ /* Returns 0 if ok, -1 if not */ conOW(0, ttychn, IO$_SETMODE|IO$M_HANGUP, 0, 0, 0, 0, 0, 0, 0, 0, 0))) return(-1); return(0); } /* M S L E E P -- Millisecond version of sleep(). */ /* Handles intervals up to about 7 minutes (2**32 / 10**7 seconds) */ msleep(m) int m; { struct time_struct { long int hi, lo; } t; t.hi = -10000 * m; /* Time in 100-nanosecond units */ t.lo = -1; if (!CHECK_ERR("msleep: SYS$SCHDWK", SYS$SCHDWK(0, 0, &t, 0))) return(-1); SYS$HIBER(); return(0); } /* Z T I M E -cb(esc) char esc; { int x; if (cgmf == 0) congm(); /* Get modes if necessary. */ if (batch) return(0); escchr = esc; /* Make this available to other fns */ ckxech = 1; /* Program can echo characters */ #ifdef TT2$M_PASTHRU cccbrk.extended |= TT2$M_PASTHRU; #else #ifdef TT2$M_ALTYPEAHD cccbrk.extended |= TT2$M_ALTYPEAHD; #endif cccbrk.basic |= TT$M_PASSALL; #endif cccbrk.basic |= TT$M_NOECHO | TT$M_EIGHTBIT; cccbrk.basic &= ~TT$M_WRAP & ~TT$M_HOSTSYNC & ~TT$M_TTS- Return date/time string */ ztime(s) char **s; { struct dsc$descriptor_s t; static char time_string[24]; t.dsc$w_length = sizeof time_string - 1; /* Leave room for null */ t.dsc$a_pointer = time_string; t.dsc$b_class = DSC$K_CLASS_S; t.dsc$b_dtype = DSC$K_DTYPE_T; if (!CHECK_ERR("ztime: SYS$ASCTIM", SYS$ASCTIM(0, &t, 0, 0))) return(-1); time_string[t.dsc$w_length] = '\0'; *s = time_string; } /* C O N G M -- Get console terminal modes. */ /* Saves cuYNC; if (!CHECK_ERR("concb: SYS$QIOW", SYS$QIOW(0, conchn, IO$_SETMODE, 0, 0, 0, &cccbrk, sizeof cccbrk, 0, 0, 0, 0))) return(-1); return(0); } /* C O N B I N -- Put console in binary mode */ /* Returns 0 if ok, -1 if not */ conbin(esc) char esc; { if (cgmf == 0) congm(); /* Get modes if necessary. */ if (batch) return(0); escchr = esc; /* Make this available to other fns */ ckxech = 1; /* Program can echo characters */ #ifdef TT2$M_PASTHRU ccraw.exmo > 0) func |= IO$M_TIMED; if (!CHECK_ERR("ttinc: SYS$QIOW", SYS$QIOW(0, ttychn, func, &ttiosb, 0, 0, &ch, 1, timo, trmmsk, 0, 0)) || ttiosb.status == SS$_TIMEOUT /* Check separately so no err msg */ || !CHECK_ERR("ttinc: ttiosb.status",ttiosb.status)) return(-1); return(ch & 0377); } /* T T _ C A N C E L -- Cancel i/o on tty channel if not complete */ tt_cancel() { int mask; if (tt_queued) { if (!CHECK_ERR("tt_cancel: SYS$READEF", SYS$READEF(TTY_EFN, &mask))) return(-1);rrent console mode, and establishes variables for switching between current (presumably normal) mode and other modes. */ congm() { struct { short len, code; char *buf, *retlen; } itmlst[2]; int devclass, context; struct dsc$descriptor_s f, r; char buf[100], *strchr(); r.dsc$w_length = sizeof buf; r.dsc$b_dtype = DSC$K_DTYPE_T; r.dsc$b_class = DSC$K_CLASS_S; r.dsc$a_pointer = buf; f.dsc$w_length = 10; f.dsc$b_dtype = DSC$K_DTYPE_T; f.dsc$b_class = DSC if ((mask & (1< 0) func |= IO$M_TIMED; CHECK_ERR("coninc: SYS$QIOW", SYS$QIOW(0, conchn, func, 0, 0, 0, &ch, 1, timo, 0, 0, 0)); ch &= 0377; } if (ch == '\r') ch = '\n'; if ((vms_status & 7) == 1) return(ch); else return(-1); } /* V M S _ G E T C H A R -- get a character from the console (no echo). * Since ; } /* C O N X O -- Write x characters to the console terminal */ conxo(x,s) char *s; int x; { if (batch) fprintf(stdout, "%.*s", x, s); else CHECK_ERR("conxo: SYS$QIOW", SYS$QIOW(0, conchn, IO$_WRITEVBLK, 0, 0, 0, s, x, 0, 0, 0, 0)); } /* C O N O L -- Write a line to the console terminal */ conol(s) char *s; { int len; if (batch) fputs(s, stdout); else { len = strlen(s); CHECK_ERR("conol: SYS$QIOW", SYS$QIOW(0, conchn, IO$_WRITEVBLK, 0, 0, 0, s, len, 0, 0, 0, we use raw reads, we must check for ctrl/c, ctrl/y and * ctrl/z ourselves. We probably should post a "mailbox" for * ctrl/c and ctrl/y so the poor user can abort a runaway Kermit. * Note: this routine intends for ctrl/z (eof) to be "permanent". * Currently, no kermit routine calls "clearerror". If this * changes, the following code must be rewritten. */ int vms_getchar() { register int ch; static int ateof = FALSE; if (ateof) return (EOF); ch = coninc(0); switch (ch) { case ('Y' & 0x1F)0)); } } /* C O N O L A -- Write an array of lines, each followed by CRLF */ /* * The original string is copied, any trailing \n and/or \r is removed, * and then an explicit \r\n is appended to it. */ conola(s) char *s[]; { int i; char t[100], *cp; for ( i=0; *s[i]; i++ ) { strcpy ( t, s[i] ); /* copy the original string */ for ( cp = t + strlen(t); --cp >= t; ) { if ( *cp != '\n' && *cp != '\r' ) { cp++; *cp++ = '\r'; *cp++ = '\n'; *cp = '\0'; break; } : case ('C' & 0x1F): ttclos(); /* Close down other terminal */ conres(); /* And cleanup console modes */ exit(SS$_ABORT); /* Fatal exit. */ case ('Z' & 0x1F): ateof = TRUE; return (EOF); default: return (ch); } } /* C O N T T I -- Get character from console or tty, whichever comes */ /* first. This is used in conect() when NO_FORK is defined. */ /* src is returned with 1 if the character came from the comm. line, */ /* 0 if it was from the console, and wi } conol(t); /* output the modified string */ } } /* C O N O L L -- Output a string followed by CRLF */ conoll(s) char *s; { conol(s); conol("\r\n"); } /* C O N C H K -- Check if characters available at console */ conchk() { struct { short count; char first; char reserved1; long reserved2; } t; if (batch) return(0); return(CHECK_ERR("conchk: SYS$QIOW", SYS$QIOW(0, conchn, IO$_SENSEMODE|IO$M_TYPEAHDCNT, 0, 0, 0, &t, sizeof t, 0, 0, 0, 0)) ? t.count : 0); } /* th -1 if there was any error. */ contti(c, src) int *c, *src; { int mask = 1< 0) { struct { int hi, lo; } qtime; qtime.hi = -10*1000*1000*timo; /* Max about seven minutes */ qtime.lo = -1; SYS$SETIMR(TIM_EFN, &qtime, 0, 0); mask |= TIM_EFN; } SYS$WFLOR(CON_EFN, mask); SYS$READEF(CON_EFN, &mask); if (mask & (1 << CON_EFN)) { ch = conch if (!CHECK_ERR("contti: tty SYS$QIO", SYS$QIO(TTY_EFN, ttychn, IO$_READVBLK, &ttiosb, 0, 0, &ttch, 1, 0, 0, 0, 0))) return(-1); tt_queued = 1; if (!CHECK_ERR("contti: SYS$WFLOR", SYS$WFLOR(CON_EFN, mask))) return(-1); if (!CHECK_ERR("contti: SYS$READEF", SYS$READEF(CON_EFN, &mask))) return(-1); if (*src = (mask & (1<= 0) ); #else #ifdef PROVX1 x = ioctl(ttyfd, TIOCQCNT, &ttbuf); n = ttbuf.sg_ispeed & 0377; return((x < 0) ? 0 : n); #else return(0); #endif #endif #endif #endif } /* T T X I N -- Get n characters from tty input buffer */ ttxin(n,buf) int n; char *buf; { int x; #ifdef UXIII for( x=0; x 0) buf[x] = '\0'; return(x); } /* T T O L -- Similar to "ttinl", but for writing. */ ttol(s,n) int n; char *s; { int x; if (ttyfd < 0) return(-1); /* Not open. */ x = write(ttyfd,s,n); debug(F111,"ttol",s,n); if (x < 0) debug(F101,"ttol failed","",x); return(x); } /* T T O C -- Output a character to the communication line */ ttoc(c) char c; { if (ttyfd < 0) return(-1); /* Not open. */ return(write(ttyfd,&c,1)); } /* T T I N L -- Read a record (up to break character) from comm line. */ /* If no break character encountered within "max", return "max" characters, with disposition of any remaining characters undefined. Otherwise, return the characters that were read, including the break character, in "dest" and the number of characters read as the value of function, or 0 upon end of file, or -1 if an error occurred. Times out & returns error if not completed within "timo" seconds. */ ttinl(dest,max,timo,e ttsndb() { int x; char spd; if (ttyfd < 0) return(-1); /* Not open. */ #ifdef PROVX1 gtty(ttyfd,&ttbuf); /* Get current tty flags */ spd = ttbuf.sg_ospeed; /* Save speed */ ttbuf.sg_ospeed = B50; /* Change to 50 baud */ stty(ttyfd,&ttbuf); /* ... */ write(ttyfd,brnuls,3); /* Send 3 nulls */ ttbuf.sg_ospeed = spd; /* Restore speed */ stty(ttyfd,&ttbuf); /* ... */ return(0); #else #ifdef UXIII if (ioctl(ttyfd,TCSBRK,(char *)0) < 0) { /* Send a BREAK if } /* Z T I M E -- Return date/time string */ ztime(s) char **s; { #ifdef UXIII extern long time(); /* Sys III/V way to do it */ char *ctime(); long clock_storage; clock_storage = time( (long *) 0 ); *s = ctime( &clock_storage ); #endif #ifdef PROVX1 int utime[2]; /* Venix way */ time(utime); *s = ctime(utime); #endif #ifdef ANYBSD char *asctime(); /* Berkeley way */ struct tm *localtime(); struct tm *tp; #ifndef BSD41 gettimeofday(&tv, &tzol) int max,timo; char *dest; { int x, y; CHAR c; if (ttyfd < 0) return(-1); /* Not open. */ if (timo <= 0) { /* Untimed. */ #ifndef UXIII x = read(ttyfd,dest,max); /* Try to read. */ #else for (x = c = 0; (x < max) && (c != eol); x++) { c = myread(); dest[x] = c; } #endif return(x); /* Return the count. */ } signal(SIGALRM,timerh); /* Timed, set up timeout action. */ alarm(timo); /* Set the timer. */ if (setjmp(sjbuf)) x = -1; /* Do this if timer w*/ conol("Can't send BREAK"); return(-1); } return(0); #else #ifdef ANYBSD if (ioctl(ttyfd,TIOCSBRK,(char *)0) < 0) { /* Turn on BREAK */ conol("Can't send BREAK"); return(-1); } x = msleep(275); /* Sleep for so many milliseconds */ if (ioctl(ttyfd,TIOCCBRK,(char *)0) < 0) { /* Turn off BREAK */ conol("BREAK stuck!!!"); doexit(1); /* Get out, closing the line. */ /* with exit status = 1 */ } return(x); #else #ifdef V7 genbrk(ttyfd); /* Simulate ent off. */ else if (kerld) { x = read(ttyfd,dest,max); /* Try to read. */ } else { for (x = c = y = 0; (x < max) && (c != eol); x++) { #ifndef UXIII while ( !(y = read(ttyfd,&c,1))) ; /* skip null reads */ if (y < 0) { alarm(0); /* Error, turn off timer, */ signal(SIGALRM,SIG_DFL); /* and associated interrupt. */ return(y); /* Return the error indication. */ } #else c = myread(); /* always do multi-char reads */ #endif dest[x] = c; } x++; } alaa BREAK */ return(x); #endif #endif #endif #endif } /* M S L E E P -- Millisecond version of sleep(). */ /* Intended only for small intervals. For big ones, just use sleep(). */ msleep(m) int m; { #ifdef PROVX1 sleep(-((m * 60 + 500) / 1000)); return(0); #endif #ifdef ANYBSD int t1, t3, t4; #ifdef BSD41 if (ftime(&ftp) < 0) return(-1); /* Get current time. */ t1 = ((ftp.time & 0xff) * 1000) + ftp.millitm; while (1) { ftime(&ftp); /* new time */ t3 = (((ftp.time &rm(0); /* Success, turn off timer, */ signal(SIGALRM,SIG_DFL); /* and associated interrupt. */ return(x); /* Return the count. */ } /* T T I N C -- Read a character from the communication line */ ttinc(timo) int timo; { int n; CHAR ch; if (ttyfd < 0) return(-1); /* Not open. */ if (timo <= 0) { /* Untimed. */ #ifndef UXIII while ( !(n = read(ttyfd,&ch,1)) ) ; /* Wait for a character. */ return( (n > 0) ? (ch & 0377) : n ); #else /* comm line failure returns - 0xff) * 1000) + ftp.millitm) - t1; if (t3 > m) return (t3); } #else /* 2.9 and 4.1 BSD do it this way */ if (gettimeofday(&tv, &tz) < 0) return(-1); /* Get current time. */ t1 = tv.tv_sec; /* Seconds */ tv.tv_sec = 0; /* Use select() */ tv.tv_usec = m * 1000; return(select( 0, (int *)0, (int *)0, (int *)0, &tv) ); #endif #endif #ifdef UXIII #ifdef XENIX #define CLOCK_TICK 50 /* millisecs per clock tick */ #else #define CLOCK_TICK 17 /* 1/60 sec */ #endif extern long t1 thru myread, so no &= 0377 */ return( myread() ); #endif } signal(SIGALRM,timerh); /* Timed, set up timer. */ alarm(timo); if (setjmp(sjbuf)) n = -1; else { #ifndef UXIII n = read(ttyfd,&ch,1); /* Read a character. */ #else ch = myread(); n = 1; #endif } alarm(0); /* Turn off timer, */ signal(SIGALRM,SIG_DFL); /* and interrupt. */ if (n > 0) return(ch & 0377); else return(n); /* Return char or -1. */ } /* T T S N D B -- Send a BREAK signal */ imes(); long t1, t2, tarray[4]; int t3; if ((t1 = times(tarray)) < 0) return(-1); while (1) { if ((t2 = times(tarray)) < 0) return(-1); t3 = ((int)(t2 - t1)) * CLOCK_TICK; if (t3 > m) return(t3); } #endif #ifdef TOWER1 int t1, t3; if (ftime(&ftp) < 0) return(-1); /* Get current time. */ t1 = ((ftp.time & 0xff) * 1000) + ftp.millitm; while (1) { ftime(&ftp); /* new time */ t3 = (((ftp.time & 0xff) * 1000) + ftp.millitm) - t1; if (t3 > m) return (t3); } #endCANON|ECHO); cccbrk.c_cc[0] = 003; /* interrupt char is control-c */ cccbrk.c_cc[1] = escchr; /* escape during packet modes */ cccbrk.c_cc[4] = 1; cccbrk.c_cc[5] = 1; x = ioctl(0,TCSETAW,&cccbrk); /* set new modes . */ #endif if (x > -1) setbuf(stdout,NULL); /* Make console unbuffered. */ #ifdef V7 if (kmem[CON] < 0) { qaddr[CON] = initrawq(0); if((kmem[CON] = open("/dev/kmem", 0)) < 0) { fprintf(stderr, "Can't read /dev/kmem in concb.\n"); perror("/dev/kmem"); erminal */ conxo(x,s) char *s; int x; { write(1,s,x); } /* C O N O L -- Write a line to the console terminal */ conol(s) char *s; { int len; len = strlen(s); write(1,s,len); } /* C O N O L A -- Write an array of lines to the console terminal */ conola(s) char *s[]; { int i; for (i=0 ; *s[i] ; i++) conol(s[i]); } /* C O N O L L -- Output a string followed by CRLF */ conoll(s) char *s; { conol(s); write(1,"\r\n",2); } /* C O N C H K -- Check if character exit(1); } } #endif V7 return(x); } /* C O N B I N -- Put console in binary mode */ /* Returns 0 if ok, -1 if not */ conbin(esc) char esc; { if (cgmf == 0) congm(); /* Get modes if necessary. */ escchr = esc; /* Make this available to other fns */ ckxech = 1; /* Program can echo characters */ #ifndef UXIII ccraw.sg_flags |= (RAW|TANDEM); /* Set rawmode, XON/XOFF */ ccraw.sg_flags &= ~(ECHO|CRMOD); /* Set char wakeup, no echo */ return(stty(0,&ccraw))s available at console */ conchk() { int x; long n; #ifdef PROVX1 x = ioctl(0, TIOCQCNT, &ttbuf); n = ttbuf.sg_ispeed & 0377; return((x < 0) ? 0 : n); #else #ifdef V7 lseek(kmem[CON], (long) qaddr[CON], 0); x = read(kmem[CON], &n, sizeof(int)); return((x == sizeof(int))? n: 0); #else #ifndef UXIII x = ioctl(0, FIONREAD, &n); return((x < 0) ? 0 : n); #else if (conesc) { /* Escape typed */ conesc = 0; signal(SIGQUIT,esctrp); /* restore escape */ return(1); ); /* BSD 2.9, 4.2 ... */ time(&tv.tv_sec); tp = localtime(&tv.tv_sec); #else time(&clock); /* BSD 4.1 ... ceb */ tp = localtime(&clock); #endif *s = asctime(tp); #endif #ifdef TOWER1 char *asctime(); /* Tower way */ struct tm *localtime(); struct tm *tp; time(&clock); tp = localtime(&clock); *s = asctime(tp); #endif #ifdef V7 char *asctime(); /* V7 way */ struct tm *localtime(); struct tm *tp; time(&clock); tp = localtime(&clock); ; #else ccraw.c_lflag &= ~(ISIG|ICANON|ECHO); ccraw.c_iflag |= (BRKINT|IGNPAR); ccraw.c_iflag &= ~(IGNBRK|INLCR|IGNCR|ICRNL|IUCLC|IXON|IXANY|IXOFF |INPCK|ISTRIP); ccraw.c_oflag &= ~OPOST; /*** Kermit used to put the console in 8-bit raw mode, but some users have *** pointed out that this should not be done, since some sites actually *** use terminals with parity settings on their Unix systems, and if we *** override the current settings and stop doing parity, then their terminals *** *s = asctime(tp); #endif } /* C O N G M -- Get console terminal modes. */ /* Saves current console mode, and establishes variables for switching between current (presumably normal) mode and other modes. */ congm() { #ifndef UXIII gtty(0,&ccold); /* Structure for restoring */ gtty(0,&cccbrk); /* For setting CBREAK mode */ gtty(0,&ccraw); /* For setting RAW mode */ #else ioctl(0,TCGETA,&ccold); ioctl(0,TCGETA,&cccbrk); ioctl(0,TCGETA,&ccraw); #endif cgmf will display blotches for characters whose parity is wrong. Therefore, *** the following two lines are commented out (Larry Afrin, Clemson U): *** *** ccraw.c_cflag &= ~(PARENB|CSIZE); *** ccraw.c_cflag |= (CS8|CREAD); *** *** Sys III/V sites that have trouble with this can restore these lines. ***/ ccraw.c_cc[4] = 1; ccraw.c_cc[5] = 1; return(ioctl(0,TCSETAW,&ccraw) ); /* set new modes . */ #endif } /* C O N R E S -- Restore the console terminal */ conres() { if (cgmf = 1; /* Flag that we got them. */ } /* C O N C B -- Put console in cbreak mode. */ /* Returns 0 if ok, -1 if not */ concb(esc) char esc; { int x; if (cgmf == 0) congm(); /* Get modes if necessary. */ escchr = esc; /* Make this available to other fns */ ckxech = 1; /* Program can echo characters */ #ifndef UXIII cccbrk.sg_flags |= CBREAK; /* Set to character wakeup, */ cccbrk.sg_flags &= ~ECHO; /* no echo. */ x = stty(0,&cccbrk); #else cccbrk.c_lflag &= ~(I== 0) return(0); /* Don't do anything if modes */ #ifndef UXIII /* except for sIII, */ sleep(1); /* not known! */ #endif /* (sIII does wait in ioctls) */ ckxech = 0; /* System should echo chars */ #ifndef UXIII return(stty(0,&ccold)); /* Restore controlling tty */ #else return(ioctl(0,TCSETAW,&ccold)); #endif } /* C O N O C -- Output a character to the console terminal */ conoc(c) char c; { write(1,&c,1); } /* C O N X O -- Write x characters to the console tcan't be ^c, sigint never returns */ #endif return(-1); } signal(SIGALRM,timerh); /* Timed read, so set up timer */ alarm(timo); if (setjmp(sjbuf)) n = -2; else { n = read(0, &ch, 1); ch &= 0377; } alarm(0); /* Stop timing, we got our character */ signal(SIGALRM,SIG_DFL); if (n > 0) return(ch); else #ifdef UXIII if (n == -1 && errno == EINTR) /* If read interrupted by QUIT, */ return(escchr); /* user entered escape character, */ else /* -\n", " -l line communication line device\n", " -b baud line speed, e.g. 1200\n", " -i binary file or Unix-to-Unix\n", " -p x parity, x is one of e,o,m,s,n\n", " -t line turnaround handshake = xon, half duplex\n", " -w don't write over preexisting files\n", " -q be quiet during file transfer\n", " -d log debugging info to debug.log\n", " If no action command is included, enter interactive dialog.columbia/ckuus2.c 664 0 3 35370 3510607613 7216 \n", "" }; /* U S A G E */ usage() { conola(hlp1); } /* Help string definitions */ static char *tophlp[] = { "\n\ Type ? for a list of commands, type 'help x' for any command x.\n\ While typing commands, use the following special characters:\n\n\ DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.\n\ CTRL-W: Delete the most recent word typed.\n", "\ CTRL-U: Delete the current line.\n\ CTRL-R: Redisplay the current line.\n\ ? (question mark) display help on the c/* C K U U S 2 -- "User Interface" STRINGS module for Unix Kermit */ /* Author: Frank da Cruz (SY.FDC@CU20B), Columbia University Center for Computing Activities, January 1985. Copyright (C) 1985, Trustees of Columbia University in the City of New York. Permission is granted to any individual or institution to use, copy, or redistribute this software so long as it is not sold for profit, provided this copyright notice is retained. */ /* This module separates long strings from the body of the current command or field.\n\ ESC (Escape or Altmode) Attempt to complete the current field.\n", "\ \\ (backslash) include the following character literally.\n\n\ From system level, type 'kermit -h' to get help about command line args.\ \n", "" }; static char *hmxxbye = "\ Shut down and log out a remote Kermit server"; static char *hmxxclo = "\ Close one of the following logs:\n\ session, transaction, packet, debugging -- 'help log' for further info."; static char *hmxxcon = "\ Connect to a r} return(0); #endif #endif #endif } /* C O N I N C -- Get a character from the console */ coninc(timo) int timo; { int n = 0; char ch; if (timo <= 0 ) { /* untimed */ n = read(0, &ch, 1); /* Read a character. */ ch &= 0377; if (n > 0) return(ch); /* Return the char if read */ else #ifdef UXIII if (n < 0 && errno == EINTR) /* if read was interrupted by QUIT */ return(escchr); /* user entered escape character */ else /* couldnt be ^c, sigint never returns */ #ekuser module. */ #include "ckcdeb.h" #include #include #include "ckcker.h" #include "ckucmd.h" #include "ckuusr.h" extern char cmdbuf[]; extern int nrmt, nprm, dfloc; extern char *dftty; extern struct keytab prmtab[]; extern struct keytab remcmd[]; static char *hlp1[] = { "\n", " Usage: kermit [-x arg [-x arg]...[-yyy]..]]\n", " x is an option that requires an argument, y an option with no argument:\n", " actions (* options also require -l and -b) --\n", " -s file(s) ndif return(-1); /* Return the char, or -1. */ } signal(SIGALRM,timerh); /* Timed read, so set up timer */ alarm(timo); if (setjmp(sjbuf)) n = -2; else { n = read(0, &ch, 1); ch &= 0377; } alarm(0); /* Stop timing, we got our character */ signal(SIGALRM,SIG_DFL); if (n > 0) return(ch); else #ifdef UXIII if (n == -1 && errno == EINTR) /* If read interrupted by QUIT, */ return(escchr); /* user entered escape character, */ else /* send (use '-s -' to send from stdin)\n", " -r receive\n", " -k receive to stdout\n", " * -g file(s) get remote file(s) from server (quote wildcards)\n", " -a name alternate name, used with -s, -r, -g\n", " -x enter server mode\n", " * -f finish remote server\n", " * -c connect before transaction\n", " * -n connect after transaction\n", " -h help - print this message\n", " settings -it packets, to help track down protocol problems.\n\ (packet.log)\n\n", " session Terminal session, during CONNECT command.\n\ (session.log)\n\n\ transactions Names and statistics about files transferred.\n\ (transact.log)\n", "" } ; static char *hmxxlogi[] = { "\ Syntax: script text\n\n", "Login to a remote system using the text provided. The login script\n", "is intended to operate similarly to uucp \"L.sys\" entries.\n", "A login script is a sequence of the form:\n\n",ck check to be used for error detection, 1, 2, or 3.\n", "Type 1 is standard, and catches most errors. Types 2 and 3 specify more\n", "rigorous checking at the cost of higher overhead. Not all Kermit programs\n", "support types 2 and 3.\n", "" } ; static char *hmxyf[] = { "\set file: names, type, warning, display.\n\n", "'names' are normally 'converted', which means file names are converted\n", "to 'common form' during transmission; 'literal' means use filenames\n", "literally (useful between like sys " expect send [expect send] . . .\n\n", "where 'expect' is a prompt or message to be issued by the remote site, and\n", "'send' is the names, numbers, etc, to return. The send may also be the\n", "keyword EOT, to send control-d, or BREAK, to send a break. Letters in\n", "send may be prefixed by ~ to send special characters. These are:\n", "~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don\'t\n", "append a return, and ~o[o[o]] for octal of a character. As with some \n", "uucp systems, sent tems).\n\n", "'type' is normally 'text', in which conversion is done between Unix\n", "newlines and CRLF line delimiters; 'binary' means to do no conversion.\n", "Use 'binary' for executable programs or binary data.\n\n", "'warning' is 'on' or 'off', normally off. When off, incoming files will\n", "overwrite existing files of the same name. When on, new names will be\n", "given to incoming files whose names are the same as existing files.\n", "\n\ 'display' is normally 'on', causing file transfer progressstrings are followed by ~r unless they end with ~c.\n\n", "Only the last 7 characters in each expect are matched. A null expect,\n", "e.g. ~0 or two adjacent dashes, causes a short delay. If you expect\n", "that a sequence might not arrive, as with uucp, conditional sequences\n", "may be expressed in the form:\n\n", " -send-expect[-send-expect[...]]\n\n", "where dashed sequences are followed as long as previous expects fail.\n", "" }; static char *hmxxrc[] = { "\ Format: 'receive [filespec]'. Wait for a to be displayed\n", "on your screen when in local mode. 'set display off' is useful for\n", "allowing file transfers to proceed in the background.\n\n", "" } ; static char *hmhrmt[] = { "\ The 'remote' command is used to send file management instructions to a\n", "remote Kermit server. There should already be a Kermit running in server\n", "mode on the other end of the currently selected line. Type 'remote ?' to\n", "see a list of available remote commands. Type 'help remote x' to get\n", "further inf file to arrive from the other\n\ Kermit, which must be given a 'send' command. If the optional filespec is\n", "given, the (first) incoming file will be stored under that name, otherwise\n\ it will be stored under the name it arrives with.", "" } ; static char *hmxxsen = "\ Format: 'send file1 [file2]'. File1 may contain wildcard characters '*' or\n\ '?'. If no wildcards, then file2 may be used to specify the name file1 is\n\ sent under; if file2 is omitted, file1 is sent under its own name."; staticormation about a particular remote command 'x'.\n", "" } ; /* D O H L P -- Give a help message */ dohlp(xx) int xx; { int x,y; if (xx < 0) return(xx); switch (xx) { case XXBYE: return(hmsg(hmxxbye)); case XXCLO: return(hmsg(hmxxclo)); case XXCON: return(hmsg(hmxxcon)); case XXCWD: #ifdef vms return(hmsg("\ Change Working Directory, equivalent to VMS SET DEFAULT command")); #else return(hmsg("Change Working Directory, equivalent to Unix 'cd' command")); #endif cemote system via the tty device given in the\n\ most recent 'set line' command"; static char *hmxxget = "\ Format: 'get filespec'. Tell the remote Kermit server to send the named\n\ files. If filespec is omitted, then you are prompted for the remote and\n\ local filenames separately."; static char *hmxxlg[] = { "\ Record information in a log file:\n\n\ debugging Debugging information, to help track down\n\ (default debug.log) bugs in the C-Kermit program.\n\n\ packets Kerm char *hmxxser = "\ Enter server mode on the currently selected line. All further commands\n\ will be taken in packet form from the other Kermit program."; static char *hmhset[] = { "\ The 'set' command is used to establish various communication or file\n", "parameters. The 'show' command can be used to display the values of\n", "'set' parameters. Help is available for each individual parameter;\n", "type 'help set ?' to see what's available.\n", "" } ; static char *hmxychkt[] = { "\ Type of packet bloase XXDEL: return(hmsg("Delete a local file or files")); case XXDIAL: return(hmsg("Dial a number using modem autodialer")); case XXDIR: return(hmsg("Display a directory of local files")); case XXECH: return(hmsg("Display the rest of the command on the terminal,\n\ useful in command files.")); case XXEXI: case XXQUI: return(hmsg("Exit from the Kermit program, closing any open logs.")); case XXFIN: return(hmsg("\ Tell the remote Kermit server to shut down without logging out.")); a(hmxychkt)); case XYDELA: puts("\ Number of seconds to wait before sending first packet after 'send' command."); return(0); case XYDUPL: puts("\ During 'connect': 'full' means remote host echoes, 'half' means this program"); puts("does its own echoing."); return(0); case XYESC: printf("%s","\ Decimal ASCII value for escape character during 'connect', normally 28\n\ (Control-\\)\n"); return(0); case XYFILE: return(hmsga(hmxyf)); case XYFLOW: puts("\ Type of flow con case XXGET: return(hmsg(hmxxget)); case XXHLP: return(hmsga(tophlp)); case XXLOG: return(hmsga(hmxxlg)); case XXLOGI: return(hmsga(hmxxlogi)); case XXREC: return(hmsga(hmxxrc)); case XXREM: if ((y = cmkey(remcmd,nrmt,"Remote command","")) == -2) return(y); if (y == -1) return(y); if (x = (cmcfm()) < 0) return(x); return(dohrmt(y)); case XXSEN: return(hmsg(hmxxsen)); case XXSER: return(hmsg(hmxxser)); case XXSET: if ((y = cmkey(prmtab,nprm,"Parametetrol to be used. Choices are 'xon/xoff' and 'none'."); puts("normally xon/xoff."); return(0); case XYHAND: puts("\ Decimal ASCII value for character to use for half duplex line turnaround"); puts("handshake. Normally, handshaking is not done."); return(0); case XYLINE: printf("\ Device name of communication line to use. Normally %s.\n",dftty); if (!dfloc) { printf("\ If you set the line to other than %s, then Kermit\n",dftty); printf("\ will be in 'local' mode; 'set liner","")) == -2) return(y); if (y == -2) return(y); if (x = (cmcfm()) < 0) return(x); return(dohset(y)); case XXSHE: #ifdef vms return(hmsg("\ Issue a command to VMS (space required after '!')")); #else return(hmsg("\ Issue a command to the Unix shell (space required after '!')")); #endif case XXSHO: return(hmsg("\ Display current values of 'set' parameters; 'show version' will display\n\ program version information for each of the C-Kermit modules.")); case XXSPA: return(hmsg("' will reset Kermit to remote mode.\n"); puts("\ If the line has a modem, and if the modem-dialer is set to direct, this"); puts("\ command causes waiting for a carrier detect (e.g. on a hayes type modem)."); puts("\ This can be used to wait for incoming calls."); puts("\ To use the modem to dial out, first set modem-dialer (e.g., to hayes), then"); puts("set line, next issue the dial command, and finally connect."); } return(0); case XYMODM: puts("\ Type of modem for dialinDisplay disk usage in current device, directory")); case XXSTA: return(hmsg("Display statistics about most recent file transfer")); case XXTAK: return(hmsg("\ Take Kermit commands from the named file. Kermit command files may\n\ themselves contain 'take' commands, up to a reasonable depth of nesting.")); default: if (x = (cmcfm()) < 0) return(x); printf("Not available yet - %s\n",cmdbuf); break; } return(0); } /* H M S G -- Get confirmation, then print the given messagg remote connections. Needed to indicate modem can"); puts("\ be commanded to dial without 'carrier detect' from modem. Many recently"); puts("\ manufactured modems use 'hayes' protocol. Type 'set modem ?' to see what"); puts("\ types of modems are supported by this program."); return(0); case XYPARI: puts("Parity to use during terminal connection and file transfer:"); puts("even, odd, mark, space, or none. Normally none."); return(0); case XYPROM: puts("Prompt string e */ hmsg(s) char *s; { int x; if (x = (cmcfm()) < 0) return(x); puts(s); return(0); } hmsga(s) char *s[]; { /* Same function, but for arrays */ int x, i; if ( x = (cmcfm()) < 0) return(x); for ( i = 0; *s[i] ; i++ ) fputs(s[i], stdout); fputc( '\n', stdout); return(0); } /* D O H S E T -- Give help for SET command */ dohset(xx) int xx; { if (xx == -3) return(hmsga(hmhset)); if (xx < 0) return(xx); switch (xx) { case XYCHKT: return(hmsgfor this program, normally 'C-Kermit>'."); return(0); case XYSPEE: puts("\ Communication line speed for external tty line specified in most recent"); puts("\ 'set line' command. Any of the common baud rates:"); puts(" 0, 110, 150, 300, 600, 1200, 1800, 2400, 4800, 9600."); return(0); case XYRECV: puts("\ Specify parameters for inbound packets:"); puts("\ End-Of-Packet (ASCII value), Packet-Length (94 or less),"); puts("\ Padding (amount, 94 or less), Pad-Character (ASCIImmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm value),"); puts("\ Start-Of-Packet (ASCII value), and Timeout (94 seconds or less),"); puts("\ all specified as decimal numbers."); return(0); case XYSEND: puts("\ Specify parameters for outbound packets:"); puts("\ End-Of-Packet (ASCII value), Packet-Length (94 or less),"); puts("\ Padding (amount, 94 or less), Pad-Character (ASCII value),"); puts("\ Start-Of-Packet (ASCII value), and Timeout (94 seconds or less),"); puts("\ all specified as decimal numbers."); return(0); default: printf("%s","Not available yet - %s\n",cmdbuf); return(0); } } /* D O H R M T -- Give help about REMOTE command */ dohrmt(xx) int xx; { int x; if (xx == -3) return(hmsga(hmhrmt)); if (xx < 0) return(xx); switch (xx) { case XZCWD: return(hmsg("\ Ask remote Kermit server to change its working directory.")); case XZDEL: return(hmsg("\ Ask remote Kermit server to delete the named file(s).")); case XZDIR: return(hmsg("\ Ask remote Kermit server to provide directory listing of the named file(s).")); case XZHLP: return(hmsg("\ Ask remote Kermit server to tell you what services it provides.")); case XZHOS: return(hmsg("\ Send a command to the remote system in its own command language\n\ through the remote Kermit server.")); case XZSPA: return(hmsg("\ Ask the remote Kermit server to tell you about its disk space.")); case XZTYP: return(hmsg("\ Ask the remote Kermit server to type the named file(s) on your screen.")); case XZWHO: mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm return(hmsg("\ Ask the remote Kermit server to list who's logged in, or to give information\n\ about the specified user.")); default: if (x = (cmcfm()) < 0) return(x); printf("%s","not working yet - %s\n",cmdbuf); return(-2); } } \n\ through the remote Kermit server.")); case XZSPA: return(hmsg("\ Ask the remote Kermit server to tell you about its disk space.")); case XZTYP: return(hmsg("\ Ask the remote Kermit server to type the named file(s) on your screen.")); case XZWHO: mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm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