├── .travis.yml
├── .gitignore
├── lmdb
├── src
│ └── main
│ │ └── native
│ │ ├── .gitignore
│ │ ├── tooltag
│ │ ├── COPYRIGHT
│ │ ├── mdb_copy.1
│ │ ├── sample-mdb.c
│ │ ├── sample-mdb.txt
│ │ ├── mdb_stat.1
│ │ ├── sample-bdb.c
│ │ ├── mdb_copy.c
│ │ ├── sample-bdb.txt
│ │ ├── LICENSE
│ │ ├── mdb_dump.1
│ │ ├── mdb_load.1
│ │ ├── Makefile
│ │ ├── mtest2.c
│ │ ├── CHANGES
│ │ ├── mtest3.c
│ │ ├── mtest5.c
│ │ ├── mtest6.c
│ │ ├── mtest4.c
│ │ ├── mtest.c
│ │ ├── midl.h
│ │ ├── mdb_stat.c
│ │ ├── mdb_dump.c
│ │ ├── midl.c
│ │ ├── mdb_load.c
│ │ └── Doxyfile
└── pom.xml
├── readme.md
├── lmdb-osx64
└── pom.xml
├── lmdb-linux64
└── pom.xml
├── lmdb-win64
└── pom.xml
└── pom.xml
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: java
2 | jdk:
3 | - oraclejdk8
4 |
5 | before_script: sudo apt-get install build-essential automake1.10 libtool
6 | script: "mvn install -P linux64"
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .classpath
2 | .project
3 | *.log
4 | *.iml
5 | *.idea
6 | *.out
7 | *.exe
8 | .metadata
9 | .settings/
10 | target/
11 | eclipse-out/
12 | test-output/
13 | bin/
14 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/.gitignore:
--------------------------------------------------------------------------------
1 | mtest
2 | mtest[23456]
3 | testdb
4 | mdb_copy
5 | mdb_stat
6 | mdb_dump
7 | mdb_load
8 | *.[ao]
9 | *.so
10 | *[~#]
11 | *.bak
12 | *.orig
13 | *.rej
14 | core
15 | core.*
16 | valgrind.*
17 | man/
18 | html/
19 |
--------------------------------------------------------------------------------
/lmdb/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 4.0.0
5 |
6 | org.deephacks.lmdb
7 | lmdb-project
8 | 0.1.2-SNAPSHOT
9 |
10 |
11 | lmdb
12 | 0.1.2-SNAPSHOT
13 | jar
14 |
15 | ${project.artifactId}
16 | lmdb
17 |
18 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/tooltag:
--------------------------------------------------------------------------------
1 |
2 |
3 | mdb_copy_1
4 | mdb_copy - environment copy tool
5 | mdb_copy.1
6 |
7 |
8 | mdb_dump_1
9 | mdb_dump - environment export tool
10 | mdb_dump.1
11 |
12 |
13 | mdb_load_1
14 | mdb_load - environment import tool
15 | mdb_load.1
16 |
17 |
18 | mdb_stat_1
19 | mdb_stat - environment status tool
20 | mdb_stat.1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/COPYRIGHT:
--------------------------------------------------------------------------------
1 | Copyright 2011-2014 Howard Chu, Symas Corp.
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted only as authorized by the OpenLDAP
6 | Public License.
7 |
8 | A copy of this license is available in the file LICENSE in the
9 | top-level directory of the distribution or, alternatively, at
10 | .
11 |
12 | OpenLDAP is a registered trademark of the OpenLDAP Foundation.
13 |
14 | Individual files and/or contributed packages may be copyright by
15 | other parties and/or subject to additional restrictions.
16 |
17 | This work also contains materials derived from public sources.
18 |
19 | Additional information about OpenLDAP can be obtained at
20 | .
21 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | ### Symas Lightning Memory-Mapped Database (LMDB)
2 |
3 | [](https://travis-ci.org/deephacks/lmdb)
4 |
5 | This project produces `liblmdb` library version 0.9.10 of the OpenLDAP project which is licensed under the [The OpenLDAP Public License](http://www.openldap.org/software/release/license.html).
6 |
7 | ### Using as a Maven Dependency
8 |
9 | Add one (or both) of the following dependency to your Maven `pom.xml`.
10 |
11 | ```xml
12 |
13 |
14 | org.deephacks.lmdb
15 | lmdb-linux64
16 | ${version}
17 |
18 |
19 |
20 | org.deephacks.lmdb
21 | lmdb-osx64
22 | ${version}
23 |
24 | ```
25 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mdb_copy.1:
--------------------------------------------------------------------------------
1 | .TH MDB_COPY 1 "2014/06/20" "LMDB 0.9.14"
2 | .\" Copyright 2012-2014 Howard Chu, Symas Corp. All Rights Reserved.
3 | .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
4 | .SH NAME
5 | mdb_copy \- LMDB environment copy tool
6 | .SH SYNOPSIS
7 | .B mdb_copy
8 | [\c
9 | .BR \-V ]
10 | [\c
11 | .BR \-c ]
12 | [\c
13 | .BR \-n ]
14 | .B srcpath
15 | [\c
16 | .BR dstpath ]
17 | .SH DESCRIPTION
18 | The
19 | .B mdb_copy
20 | utility copies an LMDB environment. The environment can
21 | be copied regardless of whether it is currently in use.
22 | No lockfile is created, since it gets recreated at need.
23 |
24 | If
25 | .I dstpath
26 | is specified it must be the path of an empty directory
27 | for storing the backup. Otherwise, the backup will be
28 | written to stdout.
29 |
30 | .SH OPTIONS
31 | .TP
32 | .BR \-V
33 | Write the library version number to the standard output, and exit.
34 | .TP
35 | .BR \-c
36 | Compact while copying. Only current data pages will be copied; freed
37 | or unused pages will be omitted from the copy. This option will
38 | slow down the backup process as it is more CPU-intensive.
39 | .TP
40 | .BR \-n
41 | Open LDMB environment(s) which do not use subdirectories.
42 |
43 | .SH DIAGNOSTICS
44 | Exit status is zero if no errors occur.
45 | Errors result in a non-zero exit status and
46 | a diagnostic message being written to standard error.
47 | .SH CAVEATS
48 | This utility can trigger significant file size growth if run
49 | in parallel with write transactions, because pages which they
50 | free during copying cannot be reused until the copy is done.
51 | .SH "SEE ALSO"
52 | .BR mdb_stat (1)
53 | .SH AUTHOR
54 | Howard Chu of Symas Corporation
55 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/sample-mdb.c:
--------------------------------------------------------------------------------
1 | /* sample-mdb.c - MDB toy/sample
2 | *
3 | * Do a line-by-line comparison of this and sample-bdb.c
4 | */
5 | /*
6 | * Copyright 2012 Howard Chu, Symas Corp.
7 | * All rights reserved.
8 | *
9 | * Redistribution and use in source and binary forms, with or without
10 | * modification, are permitted only as authorized by the OpenLDAP
11 | * Public License.
12 | *
13 | * A copy of this license is available in the file LICENSE in the
14 | * top-level directory of the distribution or, alternatively, at
15 | * .
16 | */
17 | #include
18 | #include "lmdb.h"
19 |
20 | int main(int argc,char * argv[])
21 | {
22 | int rc;
23 | MDB_env *env;
24 | MDB_dbi dbi;
25 | MDB_val key, data;
26 | MDB_txn *txn;
27 | MDB_cursor *cursor;
28 | char sval[32];
29 |
30 | rc = mdb_env_create(&env);
31 | rc = mdb_env_open(env, "./testdb", 0, 0664);
32 | rc = mdb_txn_begin(env, NULL, 0, &txn);
33 | rc = mdb_open(txn, NULL, 0, &dbi);
34 |
35 | key.mv_size = sizeof(int);
36 | key.mv_data = sval;
37 | data.mv_size = sizeof(sval);
38 | data.mv_data = sval;
39 |
40 | sprintf(sval, "%03x %d foo bar", 32, 3141592);
41 | rc = mdb_put(txn, dbi, &key, &data, 0);
42 | rc = mdb_txn_commit(txn);
43 | if (rc) {
44 | fprintf(stderr, "mdb_txn_commit: (%d) %s\n", rc, mdb_strerror(rc));
45 | goto leave;
46 | }
47 | rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
48 | rc = mdb_cursor_open(txn, dbi, &cursor);
49 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) {
50 | printf("key: %p %.*s, data: %p %.*s\n",
51 | key.mv_data, (int) key.mv_size, (char *) key.mv_data,
52 | data.mv_data, (int) data.mv_size, (char *) data.mv_data);
53 | }
54 | mdb_cursor_close(cursor);
55 | mdb_txn_abort(txn);
56 | leave:
57 | mdb_close(env, dbi);
58 | mdb_env_close(env);
59 | return 0;
60 | }
61 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/sample-mdb.txt:
--------------------------------------------------------------------------------
1 | /* sample-mdb.txt - MDB toy/sample
2 | *
3 | * Do a line-by-line comparison of this and sample-bdb.txt
4 | */
5 | /*
6 | * Copyright 2012 Howard Chu, Symas Corp.
7 | * All rights reserved.
8 | *
9 | * Redistribution and use in source and binary forms, with or without
10 | * modification, are permitted only as authorized by the OpenLDAP
11 | * Public License.
12 | *
13 | * A copy of this license is available in the file LICENSE in the
14 | * top-level directory of the distribution or, alternatively, at
15 | * .
16 | */
17 | #include
18 | #include "lmdb.h"
19 |
20 | int main(int argc,char * argv[])
21 | {
22 | int rc;
23 | MDB_env *env;
24 | MDB_dbi dbi;
25 | MDB_val key, data;
26 | MDB_txn *txn;
27 | MDB_cursor *cursor;
28 | char sval[32];
29 |
30 | /* Note: Most error checking omitted for simplicity */
31 |
32 | rc = mdb_env_create(&env);
33 | rc = mdb_env_open(env, "./testdb", 0, 0664);
34 | rc = mdb_txn_begin(env, NULL, 0, &txn);
35 | rc = mdb_open(txn, NULL, 0, &dbi);
36 |
37 | key.mv_size = sizeof(int);
38 | key.mv_data = sval;
39 | data.mv_size = sizeof(sval);
40 | data.mv_data = sval;
41 |
42 | sprintf(sval, "%03x %d foo bar", 32, 3141592);
43 | rc = mdb_put(txn, dbi, &key, &data, 0);
44 | rc = mdb_txn_commit(txn);
45 | if (rc) {
46 | fprintf(stderr, "mdb_txn_commit: (%d) %s\n", rc, mdb_strerror(rc));
47 | goto leave;
48 | }
49 | rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
50 | rc = mdb_cursor_open(txn, dbi, &cursor);
51 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) {
52 | printf("key: %p %.*s, data: %p %.*s\n",
53 | key.mv_data, (int) key.mv_size, (char *) key.mv_data,
54 | data.mv_data, (int) data.mv_size, (char *) data.mv_data);
55 | }
56 | mdb_cursor_close(cursor);
57 | mdb_txn_abort(txn);
58 | leave:
59 | mdb_close(env, dbi);
60 | mdb_env_close(env);
61 | return 0;
62 | }
63 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mdb_stat.1:
--------------------------------------------------------------------------------
1 | .TH MDB_STAT 1 "2014/06/20" "LMDB 0.9.14"
2 | .\" Copyright 2012-2014 Howard Chu, Symas Corp. All Rights Reserved.
3 | .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
4 | .SH NAME
5 | mdb_stat \- LMDB environment status tool
6 | .SH SYNOPSIS
7 | .B mdb_stat
8 | .BR \ envpath
9 | [\c
10 | .BR \-V ]
11 | [\c
12 | .BR \-e ]
13 | [\c
14 | .BR \-f [ f [ f ]]]
15 | [\c
16 | .BR \-n ]
17 | [\c
18 | .BR \-r [ r ]]
19 | [\c
20 | .BR \-a \ |
21 | .BI \-s \ subdb\fR]
22 | .SH DESCRIPTION
23 | The
24 | .B mdb_stat
25 | utility displays the status of an LMDB environment.
26 | .SH OPTIONS
27 | .TP
28 | .BR \-V
29 | Write the library version number to the standard output, and exit.
30 | .TP
31 | .BR \-e
32 | Display information about the database environment.
33 | .TP
34 | .BR \-f
35 | Display information about the environment freelist.
36 | If \fB\-ff\fP is given, summarize each freelist entry.
37 | If \fB\-fff\fP is given, display the full list of page IDs in the freelist.
38 | .TP
39 | .BR \-n
40 | Display the status of an LMDB database which does not use subdirectories.
41 | .TP
42 | .BR \-r
43 | Display information about the environment reader table.
44 | Shows the process ID, thread ID, and transaction ID for each active
45 | reader slot. The process ID and transaction ID are in decimal, the
46 | thread ID is in hexadecimal. The transaction ID is displayed as "-"
47 | if the reader does not currently have a read transaction open.
48 | If \fB\-rr\fP is given, check for stale entries in the reader
49 | table and clear them. The reader table will be printed again
50 | after the check is performed.
51 | .TP
52 | .BR \-a
53 | Display the status of all of the subdatabases in the environment.
54 | .TP
55 | .BR \-s \ subdb
56 | Display the status of a specific subdatabase.
57 | .SH DIAGNOSTICS
58 | Exit status is zero if no errors occur.
59 | Errors result in a non-zero exit status and
60 | a diagnostic message being written to standard error.
61 | .SH "SEE ALSO"
62 | .BR mdb_copy (1)
63 | .SH AUTHOR
64 | Howard Chu of Symas Corporation
65 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/sample-bdb.c:
--------------------------------------------------------------------------------
1 | /* sample-bdb.c - BerkeleyDB toy/sample
2 | *
3 | * Do a line-by-line comparison of this and sample-mdb.c
4 | */
5 | /*
6 | * Copyright 2012 Howard Chu, Symas Corp.
7 | * All rights reserved.
8 | *
9 | * Redistribution and use in source and binary forms, with or without
10 | * modification, are permitted only as authorized by the OpenLDAP
11 | * Public License.
12 | *
13 | * A copy of this license is available in the file LICENSE in the
14 | * top-level directory of the distribution or, alternatively, at
15 | * .
16 | */
17 | #include
18 | #include
19 | #include
20 |
21 | int main(int argc,char * argv[])
22 | {
23 | int rc;
24 | DB_ENV *env;
25 | DB *dbi;
26 | DBT key, data;
27 | DB_TXN *txn;
28 | DBC *cursor;
29 | char sval[32], kval[32];
30 |
31 | #define FLAGS (DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_INIT_MPOOL|DB_CREATE|DB_THREAD)
32 | rc = db_env_create(&env, 0);
33 | rc = env->open(env, "./testdb", FLAGS, 0664);
34 | rc = db_create(&dbi, env, 0);
35 | rc = env->txn_begin(env, NULL, &txn, 0);
36 | rc = dbi->open(dbi, txn, "test.bdb", NULL, DB_BTREE, DB_CREATE, 0664);
37 |
38 | memset(&key, 0, sizeof(DBT));
39 | memset(&data, 0, sizeof(DBT));
40 | key.size = sizeof(int);
41 | key.data = sval;
42 | data.size = sizeof(sval);
43 | data.data = sval;
44 |
45 | sprintf(sval, "%03x %d foo bar", 32, 3141592);
46 | rc = dbi->put(dbi, txn, &key, &data, 0);
47 | rc = txn->commit(txn, 0);
48 | if (rc) {
49 | fprintf(stderr, "txn->commit: (%d) %s\n", rc, db_strerror(rc));
50 | goto leave;
51 | }
52 | rc = env->txn_begin(env, NULL, &txn, 0);
53 | rc = dbi->cursor(dbi, txn, &cursor, 0);
54 | key.flags = DB_DBT_USERMEM;
55 | key.data = kval;
56 | key.ulen = sizeof(kval);
57 | data.flags = DB_DBT_USERMEM;
58 | data.data = sval;
59 | data.ulen = sizeof(sval);
60 | while ((rc = cursor->c_get(cursor, &key, &data, DB_NEXT)) == 0) {
61 | printf("key: %p %.*s, data: %p %.*s\n",
62 | key.data, (int) key.size, (char *) key.data,
63 | data.data, (int) data.size, (char *) data.data);
64 | }
65 | rc = cursor->c_close(cursor);
66 | rc = txn->abort(txn);
67 | leave:
68 | rc = dbi->close(dbi, 0);
69 | rc = env->close(env, 0);
70 | return rc;
71 | }
72 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mdb_copy.c:
--------------------------------------------------------------------------------
1 | /* mdb_copy.c - memory-mapped database backup tool */
2 | /*
3 | * Copyright 2012 Howard Chu, Symas Corp.
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted only as authorized by the OpenLDAP
8 | * Public License.
9 | *
10 | * A copy of this license is available in the file LICENSE in the
11 | * top-level directory of the distribution or, alternatively, at
12 | * .
13 | */
14 | #ifdef _WIN32
15 | #include
16 | #define MDB_STDOUT GetStdHandle(STD_OUTPUT_HANDLE)
17 | #else
18 | #define MDB_STDOUT 1
19 | #endif
20 | #include
21 | #include
22 | #include
23 | #include "lmdb.h"
24 |
25 | static void
26 | sighandle(int sig)
27 | {
28 | }
29 |
30 | int main(int argc,char * argv[])
31 | {
32 | int rc;
33 | MDB_env *env;
34 | const char *progname = argv[0], *act;
35 | unsigned flags = MDB_RDONLY;
36 | unsigned cpflags = 0;
37 |
38 | for (; argc > 1 && argv[1][0] == '-'; argc--, argv++) {
39 | if (argv[1][1] == 'n' && argv[1][2] == '\0')
40 | flags |= MDB_NOSUBDIR;
41 | else if (argv[1][1] == 'c' && argv[1][2] == '\0')
42 | cpflags |= MDB_CP_COMPACT;
43 | else if (argv[1][1] == 'V' && argv[1][2] == '\0') {
44 | printf("%s\n", MDB_VERSION_STRING);
45 | exit(0);
46 | } else
47 | argc = 0;
48 | }
49 |
50 | if (argc<2 || argc>3) {
51 | fprintf(stderr, "usage: %s [-V] [-c] [-n] srcpath [dstpath]\n", progname);
52 | exit(EXIT_FAILURE);
53 | }
54 |
55 | #ifdef SIGPIPE
56 | signal(SIGPIPE, sighandle);
57 | #endif
58 | #ifdef SIGHUP
59 | signal(SIGHUP, sighandle);
60 | #endif
61 | signal(SIGINT, sighandle);
62 | signal(SIGTERM, sighandle);
63 |
64 | act = "opening environment";
65 | rc = mdb_env_create(&env);
66 | if (rc == MDB_SUCCESS) {
67 | rc = mdb_env_open(env, argv[1], flags, 0664);
68 | }
69 | if (rc == MDB_SUCCESS) {
70 | act = "copying";
71 | if (argc == 2)
72 | rc = mdb_env_copyfd2(env, MDB_STDOUT, cpflags);
73 | else
74 | rc = mdb_env_copy2(env, argv[2], cpflags);
75 | }
76 | if (rc)
77 | fprintf(stderr, "%s: %s failed, error %d (%s)\n",
78 | progname, act, rc, mdb_strerror(rc));
79 | mdb_env_close(env);
80 |
81 | return rc ? EXIT_FAILURE : EXIT_SUCCESS;
82 | }
83 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/sample-bdb.txt:
--------------------------------------------------------------------------------
1 | /* sample-bdb.txt - BerkeleyDB toy/sample
2 | *
3 | * Do a line-by-line comparison of this and sample-mdb.txt
4 | */
5 | /*
6 | * Copyright 2012 Howard Chu, Symas Corp.
7 | * All rights reserved.
8 | *
9 | * Redistribution and use in source and binary forms, with or without
10 | * modification, are permitted only as authorized by the OpenLDAP
11 | * Public License.
12 | *
13 | * A copy of this license is available in the file LICENSE in the
14 | * top-level directory of the distribution or, alternatively, at
15 | * .
16 | */
17 | #include
18 | #include
19 | #include
20 |
21 | int main(int argc,char * argv[])
22 | {
23 | int rc;
24 | DB_ENV *env;
25 | DB *dbi;
26 | DBT key, data;
27 | DB_TXN *txn;
28 | DBC *cursor;
29 | char sval[32], kval[32];
30 |
31 | /* Note: Most error checking omitted for simplicity */
32 |
33 | #define FLAGS (DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_INIT_MPOOL|DB_CREATE|DB_THREAD)
34 | rc = db_env_create(&env, 0);
35 | rc = env->open(env, "./testdb", FLAGS, 0664);
36 | rc = db_create(&dbi, env, 0);
37 | rc = env->txn_begin(env, NULL, &txn, 0);
38 | rc = dbi->open(dbi, txn, "test.bdb", NULL, DB_BTREE, DB_CREATE, 0664);
39 |
40 | memset(&key, 0, sizeof(DBT));
41 | memset(&data, 0, sizeof(DBT));
42 | key.size = sizeof(int);
43 | key.data = sval;
44 | data.size = sizeof(sval);
45 | data.data = sval;
46 |
47 | sprintf(sval, "%03x %d foo bar", 32, 3141592);
48 | rc = dbi->put(dbi, txn, &key, &data, 0);
49 | rc = txn->commit(txn, 0);
50 | if (rc) {
51 | fprintf(stderr, "txn->commit: (%d) %s\n", rc, db_strerror(rc));
52 | goto leave;
53 | }
54 | rc = env->txn_begin(env, NULL, &txn, 0);
55 | rc = dbi->cursor(dbi, txn, &cursor, 0);
56 | key.flags = DB_DBT_USERMEM;
57 | key.data = kval;
58 | key.ulen = sizeof(kval);
59 | data.flags = DB_DBT_USERMEM;
60 | data.data = sval;
61 | data.ulen = sizeof(sval);
62 | while ((rc = cursor->c_get(cursor, &key, &data, DB_NEXT)) == 0) {
63 | printf("key: %p %.*s, data: %p %.*s\n",
64 | key.data, (int) key.size, (char *) key.data,
65 | data.data, (int) data.size, (char *) data.data);
66 | }
67 | rc = cursor->c_close(cursor);
68 | rc = txn->abort(txn);
69 | leave:
70 | rc = dbi->close(dbi, 0);
71 | rc = env->close(env, 0);
72 | return rc;
73 | }
74 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/LICENSE:
--------------------------------------------------------------------------------
1 | The OpenLDAP Public License
2 | Version 2.8, 17 August 2003
3 |
4 | Redistribution and use of this software and associated documentation
5 | ("Software"), with or without modification, are permitted provided
6 | that the following conditions are met:
7 |
8 | 1. Redistributions in source form must retain copyright statements
9 | and notices,
10 |
11 | 2. Redistributions in binary form must reproduce applicable copyright
12 | statements and notices, this list of conditions, and the following
13 | disclaimer in the documentation and/or other materials provided
14 | with the distribution, and
15 |
16 | 3. Redistributions must contain a verbatim copy of this document.
17 |
18 | The OpenLDAP Foundation may revise this license from time to time.
19 | Each revision is distinguished by a version number. You may use
20 | this Software under terms of this license revision or under the
21 | terms of any subsequent revision of the license.
22 |
23 | THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS
24 | CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
25 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
26 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
27 | SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S)
28 | OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
29 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 | POSSIBILITY OF SUCH DAMAGE.
36 |
37 | The names of the authors and copyright holders must not be used in
38 | advertising or otherwise to promote the sale, use or other dealing
39 | in this Software without specific, written prior permission. Title
40 | to copyright in this Software shall at all times remain with copyright
41 | holders.
42 |
43 | OpenLDAP is a registered trademark of the OpenLDAP Foundation.
44 |
45 | Copyright 1999-2003 The OpenLDAP Foundation, Redwood City,
46 | California, USA. All Rights Reserved. Permission to copy and
47 | distribute verbatim copies of this document is granted.
48 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mdb_dump.1:
--------------------------------------------------------------------------------
1 | .TH MDB_DUMP 1 "2014/06/20" "LMDB 0.9.14"
2 | .\" Copyright 2014 Howard Chu, Symas Corp. All Rights Reserved.
3 | .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
4 | .SH NAME
5 | mdb_dump \- LMDB environment export tool
6 | .SH SYNOPSIS
7 | .B mdb_dump
8 | .BR \ envpath
9 | [\c
10 | .BR \-V ]
11 | [\c
12 | .BI \-f \ file\fR]
13 | [\c
14 | .BR \-l ]
15 | [\c
16 | .BR \-n ]
17 | [\c
18 | .BR \-p ]
19 | [\c
20 | .BR \-a \ |
21 | .BI \-s \ subdb\fR]
22 | .SH DESCRIPTION
23 | The
24 | .B mdb_dump
25 | utility reads a database and writes its contents to the
26 | standard output using a portable flat-text format
27 | understood by the
28 | .BR mdb_load (1)
29 | utility.
30 | .SH OPTIONS
31 | .TP
32 | .BR \-V
33 | Write the library version number to the standard output, and exit.
34 | .TP
35 | .BR \-f \ file
36 | Write to the specified file instead of to the standard output.
37 | .TP
38 | .BR \-l
39 | List the databases stored in the environment. Just the
40 | names will be listed, no data will be output.
41 | .TP
42 | .BR \-n
43 | Dump an LMDB database which does not use subdirectories.
44 | .TP
45 | .BR \-p
46 | If characters in either the key or data items are printing characters (as
47 | defined by isprint(3)), output them directly. This option permits users to
48 | use standard text editors and tools to modify the contents of databases.
49 |
50 | Note: different systems may have different notions about what characters
51 | are considered printing characters, and databases dumped in this manner may
52 | be less portable to external systems.
53 | .TP
54 | .BR \-a
55 | Dump all of the subdatabases in the environment.
56 | .TP
57 | .BR \-s \ subdb
58 | Dump a specific subdatabase. If no database is specified, only the main database is dumped.
59 | .SH DIAGNOSTICS
60 | Exit status is zero if no errors occur.
61 | Errors result in a non-zero exit status and
62 | a diagnostic message being written to standard error.
63 |
64 | Dumping and reloading databases that use user-defined comparison functions
65 | will result in new databases that use the default comparison functions.
66 | \fBIn this case it is quite likely that the reloaded database will be
67 | damaged beyond repair permitting neither record storage nor retrieval.\fP
68 |
69 | The only available workaround is to modify the source for the
70 | .BR mdb_load (1)
71 | utility to load the database using the correct comparison functions.
72 | .SH "SEE ALSO"
73 | .BR mdb_load (1)
74 | .SH AUTHOR
75 | Howard Chu of Symas Corporation
76 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mdb_load.1:
--------------------------------------------------------------------------------
1 | .TH MDB_LOAD 1 "2014/06/20" "LMDB 0.9.14"
2 | .\" Copyright 2014 Howard Chu, Symas Corp. All Rights Reserved.
3 | .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
4 | .SH NAME
5 | mdb_load \- LMDB environment import tool
6 | .SH SYNOPSIS
7 | .B mdb_load
8 | .BR \ envpath
9 | [\c
10 | .BR \-V ]
11 | [\c
12 | .BI \-f \ file\fR]
13 | [\c
14 | .BR \-n ]
15 | [\c
16 | .BI \-s \ subdb\fR]
17 | [\c
18 | .BR \-N ]
19 | [\c
20 | .BR \-T ]
21 | .SH DESCRIPTION
22 | The
23 | .B mdb_load
24 | utility reads from the standard input and loads it into the
25 | LMDB environment
26 | .BR envpath .
27 |
28 | The input to
29 | .B mdb_load
30 | must be in the output format specified by the
31 | .BR mdb_dump (1)
32 | utility or as specified by the
33 | .B -T
34 | option below.
35 | .SH OPTIONS
36 | .TP
37 | .BR \-V
38 | Write the library version number to the standard output, and exit.
39 | .TP
40 | .BR \-f \ file
41 | Read from the specified file instead of from the standard input.
42 | .TP
43 | .BR \-n
44 | Load an LMDB database which does not use subdirectories.
45 | .TP
46 | .BR \-s \ subdb
47 | Load a specific subdatabase. If no database is specified, data is loaded into the main database.
48 | .TP
49 | .BR \-N
50 | Don't overwrite existing records when loading into an already existing database; just skip them.
51 | .TP
52 | .BR \-T
53 | Load data from simple text files. The input must be paired lines of text, where the first
54 | line of the pair is the key item, and the second line of the pair is its corresponding
55 | data item.
56 |
57 | A simple escape mechanism, where newline and backslash (\\) characters are special, is
58 | applied to the text input. Newline characters are interpreted as record separators.
59 | Backslash characters in the text will be interpreted in one of two ways: If the backslash
60 | character precedes another backslash character, the pair will be interpreted as a literal
61 | backslash. If the backslash character precedes any other character, the two characters
62 | following the backslash will be interpreted as a hexadecimal specification of a single
63 | character; for example, \\0a is a newline character in the ASCII character set.
64 |
65 | For this reason, any backslash or newline characters that naturally occur in the text
66 | input must be escaped to avoid misinterpretation by
67 | .BR mdb_load .
68 |
69 | .SH DIAGNOSTICS
70 | Exit status is zero if no errors occur.
71 | Errors result in a non-zero exit status and
72 | a diagnostic message being written to standard error.
73 |
74 | .SH "SEE ALSO"
75 | .BR mdb_dump (1)
76 | .SH AUTHOR
77 | Howard Chu of Symas Corporation
78 |
--------------------------------------------------------------------------------
/lmdb-osx64/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 4.0.0
5 |
6 | org.deephacks.lmdb
7 | lmdb-project
8 | 0.1.2-SNAPSHOT
9 |
10 |
11 | lmdb-osx64
12 | 0.1.2-SNAPSHOT
13 | jar
14 |
15 | ${project.artifactId}
16 | lmdb
17 |
18 |
19 |
20 | org.codehaus.mojo
21 | exec-maven-plugin
22 | 1.2.1
23 |
24 |
25 | build-native
26 | compile
27 |
28 | exec
29 |
30 |
31 | make
32 | ${basedir}/../lmdb/src/main/native
33 |
34 |
35 |
36 |
37 |
38 |
39 | maven-resources-plugin
40 | 2.6
41 |
42 |
43 | copy-resources
44 | process-classes
45 |
46 | copy-resources
47 |
48 |
49 | ${basedir}/target/META-INF/native/${project.artifactId}
50 |
51 |
52 | ${basedir}/../lmdb/src/main/native
53 | false
54 |
55 | **/lmdb.h
56 | **/liblmdb.a
57 | **/liblmdb.so
58 | **/mdb_stat
59 | **/mdb_copy
60 | **/COPYRIGHT
61 | **/LICENSE
62 | **/CHANGES
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-jar-plugin
73 | 2.4
74 |
75 | ${basedir}/target
76 |
77 | META-INF/**
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/lmdb-linux64/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 4.0.0
5 |
6 | org.deephacks.lmdb
7 | lmdb-project
8 | 0.1.2-SNAPSHOT
9 |
10 |
11 | lmdb-linux64
12 | 0.1.2-SNAPSHOT
13 | jar
14 |
15 | ${project.artifactId}
16 | lmdb
17 |
18 |
19 |
20 | org.codehaus.mojo
21 | exec-maven-plugin
22 | 1.2.1
23 |
24 |
25 | build-native
26 | compile
27 |
28 | exec
29 |
30 |
31 | make
32 | ${basedir}/../lmdb/src/main/native
33 |
34 |
35 |
36 |
37 |
38 |
39 | maven-resources-plugin
40 | 2.6
41 |
42 |
43 | copy-resources
44 | process-classes
45 |
46 | copy-resources
47 |
48 |
49 | ${basedir}/target/META-INF/native/${project.artifactId}
50 |
51 |
52 | ${basedir}/../lmdb/src/main/native
53 | false
54 |
55 | **/lmdb.h
56 | **/liblmdb.a
57 | **/liblmdb.so
58 | **/mdb_stat
59 | **/mdb_copy
60 | **/COPYRIGHT
61 | **/LICENSE
62 | **/CHANGES
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | org.apache.maven.plugins
72 | maven-jar-plugin
73 | 2.4
74 |
75 | ${basedir}/target
76 |
77 | META-INF/**
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/Makefile:
--------------------------------------------------------------------------------
1 | # Makefile for liblmdb (Lightning memory-mapped database library).
2 |
3 | ########################################################################
4 | # Configuration. The compiler options must enable threaded compilation.
5 | #
6 | # Preprocessor macros (for CPPFLAGS) of interest...
7 | # Note that the defaults should already be correct for most
8 | # platforms; you should not need to change any of these.
9 | # Read their descriptions in mdb.c if you do:
10 | #
11 | # - MDB_USE_POSIX_SEM
12 | # - MDB_DSYNC
13 | # - MDB_FDATASYNC
14 | # - MDB_USE_PWRITEV
15 | #
16 | # There may be other macros in mdb.c of interest. You should
17 | # read mdb.c before changing any of them.
18 | #
19 | CC = gcc
20 | W = -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized
21 | THREADS = -pthread
22 | OPT = -O2 -g
23 | CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS)
24 | LDLIBS =
25 | SOLIBS =
26 | prefix = /usr/local
27 |
28 | ########################################################################
29 |
30 | IHDRS = lmdb.h
31 | ILIBS = liblmdb.a liblmdb.so
32 | IPROGS = mdb_stat mdb_copy mdb_dump mdb_load
33 | IDOCS = mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1
34 | PROGS = $(IPROGS) mtest mtest2 mtest3 mtest4 mtest5
35 | all: $(ILIBS) $(PROGS)
36 |
37 | install: $(ILIBS) $(IPROGS) $(IHDRS)
38 | for f in $(IPROGS); do cp $$f $(DESTDIR)$(prefix)/bin; done
39 | for f in $(ILIBS); do cp $$f $(DESTDIR)$(prefix)/lib; done
40 | for f in $(IHDRS); do cp $$f $(DESTDIR)$(prefix)/include; done
41 | for f in $(IDOCS); do cp $$f $(DESTDIR)$(prefix)/man/man1; done
42 |
43 | clean:
44 | rm -rf $(PROGS) *.[ao] *.so *~ testdb
45 |
46 | test: all
47 | mkdir testdb
48 | ./mtest && ./mdb_stat testdb
49 |
50 | liblmdb.a: mdb.o midl.o
51 | ar rs $@ mdb.o midl.o
52 |
53 | liblmdb.so: mdb.o midl.o
54 | # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
55 | $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.o midl.o $(SOLIBS)
56 |
57 | mdb_stat: mdb_stat.o liblmdb.a
58 | mdb_copy: mdb_copy.o liblmdb.a
59 | mdb_dump: mdb_dump.o liblmdb.a
60 | mdb_load: mdb_load.o liblmdb.a
61 | mtest: mtest.o liblmdb.a
62 | mtest2: mtest2.o liblmdb.a
63 | mtest3: mtest3.o liblmdb.a
64 | mtest4: mtest4.o liblmdb.a
65 | mtest5: mtest5.o liblmdb.a
66 | mtest6: mtest6.o liblmdb.a
67 |
68 | mdb.o: mdb.c lmdb.h midl.h
69 | $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c mdb.c
70 |
71 | midl.o: midl.c midl.h
72 | $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c midl.c
73 |
74 | %: %.o
75 | $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
76 |
77 | %.o: %.c lmdb.h
78 | $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
79 |
80 | COV_FLAGS=-fprofile-arcs -ftest-coverage
81 | COV_OBJS=xmdb.o xmidl.o
82 |
83 | coverage: xmtest
84 | for i in mtest*.c [0-9]*.c; do j=`basename \$$i .c`; $(MAKE) $$j.o; \
85 | gcc -o x$$j $$j.o $(COV_OBJS) -pthread $(COV_FLAGS); \
86 | rm -rf testdb; mkdir testdb; ./x$$j; done
87 | gcov xmdb.c
88 | gcov xmidl.c
89 |
90 | xmtest: mtest.o xmdb.o xmidl.o
91 | gcc -o xmtest mtest.o xmdb.o xmidl.o -pthread $(COV_FLAGS)
92 |
93 | xmdb.o: mdb.c lmdb.h midl.h
94 | $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -O0 $(COV_FLAGS) -c mdb.c -o $@
95 |
96 | xmidl.o: midl.c midl.h
97 | $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -O0 $(COV_FLAGS) -c midl.c -o $@
98 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mtest2.c:
--------------------------------------------------------------------------------
1 | /* mtest2.c - memory-mapped database tester/toy */
2 | /*
3 | * Copyright 2011-2014 Howard Chu, Symas Corp.
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted only as authorized by the OpenLDAP
8 | * Public License.
9 | *
10 | * A copy of this license is available in the file LICENSE in the
11 | * top-level directory of the distribution or, alternatively, at
12 | * .
13 | */
14 |
15 | /* Just like mtest.c, but using a subDB instead of the main DB */
16 |
17 | #include
18 | #include
19 | #include
20 | #include "lmdb.h"
21 |
22 | #define E(expr) CHECK((rc = (expr)) == MDB_SUCCESS, #expr)
23 | #define RES(err, expr) ((rc = expr) == (err) || (CHECK(!rc, #expr), 0))
24 | #define CHECK(test, msg) ((test) ? (void)0 : ((void)fprintf(stderr, \
25 | "%s:%d: %s: %s\n", __FILE__, __LINE__, msg, mdb_strerror(rc)), abort()))
26 |
27 | int main(int argc,char * argv[])
28 | {
29 | int i = 0, j = 0, rc;
30 | MDB_env *env;
31 | MDB_dbi dbi;
32 | MDB_val key, data;
33 | MDB_txn *txn;
34 | MDB_stat mst;
35 | MDB_cursor *cursor;
36 | int count;
37 | int *values;
38 | char sval[32] = "";
39 |
40 | srand(time(NULL));
41 |
42 | count = (rand()%384) + 64;
43 | values = (int *)malloc(count*sizeof(int));
44 |
45 | for(i = 0;i -1; i-= (rand()%5)) {
85 | j++;
86 | txn=NULL;
87 | E(mdb_txn_begin(env, NULL, 0, &txn));
88 | sprintf(sval, "%03x ", values[i]);
89 | if (RES(MDB_NOTFOUND, mdb_del(txn, dbi, &key, NULL))) {
90 | j--;
91 | mdb_txn_abort(txn);
92 | } else {
93 | E(mdb_txn_commit(txn));
94 | }
95 | }
96 | free(values);
97 | printf("Deleted %d values\n", j);
98 |
99 | E(mdb_env_stat(env, &mst));
100 | E(mdb_txn_begin(env, NULL, 1, &txn));
101 | E(mdb_cursor_open(txn, dbi, &cursor));
102 | printf("Cursor next\n");
103 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) {
104 | printf("key: %.*s, data: %.*s\n",
105 | (int) key.mv_size, (char *) key.mv_data,
106 | (int) data.mv_size, (char *) data.mv_data);
107 | }
108 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
109 | printf("Cursor prev\n");
110 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_PREV)) == 0) {
111 | printf("key: %.*s, data: %.*s\n",
112 | (int) key.mv_size, (char *) key.mv_data,
113 | (int) data.mv_size, (char *) data.mv_data);
114 | }
115 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
116 | mdb_cursor_close(cursor);
117 | mdb_close(env, dbi);
118 |
119 | mdb_txn_abort(txn);
120 | mdb_env_close(env);
121 |
122 | return 0;
123 | }
124 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/CHANGES:
--------------------------------------------------------------------------------
1 | LMDB 0.9 Change Log
2 |
3 | LMDB 0.9.14 Engineering
4 | Fix to support 64K page size (ITS#7713)
5 | Fix to persist decreased as well as increased mapsizes (ITS#7789)
6 | Fix cursor bug when deleting last node of a DUPSORT key
7 | Fix mdb_env_info to return FIXEDMAP address
8 | Fix ambiguous error code from writing to closed DBI (ITS#7825)
9 | Fix mdb_copy copying past end of file (ITS#7886)
10 | Fix cursor bugs from page_merge/rebalance
11 | Fix to dirty fewer pages in deletes (mdb_page_loose())
12 | Fix Windows compat issues in mtests (ITS#7879)
13 | Add compacting variant of mdb_copy
14 | Add BigEndian integer key compare code
15 | Add mdb_dump/mdb_load utilities
16 |
17 | LMDB 0.9.13 Release (2014/06/18)
18 | Fix mdb_page_alloc unlimited overflow page search
19 | Documentation
20 | Re-fix MDB_CURRENT doc (ITS#7793)
21 | Fix MDB_GET_MULTIPLE/MDB_NEXT_MULTIPLE doc
22 |
23 | LMDB 0.9.12 Release (2014/06/13)
24 | Fix MDB_GET_BOTH regression (ITS#7875,#7681)
25 | Fix MDB_MULTIPLE writing multiple keys (ITS#7834)
26 | Fix mdb_rebalance (ITS#7829)
27 | Fix mdb_page_split (ITS#7815)
28 | Fix md_entries count (ITS#7861,#7828,#7793)
29 | Fix MDB_CURRENT (ITS#7793)
30 | Fix possible crash on Windows DLL detach
31 | Misc code cleanup
32 | Documentation
33 | mdb_cursor_put: cursor moves on error (ITS#7771)
34 |
35 |
36 | LMDB 0.9.11 Release (2014/01/15)
37 | Add mdb_env_set_assert() (ITS#7775)
38 | Fix: invalidate txn on page allocation errors (ITS#7377)
39 | Fix xcursor tracking in mdb_cursor_del0() (ITS#7771)
40 | Fix corruption from deletes (ITS#7756)
41 | Fix Windows/MSVC build issues
42 | Raise safe limit of max MDB_MAXKEYSIZE
43 | Misc code cleanup
44 | Documentation
45 | Remove spurious note about non-overlapping flags (ITS#7665)
46 |
47 | LMDB 0.9.10 Release (2013/11/12)
48 | Add MDB_NOMEMINIT option
49 | Fix mdb_page_split() again (ITS#7589)
50 | Fix MDB_NORDAHEAD definition (ITS#7734)
51 | Fix mdb_cursor_del() positioning (ITS#7733)
52 | Partial fix for larger page sizes (ITS#7713)
53 | Fix Windows64/MSVC build issues
54 |
55 | LMDB 0.9.9 Release (2013/10/24)
56 | Add mdb_env_get_fd()
57 | Add MDB_NORDAHEAD option
58 | Add MDB_NOLOCK option
59 | Avoid wasting space in mdb_page_split() (ITS#7589)
60 | Fix mdb_page_merge() cursor fixup (ITS#7722)
61 | Fix mdb_cursor_del() on last delete (ITS#7718)
62 | Fix adding WRITEMAP on existing env (ITS#7715)
63 | Fix nested txns (ITS#7515)
64 | Fix mdb_env_copy() O_DIRECT bug (ITS#7682)
65 | Fix mdb_cursor_set(SET_RANGE) return code (ITS#7681)
66 | Fix mdb_rebalance() cursor fixup (ITS#7701)
67 | Misc code cleanup
68 | Documentation
69 | Note that by default, readers need write access
70 |
71 |
72 | LMDB 0.9.8 Release (2013/09/09)
73 | Allow mdb_env_set_mapsize() on an open environment
74 | Fix mdb_dbi_flags() (ITS#7672)
75 | Fix mdb_page_unspill() in nested txns
76 | Fix mdb_cursor_get(CURRENT|NEXT) after a delete
77 | Fix mdb_cursor_get(DUP) to always return key (ITS#7671)
78 | Fix mdb_cursor_del() to always advance to next item (ITS#7670)
79 | Fix mdb_cursor_set(SET_RANGE) for tree with single page (ITS#7681)
80 | Fix mdb_env_copy() retry open if O_DIRECT fails (ITS#7682)
81 | Tweak mdb_page_spill() to be less aggressive
82 | Documentation
83 | Update caveats since mdb_reader_check() added in 0.9.7
84 |
85 | LMDB 0.9.7 Release (2013/08/17)
86 | Don't leave stale lockfile on failed RDONLY open (ITS#7664)
87 | Fix mdb_page_split() ref beyond cursor depth
88 | Fix read txn data race (ITS#7635)
89 | Fix mdb_rebalance (ITS#7536, #7538)
90 | Fix mdb_drop() (ITS#7561)
91 | Misc DEBUG macro fixes
92 | Add MDB_NOTLS envflag
93 | Add mdb_env_copyfd()
94 | Add mdb_txn_env() (ITS#7660)
95 | Add mdb_dbi_flags() (ITS#7661)
96 | Add mdb_env_get_maxkeysize()
97 | Add mdb_env_reader_list()/mdb_env_reader_check()
98 | Add mdb_page_spill/unspill, remove hard txn size limit
99 | Use shorter names for semaphores (ITS#7615)
100 | Build
101 | Fix install target (ITS#7656)
102 | Documentation
103 | Misc updates for cursors, DB handles, data lifetime
104 |
105 | LMDB 0.9.6 Release (2013/02/25)
106 | Many fixes/enhancements
107 |
108 | LMDB 0.9.5 Release (2012/11/30)
109 | Renamed from libmdb to liblmdb
110 | Many fixes/enhancements
111 |
--------------------------------------------------------------------------------
/lmdb-win64/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 4.0.0
5 |
6 | org.deephacks.lmdb
7 | lmdb-project
8 | 0.1.2-SNAPSHOT
9 |
10 |
11 | lmdb-win64
12 | 0.1.2-SNAPSHOT
13 | jar
14 |
15 | ${project.artifactId}
16 | lmdb
17 |
18 |
19 |
20 | org.codehaus.mojo
21 | exec-maven-plugin
22 | 1.2.1
23 |
24 |
25 | build-native
26 | compile
27 |
28 | exec
29 |
30 |
31 | make
32 |
33 |
42 | XCFLAGS=-fno-stack-check -fno-stack-protector -mno-stack-arg-probe -ffunction-sections
43 |
44 | ${basedir}/../lmdb/src/main/native
45 |
46 |
47 |
48 |
49 |
50 |
51 | maven-resources-plugin
52 | 2.6
53 |
54 |
55 | copy-resources
56 | process-classes
57 |
58 | copy-resources
59 |
60 |
61 | ${basedir}/target/META-INF/native/${project.artifactId}
62 |
63 |
64 | ${basedir}/../lmdb/src/main/native
65 | false
66 |
67 | **/lmdb.h
68 | **/liblmdb.a
69 | **/liblmdb.so
70 | **/mdb_stat
71 | **/mdb_copy
72 | **/COPYRIGHT
73 | **/LICENSE
74 | **/CHANGES
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | org.apache.maven.plugins
84 | maven-jar-plugin
85 | 2.4
86 |
87 | ${basedir}/target
88 |
89 | META-INF/**
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mtest3.c:
--------------------------------------------------------------------------------
1 | /* mtest3.c - memory-mapped database tester/toy */
2 | /*
3 | * Copyright 2011-2014 Howard Chu, Symas Corp.
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted only as authorized by the OpenLDAP
8 | * Public License.
9 | *
10 | * A copy of this license is available in the file LICENSE in the
11 | * top-level directory of the distribution or, alternatively, at
12 | * .
13 | */
14 |
15 | /* Tests for sorted duplicate DBs */
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include "lmdb.h"
21 |
22 | #define E(expr) CHECK((rc = (expr)) == MDB_SUCCESS, #expr)
23 | #define RES(err, expr) ((rc = expr) == (err) || (CHECK(!rc, #expr), 0))
24 | #define CHECK(test, msg) ((test) ? (void)0 : ((void)fprintf(stderr, \
25 | "%s:%d: %s: %s\n", __FILE__, __LINE__, msg, mdb_strerror(rc)), abort()))
26 |
27 | int main(int argc,char * argv[])
28 | {
29 | int i = 0, j = 0, rc;
30 | MDB_env *env;
31 | MDB_dbi dbi;
32 | MDB_val key, data;
33 | MDB_txn *txn;
34 | MDB_stat mst;
35 | MDB_cursor *cursor;
36 | int count;
37 | int *values;
38 | char sval[32];
39 | char kval[sizeof(int)];
40 |
41 | srand(time(NULL));
42 |
43 | memset(sval, 0, sizeof(sval));
44 |
45 | count = (rand()%384) + 64;
46 | values = (int *)malloc(count*sizeof(int));
47 |
48 | for(i = 0;i -1; i-= (rand()%5)) {
90 | j++;
91 | txn=NULL;
92 | E(mdb_txn_begin(env, NULL, 0, &txn));
93 | sprintf(kval, "%03x", values[i & ~0x0f]);
94 | sprintf(sval, "%03x %d foo bar", values[i], values[i]);
95 | key.mv_size = sizeof(int);
96 | key.mv_data = kval;
97 | data.mv_size = sizeof(sval);
98 | data.mv_data = sval;
99 | if (RES(MDB_NOTFOUND, mdb_del(txn, dbi, &key, &data))) {
100 | j--;
101 | mdb_txn_abort(txn);
102 | } else {
103 | E(mdb_txn_commit(txn));
104 | }
105 | }
106 | free(values);
107 | printf("Deleted %d values\n", j);
108 |
109 | E(mdb_env_stat(env, &mst));
110 | E(mdb_txn_begin(env, NULL, 1, &txn));
111 | E(mdb_cursor_open(txn, dbi, &cursor));
112 | printf("Cursor next\n");
113 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) {
114 | printf("key: %.*s, data: %.*s\n",
115 | (int) key.mv_size, (char *) key.mv_data,
116 | (int) data.mv_size, (char *) data.mv_data);
117 | }
118 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
119 | printf("Cursor prev\n");
120 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_PREV)) == 0) {
121 | printf("key: %.*s, data: %.*s\n",
122 | (int) key.mv_size, (char *) key.mv_data,
123 | (int) data.mv_size, (char *) data.mv_data);
124 | }
125 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
126 | mdb_cursor_close(cursor);
127 | mdb_close(env, dbi);
128 |
129 | mdb_txn_abort(txn);
130 | mdb_env_close(env);
131 |
132 | return 0;
133 | }
134 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mtest5.c:
--------------------------------------------------------------------------------
1 | /* mtest5.c - memory-mapped database tester/toy */
2 | /*
3 | * Copyright 2011-2014 Howard Chu, Symas Corp.
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted only as authorized by the OpenLDAP
8 | * Public License.
9 | *
10 | * A copy of this license is available in the file LICENSE in the
11 | * top-level directory of the distribution or, alternatively, at
12 | * .
13 | */
14 |
15 | /* Tests for sorted duplicate DBs using cursor_put */
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include "lmdb.h"
21 |
22 | #define E(expr) CHECK((rc = (expr)) == MDB_SUCCESS, #expr)
23 | #define RES(err, expr) ((rc = expr) == (err) || (CHECK(!rc, #expr), 0))
24 | #define CHECK(test, msg) ((test) ? (void)0 : ((void)fprintf(stderr, \
25 | "%s:%d: %s: %s\n", __FILE__, __LINE__, msg, mdb_strerror(rc)), abort()))
26 |
27 | int main(int argc,char * argv[])
28 | {
29 | int i = 0, j = 0, rc;
30 | MDB_env *env;
31 | MDB_dbi dbi;
32 | MDB_val key, data;
33 | MDB_txn *txn;
34 | MDB_stat mst;
35 | MDB_cursor *cursor;
36 | int count;
37 | int *values;
38 | char sval[32];
39 | char kval[sizeof(int)];
40 |
41 | srand(time(NULL));
42 |
43 | memset(sval, 0, sizeof(sval));
44 |
45 | count = (rand()%384) + 64;
46 | values = (int *)malloc(count*sizeof(int));
47 |
48 | for(i = 0;i -1; i-= (rand()%5)) {
92 | j++;
93 | txn=NULL;
94 | E(mdb_txn_begin(env, NULL, 0, &txn));
95 | sprintf(kval, "%03x", values[i & ~0x0f]);
96 | sprintf(sval, "%03x %d foo bar", values[i], values[i]);
97 | key.mv_size = sizeof(int);
98 | key.mv_data = kval;
99 | data.mv_size = sizeof(sval);
100 | data.mv_data = sval;
101 | if (RES(MDB_NOTFOUND, mdb_del(txn, dbi, &key, &data))) {
102 | j--;
103 | mdb_txn_abort(txn);
104 | } else {
105 | E(mdb_txn_commit(txn));
106 | }
107 | }
108 | free(values);
109 | printf("Deleted %d values\n", j);
110 |
111 | E(mdb_env_stat(env, &mst));
112 | E(mdb_txn_begin(env, NULL, 1, &txn));
113 | E(mdb_cursor_open(txn, dbi, &cursor));
114 | printf("Cursor next\n");
115 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) {
116 | printf("key: %.*s, data: %.*s\n",
117 | (int) key.mv_size, (char *) key.mv_data,
118 | (int) data.mv_size, (char *) data.mv_data);
119 | }
120 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
121 | printf("Cursor prev\n");
122 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_PREV)) == 0) {
123 | printf("key: %.*s, data: %.*s\n",
124 | (int) key.mv_size, (char *) key.mv_data,
125 | (int) data.mv_size, (char *) data.mv_data);
126 | }
127 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
128 | mdb_cursor_close(cursor);
129 | mdb_close(env, dbi);
130 |
131 | mdb_txn_abort(txn);
132 | mdb_env_close(env);
133 |
134 | return 0;
135 | }
136 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mtest6.c:
--------------------------------------------------------------------------------
1 | /* mtest6.c - memory-mapped database tester/toy */
2 | /*
3 | * Copyright 2011-2014 Howard Chu, Symas Corp.
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted only as authorized by the OpenLDAP
8 | * Public License.
9 | *
10 | * A copy of this license is available in the file LICENSE in the
11 | * top-level directory of the distribution or, alternatively, at
12 | * .
13 | */
14 |
15 | /* Tests for DB splits and merges */
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include "lmdb.h"
21 |
22 | #define E(expr) CHECK((rc = (expr)) == MDB_SUCCESS, #expr)
23 | #define RES(err, expr) ((rc = expr) == (err) || (CHECK(!rc, #expr), 0))
24 | #define CHECK(test, msg) ((test) ? (void)0 : ((void)fprintf(stderr, \
25 | "%s:%d: %s: %s\n", __FILE__, __LINE__, msg, mdb_strerror(rc)), abort()))
26 |
27 | char dkbuf[1024];
28 |
29 | int main(int argc,char * argv[])
30 | {
31 | int i = 0, j = 0, rc;
32 | MDB_env *env;
33 | MDB_dbi dbi;
34 | MDB_val key, data;
35 | MDB_txn *txn;
36 | MDB_stat mst;
37 | MDB_cursor *cursor;
38 | int count;
39 | int *values;
40 | long kval;
41 | char *sval;
42 |
43 | srand(time(NULL));
44 |
45 | E(mdb_env_create(&env));
46 | E(mdb_env_set_mapsize(env, 10485760));
47 | E(mdb_env_set_maxdbs(env, 4));
48 | E(mdb_env_open(env, "./testdb", MDB_FIXEDMAP|MDB_NOSYNC, 0664));
49 | E(mdb_txn_begin(env, NULL, 0, &txn));
50 | E(mdb_open(txn, "id6", MDB_CREATE|MDB_INTEGERKEY, &dbi));
51 | E(mdb_cursor_open(txn, dbi, &cursor));
52 | E(mdb_stat(txn, dbi, &mst));
53 |
54 | sval = calloc(1, mst.ms_psize / 4);
55 | key.mv_size = sizeof(long);
56 | key.mv_data = &kval;
57 | data.mv_size = mst.ms_psize / 4 - 30;
58 | data.mv_data = sval;
59 |
60 | printf("Adding 12 values, should yield 3 splits\n");
61 | for (i=0;i<12;i++) {
62 | kval = i*5;
63 | sprintf(sval, "%08x", kval);
64 | (void)RES(MDB_KEYEXIST, mdb_cursor_put(cursor, &key, &data, MDB_NOOVERWRITE));
65 | }
66 | printf("Adding 12 more values, should yield 3 splits\n");
67 | for (i=0;i<12;i++) {
68 | kval = i*5+4;
69 | sprintf(sval, "%08x", kval);
70 | (void)RES(MDB_KEYEXIST, mdb_cursor_put(cursor, &key, &data, MDB_NOOVERWRITE));
71 | }
72 | printf("Adding 12 more values, should yield 3 splits\n");
73 | for (i=0;i<12;i++) {
74 | kval = i*5+1;
75 | sprintf(sval, "%08x", kval);
76 | (void)RES(MDB_KEYEXIST, mdb_cursor_put(cursor, &key, &data, MDB_NOOVERWRITE));
77 | }
78 | E(mdb_cursor_get(cursor, &key, &data, MDB_FIRST));
79 |
80 | do {
81 | printf("key: %p %s, data: %p %.*s\n",
82 | key.mv_data, mdb_dkey(&key, dkbuf),
83 | data.mv_data, (int) data.mv_size, (char *) data.mv_data);
84 | } while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0);
85 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
86 | mdb_cursor_close(cursor);
87 | mdb_txn_commit(txn);
88 |
89 | #if 0
90 | j=0;
91 |
92 | for (i= count - 1; i > -1; i-= (rand()%5)) {
93 | j++;
94 | txn=NULL;
95 | E(mdb_txn_begin(env, NULL, 0, &txn));
96 | sprintf(kval, "%03x", values[i & ~0x0f]);
97 | sprintf(sval, "%03x %d foo bar", values[i], values[i]);
98 | key.mv_size = sizeof(int);
99 | key.mv_data = kval;
100 | data.mv_size = sizeof(sval);
101 | data.mv_data = sval;
102 | if (RES(MDB_NOTFOUND, mdb_del(txn, dbi, &key, &data))) {
103 | j--;
104 | mdb_txn_abort(txn);
105 | } else {
106 | E(mdb_txn_commit(txn));
107 | }
108 | }
109 | free(values);
110 | printf("Deleted %d values\n", j);
111 |
112 | E(mdb_env_stat(env, &mst));
113 | E(mdb_txn_begin(env, NULL, 1, &txn));
114 | E(mdb_cursor_open(txn, dbi, &cursor));
115 | printf("Cursor next\n");
116 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) {
117 | printf("key: %.*s, data: %.*s\n",
118 | (int) key.mv_size, (char *) key.mv_data,
119 | (int) data.mv_size, (char *) data.mv_data);
120 | }
121 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
122 | printf("Cursor prev\n");
123 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_PREV)) == 0) {
124 | printf("key: %.*s, data: %.*s\n",
125 | (int) key.mv_size, (char *) key.mv_data,
126 | (int) data.mv_size, (char *) data.mv_data);
127 | }
128 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
129 | mdb_cursor_close(cursor);
130 | mdb_close(env, dbi);
131 |
132 | mdb_txn_abort(txn);
133 | #endif
134 | mdb_env_close(env);
135 |
136 | return 0;
137 | }
138 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mtest4.c:
--------------------------------------------------------------------------------
1 | /* mtest4.c - memory-mapped database tester/toy */
2 | /*
3 | * Copyright 2011-2014 Howard Chu, Symas Corp.
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted only as authorized by the OpenLDAP
8 | * Public License.
9 | *
10 | * A copy of this license is available in the file LICENSE in the
11 | * top-level directory of the distribution or, alternatively, at
12 | * .
13 | */
14 |
15 | /* Tests for sorted duplicate DBs with fixed-size keys */
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include "lmdb.h"
21 |
22 | #define E(expr) CHECK((rc = (expr)) == MDB_SUCCESS, #expr)
23 | #define RES(err, expr) ((rc = expr) == (err) || (CHECK(!rc, #expr), 0))
24 | #define CHECK(test, msg) ((test) ? (void)0 : ((void)fprintf(stderr, \
25 | "%s:%d: %s: %s\n", __FILE__, __LINE__, msg, mdb_strerror(rc)), abort()))
26 |
27 | int main(int argc,char * argv[])
28 | {
29 | int i = 0, j = 0, rc;
30 | MDB_env *env;
31 | MDB_dbi dbi;
32 | MDB_val key, data;
33 | MDB_txn *txn;
34 | MDB_stat mst;
35 | MDB_cursor *cursor;
36 | int count;
37 | int *values;
38 | char sval[8];
39 | char kval[sizeof(int)];
40 |
41 | memset(sval, 0, sizeof(sval));
42 |
43 | count = 510;
44 | values = (int *)malloc(count*sizeof(int));
45 |
46 | for(i = 0;i -1; i-= (rand()%3)) {
126 | j++;
127 | txn=NULL;
128 | E(mdb_txn_begin(env, NULL, 0, &txn));
129 | sprintf(sval, "%07x", values[i]);
130 | key.mv_size = sizeof(int);
131 | key.mv_data = kval;
132 | data.mv_size = sizeof(sval);
133 | data.mv_data = sval;
134 | if (RES(MDB_NOTFOUND, mdb_del(txn, dbi, &key, &data))) {
135 | j--;
136 | mdb_txn_abort(txn);
137 | } else {
138 | E(mdb_txn_commit(txn));
139 | }
140 | }
141 | free(values);
142 | printf("Deleted %d values\n", j);
143 |
144 | E(mdb_env_stat(env, &mst));
145 | E(mdb_txn_begin(env, NULL, 1, &txn));
146 | E(mdb_cursor_open(txn, dbi, &cursor));
147 | printf("Cursor next\n");
148 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) {
149 | printf("key: %.*s, data: %.*s\n",
150 | (int) key.mv_size, (char *) key.mv_data,
151 | (int) data.mv_size, (char *) data.mv_data);
152 | }
153 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
154 | printf("Cursor prev\n");
155 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_PREV)) == 0) {
156 | printf("key: %.*s, data: %.*s\n",
157 | (int) key.mv_size, (char *) key.mv_data,
158 | (int) data.mv_size, (char *) data.mv_data);
159 | }
160 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
161 | mdb_cursor_close(cursor);
162 | mdb_close(env, dbi);
163 |
164 | mdb_txn_abort(txn);
165 | mdb_env_close(env);
166 |
167 | return 0;
168 | }
169 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mtest.c:
--------------------------------------------------------------------------------
1 | /* mtest.c - memory-mapped database tester/toy */
2 | /*
3 | * Copyright 2011-2014 Howard Chu, Symas Corp.
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted only as authorized by the OpenLDAP
8 | * Public License.
9 | *
10 | * A copy of this license is available in the file LICENSE in the
11 | * top-level directory of the distribution or, alternatively, at
12 | * .
13 | */
14 | #include
15 | #include
16 | #include
17 | #include "lmdb.h"
18 |
19 | #define E(expr) CHECK((rc = (expr)) == MDB_SUCCESS, #expr)
20 | #define RES(err, expr) ((rc = expr) == (err) || (CHECK(!rc, #expr), 0))
21 | #define CHECK(test, msg) ((test) ? (void)0 : ((void)fprintf(stderr, \
22 | "%s:%d: %s: %s\n", __FILE__, __LINE__, msg, mdb_strerror(rc)), abort()))
23 |
24 | int main(int argc,char * argv[])
25 | {
26 | int i = 0, j = 0, rc;
27 | MDB_env *env;
28 | MDB_dbi dbi;
29 | MDB_val key, data;
30 | MDB_txn *txn;
31 | MDB_stat mst;
32 | MDB_cursor *cursor, *cur2;
33 | MDB_cursor_op op;
34 | int count;
35 | int *values;
36 | char sval[32] = "";
37 |
38 | srand(time(NULL));
39 |
40 | count = (rand()%384) + 64;
41 | values = (int *)malloc(count*sizeof(int));
42 |
43 | for(i = 0;i -1; i-= (rand()%5)) {
85 | j++;
86 | txn=NULL;
87 | E(mdb_txn_begin(env, NULL, 0, &txn));
88 | sprintf(sval, "%03x ", values[i]);
89 | if (RES(MDB_NOTFOUND, mdb_del(txn, dbi, &key, NULL))) {
90 | j--;
91 | mdb_txn_abort(txn);
92 | } else {
93 | E(mdb_txn_commit(txn));
94 | }
95 | }
96 | free(values);
97 | printf("Deleted %d values\n", j);
98 |
99 | E(mdb_env_stat(env, &mst));
100 | E(mdb_txn_begin(env, NULL, 1, &txn));
101 | E(mdb_cursor_open(txn, dbi, &cursor));
102 | printf("Cursor next\n");
103 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) {
104 | printf("key: %.*s, data: %.*s\n",
105 | (int) key.mv_size, (char *) key.mv_data,
106 | (int) data.mv_size, (char *) data.mv_data);
107 | }
108 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
109 | printf("Cursor last\n");
110 | E(mdb_cursor_get(cursor, &key, &data, MDB_LAST));
111 | printf("key: %.*s, data: %.*s\n",
112 | (int) key.mv_size, (char *) key.mv_data,
113 | (int) data.mv_size, (char *) data.mv_data);
114 | printf("Cursor prev\n");
115 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_PREV)) == 0) {
116 | printf("key: %.*s, data: %.*s\n",
117 | (int) key.mv_size, (char *) key.mv_data,
118 | (int) data.mv_size, (char *) data.mv_data);
119 | }
120 | CHECK(rc == MDB_NOTFOUND, "mdb_cursor_get");
121 | printf("Cursor last/prev\n");
122 | E(mdb_cursor_get(cursor, &key, &data, MDB_LAST));
123 | printf("key: %.*s, data: %.*s\n",
124 | (int) key.mv_size, (char *) key.mv_data,
125 | (int) data.mv_size, (char *) data.mv_data);
126 | E(mdb_cursor_get(cursor, &key, &data, MDB_PREV));
127 | printf("key: %.*s, data: %.*s\n",
128 | (int) key.mv_size, (char *) key.mv_data,
129 | (int) data.mv_size, (char *) data.mv_data);
130 |
131 | mdb_txn_abort(txn);
132 |
133 | printf("Deleting with cursor\n");
134 | E(mdb_txn_begin(env, NULL, 0, &txn));
135 | E(mdb_cursor_open(txn, dbi, &cur2));
136 | for (i=0; i<50; i++) {
137 | if (RES(MDB_NOTFOUND, mdb_cursor_get(cur2, &key, &data, MDB_NEXT)))
138 | break;
139 | printf("key: %p %.*s, data: %p %.*s\n",
140 | key.mv_data, (int) key.mv_size, (char *) key.mv_data,
141 | data.mv_data, (int) data.mv_size, (char *) data.mv_data);
142 | E(mdb_del(txn, dbi, &key, NULL));
143 | }
144 |
145 | printf("Restarting cursor in txn\n");
146 | for (op=MDB_FIRST, i=0; i<=32; op=MDB_NEXT, i++) {
147 | if (RES(MDB_NOTFOUND, mdb_cursor_get(cur2, &key, &data, op)))
148 | break;
149 | printf("key: %p %.*s, data: %p %.*s\n",
150 | key.mv_data, (int) key.mv_size, (char *) key.mv_data,
151 | data.mv_data, (int) data.mv_size, (char *) data.mv_data);
152 | }
153 | mdb_cursor_close(cur2);
154 | E(mdb_txn_commit(txn));
155 |
156 | printf("Restarting cursor outside txn\n");
157 | E(mdb_txn_begin(env, NULL, 0, &txn));
158 | E(mdb_cursor_open(txn, dbi, &cursor));
159 | for (op=MDB_FIRST, i=0; i<=32; op=MDB_NEXT, i++) {
160 | if (RES(MDB_NOTFOUND, mdb_cursor_get(cursor, &key, &data, op)))
161 | break;
162 | printf("key: %p %.*s, data: %p %.*s\n",
163 | key.mv_data, (int) key.mv_size, (char *) key.mv_data,
164 | data.mv_data, (int) data.mv_size, (char *) data.mv_data);
165 | }
166 | mdb_cursor_close(cursor);
167 | mdb_close(env, dbi);
168 |
169 | mdb_txn_abort(txn);
170 | mdb_env_close(env);
171 |
172 | return 0;
173 | }
174 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/midl.h:
--------------------------------------------------------------------------------
1 | /** @file midl.h
2 | * @brief LMDB ID List header file.
3 | *
4 | * This file was originally part of back-bdb but has been
5 | * modified for use in libmdb. Most of the macros defined
6 | * in this file are unused, just left over from the original.
7 | *
8 | * This file is only used internally in libmdb and its definitions
9 | * are not exposed publicly.
10 | */
11 | /* $OpenLDAP$ */
12 | /* This work is part of OpenLDAP Software .
13 | *
14 | * Copyright 2000-2014 The OpenLDAP Foundation.
15 | * All rights reserved.
16 | *
17 | * Redistribution and use in source and binary forms, with or without
18 | * modification, are permitted only as authorized by the OpenLDAP
19 | * Public License.
20 | *
21 | * A copy of this license is available in the file LICENSE in the
22 | * top-level directory of the distribution or, alternatively, at
23 | * .
24 | */
25 |
26 | #ifndef _MDB_MIDL_H_
27 | #define _MDB_MIDL_H_
28 |
29 | #include
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif
34 |
35 | /** @defgroup internal LMDB Internals
36 | * @{
37 | */
38 |
39 | /** @defgroup idls ID List Management
40 | * @{
41 | */
42 | /** A generic unsigned ID number. These were entryIDs in back-bdb.
43 | * Preferably it should have the same size as a pointer.
44 | */
45 | typedef size_t MDB_ID;
46 |
47 | /** An IDL is an ID List, a sorted array of IDs. The first
48 | * element of the array is a counter for how many actual
49 | * IDs are in the list. In the original back-bdb code, IDLs are
50 | * sorted in ascending order. For libmdb IDLs are sorted in
51 | * descending order.
52 | */
53 | typedef MDB_ID *MDB_IDL;
54 |
55 | /* IDL sizes - likely should be even bigger
56 | * limiting factors: sizeof(ID), thread stack size
57 | */
58 | #define MDB_IDL_LOGN 16 /* DB_SIZE is 2^16, UM_SIZE is 2^17 */
59 | #define MDB_IDL_DB_SIZE (1<
2 |
3 |
4 | 4.0.0
5 | org.deephacks.lmdb
6 | lmdb-project
7 | 0.1.2-SNAPSHOT
8 | pom
9 |
10 | lmbd
11 | lmdb
12 | http://lmdb.deephacks.org
13 |
14 |
15 | lmdb
16 |
17 |
18 |
19 | github
20 | https://github.com/deephacks/lmdb/issues
21 |
22 |
23 | scm:git:git@github.com:deephacks/lmdb.git
24 | scm:git:git@github.com:deephacks/lmdb.git
25 | scm:git:git@github.com/deephacks/lmdb
26 |
27 |
28 |
29 | Licensed under the OpenLDAP Public License
30 | http://www.openldap.org/software/release/license.html
31 | repo
32 |
33 |
34 |
35 |
36 | Kristoffer Sjogren
37 | krisskross
38 | stoffe -at- gmail.com
39 |
40 |
41 | Developer
42 |
43 | http://stoffe.deephacks.org/
44 | +1
45 |
46 |
47 |
48 |
49 |
50 | junit
51 | junit
52 | 4.10
53 | test
54 |
55 |
56 |
57 |
58 |
59 |
60 | org.apache.maven.plugins
61 | maven-compiler-plugin
62 | 2.3.2
63 |
64 | 1.8
65 | 1.8
66 |
67 |
68 |
69 |
70 | maven-surefire-plugin
71 | org.apache.maven.plugins
72 | 2.10
73 |
74 | true
75 | false
76 | true
77 |
78 | **/*TestCase.java
79 | **/*TestSuite.java
80 | **/*Test.java
81 |
82 | true
83 |
84 |
85 |
86 | maven-jar-plugin
87 | org.apache.maven.plugins
88 | 2.3.2
89 |
90 |
91 |
92 | ${project.name}
93 | ${project.version}
94 | deephacks
95 | ${project.name}
96 | ${project.version}
97 | deephacks
98 | org.deephacks
99 | http://lmdb.deephacks.org
100 |
101 |
102 |
103 |
104 |
105 | org.apache.maven.plugins
106 | maven-source-plugin
107 | 2.1.2
108 |
109 |
110 | attach-sources
111 |
112 | jar
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 | sign-artifacts
123 |
124 |
125 | lmdb-osx64
126 |
127 |
128 |
129 |
130 | maven-javadoc-plugin
131 | org.apache.maven.plugins
132 | 2.8
133 |
134 |
135 | attach-javadocs
136 |
137 | jar
138 |
139 |
140 |
141 |
142 | aggregate
143 |
144 | site
145 |
146 |
147 |
148 |
149 | org.apache.maven.plugins
150 | maven-gpg-plugin
151 | 1.1
152 |
153 |
154 | sign-artifacts
155 | verify
156 |
157 | sign
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 | osx64
168 |
169 | lmdb-osx64
170 |
171 |
172 |
173 |
174 | linux64
175 |
176 | lmdb-linux64
177 |
178 |
179 |
180 |
181 | win64
182 |
183 | lmdb-win64
184 |
185 |
186 |
187 |
188 |
189 |
190 | sonatype-nexus-staging
191 | https://oss.sonatype.org/service/local/staging/deploy/maven2/
192 |
193 |
194 |
195 |
196 |
197 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mdb_stat.c:
--------------------------------------------------------------------------------
1 | /* mdb_stat.c - memory-mapped database status tool */
2 | /*
3 | * Copyright 2011-2013 Howard Chu, Symas Corp.
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted only as authorized by the OpenLDAP
8 | * Public License.
9 | *
10 | * A copy of this license is available in the file LICENSE in the
11 | * top-level directory of the distribution or, alternatively, at
12 | * .
13 | */
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include "lmdb.h"
19 |
20 | #ifdef _WIN32
21 | #define Z "I"
22 | #else
23 | #define Z "z"
24 | #endif
25 |
26 | static void prstat(MDB_stat *ms)
27 | {
28 | #if 0
29 | printf(" Page size: %u\n", ms->ms_psize);
30 | #endif
31 | printf(" Tree depth: %u\n", ms->ms_depth);
32 | printf(" Branch pages: %"Z"u\n", ms->ms_branch_pages);
33 | printf(" Leaf pages: %"Z"u\n", ms->ms_leaf_pages);
34 | printf(" Overflow pages: %"Z"u\n", ms->ms_overflow_pages);
35 | printf(" Entries: %"Z"u\n", ms->ms_entries);
36 | }
37 |
38 | static void usage(char *prog)
39 | {
40 | fprintf(stderr, "usage: %s dbpath [-V] [-n] [-e] [-r[r]] [-f[f[f]]] [-a|-s subdb]\n", prog);
41 | exit(EXIT_FAILURE);
42 | }
43 |
44 | int main(int argc, char *argv[])
45 | {
46 | int i, rc;
47 | MDB_env *env;
48 | MDB_txn *txn;
49 | MDB_dbi dbi;
50 | MDB_stat mst;
51 | MDB_envinfo mei;
52 | char *prog = argv[0];
53 | char *envname;
54 | char *subname = NULL;
55 | int alldbs = 0, envinfo = 0, envflags = 0, freinfo = 0, rdrinfo = 0;
56 |
57 | if (argc < 2) {
58 | usage(prog);
59 | }
60 |
61 | /* -a: print stat of main DB and all subDBs
62 | * -s: print stat of only the named subDB
63 | * -e: print env info
64 | * -f: print freelist info
65 | * -r: print reader info
66 | * -n: use NOSUBDIR flag on env_open
67 | * -V: print version and exit
68 | * (default) print stat of only the main DB
69 | */
70 | while ((i = getopt(argc, argv, "Vaefnrs:")) != EOF) {
71 | switch(i) {
72 | case 'V':
73 | printf("%s\n", MDB_VERSION_STRING);
74 | exit(0);
75 | break;
76 | case 'a':
77 | if (subname)
78 | usage(prog);
79 | alldbs++;
80 | break;
81 | case 'e':
82 | envinfo++;
83 | break;
84 | case 'f':
85 | freinfo++;
86 | break;
87 | case 'n':
88 | envflags |= MDB_NOSUBDIR;
89 | break;
90 | case 'r':
91 | rdrinfo++;
92 | break;
93 | case 's':
94 | if (alldbs)
95 | usage(prog);
96 | subname = optarg;
97 | break;
98 | default:
99 | usage(prog);
100 | }
101 | }
102 |
103 | if (optind != argc - 1)
104 | usage(prog);
105 |
106 | envname = argv[optind];
107 | rc = mdb_env_create(&env);
108 |
109 | if (alldbs || subname) {
110 | mdb_env_set_maxdbs(env, 4);
111 | }
112 |
113 | rc = mdb_env_open(env, envname, envflags | MDB_RDONLY, 0664);
114 | if (rc) {
115 | fprintf(stderr, "mdb_env_open failed, error %d %s\n", rc, mdb_strerror(rc));
116 | goto env_close;
117 | }
118 |
119 | if (envinfo) {
120 | rc = mdb_env_stat(env, &mst);
121 | rc = mdb_env_info(env, &mei);
122 | printf("Environment Info\n");
123 | printf(" Map address: %p\n", mei.me_mapaddr);
124 | printf(" Map size: %"Z"u\n", mei.me_mapsize);
125 | printf(" Page size: %u\n", mst.ms_psize);
126 | printf(" Max pages: %"Z"u\n", mei.me_mapsize / mst.ms_psize);
127 | printf(" Number of pages used: %"Z"u\n", mei.me_last_pgno+1);
128 | printf(" Last transaction ID: %"Z"u\n", mei.me_last_txnid);
129 | printf(" Max readers: %u\n", mei.me_maxreaders);
130 | printf(" Number of readers used: %u\n", mei.me_numreaders);
131 | }
132 |
133 | if (rdrinfo) {
134 | printf("Reader Table Status\n");
135 | rc = mdb_reader_list(env, (MDB_msg_func *)fputs, stdout);
136 | if (rdrinfo > 1) {
137 | int dead;
138 | mdb_reader_check(env, &dead);
139 | printf(" %d stale readers cleared.\n", dead);
140 | rc = mdb_reader_list(env, (MDB_msg_func *)fputs, stdout);
141 | }
142 | if (!(subname || alldbs || freinfo))
143 | goto env_close;
144 | }
145 |
146 | rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
147 | if (rc) {
148 | fprintf(stderr, "mdb_txn_begin failed, error %d %s\n", rc, mdb_strerror(rc));
149 | goto env_close;
150 | }
151 |
152 | if (freinfo) {
153 | MDB_cursor *cursor;
154 | MDB_val key, data;
155 | size_t pages = 0, *iptr;
156 |
157 | printf("Freelist Status\n");
158 | dbi = 0;
159 | rc = mdb_cursor_open(txn, dbi, &cursor);
160 | if (rc) {
161 | fprintf(stderr, "mdb_cursor_open failed, error %d %s\n", rc, mdb_strerror(rc));
162 | goto txn_abort;
163 | }
164 | rc = mdb_stat(txn, dbi, &mst);
165 | if (rc) {
166 | fprintf(stderr, "mdb_stat failed, error %d %s\n", rc, mdb_strerror(rc));
167 | goto txn_abort;
168 | }
169 | prstat(&mst);
170 | while ((rc = mdb_cursor_get(cursor, &key, &data, MDB_NEXT)) == 0) {
171 | iptr = data.mv_data;
172 | pages += *iptr;
173 | if (freinfo > 1) {
174 | char *bad = "";
175 | size_t pg, prev;
176 | ssize_t i, j, span = 0;
177 | j = *iptr++;
178 | for (i = j, prev = 1; --i >= 0; ) {
179 | pg = iptr[i];
180 | if (pg <= prev)
181 | bad = " [bad sequence]";
182 | prev = pg;
183 | pg += span;
184 | for (; i >= span && iptr[i-span] == pg; span++, pg++) ;
185 | }
186 | printf(" Transaction %"Z"u, %"Z"d pages, maxspan %"Z"d%s\n",
187 | *(size_t *)key.mv_data, j, span, bad);
188 | if (freinfo > 2) {
189 | for (--j; j >= 0; ) {
190 | pg = iptr[j];
191 | for (span=1; --j >= 0 && iptr[j] == pg+span; span++) ;
192 | printf(span>1 ? " %9"Z"u[%"Z"d]\n" : " %9"Z"u\n",
193 | pg, span);
194 | }
195 | }
196 | }
197 | }
198 | mdb_cursor_close(cursor);
199 | printf(" Free pages: %"Z"u\n", pages);
200 | }
201 |
202 | rc = mdb_open(txn, subname, 0, &dbi);
203 | if (rc) {
204 | fprintf(stderr, "mdb_open failed, error %d %s\n", rc, mdb_strerror(rc));
205 | goto txn_abort;
206 | }
207 |
208 | rc = mdb_stat(txn, dbi, &mst);
209 | if (rc) {
210 | fprintf(stderr, "mdb_stat failed, error %d %s\n", rc, mdb_strerror(rc));
211 | goto txn_abort;
212 | }
213 | printf("Status of %s\n", subname ? subname : "Main DB");
214 | prstat(&mst);
215 |
216 | if (alldbs) {
217 | MDB_cursor *cursor;
218 | MDB_val key;
219 |
220 | rc = mdb_cursor_open(txn, dbi, &cursor);
221 | if (rc) {
222 | fprintf(stderr, "mdb_cursor_open failed, error %d %s\n", rc, mdb_strerror(rc));
223 | goto txn_abort;
224 | }
225 | while ((rc = mdb_cursor_get(cursor, &key, NULL, MDB_NEXT_NODUP)) == 0) {
226 | char *str;
227 | MDB_dbi db2;
228 | if (memchr(key.mv_data, '\0', key.mv_size))
229 | continue;
230 | str = malloc(key.mv_size+1);
231 | memcpy(str, key.mv_data, key.mv_size);
232 | str[key.mv_size] = '\0';
233 | rc = mdb_open(txn, str, 0, &db2);
234 | if (rc == MDB_SUCCESS)
235 | printf("Status of %s\n", str);
236 | free(str);
237 | if (rc) continue;
238 | rc = mdb_stat(txn, db2, &mst);
239 | if (rc) {
240 | fprintf(stderr, "mdb_stat failed, error %d %s\n", rc, mdb_strerror(rc));
241 | goto txn_abort;
242 | }
243 | prstat(&mst);
244 | mdb_close(env, db2);
245 | }
246 | mdb_cursor_close(cursor);
247 | }
248 |
249 | if (rc == MDB_NOTFOUND)
250 | rc = MDB_SUCCESS;
251 |
252 | mdb_close(env, dbi);
253 | txn_abort:
254 | mdb_txn_abort(txn);
255 | env_close:
256 | mdb_env_close(env);
257 |
258 | return rc ? EXIT_FAILURE : EXIT_SUCCESS;
259 | }
260 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mdb_dump.c:
--------------------------------------------------------------------------------
1 | /* mdb_dump.c - memory-mapped database dump tool */
2 | /*
3 | * Copyright 2011-2014 Howard Chu, Symas Corp.
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted only as authorized by the OpenLDAP
8 | * Public License.
9 | *
10 | * A copy of this license is available in the file LICENSE in the
11 | * top-level directory of the distribution or, alternatively, at
12 | * .
13 | */
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include "lmdb.h"
22 |
23 | #ifdef _WIN32
24 | #define Z "I"
25 | #else
26 | #define Z "z"
27 | #endif
28 |
29 | #define PRINT 1
30 | static int mode;
31 |
32 | typedef struct flagbit {
33 | int bit;
34 | char *name;
35 | } flagbit;
36 |
37 | flagbit dbflags[] = {
38 | { MDB_REVERSEKEY, "reversekey" },
39 | { MDB_DUPSORT, "dupsort" },
40 | { MDB_INTEGERKEY, "integerkey" },
41 | { MDB_DUPFIXED, "dupfixed" },
42 | { MDB_INTEGERDUP, "integerdup" },
43 | { MDB_REVERSEDUP, "reversedup" },
44 | { 0, NULL }
45 | };
46 |
47 | static volatile sig_atomic_t gotsig;
48 |
49 | static void dumpsig( int sig )
50 | {
51 | gotsig=1;
52 | }
53 |
54 | static const char hexc[] = "0123456789abcdef";
55 |
56 | static void hex(unsigned char c)
57 | {
58 | putchar(hexc[c >> 4]);
59 | putchar(hexc[c & 0xf]);
60 | }
61 |
62 | static void text(MDB_val *v)
63 | {
64 | unsigned char *c, *end;
65 |
66 | putchar(' ');
67 | c = v->mv_data;
68 | end = c + v->mv_size;
69 | while (c < end) {
70 | if (isprint(*c)) {
71 | putchar(*c);
72 | } else {
73 | putchar('\\');
74 | hex(*c);
75 | }
76 | c++;
77 | }
78 | putchar('\n');
79 | }
80 |
81 | static void byte(MDB_val *v)
82 | {
83 | unsigned char *c, *end;
84 |
85 | putchar(' ');
86 | c = v->mv_data;
87 | end = c + v->mv_size;
88 | while (c < end) {
89 | hex(*c++);
90 | }
91 | putchar('\n');
92 | }
93 |
94 | /* Dump in BDB-compatible format */
95 | static int dumpit(MDB_txn *txn, MDB_dbi dbi, char *name)
96 | {
97 | MDB_cursor *mc;
98 | MDB_stat ms;
99 | MDB_val key, data;
100 | MDB_envinfo info;
101 | unsigned int flags;
102 | int rc, i;
103 |
104 | rc = mdb_dbi_flags(txn, dbi, &flags);
105 | if (rc) return rc;
106 |
107 | rc = mdb_stat(txn, dbi, &ms);
108 | if (rc) return rc;
109 |
110 | rc = mdb_env_info(mdb_txn_env(txn), &info);
111 | if (rc) return rc;
112 |
113 | printf("VERSION=3\n");
114 | printf("format=%s\n", mode & PRINT ? "print" : "bytevalue");
115 | if (name)
116 | printf("database=%s\n", name);
117 | printf("type=btree\n");
118 | printf("mapsize=%" Z "u\n", info.me_mapsize);
119 | if (info.me_mapaddr)
120 | printf("mapaddr=%p\n", info.me_mapaddr);
121 | printf("maxreaders=%u\n", info.me_maxreaders);
122 |
123 | if (flags & MDB_DUPSORT)
124 | printf("duplicates=1\n");
125 |
126 | for (i=0; dbflags[i].bit; i++)
127 | if (flags & dbflags[i].bit)
128 | printf("%s=1\n", dbflags[i].name);
129 |
130 | printf("db_pagesize=%d\n", ms.ms_psize);
131 | printf("HEADER=END\n");
132 |
133 | rc = mdb_cursor_open(txn, dbi, &mc);
134 | if (rc) return rc;
135 |
136 | while ((rc = mdb_cursor_get(mc, &key, &data, MDB_NEXT) == MDB_SUCCESS)) {
137 | if (gotsig) {
138 | rc = EINTR;
139 | break;
140 | }
141 | if (mode & PRINT) {
142 | text(&key);
143 | text(&data);
144 | } else {
145 | byte(&key);
146 | byte(&data);
147 | }
148 | }
149 | printf("DATA=END\n");
150 | if (rc == MDB_NOTFOUND)
151 | rc = MDB_SUCCESS;
152 |
153 | return rc;
154 | }
155 |
156 | static void usage(char *prog)
157 | {
158 | fprintf(stderr, "usage: %s dbpath [-V] [-f output] [-l] [-n] [-p] [-a|-s subdb]\n", prog);
159 | exit(EXIT_FAILURE);
160 | }
161 |
162 | int main(int argc, char *argv[])
163 | {
164 | int i, rc;
165 | MDB_env *env;
166 | MDB_txn *txn;
167 | MDB_dbi dbi;
168 | char *prog = argv[0];
169 | char *envname;
170 | char *subname = NULL;
171 | int alldbs = 0, envflags = 0, list = 0;
172 |
173 | if (argc < 2) {
174 | usage(prog);
175 | }
176 |
177 | /* -a: dump main DB and all subDBs
178 | * -s: dump only the named subDB
179 | * -n: use NOSUBDIR flag on env_open
180 | * -p: use printable characters
181 | * -f: write to file instead of stdout
182 | * -V: print version and exit
183 | * (default) dump only the main DB
184 | */
185 | while ((i = getopt(argc, argv, "af:lnps:V")) != EOF) {
186 | switch(i) {
187 | case 'V':
188 | printf("%s\n", MDB_VERSION_STRING);
189 | exit(0);
190 | break;
191 | case 'l':
192 | list = 1;
193 | /*FALLTHROUGH*/;
194 | case 'a':
195 | if (subname)
196 | usage(prog);
197 | alldbs++;
198 | break;
199 | case 'f':
200 | if (freopen(optarg, "w", stdout) == NULL) {
201 | fprintf(stderr, "%s: %s: reopen: %s\n",
202 | prog, optarg, strerror(errno));
203 | exit(EXIT_FAILURE);
204 | }
205 | break;
206 | case 'n':
207 | envflags |= MDB_NOSUBDIR;
208 | break;
209 | case 'p':
210 | mode |= PRINT;
211 | break;
212 | case 's':
213 | if (alldbs)
214 | usage(prog);
215 | subname = optarg;
216 | break;
217 | default:
218 | usage(prog);
219 | }
220 | }
221 |
222 | if (optind != argc - 1)
223 | usage(prog);
224 |
225 | #ifdef SIGPIPE
226 | signal(SIGPIPE, dumpsig);
227 | #endif
228 | #ifdef SIGHUP
229 | signal(SIGHUP, dumpsig);
230 | #endif
231 | signal(SIGINT, dumpsig);
232 | signal(SIGTERM, dumpsig);
233 |
234 | envname = argv[optind];
235 | rc = mdb_env_create(&env);
236 |
237 | if (alldbs || subname) {
238 | mdb_env_set_maxdbs(env, 2);
239 | }
240 |
241 | rc = mdb_env_open(env, envname, envflags | MDB_RDONLY, 0664);
242 | if (rc) {
243 | fprintf(stderr, "mdb_env_open failed, error %d %s\n", rc, mdb_strerror(rc));
244 | goto env_close;
245 | }
246 |
247 | rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn);
248 | if (rc) {
249 | fprintf(stderr, "mdb_txn_begin failed, error %d %s\n", rc, mdb_strerror(rc));
250 | goto env_close;
251 | }
252 |
253 | rc = mdb_open(txn, subname, 0, &dbi);
254 | if (rc) {
255 | fprintf(stderr, "mdb_open failed, error %d %s\n", rc, mdb_strerror(rc));
256 | goto txn_abort;
257 | }
258 |
259 | if (alldbs) {
260 | MDB_cursor *cursor;
261 | MDB_val key;
262 | int count = 0;
263 |
264 | rc = mdb_cursor_open(txn, dbi, &cursor);
265 | if (rc) {
266 | fprintf(stderr, "mdb_cursor_open failed, error %d %s\n", rc, mdb_strerror(rc));
267 | goto txn_abort;
268 | }
269 | while ((rc = mdb_cursor_get(cursor, &key, NULL, MDB_NEXT_NODUP)) == 0) {
270 | char *str;
271 | MDB_dbi db2;
272 | if (memchr(key.mv_data, '\0', key.mv_size))
273 | continue;
274 | count++;
275 | str = malloc(key.mv_size+1);
276 | memcpy(str, key.mv_data, key.mv_size);
277 | str[key.mv_size] = '\0';
278 | rc = mdb_open(txn, str, 0, &db2);
279 | if (rc == MDB_SUCCESS) {
280 | if (list) {
281 | printf("%s\n", str);
282 | list++;
283 | } else {
284 | rc = dumpit(txn, db2, str);
285 | if (rc)
286 | break;
287 | }
288 | mdb_close(env, db2);
289 | }
290 | free(str);
291 | if (rc) continue;
292 | }
293 | mdb_cursor_close(cursor);
294 | if (!count) {
295 | fprintf(stderr, "%s: %s does not contain multiple databases\n", prog, envname);
296 | rc = MDB_NOTFOUND;
297 | } else if (rc == MDB_NOTFOUND) {
298 | rc = MDB_SUCCESS;
299 | }
300 | } else {
301 | rc = dumpit(txn, dbi, subname);
302 | }
303 | if (rc && rc != MDB_NOTFOUND)
304 | fprintf(stderr, "%s: %s: %s\n", prog, envname, mdb_strerror(rc));
305 |
306 | mdb_close(env, dbi);
307 | txn_abort:
308 | mdb_txn_abort(txn);
309 | env_close:
310 | mdb_env_close(env);
311 |
312 | return rc ? EXIT_FAILURE : EXIT_SUCCESS;
313 | }
314 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/midl.c:
--------------------------------------------------------------------------------
1 | /** @file midl.c
2 | * @brief ldap bdb back-end ID List functions */
3 | /* $OpenLDAP$ */
4 | /* This work is part of OpenLDAP Software .
5 | *
6 | * Copyright 2000-2014 The OpenLDAP Foundation.
7 | * All rights reserved.
8 | *
9 | * Redistribution and use in source and binary forms, with or without
10 | * modification, are permitted only as authorized by the OpenLDAP
11 | * Public License.
12 | *
13 | * A copy of this license is available in the file LICENSE in the
14 | * top-level directory of the distribution or, alternatively, at
15 | * .
16 | */
17 |
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include "midl.h"
24 |
25 | /** @defgroup internal LMDB Internals
26 | * @{
27 | */
28 | /** @defgroup idls ID List Management
29 | * @{
30 | */
31 | #define CMP(x,y) ( (x) < (y) ? -1 : (x) > (y) )
32 |
33 | unsigned mdb_midl_search( MDB_IDL ids, MDB_ID id )
34 | {
35 | /*
36 | * binary search of id in ids
37 | * if found, returns position of id
38 | * if not found, returns first position greater than id
39 | */
40 | unsigned base = 0;
41 | unsigned cursor = 1;
42 | int val = 0;
43 | unsigned n = ids[0];
44 |
45 | while( 0 < n ) {
46 | unsigned pivot = n >> 1;
47 | cursor = base + pivot + 1;
48 | val = CMP( ids[cursor], id );
49 |
50 | if( val < 0 ) {
51 | n = pivot;
52 |
53 | } else if ( val > 0 ) {
54 | base = cursor;
55 | n -= pivot + 1;
56 |
57 | } else {
58 | return cursor;
59 | }
60 | }
61 |
62 | if( val > 0 ) {
63 | ++cursor;
64 | }
65 | return cursor;
66 | }
67 |
68 | #if 0 /* superseded by append/sort */
69 | int mdb_midl_insert( MDB_IDL ids, MDB_ID id )
70 | {
71 | unsigned x, i;
72 |
73 | x = mdb_midl_search( ids, id );
74 | assert( x > 0 );
75 |
76 | if( x < 1 ) {
77 | /* internal error */
78 | return -2;
79 | }
80 |
81 | if ( x <= ids[0] && ids[x] == id ) {
82 | /* duplicate */
83 | assert(0);
84 | return -1;
85 | }
86 |
87 | if ( ++ids[0] >= MDB_IDL_DB_MAX ) {
88 | /* no room */
89 | --ids[0];
90 | return -2;
91 |
92 | } else {
93 | /* insert id */
94 | for (i=ids[0]; i>x; i--)
95 | ids[i] = ids[i-1];
96 | ids[x] = id;
97 | }
98 |
99 | return 0;
100 | }
101 | #endif
102 |
103 | MDB_IDL mdb_midl_alloc(int num)
104 | {
105 | MDB_IDL ids = malloc((num+2) * sizeof(MDB_ID));
106 | if (ids) {
107 | *ids++ = num;
108 | *ids = 0;
109 | }
110 | return ids;
111 | }
112 |
113 | void mdb_midl_free(MDB_IDL ids)
114 | {
115 | if (ids)
116 | free(ids-1);
117 | }
118 |
119 | int mdb_midl_shrink( MDB_IDL *idp )
120 | {
121 | MDB_IDL ids = *idp;
122 | if (*(--ids) > MDB_IDL_UM_MAX &&
123 | (ids = realloc(ids, (MDB_IDL_UM_MAX+1) * sizeof(MDB_ID))))
124 | {
125 | *ids++ = MDB_IDL_UM_MAX;
126 | *idp = ids;
127 | return 1;
128 | }
129 | return 0;
130 | }
131 |
132 | static int mdb_midl_grow( MDB_IDL *idp, int num )
133 | {
134 | MDB_IDL idn = *idp-1;
135 | /* grow it */
136 | idn = realloc(idn, (*idn + num + 2) * sizeof(MDB_ID));
137 | if (!idn)
138 | return ENOMEM;
139 | *idn++ += num;
140 | *idp = idn;
141 | return 0;
142 | }
143 |
144 | int mdb_midl_need( MDB_IDL *idp, unsigned num )
145 | {
146 | MDB_IDL ids = *idp;
147 | num += ids[0];
148 | if (num > ids[-1]) {
149 | num = (num + num/4 + (256 + 2)) & -256;
150 | if (!(ids = realloc(ids-1, num * sizeof(MDB_ID))))
151 | return ENOMEM;
152 | *ids++ = num - 2;
153 | *idp = ids;
154 | }
155 | return 0;
156 | }
157 |
158 | int mdb_midl_append( MDB_IDL *idp, MDB_ID id )
159 | {
160 | MDB_IDL ids = *idp;
161 | /* Too big? */
162 | if (ids[0] >= ids[-1]) {
163 | if (mdb_midl_grow(idp, MDB_IDL_UM_MAX))
164 | return ENOMEM;
165 | ids = *idp;
166 | }
167 | ids[0]++;
168 | ids[ids[0]] = id;
169 | return 0;
170 | }
171 |
172 | int mdb_midl_append_list( MDB_IDL *idp, MDB_IDL app )
173 | {
174 | MDB_IDL ids = *idp;
175 | /* Too big? */
176 | if (ids[0] + app[0] >= ids[-1]) {
177 | if (mdb_midl_grow(idp, app[0]))
178 | return ENOMEM;
179 | ids = *idp;
180 | }
181 | memcpy(&ids[ids[0]+1], &app[1], app[0] * sizeof(MDB_ID));
182 | ids[0] += app[0];
183 | return 0;
184 | }
185 |
186 | int mdb_midl_append_range( MDB_IDL *idp, MDB_ID id, unsigned n )
187 | {
188 | MDB_ID *ids = *idp, len = ids[0];
189 | /* Too big? */
190 | if (len + n > ids[-1]) {
191 | if (mdb_midl_grow(idp, n | MDB_IDL_UM_MAX))
192 | return ENOMEM;
193 | ids = *idp;
194 | }
195 | ids[0] = len + n;
196 | ids += len;
197 | while (n)
198 | ids[n--] = id++;
199 | return 0;
200 | }
201 |
202 | /* Quicksort + Insertion sort for small arrays */
203 |
204 | #define SMALL 8
205 | #define MIDL_SWAP(a,b) { itmp=(a); (a)=(b); (b)=itmp; }
206 |
207 | void
208 | mdb_midl_sort( MDB_IDL ids )
209 | {
210 | /* Max possible depth of int-indexed tree * 2 items/level */
211 | int istack[sizeof(int)*CHAR_BIT * 2];
212 | int i,j,k,l,ir,jstack;
213 | MDB_ID a, itmp;
214 |
215 | ir = (int)ids[0];
216 | l = 1;
217 | jstack = 0;
218 | for(;;) {
219 | if (ir - l < SMALL) { /* Insertion sort */
220 | for (j=l+1;j<=ir;j++) {
221 | a = ids[j];
222 | for (i=j-1;i>=1;i--) {
223 | if (ids[i] >= a) break;
224 | ids[i+1] = ids[i];
225 | }
226 | ids[i+1] = a;
227 | }
228 | if (jstack == 0) break;
229 | ir = istack[jstack--];
230 | l = istack[jstack--];
231 | } else {
232 | k = (l + ir) >> 1; /* Choose median of left, center, right */
233 | MIDL_SWAP(ids[k], ids[l+1]);
234 | if (ids[l] < ids[ir]) {
235 | MIDL_SWAP(ids[l], ids[ir]);
236 | }
237 | if (ids[l+1] < ids[ir]) {
238 | MIDL_SWAP(ids[l+1], ids[ir]);
239 | }
240 | if (ids[l] < ids[l+1]) {
241 | MIDL_SWAP(ids[l], ids[l+1]);
242 | }
243 | i = l+1;
244 | j = ir;
245 | a = ids[l+1];
246 | for(;;) {
247 | do i++; while(ids[i] > a);
248 | do j--; while(ids[j] < a);
249 | if (j < i) break;
250 | MIDL_SWAP(ids[i],ids[j]);
251 | }
252 | ids[l+1] = ids[j];
253 | ids[j] = a;
254 | jstack += 2;
255 | if (ir-i+1 >= j-l) {
256 | istack[jstack] = ir;
257 | istack[jstack-1] = i;
258 | ir = j-1;
259 | } else {
260 | istack[jstack] = j-1;
261 | istack[jstack-1] = l;
262 | l = i;
263 | }
264 | }
265 | }
266 | }
267 |
268 | unsigned mdb_mid2l_search( MDB_ID2L ids, MDB_ID id )
269 | {
270 | /*
271 | * binary search of id in ids
272 | * if found, returns position of id
273 | * if not found, returns first position greater than id
274 | */
275 | unsigned base = 0;
276 | unsigned cursor = 1;
277 | int val = 0;
278 | unsigned n = (unsigned)ids[0].mid;
279 |
280 | while( 0 < n ) {
281 | unsigned pivot = n >> 1;
282 | cursor = base + pivot + 1;
283 | val = CMP( id, ids[cursor].mid );
284 |
285 | if( val < 0 ) {
286 | n = pivot;
287 |
288 | } else if ( val > 0 ) {
289 | base = cursor;
290 | n -= pivot + 1;
291 |
292 | } else {
293 | return cursor;
294 | }
295 | }
296 |
297 | if( val > 0 ) {
298 | ++cursor;
299 | }
300 | return cursor;
301 | }
302 |
303 | int mdb_mid2l_insert( MDB_ID2L ids, MDB_ID2 *id )
304 | {
305 | unsigned x, i;
306 |
307 | x = mdb_mid2l_search( ids, id->mid );
308 |
309 | if( x < 1 ) {
310 | /* internal error */
311 | return -2;
312 | }
313 |
314 | if ( x <= ids[0].mid && ids[x].mid == id->mid ) {
315 | /* duplicate */
316 | return -1;
317 | }
318 |
319 | if ( ids[0].mid >= MDB_IDL_UM_MAX ) {
320 | /* too big */
321 | return -2;
322 |
323 | } else {
324 | /* insert id */
325 | ids[0].mid++;
326 | for (i=(unsigned)ids[0].mid; i>x; i--)
327 | ids[i] = ids[i-1];
328 | ids[x] = *id;
329 | }
330 |
331 | return 0;
332 | }
333 |
334 | int mdb_mid2l_append( MDB_ID2L ids, MDB_ID2 *id )
335 | {
336 | /* Too big? */
337 | if (ids[0].mid >= MDB_IDL_UM_MAX) {
338 | return -2;
339 | }
340 | ids[0].mid++;
341 | ids[ids[0].mid] = *id;
342 | return 0;
343 | }
344 |
345 | /** @} */
346 | /** @} */
347 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/mdb_load.c:
--------------------------------------------------------------------------------
1 | /* mdb_load.c - memory-mapped database load tool */
2 | /*
3 | * Copyright 2011-2014 Howard Chu, Symas Corp.
4 | * All rights reserved.
5 | *
6 | * Redistribution and use in source and binary forms, with or without
7 | * modification, are permitted only as authorized by the OpenLDAP
8 | * Public License.
9 | *
10 | * A copy of this license is available in the file LICENSE in the
11 | * top-level directory of the distribution or, alternatively, at
12 | * .
13 | */
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include "lmdb.h"
21 |
22 | #define PRINT 1
23 | #define NOHDR 2
24 | static int mode;
25 |
26 | static char *subname = NULL;
27 |
28 | static size_t lineno;
29 | static int version;
30 |
31 | static int flags;
32 |
33 | static char *prog;
34 |
35 | static int Eof;
36 |
37 | static MDB_envinfo info;
38 |
39 | static MDB_val kbuf, dbuf;
40 |
41 | #ifdef _WIN32
42 | #define Z "I"
43 | #else
44 | #define Z "z"
45 | #endif
46 |
47 | #define STRLENOF(s) (sizeof(s)-1)
48 |
49 | typedef struct flagbit {
50 | int bit;
51 | char *name;
52 | int len;
53 | } flagbit;
54 |
55 | #define S(s) s, STRLENOF(s)
56 |
57 | flagbit dbflags[] = {
58 | { MDB_REVERSEKEY, S("reversekey") },
59 | { MDB_DUPSORT, S("dupsort") },
60 | { MDB_INTEGERKEY, S("integerkey") },
61 | { MDB_DUPFIXED, S("dupfixed") },
62 | { MDB_INTEGERDUP, S("integerdup") },
63 | { MDB_REVERSEDUP, S("reversedup") },
64 | { 0, NULL, 0 }
65 | };
66 |
67 | static const char hexc[] = "0123456789abcdef";
68 |
69 | static void readhdr(void)
70 | {
71 | char *ptr;
72 |
73 | while (fgets(dbuf.mv_data, dbuf.mv_size, stdin) != NULL) {
74 | lineno++;
75 | if (!strncmp(dbuf.mv_data, "VERSION=", STRLENOF("VERSION="))) {
76 | version=atoi((char *)dbuf.mv_data+STRLENOF("VERSION="));
77 | if (version > 3) {
78 | fprintf(stderr, "%s: line %" Z "d: unsupported VERSION %d\n",
79 | prog, lineno, version);
80 | exit(EXIT_FAILURE);
81 | }
82 | } else if (!strncmp(dbuf.mv_data, "HEADER=END", STRLENOF("HEADER=END"))) {
83 | break;
84 | } else if (!strncmp(dbuf.mv_data, "format=", STRLENOF("format="))) {
85 | if (!strncmp((char *)dbuf.mv_data+STRLENOF("FORMAT="), "print", STRLENOF("print")))
86 | mode |= PRINT;
87 | else if (strncmp((char *)dbuf.mv_data+STRLENOF("FORMAT="), "bytevalue", STRLENOF("bytevalue"))) {
88 | fprintf(stderr, "%s: line %" Z "d: unsupported FORMAT %s\n",
89 | prog, lineno, (char *)dbuf.mv_data+STRLENOF("FORMAT="));
90 | exit(EXIT_FAILURE);
91 | }
92 | } else if (!strncmp(dbuf.mv_data, "database=", STRLENOF("database="))) {
93 | ptr = memchr(dbuf.mv_data, '\n', dbuf.mv_size);
94 | if (ptr) *ptr = '\0';
95 | if (subname) free(subname);
96 | subname = strdup((char *)dbuf.mv_data+STRLENOF("database="));
97 | } else if (!strncmp(dbuf.mv_data, "type=", STRLENOF("type="))) {
98 | if (strncmp((char *)dbuf.mv_data+STRLENOF("type="), "btree", STRLENOF("btree"))) {
99 | fprintf(stderr, "%s: line %" Z "d: unsupported type %s\n",
100 | prog, lineno, (char *)dbuf.mv_data+STRLENOF("type="));
101 | exit(EXIT_FAILURE);
102 | }
103 | } else if (!strncmp(dbuf.mv_data, "mapaddr=", STRLENOF("mapaddr="))) {
104 | int i;
105 | ptr = memchr(dbuf.mv_data, '\n', dbuf.mv_size);
106 | if (ptr) *ptr = '\0';
107 | i = sscanf((char *)dbuf.mv_data+STRLENOF("mapaddr="), "%p", &info.me_mapaddr);
108 | if (i != 1) {
109 | fprintf(stderr, "%s: line %" Z "d: invalid mapaddr %s\n",
110 | prog, lineno, (char *)dbuf.mv_data+STRLENOF("mapaddr="));
111 | exit(EXIT_FAILURE);
112 | }
113 | } else if (!strncmp(dbuf.mv_data, "mapsize=", STRLENOF("mapsize="))) {
114 | int i;
115 | ptr = memchr(dbuf.mv_data, '\n', dbuf.mv_size);
116 | if (ptr) *ptr = '\0';
117 | i = sscanf((char *)dbuf.mv_data+STRLENOF("mapsize="), "%" Z "u", &info.me_mapsize);
118 | if (i != 1) {
119 | fprintf(stderr, "%s: line %" Z "d: invalid mapsize %s\n",
120 | prog, lineno, (char *)dbuf.mv_data+STRLENOF("mapsize="));
121 | exit(EXIT_FAILURE);
122 | }
123 | } else if (!strncmp(dbuf.mv_data, "maxreaders=", STRLENOF("maxreaders="))) {
124 | int i;
125 | ptr = memchr(dbuf.mv_data, '\n', dbuf.mv_size);
126 | if (ptr) *ptr = '\0';
127 | i = sscanf((char *)dbuf.mv_data+STRLENOF("maxreaders="), "%u", &info.me_maxreaders);
128 | if (i != 1) {
129 | fprintf(stderr, "%s: line %" Z "d: invalid maxreaders %s\n",
130 | prog, lineno, (char *)dbuf.mv_data+STRLENOF("maxreaders="));
131 | exit(EXIT_FAILURE);
132 | }
133 | } else {
134 | int i;
135 | for (i=0; dbflags[i].bit; i++) {
136 | if (!strncmp(dbuf.mv_data, dbflags[i].name, dbflags[i].len) &&
137 | ((char *)dbuf.mv_data)[dbflags[i].len] == '=') {
138 | flags |= dbflags[i].bit;
139 | break;
140 | }
141 | }
142 | if (!dbflags[i].bit) {
143 | ptr = memchr(dbuf.mv_data, '=', dbuf.mv_size);
144 | if (!ptr) {
145 | fprintf(stderr, "%s: line %" Z "d: unexpected format\n",
146 | prog, lineno);
147 | exit(EXIT_FAILURE);
148 | } else {
149 | *ptr = '\0';
150 | fprintf(stderr, "%s: line %" Z "d: unrecognized keyword ignored: %s\n",
151 | prog, lineno, (char *)dbuf.mv_data);
152 | }
153 | }
154 | }
155 | }
156 | }
157 |
158 | static void badend(void)
159 | {
160 | fprintf(stderr, "%s: line %" Z "d: unexpected end of input\n",
161 | prog, lineno);
162 | }
163 |
164 | static int unhex(unsigned char *c2)
165 | {
166 | int x, c;
167 | x = *c2++ & 0x4f;
168 | if (x & 0x40)
169 | x -= 55;
170 | c = x << 4;
171 | x = *c2 & 0x4f;
172 | if (x & 0x40)
173 | x -= 55;
174 | c |= x;
175 | return c;
176 | }
177 |
178 | static int readline(MDB_val *out, MDB_val *buf)
179 | {
180 | unsigned char *c1, *c2, *end;
181 | size_t len;
182 | int c;
183 |
184 | if (!(mode & NOHDR)) {
185 | c = fgetc(stdin);
186 | if (c == EOF) {
187 | Eof = 1;
188 | return EOF;
189 | }
190 | if (c != ' ') {
191 | lineno++;
192 | if (fgets(buf->mv_data, buf->mv_size, stdin) == NULL) {
193 | badend:
194 | Eof = 1;
195 | badend();
196 | return EOF;
197 | }
198 | if (c == 'D' && !strncmp(buf->mv_data, "ATA=END", STRLENOF("ATA=END")))
199 | return EOF;
200 | goto badend;
201 | }
202 | }
203 | if (fgets(buf->mv_data, buf->mv_size, stdin) == NULL) {
204 | Eof = 1;
205 | return EOF;
206 | }
207 | lineno++;
208 |
209 | c1 = buf->mv_data;
210 | len = strlen((char *)c1);
211 |
212 | /* Is buffer too short? */
213 | while (c1[len-1] != '\n') {
214 | buf->mv_data = realloc(buf->mv_data, buf->mv_size*2);
215 | if (!buf->mv_data) {
216 | Eof = 1;
217 | fprintf(stderr, "%s: line %" Z "d: out of memory, line too long\n",
218 | prog, lineno);
219 | return EOF;
220 | }
221 | c1 = buf->mv_data;
222 | c1 += buf->mv_size;
223 | if (fgets((char *)c1, buf->mv_size, stdin) == NULL) {
224 | Eof = 1;
225 | badend();
226 | return EOF;
227 | }
228 | buf->mv_size *= 2;
229 | len = strlen((char *)c1);
230 | }
231 | c1 = c2 = buf->mv_data;
232 | len = strlen((char *)c1);
233 | c1[--len] = '\0';
234 | end = c1 + len;
235 |
236 | if (mode & PRINT) {
237 | while (c2 < end) {
238 | if (*c2 == '\\') {
239 | if (c2[1] == '\\') {
240 | c1++; c2 += 2;
241 | } else {
242 | if (c2+3 > end || !isxdigit(c2[1]) || !isxdigit(c2[2])) {
243 | Eof = 1;
244 | badend();
245 | return EOF;
246 | }
247 | *c1++ = unhex(++c2);
248 | c2 += 2;
249 | }
250 | } else {
251 | c1++; c2++;
252 | }
253 | }
254 | } else {
255 | /* odd length not allowed */
256 | if (len & 1) {
257 | Eof = 1;
258 | badend();
259 | return EOF;
260 | }
261 | while (c2 < end) {
262 | if (!isxdigit(*c2) || !isxdigit(c2[1])) {
263 | Eof = 1;
264 | badend();
265 | return EOF;
266 | }
267 | *c1++ = unhex(c2);
268 | c2 += 2;
269 | }
270 | }
271 | c2 = out->mv_data = buf->mv_data;
272 | out->mv_size = c1 - c2;
273 |
274 | return 0;
275 | }
276 |
277 | static void usage(void)
278 | {
279 | fprintf(stderr, "usage: %s dbpath [-V] [-f input] [-n] [-s name] [-N] [-T]\n", prog);
280 | exit(EXIT_FAILURE);
281 | }
282 |
283 | int main(int argc, char *argv[])
284 | {
285 | int i, rc;
286 | MDB_env *env;
287 | MDB_txn *txn;
288 | MDB_cursor *mc;
289 | MDB_dbi dbi;
290 | char *envname;
291 | int envflags = 0, putflags = 0;
292 | int dohdr = 0;
293 |
294 | prog = argv[0];
295 |
296 | if (argc < 2) {
297 | usage();
298 | }
299 |
300 | /* -f: load file instead of stdin
301 | * -n: use NOSUBDIR flag on env_open
302 | * -s: load into named subDB
303 | * -N: use NOOVERWRITE on puts
304 | * -T: read plaintext
305 | * -V: print version and exit
306 | */
307 | while ((i = getopt(argc, argv, "f:ns:NTV")) != EOF) {
308 | switch(i) {
309 | case 'V':
310 | printf("%s\n", MDB_VERSION_STRING);
311 | exit(0);
312 | break;
313 | case 'f':
314 | if (freopen(optarg, "r", stdin) == NULL) {
315 | fprintf(stderr, "%s: %s: reopen: %s\n",
316 | prog, optarg, strerror(errno));
317 | exit(EXIT_FAILURE);
318 | }
319 | break;
320 | case 'n':
321 | envflags |= MDB_NOSUBDIR;
322 | break;
323 | case 's':
324 | subname = strdup(optarg);
325 | break;
326 | case 'N':
327 | putflags = MDB_NOOVERWRITE|MDB_NODUPDATA;
328 | break;
329 | case 'T':
330 | mode |= NOHDR;
331 | break;
332 | default:
333 | usage();
334 | }
335 | }
336 |
337 | if (optind != argc - 1)
338 | usage();
339 |
340 | dbuf.mv_size = 4096;
341 | dbuf.mv_data = malloc(dbuf.mv_size);
342 |
343 | if (!(mode & NOHDR))
344 | readhdr();
345 |
346 | envname = argv[optind];
347 | rc = mdb_env_create(&env);
348 |
349 | mdb_env_set_maxdbs(env, 2);
350 |
351 | if (info.me_maxreaders)
352 | mdb_env_set_maxreaders(env, info.me_maxreaders);
353 |
354 | if (info.me_mapsize)
355 | mdb_env_set_mapsize(env, info.me_mapsize);
356 |
357 | if (info.me_mapaddr)
358 | envflags |= MDB_FIXEDMAP;
359 |
360 | rc = mdb_env_open(env, envname, envflags, 0664);
361 | if (rc) {
362 | fprintf(stderr, "mdb_env_open failed, error %d %s\n", rc, mdb_strerror(rc));
363 | goto env_close;
364 | }
365 |
366 | kbuf.mv_size = mdb_env_get_maxkeysize(env) * 2 + 2;
367 | kbuf.mv_data = malloc(kbuf.mv_size);
368 |
369 | while(!Eof) {
370 | MDB_val key, data;
371 | int batch = 0;
372 | flags = 0;
373 |
374 | if (!dohdr) {
375 | dohdr = 1;
376 | } else if (!(mode & NOHDR))
377 | readhdr();
378 |
379 | rc = mdb_txn_begin(env, NULL, 0, &txn);
380 | if (rc) {
381 | fprintf(stderr, "mdb_txn_begin failed, error %d %s\n", rc, mdb_strerror(rc));
382 | goto env_close;
383 | }
384 |
385 | rc = mdb_open(txn, subname, flags|MDB_CREATE, &dbi);
386 | if (rc) {
387 | fprintf(stderr, "mdb_open failed, error %d %s\n", rc, mdb_strerror(rc));
388 | goto txn_abort;
389 | }
390 |
391 | rc = mdb_cursor_open(txn, dbi, &mc);
392 | if (rc) {
393 | fprintf(stderr, "mdb_cursor_open failed, error %d %s\n", rc, mdb_strerror(rc));
394 | goto txn_abort;
395 | }
396 |
397 | while(1) {
398 | rc = readline(&key, &kbuf);
399 | if (rc == EOF)
400 | break;
401 | if (rc)
402 | goto txn_abort;
403 |
404 | rc = readline(&data, &dbuf);
405 | if (rc)
406 | goto txn_abort;
407 |
408 | rc = mdb_cursor_put(mc, &key, &data, putflags);
409 | if (rc == MDB_KEYEXIST && putflags)
410 | continue;
411 | if (rc)
412 | goto txn_abort;
413 | batch++;
414 | if (batch == 100) {
415 | rc = mdb_txn_commit(txn);
416 | if (rc) {
417 | fprintf(stderr, "%s: line %" Z "d: txn_commit: %s\n",
418 | prog, lineno, mdb_strerror(rc));
419 | goto env_close;
420 | }
421 | rc = mdb_txn_begin(env, NULL, 0, &txn);
422 | if (rc) {
423 | fprintf(stderr, "mdb_txn_begin failed, error %d %s\n", rc, mdb_strerror(rc));
424 | goto env_close;
425 | }
426 | rc = mdb_cursor_open(txn, dbi, &mc);
427 | if (rc) {
428 | fprintf(stderr, "mdb_cursor_open failed, error %d %s\n", rc, mdb_strerror(rc));
429 | goto txn_abort;
430 | }
431 | batch = 0;
432 | }
433 | }
434 | rc = mdb_txn_commit(txn);
435 | txn = NULL;
436 | if (rc) {
437 | fprintf(stderr, "%s: line %" Z "d: txn_commit: %s\n",
438 | prog, lineno, mdb_strerror(rc));
439 | goto env_close;
440 | }
441 | mdb_dbi_close(env, dbi);
442 | }
443 |
444 | txn_abort:
445 | mdb_txn_abort(txn);
446 | env_close:
447 | mdb_env_close(env);
448 |
449 | return rc ? EXIT_FAILURE : EXIT_SUCCESS;
450 | }
451 |
--------------------------------------------------------------------------------
/lmdb/src/main/native/Doxyfile:
--------------------------------------------------------------------------------
1 | # Doxyfile 1.7.1
2 |
3 | # This file describes the settings to be used by the documentation system
4 | # doxygen (www.doxygen.org) for a project
5 | #
6 | # All text after a hash (#) is considered a comment and will be ignored
7 | # The format is:
8 | # TAG = value [value, ...]
9 | # For lists items can also be appended using:
10 | # TAG += value [value, ...]
11 | # Values that contain spaces should be placed between quotes (" ")
12 |
13 | #---------------------------------------------------------------------------
14 | # Project related configuration options
15 | #---------------------------------------------------------------------------
16 |
17 | # This tag specifies the encoding used for all characters in the config file
18 | # that follow. The default is UTF-8 which is also the encoding used for all
19 | # text before the first occurrence of this tag. Doxygen uses libiconv (or the
20 | # iconv built into libc) for the transcoding. See
21 | # http://www.gnu.org/software/libiconv for the list of possible encodings.
22 |
23 | DOXYFILE_ENCODING = UTF-8
24 |
25 | # The PROJECT_NAME tag is a single word (or a sequence of words surrounded
26 | # by quotes) that should identify the project.
27 |
28 | PROJECT_NAME = LMDB
29 |
30 | # The PROJECT_NUMBER tag can be used to enter a project or revision number.
31 | # This could be handy for archiving the generated documentation or
32 | # if some version control system is used.
33 |
34 | PROJECT_NUMBER =
35 |
36 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
37 | # base path where the generated documentation will be put.
38 | # If a relative path is entered, it will be relative to the location
39 | # where doxygen was started. If left blank the current directory will be used.
40 |
41 | OUTPUT_DIRECTORY =
42 |
43 | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
44 | # 4096 sub-directories (in 2 levels) under the output directory of each output
45 | # format and will distribute the generated files over these directories.
46 | # Enabling this option can be useful when feeding doxygen a huge amount of
47 | # source files, where putting all generated files in the same directory would
48 | # otherwise cause performance problems for the file system.
49 |
50 | CREATE_SUBDIRS = NO
51 |
52 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all
53 | # documentation generated by doxygen is written. Doxygen will use this
54 | # information to generate all constant output in the proper language.
55 | # The default language is English, other supported languages are:
56 | # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
57 | # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
58 | # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
59 | # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
60 | # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
61 | # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
62 |
63 | OUTPUT_LANGUAGE = English
64 |
65 | # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
66 | # include brief member descriptions after the members that are listed in
67 | # the file and class documentation (similar to JavaDoc).
68 | # Set to NO to disable this.
69 |
70 | BRIEF_MEMBER_DESC = YES
71 |
72 | # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
73 | # the brief description of a member or function before the detailed description.
74 | # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
75 | # brief descriptions will be completely suppressed.
76 |
77 | REPEAT_BRIEF = YES
78 |
79 | # This tag implements a quasi-intelligent brief description abbreviator
80 | # that is used to form the text in various listings. Each string
81 | # in this list, if found as the leading text of the brief description, will be
82 | # stripped from the text and the result after processing the whole list, is
83 | # used as the annotated text. Otherwise, the brief description is used as-is.
84 | # If left blank, the following values are used ("$name" is automatically
85 | # replaced with the name of the entity): "The $name class" "The $name widget"
86 | # "The $name file" "is" "provides" "specifies" "contains"
87 | # "represents" "a" "an" "the"
88 |
89 | ABBREVIATE_BRIEF =
90 |
91 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
92 | # Doxygen will generate a detailed section even if there is only a brief
93 | # description.
94 |
95 | ALWAYS_DETAILED_SEC = NO
96 |
97 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
98 | # inherited members of a class in the documentation of that class as if those
99 | # members were ordinary class members. Constructors, destructors and assignment
100 | # operators of the base classes will not be shown.
101 |
102 | INLINE_INHERITED_MEMB = NO
103 |
104 | # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
105 | # path before files name in the file list and in the header files. If set
106 | # to NO the shortest path that makes the file name unique will be used.
107 |
108 | FULL_PATH_NAMES = YES
109 |
110 | # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
111 | # can be used to strip a user-defined part of the path. Stripping is
112 | # only done if one of the specified strings matches the left-hand part of
113 | # the path. The tag can be used to show relative paths in the file list.
114 | # If left blank the directory from which doxygen is run is used as the
115 | # path to strip.
116 |
117 | STRIP_FROM_PATH =
118 |
119 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
120 | # the path mentioned in the documentation of a class, which tells
121 | # the reader which header file to include in order to use a class.
122 | # If left blank only the name of the header file containing the class
123 | # definition is used. Otherwise one should specify the include paths that
124 | # are normally passed to the compiler using the -I flag.
125 |
126 | STRIP_FROM_INC_PATH =
127 |
128 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
129 | # (but less readable) file names. This can be useful is your file systems
130 | # doesn't support long names like on DOS, Mac, or CD-ROM.
131 |
132 | SHORT_NAMES = NO
133 |
134 | # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
135 | # will interpret the first line (until the first dot) of a JavaDoc-style
136 | # comment as the brief description. If set to NO, the JavaDoc
137 | # comments will behave just like regular Qt-style comments
138 | # (thus requiring an explicit @brief command for a brief description.)
139 |
140 | JAVADOC_AUTOBRIEF = NO
141 |
142 | # If the QT_AUTOBRIEF tag is set to YES then Doxygen will
143 | # interpret the first line (until the first dot) of a Qt-style
144 | # comment as the brief description. If set to NO, the comments
145 | # will behave just like regular Qt-style comments (thus requiring
146 | # an explicit \brief command for a brief description.)
147 |
148 | QT_AUTOBRIEF = NO
149 |
150 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
151 | # treat a multi-line C++ special comment block (i.e. a block of //! or ///
152 | # comments) as a brief description. This used to be the default behaviour.
153 | # The new default is to treat a multi-line C++ comment block as a detailed
154 | # description. Set this tag to YES if you prefer the old behaviour instead.
155 |
156 | MULTILINE_CPP_IS_BRIEF = NO
157 |
158 | # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
159 | # member inherits the documentation from any documented member that it
160 | # re-implements.
161 |
162 | INHERIT_DOCS = YES
163 |
164 | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
165 | # a new page for each member. If set to NO, the documentation of a member will
166 | # be part of the file/class/namespace that contains it.
167 |
168 | SEPARATE_MEMBER_PAGES = NO
169 |
170 | # The TAB_SIZE tag can be used to set the number of spaces in a tab.
171 | # Doxygen uses this value to replace tabs by spaces in code fragments.
172 |
173 | TAB_SIZE = 4
174 |
175 | # This tag can be used to specify a number of aliases that acts
176 | # as commands in the documentation. An alias has the form "name=value".
177 | # For example adding "sideeffect=\par Side Effects:\n" will allow you to
178 | # put the command \sideeffect (or @sideeffect) in the documentation, which
179 | # will result in a user-defined paragraph with heading "Side Effects:".
180 | # You can put \n's in the value part of an alias to insert newlines.
181 |
182 | ALIASES =
183 |
184 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
185 | # sources only. Doxygen will then generate output that is more tailored for C.
186 | # For instance, some of the names that are used will be different. The list
187 | # of all members will be omitted, etc.
188 |
189 | OPTIMIZE_OUTPUT_FOR_C = YES
190 |
191 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
192 | # sources only. Doxygen will then generate output that is more tailored for
193 | # Java. For instance, namespaces will be presented as packages, qualified
194 | # scopes will look different, etc.
195 |
196 | OPTIMIZE_OUTPUT_JAVA = NO
197 |
198 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
199 | # sources only. Doxygen will then generate output that is more tailored for
200 | # Fortran.
201 |
202 | OPTIMIZE_FOR_FORTRAN = NO
203 |
204 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
205 | # sources. Doxygen will then generate output that is tailored for
206 | # VHDL.
207 |
208 | OPTIMIZE_OUTPUT_VHDL = NO
209 |
210 | # Doxygen selects the parser to use depending on the extension of the files it
211 | # parses. With this tag you can assign which parser to use for a given extension.
212 | # Doxygen has a built-in mapping, but you can override or extend it using this
213 | # tag. The format is ext=language, where ext is a file extension, and language
214 | # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
215 | # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
216 | # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
217 | # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
218 | # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
219 |
220 | EXTENSION_MAPPING =
221 |
222 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
223 | # to include (a tag file for) the STL sources as input, then you should
224 | # set this tag to YES in order to let doxygen match functions declarations and
225 | # definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
226 | # func(std::string) {}). This also make the inheritance and collaboration
227 | # diagrams that involve STL classes more complete and accurate.
228 |
229 | BUILTIN_STL_SUPPORT = NO
230 |
231 | # If you use Microsoft's C++/CLI language, you should set this option to YES to
232 | # enable parsing support.
233 |
234 | CPP_CLI_SUPPORT = NO
235 |
236 | # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
237 | # Doxygen will parse them like normal C++ but will assume all classes use public
238 | # instead of private inheritance when no explicit protection keyword is present.
239 |
240 | SIP_SUPPORT = NO
241 |
242 | # For Microsoft's IDL there are propget and propput attributes to indicate getter
243 | # and setter methods for a property. Setting this option to YES (the default)
244 | # will make doxygen to replace the get and set methods by a property in the
245 | # documentation. This will only work if the methods are indeed getting or
246 | # setting a simple type. If this is not the case, or you want to show the
247 | # methods anyway, you should set this option to NO.
248 |
249 | IDL_PROPERTY_SUPPORT = YES
250 |
251 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
252 | # tag is set to YES, then doxygen will reuse the documentation of the first
253 | # member in the group (if any) for the other members of the group. By default
254 | # all members of a group must be documented explicitly.
255 |
256 | DISTRIBUTE_GROUP_DOC = NO
257 |
258 | # Set the SUBGROUPING tag to YES (the default) to allow class member groups of
259 | # the same type (for instance a group of public functions) to be put as a
260 | # subgroup of that type (e.g. under the Public Functions section). Set it to
261 | # NO to prevent subgrouping. Alternatively, this can be done per class using
262 | # the \nosubgrouping command.
263 |
264 | SUBGROUPING = YES
265 |
266 | INLINE_GROUPED_CLASSES = YES
267 | # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
268 | # is documented as struct, union, or enum with the name of the typedef. So
269 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct
270 | # with name TypeT. When disabled the typedef will appear as a member of a file,
271 | # namespace, or class. And the struct will be named TypeS. This can typically
272 | # be useful for C code in case the coding convention dictates that all compound
273 | # types are typedef'ed and only the typedef is referenced, never the tag name.
274 |
275 | TYPEDEF_HIDES_STRUCT = YES
276 |
277 | # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
278 | # determine which symbols to keep in memory and which to flush to disk.
279 | # When the cache is full, less often used symbols will be written to disk.
280 | # For small to medium size projects (<1000 input files) the default value is
281 | # probably good enough. For larger projects a too small cache size can cause
282 | # doxygen to be busy swapping symbols to and from disk most of the time
283 | # causing a significant performance penality.
284 | # If the system has enough physical memory increasing the cache will improve the
285 | # performance by keeping more symbols in memory. Note that the value works on
286 | # a logarithmic scale so increasing the size by one will rougly double the
287 | # memory usage. The cache size is given by this formula:
288 | # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
289 | # corresponding to a cache size of 2^16 = 65536 symbols
290 |
291 | SYMBOL_CACHE_SIZE = 0
292 |
293 | #---------------------------------------------------------------------------
294 | # Build related configuration options
295 | #---------------------------------------------------------------------------
296 |
297 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
298 | # documentation are documented, even if no documentation was available.
299 | # Private class members and static file members will be hidden unless
300 | # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
301 |
302 | EXTRACT_ALL = NO
303 |
304 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
305 | # will be included in the documentation.
306 |
307 | EXTRACT_PRIVATE = NO
308 |
309 | # If the EXTRACT_STATIC tag is set to YES all static members of a file
310 | # will be included in the documentation.
311 |
312 | EXTRACT_STATIC = YES
313 |
314 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
315 | # defined locally in source files will be included in the documentation.
316 | # If set to NO only classes defined in header files are included.
317 |
318 | EXTRACT_LOCAL_CLASSES = YES
319 |
320 | # This flag is only useful for Objective-C code. When set to YES local
321 | # methods, which are defined in the implementation section but not in
322 | # the interface are included in the documentation.
323 | # If set to NO (the default) only methods in the interface are included.
324 |
325 | EXTRACT_LOCAL_METHODS = NO
326 |
327 | # If this flag is set to YES, the members of anonymous namespaces will be
328 | # extracted and appear in the documentation as a namespace called
329 | # 'anonymous_namespace{file}', where file will be replaced with the base
330 | # name of the file that contains the anonymous namespace. By default
331 | # anonymous namespace are hidden.
332 |
333 | EXTRACT_ANON_NSPACES = NO
334 |
335 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
336 | # undocumented members of documented classes, files or namespaces.
337 | # If set to NO (the default) these members will be included in the
338 | # various overviews, but no documentation section is generated.
339 | # This option has no effect if EXTRACT_ALL is enabled.
340 |
341 | HIDE_UNDOC_MEMBERS = NO
342 |
343 | # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
344 | # undocumented classes that are normally visible in the class hierarchy.
345 | # If set to NO (the default) these classes will be included in the various
346 | # overviews. This option has no effect if EXTRACT_ALL is enabled.
347 |
348 | HIDE_UNDOC_CLASSES = NO
349 |
350 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
351 | # friend (class|struct|union) declarations.
352 | # If set to NO (the default) these declarations will be included in the
353 | # documentation.
354 |
355 | HIDE_FRIEND_COMPOUNDS = NO
356 |
357 | # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
358 | # documentation blocks found inside the body of a function.
359 | # If set to NO (the default) these blocks will be appended to the
360 | # function's detailed documentation block.
361 |
362 | HIDE_IN_BODY_DOCS = NO
363 |
364 | # The INTERNAL_DOCS tag determines if documentation
365 | # that is typed after a \internal command is included. If the tag is set
366 | # to NO (the default) then the documentation will be excluded.
367 | # Set it to YES to include the internal documentation.
368 |
369 | INTERNAL_DOCS = NO
370 |
371 | # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
372 | # file names in lower-case letters. If set to YES upper-case letters are also
373 | # allowed. This is useful if you have classes or files whose names only differ
374 | # in case and if your file system supports case sensitive file names. Windows
375 | # and Mac users are advised to set this option to NO.
376 |
377 | CASE_SENSE_NAMES = YES
378 |
379 | # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
380 | # will show members with their full class and namespace scopes in the
381 | # documentation. If set to YES the scope will be hidden.
382 |
383 | HIDE_SCOPE_NAMES = NO
384 |
385 | # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
386 | # will put a list of the files that are included by a file in the documentation
387 | # of that file.
388 |
389 | SHOW_INCLUDE_FILES = YES
390 |
391 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
392 | # will list include files with double quotes in the documentation
393 | # rather than with sharp brackets.
394 |
395 | FORCE_LOCAL_INCLUDES = NO
396 |
397 | # If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
398 | # is inserted in the documentation for inline members.
399 |
400 | INLINE_INFO = YES
401 |
402 | # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
403 | # will sort the (detailed) documentation of file and class members
404 | # alphabetically by member name. If set to NO the members will appear in
405 | # declaration order.
406 |
407 | SORT_MEMBER_DOCS = NO
408 |
409 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
410 | # brief documentation of file, namespace and class members alphabetically
411 | # by member name. If set to NO (the default) the members will appear in
412 | # declaration order.
413 |
414 | SORT_BRIEF_DOCS = NO
415 |
416 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
417 | # will sort the (brief and detailed) documentation of class members so that
418 | # constructors and destructors are listed first. If set to NO (the default)
419 | # the constructors will appear in the respective orders defined by
420 | # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
421 | # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
422 | # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
423 |
424 | SORT_MEMBERS_CTORS_1ST = NO
425 |
426 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
427 | # hierarchy of group names into alphabetical order. If set to NO (the default)
428 | # the group names will appear in their defined order.
429 |
430 | SORT_GROUP_NAMES = NO
431 |
432 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
433 | # sorted by fully-qualified names, including namespaces. If set to
434 | # NO (the default), the class list will be sorted only by class name,
435 | # not including the namespace part.
436 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
437 | # Note: This option applies only to the class list, not to the
438 | # alphabetical list.
439 |
440 | SORT_BY_SCOPE_NAME = NO
441 |
442 | # The GENERATE_TODOLIST tag can be used to enable (YES) or
443 | # disable (NO) the todo list. This list is created by putting \todo
444 | # commands in the documentation.
445 |
446 | GENERATE_TODOLIST = YES
447 |
448 | # The GENERATE_TESTLIST tag can be used to enable (YES) or
449 | # disable (NO) the test list. This list is created by putting \test
450 | # commands in the documentation.
451 |
452 | GENERATE_TESTLIST = YES
453 |
454 | # The GENERATE_BUGLIST tag can be used to enable (YES) or
455 | # disable (NO) the bug list. This list is created by putting \bug
456 | # commands in the documentation.
457 |
458 | GENERATE_BUGLIST = YES
459 |
460 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
461 | # disable (NO) the deprecated list. This list is created by putting
462 | # \deprecated commands in the documentation.
463 |
464 | GENERATE_DEPRECATEDLIST= YES
465 |
466 | # The ENABLED_SECTIONS tag can be used to enable conditional
467 | # documentation sections, marked by \if sectionname ... \endif.
468 |
469 | ENABLED_SECTIONS =
470 |
471 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines
472 | # the initial value of a variable or define consists of for it to appear in
473 | # the documentation. If the initializer consists of more lines than specified
474 | # here it will be hidden. Use a value of 0 to hide initializers completely.
475 | # The appearance of the initializer of individual variables and defines in the
476 | # documentation can be controlled using \showinitializer or \hideinitializer
477 | # command in the documentation regardless of this setting.
478 |
479 | MAX_INITIALIZER_LINES = 30
480 |
481 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated
482 | # at the bottom of the documentation of classes and structs. If set to YES the
483 | # list will mention the files that were used to generate the documentation.
484 |
485 | SHOW_USED_FILES = YES
486 |
487 | # If the sources in your project are distributed over multiple directories
488 | # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
489 | # in the documentation. The default is NO.
490 |
491 | SHOW_DIRECTORIES = NO
492 |
493 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page.
494 | # This will remove the Files entry from the Quick Index and from the
495 | # Folder Tree View (if specified). The default is YES.
496 |
497 | SHOW_FILES = YES
498 |
499 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the
500 | # Namespaces page.
501 | # This will remove the Namespaces entry from the Quick Index
502 | # and from the Folder Tree View (if specified). The default is YES.
503 |
504 | SHOW_NAMESPACES = YES
505 |
506 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that
507 | # doxygen should invoke to get the current version for each file (typically from
508 | # the version control system). Doxygen will invoke the program by executing (via
509 | # popen()) the command , where is the value of
510 | # the FILE_VERSION_FILTER tag, and is the name of an input file
511 | # provided by doxygen. Whatever the program writes to standard output
512 | # is used as the file version. See the manual for examples.
513 |
514 | FILE_VERSION_FILTER =
515 |
516 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
517 | # by doxygen. The layout file controls the global structure of the generated
518 | # output files in an output format independent way. The create the layout file
519 | # that represents doxygen's defaults, run doxygen with the -l option.
520 | # You can optionally specify a file name after the option, if omitted
521 | # DoxygenLayout.xml will be used as the name of the layout file.
522 |
523 | LAYOUT_FILE =
524 |
525 | #---------------------------------------------------------------------------
526 | # configuration options related to warning and progress messages
527 | #---------------------------------------------------------------------------
528 |
529 | # The QUIET tag can be used to turn on/off the messages that are generated
530 | # by doxygen. Possible values are YES and NO. If left blank NO is used.
531 |
532 | QUIET = NO
533 |
534 | # The WARNINGS tag can be used to turn on/off the warning messages that are
535 | # generated by doxygen. Possible values are YES and NO. If left blank
536 | # NO is used.
537 |
538 | WARNINGS = YES
539 |
540 | # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
541 | # for undocumented members. If EXTRACT_ALL is set to YES then this flag will
542 | # automatically be disabled.
543 |
544 | WARN_IF_UNDOCUMENTED = YES
545 |
546 | # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
547 | # potential errors in the documentation, such as not documenting some
548 | # parameters in a documented function, or documenting parameters that
549 | # don't exist or using markup commands wrongly.
550 |
551 | WARN_IF_DOC_ERROR = YES
552 |
553 | # This WARN_NO_PARAMDOC option can be abled to get warnings for
554 | # functions that are documented, but have no documentation for their parameters
555 | # or return value. If set to NO (the default) doxygen will only warn about
556 | # wrong or incomplete parameter documentation, but not about the absence of
557 | # documentation.
558 |
559 | WARN_NO_PARAMDOC = NO
560 |
561 | # The WARN_FORMAT tag determines the format of the warning messages that
562 | # doxygen can produce. The string should contain the $file, $line, and $text
563 | # tags, which will be replaced by the file and line number from which the
564 | # warning originated and the warning text. Optionally the format may contain
565 | # $version, which will be replaced by the version of the file (if it could
566 | # be obtained via FILE_VERSION_FILTER)
567 |
568 | WARN_FORMAT = "$file:$line: $text"
569 |
570 | # The WARN_LOGFILE tag can be used to specify a file to which warning
571 | # and error messages should be written. If left blank the output is written
572 | # to stderr.
573 |
574 | WARN_LOGFILE =
575 |
576 | #---------------------------------------------------------------------------
577 | # configuration options related to the input files
578 | #---------------------------------------------------------------------------
579 |
580 | # The INPUT tag can be used to specify the files and/or directories that contain
581 | # documented source files. You may enter file names like "myfile.cpp" or
582 | # directories like "/usr/src/myproject". Separate the files or directories
583 | # with spaces.
584 |
585 | INPUT = lmdb.h midl.h mdb.c midl.c
586 |
587 | # This tag can be used to specify the character encoding of the source files
588 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
589 | # also the default input encoding. Doxygen uses libiconv (or the iconv built
590 | # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
591 | # the list of possible encodings.
592 |
593 | INPUT_ENCODING = UTF-8
594 |
595 | # If the value of the INPUT tag contains directories, you can use the
596 | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
597 | # and *.h) to filter out the source-files in the directories. If left
598 | # blank the following patterns are tested:
599 | # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
600 | # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
601 |
602 | FILE_PATTERNS =
603 |
604 | # The RECURSIVE tag can be used to turn specify whether or not subdirectories
605 | # should be searched for input files as well. Possible values are YES and NO.
606 | # If left blank NO is used.
607 |
608 | RECURSIVE = NO
609 |
610 | # The EXCLUDE tag can be used to specify files and/or directories that should
611 | # excluded from the INPUT source files. This way you can easily exclude a
612 | # subdirectory from a directory tree whose root is specified with the INPUT tag.
613 |
614 | EXCLUDE =
615 |
616 | # The EXCLUDE_SYMLINKS tag can be used select whether or not files or
617 | # directories that are symbolic links (a Unix filesystem feature) are excluded
618 | # from the input.
619 |
620 | EXCLUDE_SYMLINKS = NO
621 |
622 | # If the value of the INPUT tag contains directories, you can use the
623 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
624 | # certain files from those directories. Note that the wildcards are matched
625 | # against the file with absolute path, so to exclude all test directories
626 | # for example use the pattern */test/*
627 |
628 | EXCLUDE_PATTERNS =
629 |
630 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
631 | # (namespaces, classes, functions, etc.) that should be excluded from the
632 | # output. The symbol name can be a fully qualified name, a word, or if the
633 | # wildcard * is used, a substring. Examples: ANamespace, AClass,
634 | # AClass::ANamespace, ANamespace::*Test
635 |
636 | EXCLUDE_SYMBOLS =
637 |
638 | # The EXAMPLE_PATH tag can be used to specify one or more files or
639 | # directories that contain example code fragments that are included (see
640 | # the \include command).
641 |
642 | EXAMPLE_PATH =
643 |
644 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the
645 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
646 | # and *.h) to filter out the source-files in the directories. If left
647 | # blank all files are included.
648 |
649 | EXAMPLE_PATTERNS =
650 |
651 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
652 | # searched for input files to be used with the \include or \dontinclude
653 | # commands irrespective of the value of the RECURSIVE tag.
654 | # Possible values are YES and NO. If left blank NO is used.
655 |
656 | EXAMPLE_RECURSIVE = NO
657 |
658 | # The IMAGE_PATH tag can be used to specify one or more files or
659 | # directories that contain image that are included in the documentation (see
660 | # the \image command).
661 |
662 | IMAGE_PATH =
663 |
664 | # The INPUT_FILTER tag can be used to specify a program that doxygen should
665 | # invoke to filter for each input file. Doxygen will invoke the filter program
666 | # by executing (via popen()) the command , where
667 | # is the value of the INPUT_FILTER tag, and is the name of an
668 | # input file. Doxygen will then use the output that the filter program writes
669 | # to standard output.
670 | # If FILTER_PATTERNS is specified, this tag will be
671 | # ignored.
672 |
673 | INPUT_FILTER =
674 |
675 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
676 | # basis.
677 | # Doxygen will compare the file name with each pattern and apply the
678 | # filter if there is a match.
679 | # The filters are a list of the form:
680 | # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
681 | # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
682 | # is applied to all files.
683 |
684 | FILTER_PATTERNS =
685 |
686 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
687 | # INPUT_FILTER) will be used to filter the input files when producing source
688 | # files to browse (i.e. when SOURCE_BROWSER is set to YES).
689 |
690 | FILTER_SOURCE_FILES = NO
691 |
692 | #---------------------------------------------------------------------------
693 | # configuration options related to source browsing
694 | #---------------------------------------------------------------------------
695 |
696 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will
697 | # be generated. Documented entities will be cross-referenced with these sources.
698 | # Note: To get rid of all source code in the generated output, make sure also
699 | # VERBATIM_HEADERS is set to NO.
700 |
701 | SOURCE_BROWSER = NO
702 |
703 | # Setting the INLINE_SOURCES tag to YES will include the body
704 | # of functions and classes directly in the documentation.
705 |
706 | INLINE_SOURCES = NO
707 |
708 | # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
709 | # doxygen to hide any special comment blocks from generated source code
710 | # fragments. Normal C and C++ comments will always remain visible.
711 |
712 | STRIP_CODE_COMMENTS = YES
713 |
714 | # If the REFERENCED_BY_RELATION tag is set to YES
715 | # then for each documented function all documented
716 | # functions referencing it will be listed.
717 |
718 | REFERENCED_BY_RELATION = NO
719 |
720 | # If the REFERENCES_RELATION tag is set to YES
721 | # then for each documented function all documented entities
722 | # called/used by that function will be listed.
723 |
724 | REFERENCES_RELATION = NO
725 |
726 | # If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
727 | # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
728 | # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
729 | # link to the source code.
730 | # Otherwise they will link to the documentation.
731 |
732 | REFERENCES_LINK_SOURCE = YES
733 |
734 | # If the USE_HTAGS tag is set to YES then the references to source code
735 | # will point to the HTML generated by the htags(1) tool instead of doxygen
736 | # built-in source browser. The htags tool is part of GNU's global source
737 | # tagging system (see http://www.gnu.org/software/global/global.html). You
738 | # will need version 4.8.6 or higher.
739 |
740 | USE_HTAGS = NO
741 |
742 | # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
743 | # will generate a verbatim copy of the header file for each class for
744 | # which an include is specified. Set to NO to disable this.
745 |
746 | VERBATIM_HEADERS = YES
747 |
748 | #---------------------------------------------------------------------------
749 | # configuration options related to the alphabetical class index
750 | #---------------------------------------------------------------------------
751 |
752 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
753 | # of all compounds will be generated. Enable this if the project
754 | # contains a lot of classes, structs, unions or interfaces.
755 |
756 | ALPHABETICAL_INDEX = YES
757 |
758 | # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
759 | # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
760 | # in which this list will be split (can be a number in the range [1..20])
761 |
762 | COLS_IN_ALPHA_INDEX = 5
763 |
764 | # In case all classes in a project start with a common prefix, all
765 | # classes will be put under the same header in the alphabetical index.
766 | # The IGNORE_PREFIX tag can be used to specify one or more prefixes that
767 | # should be ignored while generating the index headers.
768 |
769 | IGNORE_PREFIX =
770 |
771 | #---------------------------------------------------------------------------
772 | # configuration options related to the HTML output
773 | #---------------------------------------------------------------------------
774 |
775 | # If the GENERATE_HTML tag is set to YES (the default) Doxygen will
776 | # generate HTML output.
777 |
778 | GENERATE_HTML = YES
779 |
780 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
781 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
782 | # put in front of it. If left blank `html' will be used as the default path.
783 |
784 | HTML_OUTPUT = html
785 |
786 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for
787 | # each generated HTML page (for example: .htm,.php,.asp). If it is left blank
788 | # doxygen will generate files with .html extension.
789 |
790 | HTML_FILE_EXTENSION = .html
791 |
792 | # The HTML_HEADER tag can be used to specify a personal HTML header for
793 | # each generated HTML page. If it is left blank doxygen will generate a
794 | # standard header.
795 |
796 | HTML_HEADER =
797 |
798 | # The HTML_FOOTER tag can be used to specify a personal HTML footer for
799 | # each generated HTML page. If it is left blank doxygen will generate a
800 | # standard footer.
801 |
802 | HTML_FOOTER =
803 |
804 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading
805 | # style sheet that is used by each HTML page. It can be used to
806 | # fine-tune the look of the HTML output. If the tag is left blank doxygen
807 | # will generate a default style sheet. Note that doxygen will try to copy
808 | # the style sheet file to the HTML output directory, so don't put your own
809 | # stylesheet in the HTML output directory as well, or it will be erased!
810 |
811 | HTML_STYLESHEET =
812 |
813 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
814 | # Doxygen will adjust the colors in the stylesheet and background images
815 | # according to this color. Hue is specified as an angle on a colorwheel,
816 | # see http://en.wikipedia.org/wiki/Hue for more information.
817 | # For instance the value 0 represents red, 60 is yellow, 120 is green,
818 | # 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
819 | # The allowed range is 0 to 359.
820 |
821 | HTML_COLORSTYLE_HUE = 220
822 |
823 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
824 | # the colors in the HTML output. For a value of 0 the output will use
825 | # grayscales only. A value of 255 will produce the most vivid colors.
826 |
827 | HTML_COLORSTYLE_SAT = 100
828 |
829 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
830 | # the luminance component of the colors in the HTML output. Values below
831 | # 100 gradually make the output lighter, whereas values above 100 make
832 | # the output darker. The value divided by 100 is the actual gamma applied,
833 | # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
834 | # and 100 does not change the gamma.
835 |
836 | HTML_COLORSTYLE_GAMMA = 80
837 |
838 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
839 | # page will contain the date and time when the page was generated. Setting
840 | # this to NO can help when comparing the output of multiple runs.
841 |
842 | HTML_TIMESTAMP = YES
843 |
844 | # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
845 | # files or namespaces will be aligned in HTML using tables. If set to
846 | # NO a bullet list will be used.
847 |
848 | HTML_ALIGN_MEMBERS = YES
849 |
850 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
851 | # documentation will contain sections that can be hidden and shown after the
852 | # page has loaded. For this to work a browser that supports
853 | # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
854 | # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
855 |
856 | HTML_DYNAMIC_SECTIONS = NO
857 |
858 | # If the GENERATE_DOCSET tag is set to YES, additional index files
859 | # will be generated that can be used as input for Apple's Xcode 3
860 | # integrated development environment, introduced with OSX 10.5 (Leopard).
861 | # To create a documentation set, doxygen will generate a Makefile in the
862 | # HTML output directory. Running make will produce the docset in that
863 | # directory and running "make install" will install the docset in
864 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
865 | # it at startup.
866 | # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
867 | # for more information.
868 |
869 | GENERATE_DOCSET = NO
870 |
871 | # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
872 | # feed. A documentation feed provides an umbrella under which multiple
873 | # documentation sets from a single provider (such as a company or product suite)
874 | # can be grouped.
875 |
876 | DOCSET_FEEDNAME = "Doxygen generated docs"
877 |
878 | # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
879 | # should uniquely identify the documentation set bundle. This should be a
880 | # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
881 | # will append .docset to the name.
882 |
883 | DOCSET_BUNDLE_ID = org.doxygen.Project
884 |
885 | # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
886 | # the documentation publisher. This should be a reverse domain-name style
887 | # string, e.g. com.mycompany.MyDocSet.documentation.
888 |
889 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher
890 |
891 | # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
892 |
893 | DOCSET_PUBLISHER_NAME = Publisher
894 |
895 | # If the GENERATE_HTMLHELP tag is set to YES, additional index files
896 | # will be generated that can be used as input for tools like the
897 | # Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
898 | # of the generated HTML documentation.
899 |
900 | GENERATE_HTMLHELP = NO
901 |
902 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
903 | # be used to specify the file name of the resulting .chm file. You
904 | # can add a path in front of the file if the result should not be
905 | # written to the html output directory.
906 |
907 | CHM_FILE =
908 |
909 | # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
910 | # be used to specify the location (absolute path including file name) of
911 | # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
912 | # the HTML help compiler on the generated index.hhp.
913 |
914 | HHC_LOCATION =
915 |
916 | # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
917 | # controls if a separate .chi index file is generated (YES) or that
918 | # it should be included in the master .chm file (NO).
919 |
920 | GENERATE_CHI = NO
921 |
922 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
923 | # is used to encode HtmlHelp index (hhk), content (hhc) and project file
924 | # content.
925 |
926 | CHM_INDEX_ENCODING =
927 |
928 | # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
929 | # controls whether a binary table of contents is generated (YES) or a
930 | # normal table of contents (NO) in the .chm file.
931 |
932 | BINARY_TOC = NO
933 |
934 | # The TOC_EXPAND flag can be set to YES to add extra items for group members
935 | # to the contents of the HTML help documentation and to the tree view.
936 |
937 | TOC_EXPAND = NO
938 |
939 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
940 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
941 | # that can be used as input for Qt's qhelpgenerator to generate a
942 | # Qt Compressed Help (.qch) of the generated HTML documentation.
943 |
944 | GENERATE_QHP = NO
945 |
946 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can
947 | # be used to specify the file name of the resulting .qch file.
948 | # The path specified is relative to the HTML output folder.
949 |
950 | QCH_FILE =
951 |
952 | # The QHP_NAMESPACE tag specifies the namespace to use when generating
953 | # Qt Help Project output. For more information please see
954 | # http://doc.trolltech.com/qthelpproject.html#namespace
955 |
956 | QHP_NAMESPACE = org.doxygen.Project
957 |
958 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
959 | # Qt Help Project output. For more information please see
960 | # http://doc.trolltech.com/qthelpproject.html#virtual-folders
961 |
962 | QHP_VIRTUAL_FOLDER = doc
963 |
964 | # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
965 | # add. For more information please see
966 | # http://doc.trolltech.com/qthelpproject.html#custom-filters
967 |
968 | QHP_CUST_FILTER_NAME =
969 |
970 | # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
971 | # custom filter to add. For more information please see
972 | #
973 | # Qt Help Project / Custom Filters.
974 |
975 | QHP_CUST_FILTER_ATTRS =
976 |
977 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
978 | # project's
979 | # filter section matches.
980 | #
981 | # Qt Help Project / Filter Attributes.
982 |
983 | QHP_SECT_FILTER_ATTRS =
984 |
985 | # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
986 | # be used to specify the location of Qt's qhelpgenerator.
987 | # If non-empty doxygen will try to run qhelpgenerator on the generated
988 | # .qhp file.
989 |
990 | QHG_LOCATION =
991 |
992 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
993 | # will be generated, which together with the HTML files, form an Eclipse help
994 | # plugin. To install this plugin and make it available under the help contents
995 | # menu in Eclipse, the contents of the directory containing the HTML and XML
996 | # files needs to be copied into the plugins directory of eclipse. The name of
997 | # the directory within the plugins directory should be the same as
998 | # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
999 | # the help appears.
1000 |
1001 | GENERATE_ECLIPSEHELP = NO
1002 |
1003 | # A unique identifier for the eclipse help plugin. When installing the plugin
1004 | # the directory name containing the HTML and XML files should also have
1005 | # this name.
1006 |
1007 | ECLIPSE_DOC_ID = org.doxygen.Project
1008 |
1009 | # The DISABLE_INDEX tag can be used to turn on/off the condensed index at
1010 | # top of each HTML page. The value NO (the default) enables the index and
1011 | # the value YES disables it.
1012 |
1013 | DISABLE_INDEX = NO
1014 |
1015 | # This tag can be used to set the number of enum values (range [1..20])
1016 | # that doxygen will group on one line in the generated HTML documentation.
1017 |
1018 | ENUM_VALUES_PER_LINE = 4
1019 |
1020 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
1021 | # structure should be generated to display hierarchical information.
1022 | # If the tag value is set to YES, a side panel will be generated
1023 | # containing a tree-like index structure (just like the one that
1024 | # is generated for HTML Help). For this to work a browser that supports
1025 | # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
1026 | # Windows users are probably better off using the HTML help feature.
1027 |
1028 | GENERATE_TREEVIEW = NO
1029 |
1030 | # By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
1031 | # and Class Hierarchy pages using a tree view instead of an ordered list.
1032 |
1033 | USE_INLINE_TREES = NO
1034 |
1035 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
1036 | # used to set the initial width (in pixels) of the frame in which the tree
1037 | # is shown.
1038 |
1039 | TREEVIEW_WIDTH = 250
1040 |
1041 | # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
1042 | # links to external symbols imported via tag files in a separate window.
1043 |
1044 | EXT_LINKS_IN_WINDOW = NO
1045 |
1046 | # Use this tag to change the font size of Latex formulas included
1047 | # as images in the HTML documentation. The default is 10. Note that
1048 | # when you change the font size after a successful doxygen run you need
1049 | # to manually remove any form_*.png images from the HTML output directory
1050 | # to force them to be regenerated.
1051 |
1052 | FORMULA_FONTSIZE = 10
1053 |
1054 | # Use the FORMULA_TRANPARENT tag to determine whether or not the images
1055 | # generated for formulas are transparent PNGs. Transparent PNGs are
1056 | # not supported properly for IE 6.0, but are supported on all modern browsers.
1057 | # Note that when changing this option you need to delete any form_*.png files
1058 | # in the HTML output before the changes have effect.
1059 |
1060 | FORMULA_TRANSPARENT = YES
1061 |
1062 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box
1063 | # for the HTML output. The underlying search engine uses javascript
1064 | # and DHTML and should work on any modern browser. Note that when using
1065 | # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
1066 | # (GENERATE_DOCSET) there is already a search function so this one should
1067 | # typically be disabled. For large projects the javascript based search engine
1068 | # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
1069 |
1070 | SEARCHENGINE = YES
1071 |
1072 | # When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1073 | # implemented using a PHP enabled web server instead of at the web client
1074 | # using Javascript. Doxygen will generate the search PHP script and index
1075 | # file to put on the web server. The advantage of the server
1076 | # based approach is that it scales better to large projects and allows
1077 | # full text search. The disadvances is that it is more difficult to setup
1078 | # and does not have live searching capabilities.
1079 |
1080 | SERVER_BASED_SEARCH = NO
1081 |
1082 | #---------------------------------------------------------------------------
1083 | # configuration options related to the LaTeX output
1084 | #---------------------------------------------------------------------------
1085 |
1086 | # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
1087 | # generate Latex output.
1088 |
1089 | GENERATE_LATEX = NO
1090 |
1091 | # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
1092 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1093 | # put in front of it. If left blank `latex' will be used as the default path.
1094 |
1095 | LATEX_OUTPUT = latex
1096 |
1097 | # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1098 | # invoked. If left blank `latex' will be used as the default command name.
1099 | # Note that when enabling USE_PDFLATEX this option is only used for
1100 | # generating bitmaps for formulas in the HTML output, but not in the
1101 | # Makefile that is written to the output directory.
1102 |
1103 | LATEX_CMD_NAME = latex
1104 |
1105 | # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
1106 | # generate index for LaTeX. If left blank `makeindex' will be used as the
1107 | # default command name.
1108 |
1109 | MAKEINDEX_CMD_NAME = makeindex
1110 |
1111 | # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
1112 | # LaTeX documents. This may be useful for small projects and may help to
1113 | # save some trees in general.
1114 |
1115 | COMPACT_LATEX = NO
1116 |
1117 | # The PAPER_TYPE tag can be used to set the paper type that is used
1118 | # by the printer. Possible values are: a4, a4wide, letter, legal and
1119 | # executive. If left blank a4wide will be used.
1120 |
1121 | PAPER_TYPE = a4wide
1122 |
1123 | # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
1124 | # packages that should be included in the LaTeX output.
1125 |
1126 | EXTRA_PACKAGES =
1127 |
1128 | # The LATEX_HEADER tag can be used to specify a personal LaTeX header for
1129 | # the generated latex document. The header should contain everything until
1130 | # the first chapter. If it is left blank doxygen will generate a
1131 | # standard header. Notice: only use this tag if you know what you are doing!
1132 |
1133 | LATEX_HEADER =
1134 |
1135 | # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
1136 | # is prepared for conversion to pdf (using ps2pdf). The pdf file will
1137 | # contain links (just like the HTML output) instead of page references
1138 | # This makes the output suitable for online browsing using a pdf viewer.
1139 |
1140 | PDF_HYPERLINKS = YES
1141 |
1142 | # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
1143 | # plain latex in the generated Makefile. Set this option to YES to get a
1144 | # higher quality PDF documentation.
1145 |
1146 | USE_PDFLATEX = YES
1147 |
1148 | # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
1149 | # command to the generated LaTeX files. This will instruct LaTeX to keep
1150 | # running if errors occur, instead of asking the user for help.
1151 | # This option is also used when generating formulas in HTML.
1152 |
1153 | LATEX_BATCHMODE = NO
1154 |
1155 | # If LATEX_HIDE_INDICES is set to YES then doxygen will not
1156 | # include the index chapters (such as File Index, Compound Index, etc.)
1157 | # in the output.
1158 |
1159 | LATEX_HIDE_INDICES = NO
1160 |
1161 | # If LATEX_SOURCE_CODE is set to YES then doxygen will include
1162 | # source code with syntax highlighting in the LaTeX output.
1163 | # Note that which sources are shown also depends on other settings
1164 | # such as SOURCE_BROWSER.
1165 |
1166 | LATEX_SOURCE_CODE = NO
1167 |
1168 | #---------------------------------------------------------------------------
1169 | # configuration options related to the RTF output
1170 | #---------------------------------------------------------------------------
1171 |
1172 | # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
1173 | # The RTF output is optimized for Word 97 and may not look very pretty with
1174 | # other RTF readers or editors.
1175 |
1176 | GENERATE_RTF = NO
1177 |
1178 | # The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
1179 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1180 | # put in front of it. If left blank `rtf' will be used as the default path.
1181 |
1182 | RTF_OUTPUT = rtf
1183 |
1184 | # If the COMPACT_RTF tag is set to YES Doxygen generates more compact
1185 | # RTF documents. This may be useful for small projects and may help to
1186 | # save some trees in general.
1187 |
1188 | COMPACT_RTF = NO
1189 |
1190 | # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
1191 | # will contain hyperlink fields. The RTF file will
1192 | # contain links (just like the HTML output) instead of page references.
1193 | # This makes the output suitable for online browsing using WORD or other
1194 | # programs which support those fields.
1195 | # Note: wordpad (write) and others do not support links.
1196 |
1197 | RTF_HYPERLINKS = NO
1198 |
1199 | # Load stylesheet definitions from file. Syntax is similar to doxygen's
1200 | # config file, i.e. a series of assignments. You only have to provide
1201 | # replacements, missing definitions are set to their default value.
1202 |
1203 | RTF_STYLESHEET_FILE =
1204 |
1205 | # Set optional variables used in the generation of an rtf document.
1206 | # Syntax is similar to doxygen's config file.
1207 |
1208 | RTF_EXTENSIONS_FILE =
1209 |
1210 | #---------------------------------------------------------------------------
1211 | # configuration options related to the man page output
1212 | #---------------------------------------------------------------------------
1213 |
1214 | # If the GENERATE_MAN tag is set to YES (the default) Doxygen will
1215 | # generate man pages
1216 |
1217 | GENERATE_MAN = YES
1218 |
1219 | # The MAN_OUTPUT tag is used to specify where the man pages will be put.
1220 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1221 | # put in front of it. If left blank `man' will be used as the default path.
1222 |
1223 | MAN_OUTPUT = man
1224 |
1225 | # The MAN_EXTENSION tag determines the extension that is added to
1226 | # the generated man pages (default is the subroutine's section .3)
1227 |
1228 | MAN_EXTENSION = .3
1229 |
1230 | # If the MAN_LINKS tag is set to YES and Doxygen generates man output,
1231 | # then it will generate one additional man file for each entity
1232 | # documented in the real man page(s). These additional files
1233 | # only source the real man page, but without them the man command
1234 | # would be unable to find the correct page. The default is NO.
1235 |
1236 | MAN_LINKS = NO
1237 |
1238 | #---------------------------------------------------------------------------
1239 | # configuration options related to the XML output
1240 | #---------------------------------------------------------------------------
1241 |
1242 | # If the GENERATE_XML tag is set to YES Doxygen will
1243 | # generate an XML file that captures the structure of
1244 | # the code including all documentation.
1245 |
1246 | GENERATE_XML = NO
1247 |
1248 | # The XML_OUTPUT tag is used to specify where the XML pages will be put.
1249 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be
1250 | # put in front of it. If left blank `xml' will be used as the default path.
1251 |
1252 | XML_OUTPUT = xml
1253 |
1254 | # The XML_SCHEMA tag can be used to specify an XML schema,
1255 | # which can be used by a validating XML parser to check the
1256 | # syntax of the XML files.
1257 |
1258 | XML_SCHEMA =
1259 |
1260 | # The XML_DTD tag can be used to specify an XML DTD,
1261 | # which can be used by a validating XML parser to check the
1262 | # syntax of the XML files.
1263 |
1264 | XML_DTD =
1265 |
1266 | # If the XML_PROGRAMLISTING tag is set to YES Doxygen will
1267 | # dump the program listings (including syntax highlighting
1268 | # and cross-referencing information) to the XML output. Note that
1269 | # enabling this will significantly increase the size of the XML output.
1270 |
1271 | XML_PROGRAMLISTING = YES
1272 |
1273 | #---------------------------------------------------------------------------
1274 | # configuration options for the AutoGen Definitions output
1275 | #---------------------------------------------------------------------------
1276 |
1277 | # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
1278 | # generate an AutoGen Definitions (see autogen.sf.net) file
1279 | # that captures the structure of the code including all
1280 | # documentation. Note that this feature is still experimental
1281 | # and incomplete at the moment.
1282 |
1283 | GENERATE_AUTOGEN_DEF = NO
1284 |
1285 | #---------------------------------------------------------------------------
1286 | # configuration options related to the Perl module output
1287 | #---------------------------------------------------------------------------
1288 |
1289 | # If the GENERATE_PERLMOD tag is set to YES Doxygen will
1290 | # generate a Perl module file that captures the structure of
1291 | # the code including all documentation. Note that this
1292 | # feature is still experimental and incomplete at the
1293 | # moment.
1294 |
1295 | GENERATE_PERLMOD = NO
1296 |
1297 | # If the PERLMOD_LATEX tag is set to YES Doxygen will generate
1298 | # the necessary Makefile rules, Perl scripts and LaTeX code to be able
1299 | # to generate PDF and DVI output from the Perl module output.
1300 |
1301 | PERLMOD_LATEX = NO
1302 |
1303 | # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
1304 | # nicely formatted so it can be parsed by a human reader.
1305 | # This is useful
1306 | # if you want to understand what is going on.
1307 | # On the other hand, if this
1308 | # tag is set to NO the size of the Perl module output will be much smaller
1309 | # and Perl will parse it just the same.
1310 |
1311 | PERLMOD_PRETTY = YES
1312 |
1313 | # The names of the make variables in the generated doxyrules.make file
1314 | # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
1315 | # This is useful so different doxyrules.make files included by the same
1316 | # Makefile don't overwrite each other's variables.
1317 |
1318 | PERLMOD_MAKEVAR_PREFIX =
1319 |
1320 | #---------------------------------------------------------------------------
1321 | # Configuration options related to the preprocessor
1322 | #---------------------------------------------------------------------------
1323 |
1324 | # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
1325 | # evaluate all C-preprocessor directives found in the sources and include
1326 | # files.
1327 |
1328 | ENABLE_PREPROCESSING = YES
1329 |
1330 | # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
1331 | # names in the source code. If set to NO (the default) only conditional
1332 | # compilation will be performed. Macro expansion can be done in a controlled
1333 | # way by setting EXPAND_ONLY_PREDEF to YES.
1334 |
1335 | MACRO_EXPANSION = NO
1336 |
1337 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
1338 | # then the macro expansion is limited to the macros specified with the
1339 | # PREDEFINED and EXPAND_AS_DEFINED tags.
1340 |
1341 | EXPAND_ONLY_PREDEF = NO
1342 |
1343 | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
1344 | # in the INCLUDE_PATH (see below) will be search if a #include is found.
1345 |
1346 | SEARCH_INCLUDES = YES
1347 |
1348 | # The INCLUDE_PATH tag can be used to specify one or more directories that
1349 | # contain include files that are not input files but should be processed by
1350 | # the preprocessor.
1351 |
1352 | INCLUDE_PATH =
1353 |
1354 | # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
1355 | # patterns (like *.h and *.hpp) to filter out the header-files in the
1356 | # directories. If left blank, the patterns specified with FILE_PATTERNS will
1357 | # be used.
1358 |
1359 | INCLUDE_FILE_PATTERNS =
1360 |
1361 | # The PREDEFINED tag can be used to specify one or more macro names that
1362 | # are defined before the preprocessor is started (similar to the -D option of
1363 | # gcc). The argument of the tag is a list of macros of the form: name
1364 | # or name=definition (no spaces). If the definition and the = are
1365 | # omitted =1 is assumed. To prevent a macro definition from being
1366 | # undefined via #undef or recursively expanded use the := operator
1367 | # instead of the = operator.
1368 |
1369 | PREDEFINED = DEBUG=2 __GNUC__=1
1370 |
1371 | # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
1372 | # this tag can be used to specify a list of macro names that should be expanded.
1373 | # The macro definition that is found in the sources will be used.
1374 | # Use the PREDEFINED tag if you want to use a different macro definition.
1375 |
1376 | EXPAND_AS_DEFINED =
1377 |
1378 | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
1379 | # doxygen's preprocessor will remove all function-like macros that are alone
1380 | # on a line, have an all uppercase name, and do not end with a semicolon. Such
1381 | # function macros are typically used for boiler-plate code, and will confuse
1382 | # the parser if not removed.
1383 |
1384 | SKIP_FUNCTION_MACROS = YES
1385 |
1386 | #---------------------------------------------------------------------------
1387 | # Configuration::additions related to external references
1388 | #---------------------------------------------------------------------------
1389 |
1390 | # The TAGFILES option can be used to specify one or more tagfiles.
1391 | # Optionally an initial location of the external documentation
1392 | # can be added for each tagfile. The format of a tag file without
1393 | # this location is as follows:
1394 | #
1395 | # TAGFILES = file1 file2 ...
1396 | # Adding location for the tag files is done as follows:
1397 | #
1398 | # TAGFILES = file1=loc1 "file2 = loc2" ...
1399 | # where "loc1" and "loc2" can be relative or absolute paths or
1400 | # URLs. If a location is present for each tag, the installdox tool
1401 | # does not have to be run to correct the links.
1402 | # Note that each tag file must have a unique name
1403 | # (where the name does NOT include the path)
1404 | # If a tag file is not located in the directory in which doxygen
1405 | # is run, you must also specify the path to the tagfile here.
1406 |
1407 | TAGFILES = tooltag=./man1
1408 |
1409 | # When a file name is specified after GENERATE_TAGFILE, doxygen will create
1410 | # a tag file that is based on the input files it reads.
1411 |
1412 | GENERATE_TAGFILE =
1413 |
1414 | # If the ALLEXTERNALS tag is set to YES all external classes will be listed
1415 | # in the class index. If set to NO only the inherited external classes
1416 | # will be listed.
1417 |
1418 | ALLEXTERNALS = NO
1419 |
1420 | # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
1421 | # in the modules index. If set to NO, only the current project's groups will
1422 | # be listed.
1423 |
1424 | EXTERNAL_GROUPS = YES
1425 |
1426 | # The PERL_PATH should be the absolute path and name of the perl script
1427 | # interpreter (i.e. the result of `which perl').
1428 |
1429 | PERL_PATH = /usr/bin/perl
1430 |
1431 | #---------------------------------------------------------------------------
1432 | # Configuration options related to the dot tool
1433 | #---------------------------------------------------------------------------
1434 |
1435 | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
1436 | # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
1437 | # or super classes. Setting the tag to NO turns the diagrams off. Note that
1438 | # this option is superseded by the HAVE_DOT option below. This is only a
1439 | # fallback. It is recommended to install and use dot, since it yields more
1440 | # powerful graphs.
1441 |
1442 | CLASS_DIAGRAMS = YES
1443 |
1444 | # You can define message sequence charts within doxygen comments using the \msc
1445 | # command. Doxygen will then run the mscgen tool (see
1446 | # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
1447 | # documentation. The MSCGEN_PATH tag allows you to specify the directory where
1448 | # the mscgen tool resides. If left empty the tool is assumed to be found in the
1449 | # default search path.
1450 |
1451 | MSCGEN_PATH =
1452 |
1453 | # If set to YES, the inheritance and collaboration graphs will hide
1454 | # inheritance and usage relations if the target is undocumented
1455 | # or is not a class.
1456 |
1457 | HIDE_UNDOC_RELATIONS = YES
1458 |
1459 | # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
1460 | # available from the path. This tool is part of Graphviz, a graph visualization
1461 | # toolkit from AT&T and Lucent Bell Labs. The other options in this section
1462 | # have no effect if this option is set to NO (the default)
1463 |
1464 | HAVE_DOT = NO
1465 |
1466 | # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
1467 | # allowed to run in parallel. When set to 0 (the default) doxygen will
1468 | # base this on the number of processors available in the system. You can set it
1469 | # explicitly to a value larger than 0 to get control over the balance
1470 | # between CPU load and processing speed.
1471 |
1472 | DOT_NUM_THREADS = 0
1473 |
1474 | # By default doxygen will write a font called FreeSans.ttf to the output
1475 | # directory and reference it in all dot files that doxygen generates. This
1476 | # font does not include all possible unicode characters however, so when you need
1477 | # these (or just want a differently looking font) you can specify the font name
1478 | # using DOT_FONTNAME. You need need to make sure dot is able to find the font,
1479 | # which can be done by putting it in a standard location or by setting the
1480 | # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
1481 | # containing the font.
1482 |
1483 | DOT_FONTNAME = FreeSans.ttf
1484 |
1485 | # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
1486 | # The default size is 10pt.
1487 |
1488 | DOT_FONTSIZE = 10
1489 |
1490 | # By default doxygen will tell dot to use the output directory to look for the
1491 | # FreeSans.ttf font (which doxygen will put there itself). If you specify a
1492 | # different font using DOT_FONTNAME you can set the path where dot
1493 | # can find it using this tag.
1494 |
1495 | DOT_FONTPATH =
1496 |
1497 | # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
1498 | # will generate a graph for each documented class showing the direct and
1499 | # indirect inheritance relations. Setting this tag to YES will force the
1500 | # the CLASS_DIAGRAMS tag to NO.
1501 |
1502 | CLASS_GRAPH = YES
1503 |
1504 | # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
1505 | # will generate a graph for each documented class showing the direct and
1506 | # indirect implementation dependencies (inheritance, containment, and
1507 | # class references variables) of the class with other documented classes.
1508 |
1509 | COLLABORATION_GRAPH = YES
1510 |
1511 | # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
1512 | # will generate a graph for groups, showing the direct groups dependencies
1513 |
1514 | GROUP_GRAPHS = YES
1515 |
1516 | # If the UML_LOOK tag is set to YES doxygen will generate inheritance and
1517 | # collaboration diagrams in a style similar to the OMG's Unified Modeling
1518 | # Language.
1519 |
1520 | UML_LOOK = NO
1521 |
1522 | # If set to YES, the inheritance and collaboration graphs will show the
1523 | # relations between templates and their instances.
1524 |
1525 | TEMPLATE_RELATIONS = NO
1526 |
1527 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
1528 | # tags are set to YES then doxygen will generate a graph for each documented
1529 | # file showing the direct and indirect include dependencies of the file with
1530 | # other documented files.
1531 |
1532 | INCLUDE_GRAPH = YES
1533 |
1534 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
1535 | # HAVE_DOT tags are set to YES then doxygen will generate a graph for each
1536 | # documented header file showing the documented files that directly or
1537 | # indirectly include this file.
1538 |
1539 | INCLUDED_BY_GRAPH = YES
1540 |
1541 | # If the CALL_GRAPH and HAVE_DOT options are set to YES then
1542 | # doxygen will generate a call dependency graph for every global function
1543 | # or class method. Note that enabling this option will significantly increase
1544 | # the time of a run. So in most cases it will be better to enable call graphs
1545 | # for selected functions only using the \callgraph command.
1546 |
1547 | CALL_GRAPH = NO
1548 |
1549 | # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
1550 | # doxygen will generate a caller dependency graph for every global function
1551 | # or class method. Note that enabling this option will significantly increase
1552 | # the time of a run. So in most cases it will be better to enable caller
1553 | # graphs for selected functions only using the \callergraph command.
1554 |
1555 | CALLER_GRAPH = NO
1556 |
1557 | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
1558 | # will graphical hierarchy of all classes instead of a textual one.
1559 |
1560 | GRAPHICAL_HIERARCHY = YES
1561 |
1562 | # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
1563 | # then doxygen will show the dependencies a directory has on other directories
1564 | # in a graphical way. The dependency relations are determined by the #include
1565 | # relations between the files in the directories.
1566 |
1567 | DIRECTORY_GRAPH = YES
1568 |
1569 | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
1570 | # generated by dot. Possible values are png, jpg, or gif
1571 | # If left blank png will be used.
1572 |
1573 | DOT_IMAGE_FORMAT = png
1574 |
1575 | # The tag DOT_PATH can be used to specify the path where the dot tool can be
1576 | # found. If left blank, it is assumed the dot tool can be found in the path.
1577 |
1578 | DOT_PATH =
1579 |
1580 | # The DOTFILE_DIRS tag can be used to specify one or more directories that
1581 | # contain dot files that are included in the documentation (see the
1582 | # \dotfile command).
1583 |
1584 | DOTFILE_DIRS =
1585 |
1586 | # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
1587 | # nodes that will be shown in the graph. If the number of nodes in a graph
1588 | # becomes larger than this value, doxygen will truncate the graph, which is
1589 | # visualized by representing a node as a red box. Note that doxygen if the
1590 | # number of direct children of the root node in a graph is already larger than
1591 | # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
1592 | # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
1593 |
1594 | DOT_GRAPH_MAX_NODES = 50
1595 |
1596 | # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
1597 | # graphs generated by dot. A depth value of 3 means that only nodes reachable
1598 | # from the root by following a path via at most 3 edges will be shown. Nodes
1599 | # that lay further from the root node will be omitted. Note that setting this
1600 | # option to 1 or 2 may greatly reduce the computation time needed for large
1601 | # code bases. Also note that the size of a graph can be further restricted by
1602 | # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
1603 |
1604 | MAX_DOT_GRAPH_DEPTH = 0
1605 |
1606 | # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
1607 | # background. This is disabled by default, because dot on Windows does not
1608 | # seem to support this out of the box. Warning: Depending on the platform used,
1609 | # enabling this option may lead to badly anti-aliased labels on the edges of
1610 | # a graph (i.e. they become hard to read).
1611 |
1612 | DOT_TRANSPARENT = NO
1613 |
1614 | # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
1615 | # files in one run (i.e. multiple -o and -T options on the command line). This
1616 | # makes dot run faster, but since only newer versions of dot (>1.8.10)
1617 | # support this, this feature is disabled by default.
1618 |
1619 | DOT_MULTI_TARGETS = YES
1620 |
1621 | # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
1622 | # generate a legend page explaining the meaning of the various boxes and
1623 | # arrows in the dot generated graphs.
1624 |
1625 | GENERATE_LEGEND = YES
1626 |
1627 | # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
1628 | # remove the intermediate dot files that are used to generate
1629 | # the various graphs.
1630 |
1631 | DOT_CLEANUP = YES
1632 |
--------------------------------------------------------------------------------