summaryrefslogtreecommitdiff
path: root/dist/s_string
blob: 3c4f8ef3b5ecc695e4984b5dfff1adbd1676fdfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh -
#
# Check spelling in comments and quoted strings from the source files.

t=__wt.$$
trap 'rm -f $t; exit 0' 0 1 2 3 13 15

# If aspell has not been installed, quit
type aspell > /dev/null 2>&1 || {
	echo 'skipped: aspell not found'
	exit 0
}

check() {
	aspell --mode=ccpp --lang=en list < ../$1 |
	sort -u |
	comm -23 /dev/stdin s_string.ok > $t
	test -s $t && {
		echo "==== $1"
		cat $t
	}
}

# List of files to spellchk.
l=`(cd .. &&
    find examples ext src test -name '*.[chisy]' &&
    find src -name '*.in')`

for f in $l; do
	check $f
done

exit 0