Lines Matching refs:k
85 el_key_t *fk, *k;
89 k = il[icurr];
90 while (k->time < t) {
91 fk = k;
92 fn = k->notice;
100 k = il[(icurr + DU - 1) % DU];
101 if (k->time < INFINITY - DT) {
102 nt = k->time + DT; /* next key time */
106 while (k->time < nt) {
107 k = k->right;
109 n = k->notice->pred;
122 fk->count = k->count - c + 1;
123 fk->left = k->left;
124 fk->right = k;
125 k->left->right = fk;
126 k->left = fk;
127 k->count = c;
137 k = il[icurr];
165 el_key_t *k, *kleft;
197 k = (el_key_t *)malloc(sizeof (el_key_t));
198 if (k == NULL) {
201 k->time = LB;
202 k->count = 1;
203 k->notice = n;
204 k->left = NULL;
205 kleft = k;
207 n->key = k;
230 k = (el_key_t *)malloc(sizeof (el_key_t));
231 if (k == NULL) {
234 k->time = t;
235 k->count = 1;
236 k->notice = n;
237 k->left = kleft;
238 kleft->right = k;
239 kleft = k;
241 n->key = k;
243 il[i] = k;
259 k = (el_key_t *)malloc(sizeof (el_key_t));
260 if (k == NULL) {
263 k->time = INFINITY; /* the end of the world */
264 k->count = 1;
265 k->notice = n;
266 k->left = kleft;
267 k->right = NULL;
268 kleft->right = k;
270 n->key = k;
273 il[DU] = k;
305 el_key_t *k;
357 k = (il[i])->left;
358 while (k->time > t) {
359 k = k->left;
361 k = k->right;
364 if (k->count == NLIM) {
371 k->count = NLIM / 2;
372 x = k->notice;
379 y->right = k;
380 y->left = k->left;
381 k->left->right = y;
382 k->left = y;
389 k = y;
405 n = k->notice;
415 k->count ++;
466 el_key_t *k, *kl, *kr;
484 k = n->key;
485 if (k != NULL && k->count == 1) {
487 k->left->right = k->right;
488 k->right->left = k->left;
489 free(k);
491 if (k != NULL) {
492 k->notice = n->pred;
493 k->notice->key = k;
494 k->time = k->notice->time;
497 k = n2->key;
498 while (k == NULL) {
500 k = n2->key;
503 k->count --;
505 kl = k->left;
506 kr = k->right;
508 (kl->count + k->count) <= NLIM) {
510 k->count += kl->count;
511 k->left = kl->left;
512 k->left->right = k;
515 } else if (!k->notice->isdummy &&
516 (kr->count + k->count) <= NLIM) {
518 kr->count += k->count;
519 kr->left = k->left;
521 k->notice->key = NULL;
522 free(k);
567 el_key_t *k;
581 k = n->key;
582 k->count --;
585 if (k->count == 0) {
586 k->left->right = k->right;
587 k->right->left = k->left;
588 free(k);