summaryrefslogtreecommitdiff
path: root/bootstrap.conf
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-02-03 10:20:57 +0000
committerColin Watson <cjwatson@debian.org>2019-02-03 10:20:57 +0000
commit6e28f527ce5f349af4f172313300e68ca98d75e8 (patch)
treeb703908d0214eb874d415a2d660b740e560d91ad /bootstrap.conf
parent816c0f8bfc8e8a82cdf3993ac4d0593cbd3a4eb9 (diff)
Replace hashtable with Gnulib containers
Since we're using Gnulib's container types anyway, we might as well reduce the maintenance burden of local code, especially since the result tends to be more concise. * bootstrap.conf (gnulib_modules): Add hash-map, hash-set, xmap, and xset. * lib/glcontainers.h (GL_MAP_FOREACH_START, GL_MAP_FOREACH_END): New macros. * lib/orderfiles.c (compare_physical_offsets, order_files): Convert physical_offsets from a hashtable to a gl_map. * libdb/db_btree.c (loop_check_hash): Rename to ... (loop_check): ... this. (btree_findkey): Convert loop_check from a hashtable to a gl_set. * libdb/db_gdbm.c (parent_sortkey_hash): Rename to ... (parent_keys: ... this. (struct sortkey, parent_sortkey_hashtable_free): Remove. (sortkey_hashtable_free): Rename to ... (datum_free): ... this. Adjust for gl_list's expected interface. (sortkey_compare): Rename to ... (datum_compare): ... this. Adjust for gl_list's expected interface. (datum_equals, datum_hash): New functions. (man_gdbm_firstkey, man_gdbm_nextkey, man_gdbm_close): Convert parent_keys from a hashtable to a gl_map, and convert its values from hashtables with manual linking to gl_lists using a hash for fast lookup by key. * src/check_mandirs.c (whatis_hash): Rename to ... (whatis_map): ... this. (struct whatis_hashent): Rename to ... (struct whatis): ... this. (whatis_hashtable_free): Rename to ... (whatis_free): ... this. Adjust for gl_map's expected interface. (test_manfile): Convert whatis_map from a hashtable to a gl_map. * src/globbing.c (struct dirent_hashent): Rename to ... (struct dirent_names): ... this. (dirent_hashtable_free): Rename to ... (dirent_names_free): ... this. Adjust for gl_map's expected interface. (dirent_hash): Rename to ... (dirent_map): ... this. (update_directory_cache): Convert dirent_map from a hashtable to a gl_map. * src/man.c (db_hash): Rename to ... (db_map): ... this. (db_hashtable_free): Remove. (try_db, main): Convert db_map from a hashtable to a gl_map. * src/mandb.c (process_manpath, tried_catdirs_free, purge_catdir, purge_catdirs, main): Convert tried_catdirs from a hashtable to a gl_map. * src/whatis.c (display, main): Convert display_seen from a hashtable to a gl_set. * lib/Makefile.am (libman_la_SOURCES): Remove hashtable.c and hashtable.h. * lib/README: Remove hashtable.*. * lib/hashtable.c, lib/hashtable.h: Remove.
Diffstat (limited to 'bootstrap.conf')
-rw-r--r--bootstrap.conf4
1 files changed, 4 insertions, 0 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index 27747b55..a86cb762 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -38,7 +38,9 @@ gnulib_modules="
gitlog-to-changelog
glob
gnupload
+ hash-map
hash-pjw-bare
+ hash-set
idpriv-drop
idpriv-droptemp
lchown
@@ -74,6 +76,8 @@ gnulib_modules="
xalloc
xgetcwd
xlist
+ xmap
+ xset
xstdopen
xstrndup
xvasprintf