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-06-01 08:43:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: A standard package for config files is needed Date: 01 Jun 2002 11:39:43 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <4519e058.0205310752.4f358518@posting.google.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1022946428 4131 128.183.220.71 (1 Jun 2002 15:47:08 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 1 Jun 2002 15:47:08 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:25153 Date: 2002-06-01T15:47:08+00:00 List-Id: tmoran@acm.org writes: > > ... I usually used Emacs to edit the files, rather than bother with > > a spreadsheet or DB program. But some people did prefer the database > > program, and having in that format allows people to do DB queries on > > I'm starting to wonder if everyone is thinking of the same thing when > they use the term "configuration data". Of course not! > Or are we all on different wavelengths here. I myself am thinking of > persistent information that is specific to a particular user and > installation, That is certainly one common useage of "config files", and one I intend to support. > but not a particular execution (eg, not an individual document in > the case of a word processing program). I want this one. For example, I want one setup for my card game that make it easy to win (for Fridays), and a different setup that makes it challenging (for Sundays :). That's easily accomplished by allowing the config file to be specified on the command line, and setting up two different icons. > I also include information that is needed for installation and > un-installation on a machine, independent of the particular user. Also a good usage. > That's a pretty broad definition, including file lists and file > paths and such text as, for instance, standard signatures. My > definition also includes settings of flags and semi-constants, > including structured constants like color palettes or fonts. Yes, structured data would be nice. My current Windows implementation allows structured data via: generic type Private_Type is limited private; Max_Width : Natural; -- maximum width of Image of Item. with function Value (Image : in String) return Private_Type; function Read_Private (File : in String; Section : in String; Keyword : in String; Default : in Private_Type) return Private_Type; -- Return private value associated with Keyword from Section in File. If -- Keyword is not found, Default is returned. and similarly for Write. This means the syntax of the file is _not_ standard for structured types. I'm looking for a better solution; XML may be it. > Those are typically not textual and understanding them requires at > least some understanding of the inner workings of the program. Does > that jibe with what the term is meaning to other folks? It matches mine. Not _everything_ in the config file must be human editable; just some stuff like the installation directory. For any particular application, it may be that the registry approach is better. For another, the config file approach will be better. For some, maybe a mixture. In any case, a standard Ada API will help. -- -- Stephe