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-Thread: a07f3367d7,e96fdf9557794655 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news2.google.com!news3.google.com!feeder.news-service.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!news.banetele.no!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Wed, 07 Oct 2009 19:06:45 +0200 From: =?windows-1252?Q?Thomas_L=F8cke?= <"tl at ada-dk.org"> Organization: Ada DK User-Agent: Thunderbird 2.0.0.23 (X11/20090812) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada.Directories.Base_Name and dot files References: <4acc8c20$0$284$14726298@news.sunsite.dk> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <4acccaa5$0$287$14726298@news.sunsite.dk> NNTP-Posting-Host: 83.91.213.86 X-Trace: news.sunsite.dk DXC=@F=@iTYjmiIKJ1ZiZQ]7SLYSB=nbEKnkKEV`^>L:I^iM9HanD:b=JLA=UiO>Z:P6OCaX>>FJ?M`3H7D2XGh<`Zi@h49OANTRgGH X-Complaints-To: staff@sunsite.dk Xref: g2news2.google.com comp.lang.ada:8609 Date: 2009-10-07T19:06:45+02:00 List-Id: Yannick Duch�ne Hibou57 wrote: > Hi Thomas, > > There was somewhat similar discuss some times ago : > http://groups.google.com/group/comp.lang.ada/browse_thread/thread/31af760e939556ef?hl=fr# Very interesting thread. Thank you. > It seems that your Ada implementation (the behavior is left as > implementation defined in some areas) defines base file name as > everything before the last dot (and the extension is then every thing > after the last dot). > > This is something with which I fully agree. I guess I had expected a Linux implementation of Ada 2005 to exhibit a "proper" understanding of the Unix way of handling files, dot files included. > But what about (another question) a full file name like � my- > page.fr.html � ? What is the base name ? Can you guess ? > > Well, the UNIX basename command will give you something, the Windows > OS will tell you it is � my-page.fr � and a web server (not its host > OS) may tell you it is � my-page �, because with some convention, fr > and html are both extensions and separated unordered extensions (ex. � > my-page.html.fr � would be interpreted as the same as� my-page.fr.html > �). You see how it may be legitimately variable depending on > legitimate conventions ? Yes, I understand that. > Did you run your tests on Windows ? I suppose most of Ada > implementation defined behavior are inspired from that of the host OS > (possibly). I did not run any tests on Windows. I use Windows for gaming, and nothing else. :o) > I would like to say : when in any particular area, you need a > particular specification which is not of concerns with the > fundamentals of the language design, don't hesitate to design your own > dedicated package. > > You have some strong requirements about what the interpretation of > file names should, and probably can't expect Ada always agree with > this kind of level of details : the best is to design your own > interpretation function. > > You known, it appears that a lot of peoples do that (especially with > files by the way), and Ada designed programs are far from only made up > of Ada's standard packages Yes, as I expected. Some home-grown parsing to assist Ada.Directories when special cases occur. I can live with that. I guess it just confused me that my GNAT GPL Linux environment was not able to handle something as "simple" (note the quotes!) as dot files. Thank you for your insightful post. -- Regards, Thomas L�cke Email: tl at ada-dk.org Web: http:ada-dk.org IRC nick: ThomasLocke