Lines Matching defs:key

84  *	key = points back to the key that points to this notice,
93 struct key *key;
101 * a key points to a sublist of notices. a key has the following fields:
105 * left = points to the key immediately preceding this one.
106 * right = points to the key immediately following this one.
108 struct key { time_t time;
111 struct key *left;
112 struct key *right; };
122 struct index { struct key *key;
138 struct key *kprev, *k;
158 /* create first dummy key */
159 k = (struct key *)xmalloc(sizeof (struct key));
165 /* make notice point to key */
166 n->key = k;
179 k = (struct key *)xmalloc(sizeof (struct key));
186 n->key = k;
188 ind->key = k;
201 /* create last dummy key */
202 k = (struct key *)xmalloc(sizeof (struct key));
209 n->key = k;
212 ind->key = k;
236 struct key *k, *k2;
257 n->key = NULL;
261 while ((ind->key)->time <= time) ind = ind->right;
263 /* find the right key */
264 k = (ind->key)->left;
274 /* create a key which will point to notice n2 */
275 k2 = (struct key *)xmalloc(sizeof (struct key));
283 n2->key = k2; /* have n2 point back to k2 */
320 struct key *k, *kl, *kr;
331 if ((n->key != NULL) && ((n->key)->numnote == 1)) {
333 k = n->key;
337 } else { if (n->key != NULL) {
338 /* n has a key pointing to it */
339 (n->left)->key = n->key;
340 (n->key)->time = (n->left)->time;
341 (n->key)->notice = n->left; }
342 /* find the key that points to this sublist */
344 while (n2->key == NULL) n2 = n2->right;
345 k = n2->key;
355 /* delete the key to the left */
356 (kl->notice)->key = NULL;
364 /* delete this key */
365 (k->notice)->key = NULL;
381 k = (index->key)->left;
407 struct key *k, *fk;
415 while ((index->key)->time < current->time) {
418 k = index->key;
423 * remove the notice, key, and index corresponding
429 fk = fi->key;
440 k = ind->key;
458 /* insert the new dummy key */
476 /* now update the numnote field in the appropriate key */
478 while (n->key == NULL) n = n->right;
479 k = n->key;
481 /* if numnote = 0 then this key must be removed */
507 struct key *k, *k2;
513 k = ind->key;