AminetAminet
Search:
84782 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/c/Config.lha

Mirror:Random
Showing: ppc-morphos icongeneric icon
No screenshot available
Short:Very easy access to config files
Author: Adam at beachyhd.demon.co.uk (Adam Dawes)
Uploader:Adam beachyhd demon co uk (Adam Dawes)
Type:dev/c
Architecture:m68k-amigaos
Date:1996-05-26
Download:dev/c/Config.lha - View contents
Readme:dev/c/Config.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.



Full documentation is included within the archive.


Contents of dev/c/Config.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 1835    6087  30.1% -lh5- 8407 May 25  1996 Config.c
[generic]                 3016    8250  36.6% -lh5- 0e6d May 25  1996 Config.guide
[generic]                  324     756  42.9% -lh5- 2c85 May 25  1996 Config.h
[generic]                 2757    7286  37.8% -lh5- 685b May 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    8631   25328  34.1%            May 25  1996
Page generated in 0.02 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>