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