# XLIB

xlib is a utility library in plain C, inspired by glib.

It started as a learning exercise for me, but I've ended up using it a
lot in various small personal projects.

The library is divided into separate modules:

- Memory allocation             (xmem.c)
- Error messaging utilities     (xerror.c)
- Simple string handling        (xstr.c)
- Dynamic string handling       (xstring.c)
- Singly-linked lists           (xlist.c)
- Binary search trees           (xtree.c)
- File handling utilities       (xfile.c)
- CSV file reading/writing      (xcsvio.c)
- Command-line option parsing   (xgetopt.c)


## MAKING USE OF IT

You can either install libxlib.a, or include individual modules with a project.

To see how things work, check the examples subdirectory.

Looking at the Makefile might help, too.


## COMPILATION

To build the linkable object files, as well as libxlib.a:

  make

Optionally, to install libxlib.a and the header files:

  make install

By default the Makefile uses /usr/local as the install location.

To uninstall libxlib.a and the include files:

  make uninstall


## TESTS

Most of the .c files contain self-checking tests. You can run them with:

  make check

The output will be extremely boring unless something is broken, and even then
only slightly less boring.

