home *** CD-ROM | disk | FTP | other *** search
- # Expand option characters in a file to their 'English' equivalent.
- #
- # Use before sending an MPW file as a text file to keep your 7 bit
- # line / comm service from choking.
- #
- # Reverse the process with Contract
- #
- # Steve Knouse
- # Apple Computer
- # 2950 N Loop W, Suite 1070
- # Houston, TX 77092
- # Applelink: KNOUSE
-
- # check the syntax
- if {#} <> 1
- echo Error: useage {0} filename
- exit
- end
-
- # set the target file
- target {1}
-
- # make sure we don't exit if some of the chars are missing
- set exit 0
-
- # replace the special chars
- find Ñ ; replace -c ░ /'¬'/ 'OpTiOn-2'
- find Ñ ; replace -c ░ /'¡'/ 'OpTiOn-='
- find Ñ ; replace -c ░ /'│'/ 'OpTiOn-.'
- find Ñ ; replace -c ░ /'▓'/ 'OpTiOn-,'
- find Ñ ; replace -c ░ /'╓'/ 'OpTiOn-/'
- find Ñ ; replace -c ░ /'╔'/ 'OpTiOn-;'
- find Ñ ; replace -c ░ /'┴'/ 'OpTiOn-1'
- find Ñ ; replace -c ░ /'░'/ 'OpTiOn-5'
- find Ñ ; replace -c ░ /'ñ'/ 'OpTiOn-6'
- find Ñ ; replace -c ░ /'Ñ'/ 'OpTiOn-8'
- find Ñ ; replace -c ░ /╢╢/ 'OpTiOn-d'
- find Ñ ; replace -c ░ /'─'/ 'OpTiOn-f'
- find Ñ ; replace -c ░ /'⌐'/ 'OpTiOn-g'
- find Ñ ; replace -c ░ /'╞'/ 'OpTiOn-j'
- find Ñ ; replace -c ░ /'┬'/ 'OpTiOn-l (lowercase L)'
- find Ñ ; replace -c ░ /'┼'/ 'OpTiOn-x'
- find Ñ ; replace -c ░ /'╟'/ 'OpTiOn-\'
- find Ñ ; replace -c ░ /'╚'/ 'OpTiOn-Shift-\'
- # special handling for the tag operator
- find Ñ
- loop
- find /¿/ || break
- replace ñ 'OpTiOn-r'
- end
-
- # go to the top of the file
- find Ñ
-
- set exit 1
-
-