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 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-28 09:33:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.columbus.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3CF3B160.DF10E94F@san.rr.com> From: Darren New X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: A standard package for config files is needed References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 28 May 2002 16:33:11 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1022603591 66.75.151.160 (Tue, 28 May 2002 09:33:11 PDT) NNTP-Posting-Date: Tue, 28 May 2002 09:33:11 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:24870 Date: 2002-05-28T16:33:11+00:00 List-Id: Preben Randhol wrote: > Of course one can use XML for something like this, but in most > applications this would be an overkill. XML is generally overkill anywhere you don't have blocks of text (i.e., CDATA) as part of your data structures. > 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 Be aware that using the registry has some benefits also, including (for example) roaming profiles, where you get "your" registry regardless of which computer you log into, notification of changes by other processes, etc. Also, be aware that .ini files and the registry are in many senses API-compatible. Hence, I'd suggest perhaps considering whether it could be designed in such a way that only the "open" routine knows whether it's the registry or a file. (Not that you need to implement both immediately.) > 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. And here I would suggest perhaps "registry subkey" would be another appropriate bit to supply. I.e., if you give a file name, it stores it in an .ini file, and if you give a registry subkey, it stores it in a registry subkey. > So if somebody would like to share ideas, suggestions or code it would > be very nice. Why not examine the .ini and registry interfaces for Windows and see if they translate cleanly into something you could do in Ada? Are you considering putting arbitrary streams into the configuration files, or only readable text that would have to get parsed in and out manually? -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. ** http://home.san.rr.com/dnew/DNResume.html ** ** http://images.fbrtech.com/dnew/ ** My brain needs a "back" button so I can remember where I left my coffee mug.