Introduction
============

The libt3config library provides functions for reading and writing simple
structured configuration files. libt3config provides the following features:

- Simple structured syntax.
- Simple API for reading and manipulating configurations.
- Parsed configurations use typed data (boolean, integer, floating point number
  string, list, section).
- Schema definitions, allowing verification of the structure of loaded
  configuration data.
- No use of global variables, allowing easy use in threaded programs (with the
  exception that if uselocale is not available, set_locale should not be called
  at the same time in another thread while reading or writing configuration
  data).

libt3config is part of the Tilde Terminal Toolkit (T3)
[https://os.ghalkes.nl/t3/]

libt3config is licensed under the GNU General Public License version 3. See the
file COPYING for details.


Documentation
=============

The full documentation for libt3config can be generated using doxygen. The
documentation for the current version can be found at
https://os.ghalkes.nl/doc/libt3config.


Prerequisites and installation
==============================

libt3config requires GNU libtool to be compiled.

There are two ways in which to compile libt3config:

Using the configure script:
---

$ ./configure
or
$ ./configure --prefix=/usr
(see ./configure --help for more tuning options)
$ make all
$ make install
(assumes working install program)

Manually editing the Makefile to suit your computer:
---

$ cp Makefile.in Makefile

Edit the values for the different variables, using the comments in the
Makefile for guidance, to suit your environment.

$ make all
$ make install
(assumes working install program)

libt3config provides support functions for the XDG Base Directory Specification,
using several non-ANSI C functions. These are: fdopen, fileno, mkdir, close,
fsync, unlink and mkstemp. If these are not available, the XDG support
functions will be replaced with stub functions and the t3_config_xdg_supported
function will return t3_false.

The Makefiles in the distribution should work on all POSIX compatible make's.
They have been tested using both GNU make and BSD make.


Reporting bugs
==============

If you think you have found a bug, please check that you are using the latest
version of libt3config [https://os.ghalkes.nl/t3/libt3config.html]. When
reporting bugs, please include a minimal example that demonstrates the problem.


Author
======

Gertjan Halkes <libt3config@ghalkes.nl>
