On Wed, Mar 23, 2005 at 09:09:01PM +0200, 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. > >
There are few such projects. I have yet to see one that has a considerable following outside its natural friends. The famous ones are probably gconf and mcop (I never used them as a programmer and know very little about them as a user, so excuse me if they are not a direct answer to the original question), and there are few others - e.g. search freshmeat for 'ini'. One more example - I have seen (but did not use myself) lua being used also for such specific uses. It's usually considered a "general" extension language, at the same class of e.g. tcl or guile, but is very small and has specific features for such things. > > > 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? What output would you expect to get from reading fstab? > timezone? whatever? I agree it's hard to define a language good enough for everything, even more so good (not mearly "enough") for everything, just as there is no programming language good for everything. Assembly might be "good enough" for everything, and just as you would not want to use it for everything you would not want to use any specific language for conf. > Does this standard library exists on other OSs? As was already mentioned, the Windows Registry. As far as I know, there are few such attempts also in various Unices. Some of them even became semi-standard. E.g. nss, which is a library for accessing the user db, etc - but I do not even know how easy it is to add a new type for your own program. IIRC there are some more extensive ones, maybe in AIX or in MaxOS X, but I do not know that for sure. BTW, IIRC, one of the visions of Be with BeOS was to clean up the unix mess, one of the aspects being to create a unified conf format. As we all know, Be didn't do well. It seems people do not really want cleanness. They want features and power. -- Didi ================================================================= 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]