# rpmdb/db1.c File Reference

`#include "system.h"`
`#include <rpmio_internal.h>`
`#include <rpmlib.h>`
`#include <rpmmacro.h>`
`#include <rpmurl.h>`
`#include "falloc.h"`
`#include "misc.h"`
`#include "debug.h"`

Go to the source code of this file.

## Data Structures

struct | _DBT1

## Defines

#define | _mymemset(_a, _b, _c)
#define | DB_VERSION_MAJOR 1
#define | DB_VERSION_MINOR 85
#define | DB_VERSION_PATCH 0
#define | DBT struct _DBT1

## Functions

static int | db1sync (dbiIndex dbi, unsigned int flags)
static void * | doGetRecord (dbiIndex dbi, unsigned int offset)
static int | db1copen (dbiIndex dbi, void **dbcp, unsigned int flags)
static int | db1cclose (dbiIndex dbi, void *dbcursor, unsigned int flags)
static int | db1cget (dbiIndex dbi, void *dbcursor, void **keyp, size_t *keylen, void **datap, size_t *datalen, unsigned int flags)
static int | db1cdel (dbiIndex dbi, void *dbcursor, const void *keyp, size_t keylen, unsigned int flags)
static int | db1cput (dbiIndex dbi, void *dbcursor, const void *keyp, size_t keylen, const void *datap, size_t datalen, unsigned int flags)
static int | db1ccount (dbiIndex dbi, void *dbcursor, unsigned int *countp, unsigned int flags)
static int | db1byteswapped (dbiIndex dbi)
static int | db1stat (dbiIndex dbi, unsigned int flags)
static int | db1close (dbiIndex dbi, unsigned int flags)
static int | db1open (rpmdb rpmdb, int rpmtag, dbiIndex *dbip)

## Variables

static int | _debug = 1
struct _dbiVec | db1vec

## Detailed Description

Definition in file db1.c.

## Define Documentation

#define _mymemset | ( | _a,
|  | _b,
|  | _c |  | ) |

Definition at line 10 of file db1.c.

#define DB_VERSION_MAJOR 1

Definition at line 23 of file db1.c.

#define DB_VERSION_MINOR 85

Definition at line 24 of file db1.c.

#define DB_VERSION_PATCH 0

Definition at line 25 of file db1.c.

#define DBT struct _DBT1

Definition at line 33 of file db1.c.

## Function Documentation

static int db1byteswapped | ( | dbiIndex | dbi | ) | `[static]`

Definition at line 464 of file db1.c.

static int db1cclose | ( | dbiIndex | dbi,
|  | void * | dbcursor,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 257 of file db1.c.

static int db1ccount | ( | dbiIndex | dbi,
|  | void * | dbcursor,
|  | unsigned int * | countp,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 456 of file db1.c.

static int db1cdel | ( | dbiIndex | dbi,
|  | void * | dbcursor,
|  | const void * | keyp,
|  | size_t | keylen,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 366 of file db1.c.

static int db1cget | ( | dbiIndex | dbi,
|  | void * | dbcursor,
|  | void ** | keyp,
|  | size_t * | keylen,
|  | void ** | datap,
|  | size_t * | datalen,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 266 of file db1.c.

static int db1close | ( | dbiIndex | dbi,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 476 of file db1.c.

static int db1copen | ( | dbiIndex | dbi,
|  | void ** | dbcp,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 247 of file db1.c.

static int db1cput | ( | dbiIndex | dbi,
|  | void * | dbcursor,
|  | const void * | keyp,
|  | size_t | keylen,
|  | const void * | datap,
|  | size_t | datalen,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 400 of file db1.c.

static int db1open | ( | rpmdb | rpmdb,
|  | int | rpmtag,
|  | dbiIndex * | dbip |
| ) |  |  | `[static]`

Definition at line 522 of file db1.c.

static int db1stat | ( | dbiIndex | dbi,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 470 of file db1.c.

static int db1sync | ( | dbiIndex | dbi,
|  | unsigned int | flags |
| ) |  |  | `[static]`

Definition at line 112 of file db1.c.

static void* doGetRecord | ( | dbiIndex | dbi,
|  | unsigned int | offset |
| ) |  |  | `[static]`

Definition at line 137 of file db1.c.

## Variable Documentation

int _debug = 1`[static]`

Definition at line 8 of file db1.c.