summaryrefslogtreecommitdiff
path: root/lib/hash.h
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* hash: remove deprecated hash_insert0 functionGiuseppe Scrivano2015-04-031-4/+0
| | | | | | * lib/hash.h (hash_insert0): Remove deprecated function. * lib/hash.c (hash_insert0): Likewise. * NEWS: Document the interface change.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* In commentary, do not use ` to quote.Paul Eggert2012-01-051-3/+3
|
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* mark functions with const and pure attributesJim Meyering2011-11-281-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark functions per suggestions from gcc-4.6 when using these options: -Wsuggest-attribute=pure -Wsuggest-attribute=const. Use gnulib's _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST macros. Follow these guidelines: when possible, apply the attribute to an extern declaration, not to its definition. Apply it to the definition only when the definition is static. * lib/argmatch.h (argmatch, argmatch_to_argument): Mark. * lib/argv-iter.h (argv_iter_n_args): Likewise. * lib/base64.h (isbase64): Likewise. * lib/basename-lgpl.c (last_component, base_len): Likewise. * lib/c-ctype.h (c_isascii, c_isalnum, c_isalpha): Likewise. (c_isblank, c_iscntrl, c_isdigit, c_islower, c_isgraph): Likewise. (c_isprint, c_ispunct, c_isspace, c_isupper, c_isxdigit): Likewise. (c_tolower, c_toupper): Likewise. * lib/c-strcase.h (c_strcasecmp, c_strncasecmp): Likewise. * lib/chdir-long.c (find_non_slash): Likewise. * lib/dirname.h (base_len, dir_len, last_component): Likewise. * lib/exclude.h (fnmatch_pattern_has_wildcards): Likewise. * lib/file-type.h (file_type): Likewise. * lib/filenamecat-lgpl.c (longest_relative_suffix): Likewise. * lib/filevercmp.c (verrevcmp): Likewise. * lib/freadahead.h (freadahead): Likewise. * lib/fts.c (fts_maxarglen): Likewise. * lib/hash-pjw.h (hash_pjw): Likewise. * lib/hash-triple.h (triple_hash_no_name, triple_compare_ino_str): * lib/hash.c (is_prime, next_prime): Likewise. * lib/hash.c (hash_get_n_buckets, hash_get_n_buckets_used): Likewise. (hash_get_n_entries, hash_get_max_bucket_length): Likewise. (hash_table_ok, hash_get_first, hash_string): Likewise. (compute_bucket_size): Likewise. * lib/i-ring.h (i_ring_empty): Likewise. * lib/isnan.c (isnanl): Likewise. * lib/math.h (isnanl, rpl_isnanl): Likewise. * lib/memcasecmp.h (memcasecmp): Likewise. * lib/memchr2.h (memchr2): Likewise. * lib/memcmp2.h (memcmp2): Likewise. * lib/parse-datetime.y (lookup_zone): Likewise. * lib/sockets.h (gl_sockets_startup, gl_sockets_cleanup) [!WINDOWS_SOCKETS]: Likewise. * lib/strnlen1.h (strnlen1): Likewise. * lib/uniwidth.in.h (uc_width): Likewise, but since this is installed as a public header by libunistring, it cannot depend on the macro definitions of gnulib-common.m4, so open-code the __attribute__... * lib/quotearg.c: Add pragma to avoid unwarranted suggestion from gcc's -Wsuggest-attribute=pure for quoting_options_from_style. (quoting_options_from_style): Add a comment. * lib/propername.h (proper_name): Add a comment.
* hash: deprecate poorly-named hash_insert0: use hash_insert_if_absentJim Meyering2011-11-181-2/+17
| | | | | | | | | | | | | * lib/hash.c (hash_insert_if_absent): Rename from hash_insert0. Add a sentence to the comment. (hash_insert0): New function that simply calls hash_insert_if_absent. * lib/hash.h (hash_insert_if_absent): Declare it. (hash_insert0): Add deprecation attribute. (_GL_ATTRIBUTE_DEPRECATED): Define. * lib/di-set.c (di_set_insert): Use hash_insert_if_absent, not hash_insert0. * NEWS: Mention it, even though it's not really an incompatible change Prompted by a question from Matthew Booth <mbooth@redhat.com>.
* Consistent macro naming for macros that use GCC __attribute__.Bruno Haible2011-02-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * lib/di-set.h (_GL_ATTRIBUTE_NONNULL): Renamed from _ATTRIBUTE_NONNULL_. * lib/ino-map.h (_GL_ATTRIBUTE_NONNULL): Likewise. * lib/hash.h (_GL_ATTRIBUTE_WUR): Renamed from ATTRIBUTE_WUR. * lib/ignore-value.h (_GL_ATTRIBUTE_DEPRECATED): Renamed from ATTRIBUTE_DEPRECATED. * lib/openat.h (_GL_ATTRIBUTE_NORETURN): Renamed from ATTRIBUTE_NORETURN. * lib/sigpipe-die.h (_GL_ATTRIBUTE_NORETURN): Likewise. * lib/xmemdup0.h (_GL_ATTRIBUTE_NORETURN): Likewise. * lib/xstrtol.h (_GL_ATTRIBUTE_NORETURN): Likewise. * lib/xalloc.h (_GL_ATTRIBUTE_NORETURN): Likewise. (_GL_ATTRIBUTE_MALLOC): Renamed from ATTRIBUTE_MALLOC. (_GL_ATTRIBUTE_ALLOC_SIZE): Renamed from ATTRIBUTE_ALLOC_SIZE. * lib/version-etc.h (_GL_ATTRIBUTE_SENTINEL): Renamed from ATTRIBUTE_SENTINEL. * lib/safe-alloc.h (_GL_ATTRIBUTE_RETURN_CHECK): Renamed from ATTRIBUTE_RETURN_CHECK. * tests/test-ignore-value.c (_GL_ATTRIBUTE_RETURN_CHECK): Likewise. * tests/test-argmatch.c (_GL_ATTRIBUTE_NORETURN): Renamed from ATTRIBUTE_NORETURN. * tests/test-exclude.c (_GL_ATTRIBUTE_NORETURN): Likewise. Reported by Paul Eggert.
* Don't interfere with a program's definition of __attribute__.Bruno Haible2011-02-151-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/argp.h (__attribute__): Remove definition. (_GL_ATTRIBUTE_FORMAT): New macro. (argp_error, __argp_error, argp_failure, __argp_failure): Use it. * lib/argp-fmtstream.h (__attribute__): Remove definition. (_GL_ATTRIBUTE_FORMAT): New macro. (__argp_fmtstream_printf, argp_fmtstream_printf): Use it. * lib/argp-help.c (hol_entry_long_iterate): Use __attribute__ only for GCC 3 or newer. * lib/error.h (__attribute__): Remove definition. (_GL_ATTRIBUTE_FORMAT): New macro. (error, error_at_line): Use it. * lib/hash.h (__attribute__): Remove definition. (ATTRIBUTE_WUR): Update definition. Define always. * lib/openat.h (__attribute__): Remove definition. (ATTRIBUTE_NORETURN): Update definition. Define always. * lib/sigpipe-die.h (__attribute__): Remove definition. (ATTRIBUTE_NORETURN): Update definition. Define always. * lib/vasnprintf.h (__attribute__): Remove definition. (_GL_ATTRIBUTE_FORMAT): New macro. (asnprintf, vasnprintf): Use it. * lib/xalloc.h (__attribute__): Remove definition. (ATTRIBUTE_NORETURN): Update definition. Define always. (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE): Define always. * lib/xmemdup0.h (__attribute__): Remove definition. (ATTRIBUTE_NORETURN): Update definition. Define always. * lib/xprintf.h (__attribute__): Remove definition. (_GL_ATTRIBUTE_FORMAT): New macro. (xprintf, xvprintf, xfprintf, xvfprintf): Use it. * lib/xstrtol.h (__attribute__): Remove definition. (ATTRIBUTE_NORETURN): Update definition. Define always. * lib/xvasprintf.h (__attribute__): Remove definition. (_GL_ATTRIBUTE_FORMAT): New macro. (xasprintf, xvasprintf): Use it. * tests/test-argmatch.c (__attribute__): Remove definition. (ATTRIBUTE_NORETURN): Update definition. Define always. * tests/test-exclude.c (__attribute__): Remove definition. (ATTRIBUTE_NORETURN): Update definition. Define always. Reported by Paul Eggert.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* hash: extend module to deal with non-pointer keysJim Meyering2010-07-011-0/+2
| | | | | | | | * lib/hash.c (hash_insert0): New interface, much like hash_insert but that allows insertion of non-pointer entries. Do not disallow an ENTRY value of NULL. (hash_insert): This is now just a thin wrapper. Call hash_insert0. * lib/hash.h (hash_insert0): Declare.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+2
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* update nearly all FSF copyright year lists to include 2009Jim Meyering2009-12-291-1/+1
| | | | | | | | | | | | | | | | | | The files named by the following are exempted: grep -v '^#' config/srclist.txt|grep -v '^$' \ | while read src dst; do test -f "$dst" && { echo "$dst"; continue; } test -d "$dst" || continue echo "$dst"/$(basename "$src") done > exempt git ls-files tests/unictype >> exempt In the remaining files, convert to all-interval notation if - there is already at least one year interval like 2000-2003 - the file is maintained by me - the file is in lib/uni*/, where that style already prevails Otherwise, use update-copyright's default.
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-7/+7
|
* hash: minor cleanupsEric Blake2009-06-171-6/+0
| | | | | | | | | | | | * lib/hash.h (hash_entry): Make opaque, by moving... * lib/hash.c (hash_entry): ...here. (hash_insert): Clarify restrictions on what can be inserted. (hash_get_next): Clarify when it is safe to remove an element during traversal. (check_tuning): Skip verification when tuning is known safe. (hash_initialize): Clarify restrictions on tuning. Signed-off-by: Eric Blake <ebb9@byu.net>
* hash: declare some functions with the warn_unused_result attributeJim Meyering2009-06-071-4/+15
| | | | * lib/hash.h (__attribute__, ATTRIBUTE_WUR): Define.
* Change copyright notice from GPLv2+ to GPLv3+.Bruno Haible2007-10-071-5/+4
|
* *** empty log message ***Paul Eggert2005-05-141-1/+1
|
* Fix several address-calculation bugs in the hash modules,Paul Eggert2003-10-261-10/+11
| | | | plus some minor code cleanup.
* Assume C89, so PARAMS isn't needed.Paul Eggert2003-06-181-34/+26
|
* .h files should stand alone, but we shouldn't include <sys/types.h>Paul Eggert2003-06-041-0/+2
| | | | if we can get away with just <stddef.h>.
* (struct hash_table): Don't define here. Merely declare it.Jim Meyering2001-11-231-33/+1
|
* Bracket contents of file with #ifndef HASH_H_ ... #endif.Jim Meyering2001-11-221-9/+14
|
* back out Copyright date changes for files with no changes yearJim Meyering2000-08-071-1/+1
|
* update copyright dateJim Meyering2000-07-091-1/+1
|
* (struct hash_tuning): Define.Jim Meyering1999-03-151-16/+33
| | | | | (struct hash_table) [tuning]: Add member. (hash_initialize): Add `tuning' parameter.
* (hash_insert): Update prototype.Jim Meyering1999-03-151-2/+2
|
* Lots of minor spec and name changes, and new comments.Jim Meyering1998-04-061-184/+94
| | | | From François Pinard.
* Use PARAMS, not __P.Jim Meyering1997-12-211-8/+8
|
* s/HAVE_DECLARATION_/HAVE_DECL_/.FILEUTILS-3_16gJim Meyering1997-12-141-2/+2
|
* add PARAMS around prototype listsJim Meyering1997-11-191-33/+58
|
* use HASH_H, not _hash_h_ in #ifndefJim Meyering1997-09-171-18/+25
| | | | | fix comment: hash_rehash does *not* use hash_key_freer (HASH_INSERT_NEW_ITEM): Take new arg: Failp.
* from ti/hdlsvJim Meyering1997-09-171-0/+161