429 |
datum key1, content1; |
datum key1, content1; |
430 |
#endif /* FAST_BTREE */ |
#endif /* FAST_BTREE */ |
431 |
|
|
432 |
key.dptr = KEY; |
key.dptr = xstrdup (KEY); |
433 |
key.dsize = sizeof KEY; |
key.dsize = sizeof KEY; |
434 |
content.dptr = (char *) xmalloc (16); /* 11 is max long with '\0' */ |
content.dptr = (char *) xmalloc (16); /* 11 is max long with '\0' */ |
435 |
(void) sprintf (content.dptr, "%ld", (long) time (NULL)); |
(void) sprintf (content.dptr, "%ld", (long) time (NULL)); |
462 |
#endif /* !FAST_BTREE */ |
#endif /* !FAST_BTREE */ |
463 |
|
|
464 |
MYDBM_CLOSE (dbf); |
MYDBM_CLOSE (dbf); |
465 |
|
free (key.dptr); |
466 |
free (content.dptr); |
free (content.dptr); |
467 |
} |
} |
468 |
|
|
472 |
{ |
{ |
473 |
datum key; |
datum key; |
474 |
|
|
475 |
key.dptr = KEY; |
key.dptr = xstrdup (KEY); |
476 |
key.dsize = sizeof KEY; |
key.dsize = sizeof KEY; |
477 |
|
|
478 |
/* we don't really care if we can't open it RW - it's not fatal */ |
/* we don't really care if we can't open it RW - it's not fatal */ |
489 |
if (debug) |
if (debug) |
490 |
fprintf (stderr, "reset_db_time()\n"); |
fprintf (stderr, "reset_db_time()\n"); |
491 |
MYDBM_CLOSE (dbf); |
MYDBM_CLOSE (dbf); |
492 |
|
free (key.dptr); |
493 |
} |
} |
494 |
|
|
495 |
/* routine to prepare/create the db prior to calling testmandirs() */ |
/* routine to prepare/create the db prior to calling testmandirs() */ |
542 |
datum key, content; |
datum key, content; |
543 |
short new; |
short new; |
544 |
|
|
545 |
key.dptr = KEY; |
key.dptr = xstrdup (KEY); |
546 |
key.dsize = sizeof KEY; |
key.dsize = sizeof KEY; |
547 |
content = MYDBM_FETCH (dbf, key); |
content = MYDBM_FETCH (dbf, key); |
548 |
MYDBM_CLOSE (dbf); |
MYDBM_CLOSE (dbf); |
549 |
|
free (key.dptr); |
550 |
|
|
551 |
if (debug) |
if (debug) |
552 |
fprintf (stderr, "update_db(): %ld\n", |
fprintf (stderr, "update_db(): %ld\n", |