- return excluded_filename (excluded, name + FILE_SYSTEM_PREFIX_LEN (name));
-}
-\f
-/* Hash tables of strings. */
-
-/* Calculate the hash of a string. */
-static unsigned
-hash_string_hasher (void const *name, unsigned n_buckets)
-{
- return hash_string (name, n_buckets);
-}
-
-/* Compare two strings for equality. */
-static bool
-hash_string_compare (void const *name1, void const *name2)
-{
- return strcmp (name1, name2) == 0;
-}
-
-/* Return zero if TABLE contains a copy of STRING; otherwise, insert a
- copy of STRING to TABLE and return 1. */
-static bool
-hash_string_insert (Hash_table **table, char const *string)
-{
- Hash_table *t = *table;
- char *s = xstrdup (string);
- char *e;
-
- if (! ((t
- || (*table = t = hash_initialize (0, 0, hash_string_hasher,
- hash_string_compare, 0)))
- && (e = hash_insert (t, s))))
- xalloc_die ();
-
- if (e == s)
- return 1;
- else
- {
- free (s);
- return 0;
- }
-}
-
-/* Return 1 if TABLE contains STRING. */
-static bool
-hash_string_lookup (Hash_table const *table, char const *string)
-{
- return table && hash_lookup (table, string);
-}
-\f
-/* Names to avoid dumping. */
-static Hash_table *avoided_name_table;
-
-/* Remember to not archive NAME. */
-void
-add_avoided_name (char const *name)
-{
- hash_string_insert (&avoided_name_table, name);
-}
-
-/* Should NAME be avoided when archiving? */
-bool
-is_avoided_name (char const *name)
-{
- return hash_string_lookup (avoided_name_table, name);
-}
-
-\f
-static Hash_table *individual_file_table;
-
-static void
-register_individual_file (char const *name)
-{
- struct stat st;
-
- if (deref_stat (dereference_option, name, &st) != 0)
- return; /* Will be complained about later */
- if (S_ISDIR (st.st_mode))
- return;
-
- hash_string_insert (&individual_file_table, name);
-}
-
-bool
-is_individual_file (char const *name)
-{
- return hash_string_lookup (individual_file_table, name);