summaryrefslogtreecommitdiffstats
path: root/hash.c
AgeCommit message (Collapse)Author
2019-01-04Clean up code indentation.Kevin McCarthy
These are mostly automated changes corresponding to the emacs settings: (c-set-style "linux") (setq c-basic-offset 2) (c-set-offset 'case-label '+) Most of the code follows the convention: (add-to-list 'c-cleanup-list 'space-before-funcall) but this is not enforced by this indentation cleanup. Also, I personally dislike tabs, so I have: (setq-default indent-tabs-mode nil) in my own configuration. However I have no desire to change every line just for that effect. So this cleanup does nothing about the mix issue. Some of the secondary files (e.g. regex.c) have been skipped. I've also skipped crypt-gpgme.c, because I need to think about that file. Werner Koch and the GnuPG team contributed most it, and it follows the Gnu indentation settings. It should probably be made uniform with Mutt, but I don't want to discourage future GnuPG contribution to the file. I manually reverted a few unsightly cleanups, and added a few tweeks when I saw things that could be improved.
2018-12-31Remove trailing whitespace.Kevin McCarthy
The result of find . -name "*.[ch]" -exec emacs -batch {} \ --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
2017-02-10Change "allow_dups" into a flag at hash creation.Kevin McCarthy
Instead of having an "allow_dups" parameter for hash_insert(), add a flag, MUTT_HASH_ALLOW_DUPS, to hash_create(). Currently ReverseAlias, subj_hash, and thread_hash allow duplicate keys. Change those hashes to pass the flag at creation, and remove the last parameter from all callers of hash_insert().
2017-01-28Add hash_find_elem to get the hash element.Kevin McCarthy
This will be used in the following patch for directly manipulating the label counter.
2017-01-28Add reentrant hash_walk() function for iterating down a hash table.David Champion
2017-01-17Add casecmp and strdup_key flags to hash_create()Kevin McCarthy
Aliases and (in the future), X-Label hashes will require a hash that strdups the key. Convert the casecmp parameter of hash_create() to a flags parameter, and add a flag to strdup the keys.
2017-01-06Convert HASH to be indexable by unsigned int. (see #3905)Kevin McCarthy
Convert the HASH to be usable for either string or unsigned int keys, so that a uid hash can be added for imap. To keep hash-usage code disruption to a minimum, this introduces new create/insert/find/delete functions for the int hash, but keeps the old function names for string keys. This implementation makes the key a union. It may have been a better idea to introduce a whole new structure, but this way allows minimum changes to and maximum reuse of the existing hash code.
2009-03-09Restore $reverse_alias feature by using case-insensitive hash keysRocco Rutte
The fix is implemented as callbacks in the hash table so we can avoid working with copies of the mailbox keys but work on the originals instead and don't pollute the code with lower-case conversions all over the place. While I'm at it, turn int hashes into unsigned values since the hash function returns unsigned values now, too. Closes #3185.
2009-01-03Make hash_string work in unsigned domainBrendan Cully
2008-12-16Remove redundant int clampingErik Hovland
2008-07-02Use casts to avoid triggering integer overflow detection in hash functionRocco Rutte
2006-05-18Avoid safe_free() usage and add security checksRocco Rutte
Add checks to check_sec.sh for memory functions. These include a check for use of safe_free() instead of FREE() and a check whether FREE(&...) is used. For the former, __SAFE_FREE_CHECKED__ is to be used, for the latter __FREE_CHECKED__ to avoid messages from check_sec.sh
2005-09-17Gah, forgot the zip code when updating the FSF address...Brendan Cully
2005-09-17Update FSF address (via sed, I hope nothing got mangled). Closes: #2071.Brendan Cully
2005-07-24This patch includes (1) a rewrite of hash_delete_hash, and (2) someThomas Roessler
changes to the IMAP code that Thomas Glanzmann made during an attempt to squash some segmentation fault in May. There is no guarantee that this patch doesn't break things. If it does, please complain to mutt-dev.
2005-02-03Add config.h to the top of every C file that could possibly want it.Brendan Cully
Remove it from mutt.h
2002-12-11Fix Mike's and my e-mail addresses in copyright lines.Thomas Roessler
2002-12-10Replace safe_free calls by the FREE macro.Thomas Roessler
2001-11-19Fix #868, #876. Work-around from Len LattanziThomas Roessler
<len@mss.migration.com>.
2000-03-03The FSF apparently has moved.Thomas Roessler
2000-01-06Update copyright notices for unstable.Thomas Roessler
1999-02-03[unstable] Produce some reasonable character set support whenThomas Roessler
postponing messages. Additionally, this patch fixes a nasty pointer leak in load_charset() [noted with electric fence], and a completely mis-lead attempt to use bsearch(). Apparently, nobody ever tested the utf8 decoder for quite some time.
1999-01-07Get rid of RCS ids in source files. They are getting in our wayThomas Roessler
when merging changes.
1998-12-12Use a better hash function. Contributed by Stefan LangermanThomas Roessler
<lfalse@paul.rutgers.edu> to mutt-users.
1998-11-10Introduce or rewrite mutt_{str*cmp,strlen} and use them all over theThomas Roessler
place. If there are still segmentation faults due to missing NONULLs over, they are gone now.
1998-10-15Change "static char rcsid[]" to "static const char rcsid[]" to makemutt-0-94-13-relThomas Roessler
gcc shut up about this.
1998-10-13Add RCS $Id$ strings to (hopefully) all source files.Thomas Roessler
1998-08-25CVS branch clean-up.Thomas Roessler
1998-06-08Initial revisionThomas Roessler