aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-08-05 11:31:20 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2011-08-05 11:31:20 +0000
commit999b2b28f4245e7717bff024cefe87905644cfb1 (patch)
treefcc057dfd0ba79a514294c9a203dba5a9b4132a7 /tests
parentdd6eb59eb0de0e8fe0482bbc9a4acb99e302c963 (diff)
downloadgdbm-999b2b28f4245e7717bff024cefe87905644cfb1.tar.gz
gdbm-999b2b28f4245e7717bff024cefe87905644cfb1.tar.bz2
Include progname.h instead of declaring canonical_progname.
Diffstat (limited to 'tests')
-rw-r--r--tests/gtdel.c16
-rw-r--r--tests/gtdump.c17
-rw-r--r--tests/gtfetch.c16
-rw-r--r--tests/gtload.c21
-rw-r--r--tests/gtver.c16
5 files changed, 10 insertions, 76 deletions
diff --git a/tests/gtdel.c b/tests/gtdel.c
index 6826532..ff9cdb9 100644
--- a/tests/gtdel.c
+++ b/tests/gtdel.c
@@ -21,17 +21,3 @@
21#include "gdbm.h" 21#include "gdbm.h"
22 22#include "progname.h"
23const char *
24canonical_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
diff --git a/tests/gtdump.c b/tests/gtdump.c
index 7030cfd..927a47c 100644
--- a/tests/gtdump.c
+++ b/tests/gtdump.c
@@ -21,17 +21,3 @@
21#include "gdbm.h" 21#include "gdbm.h"
22 22#include "progname.h"
23const char *
24canonical_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
@@ -47,3 +33,2 @@ main (int argc, char **argv)
47 int delim = '\t'; 33 int delim = '\t';
48 int data_z = 0;
49 34
diff --git a/tests/gtfetch.c b/tests/gtfetch.c
index e7ff542..0c254b7 100644
--- a/tests/gtfetch.c
+++ b/tests/gtfetch.c
@@ -21,2 +21,3 @@
21#include "gdbm.h" 21#include "gdbm.h"
22#include "progname.h"
22 23
@@ -35,17 +36,2 @@ print_key (FILE *fp, datum key, int delim)
35 36
36const char *
37canonical_progname (const char *str)
38{
39 const char *p;
40
41 p = strrchr (str, '/');
42 if (p)
43 p++;
44 else
45 p = str;
46 if (strncmp (p, "lt-", 3) == 0)
47 p += 3;
48 return p;
49}
50
51int 37int
diff --git a/tests/gtload.c b/tests/gtload.c
index f75f671..550833f 100644
--- a/tests/gtload.c
+++ b/tests/gtload.c
@@ -21,17 +21,3 @@
21#include "gdbm.h" 21#include "gdbm.h"
22 22#include "progname.h"
23const char *
24canonical_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
@@ -102,2 +88,7 @@ main (int argc, char **argv)
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
diff --git a/tests/gtver.c b/tests/gtver.c
index 0865666..27fc0b9 100644
--- a/tests/gtver.c
+++ b/tests/gtver.c
@@ -21,17 +21,3 @@
21#include "gdbm.h" 21#include "gdbm.h"
22 22#include "progname.h"
23const char *
24canonical_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

Return to:

Send suggestions and report system problems to the System administrator.