On Wed, 2005-03-23 at 23:28 +0200, Shachar Shemesh wrote:
> Shaul Karl wrote:
> 
> >On Wed, Mar 23, 2005 at 07:46:24PM +0200, Shachar Shemesh wrote:
> >  
> >
> >>There is no other explanation.
> >>
> >>Just about every free program on Linux keeps a configuration file in 
> >>/etc. They all fairly much carry the same format. It simply defies 
> >>logic that there would be no standard library to read this 
> >>configuration file in.
> >>
> >>    
> >>
> >
> >
> >  Not sure I understand what you are after. Suppose there would have 
> >been # include <configuration_files.h>. What API would you expect to
> >find in it?
> >
> The most basic API is "get me the value this key has". So that if I have
> "PermiteRootLogin Yes"
> I could do GetValue("PermitRootLogin"), or even 
> "GetValue("PermitRootLogin", TYPE_BOOL)". The details will need to be 
> sorted out, of course.
> 
> More advance API would also let me say "Here is a section with a bunch 
> of keys, tell me what they are and what their values are". Also, there 
> should be an option to have more than one value per key.

A full design of configuration files needs to take the following into
account:
1. Easy to manually edit.
2. Easy to develop GUI based tool for editing it by naive users.
3. Easy to automatically edit.
4. If the same configuration file needs to be messed around by more than
one software package, then it should be broken into parts, which are
#include'd by a master configuration file
(examples:  /etc/apache2/conf.d, /etc/cron.*, /etc/sane.d, /etc/dev
which exist in my Debian Sarge installation).
5. Support for per-user overriding of configuration files (by means of
configuration files in user's home directory or dotted subdirectories
thereof).
                                                  --- Omer
-- 
MS-Windows is the Pal-Kal of the PC world.
My own blog is at http://www.livejournal.com/users/tddpirate/

My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to