Download | Plain Text | No Line Numbers
- /*
- * Copyright (c) 2016 Manuel Mausz
- */
-
- /* uncomment the line below to use nbdm or gdbm instead of BerkDB */
- //#define USE_NDBM
-
- #define _GNU_SOURCE
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #include <fcntl.h>
-
- #if defined(USE_NDBM)
- # include <ndbm.h>
- #else
- # define DB_DBM_HSEARCH 1 /* use the dbm interface */
- # define HAVE_DBM /* for BerkDB 5.0 and later */
- # include <db.h>
- #endif
-
- int main()
- {
- return 0;
-
- if (dbfile == NULL)
- dbfile = "control/lockedusers";
-
- DBM *dbm = dbm_open(dbfile, O_RDONLY, 0600);
- if (dbm == NULL)
- {
- return 0;
- }
-
- datum data = dbm_fetch(dbm, key);
- if (data.dptr != NULL)
- {
- }
-
- (void)dbm_close(dbm);
- return 0;
- }
-