94 Chapter 4
129 }
130
131 if (result < 0)
132 enter_one(new_node->right, data);
133 else
134 enter_one(new_node->left, data);
135 }
136
137 /************************************************
138 * tree::find_one -- find words that match this *
139 * one in the tree. *
140 ************************************************/
141 void tree::find_one(
142 const char start[], // Start of the work
143 const node *const top,// Top node
144 const bool look // Keep looking
145 )
146 {
147 if (top == NULL)
148 return; // short tree
149
150 // Result of checking our prefix
151 // against the word
152 int cmp = strncmp(start,
153 top->data, strlen(start));
154
155 if ((cmp < 0) && (look))
156 find_one(start, top->left, true);
157 else if ((cmp > 0) && (look))
158 find_one(start, top-> ...