SourceForge project page
Web Links

Welcome to SDL_Config homepage.

SDL_Config is a library designed for reading and writing configuration files in an easy, cross-platform way.

If you are new to SDL_Config, I recommend to read this Introduction.

SDL_Config 1.2
Another stable SDL_Config version has been released today, few days after it's third birthday! Download it here.

SDL_Config 1.2 changelog:


- Key value replacement! very powerful, integrated nicely with all other SDL_Config
  features like multi value entries
- new functions CFG_AddMultiValueTo*() for inserting entries to multi values
- new function CFG_GetEntriesInSelectedGroup() returns the number of entries
  in currently selected group
- improved C++ interface: overloaded versions of Read(), Write() and 
  AddMultiValueToText() for ease of use
- bool keywords can be modified by CFG_Settings


- fixed bug in ConfigFile implementation of SelectGroup() and RemoveGroup()
- introduced new escape sequence \\" which helps when setting Windows paths
  (see Syntax in docs for more info)
- fixed compilation problem - iterator returned by erase wasn't conforming to standards
  (worked in VS, but not in MinGW which is more standards compliant)
- changed forgotten malloc and free in CFG_OpenFile to new
- float replaced by CFG_Float definition, which might be changed to double,
  if you need the extra size
- CFG_WriteInt used sprintf("%u") to convert ints to text, what means
  that it didn't work when saving negative nubmers - now there's %d and everything works fine
- CFG_Read* returned 0 when someone didn't iterate and asked for value from iteration,
  now in case of problems it returns supplied default value
- removed assert from CFG_GetSelectedFile() which checked whether
  file was selected, what was nonesense
- undef all defines from my library on the end of SDL_config_lib.h,
  preventing you from accidentaly using them
- new test 013 for value substitution
- fixed command line in DevCpp tests
- DevCpp project files for tests 010, 011 and 012
- huge reformatting and dividing of code
- updated to NaturalDocs 1.4, improved docs

Since the internet now is cheap n' fast, I included .lib, .a and .dll files built with default release dll settings, both for VC++ and MinGW (sorry Linux folks! however, this summer I'm gonna get laptop with some open source OS so things will change for better)

Also, now you can donate to SDL_Config to enchance my motivation ;-) more info here.

What will happen in the next release? Now, I'm coming to the place where I'm having problem deciding what to add next to the library, worried that it'll add unnecessary bloat. Do You have any suggestions? what to add/remove, what to improve, what to change?

Posted by Koshmaar on July 11 2008 14:32:300 Reads - Print
After few weeks of site being down due to my stupidity (forgot to prolongate mysql account at uni server), once again it's alive. Unfortunately, last DB backup was made a little too long ago, and so one news was lost ;-) which was dealing with next bugfix release of lib. I can't guarantee when it's gonna be released, mabye in next week, maybe in next month, sorry, I have a job, studies etc. and really little time for this project.

Fun fact #1: here's what I discovered at Sourceforge after releasing SDL_Config 1.0...

Fun fact #2: here's what I found on internet: looks like somebody added my little lib to some kind of huge library list :-)

Posted by Koshmaar on February 12 2008 22:32:000 Reads - Print
SDL_Config 1.0
At last, next version of SDL_Config has been completed!
It took me lot of hard work and dedication to create this release, but now you can rejoice for having stable 1.0 version. I decided to make a big step in numeration of versions, because of the changes done, and because SDL_Config was rather stable and feature-complete since a long time ago.

Here's the change log:


- iteration over values of a group
- CFG_Settings allowy to modify library behaviour AT RUNTIME, instead of at compile time
  through clumsy #defines
- first, rough version of ConfigFile (C++ wrapper interface to SDL_Config)
- operations on group and entry comments
- completely rearanged tests, more auto testing, new tests 010, 011 and 012
- improved documentation
- multi value interface extended: added CFG_GetNumberOfMultiValueEntries() and


- CFG_StartGroupIteration takes additional parameter, the type of sorting used (alphabethically
  or original order from cfg file)
- added CFG_ClearGroup() and CFG_GetSelectedEntryName()
- extended functionality of CFG_GetEntryType (pass CFG_SELECTED as key to operate on
  entries during iteration)
- VS8 Debug target outputs SDL_Config_debug.dll instead of SDL_Config.dll (used by tests in Debug target)
- CFG_StartGroupIteration bugfix: now it correctly operates on files without any groups
  (previously it was crashing)
- removed default parameter from CFG_RemoveGroup
- changed SetIterationDirection to SetGroupIterationDirection (wrong name in the first place)
- few litte bugfixes, removed a lot of warnings, code clean
You can download it from here.

Probably you don't know, but two weeks ago, SDL_Config celebrated its second birthday! :-) Some stats for the curious:
- over 1800 downloads of all the 6 released versions
- over 18.000 visits to this site
- over 45.000 hits on
- over 8.000 pages open on

Ok, now I'll take a rest (last few days I was crunching), tomorrow I'll update the site and docs.

Posted by Koshmaar on August 19 2007 23:22:330 Reads - Print
Quick and short news: I migrated SDL_Config sources from CVS to SVN. Take a look here for details on how to acces them.

Also, I'd like to announce that in my free time I'm working on SDL_Config 0.7 which, among few bugfixes and documentation clean up, should contain following features:

- operations on comments
- optional C++ interface to SDL_Config
- iteration over values in group
- and probably one additional surprise :-)

When to expect it? Not very soon, probably 2-3 months at least, or if I won't find time now, it will be released on summer 2007.

Posted by Koshmaar on March 05 2007 09:45:371 Comments 2051 Reads - Print
SDL_Config 0.5
Finally, next version of SDL_Config has been completed! Though it took me very long time to finish it, I hope you'll find effects of my work satysfying.

Without further delay, here's the change log:


 - multiple value entries are supported!
 - added CFG_USE_MULTIMAP define which makes SDL_Config use std::multimap instead of std::map to store groups,
   so now you can have groups with the same name
 - lib can be compiled as DLL (uses DECLSPEC predefined by SDL) - by default it builds DLL,
    however you can still easily build static library
 - itoa got removed in favour of sprintf, so now SDL_Config is almost -ansi compatible
   (but VS 2005 throws warnings about using deprecated function).
 - well, almost -ansi compatible (except long long, which is referenced in sys/types.h included by SDL)
 - confirmed that it works with SDL 1.2.11 and that it can be compiled by Visual Studio 2005 (+project files attached)
 - due to SDL_config.h file which has been added to SDL in 1.2.10, and which conflicted with my own SDL_config.h,
   I had to rename my to SDL_config_lib.h
 - changed versioning scheme from single float value to three ints accessed through SDL_version - the same
    as in SDL/SDL_TTF etc.

 - third option for bool users - SDL_bool, also introduced new way of setting bool version
 - back to begin_code.h / end_code.h include, removed unneeded macro CFG_BUILD_STATIC_LIB
 - fixed little bug when iterating over groups which appeared on VS8
 - improved some tests (+created new one: 007), as well as library code modularization
 - all external functions use SDLCALL (defaults to __cdecl on most platforms) which is a macro predefined by SDL
 - managed to run test 006, which is a SDL_Config test written in C, in VS 2005 Pro :-)
 - SDL.h is not included in SDL_config_lib.h, it includes only headers that are necessary
 - fixed bug in CFG_OpenFile: file stream wasn't closed
 - fixed bug in CFG_SaveFile: now passing 0 as filename will properly save everything to the same file
 - documentation was polished a bit, also now it's built using newer version of Natural Docs
You can download it from here.

I'm happy to announce that Roman Kyrylych has informed me about some problems with C compatibility, insisted on adding DLL and SDL_bool support, told about problems with __cplusplus defines and generally was very helpful during the developement of this version of SDL_Config.
Thanks Roman!

Btw, did you notice that there are already over ten thousand hits on this page and nearly 1000 downloads of all versions of SDL_Config... wow :-)

Posted by Koshmaar on October 09 2006 21:51:570 Reads - Print
...No time, no time, no time to lose...
Sorry, this news will be very short since I have very little time to work on SDL_Config 0.5 and SDL_Config homepage.

Current priorities in SDL_Config:

1. Improve documentation (add examples etc.)
2. Implement "multiple values per entry" feature
3. Support for Unicode
4. "Definitions"


- addedd "Archanoid" game to Users section.
- example of how to iterate over groups

Btw, SDL_Config has been added to official SDL libraries list, and library downloads / page visitors stats have accelerated since then. Yay :-)

Posted by Koshmaar on February 17 2006 19:17:520 Reads - Print
Happy New Year 2006!
Yup, may new year be for all of us as good as was 2005 for Google ;-)

As you have probably noticed, this site was down for about 2 months. That's due to the fact, that SourceForge changed MySQL vesion, and one tiny thing in server users permissions, which prevented me from installing PHP Fusion. So, after some time I decided to change SDL_Config's homepage server to that which belongs to my university. Thank you AGH :-)

Everything was transfered to new server and everything works fine, apart from few stupid warnings at the top of each article. Don't let them distract you, they probably will be removed within few days.

UPDATE: after few days of struggling, with immense help of Pieka, main administrator of polish support of PHP-Fusion, and some help from my friend, Slash, I was able to fix those problems. Thank you guys! Though we don't know what was causing them (probably some php safety restrictions on server), we fixed them in the lamest possible way, that is, we disabled generation of warnings along with ability of users to rate and comment articles :-) So, the problem still exists but at least nobody will see those ugly warnings at top of each article :-)

Btw, one last thing. Unfortunately, currently I don't have time to work on new SDL_Config version, since it's the time when poor students have to pass some stupid exams (calculus etc.) to stay at their uni... :-/

Posted by Koshmaar on January 01 2006 16:21:3944 Reads - Print
SDL_Config 0.4
As you may expect, new version of SDL_Config has been released :-) Without much talking from my side, here's change log:

Major: - added function which returns the number of groups (CFG_GetGroupCount()) - added functions for iterating through all groups (CFG_StartGroupIteration(), CFG_SelectNextGroup() CFG_IsLastGroup()) and removing selected groups when iterating (CFG_RemoveSelectedGroup()) - added function for changing the direction of iteration (CFG_SetIterationDirection()) - added functions which return currently selected file (CFG_GetSelectedFile()) and its name (CFG_GetSelectedFileName()) - changed behaviour of CFG_OpenFile() and CFG_OpenFile_RW(): now, if operation was successfull, new file is always selected - added flag CFG_COMPRESS_OUTPUT to CFG_SaveFile(), which removes all spaces, that otherwise would be added to improve readability etc. - compile time define CFG_REMOVE_GROUP_SPACES controls whether spaces from within groups will be removed - compile time define CFG_ASSERT_NULL_ENABLED which asserts places where pointer to file could be nullified (by programmers error) Minor: - fixed bug - additional " (CFG_DOUBLE_QUOTE character) was added after post comment to some text entries - fixed bug: now groups are also saved in original order when using CFG_SORT_ORIGINAL - integer values that don't fit into Sint32 are now detected also by their exact value (not only length) - fixed misc things, which could result in potential bugs - improvements in documentation, fixes, clarifications etc., source code more readable removed some deprecated constructions etc. - new test 002

As you can see, I'm not so lazy as I sometimes pretend to be ;-) Obviously, you can grab newest release from the downloads page.

Posted by Koshmaar on December 30 2005 18:29:3064 Reads - Print
SDL_Config 0.3
Third version of SDL_Config has been released and it's even badder and better than second one! ;-)

What's new / improved:

- optimizated performance of parsing (CFG_OpenFile) by 21% and saving (CFG_SaveFile) by 6%
- more options for saving files available (especially, saving file so that it resembles original file)
- full support for C-like multiline comments /* */
- at last, pre comments from groups and entries are saved to file!
Also, if more than 2 single line comments stay together before group / entry,
all are classified as its pre comment.
- new test program
- implemented new functions: CFG_GetSelectedGroupName() and CFG_ClearFile()
- more liberal parser
- better documentation, bugfixes etc.

You can download new release from the downloads page, or directly from here. Once again, if you are using SDL_Config 0.2, you should try out new version - it's much better (more stable, faster, more features, better documentation etc.).

Btw, is it a coincidence, that when I was sending this news, visit counter on the lower right of the page got exactly 600 hits?! :-)

Posted by Koshmaar on December 30 2005 18:20:1046 Reads - Print
SDL_Config 0.2
New, second version of SDL_Config has been released and it's badder and better than ever! ;-)

What's new / improved:

- now, SDL_Config is using everywhere SDL_RWops streams for loading / saving files
- there is some support for C like multiline comments /* */
- original post-comments loaded from groups and entries are saved to file
- more test programs (ie. saving / loading config files to / from compressed .gz files!)
- better documentation
- implemented other utility functions (RemoveGroup, RemoveEntry, GroupExists, EntryExists)
and slightly changed others interaface
- cleaned CFG_SetError() and CFG_CRITICAL_ERROR stuff, so that it's consitent
- many misc bugfixes
- and last but not least, I managed to compile SDL_Config in Visual Studio in C++,
and test programs in C and C++! Also, I've added VS project files for library and test programs.

You can download new release from the downloads page, or directly from here. If you are using SDL_Config 0.1, I wholeheartly encourage you to use new version - it's much better.

Posted by Koshmaar on December 30 2005 18:13:3850 Reads - Print
Page 1 of 2 1 2 >


Forgotten your password?
Request a new one here.
Banners Logo

Get Firefox!

Copyright © Hubert "Koshmaar" Rutkowski 2005