ockermit.ini 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. COMMENT - Standard C-Kermit initialization file
  2. ;
  3. ; For C-Kermit Version: 8.0
  4. ;
  5. ; Filename:
  6. ; .kermrc (UNIX, OS-9, Aegis)
  7. ; CKERMIT.INI (OS/2, VMS, OpenVMS, AOS/VS, Atari ST, Commodore Amiga)
  8. ; ckermit.ini (Stratus VOS)
  9. ; K95.INI (Kermit 95 -- but this big version is not used there)
  10. ; K2.INI (Kermit/2 -- but ditto)
  11. ;
  12. ; Authors:
  13. ; Frank da Cruz, Christine M. Gianone, Jeffrey Altman
  14. ; Columbia University, New York, NY 10025-7799, USA
  15. ;
  16. ; This is the standard and recommended C-Kermit 8.0 initialization file. To
  17. ; override settings or definitions made in this file, to add new settings or
  18. ; definitions, or to make any other desired customizations, create a separate,
  19. ; personal customization file called:
  20. ;
  21. ; .mykermrc (UNIX, OS-9, Aegis, BeBox, Plan 9)
  22. ; CKERMOD.INI (OS/2, VMS, OpenVMS, AOS/VS, Atari ST, Commodore Amiga)
  23. ; ckermod.ini (VOS)
  24. ;
  25. ; You can also define the customization filename in an environment
  26. ; variable (logical name in VMS), CKERMOD, which takes precedence over
  27. ; the names shown above.
  28. ;
  29. ; WHAT THIS FILE DOES:
  30. ;
  31. ; . Defines your default dialing directory name:
  32. ; .kdd for UNIX, OS-9 and Aegis; CKERMIT.KDD for other operating systems.
  33. ; You can override this with the environment variable K_DIAL_DIRECTORY
  34. ; . Defines your default network directory name:
  35. ; .knd for UNIX, OS-9 and Aegis; CKERMIT.KND for other operating systems.
  36. ; You can override this with the environment variable K_NET_DIRECTORY
  37. ; . Defines your default services directory name:
  38. ; .ksd for UNIX, OS-9 and Aegis; CKERMIT.KSD for other operating systems.
  39. ; You can override this with environment variable K_SERVICE_DIRECTORY.
  40. ; . Defines your customization file name (name given above)
  41. ; . Performs system-dependent setups for UNIX, VMS, OS/2, etc.
  42. ; . Defines VTPRINT macros for use with K95, MS-DOS Kermit, etc.
  43. ; . If you have a services directory, all the macros needed to use it are
  44. ; defined. If you don't have a services directory, the macros are not
  45. ; defined and Kermit starts faster.
  46. ; . Executes your personal customization file, if you have one.
  47. ; NOTE: Your customization file is NOT executed by Kermit itself; it is
  48. ; executed by this file.
  49. ;
  50. ; In UNIX, with C-Kermit 7.0 and later, you can store this file with a name
  51. ; other than .kermrc, and it will not be executed automatically, but, if you
  52. ; give this file execute permission, you can execute directly because of the
  53. ; "kerbang line" at the top, whenever you want all of the above actions to
  54. ; occur. The kerbang line must reflect the actual full path of the Kermit
  55. ; 7.0-or-later executable.
  56. ;
  57. ; C-Kermit 6.0 is documented in the book "Using C-Kermit", 2nd Edition,
  58. ; by Frank da Cruz and Christine M. Gianone, 1997, Digital Press /
  59. ; Butterworth-Heinemann, ISBN 1-55558-164-1. New features of subsequent
  60. ; versions are documented at the Kermit website:
  61. ; http://www.columbia.edu/kermit/
  62. ;
  63. ; Everything after this point depends on the script programming language.
  64. ; The CHECK command terminates this command file immediately if the script
  65. ; programming language (IF command) is not configured.
  66. ;
  67. set take error on ; This makes CHECK quit if no script language.
  68. check if ; Do we have an IF command? If not, quit now.
  69. set take error off ; Back to normal.
  70. local _sd _servicedir _xp ; Declare local variables.
  71. COMMENT - C-Kermit version 6.0 or later required.
  72. ;
  73. asg _xp \v(xprogram)
  74. if not def _xp asg _xp \v(program)
  75. if not equal "\m(_xp)" "C-Kermit" -
  76. stop 1 \v(cmdfile): This initialization file is only for C-Kermit.
  77. echo Executing \v(cmdfile) for \v(system)...
  78. if < \v(version) 60000 -
  79. stop 1 \v(cmdfile): C-Kermit 6.0 or later required.
  80. forward \v(system) ; First do system-dependent items...
  81. :unknown ; Should not happen
  82. Stop 1 Error: System type unknown!
  83. :Aegis ; Apollo Aegis and
  84. :UNIX ; UNIX, all versions
  85. asg _myinit -
  86. \v(home).mykermrc ; Customization filename
  87. if remote forward COMMON ; Skip local-mode items if "-R"
  88. asg _dialdir -
  89. \v(home).kdd ; C-Kermit dialing directory
  90. asg _netdir -
  91. \v(home).knd ; C-Kermit network directory
  92. asg _servicedir -
  93. \v(home).ksd ; C-Kermit services directory
  94. forward COMMON ; End of UNIX section
  95. :OS9/68K ; OS-9
  96. asg _myinit -
  97. \v(home).mykermrc ; Customization filename
  98. if remote forward COMMON
  99. asg _dialdir -
  100. \v(home).kdd ; C-Kermit dialing directory
  101. asg _netdir -
  102. \v(home).knd ; C-Kermit network directory
  103. asg _servicedir -
  104. \v(home).ksd ; C-Kermit services directory
  105. else set file display crt
  106. forward COMMON ; End of OS-9 section
  107. :VMS ; VMS and OpenVMS
  108. forward COMMON
  109. :OS/2 ; Kermit 95
  110. :WIN32
  111. echo This initialization file is not for use with K95.
  112. forward COMMON ; End of OS/2 section
  113. :AOS/VS ; Data General AOS/VS
  114. set window 1 ; Sliding windows don't work
  115. set file char dg-international ; File character-set
  116. set xfer char latin1 ; Transfer character-set
  117. set file display crt ; File transfer fisplay
  118. def cli push ; Escape to CLI
  119. def reset - ; Macro to reset DG DASHER terminal
  120. run write [!ascii 236 306 301]
  121. forward COMMON ; End of AOS/VS section
  122. :Amiga ; Commodore Amiga
  123. def cls echo \27[H\27[2J ; CLS command to clear the screen
  124. set file char latin1 ; Use Latin Alphabet 1 for file transfer
  125. set xfer char latin1 ; ...
  126. forward COMMON ; End of Amiga section
  127. :Atari_ST ; Atari ST
  128. def cls echo \27H\27J ; Clear screen a`la VT52
  129. set server display on ; Show file xfer display in server mode too
  130. set server timeout 15 ; Nonzero required for ^C interruption!
  131. forward COMMON ; End of Atari ST section
  132. :Macintosh ; Apple Macintosh
  133. set server display on ; Show file xfer display in server mode too.
  134. forward COMMON
  135. :Stratus_VOS ; Stratus VOS
  136. asg _myinit \v(home)ckermod.ini
  137. if remote forward COMMON
  138. asg _dialdir \v(home)ckermit.kdd
  139. asg _netdir \v(home)ckermit.knd
  140. asg _servicedir \v(home)ckermit.ksd
  141. forward COMMON ; End of Stratus VOS section
  142. :COMMON ; For all systems
  143. ; Define macros that are useful when running C-Kermit in remote mode.
  144. ; These macros serve no purpose on local-mode-only versions such as
  145. ; OS/2, Macintosh, Amiga, and Atari ST Kermit, so we skip defining them
  146. ; for those systems.
  147. ;
  148. if not = 0 \findex(\v(system),WIN32:OS/2:Macintosh:Amiga:Atari_ST) -
  149. forward files
  150. ; VTPRINT macro. Print a file on your PC's local printer.
  151. def VTPRINT echo \27[5i, type \%1, echo \27[4i
  152. ; or if your printer needs a formfeed to force the page out:
  153. ; def VTPRINT def echo \27[5i, type \%1, echo \12\27[4i
  154. ; Macros for host-initiated file transfer using APC:
  155. ; NOT NEEDED ANY MORE because of autodownload/autoupload.
  156. ; Remove the following FORWARD command to reinstate these definitions:
  157. :FILES
  158. ; Get customization and directory file names. Environment variables take
  159. ; precedence, so you do not have to edit this file to change these filenames.
  160. ;
  161. if def \$(CKERMOD) assign _myinit \$(CKERMOD)
  162. if not def _myinit assign _myinit \v(home)CKERMOD.INI
  163. if remote forward CUSTOM ; Skip all this if -R given on command line
  164. if def \$(K_NET_DIRECTORY) assign _netdir \$(K_NET_DIRECTORY)
  165. if not def _netdir assign _netdir \v(home)CKERMIT.KND
  166. if def \$(K_DIAL_DIRECTORY) assign _dialdir \$(K_DIAL_DIRECTORY)
  167. if not def _dialdir assign _dialdir \v(home)CKERMIT.KDD
  168. CHECK DIAL ; Is there a DIAL command?
  169. xif fail { ; No.
  170. echo DIAL disabled
  171. forward CUSTOM
  172. }
  173. CHECK NETWORK
  174. xif success {
  175. xif exist \m(_netdir) {
  176. set net directory \m(_netdir)
  177. echo { Network directory is \m(_netdir) }
  178. }
  179. }
  180. if eq "\v(name)" "telnet" forward CUSTOM
  181. xif exist \m(_dialdir) {
  182. set dial directory \m(_dialdir)
  183. echo { Dial directory is \m(_dialdir) }
  184. }
  185. COMMENT - Services directory
  186. if def \$(K_SERVICE_DIRECTORY) assign _servicedir \$(K_SERVICE_DIRECTORY)
  187. if not def _servicedir assign _servicedir \v(home)CKERMIT.KSD
  188. ; If no services directory is found skip all the big macro definitions and
  189. ; go straight to the bottom, where we execute the customization file.
  190. if not exist \m(_servicedir) forward custom
  191. echo { Services directory is \m(_servicedir)}
  192. def MAX_SVCS 200 ; Adjust this if you have more entries
  193. define _sd 0 ; Assume no services directory
  194. open read \m(_servicedir) ; Try to open services directory file
  195. xif success {
  196. declare \&d[\m(MAX_SVCS)] ; It's open, declare directory array
  197. for \%i 1 \m(MAX_SVCS) 1 { ; Read the lines into the array
  198. read \&d[\%i]
  199. if fail break
  200. }
  201. close read
  202. xif > \%i \m(MAX_SVCS) {
  203. echo Too many entries in services directory
  204. echo { Maximum is \m(MAX_SVCS).}
  205. echo { Change definition of MAX_SVCS in \v(cmdfile) to allow more. }
  206. echo { Services directory disabled.}
  207. } else {
  208. asg \&d[0] \feval(\%i - 1)
  209. define _sd 1
  210. }
  211. }
  212. xif not \m(_sd) {
  213. def access echo { Services directory not available.}
  214. asg list \m(access)
  215. } else {
  216. def FIND {
  217. set case off
  218. for \%i 1 \&d[0] 1 {
  219. if eq {\%1} {\fsubstr(\&d[\%i],1,\flen(\%1))} break
  220. }
  221. if not > \%i \&d[0] return \&d[\%i]
  222. }
  223. def LIST {
  224. xif > \v(argc) 1 {
  225. do find \%1
  226. if def \v(return) echo \v(return)
  227. else echo \%1: Not found
  228. } else {
  229. echo \&d[0] items in services directory:
  230. for \%i 1 \&d[0] 1 { echo \fcont(\&d[\%i]) }
  231. }
  232. }
  233. def SPLIT { asg _word1 \%1, asg _word2 \%2 }
  234. def DOACCESS { ; (Used internally by ACCESS macro)
  235. do \%5 \%6 \%7 \%8 \%9 ; Do the connection macro
  236. if fail end 1
  237. split \%3 ; Get words from \%3
  238. asg \%3 \m(_word1)
  239. asg \%2 \m(_word2)
  240. do \%3 \%4 {\%1} \%2 ; Login macro, userid, password, prompt
  241. }
  242. def ACCESS {
  243. if not defined \%1 end 1 access what? ; Check service
  244. do find \%1 ; Look it up
  245. if success doaccess {\%2} \v(return) ; OK, try it
  246. else end 1 "\%1" not in services directory ; Not found
  247. if fail end 1 ; DOACCESS failed?
  248. xif eq \v(cmdlevel) 1 {
  249. echo
  250. echo ACCESS: Login succeeded - CONNECTing...
  251. show escape
  252. output \13
  253. connect /quietly
  254. }
  255. }
  256. }
  257. :CONNECTION ; Macros for making connections
  258. COMMENT - SERIAL macro. Arguments:
  259. ; \%1 = device name
  260. ; \%2 = speed
  261. ;
  262. def SERIAL {
  263. if < \v(argc) 3 ; All arguments given?
  264. end 1 Usage: SERIAL device speed ; No.
  265. set line \%1 ; OK, try to SET LINE.
  266. if failure - ; If this failed,
  267. end 1 Can't open device: \%1 ; print message and quit.
  268. set speed \%2 ; Try to set the speed.
  269. if fail end 1 Unsupported speed: \%2 ; Failed.
  270. echo Connection successful. ; Succeeded.
  271. }
  272. COMMENT - NET macro. Arguments:
  273. ; \%1 = network type
  274. ; \%2 = host name or address
  275. ;
  276. def NET {
  277. if < \v(argc) 3 end 1 Usage: NET network host
  278. set network type \%1
  279. if fail end 1 unsupported network: \%1
  280. set login user ; Don't send user ID.
  281. set host \%2
  282. if fail end 1 Can't reach host: \%2
  283. echo Connection successful.
  284. }
  285. COMMENT - CALL macro. Arguments:
  286. ;
  287. ; \%1 = modem type
  288. ; \%2 = device name
  289. ; \%3 = speed
  290. ; \%4 = phone number
  291. ;
  292. def CALL {
  293. if < \v(argc) 5 - ; All arguments present?
  294. end 1 Usage: CALL modem device speed number
  295. xif not equal {\v(modem)} {\%1} { ; Set modem type
  296. set modem \%1
  297. if fail end 1 unknown modem type: \%1
  298. }
  299. xif not equal {\v(line)} {\%2} { ; Communication device
  300. set line \%2
  301. if fail end 1 can't open device: \%2
  302. }
  303. xif not equal {\v(speed)} {\%3} { ; Communication speed
  304. set speed \%3
  305. if fail end 1 unsupported speed: \%3
  306. }
  307. dial \%4 ; Dial the number
  308. if fail end 1 Can't place call: \%4
  309. end 0 Connection successful.
  310. }
  311. COMMENT - TCPCALL macro. Arguments:
  312. ;
  313. ; \%1 = server name:port
  314. ; \%2 = modem type
  315. ; \%3 = phone number
  316. ;
  317. def TCPCALL {
  318. if < \v(argc) 4 - ; All arguments present?
  319. end 1 Usage: TCPCALL server[:port] modem number
  320. set net type tcp/ip ; Which network to use
  321. if fail end 1 unsupported network: tcp/ip
  322. set host \%1 ; Access server and port
  323. if fail end 1 can't access server \%1
  324. set modem \%2 ; Set modem type
  325. if fail end 1 unknown modem type: \%2
  326. dial \%3 ; Dial the number
  327. if fail end 1 Can't place call: \%3
  328. end 0 Connection successful.
  329. }
  330. COMMENT - SPRINT macro. Arguments:
  331. ; \%1 = Service name or address
  332. ;
  333. def SPRINT {
  334. if < \v(argc) 2 end 1 Usage: \%0 service
  335. set input timeout proceed
  336. output @D\13
  337. input 10 TERMINAL=
  338. if fail end 1 No terminal prompt
  339. out D1\13
  340. inp 10 @
  341. if fail end 1 No atsign prompt
  342. output c \%1\13
  343. input 10 CONNECTED
  344. if fail end 1 Can't access \%1 from SprintNet
  345. }
  346. COMMENT - ULOGIN macro. For logging into systems where user ID is required
  347. ; but there is no password. Arguments:
  348. ; \%1 = UNIX user ID
  349. ;
  350. define ULOGIN {
  351. if < \v(argc) 2 end 1 Usage: \%0 userid
  352. set input timeout proceed ; Handle timeouts ourselves
  353. set case on ; Case is important in UNIX
  354. minput 5 login: Username: {User ID:} {User Name:}
  355. out \%1\13 ; Send username, carriage return
  356. end 0
  357. }
  358. COMMENT - VMSLOGIN macro. Arguments:
  359. ; \%1 = VMS user ID
  360. ; \%2 = Password. If password not supplied, it is prompted for.
  361. ; \%3 = System prompt. If omitted a default is supplied.
  362. ;
  363. define VMSLOGIN {
  364. if < \v(argc) 2 end 1 Usage: \%0 userid [ password [ prompt ] ]
  365. while not defined \%2 {
  366. askq \%2 { \%1's password: }
  367. }
  368. set parity none ; Set communication parameters
  369. set duplex full
  370. set handshake none
  371. set input timeout proceed ; Handle timeouts ourselves
  372. in 5 Username: ; Is prompt already there?
  373. xif fail { ; No.
  374. for \%i 1 3 1 { ; Try 3 times to get it.
  375. out \13 ; Send carriage return
  376. in 5 Username: ; Look for prompt
  377. if success break ; Success, go log in
  378. }
  379. if > \%i 3 end 1 No Username prompt
  380. }
  381. out \%1\13 ; Send username, carriage return
  382. inp 5 Password: ; Wait 5 sec for this prompt
  383. if fail end 1 No password prompt
  384. pause ; Wait a sec
  385. out \%2\13 ; Send password
  386. xif not emulation { ; No emulator built in?
  387. set input echo off ; Protect terminal from this
  388. minput 10 {\27Z} {\27[c} {\27[0c} ; Get terminal ID query
  389. xif success { ; Got one
  390. output \27[\?1c ; Send VT100 terminal ID
  391. in 2 \27[6n ; Screen dimension query?
  392. if succ out \27[\v(rows);\v(cols)R ; Send dimensions
  393. }
  394. set input echo on ; Echo input again
  395. }
  396. if not def \%3 - ; If we were not given a prompt
  397. asg \%3 {\v(prompt)} ; use the SET LOGIN PROMPT value
  398. if not def \%3 - ; If we still don't have a prompt
  399. asg \%3 {\13$\32} ; use this one as the default
  400. reinp 0 \%3 ; Did we INPUT the prompt already?
  401. if fail inp 60 \%3 ; No, look now.
  402. if fail end 1
  403. }
  404. COMMENT - UNIXLOGIN macro. Arguments:
  405. ; \%1 = UNIX user ID
  406. ; \%2 = Password. If password not supplied, it is prompted for.
  407. ; \%3 = System prompt. If omitted a default is supplied.
  408. ;
  409. define UNIXLOGIN {
  410. local \%m \%i
  411. if < \v(argc) 2 -
  412. end 1 Usage: \%0 userid [ password [ prompt ] ]
  413. while not defined \%2 {
  414. askq \%2 { \%1's password: }
  415. }
  416. set input echo on
  417. set parity none ; Set communication parameters.
  418. set duplex full
  419. set handshake none
  420. set input timeout proceed ; Handle timeouts ourselves
  421. set case on ; Case is important in UNIX
  422. def \%m 10 ; Waiting time for INPUT
  423. for \%i 1 5 1 {
  424. minput \%m login: {ssword:} {Password for \%1:}
  425. if success break
  426. output \B\13
  427. \%m ::= 6-\%1
  428. }
  429. if > \%i 5 end 1 {No response from host}
  430. xif = \v(minput) 1 { ; Have username prompt
  431. output \%1\13 ; Send username
  432. minput 5 {ssword:} {ssword for \%1:} ; Wait for password prompt
  433. if fail end 1 {No password prompt}
  434. }
  435. pause ; Wait a sec
  436. out \%2\13 ; Send password
  437. if not def \%3 - ; If we were not given a prompt
  438. asg \%3 {\v(prompt)} ; use the SET LOGIN PROMPT value
  439. if not def \%3 - ; If we still don't have a prompt
  440. asg \%3 {\10$ } ; use this one as the default
  441. reinp 0 \%3 ; Did we INPUT the prompt already?
  442. if fail inp 60 \%3 ; No, look now.
  443. if fail end 1
  444. }
  445. COMMENT - VMLINELOGIN macro. Arguments:
  446. ; \%1 = User ID
  447. ; \%2 = Password
  448. ;
  449. define VMLINELOGIN {
  450. if < \v(argc) 2 -
  451. end 1 Usage: \%0 userid [ password ]
  452. while not defined \%2 {
  453. askq \%2 { \%1's password: }
  454. }
  455. set parity mark ; Set communication parameters
  456. set flow none
  457. set handshake xon
  458. set duplex half
  459. set input timeout quit ; Don't bother with IF FAILURE
  460. input 10 BREAK KEY ; Look for BREAK KEY prompt
  461. pause 1 ; Wait a second
  462. output \B ; Send BREAK
  463. input 10 .\17, output logon \%1\13 ; Now log in
  464. input 10 .\17, output \%2\13 ; Send password
  465. input 10 .\17, output \13 ; Send carriage return
  466. input 10 .\17, output \13 ; Send another one
  467. end 0
  468. }
  469. COMMENT - VMFULLOGIN macro. Arguments:
  470. ; \%1 = User ID
  471. ; \%2 = Password
  472. ;
  473. define VMFULLOGIN {
  474. if < \v(argc) 2 -
  475. end 1 Usage: \%0 userid [ password ]
  476. while not defined \%2 {
  477. askq \%2 { \%1's password: }
  478. }
  479. set input timeout quit ; Quit if INPUT fails
  480. set parity even ; Set communication parameters
  481. set duplex full
  482. set handshake none
  483. set flow xon/xoff
  484. out \13 ; Send carriage return
  485. inp 5 TERMINAL TYPE: ; Get terminal-type prompt
  486. out vt-100\13 ; Just send "vt-100"
  487. inp 20 RUNNING ; Get RUNNING message
  488. pau 1 ; Wait one second
  489. out \%1\9\%2\13 ; Send user ID, tab, password
  490. out \13\13 ; Two more carriage returns
  491. end 0
  492. }
  493. COMMENT - CISLOGIN macro. Arguments:
  494. ; \%1 = CompuServe User ID
  495. ; \%2 = Password
  496. ; \%3 = Prompt
  497. ;
  498. define CISLOGIN {
  499. if < \v(argc) 2 -
  500. end 1 Usage: \%0 userid [ password [ prompt ] ]
  501. while not defined \%2 {
  502. askq \%2 { \%1's password: }
  503. }
  504. set terminal bytesize 7 ; No 8-bit characters
  505. set input timeout quit ; Skip the IF FAILURE's
  506. output \13 ; Send initial carriage return
  507. input 5 Host Name: ; Look for Host Name prompt
  508. output cis\13 ; Send "cis" and carriage return
  509. input 5 User ID: ; Look for User ID prompt
  510. output \%1\13 ; Send ID and carriage return
  511. input Password: ; Look for Password prompt
  512. output \%2\13 ; Send password and CR
  513. if not def \%3 asg \%3 \v(prompt)
  514. if not def \%3 asg \%3 {CompuServe Information Service}
  515. input 30 \%3
  516. end 0
  517. }
  518. COMMENT - DOWLOGIN macro. Arguments:
  519. ; \%1 = Dow Jones Password
  520. ;
  521. define DOWLOGIN {
  522. while not defined \%1 { ; Get password
  523. askq \%1 { Dow Jones password: }
  524. }
  525. set input timeout proceed
  526. input 20 SERVICE PLEASE\?\?\?\? ; Look for Dow prompt
  527. if fail end 1 No service prompt
  528. out djnr\13 ; Select DJNR
  529. input 10 @@@@@@@@ ; Get password prompt
  530. if fail end 1 No password prompt
  531. pause 1 ; Wait a second, then...
  532. output \%1\13 ; send password and CR
  533. input 30 ENTER QUERY ; Get DJNR query prompt
  534. if fail end 1 No main query prompt
  535. pause 1
  536. }
  537. COMMENT - DJNRSPRINT macro: Log in to Dow Jones via SprintNet.
  538. ;
  539. def djnrsprint sprint dow, if success dowlogin
  540. COMMENT - NOLOGIN macro. Does nothing. Use when login not required.
  541. ;
  542. def nologin comment
  543. :CUSTOM ; Customization file
  544. ; In VMS and OpenVMS, allow for system-wide site customizations
  545. xif equal "\v(system)" "VMS" {
  546. xif exist CKERMIT_INI:CKERMIT.SYS {
  547. echo Executing CKERMIT_INI:CKERMIT.SYS
  548. take CKERMIT_INI:CKERMIT.SYS
  549. }
  550. }
  551. ; Execute user's personal customization file
  552. xif exist \m(_myinit) { ; If it exists,
  553. echo Executing \m(_myinit)... ; print message,
  554. take \m(_myinit) ; and TAKE the file.
  555. }
  556. ; Finish up with traditional greeting.
  557. if < \v(ntime) 43200 echo Good Morning!
  558. else if < \v(ntime) 61200 echo Good Afternoon!
  559. else echo Good Evening.
  560. End ; of C-Kermit 8.0 initialization file.