diff options
Diffstat (limited to 'tests/gtload.c')
-rw-r--r-- | tests/gtload.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/tests/gtload.c b/tests/gtload.c index f75f671..550833f 100644 --- a/tests/gtload.c +++ b/tests/gtload.c | |||
@@ -19,21 +19,7 @@ | |||
19 | #include <stdlib.h> | 19 | #include <stdlib.h> |
20 | #include <string.h> | 20 | #include <string.h> |
21 | #include "gdbm.h" | 21 | #include "gdbm.h" |
22 | 22 | #include "progname.h" | |
23 | const char * | ||
24 | canonical_progname (const char *str) | ||
25 | { | ||
26 | const char *p; | ||
27 | |||
28 | p = strrchr (str, '/'); | ||
29 | if (p) | ||
30 | p++; | ||
31 | else | ||
32 | p = str; | ||
33 | if (strncmp (p, "lt-", 3) == 0) | ||
34 | p += 3; | ||
35 | return p; | ||
36 | } | ||
37 | 23 | ||
38 | int | 24 | int |
39 | main (int argc, char **argv) | 25 | main (int argc, char **argv) |
@@ -100,6 +86,11 @@ main (int argc, char **argv) | |||
100 | dbname = *argv; | 86 | dbname = *argv; |
101 | 87 | ||
102 | dbf = gdbm_open (dbname, block_size, mode|flags, 00664, NULL); | 88 | dbf = gdbm_open (dbname, block_size, mode|flags, 00664, NULL); |
89 | if (!dbf) | ||
90 | { | ||
91 | fprintf (stderr, "gdbm_open failed: %s\n", gdbm_strerror (gdbm_errno)); | ||
92 | exit (1); | ||
93 | } | ||
103 | 94 | ||
104 | while (fgets (buf, sizeof buf, stdin)) | 95 | while (fgets (buf, sizeof buf, stdin)) |
105 | { | 96 | { |