home *** CD-ROM | disk | FTP | other *** search
- < Spell Documentation >
-
- Spell copies named files to standard output while looking up each word
- in a dictionary.
-
- In order to get started, first of all, you have to make a single dictionary
- file concatenating nine dictionary pieces in two delivered disks.
- Because the concatenated dictionary file is very large, it will require a hard
- disk or a floppy disk with at least 500K capacity.
- The dictionary consists of nine files;
-
- SPELL0.DAT a - bright
- SPELL1.DAT brighten - deduce
- SPELL2.DAT deduced - floss
- SPELL3.DAT flotilla - instructed
- SPELL4.DAT instructing - ms
- SPELL5.DAT msec - prosecution
- SPELL6.DAT prosecutions - skipjack
- SPELL7.DAT skipl - unasterisked
- SPELL8.DAT unattacked - zworykin
- ( These are from DECUS )
-
- The best way to concatenate those files is to use MSDOS command, "copy".
- For example,
-
- COPY SPELL0.DAT + SPELL1.DAT + SPELL2.DAT .. + SPELL8.DAT DICT
-
- The dictionary file must be named DICT because the name is defined in the
- program.
-
- Spell is called with this format:
-
- spell file0 file1 file2 ... <cr>
-
- Spell opens the named text files and checks if there are any misspelled words.
- If any spelling errors are found in a particular line, an additional line
- will be displayed line indicating errors with asterisks under the misspelled
- word.
- When spell is called for the first time, it makes an index file DICTDX which
- is used for a binary search. Because of this, the first run may be quite slow.
- The example is given below;
-
- (Before spell checker)
-
- Thank you for buying spell checker program.
- This is a test text.
- Eror is displayed like this.
- Thank you agai.
-
- (Result)
-
- Thank you for buying spell checker program.
- This is a test text.
- Eror is displayed like this.
- ****
- Thank you agai.
- ****
-
- In this disk, there are three executable spell programs, SPELLS.EXE,
- SPELLC.EXE, and SPELLH.EXE.
- Although they were compiled under Microsoft C, SPELL.C is quite portable and
- should be compilable under most compilers.
- SPELLS is compiled with the small size model option, SPELLC with compact size
- model, and SPELLH with huge size model.
- Because SPELLC and SPELLH can store more index keys than SPELLS in main memory,
- they perform faster than SPELLS and require more memory than SPELLS.
- SPELLS requires less memory and its performance will be slower than SPELLC and
- SPELLH.
- You should decide which one is most suitable for your computer, considering
- your main memory capacity.
- If you run out of memory, you need to change the value of DEFAULT_DIF
- which is defined in the program and recompile. DEFAULT_DIF is the manifest
- constant which decides how often index keys are picked up from a dictionary
- file.
- For example,
-
- #define DEFAULT_DIF 10
-
- means that the program picks up a index key after every 10 dictionary words.
- If you increase this value, SPELL creates fewer index keys so that less memory
- is used for storing index keys in main memory.
- These are the DEFAULT_DIF values used in three executable programs.
- (The value of MAX_DIR_ENTRIES is also changed.)
-
- DEFAULT_DIF MAX_DIR_ENTRIES
-
- SPELLS 20 3000
- SPELLC 10 6000
- SPELLH 5 10000