Lots of changes:
  Code Style
  constructor functions now have size and capacity parameters
  init constructors return NULL on degenerate cases and cases covered by basic constructor
  Update documentation and tests to reflect new behavior
  Contemplating removing pop all together or at least
  removing the return values (C++ vectors pop don't return anything after all)
  Also thinking of removing the set_val_cap funcs, esp for pointer types (see comments)
  Thinking of adding a STUPID_PROGRAMMER macro to add in checks and stuff that
  would make it slower or maybe I'll just do a separate branch so I don't
  make the code all ugly.
Add the rest of documentation
Done with the (non-pointer) template version.
Need to add to tests, as at least 2 types.
I need to change vec->capacity after successful realloc and
use a temp value.  Need to check/fix all functions that realloc
and whil I'm at it maybe catch the return in a temp variable as well
since I'd lose access to the array data if realloc fails.  Still
not sure it's worth that but still, to maintain the invariant/integrity.

Not sure if/how exactly I'll do the pointer template.

Also I should add a test for the generic vector that does a vector of
vectors :)  I should also do some speed comparisons with std::vector
added .gitignore
Do not checkout!  Broken/partial commit.
I'm too tired to even finish this enough to compile
let alone do the tests.  I know this is what git stash
is for but I'm too lazy to look it up and use it now.

Changes include adding test stuff to main.c for templates
and vector of vectors, realizing a bunch of issues when I
went to write the vector of vector tests, adding stack
init/constructor functions, need to add stack frees.

Need to read/edit the comments and add some to the new functions.
There need to be wrappers around strdup and free for vector
to imitate vector_s since vector calls elem_free on the address
of the element not the element itself (in vector_s the element is
the pointer and free is called on it directly).  Likewise, elem_init
takes 2 args, src and dest etc. so strdup would be called inside.

The reason I can't change it to call elem_free directly is it's
a byte array and it would covert the first byte to an address not
the full element (and the ways around this, knowing the size of a
pointer etc., are ugly and would subtract functionality shown in
the f_struct examples.
I've made a lot of the changes listed in the last commit message.
The code currently compiles and passes the tests but the tests
vector of vectors and template tests need to be expanded.

I also need to add the pointer type vector to vector_template and add
that to the tests.

I've written a simple python script to generate a .c/.h pair of files
for a given type from vector_template.c/h but you could just do a
search/replace in your favorite editor and save as.  I've included
the vector_short files as examples of what's generated and how to plug
them into the tests.

Still need to implement a few ideas and create a branch or 2 to for different
design/use ideas.
Forgot the stack functions for the template
fixing a couple more minor mistakes in the template files
Lots of changes, little "fixes" like making sure the state
is correct when allocations fail and freeing the vector in the heap
versions if the array allocation fails (a small potential memory leak).

I've also added copy functions which can be used in making a vector
of vectors, which will be/is demoed in the tests.

I'm in the middle of adding a get function and updating the tests.
Not sure how I should do it.  Also there is the issue of realloc.
If I care about when allocation fails (beyond returning 0) maybe I should
handle realloc (instead of potentially overwriting the array variable
with NULL on failure, I'd use a temp).  I already print an error message
and maintain state.

I will probably have several branches as mentioned earlier, one standard one
which does handle realloc besides having the current checks, one that's all
about speed and doesn't do any checks (maybe asserts and I'll put the define
in a comment at the top) and variations for void* and current byte* generic.

Still need to get change pop_back and get rid of set_val_cap and I'm
thinking about getting rid of the heap constructors/free or renaming them
and making the stack versions the default/shorter names.  Also macro
or function pointer custom alloc or both?  Decisions.

Too much to do.
Finished/fixed the current code so it compiles, and passes the tests.
Added doxygen comments for copy funcs, expanded/fixed
the vector of vector test and template tests.
Lots of fixes of potential problems (messed up invariant/state) and small
leaks in the case of failed memory allocations (ie realloc now returns
to a temp variable so as not to overwrite the array pointer with NULL).

Changed free functions to take void* so they can be used as destructors
in vector of vectors (see test).  Added documentation comments though
I need to go over them all to make sure they're all accurate and up to date.

Added custom allocator macros so the user can control the allocation strategy
for each vector type.  May still add an allocation function to vector so you
have even more flexibility within the same program.

Started using Premake with this project.  It's pretty nice.  I've always
used CMake on my other projects and this isn't big enough to really
learn/judge Premake yet but I'm guessing I'll end up converting my other
projects to it and use it for new stuff.
Added insert_array functions and removed last of the
magic literals (replacing with the macros)

Refactored some functions for shorter/less repetitious code.

Also replaced all ints used for indexing with size_t.

Using an int can cause an error for extremely large memory
allocations/arrays (esp on 64 bit OS's that can access a lot more ram)
and size_t is (almost ... apparently it doesn't actually say so in the C89 standard)
guaranteed to be large enough for any array indexing.
More fixes (last commit didn't compile and after it did, it still
had some bugs).

Added tests for the insert array functions.

Fixed a bug that had strangely never manifested before.  I'd
forgotten to end the test suite arrays with CU_TEST_INFO_NULL but
somehow have always gotten correct behavior till today when I added
the insert array tests and suddenly the suites were executing tests
from other (following suites in order which suggested the cause of
the problem).

Still have several things to do and design decisions to make.  I may
hold off on some till after 2.0.
Whew! final fixes and updates for 2.0 release.

Removed the useless get size and capacity functions.  Not surprisingly
it didn't cause any compilation errors since I never used them.

Added a LICENSE file (MIT) and updated README and Doxygen comments
and docs.  Added a main page to doxygen.  Thinking about putting it
in it's own c file that's just not used in building.

Probably only minor changes from here and will stay in 2.x or 2.0x.