delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <AANLkTikMYFfzxkx-9MOHAetbq2rkiofqcUfPZoLX-vQz@mail.gmail.com> |
References: | <20110319140945 DOT d50bba72719f91cdb61cd892ddf83b25 DOT 2221dc2256 DOT wbe AT email11 DOT secureserver DOT net> <AANLkTikMYFfzxkx-9MOHAetbq2rkiofqcUfPZoLX-vQz AT mail DOT gmail DOT com> |
From: | Hugh Myers <hsmyers AT gmail DOT com> |
Date: | Sun, 20 Mar 2011 16:39:20 -0700 |
Message-ID: | <AANLkTimz=aOLNitvchDqn93wE2dT3=2wSNLAN57zp5Gn@mail.gmail.com> |
Subject: | Re: How to reinvent /usr/bin/find in cygwin/gnu/gnat Ada? |
To: | cygwin AT cygwin DOT com |
Cc: | Csaba Raduly <rcsaba AT gmail DOT com>, siegfried AT heintze DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Csaba is quite correct. That said the thing to remember is the examples of either approach are far more likely to be written in either 'C' or 'C++' so your ability to translate from one or the other to Ada will be the key to your success. I myself would use the opendir/readdir combination simply because it is a 'native' approach as it were... --hsm On Sun, Mar 20, 2011 at 4:31 PM, Csaba Raduly <rcsaba AT gmail DOT com> wrote: > Hi Sigfried! > > On Sat, Mar 19, 2011 at 10:09 PM, =A0 wrote: > >> I want to recursively crawl a directory tree on windows using >> cygwin/gnu/ada. I'm not sure if I should use the unix function opendir >> (and friends) or the windows functions FindFirstFile and FindNextFile. >> Maybe the opendir would be preferable since it would be portable. > > It's not a question of portability. Cygwin goes to great lengths to > create a Unix/Linux compatible environment. If you want to use the > _Cygwin_ version of Ada, then you really should use opendir/readdir. > >> Can someone point me to some examples of cygwin/ada programs calling a >> standard function like opendir? > > This is not really a Cygwin question, but maybe this will help: > https://www2.adacore.com/gap-static/GNAT_Book/html/rts/g-dirope__adb.htm > > Csaba > -- > GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ > The Tao of math: The numbers you can count are not the real numbers. > Life is complex, with real and imaginary parts. > "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus To= rvalds > "People disagree with me. I just ignore them." -- Linus Torvalds > > -- > Problem reports: =A0 =A0 =A0 http://cygwin.com/problems.html > FAQ: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://cygwin.com/faq/ > Documentation: =A0 =A0 =A0 =A0 http://cygwin.com/docs.html > Unsubscribe info: =A0 =A0 =A0http://cygwin.com/ml/#unsubscribe-simple > > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |