CTPL's homepage
CTPL is a template engine
library written in C and distributed under the terms of the
GNU GPLv3+.
See the overview in the documentation
for a more complete description.
Release highlights
Here the highlights of each release. For a complete list of changes, please
read the Git history.
-
0.3.5
(31/07/2024)
.sig
—
bugfix and enhancement release for the 0.3 branch
- Added
ctpl_value_take_string()
to reduce memory copies,
and used it internally where appropriate;
- Fixed build with GCC 14;
-
0.3.4
(03/02/2015)
.sig
—
bugfix and enhancement release for the 0.3 branch
- Added Windows support to the command-line utility (Andrea Zagli);
- Added French and Italian translations;
- Fixed various build system issues;
- Added support for building for Windows with Automake;
-
0.3.3
(11/08/2011)
.sig
—
bugfix release for the 0.3 branch
- Fixed crash when indexing expressions;
- Fixed two possible reads of uninitialized memory;
- Plugged a few memory leaks;
-
0.3.2
(07/01/2011)
.sig
—
bugfix and enhancement release for the 0.3 branch
- Fixed wrong reading of some numbers that led to parsing failure when
the addition or subtraction operators was not surrounded by blank
characters. This bug was introduced in version 0.3.1;
- Fixed crash comparing arrays with other types;
- Actually implemented array comparison;
- Added support for string literals in expressions.
Anybody using version 0.3.1 is strongly encouraged to upgrade to version
0.3.2 because of the number reading bug that may break parsing of valid
templates.
For detailed changes, see the NEWS file in the CTPL 0.3.2 archive or in
the Git repository.
-
0.3.1
(13/11/2010)
.sig
—
bugfix and enhancement release for the 0.3 branch
- Fixed crash in addition operator when handling arrays
- Improved floating-point numbers output
- Added support for blanks between a symbol and its index
- Added support for empty arrays in environment descriptions
For detailed changes, see the NEWS file in the CTPL 0.3.1 archive or in
the Git repository.
-
0.3
(09/10/2010)
.sig
- Heavy API cleanup
- Array expressions can now be indexed
- The
for
loop now iterates over an expression rather
than a symbol name
- CtplEnviron now uses reference counting
- Improvements of CtplEnviron's memory usage
-
Bug fixes:
-
ctpl_value_copy()
,
ctpl_value_set_string()
and all the
ctpl_value_set_array*()
functions can now take a part of the destination value as the value
to set/copy
- Fix internal handling of an error which may lead to wrong error
detection
- Fix wrong name of streams built from GFiles, paths and URIs
- Fix dramatic slowness when a symbol gets pushed many times
- Some internal refactoring
For detailed changes, see the NEWS file in the CTPL 0.3 archive or in the
Git repository.
-
0.2.2
(25/05/2010)
—
bugfix release for the 0.2 branch
- Fix lexing of a whole expression input (using ctpl_lexer_expr_lex() or
one of its variants)
- Fix priority of boolean operators AND and OR
- Fix support of operators
<=
and >=
- Better error reporting in the expression lexer
- New alternative build system: Waf
-
0.2.1
(27/04/2010)
—
bugfix release for the 0.2 branch
- Do not export the private API
-
0.2
(15/04/2010)
-
GIO replaces
LibMB through a new IO
layer module, providing local and remote streaming for both input and
output
-
Better error message from inputs (templates and environ
descriptions) with line and position mark
- Comment support in environ descriptions
-
Improved numeric constants loading, including:
- Integers are now loaded as such, avoiding precision loss
- Support for octal constants via the
0o
prefix
- Support for binary constants via the
0b
prefix
For detailed changes, see the NEWS file in the CTPL 0.2 archive or in the
Git repository.
-
0.1.90
(06/04/2010)
—
the 0.2-minus-one release. This is and will be the last release of the
0.1 branch: it is a release of the 0.1-compatible improvements that will
come in the 0.2 branch.
- Memory usage reduced of about 20-30% for the token tree
-
0.1.1
(15/03/2010)
—
bugfix release for the 0.1 branch
- Fixed stack overflow with very large token trees
- Great speed improvement with large token trees
-
0.1
(30/11/2009)
Getting CTPL
Release tarballs
The release tarballs (source code) can be found on the
download
area. The latest version is
CTPL 0.3.5.
The PGP key used to create the signatures can be found
here.
MS Windows binaries
There is also a binary package for MS Windows containing the library, all
the development files and the documentation (but not the dependencies
— libglib-2.0 and libgio-2.0). The latest version is
ctpl-0.3.2-win32.zip
and it was built against GLib 2.20.1.
Development repository
CTPL uses Git; you can browse the
repository online at
http://git.tuxfamily.org/ctpl/ctpl.git/.
Getting the source code is a matter of cloning. As an anonymous user:
1 |
git clone git://git.tuxfamily.org/gitroot/ctpl/ctpl.git |
or if you have an account on TuxFamily, as a logged user:
1 |
git clone ssh://user@git.tuxfamily.org/gitroot/ctpl/ctpl.git |
Building CTPL
CTPL uses the well-known GLib library and
its sub-module GIO. You need it properly installed on your system in order
to be able to build CTPL.
CTPL uses the well-known Autotools build system, and therefore its
compilation process is quite common:
1
2
3 |
./configure # configure the library
make # compile the library
make install # install the library |
If you are using the Git version, you need to run the provided
autogen.sh
script to set up the build environment before
running the above build commands:
Documentation
Documentation can be either built from source using
GtkDoc, or
browsed online on this site.
Reporting bugs
Please report any bug you find! The site currently misses a bug tracker,
but please report bugs by e-mail to the bug-report-address at the top
of the configure.ac
file in the source tree.
As we are geek or we are not, here is a pretty command to get the address I
talk about (to be run from the root of the source tree):
1 |
sed -n -r '/^AC_INIT/{:r;s/^.*\[(.*@.*)\].*$/\1/;t o;n;b r;:o;p;q}' configure.ac |