summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2010-11-23 21:16:02 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2010-11-23 21:21:27 -0800
commitc2ae12c39ae97744f4c558dd6eee367a928a1222 (patch)
tree75eee8e32b4b7aa8968177204db0673170643246
parenteb7d81eb2a84f222795603097257a4d76732d504 (diff)
downloadpaxutils-c2ae12c39ae97744f4c558dd6eee367a928a1222.tar.gz
Omit and/or split out functions not needed for tar.
* paxlib/DISTFILES: Add exit-status.c. * paxlib/Makefile.am (libpax_a_SOURCES): Add exit-status.c. * paxlib/exit-status.c: New file. * paxlib/exit.c (exit_status): Move to exit-status.c. * paxlib/names.c (hash_string_insert, hash_string_lookup): Remove. * paxlib/paxlib.h: Don't include hash.h. (hash_string_insert, hash_string_lookup): Remove.
-rw-r--r--paxlib/DISTFILES1
-rw-r--r--paxlib/Makefile.am4
-rw-r--r--paxlib/exit-status.c3
-rw-r--r--paxlib/exit.c2
-rw-r--r--paxlib/names.c19
-rw-r--r--paxlib/paxlib.h4
6 files changed, 7 insertions, 26 deletions
diff --git a/paxlib/DISTFILES b/paxlib/DISTFILES
index bb4c9e9..eec6199 100644
--- a/paxlib/DISTFILES
+++ b/paxlib/DISTFILES
@@ -1,4 +1,5 @@
error.c
exit.c
+exit-status.c
names.c
paxlib.h
diff --git a/paxlib/Makefile.am b/paxlib/Makefile.am
index 0028493..3e31857 100644
--- a/paxlib/Makefile.am
+++ b/paxlib/Makefile.am
@@ -27,6 +27,7 @@ libpax_a_SOURCES = \
localedir.h\
error.c\
exit.c\
+ exit-status.c\
names.c\
paxbuf.c\
paxlib.h\
@@ -44,6 +45,3 @@ localedir.h : Makefile
echo "#endif" >> $@
rtapelib.o: localedir.h
-
-
-
diff --git a/paxlib/exit-status.c b/paxlib/exit-status.c
new file mode 100644
index 0000000..3c244ab
--- /dev/null
+++ b/paxlib/exit-status.c
@@ -0,0 +1,3 @@
+#include <system.h>
+#include <paxlib.h>
+int exit_status = PAXEXIT_SUCCESS;
diff --git a/paxlib/exit.c b/paxlib/exit.c
index 1a2e5b5..c36e7d5 100644
--- a/paxlib/exit.c
+++ b/paxlib/exit.c
@@ -19,8 +19,6 @@
#include <system.h>
#include <paxlib.h>
-int exit_status = PAXEXIT_SUCCESS;
-
void
pax_exit ()
{
diff --git a/paxlib/names.c b/paxlib/names.c
index 80fa83e..5766d4c 100644
--- a/paxlib/names.c
+++ b/paxlib/names.c
@@ -1,5 +1,5 @@
/* This file is part of GNU paxutils
- Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -56,7 +56,7 @@ hash_string_insert_prefix (Hash_table **table, char const *string, size_t len,
}
else
s = xstrdup (string);
-
+
if (! ((t
|| (*table = t = hash_initialize (0, 0, hash_string_hasher,
hash_string_compare, 0)))
@@ -76,21 +76,6 @@ hash_string_insert_prefix (Hash_table **table, char const *string, size_t len,
}
}
-/* Return zero if TABLE contains a copy of STRING; otherwise, insert a
- copy of STRING to TABLE and return 1. */
-bool
-hash_string_insert (Hash_table **table, char const *string)
-{
- return hash_string_insert_prefix (table, string, 0, NULL);
-}
-
-/* Return 1 if TABLE contains STRING. */
-bool
-hash_string_lookup (Hash_table const *table, char const *string)
-{
- return table && hash_lookup (table, string);
-}
-
static Hash_table *prefix_table[2];
diff --git a/paxlib/paxlib.h b/paxlib/paxlib.h
index eeb445e..d0ba45b 100644
--- a/paxlib/paxlib.h
+++ b/paxlib/paxlib.h
@@ -21,7 +21,6 @@
#ifndef _paxlib_h_
#define _paxlib_h_
-#include <hash.h>
#include <inttostr.h>
/* Error reporting functions and definitions */
@@ -107,9 +106,6 @@ void fatal_exit (void) __attribute__ ((noreturn));
/* Name-related functions */
-bool hash_string_insert (Hash_table **table, char const *string);
-bool hash_string_lookup (Hash_table const *table, char const *string);
-
bool removed_prefixes_p (void);
char *safer_name_suffix (char const *file_name, bool link_target, bool absolute_names);