📄 ckermit.ini
字号:
COMMENT - Standard C-Kermit initialization file;; For C-Kermit Version: 6.0.192;; Filename:; .kermrc (UNIX, OS-9, Aegis); CKERMIT.INI (OS/2, VMS, OpenVMS, AOS/VS, Atari ST, Commodore Amiga); ckermit.ini (Stratus VOS); K95.INI (Kermit 95 -- but this big version is not used there); K2.INI (Kermit/2 -- but ditto);; Authors:; Frank da Cruz, Christine M. Gianone, Jeffrey Altman; Columbia University, New York, NY 10025-7799, USA;; Version 5A(188): 23 November 1992; Version 5A(189): 29 June 1993; Version 5A(190): 04 October 1994; Version 5A(191): 17 April 1995; Version 6.0.192: 6 September 1996;; This is the standard and recommended C-Kermit 6.0 initialization file. To; override settings or definitions made in this file, to add new settings or; definitions, or to make any other desired customizations, create a separate,; personal customization file called:;; .mykermrc (UNIX, OS-9, Aegis, BeBox, Plan 9); CKERMOD.INI (OS/2, VMS, OpenVMS, AOS/VS, Atari ST, Commodore Amiga); ckermod.ini (VOS);; You can also define the customization filename in an environment; variable (logical name in VMS), CKERMOD, which takes precedence over; the names shown above.;; WHAT THIS FILE DOES:;; . The FULLSCREEN file transfer display is selected if it is available; . Defines your default dialing directory name:; .kdd for UNIX, OS-9 and Aegis; CKERMIT.KDD for other operating systems.; You can override this with the environment variable K_DIAL_DIRECTORY; . Defines your default network directory name:; .knd for UNIX, OS-9 and Aegis; CKERMIT.KND for other operating systems.; You can override this with the environment variable K_NET_DIRECTORY; . Defines your default services directory name:; .ksd for UNIX, OS-9 and Aegis; CKERMIT.KSD for other operating systems.; You can override this with environment variable K_SERVICE_DIRECTORY.; . Defines your customization file name (name given above); . Performs system-dependent setups for UNIX, VMS, OS/2, etc.; . Defines an EDIT macro to let you invoke a text editor from C-Kermit.; . Defines TSEND, BSEND, TGET, BGET macros for text and binary file transfer.; . Defines VTPRINT, PCGET, and PCSEND macros for use with MS-DOS Kermit, etc.; . Opens your dialing directory if you have one.; . Reads your services directory and defines ACCESS and LIST macros for it.; . Executes your personal customization file, if you have one.;; C-Kermit 6.0 is documented in the book "Using C-Kermit", 2nd Edition,; by Frank da Cruz and Christine M. Gianone, 1997, Digital Press /; Butterworth-Heinemann, ISBN 1-55558-164-1.; Everything after this point depends on the script programming language.; The CHECK command terminates this command file immediately if the script; programming language (IF command) is not configured.;set take error on ; This makes CHECK quit if no script language.check if ; Do we have an IF command? If not, quit now.set take error off ; Back to normal.local _sd _servicedirCOMMENT - Greet and make sure C-Kermit version is 6.0 or higher.;echo Executing \v(cmdfile) for \v(system)...if < \v(version) 600192 - stop 1 \v(cmdfile): C-Kermit 6.0.192 or later required.def _dedit ; No default editor yet.forward \v(system) ; First do system-dependent items...:unknown ; Should not happenStop 1 Error: System type unknown!:Aegis ; Apollo Aegis and:UNIX ; UNIX, all versionsdef _dedit vi ; Default editor is VIasg _myinit - \v(home).mykermrc ; Customization filenameif remote forward COMMON ; Skip local-mode items if "-R"asg _dialdir - \v(home).kdd ; C-Kermit dialing directoryasg _netdir - \v(home).knd ; C-Kermit network directoryasg _servicedir - \v(home).ksd ; C-Kermit services directorycheck fullscreen ; Do we have a fullscreen display?if success set file displ full ; If so, use it.forward COMMON ; End of UNIX section:OS9/68K ; OS-9asg _myinit - \v(home).mykermrc ; Customization filenameif remote forward COMMONasg _dialdir - \v(home).kdd ; C-Kermit dialing directoryasg _netdir - \v(home).knd ; C-Kermit network directoryasg _servicedir - \v(home).ksd ; C-Kermit services directoryif eq "\$(TERM)" "vt100" - ; File transfer display set file display full ; Only works with VT-100 terminal typeelse if eq "\$(TERM)" "VT100" - set file display fullelse set file display crtforward COMMON ; End of OS-9 section:VMS ; VMS and OpenVMSdef _dedit edit ; Default editor is EDIT.set file display fullscreen ; File transfer fisplayforward COMMON:OS/2 ; OS/2asg _inifile \v(cmdfile) ; Get directory where this file is kept...asg _inidirlen \feval(\flength(\m(_inifile))-11)asg _inidir \fsubstr(\m(_inifile),1,\m(_inidirlen))asg _dialdir \m(_inidir)CKERMIT.KDDasg _netdir \m(_inidir)CKERMIT.KNDasg _servicedir \m(_inidir)CKERMIT.KSDasg _myinit \m(_inidir)CKERMOD.INIasg _inidirlen ; Release unneeded variablesset file display fullscreen ; File transfer fisplayset server display on ; Show display in server mode too.def _dedit epm ; Default editor is Eset command bytesize 8 ; Use 8 bits between Kermit and console.set xfer char latin1 ; Use Latin-1 for text file transfer.def cls clear command-screen ; Define CLS command to clear the screen.def os2 push ; Make OS2 a synonym for PUSH, RUN, etc.def more run type \%1 | more ; Easy access to MORE command.def vdir run dir | more ; "Verbose" DIRECTORYdef tdir run dir /o-d | more ; Reverse Time-Order DIRECTORYCOMMENT - XSEND macro sends a directory tree. Read XSEND.CMD for details.; Arguments:; 1. Pathname, such as C:\\ (backslashes must be doubled!); 2. Filespec, such as *.*;define XSEND rexx call \fcontents(\v(startup))xsend.cmd '\%1 \%2'forward COMMON ; End of OS/2 section:AOS/VS ; Data General AOS/VSdef _dedit sed ; Default editor is SEDset window 1 ; Sliding windows don't workset file char dg-international ; File character-setset xfer char latin1 ; Transfer character-setset file display crt ; File transfer fisplaydef cli push ; Escape to CLIdef reset - ; Macro to reset DG DASHER terminal run write [!ascii 236 306 301]forward COMMON ; End of AOS/VS section:Amiga ; Commodore Amigadef cls echo \27[H\27[2J ; CLS command to clear the screenset file display full ; Supports fullscreen displayset file char latin1 ; Use Latin Alphabet 1 for file transferset xfer char latin1 ; ...forward COMMON ; End of Amiga section:Atari_ST ; Atari STdef cls echo \27H\27J ; Clear screen a`la VT52set file display crt ; FULLSCREEN not availableset server display on ; Show file xfer display in server mode tooset server timeout 15 ; Nonzero required for ^C interruption!forward COMMON ; End of Atari ST section:Macintosh ; Apple Macintoshset server display on ; Show file xfer display in server mode too.forward COMMON:Stratus_VOS ; Stratus VOSdef _dedit emacs ; Default editor is emacsasg _myinit \v(home)ckermod.iniif remote forward COMMONasg _dialdir \v(home)ckermit.kddasg _netdir \v(home)ckermit.kndasg _servicedir \v(home)ckermit.ksdset file display crt ; FULLSCREEN not availableforward COMMON ; End of Stratus VOS section:COMMON ; For all systemsCOMMENT - EDIT macro.;; EDITOR environment variable, if defined, takes precedence.;check push ; Only works if we have a PUSH commandxif success { if def \$(EDITOR) assign myeditor \$(EDITOR) else assign myeditor \m(_dedit) if not def myeditor def myeditor edit undef _dedit undef myfile def EDIT { if > \v(argc) 2 echo WARNING: \%2 \%3 \%4 \%5 \%6... ignored if = \v(argc) 2 assign myfile \%1 if not def myfile echo Edit what? else run \m(myeditor) \m(myfile) }}; File transfer macrosdef _SEND { ; Used by BSEND, TSEND, etc. local \%n asg \%n \ffiles(\%1) ; How many files match argument if = 0 \%n end 1 {\?File not found} ; None if = 1 \%n send \%1 \%2 ; Single file with as-name else send \%1 ; or wildcard with no as-name}def BSEND binary, _send \%1 \%2 ; Send binary file(s)def TSEND text, _send \%1 \%2 ; Send text file(s)def BGET remote set file type binary, - ; Get binary file(s) if success get \%1 \%2 \%3 \%4 \%5 \%6 \%7 \%8 ; from serverdef TGET remote set file type text, - ; Get text file(s) if success get \%1 \%2 \%3 \%4 \%5 \%6 \%7 \%8 ; from server; Define macros that are useful when running C-Kermit in remote mode.; These macros serve no purpose on local-mode-only versions such as; OS/2, Macintosh, Amiga, and Atari ST Kermit, so we skip defining them; for those systems.;if not = 0 \findex(\v(system),WIN32:OS/2:Macintosh:Amiga:Atari_ST) - forward files; VTPRINT macro. Print a file on your PC's local printer.def VTPRINT echo \27[5i, type \%1, echo \27[4i; or if your printer needs a formfeed to force the page out:; def VTPRINT def echo \27[5i, type \%1, echo \12\27[4i; Macros for host-initiated file transfer using APC:; NOT NEEDED ANY MORE because of autodownload/autoupload.; Remove the following FORWARD command to reinstate these definitions:FORWARD FILESCOMMENT - PCGET macro, for use against MS-DOS Kermit 3.13 and later,; or Kermit 95, or Kermit/2, or C-Kermit 5A(190) on UNIX or VMS.; Uses APC. Arguments:; 1 = Name of file to get from PC.; 2 = Optional name that C-Kermit should store it under.; NOTE: If the PC filename contains backslashes, you must make four (4); copies of each backslash, e.g. "pcget c:\\\\temp\\\\oofa.txt.;def PCGET { apc server msleep 200 remote set file type \v(ftype) xif def \%2 { ; If we have an "as-name" get, \%1, \%2 ; use multiline GET asg _tmp \v(status) ; Remember status } else { ; Otherwise get \%1 ; use regular GET asg _tmp \v(status) ; Remember status } fin ; FINISH server end \m(_tmp) ; and return status}COMMENT - PCSEND macro, for use against MS-DOS Kermit 3.13 and later,; or C-Kermit 5A(190) or later. Uses APC. Arguments:; \%1 = Name of file to send to MS-DOS Kermit.; \%2 = Optional name to send it with.;def PCSEND { local \%n asg \%n \ffiles(\%1) if = 0 \%n end 1 {\?File not found} apc receive if = 1 \%n send \%1 \%2 ; Single file with as-name else send \%1 ; or wildcard with no as-name}:FILES; Get customization and directory file names. Environment variables take; precedence, so you do not have to edit this file to change these filenames.;if def \$(CKERMOD) assign _myinit \$(CKERMOD)if not def _myinit assign _myinit \v(home)CKERMOD.INIif remote forward CUSTOM ; Skip all this if -R given on command lineif def \$(K_DIAL_DIRECTORY) assign _dialdir \$(K_DIAL_DIRECTORY)if not def _dialdir assign _dialdir \v(home)CKERMIT.KDDif def \$(K_NET_DIRECTORY) assign _dialdir \$(K_NET_DIRECTORY)if not def _dialdir assign _dialdir \v(home)CKERMIT.KNDif def \$(K_SERVICE_DIRECTORY) assign _servicedir \$(K_SERVICE_DIRECTORY)if not def _servicedir assign _servicedir \v(home)CKERMIT.KSDCHECK DIAL ; Is the DIAL command enabled?xif fail { ; No. echo DIAL disabled} else { ; Yes, check for and open the dial directory. xif exist \m(_dialdir) { set dial directory \m(_dialdir) echo { Dial directory is \m(_dialdir) } } xif exist \m(_netdir) { set net directory \m(_netdir) echo { Network directory is \m(_netdir) } }}COMMENT - Services directoryif not exist \m(_servicedir) forward connectionecho { Services directory is \m(_servicedir)}def MAX_SVCS 200 ; Adjust this if you have more entriesdefine _sd 0 ; Assume no services directoryopen read \m(_servicedir) ; Try to open services directory filexif success { declare \&d[\m(MAX_SVCS)] ; It's open, declare directory array for \%i 1 \m(MAX_SVCS) 1 { ; Read the lines into the array read \&d[\%i] if fail break } close read xif > \%i \m(MAX_SVCS) { echo Too many entries in services directory echo { Maximum is \m(MAX_SVCS).} echo { Change definition of MAX_SVCS in \v(cmdfile) to allow more. } echo { Services directory disabled.} } else { asg \&d[0] \feval(\%i - 1) define _sd 1 }}xif not \m(_sd) { def access echo { Services directory not available.} asg list \m(access)} else { def FIND { set case off for \%i 1 \&d[0] 1 { if eq {\%1} {\fsubstr(\&d[\%i],1,\flen(\%1))} break } if not > \%i \&d[0] return \&d[\%i] } def LIST {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -