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 Path: g2news2.google.com!postnews.google.com!j27g2000cwj.googlegroups.com!not-for-mail From: "Adam Beneschan" Newsgroups: comp.lang.ada Subject: Re: Ada.Command_Line and wildcards Date: 22 Feb 2007 09:07:52 -0800 Organization: http://groups.google.com Message-ID: <1172164072.071896.197990@j27g2000cwj.googlegroups.com> References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1172164077 6896 127.0.0.1 (22 Feb 2007 17:07:57 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 22 Feb 2007 17:07:57 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: j27g2000cwj.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news2.google.com comp.lang.ada:9420 Date: 2007-02-22T09:07:52-08:00 List-Id: On Feb 22, 3:19 am, Jean-Pierre Rosen wrote: > gautier_niou...@hotmail.com a =E9crit :>> This is an OS (shell) issue, su= rely? > > > 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 windo= ws. 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 for instance, to rename a bunch of files. Unix makes this difficult. (Yes, I know how to use "foreach" in csh... but still...) -- Adam