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: 103376,e219d94b946dfc26 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <1172164072.071896.197990@j27g2000cwj.googlegroups.com> From: Markus E Leypold Organization: N/A Date: Thu, 22 Feb 2007 19:40:11 +0100 Message-ID: <9ilkiqyr1w.fsf@hod.lan.m-e-leypold.de> User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:Pa00rZy1BcV1c3ehB6DibE3cMGI= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 88.72.254.141 X-Trace: news.arcor-ip.de 1172169271 88.72.254.141 (22 Feb 2007 19:34:31 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news2.google.com!news1.google.com!news.germany.com!news.unit0.net!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news2.google.com comp.lang.ada:9424 Date: 2007-02-22T19:40:11+01:00 List-Id: "Adam Beneschan" writes: > On Feb 22, 3:19 am, Jean-Pierre Rosen wrote: >> gautier_niou...@hotmail.com a �crit :>> This is an OS (shell) issue, surely? >> >> > Alas, no. >> > I forgot to mention: I tested both programs on both Windows 98 and XP. >> > In both systems, the OA-compiled program gives "*.adb" and the GNAT- >> > compiled the list of files with ".adb" extension. >> > To Adrian, enclosing with '"' works, thanks, but then the syntax >> > differs from the usual one for a command-line tool... >> > I am just suprised by the GNAT behaviour, for two reasons: >> > - I did not find (or missed) something about it in the RM (95) >> > - there is also a GNAT.Command_Line that explicitely intends to do >> > wildcard expansions; so why also GNAT's Ada.Command_Line should do it, >> > silently ? >> >> I think it is a gcc feature. Because gcc is often used to port Unix >> applications to Windows, the gcc library emulates Unix behaviour on windows. > > This sounds right to me, based on my experience with GCC and Windows. > I didn't want to say anything myself until I had a chance to test it > further---but yes, I think that somewhere in the GCC library, in > whatever startup code gets executed to set up argc and argv before > calling main(), something in there expands wildcards. > > >> Too bad that Unix behaviour was wrong in the first place... > > Sigh... this has been one of my pet peeves with Unix for a long time. > With other operating systems I've worked with, you can enter a command > like > > rename *.ads *.ada I've seen tools for unix that worked like this, just use quoted or different wildcards: xmove foo/%.txt bar/baz/old-%.bak (the name was not xmove). So you don't have a pet peeve with Unix, but just with the specific way 'mv' works (it doesn't bothe with renaming rules, just takes N sources and 1 destination and that's it). > for instance, to rename a bunch of files. Unix makes this difficult. > (Yes, I know how to use "foreach" in csh... but still...) The interesting thing is that most people need this function so rarely that they don't bother to find the tool, or type 'man rename' (on Debian that gives me a shell tool that works similarly ) but just use a loop in the shell. Regards -- Markus