Lines Matching defs:cfl
337 cfglist_t *cfl;
349 cfl = &cfp->cf_head->h_cfgs[table_index];
350 if (cfl->l_free < len) {
354 cfl->l_size + cfl->l_free, cfl->l_size +
355 cfl->l_free + newsize);
357 cfl->l_entry = (char *)realloc(cfl->l_entry, (cfl->l_size +
358 cfl->l_free + newsize) * sizeof (char));
359 if (cfl->l_entry == NULL) {
363 cfl->l_free += newsize;
366 cfl->l_free -= len;
369 if (cfl->l_nentry % DEFAULT_NENTRIES == 0) {
377 table_index, cfl->l_nentry);
379 cfl->l_esiz = (int *)
380 realloc(cfl->l_esiz, (cfl->l_nentry + DEFAULT_NENTRIES) *
382 if (cfl->l_esiz == NULL) {
389 cfl->l_esiz[cfl->l_nentry] = len;
390 cfl->l_nentry++;
393 q = cfl->l_entry + cfl->l_size;
400 hd->h_cfgsizes[table_index] = cfl->l_size;
425 cfglist_t *cfl;
428 cfl = &cfp->cf_head->h_cfgs[table_offset];
430 q = cfl->l_entry;
432 if (cfl->l_size == 0) {
443 q += cfl->l_esiz[i - 1];
444 if (i >= cfl->l_nentry) { /* end of list */
449 if (q >= cfl->l_entry + cfl->l_size)
452 len = cfl->l_esiz[i - 1];
465 if (!(p >= cfl->l_entry + cfl->l_size)) {
468 copylen = cfl->l_entry + cfl->l_size - p;
470 copylen = (cfl->l_nentry - i) * sizeof (int);
471 bcopy(&cfl->l_esiz[i], &cfl->l_esiz[i - 1], copylen);
475 cfl->l_nentry--;
477 cfl->l_esiz[cfl->l_nentry] = 0;
479 cfl->l_size -= len;
480 cfl->l_free += len;
482 p = cfl->l_entry + cfl->l_size;
483 bzero(p, cfl->l_free);
485 ch->h_cfgsizes[table_offset] = cfl->l_size;
509 cfglist_t *cfl;
516 cfl = &ch->h_cfgs[table_offset];
518 q = cfl->l_entry;
521 q += cfl->l_esiz[i - 1];
522 if (i >= cfl->l_nentry) /* end of list */
526 if (q >= cfl->l_entry + cfl->l_size)
548 cfglist_t *cfl;
557 cfl = &ch->h_cfgs[table_offset];
559 q = cfl->l_entry;
561 q += cfl->l_esiz[i - 1];
562 if (i >= cfl->l_nentry) /* end of list */
565 diff = len - cfl->l_esiz[i - 1];
567 if ((diff > 0) && (diff > cfl->l_free)) {
575 cfl->l_size + cfl->l_free, cfl->l_size +
576 cfl->l_free + newsize);
578 cfl->l_entry = (char *)realloc(cfl->l_entry,
579 (cfl->l_size + cfl->l_free + newsize) * sizeof (char));
580 if (cfl->l_entry == NULL) {
584 cfl->l_free += (DEFAULT_ENTRY_SIZE / 2);
587 q = cfl->l_entry;
589 q += cfl->l_esiz[i - 1];
590 if (i >= cfl->l_nentry) /* end of list */
595 p = q + cfl->l_esiz[i - 1]; /* next string */
596 cfl->l_esiz[i - 1] += diff; /* the new entry size */
599 bcopy(p, p + diff, (cfl->l_entry + cfl->l_size - p));
600 cfl->l_free -= diff; /* 0 - (-1) = 1 */
601 cfl->l_size += diff;
605 cfp->cf_head->h_cfgsizes[table_offset] = cfl->l_size; /* disk */
606 bzero((cfl->l_entry + cfl->l_size), cfl->l_free);