cStringBuffer README
--------------------

cStringBuffer is a helper library designed to help you manipulate strings.
It lets you treat them as files, and perform file-like IO on them, making it
easier to perform certain tasks.

Installation:

Read the INSTALL file, or just run:

./configure
make
make check
make install

Usage in programs:

To use, just include csb.h in your program and link the program to libcsb.a
(usually -lcsb in GCC). Linking to -lm may also be necessary as it relies on
the ceil() function internally for a few operations.

Here's a summary of the functions that can be used:

csb_new(): creates a new buffer of type csb_buf and returns it.
csb_new_withstring(string): converts a C-style string to a buffer.
csb_puts(buf, string): prints string to buffer buf at the current position.
csb_putc(buf, ch): prints a single character to buffer.
csb_seek(buf, position): seek to position.
csb_rewind(buf): rewind to the beginning.
csb_getc(buf): Gets next character in buffer.
csb_ungetc(buf, ch): "un"gets character from buffer.
csb_printf(buf, fmt, ...): formatted output to buffer.
csb_cstring(buf): returns a C-style string from contents of buffer.
csb_tellpos(buf): returns current position in buffer.
csb_strcat(buf, string): concatenates string at the end of buffer.
csb_write(buf, data, length): writes binary data of length length to buffer.
csb_read(buf, data, length): reads binary data of length length from buffer.
csb_length(buf): returns length of string in buffer.
csb_memorysize(buf): returns amount of memory allocated in buffer.
csb_destroy(buf): frees memory allocated to buffer.
csb_prealloc(buf, length): pre-allocate amount of RAM in advance.

Note: If you're planning on inserting a lot of strings into the buffer, it may
be a good idea to call csb_prealloc() in advance to increase performance. You
can also add --enable-optimized-allocator when running ./configure to enable 
an alternate memory allocation routine. This comes at the expense of wasted memory
though, and is not recommended.

For more information on the functions in the library, see src/csb.c.
