home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / bin / msvibm.3.13.zip / MSKERMIT.INI < prev    next >
Text File  |  1993-09-09  |  11KB  |  284 lines

  1. ; FILE MSKERMIT.INI
  2. ;
  3. ; Standard initialization file for MS-DOS Kermit 3.11 or later.  Kermit should
  4. ; execute the commands in this file automatically when it starts.  Kermit
  5. ; looks for MSKERMIT.INI first in the current disk and directory, and if it is
  6. ; not found there, then in the disks and directories listed in your DOS PATH
  7. ; variable (if any).  You can override Kermit's initialization file search by
  8. ; specifying a different filename on the command line, preceded by the -F
  9. ; switch, for example "kermit -f monday.ini" or "kermit -f nul".
  10. ;
  11. ; Author: Christine M. Gianone, February 1990 (for MS-DOS Kermit version 3.0)
  12. ;   Revised for version 3.11 September 1991.
  13. ;   Revised for version 3.12 September 1992.
  14. ;   Revised for version 3.13 June 1993 (corrected August & September 1993)
  15.  
  16. ; CUSTOMIZATIONS
  17. ;
  18. ; It is recommended that you not modify this file.  Instead, you should adapt
  19. ; the sample MSCUSTOM.INI file to make your customizations: key settings,
  20. ; macro definitions, SET commands to override the ones in this file, and so
  21. ; on.  The MSCUSTOM.INI file should go in the same directory as this file.
  22. ; This file will execute MSCUSTOM.INI if it can be found.
  23.  
  24. ; COMPATIBILITY
  25. ;
  26. ; This initialization file works for versions 3.11 and later of MS-DOS Kermit.
  27. ; The IF INPATH command is new to version 3.12; it tests whether a given file
  28. ; can be found in your DOS PATH or your current directory.  The IF INPATH
  29. ; command is not used if your MS-DOS Kermit version is earlier than 3.12.
  30.  
  31. ; PATCHES
  32. ;
  33. ; The MSKERMIT.PCH file contains "patches" (corrections) to MS-DOS Kermit.
  34. ; If the MSKERMIT.PCH file can be found, and it agrees with your Kermit
  35. ; version, the patches are applied at this time.  The MSKERMIT.PCH file
  36. ; is included on your MS-DOS Kermit distribution diskette.  Updated patch
  37. ; files can be obtained from Columbia University.
  38. ;
  39. if > \v(version) 312 if inpath MSR\v(version).PCH goto patch
  40. if > \v(version) 311 if not inpath MSKERMIT.PCH goto begin
  41.  
  42. :PATCH
  43. echo Installing patches...
  44. echo
  45. patch
  46.  
  47. :BEGIN
  48. echo MS-DOS Kermit 3.11 / 3.12 / 3.13 initialization file...
  49.  
  50. COMMENT - Variable definitions...
  51.  
  52. ; Reserved variables.  If you define new macros, don't use these names:
  53. ;
  54. ;  _editor   - DOS command that runs my preferred editor, for EDIT macro.
  55. ;  _editfile - Last EDIT command filename, defined by EDIT macro.
  56. ;  _dialfile - Pathname of dialing directory file, for DIAL macro.
  57. ;  _dialnum  - Last DIAL command phone number, defined by DIAL macro.
  58. ;  _modem    - Modem type for DIAL command.  Used to run the appropriate
  59. ;              dialing script, e.g. HAYES.SCR.
  60. ;
  61. ; You can override the default _editor, _dialfile, and _modem definitions
  62. ; by setting environment variables in your AUTOEXEC.BAT file, for example:
  63. ;
  64. ;   SET EDITOR=EDIT
  65. ;   SET MODEM=MICROCOM
  66. ;   SET DIALFILE=C:\PHONES\DIALING.DIR
  67. ;
  68. ; or you can redefine these variables in your MSCUSTOM.INI file.
  69.  
  70. ; Editor...
  71. ;
  72. define _editor edlin            ; EDLIN is the default editor.
  73. if not eq "\$(EDITOR)" "" -
  74.   define _editor \$(EDITOR)
  75.  
  76. ; Dialing directory file...
  77. ;
  78. define _dialfile C:\KERMIT\DIALUPS.TXT    ; Default dialing directory file.
  79. if not eq "\$(DIALFILE)" "" -
  80.   define _dialfile \$(DIALFILE)
  81. if > \v(version) 311 if not inpath \m(_dialfile) -
  82.   echo Dialing directory \m(_dialfile) not found.
  83.  
  84. ; The type of modem you have.  You also need a corresponding <name>.SCR
  85. ; file to dial the modem.  For example, if the value of _modem is HAYES,
  86. ; you must have a HAYES.SCR file stored somewhere in your DOS PATH or in
  87. ; your current directory.
  88. ;
  89. define _modem HAYES            ; Default is modem type is HAYES.
  90. if not eq "\$(MODEM)" "" -
  91.   define _modem \$(MODEM)
  92. if > \v(version) 311 if not inpath \m(_modem).SCR -
  93.   echo WARNING: Dialing script file \m(_modem).SCR not found!
  94.  
  95. COMMENT - Macro definitions section...
  96.  
  97. ; Macros for communicating with UNIX, VAX/VMS, and similar systems:
  98. ;
  99. def 8bit set parity none, set term bytesize 8, set term controls 8
  100. def 7bit set term bytesize 7, set term controls 7
  101.  
  102. def vax set par non, set flo x, set hand no, set dupl ful, set key \270 \127
  103.  
  104. def vms do vax, do 8bit        ; Assumes 8-bit no-parity connection.
  105. def unix do vax, do 7bit    ; Most UNIX systems are still 7-bit.
  106.  
  107. ; Macro for communicating with IBM mainframes in linemode:
  108. ;
  109. def ibm set par mark, set flo no, set hand xon, set dup ha, set key \270 \8
  110.  
  111. ; Macro for communicating with IBM mainframes in fullscreen mode,
  112. ; through 3270 protocol converter like IBM 7171:
  113. ;
  114. def fullscreen set par ev,set flo x,set hand no,set dupl ful,set key \270 \8
  115.  
  116. ; Macro to use Internet host names with Novell's LWP/DOS TELAPI and TSU.
  117. ; Assumes TSU is in the PATH and current directory is writable.
  118. ; Usage: "telapi <host-name>".
  119. ;
  120. def telapi run tsu -o \%1 k1,run tsu -a k1 1,set port bios1,connect
  121.  
  122. ; Additional DOS commands available directly from the MS-Kermit> prompt.
  123.  
  124. ; DOS MORE command... (no "<" needed)
  125. def more if < argc 2 fatal {More what?},-
  126. run more < \%1
  127.  
  128. ; DOS REN(ame) command...
  129. def rename if < argc 2 fatal {Rename what?},-
  130.   if < argc 3 fatal {Rename \%1 to what?},-
  131.   run ren \%1 \%2
  132.  
  133. ; DOS COPY command...
  134. def copy if < argc 2 fatal {Copy what?},-
  135.   if < argc 3 fatal {Copy \%1 to what?},-
  136.   run copy \%1 \%2
  137.  
  138. ; DOS CHCP command to examine or change code page...
  139. def chcp run chcp \%1
  140.  
  141. ; EDIT command...
  142. def edit if = argc 2 assign _editfile \%1,-
  143.   if not def _editfile fatal {Edit what?},-
  144.   run \m(_editor) \m(_editfile)
  145.  
  146. ; CAPTURE command - Easy downloading of a file from the host, with no error
  147. ; checking.  Unlike the LOG SESSION command, CAPTURE always creates a new
  148. ; file.  It overwrites file of same name if it already exists.  Usage: at the
  149. ; MS-Kermit> prompt, type "capture xxx" where xxx is the name of the file you
  150. ; want to create on the PC.  Once you are connected to the host, TYPE the
  151. ; desired file.  Escape back when done.  The captured file will be on your
  152. ; disk (with a TYPE command at the beginning & a prompt at the end).
  153. ;
  154. def capture if = \v(argc) 1 fatal {Capture into what file?},-
  155.   if exist \%1 del \%1,-
  156.   log session \%1,-
  157.   connect,close session,log sess session.log,close sess
  158.  
  159. ; NORMAL, NOISY and CLEAN macros, modify to suit your environment...
  160. def normal set rec pac   94, set ret  5, set block 1, set window 1
  161. def noisy  set rec pac   40, set ret 20, set block 3, set window 8
  162. def clean  set rec pac 1000, set ret  4, set block 2, set window 2
  163.  
  164. ; Define a FATAL error macro.  Print message, go back to prompt.
  165. def fatal echo \%1, stop
  166.  
  167. ; ERRSTP macro, for use in scripts that want to hang up a dialed
  168. ; or network connection if there is any error.
  169. def errstp echo \%1,hangup,stop
  170.  
  171. ; LOOKUP macro for use with DIAL command.
  172. ; Requires MS-DOS Kermit 3.11 or later.
  173. ; Uses \m(_dialfile) for the dialing directory filename, defined above.
  174. ; Edit that file to contain the entries you will actually want to use.
  175. ;
  176. if < version 311 goto nolook
  177. def split assign \%x \%1,-
  178.   assign \%y \%2,-
  179.   assign \%s \%3,-
  180.   assign \%p \%4
  181.  
  182. def lookup if < \v(argc) 2 end 0,-
  183.   if not def _dialfile end 0,-
  184.   if not exist \m(_dialfile) end 0,-
  185.   open read \m(_dialfile),-
  186.   if failure fatal {Can't open dialing directory file \m(_dialfile)},-
  187.   assign \%5 \%x, assi \%6 \%y, assi \%7 \%s, assi \%8 \%p,-
  188.   echo Looking up "\%1",-
  189. :loop,-
  190.   read \%9,-
  191.   if fail goto eof,-
  192.   split \%9,-
  193.   if def \%x if not equal {\%x} {\%1} goto loop,-
  194.   echo From dialing directory: \%x = \%y,-
  195.   assign _dialnum \%y,-
  196.   if def \%s if not eq \%s = set speed \%s,-
  197.   if def \%p if not eq \%p = set parity \%p,-
  198.   goto done,-
  199. :eof,-
  200.   echo "\%1" not found in dialing directory \m(_dialfile),-
  201. :done,-
  202.   assign \%x \%5, assi \%y \%6, assi \%s \%7, assi \%p \%8,-
  203.   close read
  204.  
  205. ; LIST macro to list dialing directory.
  206. ; Assumes pathname of dialing directory is in \m(_dialfile).
  207. define list -
  208.   if not def _dialfile fatal {_DIALFILE not defined},-
  209.   if not exist \m(_dialfile) -
  210.     fatal {Can't find dialing directory file \m(_dialfile)},-
  211.   if < argc 2 run more < \m(_dialfile),-
  212.   if > argc 1 run find "\%1" \m(_dialfile) | more
  213.  
  214. ; DIAL and REDIAL commands...
  215. ;
  216. ; Requires the file \m(_modem).SCR to be on current disk or in DOS PATH,
  217. ; e.g., HAYES.SCR. Uses LOOKUP macro to access your dialing directory, if any.
  218. ; If argument omitted, uses previous phone number, if any.
  219. ; If multiple arguments are given, they are concatenated together
  220. ; with the separating spaces preserved, so you can "dial 800 765 4321".
  221. ;
  222. def dial if < \v(argc) 2 if not def _dialnum fatal {Dial what?},-
  223.   if > \v(argc) 2 assign \%1 \%1 \%2 \%3 \%4 \%5 \%6 \%7 \%8 \%9,-
  224.   if > \v(argc) 1 assign _dialnum \%1,-
  225.   if not < \v(argc) 2 lookup {\m(_dialnum)},-
  226.   assign \%1 \m(_dialnum),-
  227.   take \m(_modem).scr,-
  228.   if fail end 1, end 0
  229.  
  230. define redial if not def _dialnum fatal {No number to redial}, dial
  231.  
  232. goto common            ; Skip over old-version warning
  233.  
  234. :NOLOOK
  235. version
  236. echo WARNING: This Kermit initialization file is for use with MS-DOS Kermit
  237. echo version 3.11 or later.  The LOOKUP macro will not be defined, and DIAL
  238. echo will not work.  Use an earlier version of MSKERMIT.INI or a later
  239. echo version of MS-DOS Kermit.
  240. define lookup echo The LOOKUP macro is not defined, stop
  241. define dial echo The DIAL macro is not defined, stop
  242.  
  243. :COMMON
  244.  
  245. COMMENT - File transfer settings
  246.  
  247. set file collision rename    ; Don't overwrite existing files
  248. set transfer character-set transparent ; For compatibility with old versions
  249. set receive packet-length 94    ; Regular-size packets
  250. set attributes on        ; Use file-attribute packets
  251. set window 1            ; Don't use sliding windows
  252.  
  253. COMMENT - Script defaults
  254.  
  255. set input timeout proceed    ; Allow IF SUCCESS/FAILURE to work
  256. set input echo on        ; Display port input on screen
  257. set input case ignore        ; Ignore alphabet case for input matching
  258.  
  259. ; The following setups are IBM-PC specific...
  260.  
  261. if not eq "\v(platform)" "IBM-PC" goto fin
  262.  
  263. COMMENT - Terminal emulation settings.  Modify to suit your environment.
  264.  
  265. set terminal display 7        ; In the 7-bit environment (use 8 for VMS)
  266. set terminal vt320        ; Emulate DEC VT320
  267. set terminal roll off        ; Keep rolled-back screens where they are
  268. set terminal wrap on        ; Tell Kermit to do line wrap
  269. set terminal tabs at 1:8    ; Set tabs at every 8 spaces
  270. set terminal cursor underline    ; Underline cursor (rather than block)
  271. ;
  272. ; The following accounts for the new scan code generated by Space bar
  273. ; on the LK250 keyboard under version 3.13.
  274. ;
  275. if eq \v(keyboard) 250 if > \v(version) 312 set key \313 \32
  276.  
  277. COMMENT - Personalized initialization file
  278. ;
  279. if > \v(version) 311 if not inpath MSCUSTOM.INI goto fin
  280. take mscustom.ini
  281.  
  282. :FIN
  283. echo Smile!
  284.