Spelling program broke on Sparc
Dave Jones
megatest!djones at decwrl.dec.com
Wed Jan 30 12:59:38 AEST 1991
I wonder if someone can help me figure out what has happened to the
spelling checker program "spellin". I had some stuff rigged up to take my
local spelling list, merge it with the standard one, and then use the
combined list. I was happy with it. And nothing could possibly break,
because it was all based on a documented program called "spellin", and on
documented system files. Right? (Do I really look that naive? :-( ) Well,
I recently got a new SPARC SLC, and my programs broke. Some files had been
moved around. (Why, why, why?) So I rigged my scripts to figure out
whether they were running with the files in the original places or the new
ones. Still no dice.
The scheme was based around a program on the old machine, called
"spellin". There is a program on the new machine called "spellin", but
apparently the two are different. (HATE it when that happens!) All I can
get the new one to do is to print out "illegal instruction".
There is a little fragment of documentation on the new machine about the
new "spellin" and about a new program called "hashmake", but it's too
sparse for me to make much sense of it.
Can anybody shed some light on this? In the meantime, I'm just using the
new "+" option to spell. It just removes words in the auxilary list from
the output of spell, but not words derived from those.
Here's what I've got:
spell:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#! /bin/csh -f
set arch="sun3"
if ( -x /bin/arch ) then
set arch="`/bin/arch`"
endif
switch("${arch}")
case sun3:
/usr/bin/spell -d /u/djones/lib/hlista -s /u/djones/lib/hstop $*
breaksw
case sun4:
/usr/bin/spell +/u/djones/lib/words $*
breaksw
default:
echo "Spell: Unknown arch." "${arch}"
breaksw
endsw
.............................................................................
learn_word:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#! /bin/csh -f
# Learn the correct spelling of a word or words.
# Creates and maintains files
# /u/djones/lib/words ... sorted text of words to supliment
# standard list
# /u/djones/lib/hlista ... suplimental and standard lists, merged
# and hashed
# /u/djones/lib/words.temp ... scratch file
# /u/djones/lib/hlista.temp ... scratch file
#
# I don't know why I need to make a copy of /usr/dict/hlista, but
# that's the only way I found to make it work. .. djones
# See also bad_word
set arch="sun3"
if ( -x /bin/arch ) then
set arch="`/bin/arch`"
endif
switch("${arch}")
case sun3:
echo $* | tr ' ' '\012' >> /u/djones/lib/words
sort -u /u/djones/lib/words > /u/djones/lib/words.temp
mv /u/djones/lib/words.temp /u/djones/lib/words
cp /usr/dict/hlista /u/djones/lib/hlista.temp
/usr/bin/spellin /u/djones/lib/hlista.temp < /u/djones/lib/words > /u/djones/lib/hlista
rm /u/djones/lib/hlista.temp
breaksw
case sun4:
echo $* | tr ' ' '\012' >> /u/djones/lib/words
sort -u /u/djones/lib/words > /u/djones/lib/words.temp
mv /u/djones/lib/words.temp /u/djones/lib/words
breaksw
default:
echo "Learn_word: Unknown arch." "${arch}"
breaksw
endsw
More information about the Comp.sys.sun
mailing list