summaryrefslogtreecommitdiffhomepage
path: root/src/hashmap.c
AgeCommit message (Collapse)Author
2016-12-27Move lookup_variable into hashmap.c / hashmap.hGreg
2014-12-13BB#110 secure the hashmaps by adding a seedMichael Adam
Based on a patch provided by gpernot@praksys.org on bugzilla. Signed-off-by: Michael Adam <obnox@samba.org>
2014-12-13BB#110 Replace hash function with Dan Bernstein's.Peter H. Froehlich
This hash function distributes much better than the original one. The effect is not as visible with hashes taken modulo 32 than with a bigger modulus, but it is there. And larger number of buckets migh become possible in the future... Reviewed-by: Michael Adam <obnox@samba.org>
2009-09-20Remove inline keyword from static functionsMukund Sivaraman
The compiler inlines static functions as necessary anyway. No more inline keywords exist in Tinyproxy source code. We want to avoid using this keyword anyway.
2009-09-15Indent code to Tinyproxy coding styleMukund Sivaraman
The modified files were indented with GNU indent using the following command: indent -npro -kr -i8 -ts8 -sob -l80 -ss -cs -cp1 -bs -nlps -nprs -pcs \ -saf -sai -saw -sc -cdw -ce -nut -il0 No other changes of any sort were made.
2009-08-07hashmap: fix three implicit cast warnings.Michael Adam
Michael
2009-08-07Rename tinyproxy.[ch] to main.[ch]Mukund Sivaraman
2008-12-08Convert tabs to spacesMukund Sivaraman
2008-12-01Reformat code to GNU coding styleMukund Sivaraman
This is a commit which simply ran all C source code files through GNU indent. No other modifications were made.
2008-08-24Remove useless check as data can't be NULL at this pointMukund Sivaraman
2008-05-24Updated copyright, license notices in source codeMukund Sivaraman
The notices have been changed to a more GNU look. Documentation comments have been separated from the copyright header. I've tried to keep all copyright notices intact. Some author contact details have been updated.
2005-08-15* [Indent] Ran Source Through indentRobert James Kaes
I re-indented the source code using indent with the following options: indent -kr -bad -bap -nut -i8 -l80 -psl -sob -ss -ncs There are now _no_ tabs in the source files, and all indentation is eight spaces. Lines are 80 characters long, and the procedure type is on it's own line. Read the indent manual for more information about what each option means.
2005-07-12* Updated Copyright Email AddressesRobert James Kaes
Updated the copyright email addresses for Robert James Kaes. The users.sourceforge.net address should always exist.
2005-05-03* [1118363] Proxy reverse order of headersRobert James Kaes
Changed the internal implementation of the hashmap to maintain the insert order if the same key is repeated. The insertion is still constant since we keep track of the head and tail of the bucket chain.
2004-02-13Removed unnecessary casts (mostly dealing with memory allocation.) IRobert James Kaes
should never have added them in the first place. They don't really buy anything, and they can hide bugs.
2003-07-31Added appropriate casts from (void*) so that the code will compileRobert James Kaes
cleanly with a C++ compiler. (Tested using GCC 3.3)
2003-05-31# Changed all the for calls to use the != test rather than < test.Robert James Kaes
The change was recommended in the C/C++ User Journal magazine.
2002-05-24Fixed a tonne of spelling mistakes.Robert James Kaes
2002-05-23Changed the header includes around to reflect the new source layout.Robert James Kaes
2002-05-13Thanks to Justin Guyett for making the hashmap_insert() function use aRobert James Kaes
constant time insert. Explanation: new enteries are added to the _front_ of the chain, rather than search to the end.
2002-05-13Fixed up a potential SEGFAULT if memory for an entry could not beRobert James Kaes
allocated. Also, thanks to Justin Guyett for finding a problem the hashmap_remove() function. There was a problem where an entry's "prev" pointer could be pointing to freed memory. Finally, renamed all "maps" to bucket to make the source more understandable.
2002-04-26Added an assert in hashmap_first()Robert James Kaes
2002-04-25Removed the hashmap_keys() function and added the "iterator" concept.Robert James Kaes
This required a bunch of changes to the source (like the inclusion of the end_iterator member variable.) All this was required by sites like Yahoo which send out multiple "Set-Cookie" headers. tinyproxy needs to handle this situation correctly.
2002-04-18Fixed a memory leak in the hashmap_delete function. The array of maps wasRobert James Kaes
not being deleted.
2002-04-18Replaced the explicit header includes with one call to tinyproxy.h. Also,Robert James Kaes
added the utils.h header and changed all the malloc, calloc, free, and strdup to the appropriate safe variety.
2002-04-09Added more include logic code to be more portable.Robert James Kaes
2002-04-09Cleaned up the include lines to be slightly more portable (I hope.)Robert James Kaes
2002-04-07A hashmap implementation. I use this for storing the headers from theRobert James Kaes
client.