From 9153d815d88e298b7c91973d7d13f7859790a8f1 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Fri, 10 Jun 2011 13:41:45 -0400 Subject: Add spell checking for the source code. --- dist/api_data.py | 2 +- dist/s_all | 1 + dist/s_string | 23 +++ dist/s_string.ok | 360 ++++++++++++++++++++++++++++++++++++++++++++++ src/btree/bt_alloc.c | 4 +- src/btree/bt_reconcile.c | 10 +- src/btree/row_key.c | 2 +- src/include/btree.h | 2 +- src/include/wiredtiger.in | 2 +- src/support/pow.c | 4 +- 10 files changed, 397 insertions(+), 13 deletions(-) create mode 100644 dist/s_string create mode 100644 dist/s_string.ok diff --git a/dist/api_data.py b/dist/api_data.py index 7cd35df2e3d..333afe8ca44 100644 --- a/dist/api_data.py +++ b/dist/api_data.py @@ -168,7 +168,7 @@ methods = { 'session.checkpoint' : Method([ Config('archive', 'false', r''' - remove log files no longer required for transactional durabilty''', + remove log files no longer required for transactional durability''', type='boolean'), Config('force', 'false', r''' write a new checkpoint even if nothing has changed since the last diff --git a/dist/s_all b/dist/s_all index 6f4694d5f91..3c374a61b7b 100644 --- a/dist/s_all +++ b/dist/s_all @@ -56,6 +56,7 @@ run "sh ./s_define" "Checking for unused #defines" run "sh ./s_funcs" "Checking for unused functions" run "sh ./s_printf" "Checking for non-portable printf/scanf" run "sh ./s_longlines" "Checking for long lines" +run "sh ./s_string" "Checking string spelling" run "sh ./s_style" "Checking style" run "sh ./s_typedef -c" "Checking for unused typedefs" run "sh ./s_types" "Checking for old-style types" diff --git a/dist/s_string b/dist/s_string new file mode 100644 index 00000000000..a42f968a555 --- /dev/null +++ b/dist/s_string @@ -0,0 +1,23 @@ +#!/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 + +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 + } +} + +l="`cd .. && echo src/include/*.[hi] src/include/*.in`" +for i in $l `sed -e '/^[a-z]/! d' filelist`; do + check $i +done + +exit 0 diff --git a/dist/s_string.ok b/dist/s_string.ok new file mode 100644 index 00000000000..a6175edca52 --- /dev/null +++ b/dist/s_string.ok @@ -0,0 +1,360 @@ +AAAAA +AAAAAA +AAAAAAAAAA +AAAAAAAAAAAAA +AAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAA +ADDR +API +APIs +Alloc +Athlon +BBBBB +BBBBBB +BBBBBBBBBB +BBBBBBBBBBBBB +BBBBBBBBBBBBBBBB +BBBBBBBBBBBBBBBBBB +BITSTRING +BSR +BTREE +BUF +BUFs +Bsearch +Btree +CELL's +CELLs +COL's +CONCAT +CURSORs +Checksum +Config +DATAITEMs +DESC +EINTR +ENOMEM +ETIME +ETIMEDOUT +Enqueue +Env +Eron +FALLTHROUGH +FH +FLD +FOREACH +FREELIST +Fasttrack +FreeBSD +FreeBSD's +Freelist +IMPL +IMPL's +INDX +INIT +INITIALIZER +INSERT's +JPEG +KV +Kanowski's +Kounavis +LF +LRU +LSN +LSN's +LSNs +Lookup +MBUF +MEM +MVCC +Mewhort +Mutex +Mutexes +NONINFRINGEMENT +NOTFOUND +NOTREACHED +NUL +NULLs +NoAddr +OVFL +PADDR +PAGE's +POSIX +PSIZE +PTR +Pagesize +PlatformSDK +Pre +Qsort +READONLY +REF's +REQ +RLE +RPC +Recurse +Redistributions +Resize +SCHED +SLIST +STAILQ +SYS +Solaris +Split's +Subtree +Subtrees +TAILQ +TODO +TOOSMALL +UINT +UTF +UnixLib +Vc +Vixie +VxWorks +WIREDTIGER +WinNT +WiredTiger +WiredTiger's +XP +abcdef +addfrag +addl +addr +addrs +alfred +alloc +allocsize +ap +api +bigram +bitpos +bitstring +bitwise +bnd +boolean +breakpoint +bsearch +bt +btcur +btree +buf +builtin +calloc +checkfrag +checksum +checksums +cksum +clr +cmp +colgroup +cond +conf +config +conn +connectionp +crc +cref +ctype +curbtree +curbulk +curconfig +curdump +cursorp +curstat +datalen +datasets +del +delfmt +dequeue +dequeued +der +dereference +desc +dest +dlclose +dlh +dlopen +dlsym +dsk +dumpable +dup +encodings +endian +english +enqueue +enum's +eof +eop +errhandler +errv +errx +esc +exactp +extern +fcntl +fh +filename +fileops +filesize +fixup +fmt +fp +free'd +freelist +fstat +fsync +fsyncs +ftruncate +func +getone +getones +getraw +gobare +goesc +gostring +gostruct +goutf +hrow +html +huffman +iSh +ikey +imref +incr +indices +indx +init +initsize +inmem +intl +intpack +ints +inuse +ispo +keyname +len +lex +llll +logput +lookup +lookups +lru +lsn +lu +majorp +malloc +mb +mem +membar +memcpy +metadata +mfence +minorp +minprefix +msg +mtx +multiprocess +mutex +mutexes +namespaces +nbits +negint +newname +nl +nlpo +nul +numSymbols +numbare +offpage +oldname +ovfl +packv +patchp +pfx +posint +printf +pthread +py +qdown +qsort +qup +realloc +recno +req +ret +retp +rle +rpc +rref +runlength +savepoints +sb +schemas +scr +searchable +serializable +sessionp +sizeof +sizev +slvg +snprintf +sp +src +srch +srvr +sset +stbar +stdarg +stderr +stdout +strdup +strerror +stringin +struct +structs +subtree +subtrees +superset +sys +t's +tV +tablename +th +thazard +tinsert +toffpage +trecno +trepeat +trk +trk's +tt +tupdate +tworkq +txn +typedef +uB +uint +unbare +uncompressing +undef +unesc +uninstantiated +unjams +unpackv +upd +uri +utf +va +versa +vpack +vsize +vunpack +vupdate +wiredtiger +workQ +workq +wq +wrapup +xff +xxxx +xxxxx +xxxxxx diff --git a/src/btree/bt_alloc.c b/src/btree/bt_alloc.c index 6ef41b54ea0..877284ab699 100644 --- a/src/btree/bt_alloc.c +++ b/src/btree/bt_alloc.c @@ -124,7 +124,7 @@ __wt_block_free(WT_SESSION_IMPL *session, uint32_t addr, uint32_t size) combine:/* * Insert the entry at the appropriate place in the address list after - * checking to see if it ajoins adjacent entries. + * checking to see if it adjoins adjacent entries. */ TAILQ_FOREACH(fe, &btree->freeqa, qa) { /* @@ -173,7 +173,7 @@ combine:/* /* * The freed entry must appear before the list entry, but does - * not ajoin it. Insert the freed entry before the list entry. + * not adjoin it. Insert the freed entry before the list entry. */ TAILQ_INSERT_BEFORE(fe, new, qa); break; diff --git a/src/btree/bt_reconcile.c b/src/btree/bt_reconcile.c index 4f9293c07df..366a11d049b 100644 --- a/src/btree/bt_reconcile.c +++ b/src/btree/bt_reconcile.c @@ -159,8 +159,8 @@ typedef struct { * * We obviously could maintain this list on a per-split-chunk basis: * copy it into the WT_BOUNDARY structure if the boundary is reached. - * We're binarily searching this array during fixup and I don't expect - * it to be large. + * We're doing a binary search of this array during fixup and I don't + * expect it to be large. */ WT_REF **imref; /* In-memory subtree reference list */ uint32_t imref_next; /* Next list slot */ @@ -328,14 +328,14 @@ __rec_init(WT_SESSION_IMPL *session, uint32_t flags) r->locked = LF_ISSET(WT_REC_LOCKED); /* - * During internal page reconcilition we track referenced objects that + * During internal page reconciliation we track referenced objects that * are discarded when the page is discarded. That tracking is done per * reconciliation run, initialize it before anything else. */ __rec_discard_init(r); /* - * During internal page reconcilition we track in-memory subtrees we + * During internal page reconciliation we track in-memory subtrees we * find in the page. That tracking is done per reconciliation run, * initialize it before anything else. */ @@ -2937,7 +2937,7 @@ __rec_key_state_update(WT_RECONCILE *r, int ovfl_key) WT_BUF *a; /* - * If writing an overflow key onto the page, dan't update the "last key" + * If writing an overflow key onto the page, don't update the "last key" * value, and leave the state of prefix compression alone. (If we are * currently doing prefix compression, we have a key state which will * continue to work, we're just skipping the key just created because diff --git a/src/btree/row_key.c b/src/btree/row_key.c index 51a422b51f9..0d26a854fae 100644 --- a/src/btree/row_key.c +++ b/src/btree/row_key.c @@ -68,7 +68,7 @@ __wt_row_key( * read/write them during reconciliation simply because their * prefix might change. That means we can't use instantiated * overflow keys to figure out the prefix for other keys, - * specifially, in this code when we're looking for a key we + * specifically, in this code when we're looking for a key we * can roll-forward to figure out the target key's prefix, * instantiated overflow keys aren't useful. * diff --git a/src/include/btree.h b/src/include/btree.h index 21bdd92662b..9d55852f5ae 100644 --- a/src/include/btree.h +++ b/src/include/btree.h @@ -340,7 +340,7 @@ struct __wt_page { #define WT_PAGE_BULK_LOAD 0x01 /* Page bulk loaded */ #define WT_PAGE_CACHE_COUNTED 0x02 /* Page counted in cache stats */ -#define WT_PAGE_DELETED 0x04 /* Page was empty at reconcilation */ +#define WT_PAGE_DELETED 0x04 /* Page was empty at reconciliation */ #define WT_PAGE_INITIAL_EMPTY 0x08 /* Empty page created during open */ #define WT_PAGE_MODIFIED 0x10 /* Page is modified */ #define WT_PAGE_PINNED 0x20 /* Page is pinned */ diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in index f48f7e8a4b3..44db5d9803b 100644 --- a/src/include/wiredtiger.in +++ b/src/include/wiredtiger.in @@ -720,7 +720,7 @@ struct wt_session { * @param session the session handle * @configstart{session.checkpoint, see dist/api_data.py} * @config{archive, remove log files no longer required for - * transactional durabilty} + * transactional durability} * @config{force, write a new checkpoint even if nothing has changed * since the last one} * @config{flush_cache, flush the cache} diff --git a/src/support/pow.c b/src/support/pow.c index d458c4fbbff..c004531ade0 100644 --- a/src/support/pow.c +++ b/src/support/pow.c @@ -16,7 +16,7 @@ * Note that in the edge case where v is 0, it returns 0, which isn't a power of * 2; you might append the expression v += (v == 0) to remedy this if it * matters. It would be faster by 2 operations to use the formula and the - * log base 2 methed that uses a lookup table, but in some situations, lookup + * log base 2 method that uses a lookup table, but in some situations, lookup * tables are not suitable, so the above code may be best. (On a Athlon XP 2100+ * I've found the above shift-left and then OR code is as fast as using a single * BSR assembly language instruction, which scans in reverse to find the highest @@ -24,7 +24,7 @@ * and then adding one, which results in carries that set all of the lower bits * to 0 and one bit beyond the highest set bit to 1. If the original number was * a power of 2, then the decrement will reduce it to one less, so that we round - * up to the same original value. Devised by Sean Anderson, Sepember 14, 2001. + * up to the same original value. Devised by Sean Anderson, September 14, 2001. * Pete Hart pointed me to a couple newsgroup posts by him and William Lewis in * February of 1997, where they arrive at the same algorithm. * http://graphics.stanford.edu/~seander/bithacks.html -- cgit v1.2.1