home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
archives
/
mskermit.zip
/
msvibmzip.uue
/
MSVIBM.ZIP
/
MSKERMIT.INI
< prev
next >
Wrap
Text File
|
1995-01-18
|
13KB
|
392 lines
GOTO GO ; FILE MSKERMIT.INI
;
; Standard initialization file for MS-DOS Kermit 3.14. Kermit executes the
; commands in this file automatically when it starts. Override by specifying
; a different filename on the command line, preceded by the -F switch,
; for example: "kermit -f monday.ini" or "kermit -f nul".
;
; Author: Christine M. Gianone, Feb 1990 (for MS-DOS Kermit v3.00).
; Revisions:
; v3.11 Sep 1991
; v3.12 Sep 1992
; v3.13 Jun 1993
; v3.14 Jan 1995
;
; CUSTOMIZATIONS
;
; Please don't modify this file. Instead, make your customizations
; in the sample MSCUSTOM.INI file: key settings, macro definitions, SET
; commands to override the ones in this file, etc.
:GO
if not < \v(version) 314 forward PATCH
echo This MSKERMIT.INI file may be used only with MS-DOS Kermit 3.14 or later.
stop 1
:PATCH
Echo Executing \v(cmdfile)...
if inpath MSR314.PCH forward patch2
if not inpath MSKERMIT.PCH forward begin
:PATCH2
echo Installing patches...
echo
patch
:BEGIN
echo MS-DOS Kermit 3.14 Initialization File...
COMMENT - Variable definitions...
; Reserved variables. If you define new macros, don't use these names:
;
; _editor - DOS command that runs my preferred editor, for EDIT macro.
; _editfile - Last EDIT command filename, defined by EDIT macro.
; _dialfile - Pathname of dialing directory file, for DIAL macro.
; _dialnum - Last DIAL command phone number, defined by DIAL macro.
; _modem - Modem type for DIAL command.
; _mdmscr - Pathname of modem-dialing script file.
;
; You can override the default definitions for the above
; by setting environment variables in your AUTOEXEC.BAT file, for example:
;
; SET EDITOR=EMACS
; SET MODEM=DATAPORT
; SET MDMSCR=C:\MODEMS\DATAPORT.SCR
; SET DIALFILE=C:\PHONES\MSKERMIT.KDD
;
; or you can redefine these variables in your MSCUSTOM.INI file.
; Editor...
;
define _editor edlin ; EDLIN is the default editor.
if not < \v(dosversion) 500 define _editor edit ; EDIT for DOS 5.00 & later.
; But the DOS environment variable EDITOR prevails.
if not eq "\$(EDITOR)" "" -
asg _editor \$(EDITOR)
; FIND command
define _findcmd FIND
if not < \v(dosversion) 500 define _findcmd FIND/I
if not eq "\$(FINDCMD)" "" asg _findcmd \$(FINDCMD)
; Dialing directory file...
;
asg _dialfile \v(inidir)DIALUPS.TXT ; Default dialing directory file.
if not eq "\$(DIALFILE)" "" -
asg _dialfile \$(DIALFILE)
if not exist \m(_dialfile) -
echo Dialing directory "\m(_dialfile)" not found.
; The type of modem you have. You also need a corresponding <name>.SCR
; file to dial the modem. For example, if the value of _modem is HAYES,
; you must have a HAYES.SCR file stored in the MODEMS subdirectory of your
; Kermit directory.
;
define _modem HAYES ; Default modem type is HAYES.
if not eq "\$(MODEM)" "" -
asg _modem \$(MODEM)
COMMENT - Macro definitions section...
; Macros for communicating with UNIX, VAX/VMS, and similar systems:
;
def text set file type text
def binary set fil type binary
def _bs check term, if success set key \270 \%1
def 8bit set parity none, set term bytesize 8, set term controls 8
def 7bit set term bytesize 7, set term controls 7
def vax set par non, set hand no, set local-echo off, _bs \127
def vms set term type vt320, do vax, do 8bit
def unix do vax, do 7bit
def bbs set term type ansi, do vax, do 8bit
; Macro for communicating with IBM mainframes in linemode:
;
def ibm set par mark, set flo no, set hand xon, set dup ha, _bs \8
; Macro for communicating with IBM mainframes in fullscreen mode,
; through 3270 protocol converter like IBM 7171:
;
def FULLSCREEN set par ev,set flo x,set hand no,set dupl ful, _bs \8
; Additional DOS commands available directly from the MS-Kermit> prompt.
; DOS MORE command... (no "<" needed)
def more if < argc 2 fatal {More what?},-
run more < \%1
; DOS REN(ame) command...
def rename if < argc 2 fatal {Rename what?},-
if < argc 3 fatal {Rename \%1 to what?},-
run ren \%1 \%2
; DOS COPY command...
def copy if < argc 2 fatal {Copy what?},-
if < argc 3 fatal {Copy \%1 to what?},-
run copy \%1 \%2
; DOS CHCP command to examine or change code page...
def chcp run chcp \%1
; EDIT command...
def edit if = argc 2 asg _editfile \%1,-
if not def _editfile fatal {Edit what?},-
run \m(_editor) \m(_editfile)
; UNIX-like PWD command (show current directory)...
def pwd echo \v(dir)
; CAPTURE command - Easy downloading of a file from the host, with no error
; checking. Unlike the LOG SESSION command, CAPTURE always creates a new
; file. It overwrites file of same name if it already exists. Usage: at the
; MS-Kermit> prompt, type "capture xxx" where xxx is the name of the file you
; want to create on the PC. Once you are connected to the host, TYPE the
; desired file. Escape back when done. The captured file will be on your
; disk (with a TYPE command at the beginning & a prompt at the end).
;
def CAPTURE if = \v(argc) 1 fatal {Capture into what file?},-
if exist \%1 del \%1,-
log session \%1,-
connect,close session,log sess session.log,close sess
; STATUS macro tells whether previous command succeeded or failed,
; preserving its return code.
define STATUS asg \%9 \v(status),-
if = \%9 0 echo SUCCESS,-
if not = \%9 0 echo FAILURE,-
end \%9
; Define a FATAL error macro. Print message, go back to prompt.
def fatal stop 1 \%1
; ERRSTP macro, for use in scripts that want to hang up a dialed
; or network connection if there is any error.
def errstp echo \%1,hangup,stop 1
; ATHANGUP macro. Use this if regular HANGUP command doesn't do the trick.
def ATHANGUP sleep 1,out +++,sleep 1,out ath0\13
; LOOKUP macro for use with DIAL command.
; Uses \m(_dialfile) for the dialing directory filename, defined above.
; Edit that file to contain the entries you will actually want to use.
;
def SPLIT assign \%x \%1,-
assign \%y \%2,-
assign \%s \%3,-
assign \%p \%4
def LOOKUP if < \v(argc) 2 end 0,-
if not def _dialfile end 0,-
if not exist \m(_dialfile) end 0,-
open read \m(_dialfile),-
if failure fatal {Can't open dialing directory file \m(_dialfile)},-
assign \%5 \%x, assi \%6 \%y, assi \%7 \%s, assi \%8 \%p,-
echo Looking up "\%1",-
:loop,-
read \%9,-
if fail forward eof,-
split \%9,-
if def \%x if not equal {\%x} {\%1} goto loop,-
echo From dialing directory: \%x = \%y,-
assign _dialnum \%y,-
if def \%s if not eq \%s = set speed \%s,-
if def \%p if not eq \%p = set parity \%p,-
forward done,-
:eof,-
echo "\%1" not found in dialing directory \m(_dialfile),-
:done,-
assign \%x \%5, assi \%y \%6, assi \%s \%7, assi \%p \%8,-
close read
; LIST macro to list dialing directory.
; Assumes pathname of dialing directory is in \m(_dialfile).
define LIST -
if not def _dialfile fatal {_DIALFILE not defined},-
if not exist \m(_dialfile) -
fatal {Can't find dialing directory file \m(_dialfile)},-
if < argc 2 run more < \m(_dialfile),-
if > argc 1 run \m(_findcmd) "\%1" \m(_dialfile) | more
; Check that we have a dialing script available for given modem type.
; This allows _MODEM definition to be changed in MSCUSTOM.INI and even
; on the fly after initialization.
def CHKMDM -
asg _mdmscr, -
if not eq "\$(MDMSCR)" "" -
asg _mdmscr \$(MDMSCR),-
if exist \m(_mdmscr) end 0,-
if exist \v(inidir)MODEMS\\\m(_modem).SCR -
asg _mdmscr \v(inidir)MODEMS\\\m(_modem).SCR,-
if not def _mdmscr if inpath \m(_modem).SCR -
asg _mdmscr \v(inpath)\m(_modem).SCR,-
if not def _mdmscr end 1,-
if not exist \m(_mdmscr) end 1,-
end 0
; DIAL and REDIAL commands...
;
; Uses LOOKUP macro to access your dialing directory, if any.
; If argument omitted, uses previous phone number, if any.
; If multiple arguments are given, they are concatenated together
; so you can "dial 800 765 4321". Saves and restores PARITY and
; CARRIER settings around dialing.
;
def DIAL -
do chkmdm,-
if fail stop 1 Dialing script not found,-
if < \v(argc) 2 if not def _dialnum fatal {Dial what?},-
asg \%1 \%1\%2\%3\%4\%5\%6\%7\%8\%9,-
if > \v(argc) 1 asg _dialnum \%1,-
if not < \v(argc) 2 lookup {\m(_dialnum)},-
asg \%1 \m(_dialnum),-
asg \%9 \v(carrier),-
asg \%8 \v(parity),-
set carrier off,-
set parity none,-
take \m(_mdmscr),-
assign \%7 \v(status),-
set parity \%8,-
set carrier \%9,-
if not = 0 \%7 end 1,-
if < \v(cmdlevel) 3 ec -
Call complete. Use the CONNECT command to go online.,-
end 0
define REDIAL if not def _dialnum fatal {No number to redial}, dial
forward XFER
:NODIAL
define DIAL -
end 1 DIAL disabled because dialing script for "\m(_modem)" not found.
:XFER
COMMENT - File transfer settings and macros
set file collision rename ; Don't overwrite existing files
set transfer character-set transparent ; No surprise translations
set receive packet-length 94 ; Regular-size packets
set attributes on ; Use file-attribute packets
set window 1 ; Don't use sliding windows
; NORMAL, NOISY and CLEAN macros, modify to suit your environment...
def NORMAL set rec pac 94, set ret 5, set block 1, set window 1
def NOISY set rec pac 40, set ret 20, set block 3, set window 8
def CLEAN set rec pac 1000, set ret 4, set block 3, set window 4
; FAST and ROBUST macros
; FAST assumes a clean, well-buffered, effectively-flow-controlled connection.
; ROBUST assumes nothing.
; These are oversimplifications - read the documentation.
def FAST ec FAST file transfer settings - use at your own risk...,-
set win 5, set rec packet 5000, set contr u all,-
set con p 0 1 3 13 17 19 129 141 145 147
def ROBUST set win 1, set parity space, set rec packet 90, set con p all
COMMENT - Script defaults
set input timeout proceed ; Allow IF SUCCESS/FAILURE to work
set input echo on ; Display port input on screen
set input case ignore ; Ignore alphabet case for input matching
; The following setups are IBM-PC specific...
if not eq "\v(platform)" "IBM-PC" forward CUSTOM
COMMENT - Terminal emulation settings. Modify to suit your environment.
check terminal
if fail forward custom
set terminal display 7 ; In the 7-bit environment (use 8 for VMS)
set terminal vt320 ; Emulate DEC VT320
set terminal roll off ; Keep rolled-back screens where they are
set terminal wrap on ; Tell Kermit to do line wrap
set terminal tabs at 1:8 ; Set tabs at every 8 spaces
set terminal cursor underline ; Underline cursor (rather than block)
;
; The following accounts for the new scan code generated by Space Bar
; on the LK250 keyboard under MS-DOS Kermit version 3.13 and later.
;
if eq \v(keyboard) 250 set key \313 \32
; By default, show current directory in prompt
;
set prompt [\v(dir)] MS-Kermit>
COMMENT - Languages
if directory \v(inidir)cyrillic -
def CYRILLIC cfont,-
if not def \%1 asg \%1 KOI8,-
take \v(inidir)cyrillic\\\%1.ini,-
set xfer char cyrillic
if directory \v(inidir)hebrew -
define HEBREW take \v(inidir)hebrew\hebrew.ini
; Undo HEBREW or CYRILLIC
define ROMAN set key clear, set transl inp off, mfont, set xfer char latin1
define EASTERN set key clear, set transl inp off, efont, set xfer char latin2
; Commands for changing fonts
;
if directory \v(inidir)pcfonts forward PCFONTS
; Can't find PCFONTS directory, use IBM code pages (good luck!)...
;
def _FONT run chcp \%1, set term code cp\%1, set file char cp\%1
forward FONTDEFS
:PCFONTS
def _FONT run \v(inidir)pcfonts\loadfont \v(inidir)pcfonts\cp\%1.f16,-
set term code-page cp\%1,-
set file char cp\%1
def SCRAWL run \v(inidir)pcfonts\loadfont \v(inidir)pcfonts\scrawl.f16
def CHARSET run \v(inidir)pcfonts\charset
:FONTDEFS
def AFONT _font 437 ; Original PC code page
def CFONT _font 866 ; Cyrillic
def EFONT _font 852 ; East
def HFONT _font 862 ; Hebrew
def IFONT _font 861 ; Icelandic
def MFONT _font 850 ; "Multilingual" = West European Roman
:NETS
check networks
if fail forward CUSTOM
; Macro to use Internet host names with Novell's LWP/DOS TELAPI and TSU.
; Assumes TSU is in the PATH and current directory is writable.
; Usage: "telapi <host-name>".
;
def TELAPI run tsu -o \%1 k1,run tsu -a k1 1,set port bios1,connect
check tcp
if fail forward CUSTOM
; TELNET macro for making TCP/IP connections using Kermit's built-in TCP/IP.
; "TELNET <ip-host-name-or-address>" makes a new TCP/IP connection.
; "TELNET" (by itelf) resumes the current TCP/IP connection.
; \%1 = IP host name or address (optional)
; \%2 = TCP port (optional)
; \%3 = terminal type (optional)
;
define TELNET -
set flow none,-
set port tcp \%1 \%2,-
pause 0, if fail end 1,-
if def \%3 set term type \%3,-
if succ c
COMMENT - Personalized initialization file, if any
:CUSTOM
if inpath MSCUSTOM.INI take MSCUSTOM.INI
echo Smile!