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,6bf1c4b845bd2160 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: What about a glob standard method in Ada.Command_Line ? Date: Thu, 2 Sep 2010 14:08:47 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <4c73e859$0$6991$9b4e6d93@newsspool4.arcor-online.net> <4c73fcf6$0$6992$9b4e6d93@newsspool4.arcor-online.net> <1jxm50y65grlo.sjyb9hm4y1xp$.dlg@40tude.net> <4c743a59$0$6893$9b4e6d93@newsspool2.arcor-online.net> <4c74db09$0$6890$9b4e6d93@newsspool2.arcor-online.net> <1r82cxcws3pc9$.r40m8l3ttil7$.dlg@40tude.net> <4c74f9f6$0$6772$9b4e6d93@newsspool3.arcor-online.net> <17drl4b1ko4iv.1eccfudluzl5h.dlg@40tude.net> <4c7515fc$0$7664$9b4e6d93@newsspool1.arcor-online.net> <4c752693$0$7656$9b4e6d93@newsspool1.arcor-online.net> <17uj112bzfc47$.1jlqotsp6zuup.dlg@40tude.net> <4c753c0c$0$6877$9b4e6d93@newsspool2.arcor-online.net> <4c756481$0$6775$9b4e6d93@newsspool3.arcor-online.net> <4c75bc6d$0$6973$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1283454529 12114 69.95.181.76 (2 Sep 2010 19:08:49 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 2 Sep 2010 19:08:49 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-RFC2646: Format=Flowed; Response Xref: g2news1.google.com comp.lang.ada:13915 Date: 2010-09-02T14:08:47-05:00 List-Id: "Georg Bauhaus" wrote in message news:4c75bc6d$0$6973$9b4e6d93@newsspool4.arcor-online.net... ... > You said, "You just do not need patterns in directory search." > Did this refer to the Pattern : String parameter of > (Start_)Search? If so, I fully agree. > > Here is what I wanted Matcher : access function (...) to be. > > 1. get rid of implementation-defined Pattern : String It's not implementation-defined if it is null; that is defined to match everything (always). I'm not sure why we didn't give it a null string default (that seems like the logical thing to have done, since you often want to return everything). (I thought we had given it such a default, but that is definitely not the case.) > 2. do with the names what I want after they have been read: Why is such a Matcher routine necessary? You might as well just test the file name returned; there is going to be more overhead in the callback routine than in a direct test, and there is no way for the OS to help. The reason there is an implementation-defined pattern parameter is that some OSes (Windows, for instance) can take the pattern directly and only return matches -- in this case, the Ada runtime can potentially be more efficient than writing the code explicitly. If the code has to be written explicitly, it might as well be part of the user program. There wasn't any intent to support anything here that the OS doesn't support directly (on POSIX systems, it would make sense to only support the null string pattern, although I think actual implementations do more). Programs that want to be as portable as possible ought to only use Pattern => "" in Start_Search. Randy.