Commit Graph

21 Commits

Author SHA1 Message Date
Mukund Sivaraman
024b317de0 Convert tabs to spaces 2008-12-08 13:39:44 +00:00
Mukund Sivaraman
a257703e59 Reformat code to GNU coding style
This is a commit which simply ran all C source code files
through GNU indent. No other modifications were made.
2008-12-01 15:01:11 +00:00
Mukund Sivaraman
90c1bb4b73 Remove useless check as data can't be NULL at this point 2008-08-24 10:45:29 +05:30
Mukund Sivaraman
249d4b7f33 Updated copyright, license notices in source code
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.
2008-05-24 13:35:49 +05:30
Robert James Kaes
c0299e1868 * [Indent] Ran Source Through indent
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-08-15 03:54:31 +00:00
Robert James Kaes
a59117c7ca * Updated Copyright Email Addresses
Updated the copyright email addresses for Robert James Kaes.  The
users.sourceforge.net address should always exist.
2005-07-12 17:39:44 +00:00
Robert James Kaes
51096e2944 * [1118363] Proxy reverse order of headers
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.
2005-05-03 20:34:54 +00:00
Robert James Kaes
aee5a63849 Removed unnecessary casts (mostly dealing with memory allocation.) I
should never have added them in the first place.  They don't really
buy anything, and they can hide bugs.
2004-02-13 21:27:42 +00:00
Robert James Kaes
6aaa863432 Added appropriate casts from (void*) so that the code will compile
cleanly with a C++ compiler.  (Tested using GCC 3.3)
2003-07-31 23:38:28 +00:00
Robert James Kaes
77ca1c8ce0 # Changed all the for calls to use the != test rather than < test.
The change was recommended in the C/C++ User Journal magazine.
2003-05-31 23:02:21 +00:00
Robert James Kaes
391a408eee Fixed a tonne of spelling mistakes. 2002-05-24 04:45:32 +00:00
Robert James Kaes
451fad1ed2 Changed the header includes around to reflect the new source layout. 2002-05-23 18:20:27 +00:00
Robert James Kaes
16e96c79e8 Thanks to Justin Guyett for making the hashmap_insert() function use a
constant time insert.  Explanation: new enteries are added to the _front_
of the chain, rather than search to the end.
2002-05-13 20:02:23 +00:00
Robert James Kaes
73e3b495e0 Fixed up a potential SEGFAULT if memory for an entry could not be
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-05-13 18:47:46 +00:00
Robert James Kaes
1d78e63233 Added an assert in hashmap_first() 2002-04-26 16:51:29 +00:00
Robert James Kaes
ce51a74045 Removed the hashmap_keys() function and added the "iterator" concept.
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-25 18:55:56 +00:00
Robert James Kaes
d14b612e13 Fixed a memory leak in the hashmap_delete function. The array of maps was
not being deleted.
2002-04-18 18:40:38 +00:00
Robert James Kaes
3b5a4b7362 Replaced the explicit header includes with one call to tinyproxy.h. Also,
added the utils.h header and changed all the malloc, calloc, free, and
strdup to the appropriate safe variety.
2002-04-18 17:57:20 +00:00
Robert James Kaes
0c5bd57698 Added more include logic code to be more portable. 2002-04-09 20:05:15 +00:00
Robert James Kaes
2f54303d98 Cleaned up the include lines to be slightly more portable (I hope.) 2002-04-09 16:28:13 +00:00
Robert James Kaes
5b3658b122 A hashmap implementation. I use this for storing the headers from the
client.
2002-04-07 21:30:02 +00:00