home *** CD-ROM | disk | FTP | other *** search
- /*rx
- * SpellFile.rexx --- program to spell check a file using the ISpell server
- * from CLI.
- * Thanks to Richard A. Gerber (gerber@sirius.astro.uiuc.edu) for
- * pointing out to me how out of date this thing really was.
- *
- * Copyright © 1989, 1992 Loren J. Rittle
- * Use as you will, just document your changes and keep my copyright
- * notice intact. Feel free to mail enhancements to me.
- *
- * Loren J. Rittle
- * rittle@comm.mot.com
- * Wed May 13 05:45:54 1992
- */
-
- options results
- options failat 40
-
- if left(address(), 4) ~== 'WSH_' then
- address command
-
- if words(arg(1)) = 0 then
- do
- say 'Usage: spellfile file1 file2 ...'
- exit 5
- end
-
- if ~show(ports, 'IRexxSpell') then
- do
- 'run <nil: >nil: ispell -r >nil: <nil:'
- waitforport 'IRexxSpell'
- end
-
- tempname = 't:spellfile'pragma('id')
-
- do i = 1 to words(arg(1))
- if ~exists(word(arg(1),i)) then
- do
- say 'spellfile: skipping file' word(arg(1),i) 'because not found.'
- iterate i
- end
- 'copy' word(arg(1),i) tempname
- if rc ~= 0 then
- do
- say 'spellfile: skipping file' word(arg(1),i) 'because of above error.'
- iterate i
- end
-
- address 'IRexxSpell' filecheck tempname
- r = result
-
- 'type' r
- 'delete quiet force' r tempname
- end
-
- exit 0
-