t 34 htags/incop.c char *t = lower, *end = lower + sizeof(lower); t 37 htags/incop.c if (t == end) t 43 htags/incop.c *t = tolower((unsigned char)*s); t 45 htags/incop.c } while (*t++ != '\0'); t 72 libdb/bt_close.c BTREE *t; t 75 libdb/bt_close.c t = dbp->internal; t 78 libdb/bt_close.c if (t->bt_pinned != NULL) { t 79 libdb/bt_close.c mpool_put(t->bt_mp, t->bt_pinned, 0); t 80 libdb/bt_close.c t->bt_pinned = NULL; t 93 libdb/bt_close.c if (mpool_close(t->bt_mp) == RET_ERROR) t 97 libdb/bt_close.c if (t->bt_cursor.key.data != NULL) { t 98 libdb/bt_close.c free(t->bt_cursor.key.data); t 99 libdb/bt_close.c t->bt_cursor.key.size = 0; t 100 libdb/bt_close.c t->bt_cursor.key.data = NULL; t 102 libdb/bt_close.c if (t->bt_rkey.data) { t 103 libdb/bt_close.c free(t->bt_rkey.data); t 104 libdb/bt_close.c t->bt_rkey.size = 0; t 105 libdb/bt_close.c t->bt_rkey.data = NULL; t 107 libdb/bt_close.c if (t->bt_rdata.data) { t 108 libdb/bt_close.c free(t->bt_rdata.data); t 109 libdb/bt_close.c t->bt_rdata.size = 0; t 110 libdb/bt_close.c t->bt_rdata.data = NULL; t 113 libdb/bt_close.c fd = t->bt_fd; t 114 libdb/bt_close.c free(t); t 132 libdb/bt_close.c BTREE *t; t 135 libdb/bt_close.c t = dbp->internal; t 138 libdb/bt_close.c if (t->bt_pinned != NULL) { t 139 libdb/bt_close.c mpool_put(t->bt_mp, t->bt_pinned, 0); t 140 libdb/bt_close.c t->bt_pinned = NULL; t 149 libdb/bt_close.c if (F_ISSET(t, B_INMEM | B_RDONLY) || !F_ISSET(t, B_MODIFIED)) t 152 libdb/bt_close.c if (F_ISSET(t, B_METADIRTY) && bt_meta(t) == RET_ERROR) t 155 libdb/bt_close.c if ((status = mpool_sync(t->bt_mp)) == RET_SUCCESS) t 156 libdb/bt_close.c F_CLR(t, B_MODIFIED); t 169 libdb/bt_close.c bt_meta(t) t 170 libdb/bt_close.c BTREE *t; t 175 libdb/bt_close.c if ((p = mpool_get(t->bt_mp, P_META, 0)) == NULL) t 181 libdb/bt_close.c m.psize = t->bt_psize; t 182 libdb/bt_close.c m.free = t->bt_free; t 183 libdb/bt_close.c m.nrecs = t->bt_nrecs; t 184 libdb/bt_close.c m.flags = F_ISSET(t, SAVEMETA); t 187 libdb/bt_close.c mpool_put(t->bt_mp, p, MPOOL_DIRTY); t 57 libdb/bt_conv.c __bt_pgin(t, pg, pp) t 58 libdb/bt_conv.c void *t; t 67 libdb/bt_conv.c if (!F_ISSET(((BTREE *)t), B_NEEDSWAP)) t 134 libdb/bt_conv.c __bt_pgout(t, pg, pp) t 135 libdb/bt_conv.c void *t; t 144 libdb/bt_conv.c if (!F_ISSET(((BTREE *)t), B_NEEDSWAP)) t 62 libdb/bt_debug.c BTREE *t; t 67 libdb/bt_debug.c t = dbp->internal; t 69 libdb/bt_debug.c F_ISSET(t, B_INMEM) ? "memory" : "disk", t->bt_psize); t 70 libdb/bt_debug.c if (F_ISSET(t, R_RECNO)) t 71 libdb/bt_debug.c (void)fprintf(stderr, " keys %lu", (long unsigned int)t->bt_nrecs); t 74 libdb/bt_debug.c if (F_ISSET(t, flag)) { \ t 78 libdb/bt_debug.c if (t->flags != 0) { t 90 libdb/bt_debug.c for (i = P_ROOT; (h = mpool_get(t->bt_mp, i, 0)) != NULL; ++i) { t 92 libdb/bt_debug.c (void)mpool_put(t->bt_mp, h, 0); t 140 libdb/bt_debug.c BTREE *t; t 143 libdb/bt_debug.c t = dbp->internal; t 144 libdb/bt_debug.c if ((h = mpool_get(t->bt_mp, pgno, 0)) != NULL) { t 146 libdb/bt_debug.c (void)mpool_put(t->bt_mp, h, 0); t 254 libdb/bt_debug.c BTREE *t; t 260 libdb/bt_debug.c t = dbp->internal; t 263 libdb/bt_debug.c for (i = P_ROOT; (h = mpool_get(t->bt_mp, i, 0)) != NULL; ++i) { t 280 libdb/bt_debug.c (void)mpool_put(t->bt_mp, h, 0); t 285 libdb/bt_debug.c h = mpool_get(t->bt_mp, i, 0); t 289 libdb/bt_debug.c (void)mpool_put(t->bt_mp, h, 0); t 292 libdb/bt_debug.c i = F_ISSET(t, R_RECNO) ? t 295 libdb/bt_debug.c (void)mpool_put(t->bt_mp, h, 0); t 300 libdb/bt_debug.c if (F_ISSET(t, R_RECNO)) t 301 libdb/bt_debug.c (void)fprintf(stderr, " (%ld header count)", (long int)t->bt_nrecs); t 309 libdb/bt_debug.c pleaf *= t->bt_psize - BTDATAOFF; t 315 libdb/bt_debug.c pinternal *= t->bt_psize - BTDATAOFF; t 71 libdb/bt_delete.c BTREE *t; t 76 libdb/bt_delete.c t = dbp->internal; t 79 libdb/bt_delete.c if (t->bt_pinned != NULL) { t 80 libdb/bt_delete.c mpool_put(t->bt_mp, t->bt_pinned, 0); t 81 libdb/bt_delete.c t->bt_pinned = NULL; t 85 libdb/bt_delete.c if (F_ISSET(t, B_RDONLY)) { t 92 libdb/bt_delete.c status = __bt_bdelete(t, key); t 99 libdb/bt_delete.c c = &t->bt_cursor; t 103 libdb/bt_delete.c if ((h = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL) t 111 libdb/bt_delete.c if (__bt_stkacq(t, &h, &t->bt_cursor)) t 114 libdb/bt_delete.c status = __bt_dleaf(t, NULL, h, c->pg.index); t 117 libdb/bt_delete.c if (__bt_pdelete(t, h)) t 120 libdb/bt_delete.c mpool_put(t->bt_mp, t 130 libdb/bt_delete.c F_SET(t, B_MODIFIED); t 145 libdb/bt_delete.c __bt_stkacq(t, hp, c) t 146 libdb/bt_delete.c BTREE *t; t 164 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 165 libdb/bt_delete.c if ((e = __bt_search(t, &c->key, &exact)) == NULL) t 182 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 185 libdb/bt_delete.c for (level = 0; (parent = BT_POP(t)) != NULL; ++level) { t 187 libdb/bt_delete.c if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL) t 193 libdb/bt_delete.c BT_PUSH(t, h->pgno, index); t 196 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 204 libdb/bt_delete.c BT_PUSH(t, pgno, 0); t 207 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 210 libdb/bt_delete.c if ((h = mpool_get(t->bt_mp, pgno, 0)) == NULL) t 214 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 215 libdb/bt_delete.c if ((h = mpool_get(t->bt_mp, nextpg, 0)) == NULL) t 223 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 224 libdb/bt_delete.c if ((e = __bt_search(t, &c->key, &exact)) == NULL) t 237 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 240 libdb/bt_delete.c for (level = 0; (parent = BT_POP(t)) != NULL; ++level) { t 242 libdb/bt_delete.c if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL) t 248 libdb/bt_delete.c BT_PUSH(t, h->pgno, index); t 251 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 261 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 264 libdb/bt_delete.c if ((h = mpool_get(t->bt_mp, pgno, 0)) == NULL) t 268 libdb/bt_delete.c BT_PUSH(t, pgno, index); t 270 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 271 libdb/bt_delete.c if ((h = mpool_get(t->bt_mp, prevpg, 0)) == NULL) t 276 libdb/bt_delete.c ret: mpool_put(t->bt_mp, h, 0); t 277 libdb/bt_delete.c return ((*hp = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL); t 290 libdb/bt_delete.c __bt_bdelete(t, key) t 291 libdb/bt_delete.c BTREE *t; t 301 libdb/bt_delete.c loop: if ((e = __bt_search(t, key, &exact)) == NULL) t 304 libdb/bt_delete.c mpool_put(t->bt_mp, e->page, 0); t 316 libdb/bt_delete.c if (__bt_dleaf(t, key, h, e->index)) { t 317 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 320 libdb/bt_delete.c if (F_ISSET(t, B_NODUPS)) { t 322 libdb/bt_delete.c if (__bt_pdelete(t, h)) t 325 libdb/bt_delete.c mpool_put(t->bt_mp, h, MPOOL_DIRTY); t 329 libdb/bt_delete.c } while (e->index < NEXTINDEX(h) && __bt_cmp(t, key, e) == 0); t 337 libdb/bt_delete.c if (__bt_cmp(t, key, e) != 0) t 339 libdb/bt_delete.c if (__bt_dleaf(t, key, h, e->index) == RET_ERROR) { t 340 libdb/bt_delete.c mpool_put(t->bt_mp, h, 0); t 349 libdb/bt_delete.c if (__bt_pdelete(t, h)) t 355 libdb/bt_delete.c mpool_put(t->bt_mp, h, MPOOL_DIRTY); t 375 libdb/bt_delete.c __bt_pdelete(t, h) t 376 libdb/bt_delete.c BTREE *t; t 398 libdb/bt_delete.c while ((parent = BT_POP(t)) != NULL) { t 400 libdb/bt_delete.c if ((pg = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL) t 408 libdb/bt_delete.c __ovfl_delete(t, bi->bytes) == RET_ERROR) { t 409 libdb/bt_delete.c mpool_put(t->bt_mp, pg, 0); t 421 libdb/bt_delete.c pg->upper = t->bt_psize; t 424 libdb/bt_delete.c if (__bt_relink(t, pg) || __bt_free(t, pg)) t 445 libdb/bt_delete.c mpool_put(t->bt_mp, pg, MPOOL_DIRTY); t 451 libdb/bt_delete.c mpool_put(t->bt_mp, h, MPOOL_DIRTY); t 454 libdb/bt_delete.c return (__bt_relink(t, h) || __bt_free(t, h)); t 469 libdb/bt_delete.c __bt_dleaf(t, key, h, index) t 470 libdb/bt_delete.c BTREE *t; t 482 libdb/bt_delete.c if (F_ISSET(&t->bt_cursor, CURS_INIT) && t 483 libdb/bt_delete.c !F_ISSET(&t->bt_cursor, CURS_ACQUIRE) && t 484 libdb/bt_delete.c t->bt_cursor.pg.pgno == h->pgno && t->bt_cursor.pg.index == index && t 485 libdb/bt_delete.c __bt_curdel(t, key, h, index)) t 490 libdb/bt_delete.c if (bl->flags & P_BIGKEY && __ovfl_delete(t, bl->bytes) == RET_ERROR) t 493 libdb/bt_delete.c __ovfl_delete(t, bl->bytes + bl->ksize) == RET_ERROR) t 512 libdb/bt_delete.c if (F_ISSET(&t->bt_cursor, CURS_INIT) && t 513 libdb/bt_delete.c !F_ISSET(&t->bt_cursor, CURS_ACQUIRE) && t 514 libdb/bt_delete.c t->bt_cursor.pg.pgno == h->pgno && t->bt_cursor.pg.index > index) t 515 libdb/bt_delete.c --t->bt_cursor.pg.index; t 532 libdb/bt_delete.c __bt_curdel(t, key, h, index) t 533 libdb/bt_delete.c BTREE *t; t 547 libdb/bt_delete.c c = &t->bt_cursor; t 551 libdb/bt_delete.c if (!F_ISSET(t, B_NODUPS)) { t 560 libdb/bt_delete.c if ((status = __bt_ret(t, &e, t 570 libdb/bt_delete.c if (__bt_cmp(t, key, &e) == 0) { t 579 libdb/bt_delete.c if (__bt_cmp(t, key, &e) == 0) { t 586 libdb/bt_delete.c if ((pg = mpool_get(t->bt_mp, h->prevpg, 0)) == NULL) t 590 libdb/bt_delete.c if (__bt_cmp(t, key, &e) == 0) { t 594 libdb/bt_delete.c mpool_put(t->bt_mp, pg, 0); t 598 libdb/bt_delete.c if ((pg = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL) t 602 libdb/bt_delete.c if (__bt_cmp(t, key, &e) == 0) { t 604 libdb/bt_delete.c dup1: mpool_put(t->bt_mp, pg, 0); t 609 libdb/bt_delete.c mpool_put(t->bt_mp, pg, 0); t 615 libdb/bt_delete.c __bt_ret(t, &e, &c->key, &c->key, NULL, NULL, 1)) == RET_SUCCESS) { t 630 libdb/bt_delete.c __bt_relink(t, h) t 631 libdb/bt_delete.c BTREE *t; t 637 libdb/bt_delete.c if ((pg = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL) t 640 libdb/bt_delete.c mpool_put(t->bt_mp, pg, MPOOL_DIRTY); t 643 libdb/bt_delete.c if ((pg = mpool_get(t->bt_mp, h->prevpg, 0)) == NULL) t 646 libdb/bt_delete.c mpool_put(t->bt_mp, pg, MPOOL_DIRTY); t 66 libdb/bt_get.c BTREE *t; t 70 libdb/bt_get.c t = dbp->internal; t 73 libdb/bt_get.c if (t->bt_pinned != NULL) { t 74 libdb/bt_get.c mpool_put(t->bt_mp, t->bt_pinned, 0); t 75 libdb/bt_get.c t->bt_pinned = NULL; t 84 libdb/bt_get.c if ((e = __bt_search(t, key, &exact)) == NULL) t 87 libdb/bt_get.c mpool_put(t->bt_mp, e->page, 0); t 91 libdb/bt_get.c status = __bt_ret(t, e, NULL, NULL, data, &t->bt_rdata, 0); t 97 libdb/bt_get.c if (F_ISSET(t, B_DB_LOCK)) t 98 libdb/bt_get.c mpool_put(t->bt_mp, e->page, 0); t 100 libdb/bt_get.c t->bt_pinned = e->page; t 110 libdb/bt_open.c BTREE *t; t 117 libdb/bt_open.c t = NULL; t 175 libdb/bt_open.c if ((t = (BTREE *)malloc(sizeof(BTREE))) == NULL) t 177 libdb/bt_open.c memset(t, 0, sizeof(BTREE)); t 178 libdb/bt_open.c t->bt_fd = -1; /* Don't close unopened fd on error. */ t 179 libdb/bt_open.c t->bt_lorder = b.lorder; t 180 libdb/bt_open.c t->bt_order = NOT; t 181 libdb/bt_open.c t->bt_cmp = b.compare; t 182 libdb/bt_open.c t->bt_pfx = b.prefix; t 183 libdb/bt_open.c t->bt_rfd = -1; t 185 libdb/bt_open.c if ((t->bt_dbp = dbp = (DB *)malloc(sizeof(DB))) == NULL) t 187 libdb/bt_open.c memset(t->bt_dbp, 0, sizeof(DB)); t 188 libdb/bt_open.c if (t->bt_lorder != machine_lorder) t 189 libdb/bt_open.c F_SET(t, B_NEEDSWAP); t 192 libdb/bt_open.c dbp->internal = t; t 208 libdb/bt_open.c F_SET(t, B_RDONLY); t 217 libdb/bt_open.c if ((t->bt_fd = open(fname, flags, mode)) < 0) t 223 libdb/bt_open.c if ((t->bt_fd = tmp()) == -1) t 225 libdb/bt_open.c F_SET(t, B_INMEM); t 229 libdb/bt_open.c if (fcntl(t->bt_fd, F_SETFD, 1) == -1) t 233 libdb/bt_open.c if (fstat(t->bt_fd, &sb)) t 236 libdb/bt_open.c if ((nr = read(t->bt_fd, &m, sizeof(BTMETA))) < 0) t 250 libdb/bt_open.c F_CLR(t, B_NEEDSWAP); t 252 libdb/bt_open.c F_SET(t, B_NEEDSWAP); t 268 libdb/bt_open.c F_SET(t, m.flags); t 269 libdb/bt_open.c t->bt_free = m.free; t 270 libdb/bt_open.c t->bt_nrecs = m.nrecs; t 290 libdb/bt_open.c F_SET(t, B_NODUPS); t 292 libdb/bt_open.c t->bt_free = P_INVALID; t 293 libdb/bt_open.c t->bt_nrecs = 0; t 294 libdb/bt_open.c F_SET(t, B_METADIRTY); t 297 libdb/bt_open.c t->bt_psize = b.psize; t 306 libdb/bt_open.c ncache = (b.cachesize + t->bt_psize - 1) / t->bt_psize; t 319 libdb/bt_open.c t->bt_ovflsize = (t->bt_psize - BTDATAOFF) / b.minkeypage - t 321 libdb/bt_open.c if (t->bt_ovflsize < NBLEAFDBT(NOVFLSIZE, NOVFLSIZE) + sizeof(indx_t)) t 322 libdb/bt_open.c t->bt_ovflsize = t 326 libdb/bt_open.c if ((t->bt_mp = t 327 libdb/bt_open.c mpool_open(NULL, t->bt_fd, t->bt_psize, ncache)) == NULL) t 329 libdb/bt_open.c if (!F_ISSET(t, B_INMEM)) t 330 libdb/bt_open.c mpool_filter(t->bt_mp, __bt_pgin, __bt_pgout, t); t 333 libdb/bt_open.c if (nroot(t) == RET_ERROR) t 338 libdb/bt_open.c F_SET(t, B_DB_LOCK); t 340 libdb/bt_open.c F_SET(t, B_DB_SHMEM); t 342 libdb/bt_open.c F_SET(t, B_DB_TXN); t 352 libdb/bt_open.c err: if (t) { t 353 libdb/bt_open.c if (t->bt_dbp) t 354 libdb/bt_open.c free(t->bt_dbp); t 355 libdb/bt_open.c if (t->bt_fd != -1) t 356 libdb/bt_open.c (void)close(t->bt_fd); t 357 libdb/bt_open.c free(t); t 370 libdb/bt_open.c nroot(t) t 371 libdb/bt_open.c BTREE *t; t 376 libdb/bt_open.c if ((meta = mpool_get(t->bt_mp, 0, 0)) != NULL) { t 377 libdb/bt_open.c mpool_put(t->bt_mp, meta, 0); t 384 libdb/bt_open.c if ((meta = mpool_new(t->bt_mp, &npg)) == NULL) t 387 libdb/bt_open.c if ((root = mpool_new(t->bt_mp, &npg)) == NULL) t 395 libdb/bt_open.c root->upper = t->bt_psize; t 397 libdb/bt_open.c memset(meta, 0, t->bt_psize); t 398 libdb/bt_open.c mpool_put(t->bt_mp, meta, MPOOL_DIRTY); t 399 libdb/bt_open.c mpool_put(t->bt_mp, root, MPOOL_DIRTY); t 455 libdb/bt_open.c BTREE *t; t 457 libdb/bt_open.c t = dbp->internal; t 460 libdb/bt_open.c if (t->bt_pinned != NULL) { t 461 libdb/bt_open.c mpool_put(t->bt_mp, t->bt_pinned, 0); t 462 libdb/bt_open.c t->bt_pinned = NULL; t 466 libdb/bt_open.c if (F_ISSET(t, B_INMEM)) { t 470 libdb/bt_open.c return (t->bt_fd); t 83 libdb/bt_overflow.c __ovfl_get(t, p, ssz, buf, bufsz) t 84 libdb/bt_overflow.c BTREE *t; t 115 libdb/bt_overflow.c plen = t->bt_psize - BTDATAOFF; t 117 libdb/bt_overflow.c if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) t 122 libdb/bt_overflow.c mpool_put(t->bt_mp, h, 0); t 140 libdb/bt_overflow.c __ovfl_put(t, dbt, pg) t 141 libdb/bt_overflow.c BTREE *t; t 155 libdb/bt_overflow.c plen = t->bt_psize - BTDATAOFF; t 158 libdb/bt_overflow.c if ((h = __bt_new(t, &npg)) == NULL) t 171 libdb/bt_overflow.c mpool_put(t->bt_mp, last, MPOOL_DIRTY); t 176 libdb/bt_overflow.c mpool_put(t->bt_mp, h, MPOOL_DIRTY); t 192 libdb/bt_overflow.c __ovfl_delete(t, p) t 193 libdb/bt_overflow.c BTREE *t; t 208 libdb/bt_overflow.c if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) t 213 libdb/bt_overflow.c mpool_put(t->bt_mp, h, 0); t 218 libdb/bt_overflow.c for (plen = t->bt_psize - BTDATAOFF;; sz -= plen) { t 220 libdb/bt_overflow.c __bt_free(t, h); t 223 libdb/bt_overflow.c if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) t 57 libdb/bt_page.c __bt_free(t, h) t 58 libdb/bt_page.c BTREE *t; t 63 libdb/bt_page.c h->nextpg = t->bt_free; t 64 libdb/bt_page.c t->bt_free = h->pgno; t 65 libdb/bt_page.c F_SET(t, B_METADIRTY); t 68 libdb/bt_page.c return (mpool_put(t->bt_mp, h, MPOOL_DIRTY)); t 81 libdb/bt_page.c __bt_new(t, npg) t 82 libdb/bt_page.c BTREE *t; t 87 libdb/bt_page.c if (t->bt_free != P_INVALID && t 88 libdb/bt_page.c (h = mpool_get(t->bt_mp, t->bt_free, 0)) != NULL) { t 89 libdb/bt_page.c *npg = t->bt_free; t 90 libdb/bt_page.c t->bt_free = h->nextpg; t 91 libdb/bt_page.c F_SET(t, B_METADIRTY); t 94 libdb/bt_page.c return (mpool_new(t->bt_mp, npg)); t 77 libdb/bt_put.c BTREE *t; t 87 libdb/bt_put.c t = dbp->internal; t 90 libdb/bt_put.c if (t->bt_pinned != NULL) { t 91 libdb/bt_put.c mpool_put(t->bt_mp, t->bt_pinned, 0); t 92 libdb/bt_put.c t->bt_pinned = NULL; t 96 libdb/bt_put.c if (F_ISSET(t, B_RDONLY)) { t 110 libdb/bt_put.c if (F_ISSET(&t->bt_cursor, CURS_INIT) && t 111 libdb/bt_put.c !F_ISSET(&t->bt_cursor, t 129 libdb/bt_put.c if (key->size + data->size > t->bt_ovflsize) { t 130 libdb/bt_put.c if (key->size > t->bt_ovflsize) { t 131 libdb/bt_put.c storekey: if (__ovfl_put(t, key, &pg) == RET_ERROR) t 141 libdb/bt_put.c if (key->size + data->size > t->bt_ovflsize) { t 142 libdb/bt_put.c if (__ovfl_put(t, data, &pg) == RET_ERROR) t 152 libdb/bt_put.c if (key->size + data->size > t->bt_ovflsize) t 158 libdb/bt_put.c if ((h = mpool_get(t->bt_mp, t->bt_cursor.pg.pgno, 0)) == NULL) t 160 libdb/bt_put.c index = t->bt_cursor.pg.index; t 168 libdb/bt_put.c if (t->bt_order == NOT || (e = bt_fast(t, key, data, &exact)) == NULL) t 169 libdb/bt_put.c if ((e = __bt_search(t, key, &exact)) == NULL) t 184 libdb/bt_put.c mpool_put(t->bt_mp, h, 0); t 187 libdb/bt_put.c if (!exact || !F_ISSET(t, B_NODUPS)) t 194 libdb/bt_put.c delete: if (__bt_dleaf(t, key, h, index) == RET_ERROR) { t 195 libdb/bt_put.c mpool_put(t->bt_mp, h, 0); t 209 libdb/bt_put.c if ((status = __bt_split(t, h, key, t 225 libdb/bt_put.c if (F_ISSET(&t->bt_cursor, CURS_INIT) && t 226 libdb/bt_put.c !F_ISSET(&t->bt_cursor, CURS_ACQUIRE) && t 227 libdb/bt_put.c t->bt_cursor.pg.pgno == h->pgno && t->bt_cursor.pg.index >= index) t 228 libdb/bt_put.c ++t->bt_cursor.pg.index; t 230 libdb/bt_put.c if (t->bt_order == NOT) { t 233 libdb/bt_put.c t->bt_order = FORWARD; t 234 libdb/bt_put.c t->bt_last.index = index; t 235 libdb/bt_put.c t->bt_last.pgno = h->pgno; t 239 libdb/bt_put.c t->bt_order = BACK; t 240 libdb/bt_put.c t->bt_last.index = 0; t 241 libdb/bt_put.c t->bt_last.pgno = h->pgno; t 245 libdb/bt_put.c mpool_put(t->bt_mp, h, MPOOL_DIRTY); t 249 libdb/bt_put.c __bt_setcur(t, e->page->pgno, e->index); t 251 libdb/bt_put.c F_SET(t, B_MODIFIED); t 268 libdb/bt_put.c bt_fast(t, key, data, exactp) t 269 libdb/bt_put.c BTREE *t; t 277 libdb/bt_put.c if ((h = mpool_get(t->bt_mp, t->bt_last.pgno, 0)) == NULL) { t 278 libdb/bt_put.c t->bt_order = NOT; t 281 libdb/bt_put.c t->bt_cur.page = h; t 282 libdb/bt_put.c t->bt_cur.index = t->bt_last.index; t 292 libdb/bt_put.c if (t->bt_order == FORWARD) { t 293 libdb/bt_put.c if (t->bt_cur.page->nextpg != P_INVALID) t 295 libdb/bt_put.c if (t->bt_cur.index != NEXTINDEX(h) - 1) t 297 libdb/bt_put.c if ((cmp = __bt_cmp(t, key, &t->bt_cur)) < 0) t 299 libdb/bt_put.c t->bt_last.index = cmp ? ++t->bt_cur.index : t->bt_cur.index; t 301 libdb/bt_put.c if (t->bt_cur.page->prevpg != P_INVALID) t 303 libdb/bt_put.c if (t->bt_cur.index != 0) t 305 libdb/bt_put.c if ((cmp = __bt_cmp(t, key, &t->bt_cur)) > 0) t 307 libdb/bt_put.c t->bt_last.index = 0; t 313 libdb/bt_put.c return (&t->bt_cur); t 319 libdb/bt_put.c t->bt_order = NOT; t 320 libdb/bt_put.c mpool_put(t->bt_mp, h, 0); t 64 libdb/bt_search.c __bt_search(t, key, exactp) t 65 libdb/bt_search.c BTREE *t; t 74 libdb/bt_search.c BT_CLR(t); t 76 libdb/bt_search.c if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) t 80 libdb/bt_search.c t->bt_cur.page = h; t 82 libdb/bt_search.c t->bt_cur.index = index = base + (lim >> 1); t 83 libdb/bt_search.c if ((cmp = __bt_cmp(t, key, &t->bt_cur)) == 0) { t 86 libdb/bt_search.c return (&t->bt_cur); t 105 libdb/bt_search.c if (!F_ISSET(t, B_NODUPS)) { t 108 libdb/bt_search.c __bt_sprev(t, h, key, exactp)) t 109 libdb/bt_search.c return (&t->bt_cur); t 112 libdb/bt_search.c __bt_snext(t, h, key, exactp)) t 113 libdb/bt_search.c return (&t->bt_cur); t 116 libdb/bt_search.c t->bt_cur.index = base; t 117 libdb/bt_search.c return (&t->bt_cur); t 129 libdb/bt_search.c next: BT_PUSH(t, h->pgno, index); t 131 libdb/bt_search.c mpool_put(t->bt_mp, h, 0); t 148 libdb/bt_search.c __bt_snext(t, h, key, exactp) t 149 libdb/bt_search.c BTREE *t; t 160 libdb/bt_search.c if ((e.page = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL) t 163 libdb/bt_search.c if (__bt_cmp(t, key, &e) == 0) { t 164 libdb/bt_search.c mpool_put(t->bt_mp, h, 0); t 165 libdb/bt_search.c t->bt_cur = e; t 169 libdb/bt_search.c mpool_put(t->bt_mp, e.page, 0); t 186 libdb/bt_search.c __bt_sprev(t, h, key, exactp) t 187 libdb/bt_search.c BTREE *t; t 198 libdb/bt_search.c if ((e.page = mpool_get(t->bt_mp, h->prevpg, 0)) == NULL) t 201 libdb/bt_search.c if (__bt_cmp(t, key, &e) == 0) { t 202 libdb/bt_search.c mpool_put(t->bt_mp, h, 0); t 203 libdb/bt_search.c t->bt_cur = e; t 207 libdb/bt_search.c mpool_put(t->bt_mp, e.page, 0); t 83 libdb/bt_seq.c BTREE *t; t 87 libdb/bt_seq.c t = dbp->internal; t 90 libdb/bt_seq.c if (t->bt_pinned != NULL) { t 91 libdb/bt_seq.c mpool_put(t->bt_mp, t->bt_pinned, 0); t 92 libdb/bt_seq.c t->bt_pinned = NULL; t 103 libdb/bt_seq.c if (F_ISSET(&t->bt_cursor, CURS_INIT)) { t 104 libdb/bt_seq.c status = __bt_seqadv(t, &e, flags); t 111 libdb/bt_seq.c status = __bt_seqset(t, &e, key, flags); t 119 libdb/bt_seq.c __bt_setcur(t, e.page->pgno, e.index); t 122 libdb/bt_seq.c __bt_ret(t, &e, key, &t->bt_rkey, data, &t->bt_rdata, 0); t 128 libdb/bt_seq.c if (F_ISSET(t, B_DB_LOCK)) t 129 libdb/bt_seq.c mpool_put(t->bt_mp, e.page, 0); t 131 libdb/bt_seq.c t->bt_pinned = e.page; t 152 libdb/bt_seq.c __bt_seqset(t, ep, key, flags) t 153 libdb/bt_seq.c BTREE *t; t 177 libdb/bt_seq.c return (__bt_first(t, key, ep, &exact)); t 182 libdb/bt_seq.c if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) t 187 libdb/bt_seq.c mpool_put(t->bt_mp, h, 0); t 194 libdb/bt_seq.c mpool_put(t->bt_mp, h, 0); t 203 libdb/bt_seq.c if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) t 208 libdb/bt_seq.c mpool_put(t->bt_mp, h, 0); t 215 libdb/bt_seq.c mpool_put(t->bt_mp, h, 0); t 240 libdb/bt_seq.c __bt_seqadv(t, ep, flags) t 241 libdb/bt_seq.c BTREE *t; t 255 libdb/bt_seq.c c = &t->bt_cursor; t 266 libdb/bt_seq.c return (__bt_first(t, &c->key, ep, &exact)); t 269 libdb/bt_seq.c if ((h = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL) t 288 libdb/bt_seq.c mpool_put(t->bt_mp, h, 0); t 291 libdb/bt_seq.c if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) t 311 libdb/bt_seq.c mpool_put(t->bt_mp, h, 0); t 314 libdb/bt_seq.c if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) t 341 libdb/bt_seq.c __bt_first(t, key, erval, exactp) t 342 libdb/bt_seq.c BTREE *t; t 359 libdb/bt_seq.c if ((ep = __bt_search(t, key, exactp)) == NULL) t 362 libdb/bt_seq.c if (F_ISSET(t, B_NODUPS)) { t 376 libdb/bt_seq.c mpool_put(t->bt_mp, save.page, 0); t 390 libdb/bt_seq.c mpool_put(t->bt_mp, h, 0); t 391 libdb/bt_seq.c if ((h = mpool_get(t->bt_mp, t 394 libdb/bt_seq.c mpool_put(t->bt_mp, t 402 libdb/bt_seq.c } while (__bt_cmp(t, key, ep) == 0); t 410 libdb/bt_seq.c mpool_put(t->bt_mp, h, 0); t 420 libdb/bt_seq.c mpool_put(t->bt_mp, h, 0); t 423 libdb/bt_seq.c if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) t 441 libdb/bt_seq.c __bt_setcur(t, pgno, index) t 442 libdb/bt_seq.c BTREE *t; t 447 libdb/bt_seq.c if (t->bt_cursor.key.data != NULL) { t 448 libdb/bt_seq.c free(t->bt_cursor.key.data); t 449 libdb/bt_seq.c t->bt_cursor.key.size = 0; t 450 libdb/bt_seq.c t->bt_cursor.key.data = NULL; t 452 libdb/bt_seq.c F_CLR(&t->bt_cursor, CURS_ACQUIRE | CURS_AFTER | CURS_BEFORE); t 455 libdb/bt_seq.c t->bt_cursor.pg.pgno = pgno; t 456 libdb/bt_seq.c t->bt_cursor.pg.index = index; t 457 libdb/bt_seq.c F_SET(&t->bt_cursor, CURS_INIT); t 82 libdb/bt_split.c __bt_split(t, sp, key, data, flags, ilen, argskip) t 83 libdb/bt_split.c BTREE *t; t 109 libdb/bt_split.c bt_root(t, sp, &l, &r, &skip, ilen) : t 110 libdb/bt_split.c bt_page(t, sp, &l, &r, &skip, ilen); t 120 libdb/bt_split.c if (F_ISSET(t, R_RECNO)) t 127 libdb/bt_split.c (F_ISSET(t, R_RECNO) ? t 128 libdb/bt_split.c bt_rroot(t, sp, l, r) : bt_broot(t, sp, l, r)) == RET_ERROR) t 154 libdb/bt_split.c while ((parent = BT_POP(t)) != NULL) { t 159 libdb/bt_split.c if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL) t 190 libdb/bt_split.c if (t->bt_pfx && !(bl->flags & P_BIGKEY) && t 197 libdb/bt_split.c nksize = t->bt_pfx(&a, &b); t 221 libdb/bt_split.c bt_root(t, h, &l, &r, &skip, nbytes) : t 222 libdb/bt_split.c bt_page(t, h, &l, &r, &skip, nbytes); t 249 libdb/bt_split.c bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR) t 294 libdb/bt_split.c mpool_put(t->bt_mp, h, MPOOL_DIRTY); t 300 libdb/bt_split.c (F_ISSET(t, R_RECNO) ? t 301 libdb/bt_split.c bt_rroot(t, sp, l, r) : bt_broot(t, sp, l, r)) == RET_ERROR) t 304 libdb/bt_split.c mpool_put(t->bt_mp, lchild, MPOOL_DIRTY); t 305 libdb/bt_split.c mpool_put(t->bt_mp, rchild, MPOOL_DIRTY); t 309 libdb/bt_split.c mpool_put(t->bt_mp, l, MPOOL_DIRTY); t 310 libdb/bt_split.c mpool_put(t->bt_mp, r, MPOOL_DIRTY); t 320 libdb/bt_split.c err1: mpool_put(t->bt_mp, lchild, MPOOL_DIRTY); t 321 libdb/bt_split.c mpool_put(t->bt_mp, rchild, MPOOL_DIRTY); t 323 libdb/bt_split.c err2: mpool_put(t->bt_mp, l, 0); t 324 libdb/bt_split.c mpool_put(t->bt_mp, r, 0); t 325 libdb/bt_split.c __dbpanic(t->bt_dbp); t 343 libdb/bt_split.c bt_page(t, h, lp, rp, skip, ilen) t 344 libdb/bt_split.c BTREE *t; t 356 libdb/bt_split.c if ((r = __bt_new(t, &npg)) == NULL) t 360 libdb/bt_split.c r->upper = t->bt_psize; t 388 libdb/bt_split.c if ((l = (PAGE *)malloc(t->bt_psize)) == NULL) { t 389 libdb/bt_split.c mpool_put(t->bt_mp, r, 0); t 393 libdb/bt_split.c memset(l, 0xff, t->bt_psize); t 399 libdb/bt_split.c l->upper = t->bt_psize; t 404 libdb/bt_split.c if ((tp = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL) { t 410 libdb/bt_split.c mpool_put(t->bt_mp, tp, MPOOL_DIRTY); t 420 libdb/bt_split.c tp = bt_psplit(t, h, l, r, skip, ilen); t 423 libdb/bt_split.c memmove(h, l, t->bt_psize); t 447 libdb/bt_split.c bt_root(t, h, lp, rp, skip, ilen) t 448 libdb/bt_split.c BTREE *t; t 461 libdb/bt_split.c if ((l = __bt_new(t, &lnpg)) == NULL || t 462 libdb/bt_split.c (r = __bt_new(t, &rnpg)) == NULL) t 470 libdb/bt_split.c l->upper = r->upper = t->bt_psize; t 474 libdb/bt_split.c tp = bt_psplit(t, h, l, r, skip, ilen); t 493 libdb/bt_split.c bt_rroot(t, h, l, r) t 494 libdb/bt_split.c BTREE *t; t 500 libdb/bt_split.c h->linp[0] = h->upper = t->bt_psize - NRINTERNAL; t 515 libdb/bt_split.c mpool_put(t->bt_mp, h, MPOOL_DIRTY); t 532 libdb/bt_split.c bt_broot(t, h, l, r) t 533 libdb/bt_split.c BTREE *t; t 550 libdb/bt_split.c h->linp[0] = h->upper = t->bt_psize - nbytes; t 568 libdb/bt_split.c bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR) t 589 libdb/bt_split.c mpool_put(t->bt_mp, h, MPOOL_DIRTY); t 608 libdb/bt_split.c bt_psplit(t, h, l, r, pskip, ilen) t 609 libdb/bt_split.c BTREE *t; t 632 libdb/bt_split.c full = t->bt_psize - BTDATAOFF; t 707 libdb/bt_split.c c = &t->bt_cursor; t 785 libdb/bt_split.c bt_preserve(t, pg) t 786 libdb/bt_split.c BTREE *t; t 791 libdb/bt_split.c if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) t 794 libdb/bt_split.c mpool_put(t->bt_mp, h, MPOOL_DIRTY); t 69 libdb/bt_utils.c __bt_ret(t, e, key, rkey, data, rdata, copy) t 70 libdb/bt_utils.c BTREE *t; t 89 libdb/bt_utils.c if (__ovfl_get(t, bl->bytes, t 93 libdb/bt_utils.c } else if (copy || F_ISSET(t, B_DB_LOCK)) { t 115 libdb/bt_utils.c if (__ovfl_get(t, bl->bytes + bl->ksize, t 119 libdb/bt_utils.c } else if (copy || F_ISSET(t, B_DB_LOCK)) { t 154 libdb/bt_utils.c __bt_cmp(t, k1, e) t 155 libdb/bt_utils.c BTREE *t; t 196 libdb/bt_utils.c if (__ovfl_get(t, bigkey, t 197 libdb/bt_utils.c &k2.size, &t->bt_rdata.data, &t->bt_rdata.size)) t 199 libdb/bt_utils.c k2.data = t->bt_rdata.data; t 201 libdb/bt_utils.c return ((*t->bt_cmp)(k1, &k2)); t 337 libdb/btree.h #define BT_PUSH(t, p, i) { \ t 338 libdb/btree.h t->bt_sp->pgno = p; \ t 339 libdb/btree.h t->bt_sp->index = i; \ t 340 libdb/btree.h ++t->bt_sp; \ t 342 libdb/btree.h #define BT_POP(t) (t->bt_sp == t->bt_stack ? NULL : --t->bt_sp) t 343 libdb/btree.h #define BT_CLR(t) (t->bt_sp = t->bt_stack) t 359 libglibc/regex.c #define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t))) t 360 libglibc/regex.c #define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t))) t 361 libglibc/regex.c #define RETALLOC_IF(addr, n, t) \ t 362 libglibc/regex.c if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t) t 363 libglibc/regex.c #define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t))) t 28 libutil/char.h #define test_chartype(c, t) (chartype[(unsigned char)(c)] & (t)) t 134 libutil/statistics.c STATISTICS_TIME *t; t 143 libutil/statistics.c t = check_malloc(offsetof(STATISTICS_TIME, name) + strbuf_getlen(sb) + 1); t 145 libutil/statistics.c t->name_len = strbuf_getlen(sb); t 146 libutil/statistics.c strcpy(t->name, strbuf_value(sb)); t 148 libutil/statistics.c GET_ELAPSED_TIME(&t->elapsed_start); t 151 libutil/statistics.c GET_CPU_TIME(&t->user_start, &t->system_start); t 154 libutil/statistics.c return t; t 158 libutil/statistics.c statistics_time_end(STATISTICS_TIME *t) t 167 libutil/statistics.c SUB_ELAPSED_TIME(&elapsed_end, &t->elapsed_start, &t->elapsed); t 171 libutil/statistics.c SUB_CPU_TIME(&user_end, &t->user_start, &t->user); t 172 libutil/statistics.c SUB_CPU_TIME(&system_end, &t->system_start, &t->system); t 174 libutil/statistics.c t->percent = (t->elapsed == 0) ? ( t 176 libutil/statistics.c (t->user + t->system == 0) ? NAN : t 183 libutil/statistics.c ) : ((t->user + t->system) / t->elapsed * 100); t 186 libutil/statistics.c STAILQ_INSERT_TAIL(&statistics_time_list, t, next); t 224 libutil/statistics.c const STATISTICS_TIME *t; t 230 libutil/statistics.c STAILQ_FOREACH(t, &statistics_time_list, next) { t 231 libutil/statistics.c if (t->name_len > max_width->name) t 232 libutil/statistics.c max_width->name = t->name_len; t 234 libutil/statistics.c w = decimal_width(t->elapsed) + ELAPSED_PRECISION + 1; t 239 libutil/statistics.c w = decimal_width(t->user) + USER_PRECISION + 1; t 243 libutil/statistics.c w = decimal_width(t->system) + SYSTEM_PRECISION + 1; t 251 libutil/statistics.c w = snprintf(buf, sizeof(buf), "%." PRECISION_STRING(PERCENT) "f", t->percent); t 278 libutil/statistics.c print_time_list(const STATISTICS_TIME *t, void *priv) t 289 libutil/statistics.c t->name, dots + t->name_len, t 290 libutil/statistics.c max_width->user, t->user, t 291 libutil/statistics.c max_width->system, t->system, t 292 libutil/statistics.c max_width->elapsed, t->elapsed, t 293 libutil/statistics.c max_width->percent, t->percent); t 297 libutil/statistics.c t->name, dots + t->name_len, t 298 libutil/statistics.c max_width->elapsed, t->elapsed); t 369 libutil/statistics.c print_time_table(const STATISTICS_TIME *t, void *priv) t 374 libutil/statistics.c if (t == T_all) { t 395 libutil/statistics.c max_width->name, t->name, t 396 libutil/statistics.c max_width->user, t->user, t 397 libutil/statistics.c max_width->system, t->system, t 398 libutil/statistics.c max_width->elapsed, t->elapsed, t 399 libutil/statistics.c max_width->percent, t->percent); t 403 libutil/statistics.c max_width->name, t->name, t 404 libutil/statistics.c max_width->elapsed, t->elapsed); t 437 libutil/statistics.c STATISTICS_TIME *t; t 450 libutil/statistics.c t = STAILQ_FIRST(&statistics_time_list); t 453 libutil/statistics.c style->print_time(t, priv); t 456 libutil/statistics.c free(t);