Add Travis CI control file

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
travis.yml: Use sudo to install dependencies

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Add a closelog() wrapper to clear the environment

Our openlog() wrapper fills in a couple of variables, and those were
kept around even after a closelog(), and thus, affected ul_format()
calls even after a closelog().

This in turn, made one of the test cases fail, as that was relying on
the default behaviour, which was modified due to an openlog() in an
earlier test case.

We now wrap closelog() aswell, and NULL out our settings to get a
clean state, and add a test case to verify this behaviour aswell.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
.gitingore: Ignore a few more generated files

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Add the build-status link to README.rst

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Preparations for 0.2.1

Bump software and library interface versions, and start adding NEWS
entries.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Convert the test suite to Check

While assert() is a neat tool, it is not really suitable for testing,
as it gives hardly any indication on what part of the test suite
failed, and why.

For this purpose, an existing testing library, such as Check is a much
better option, so lets use that!

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge branch 'feature/test-suite/check'
.travis.yml: Install check too

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Generate the manual page if rst2man is present

If rst2man is present at configure time, generate the manual page with
it, which is to be included in the dist tarball too.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Reduce the number of memory allocations

Make the string escape use an ul_buffer_t, to avoid unnecessary memory
allocations. This greatly reduces the number of mallocs made, and thus
results in a noticable increase in speed.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Mention docutils in the README

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
NEWS: Finalise for 0.2.1

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Move the "foreign" option into configure.ac

This makes it possible to use autoreconf(1) instead of autogen.sh

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Remove autogen.sh

With the latest patch, we can use autoreconf -i to get the job that
autogen.sh did, done. So there's no need to have the latter here
anymore.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Remove an unnecessary pointer to array

Be a little more explicit instead of relying on the compiler to optimize
the variable away.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Fix 1-byte heap overflow in ul_buffer_finalize

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Don't create unnecessary libtool wrapper scripts for tests

This marginally speeds up build, and simplifies debugging/valgrind runs

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Don't use \f in JSON

JSON-c 0.9 does not parse \f, so fall back to \uNNNN for now.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Test escaping of all control characters

... now that \f does not break the test.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>