hash_page.c (190490) | hash_page.c (190491) |
---|---|
1/*- 2 * Copyright (c) 1990, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Margo Seltzer. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#if defined(LIBC_SCCS) && !defined(lint) 34static char sccsid[] = "@(#)hash_page.c 8.7 (Berkeley) 8/16/94"; 35#endif /* LIBC_SCCS and not lint */ 36#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1990, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Margo Seltzer. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#if defined(LIBC_SCCS) && !defined(lint) 34static char sccsid[] = "@(#)hash_page.c 8.7 (Berkeley) 8/16/94"; 35#endif /* LIBC_SCCS and not lint */ 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/lib/libc/db/hash/hash_page.c 190490 2009-03-28 06:25:33Z delphij $"); | 37__FBSDID("$FreeBSD: head/lib/libc/db/hash/hash_page.c 190491 2009-03-28 06:30:43Z delphij $"); |
38 39/* 40 * PACKAGE: hashing 41 * 42 * DESCRIPTION: 43 * Page manipulation for hashing package. 44 * 45 * ROUTINES: --- 104 unchanged lines hidden (view full) --- 150 if (bp[i + 1] == OVFLPAGE) { 151 bp[i - 2] = bp[i]; 152 bp[i - 1] = bp[i + 1]; 153 } else { 154 bp[i - 2] = bp[i] + pairlen; 155 bp[i - 1] = bp[i + 1] + pairlen; 156 } 157 } | 38 39/* 40 * PACKAGE: hashing 41 * 42 * DESCRIPTION: 43 * Page manipulation for hashing package. 44 * 45 * ROUTINES: --- 104 unchanged lines hidden (view full) --- 150 if (bp[i + 1] == OVFLPAGE) { 151 bp[i - 2] = bp[i]; 152 bp[i - 1] = bp[i + 1]; 153 } else { 154 bp[i - 2] = bp[i] + pairlen; 155 bp[i - 1] = bp[i + 1] + pairlen; 156 } 157 } |
158 if (ndx == hashp->cndx) { 159 /* 160 * We just removed pair we were "pointing" to. 161 * By moving back the cndx we ensure subsequent 162 * hash_seq() calls won't skip over any entries. 163 */ 164 hashp->cndx -= 2; 165 } |
|
158 } 159 /* Finally adjust the page data */ 160 bp[n] = OFFSET(bp) + pairlen; 161 bp[n - 1] = bp[n + 1] + pairlen + 2 * sizeof(u_int16_t); 162 bp[0] = n - 2; 163 hashp->NKEYS--; 164 165 bufp->flags |= BUF_MOD; --- 763 unchanged lines hidden --- | 166 } 167 /* Finally adjust the page data */ 168 bp[n] = OFFSET(bp) + pairlen; 169 bp[n - 1] = bp[n + 1] + pairlen + 2 * sizeof(u_int16_t); 170 bp[0] = n - 2; 171 hashp->NKEYS--; 172 173 bufp->flags |= BUF_MOD; --- 763 unchanged lines hidden --- |