
|
84782 packages online
|
|
 |
|
dev/misc/ConfigLib2.lha |
|
No screenshot available
|
|
This archive contains config.library, a system to make accessing config
files particularly easy, and all necessary documentation, includes, etc. to
use the library with C and assembly language.
This is a revision of my Config system, previously available as sourcecode
in dev/c/Config101.lha. Config.library is completely compatible with the
Config system; existing config files will still work, and the function
names are identical.
If anyone is interested in converting the includes and examples to work in
any other languages (Amiga E, BASIC, etc.) then please contact me.
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.
|
Contents of dev/misc/ConfigLib2.lha
PERMSSN UID GID PACKED SIZE RATIO CRC STAMP NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic] 971 1980 49.0% -lh5- b8d3 Sep 7 1996 ConfigLibrary/ConfigLib2.readme
[generic] 1181 4982 23.7% -lh5- 68ce Sep 7 1996 ConfigLibrary/Docs/Config.doc
[generic] 4262 11409 37.4% -lh5- d9d2 Sep 7 1996 ConfigLibrary/Docs/Config.guide
[generic] 262 566 46.3% -lh5- 1785 Sep 7 1996 ConfigLibrary/Include/clib/config_protos.h
[generic] 132 285 46.3% -lh5- 32e7 Sep 7 1996 ConfigLibrary/Include/fd/config.fd
[generic] 184 305 60.3% -lh5- 9a7d Sep 7 1996 ConfigLibrary/Include/libraries/config.h
[generic] 179 294 60.9% -lh5- 76e7 Sep 7 1996 ConfigLibrary/Include/libraries/config.i
[generic] 165 325 50.8% -lh5- 90dc Sep 7 1996 ConfigLibrary/Include/pragmas/config_pragmas.h
[generic] 185 270 68.5% -lh5- fd23 Sep 7 1996 ConfigLibrary/Include/proto/config.h
[generic] 1775 2952 60.1% -lh5- 5263 Sep 7 1996 ConfigLibrary/Libs/config.library
[generic] 722 1923 37.5% -lh5- 2f1b Sep 7 1996 ConfigLibrary/Test/Asm/ConfigTest.s
[generic] 748 3041 24.6% -lh5- 61af Sep 7 1996 ConfigLibrary/Test/C/ConfigTest.c
---------- ----------- ------- ------- ------ ---------- ------------ -------------
Total 12 files 10766 28332 38.0% Sep 15 1996
|
|
|
 |
Page generated in 0.02 seconds |
Aminet © 1992-2024 Urban
Müller and the Aminet team.
Aminet contact address: <aminet aminet net> |