diff options
author | Colin Watson <cjwatson@debian.org> | 2019-02-03 10:38:56 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-02-03 10:38:56 +0000 |
commit | 04d3ced410a4eb43264701481178e7270f83e994 (patch) | |
tree | 3fb8de54a14d7b250d07b14d7c31516d01eb7330 /src/whatis.c | |
parent | 6e28f527ce5f349af4f172313300e68ca98d75e8 (diff) |
Add helper functions for common container cases
* lib/glcontainers.c (new_string_list, new_string_map, new_string_set):
New functions.
* lib/glcontainers.h (new_string_list, new_string_map, new_string_set):
Add prototypes.
* lib/orderfiles.c (order_files): Use new_string_list.
* src/check_mandirs.c (test_manfile, add_dir_entries): Likewise.
* src/globbing.c (look_for_file, expand_path): Likewise.
* src/man.c (get_section_list): Likewise.
* src/manp.c (get_scetions, get_manpath_from_path, create_pathlist):
Likewise.
* src/straycats.c (check_for_stray): Likewise.
* libdb/db_gdbm.c (man_gdbm_firstkey): Use new_string_map.
* src/check_mandirs.c (test_manfile): Likewise.
* src/globbing.c (update_directory_cache): Likewise.
* src/man.c (try_db): Likewise.
* src/mandb.c (main): Likewise.
* libdb/db_btree.c (btree_findkey): Use new_string_set.
* src/whatis.c (main): Likewise.
Diffstat (limited to 'src/whatis.c')
-rw-r--r-- | src/whatis.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/whatis.c b/src/whatis.c index 5d45ae46..7af9baaa 100644 --- a/src/whatis.c +++ b/src/whatis.c @@ -969,8 +969,7 @@ int main (int argc, char *argv[]) manpathlist = create_pathlist (manp); - display_seen = gl_set_create_empty (GL_HASH_SET, string_equals, - string_hash, plain_free); + display_seen = new_string_set (GL_HASH_SET); #ifdef HAVE_ICONV locale_charset = xasprintf ("%s//IGNORE", get_locale_charset ()); |