summaryrefslogtreecommitdiff
path: root/src/kwset.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-03-01 17:04:32 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2012-03-01 17:11:27 -0800
commitfff5850967ec10fa3e2e4a800031cb8e335e8fca (patch)
tree3ed87202785a090c47b7aec50b0ad4d1d1dd826f /src/kwset.c
parent8fcf61523644df42e1905c81bed26838e0b04f91 (diff)
downloadgrep-fff5850967ec10fa3e2e4a800031cb8e335e8fca.tar.gz
maint: spelling fixes
Diffstat (limited to 'src/kwset.c')
-rw-r--r--src/kwset.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/kwset.c b/src/kwset.c
index 54963719..cd409539 100644
--- a/src/kwset.c
+++ b/src/kwset.c
@@ -21,7 +21,7 @@
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
-/* The algorithm implemented by these routines bears a startling resemblence
+/* The algorithm implemented by these routines bears a startling resemblance
to one discovered by Beate Commentz-Walter, although it is not identical.
See "A String Matching Algorithm Fast on the Average," Technical Report,
IBM-Germany, Scientific Center Heidelberg, Tiergartenstrasse 15, D-6900
@@ -69,7 +69,7 @@ struct trie
struct trie *fail; /* Aho-Corasick failure function. */
int depth; /* Depth of this node from the root. */
int shift; /* Shift function for search failures. */
- int maxshift; /* Max shift of self and descendents. */
+ int maxshift; /* Max shift of self and descendants. */
};
/* Structure returned opaquely to the caller, containing everything. */
@@ -314,7 +314,7 @@ treefails (struct tree const *tree, struct trie const *fail,
treefails(tree->rlink, fail, recourse);
/* Find, in the chain of fails going back to the root, the first
- node that has a descendent on the current label. */
+ node that has a descendant on the current label. */
while (fail)
{
link = fail->links;
@@ -432,16 +432,16 @@ kwsprep (kwset_t kws)
computing the delta table, failure function, and shift function. */
for (curr = last = kwset->trie; curr; curr = curr->next)
{
- /* Enqueue the immediate descendents in the level order queue. */
+ /* Enqueue the immediate descendants in the level order queue. */
enqueue(curr->links, &last);
curr->shift = kwset->mind;
curr->maxshift = kwset->mind;
- /* Update the delta table for the descendents of this node. */
+ /* Update the delta table for the descendants of this node. */
treedelta(curr->links, curr->depth, delta);
- /* Compute the failure function for the decendents of this node. */
+ /* Compute the failure function for the descendants of this node. */
treefails(curr->links, curr->fail, kwset->trie);
/* Update the shifts at each node in the current node's chain
@@ -456,7 +456,7 @@ kwsprep (kwset_t kws)
fail->shift = curr->depth - fail->depth;
/* If the current node is accepting then the shift at the
- fail and its descendents should be no larger than the
+ fail and its descendants should be no larger than the
difference of their depths. */
if (curr->accepting && fail->maxshift > curr->depth - fail->depth)
fail->maxshift = curr->depth - fail->depth;