home *** CD-ROM | disk | FTP | other *** search
- # Contract - Unexpand Option chars in a file from their 'English' equivalents
- # to their option char form
- #
- # Use after getting an MPW file as a text file that has been transformed with
- # Expand
- #
- # Steve Knouse
- # Apple Computer
- # 2950 N Loop W, Suite 1070
- # Houston, TX 77092
- # Applelink: KNOUSE
-
- # Check 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
-
- # save the state of CaseSensitive
- if {CaseSensitive} == ""
- set cs 0
- else
- set cs 1
- end
- set CaseSensitive 1
-
- # restore 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 /OpTiOn-r/ || break
- catenate tag_oper > "{target}.ñ"
- end
-
- # go to the top of the file
- find Ñ
-
- # go to the top of the file
- find Ñ
-
- # restore Casesensitive
- if {cs} == 0
- unset CaseSensitive
- end
- unset cs
-