
|
84799 packages online
|
|
 |
|
dev/c/Config101.lha |
|
No screenshot available
|
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 |
Date: | 1996-06-27 |
Download: | dev/c/Config101.lha - View contents | Readme: | dev/c/Config101.readme |
Downloads: | 687 |
|
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.
|
Contents of dev/c/Config101.lha
PERMSSN UID GID PACKED SIZE RATIO CRC STAMP NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic] 1855 6116 30.3% -lh5- 4fd3 Jun 9 1996 Config.c
[generic] 3227 8740 36.9% -lh5- b351 Jun 25 1996 Config.guide
[generic] 381 863 44.1% -lh5- d832 Jun 25 1996 Config.h
[generic] 2969 7775 38.2% -lh5- 4c17 Jun 25 1996 Config.txt
[generic] 625 2747 22.8% -lh5- e02e May 25 1996 ConfigTest.c
[generic] 74 202 36.6% -lh5- bd63 May 25 1996 DMakeFile
---------- ----------- ------- ------- ------ ---------- ------------ -------------
Total 6 files 9131 26443 34.5% Jun 27 1996
|
|
|
 |
Page generated in 0.02 seconds |
Aminet © 1992-2024 Urban
Müller and the Aminet team.
Aminet contact address: <aminet aminet net> |