Short: Very easy access to cfg files (bugfix) Author: Adam@beachyhd.demon.co.uk (Adam Dawes) Uploader: Adam beachyhd demon co uk (Adam Dawes) Type: dev/c Architecture: m68k-amigaos Introduction ~~~~~~~~~~~~ Well, I hate Windows as much as the next man, but occasionally I stumble across a good idea hidden away within the operating system. There are a couple of functions buried in there for reading and writing configuration files, and they actually make things very easy. I decided I'd had enough of messing around with config files on my Amiga, so I've ported the functions to Amiga C. The idea is that the configuration files take a definitive structure which the Config functions can understand. Each config file is split in to a number of "Sections" (which are stored in the config file as a keyword inside square brackets). In each of these sections are a number of "Items", each of which contains an actual data item. The items are local to the section that contains them, so it's perfectly legal to use one item name in several sections, they'll all be treated separately. The beauty behind the functions is you don't have to worry about creating files or scanning through them. Even when it comes to reading data, you don't have to care if the config file exists or not as you provide a default value to use if the file/section/item cannot be located. Everything is automated within the Config functions. This version fixes a nasty memory allocation problem in v1.0. Version 1.0 of Config should not be used! Please recompile any programs that use Config with the new v1.01 code. Full documentation is included within the archive.