]> git.ozlabs.org Git - ccan/commitdiff
ntdb: add _info file
authorDavid Disseldorp <ddiss@suse.de>
Mon, 16 Mar 2015 14:15:31 +0000 (15:15 +0100)
committerDavid Disseldorp <ddiss@suse.de>
Mon, 16 Mar 2015 14:15:31 +0000 (15:15 +0100)
The Authors entries were added based on source file copyright
statements. Full details can be found via the upstream Samba Git
repository.

Signed-off-by: David Disseldorp <ddiss@suse.de>
ccan/ntdb/_info [new file with mode: 0644]

diff --git a/ccan/ntdb/_info b/ccan/ntdb/_info
new file mode 100644 (file)
index 0000000..d5afd14
--- /dev/null
@@ -0,0 +1,49 @@
+#include "config.h"
+#include <stdio.h>
+#include <string.h>
+
+/**
+ * ntdb - Next Generation Trivial Database
+ *
+ * Example:
+ *     #include <stdio.h>
+ *      #include <err.h>
+ *      #include "ntdb.h"
+ *
+ *     int main(int argc, char *argv[])
+ *     {
+ *             NTDB_DATA key = ntdb_mkdata("key", 3);
+ *             NTDB_DATA val = ntdb_mkdata("val", 3);
+ *
+ *             ntdb = ntdb_open("example.ntdb", NTDB_DEFAULT,
+ *                              O_RDWR | O_CREAT | O_TRUNC, 0600, NULL);
+ *             if (ntdb == NULL)
+ *                     errx(1, "failed to open database file");
+ *
+ *             ntdb_store(ntdb, key, val, NTDB_INSERT);
+ *
+ *             ntdb_close(ntdb);
+ *
+ *             return 0;
+ *     }
+ *
+ * License: LGPL (v3 or any later version)
+ * Authors: Rusty Russell
+ *          Andrew Tridgell
+ *          Jeremy Allison
+ *          Jelmer Vernooij
+ *          Volker Lendecke
+ *          Andrew Esh
+ *          Simon McVittie
+ *          Tim Potter
+ */
+int main(int argc, char *argv[])
+{
+       if (argc != 2)
+               return 1;
+
+       if (strcmp(argv[1], "depends") == 0)
+               return 0;
+
+       return 1;
+}