This is a shared library that does string related stuff. It's designed for use with vectors (readv()/writev()) but is a generic string handling library.
It aims to be fast and small, if used properly, but also easy to use.
It is Licensed under the LGPL, see the COPYING file for details.
See the AUTHORS file for authors.
-------------- Adding functions to the library --------------
If you add a function to the library, you need to:
- Add the function to a source file, altering src/Makefile.am if it's in a new file.
- Add the prototype to include/vstr-extern.h.pre, including the @@@@ markers. If it has an inline part also add the inline definition to include/vstr-inline.h.pre (and if you have inline helper function add them to the bottom of vstr-extern.h.pre and indent them by one space.
- Add the name (without the vstr_ namespace) to include/vstr-internal.export_symbols (or vstr-internal.inline_export_symbols if it has an inline version).
- Add documentation to Documentation/functions.txt
- Add test cases to tst/<whatever>
- Run make check and ./scripts/autovalgrind.sh
- Run ./scripts/autocheck.sh (this takes a while).
- Send patch to me :).
You'll then need to run the ./scripts/autogen.sh file, this then generate the real extern and inline files and do all the symbol stuff.
-------------- Compiling against dietlibc on Linux --------------
Just use the scripts...
./scripts/b/diet-debug.sh
./scripts/b/diet-op.sh
These are warnings produced by dietlibc...
- memcpy()/memset() aren't defined in dietlibc header files this produces warnings in debug mode.
- stdarg produces lots of warnings about using (void *) arithmetric.
- wchar_t is defined differently by dietlibc that than by gcc, so...
wchar_t *tmp = L"";
...gets a warning.
-------------- Checking the testing coverage --------------
If you do a build with inline'd functions turned off, then you can run the script ./script/tst_coverage_diff.sh ... this will show all the constants and functions that are defined in the library but not in the make check test suite. Note that even if/when this is empty, this doesn't mean that the library is guaranteed to be bug free. For example there are distinct code paths for some functions depending on if the Vstr string has a _BUF node at the begining and deleted some data from the begining.
