_info 978 B

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