|
|
1.1 ! root 1: # NOTICE-NOT TO BE DISCLOSED OUTSIDE BELL SYS EXCEPT UNDER WRITTEN AGRMT ! 2: L=/usr/lib/style ! 3: mflag=-ms ! 4: trap 'rm -f /tmp/$$*; trap 0; exit' 0 1 2 3 15 ! 5: if test $# -eq 0 ! 6: then echo Usage: proof\[e\]r \[-s\] filename ... ! 7: exit 1 ! 8: fi ! 9: for i in $* ! 10: do case $i in ! 11: -s) sflag=s; shift;continue;; ! 12: -ver) echo $0 version 2.5::2.1,2.0; exit 0;; ! 13: -flags) echo $0 \[-flags\] \[-ver\] \[file ...\];exit 0;; ! 14: -*) echo unknown proof\[e\]r flag $i; exit 1;; ! 15: *) if test ! -r $i ! 16: then echo Can\'t find the file $i\; try specifying a more complete pathname.; exit ! 17: fi ! 18: esac ! 19: done ! 20: echo $* ! 21: ! 22: if test $sflag ! 23: then ! 24: echo -e "\n"--SPELLWWB for $*-- ! 25: if test -r $HOME/lib/spelldict ! 26: then spell $*|sort|comm -23 - $HOME/lib/spelldict |pr -r -3 -t -i" "25 ! 27: else spell $*|pr -r -3 -t -i" "25 ! 28: fi ! 29: ! 30: echo -e "\n"--PUNCT and DOUBLE for $*-- ! 31: punct $* ! 32: echo -e "\n"--DICTION for $*-- ! 33: if test -r $HOME/lib/ddict ! 34: then $L/dprog -l -f $HOME/lib/ddict $* ! 35: else $L/dprog -l $* ! 36: fi ! 37: echo -e "\n"--GRAM for $*-- ! 38: deroff -n $mflag $*|$L/style1 |$L/style2 | $L/style3 -P -L| $L/gramlx ! 39: echo -e __"\n" ! 40: else ! 41: ! 42: first=$1 ! 43: echo -e "****************************** SPELLING *******************************\n" ! 44: m=F ! 45: for i in $* ! 46: do echo -e "\n" ! 47: if test -r $HOME/lib/spelldict ! 48: then spell $i|sort|comm -23 - $HOME/lib/spelldict >/tmp/$$spell ! 49: else spell $i>/tmp/$$spell ! 50: fi ! 51: if test -s /tmp/$$spell ! 52: then echo -e Possible spelling errors in $i are:"\n" ! 53: pr -3 -t -i" "25 /tmp/$$spell ! 54: m=T ! 55: else echo No spelling errors found in $i ! 56: fi ! 57: done ! 58: if test $m = T ! 59: then echo -e '\nIf any of these words are spelled correctly, later type ! 60: spelladd word1 word2 ... wordn ! 61: to have them added to your spelldict file.' ! 62: fi ! 63: echo -e "\n\n***************************** PUNCTUATION *****************************\n" ! 64: m=F ! 65: for i in $* ! 66: do ! 67: echo -e "For file $i:\n" ! 68: sed "s/^'/./" $i >/tmp/$$in ! 69: if test $i = $first ! 70: then echo -e '\nThe program next prints any sentence that it thinks is ! 71: incorrectly punctuated and follows it by its correction.\n' ! 72: fi ! 73: $L/punlx </tmp/$$in >/tmp/$$punct ! 74: echo -e "\n" ! 75: bdiff /tmp/$$in /tmp/$$punct >/tmp/$$diff ! 76: if test ! -s /tmp/$$diff ! 77: then echo -e No errors found in $i"\n" ! 78: else sed -f $L/seddiff /tmp/$$diff ! 79: m=T ! 80: echo -e "\n\n" ! 81: fi ! 82: done ! 83: if test $m = T ! 84: then echo -e For more information about punctuation rules, type:"\n " punctrules ! 85: fi ! 86: echo -e "\n\n***************************** DOUBLE WORDS ****************************" ! 87: for i in $* ! 88: do ! 89: echo -e "\nFor file $i:\n" ! 90: double $i ! 91: done ! 92: echo -e '\n\n***************************** WORD CHOICE *****************************\n ! 93: Sentences with possibly wordy or misused phrases are listed next, ! 94: followed by suggested revisions.\n' ! 95: if test -r $HOME/lib/ddict ! 96: then echo -e NOTE: proofr is using your file $HOME/lib/ddict for additional phrases."\n" ! 97: fi ! 98: if test -r $HOME/lib/ddict ! 99: then $L/dprog -l -f $HOME/lib/ddict -o /tmp/$$dictsed $* ! 100: else $L/dprog -l -o /tmp/$$dictsed $* ! 101: fi ! 102: if test -s /tmp/$$dictsed ! 103: then ! 104: echo -e '\nPlease wait for the substitution phrases. ! 105: ! 106: \n------------------- Table of Substitutions --------------------\n ! 107: PHRASE SUBSTITUTION\n' ! 108: sort -u /tmp/$$dictsed|sed -f $L/script.sed| split -50 -f /tmp/$$d_ ! 109: for i in /tmp/$$d_* ! 110: do ! 111: sed -n -f $i $L/suggest.d >>/tmp/$$d ! 112: done ! 113: sort /tmp/$$d ! 114: fi ! 115: echo -e '\n------------------------------------------------------------------\n ! 116: \n * Not all the revisions will be appropriate for your document. ! 117: * When there is more than one suggestion for just one bracketed ! 118: word, you will have to choose the case that fits your use. ! 119: * Capitalized words are instructions, not suggestions.\n ! 120: NOTE: If you want this program to look for additional phrases ! 121: or to stop looking for some, for instance to stop ! 122: flagging "impact," type the command dictadd.' ! 123: echo -e "\n\n************************** GRAMMATICAL ERRORS *************************" ! 124: m=F ! 125: for i in $* ! 126: do ! 127: echo -e "\nFor file $i:\n" ! 128: deroff -n $mflag $i | $L/style1 |$L/style2 | $L/style3 -P -L| $L/gramlx >/tmp/$$split ! 129: if test -s /tmp/$$split ! 130: then cat /tmp/$$split ! 131: m=T ! 132: else echo No grammer errors found ! 133: fi ! 134: done ! 135: if test $m = T ! 136: then echo -e '\nFor information on split infinitives type: ! 137: splitrules' ! 138: fi ! 139: fi
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.