This is some code I had previously written, adapted to (mostly)
libcfu coding style. The API is very similar to that of the
existing (to be eventually removed) cfutime.
They just ugly up the code and could potentially hide errors.
The only problem it might cause is if using C++ compiler and,
well, don't do that. This is C code, use the right compiler :)
Also using C99-snprintf file from:
http://www.jhweiss.de/software/snprintf.html
For when in strict C89 compiler mode or when snprintf() or vsnprintf()
aren't for whatever reason available.
Use CFU_INLINE macro defined in cfu.h to make a decent attempt at
getting inline function support when in C89 mode.
Flags used for these changes:
-Wall -Wextra -Werror -Wno-unused-parameter -std=c99 -pedantic
Note: the strcasecmp()/strncasecmp() implementations are kind of
a hack and should at least be factored out into a compat file or
some such.
This commit is purely aestetic/taste, nothing important.
I don't really like this *huge* license at the top of every file
but I guess it must stay so add it to some files where it wasn't
included so they are the same. Slightly reformat them.
Unindent extra indentation found in some headers.
Strip trailing whitespace in files and enabled setting in
editor, which caused a lot of noise in this commit but that should
be the end of it.
Remove the comment at the top of each file that said who created
it and when (it will remain in VCS history for reference and was
always Don who created the files).
* Now headers only include headers they use (at least std headers).
* Remove CFU_DEBUG stuff since NDEBUG automatically controls assert()
* Make use of CFU_BEGIN_DECLS and CFU_END_DECLS macros from cfu.h.
The '%lu' isn't stricly right either, but now this commit can be
referred to find locations to fix with the more correct '%zu' or
'PRIuMAX' or whatever is the right thing to use.
All of the files from the tarball downloaded from SourceForge are
being checked in so there's a record of the changes made compared
to it (since I can't find the libcfu source repository). The
generated files will be removed in the following commit.