Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../usr/include/libdb
File: db_185.h
/*-
[0] Fix | Delete
* See the file LICENSE for redistribution information.
[1] Fix | Delete
*
[2] Fix | Delete
* Copyright (c) 1996, 2013 Oracle and/or its affiliates. All rights reserved.
[3] Fix | Delete
*/
[4] Fix | Delete
/*
[5] Fix | Delete
* Copyright (c) 1990, 1993, 1994
[6] Fix | Delete
* The Regents of the University of California. All rights reserved.
[7] Fix | Delete
*
[8] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[9] Fix | Delete
* modification, are permitted provided that the following conditions
[10] Fix | Delete
* are met:
[11] Fix | Delete
* 1. Redistributions of source code must retain the above copyright
[12] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[13] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright
[14] Fix | Delete
* notice, this list of conditions and the following disclaimer in the
[15] Fix | Delete
* documentation and/or other materials provided with the distribution.
[16] Fix | Delete
* 3. Neither the name of the University nor the names of its contributors
[17] Fix | Delete
* may be used to endorse or promote products derived from this software
[18] Fix | Delete
* without specific prior written permission.
[19] Fix | Delete
*
[20] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
[21] Fix | Delete
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
[22] Fix | Delete
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
[23] Fix | Delete
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
[24] Fix | Delete
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
[25] Fix | Delete
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
[26] Fix | Delete
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
[27] Fix | Delete
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
[28] Fix | Delete
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
[29] Fix | Delete
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
[30] Fix | Delete
* SUCH DAMAGE.
[31] Fix | Delete
*
[32] Fix | Delete
* $Id$
[33] Fix | Delete
*/
[34] Fix | Delete
[35] Fix | Delete
#ifndef _DB_185_H_
[36] Fix | Delete
#define _DB_185_H_
[37] Fix | Delete
[38] Fix | Delete
#include <sys/types.h>
[39] Fix | Delete
[40] Fix | Delete
#include <limits.h>
[41] Fix | Delete
[42] Fix | Delete
#if defined(__cplusplus)
[43] Fix | Delete
extern "C" {
[44] Fix | Delete
#endif
[45] Fix | Delete
[46] Fix | Delete
/*
[47] Fix | Delete
* XXX
[48] Fix | Delete
* Handle function prototypes and the keyword "const". This steps on name
[49] Fix | Delete
* space that DB doesn't control, but all of the other solutions are worse.
[50] Fix | Delete
*/
[51] Fix | Delete
#undef __P
[52] Fix | Delete
#if defined(__STDC__) || defined(__cplusplus)
[53] Fix | Delete
#define __P(protos) protos /* ANSI C prototypes */
[54] Fix | Delete
#else
[55] Fix | Delete
#define const
[56] Fix | Delete
#define __P(protos) () /* K&R C preprocessor */
[57] Fix | Delete
#endif
[58] Fix | Delete
[59] Fix | Delete
#define RET_ERROR -1 /* Return values. */
[60] Fix | Delete
#define RET_SUCCESS 0
[61] Fix | Delete
#define RET_SPECIAL 1
[62] Fix | Delete
[63] Fix | Delete
#ifndef __BIT_TYPES_DEFINED__
[64] Fix | Delete
#define __BIT_TYPES_DEFINED__
[65] Fix | Delete
[66] Fix | Delete
[67] Fix | Delete
[68] Fix | Delete
[69] Fix | Delete
[70] Fix | Delete
#endif
[71] Fix | Delete
[72] Fix | Delete
/*
[73] Fix | Delete
* XXX
[74] Fix | Delete
* SGI/IRIX already has a pgno_t.
[75] Fix | Delete
*/
[76] Fix | Delete
#ifdef __sgi
[77] Fix | Delete
#define pgno_t db_pgno_t
[78] Fix | Delete
#endif
[79] Fix | Delete
[80] Fix | Delete
#define MAX_PAGE_NUMBER 0xffffffff /* >= # of pages in a file */
[81] Fix | Delete
typedef u_int32_t pgno_t;
[82] Fix | Delete
#define MAX_PAGE_OFFSET 65535 /* >= # of bytes in a page */
[83] Fix | Delete
typedef u_int16_t indx_t;
[84] Fix | Delete
#define MAX_REC_NUMBER 0xffffffff /* >= # of records in a tree */
[85] Fix | Delete
typedef u_int32_t recno_t;
[86] Fix | Delete
[87] Fix | Delete
/* Key/data structure -- a Data-Base Thang. */
[88] Fix | Delete
typedef struct {
[89] Fix | Delete
void *data; /* data */
[90] Fix | Delete
size_t size; /* data length */
[91] Fix | Delete
} DBT;
[92] Fix | Delete
[93] Fix | Delete
/* Routine flags. */
[94] Fix | Delete
#define R_CURSOR 1 /* del, put, seq */
[95] Fix | Delete
#define __R_UNUSED 2 /* UNUSED */
[96] Fix | Delete
#define R_FIRST 3 /* seq */
[97] Fix | Delete
#define R_IAFTER 4 /* put (RECNO) */
[98] Fix | Delete
#define R_IBEFORE 5 /* put (RECNO) */
[99] Fix | Delete
#define R_LAST 6 /* seq (BTREE, RECNO) */
[100] Fix | Delete
#define R_NEXT 7 /* seq */
[101] Fix | Delete
#define R_NOOVERWRITE 8 /* put */
[102] Fix | Delete
#define R_PREV 9 /* seq (BTREE, RECNO) */
[103] Fix | Delete
#define R_SETCURSOR 10 /* put (RECNO) */
[104] Fix | Delete
#define R_RECNOSYNC 11 /* sync (RECNO) */
[105] Fix | Delete
[106] Fix | Delete
typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
[107] Fix | Delete
[108] Fix | Delete
/* Access method description structure. */
[109] Fix | Delete
typedef struct __db {
[110] Fix | Delete
DBTYPE type; /* Underlying db type. */
[111] Fix | Delete
int (*close) __P((struct __db *));
[112] Fix | Delete
int (*del) __P((const struct __db *, const DBT *, u_int));
[113] Fix | Delete
int (*get) __P((const struct __db *, const DBT *, DBT *, u_int));
[114] Fix | Delete
int (*put) __P((const struct __db *, DBT *, const DBT *, u_int));
[115] Fix | Delete
int (*seq) __P((const struct __db *, DBT *, DBT *, u_int));
[116] Fix | Delete
int (*sync) __P((const struct __db *, u_int));
[117] Fix | Delete
void *internal; /* Access method private. */
[118] Fix | Delete
int (*fd) __P((const struct __db *));
[119] Fix | Delete
} DB;
[120] Fix | Delete
[121] Fix | Delete
#define BTREEMAGIC 0x053162
[122] Fix | Delete
#define BTREEVERSION 3
[123] Fix | Delete
[124] Fix | Delete
/* Structure used to pass parameters to the btree routines. */
[125] Fix | Delete
typedef struct {
[126] Fix | Delete
#define R_DUP 0x01 /* duplicate keys */
[127] Fix | Delete
u_int32_t flags;
[128] Fix | Delete
u_int32_t cachesize; /* bytes to cache */
[129] Fix | Delete
u_int32_t maxkeypage; /* maximum keys per page */
[130] Fix | Delete
u_int32_t minkeypage; /* minimum keys per page */
[131] Fix | Delete
u_int32_t psize; /* page size */
[132] Fix | Delete
int (*compare) /* comparison function */
[133] Fix | Delete
__P((const DBT *, const DBT *));
[134] Fix | Delete
size_t (*prefix) /* prefix function */
[135] Fix | Delete
__P((const DBT *, const DBT *));
[136] Fix | Delete
int lorder; /* byte order */
[137] Fix | Delete
} BTREEINFO;
[138] Fix | Delete
[139] Fix | Delete
#define HASHMAGIC 0x061561
[140] Fix | Delete
#define HASHVERSION 2
[141] Fix | Delete
[142] Fix | Delete
/* Structure used to pass parameters to the hashing routines. */
[143] Fix | Delete
typedef struct {
[144] Fix | Delete
u_int32_t bsize; /* bucket size */
[145] Fix | Delete
u_int32_t ffactor; /* fill factor */
[146] Fix | Delete
u_int32_t nelem; /* number of elements */
[147] Fix | Delete
u_int32_t cachesize; /* bytes to cache */
[148] Fix | Delete
u_int32_t /* hash function */
[149] Fix | Delete
(*hash) __P((const void *, size_t));
[150] Fix | Delete
int lorder; /* byte order */
[151] Fix | Delete
} HASHINFO;
[152] Fix | Delete
[153] Fix | Delete
/* Structure used to pass parameters to the record routines. */
[154] Fix | Delete
typedef struct {
[155] Fix | Delete
#define R_FIXEDLEN 0x01 /* fixed-length records */
[156] Fix | Delete
#define R_NOKEY 0x02 /* key not required */
[157] Fix | Delete
#define R_SNAPSHOT 0x04 /* snapshot the input */
[158] Fix | Delete
u_int32_t flags;
[159] Fix | Delete
u_int32_t cachesize; /* bytes to cache */
[160] Fix | Delete
u_int32_t psize; /* page size */
[161] Fix | Delete
int lorder; /* byte order */
[162] Fix | Delete
size_t reclen; /* record length (fixed-length records) */
[163] Fix | Delete
u_char bval; /* delimiting byte (variable-length records */
[164] Fix | Delete
char *bfname; /* btree file name */
[165] Fix | Delete
} RECNOINFO;
[166] Fix | Delete
[167] Fix | Delete
/* Re-define the user's dbopen calls. */
[168] Fix | Delete
#define dbopen __db185_open
[169] Fix | Delete
[170] Fix | Delete
#if defined(__cplusplus)
[171] Fix | Delete
}
[172] Fix | Delete
#endif
[173] Fix | Delete
[174] Fix | Delete
#endif /* !_DB_185_H_ */
[175] Fix | Delete
[176] Fix | Delete
/* DO NOT EDIT: automatically built by dist/s_include. */
[177] Fix | Delete
#ifndef _DB_EXT_185_PROT_IN_
[178] Fix | Delete
#define _DB_EXT_185_PROT_IN_
[179] Fix | Delete
[180] Fix | Delete
#if defined(__cplusplus)
[181] Fix | Delete
extern "C" {
[182] Fix | Delete
#endif
[183] Fix | Delete
[184] Fix | Delete
#ifdef _DB185_INT_H_
[185] Fix | Delete
DB185 *__db185_open __P((const char *, int, int, DBTYPE, const void *));
[186] Fix | Delete
#else
[187] Fix | Delete
DB *__db185_open __P((const char *, int, int, DBTYPE, const void *));
[188] Fix | Delete
#endif
[189] Fix | Delete
[190] Fix | Delete
#if defined(__cplusplus)
[191] Fix | Delete
}
[192] Fix | Delete
#endif
[193] Fix | Delete
#endif /* !_DB_EXT_185_PROT_IN_ */
[194] Fix | Delete
[195] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function