Giter Site home page Giter Site logo

vstr's Introduction

 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:

1. Add the function to a source file, altering src/Makefile.am if it's in a new
file.

2. 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.

3. 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).

4. Add documentation to Documentation/functions.txt

5. Add test cases to tst/<whatever>

6. Run make check and ./scripts/autovalgrind.sh

7. Run ./scripts/autocheck.sh (this takes a while).

8. 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...

1. memcpy()/memset() aren't defined in dietlibc header files this
produces warnings in debug mode.

2. stdarg produces lots of warnings about using (void *) arithmetric.

3. 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.



vstr's People

Contributors

james-antill avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.