Monero
Loading...
Searching...
No Matches
mdb_load.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include "lmdb.h"
Include dependency graph for mdb_load.c:

Classes

struct  flagbit

Macros

#define PRINT   1
#define NOHDR   2
#define Yu   MDB_PRIy(u)
#define STRLENOF(s)
#define S(s)

Typedefs

typedef struct flagbit flagbit

Functions

static void readhdr (void)
static void badend (void)
static int unhex (unsigned char *c2)
static int readline (MDB_val *out, MDB_val *buf)
static void usage (void)
static int greater (const MDB_val *a, const MDB_val *b)
int main (int argc, char *argv[])

Variables

static int mode
static char * subname = NULL
static mdb_size_t lineno
static int version
static int flags
static char * prog
static int Eof
static MDB_envinfo info
static MDB_val kbuf
static MDB_val dbuf
static MDB_val k0buf
flagbit dbflags []

Macro Definition Documentation

◆ NOHDR

#define NOHDR   2

◆ PRINT

#define PRINT   1

◆ S

#define S ( s)
Value:
#define s(x, c)
Definition aesb.c:47
#define STRLENOF(s)
Definition mdb_load.c:44

◆ STRLENOF

#define STRLENOF ( s)
Value:
(sizeof(s)-1)

◆ Yu

#define Yu   MDB_PRIy(u)

Typedef Documentation

◆ flagbit

typedef struct flagbit flagbit

Function Documentation

◆ badend()

void badend ( void )
static

◆ greater()

int greater ( const MDB_val * a,
const MDB_val * b )
static

◆ main()

int main ( int argc,
char * argv[] )

◆ readhdr()

void readhdr ( void )
static

◆ readline()

int readline ( MDB_val * out,
MDB_val * buf )
static

◆ unhex()

int unhex ( unsigned char * c2)
static

◆ usage()

void usage ( void )
static

Variable Documentation

◆ dbflags

flagbit dbflags[]
Initial value:
= {
{ MDB_REVERSEKEY, S("reversekey") },
{ MDB_DUPSORT, S("dupsort") },
{ MDB_INTEGERKEY, S("integerkey") },
{ MDB_DUPFIXED, S("dupfixed") },
{ MDB_INTEGERDUP, S("integerdup") },
{ MDB_REVERSEDUP, S("reversedup") },
{ 0, NULL, 0 }
}
#define MDB_INTEGERKEY
Definition lmdb.h:349
#define MDB_DUPFIXED
Definition lmdb.h:351
#define MDB_INTEGERDUP
Definition lmdb.h:353
#define MDB_DUPSORT
Definition lmdb.h:345
#define MDB_REVERSEKEY
Definition lmdb.h:343
#define MDB_REVERSEDUP
Definition lmdb.h:355
#define S(s)
Definition mdb_load.c:52

◆ dbuf

MDB_val dbuf
static

◆ Eof

int Eof
static

◆ flags

int flags
static

◆ info

MDB_envinfo info
static

◆ k0buf

MDB_val k0buf
static

◆ kbuf

MDB_val kbuf
static

◆ lineno

mdb_size_t lineno
static

◆ mode

int mode
static

◆ prog

char* prog
static

◆ subname

char* subname = NULL
static

◆ version

int version
static