ccl is the customizable configuration library, a collection of functions for application programmers wishing to interface with user-editable configuration files containing key/value pairs.
ccl is customizable because it allows the comment, key/value, and string literal delimiters to be programatically specified at runtime.
ccl is designed to be simple and portable; it has a small interface consisting of five functions and is written in ANSI/ISO C. ccl uses avl's implemenation of binary search trees for backend storage.
ccl is available at https://sbooth.org/files/.
ccl is documented using doxygen.
You can browse the library's contents by using the navigation bar at the top of this page. A good starting point is the globals page.
An example is the best way to understand how ccl works. A configuration file named
example.conf might contain:
## Sample configuration file Desktop-Picture = /usr/images/earth.jpg Position = Centered "Background Color" = Black
The following code demonstrates how to parse and access this file using ccl:
When compiled, the snippet above produces the output
(Background Color,Black) (Desktop-Picture,/usr/images/earth.jpg) (Position,Centered)
If you think you have found a bug in ccl, then you should send as complete a report as possible. Ideally, you should include the text you get by running
config.guess and the text you see when you run
If you think you have tracked down the source of the bug, please also send a patch made with diff -u5 which fixes the problem.
Please send bug reports, questions, comments and suggestions to Stephen F. Booth.
Copyright © 2004 - 2005 Stephen F. Booth.
Permission to use, copy, modify, and distribute this software and its documentation under the terms of the GNU General Public License is hereby granted. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. See the GNU General Public License for more details.