Loading...
--- Libc/Libc-763.12/include/db.h
+++ Libc/Libc-262/include/db.h
@@ -1,5 +1,26 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License"). You may not use this file except in compliance with the
+ * License. Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
+ * @APPLE_LICENSE_HEADER_END@
+ */
/*-
- * Copyright (c) 1990, 1993, 1994
+ * Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,8 +51,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#)db.h 8.7 (Berkeley) 6/16/94
- * $FreeBSD: src/include/db.h,v 1.5 2002/03/26 01:35:05 bde Exp $
+ * @(#)db.h 8.4 (Berkeley) 2/21/94
*/
#ifndef _DB_H_
@@ -100,14 +120,14 @@
/* Access method description structure. */
typedef struct __db {
DBTYPE type; /* Underlying db type. */
- int (*close)(struct __db *);
- int (*del)(const struct __db *, const DBT *, unsigned int);
- int (*get)(const struct __db *, const DBT *, DBT *, unsigned int);
- int (*put)(const struct __db *, DBT *, const DBT *, unsigned int);
- int (*seq)(const struct __db *, DBT *, DBT *, unsigned int);
- int (*sync)(const struct __db *, unsigned int);
+ int (*close) __P((struct __db *));
+ int (*del) __P((const struct __db *, const DBT *, u_int));
+ int (*get) __P((const struct __db *, const DBT *, DBT *, u_int));
+ int (*put) __P((const struct __db *, DBT *, const DBT *, u_int));
+ int (*seq) __P((const struct __db *, DBT *, DBT *, u_int));
+ int (*sync) __P((const struct __db *, u_int));
void *internal; /* Access method private. */
- int (*fd)(const struct __db *);
+ int (*fd) __P((const struct __db *));
} DB;
#define BTREEMAGIC 0x053162
@@ -116,16 +136,16 @@
/* Structure used to pass parameters to the btree routines. */
typedef struct {
#define R_DUP 0x01 /* duplicate keys */
- unsigned long flags;
- unsigned int cachesize; /* bytes to cache */
- int maxkeypage; /* maximum keys per page */
- int minkeypage; /* minimum keys per page */
- unsigned int psize; /* page size */
- int (*compare) /* comparison function */
- (const DBT *, const DBT *);
- size_t (*prefix) /* prefix function */
- (const DBT *, const DBT *);
- int lorder; /* byte order */
+ u_long flags;
+ u_int cachesize; /* bytes to cache */
+ int maxkeypage; /* maximum keys per page */
+ int minkeypage; /* minimum keys per page */
+ u_int psize; /* page size */
+ int (*compare) /* comparison function */
+ __P((const DBT *, const DBT *));
+ size_t (*prefix) /* prefix function */
+ __P((const DBT *, const DBT *));
+ int lorder; /* byte order */
} BTREEINFO;
#define HASHMAGIC 0x061561
@@ -133,12 +153,12 @@
/* Structure used to pass parameters to the hashing routines. */
typedef struct {
- unsigned int bsize; /* bucket size */
- unsigned int ffactor; /* fill factor */
- unsigned int nelem; /* number of elements */
- unsigned int cachesize; /* bytes to cache */
+ u_int bsize; /* bucket size */
+ u_int ffactor; /* fill factor */
+ u_int nelem; /* number of elements */
+ u_int cachesize; /* bytes to cache */
u_int32_t /* hash function */
- (*hash)(const void *, size_t);
+ (*hash) __P((const void *, size_t));
int lorder; /* byte order */
} HASHINFO;
@@ -147,12 +167,12 @@
#define R_FIXEDLEN 0x01 /* fixed-length records */
#define R_NOKEY 0x02 /* key not required */
#define R_SNAPSHOT 0x04 /* snapshot the input */
- unsigned long flags;
- unsigned int cachesize; /* bytes to cache */
- unsigned int psize; /* page size */
- int lorder; /* byte order */
- size_t reclen; /* record length (fixed-length records) */
- unsigned char bval; /* delimiting byte (variable-length records */
+ u_long flags;
+ u_int cachesize; /* bytes to cache */
+ u_int psize; /* page size */
+ int lorder; /* byte order */
+ size_t reclen; /* record length (fixed-length records) */
+ u_char bval; /* delimiting byte (variable-length records */
char *bfname; /* btree file name */
} RECNOINFO;
@@ -207,13 +227,13 @@
#endif
__BEGIN_DECLS
-DB *dbopen(const char *, int, int, DBTYPE, const void *);
+DB *dbopen __P((const char *, int, int, DBTYPE, const void *));
#ifdef __DBINTERFACE_PRIVATE
-DB *__bt_open(const char *, int, int, const BTREEINFO *, int);
-DB *__hash_open(const char *, int, int, const HASHINFO *, int);
-DB *__rec_open(const char *, int, int, const RECNOINFO *, int);
-void __dbpanic(DB *dbp);
+DB *__bt_open __P((const char *, int, int, const BTREEINFO *, int));
+DB *__hash_open __P((const char *, int, int, const HASHINFO *, int));
+DB *__rec_open __P((const char *, int, int, const RECNOINFO *, int));
+void __dbpanic __P((DB *dbp));
#endif
__END_DECLS
#endif /* !_DB_H_ */