Merge branch 'ntdb' of https://github.com/ddiss/ccan into ddiss-ntdb
[ccan] / ccan / ntdb / _info
1 #include "config.h"
2 #include <stdio.h>
3 #include <string.h>
4
5 /**
6  * ntdb - Next Generation Trivial Database
7  *
8  * Example:
9  *      #include <stdio.h>
10  *      #include <err.h>
11  *      #include "ntdb.h"
12  *
13  *      int main(int argc, char *argv[])
14  *      {
15  *              NTDB_DATA key = ntdb_mkdata("key", 3);
16  *              NTDB_DATA val = ntdb_mkdata("val", 3);
17  *
18  *              ntdb = ntdb_open("example.ntdb", NTDB_DEFAULT,
19  *                               O_RDWR | O_CREAT | O_TRUNC, 0600, NULL);
20  *              if (ntdb == NULL)
21  *                      errx(1, "failed to open database file");
22  *
23  *              ntdb_store(ntdb, key, val, NTDB_INSERT);
24  *
25  *              ntdb_close(ntdb);
26  *
27  *              return 0;
28  *      }
29  *
30  * License: LGPL (v3 or any later version)
31  * Authors: Rusty Russell
32  *          Andrew Tridgell
33  *          Jeremy Allison
34  *          Jelmer Vernooij
35  *          Volker Lendecke
36  *          Andrew Esh
37  *          Simon McVittie
38  *          Tim Potter
39  */
40 int main(int argc, char *argv[])
41 {
42         if (argc != 2)
43                 return 1;
44
45         if (strcmp(argv[1], "depends") == 0)
46                 return 0;
47
48         return 1;
49 }