From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47bc849aad30d586,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-28 03:59:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!mango.news.easynet.net!easynet-melon!easynet.net!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: A standard package for config files is needed Date: Tue, 28 May 2002 10:59:21 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: NNTP-Posting-Host: kiuk0152.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1022583561 16568 129.241.83.78 (28 May 2002 10:59:21 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Tue, 28 May 2002 10:59:21 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:24862 Date: 2002-05-28T10:59:21+00:00 List-Id: On the GtkAda list there has been some discussion on making a standard package for reading/writing configuration files. As most programs need this it would be very nice with a small, platform independant, robust but easy to use package. Of course one can use XML for something like this, but in most applications this would be an overkill. Besides a program shouldn't have to be tie in with XMLAda just because of the configuration files. This package should be nice for small applications made by student, hobbyists or professionals. So I hope now to kick off a discussion around this. We have been discussing a bit about Window registry versus .ini files, and have more or less agreed that the latter is the better. The reason is that .ini files are: * Platform independant (can use the exact same routines on Unix) * Easier to backup * Easier to have more than one version of So what it then boils down to is for the user to supply the package with the propper filename depending on if she/he is using Windows, Unix or other. If Windows registry is needed it would best be developed as a seperate package I think, as this would not be useful on other platforms. Then there is the issue of the layout of the config file. Either one could do: [Program] Name=SuperDuperApp Version=1.0 [Directory] Help=/usr/doc/SuperDuperApp/ Graphics=/usr/share/pixmaps/SuperDuperApp/ etc... or Program.Name=SuperDuperApp Program.Version=1.0 Directory.Help=/usr/doc/SuperDuperApp/ Directory.Graphics=/usr/share/pixmaps/SuperDuperApp etc... So if somebody would like to share ideas, suggestions or code it would be very nice. I think this is a package that should be kept as simple as possible and easy to use and robust. Preben Randhol