delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
Date: | Wed, 5 Dec 2001 10:14:30 +0200 (IST) |
From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
X-Sender: | eliz AT is |
To: | Jeffrey Powell <j-powell AT pb DOT jp DOT nec DOT com> |
cc: | djgpp AT delorie DOT com |
Subject: | Re: Broken findfirst |
In-Reply-To: | <000801c17d59$cf749550$1002a8c0@ygtynecs01097> |
Message-ID: | <Pine.SUN.3.91.1011205101113.5587L-100000@is> |
MIME-Version: | 1.0 |
Reply-To: | djgpp AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On Wed, 5 Dec 2001, Jeffrey Powell wrote: > Findfirst/findnext only works with hardcoded pattern. > > Does not work: > iFndStatus=findfirst(av[1], &f, FA_HIDDEN | FA_SYSTEM | FA_DIREC); > while(!iFndStatus) > { > printf("%s \n",f.ff_name); > iFndStatus=findnext(&f); > } > Result: > findfirst() returns 0 and the first matching file. > findnext() returns 1 No more files (ENMFILE), loop terminates. What's the contents of av[1] in this example? Anyway, my testing shows that findfirst/findnext work for non-constant strings as well as for constant ones. This must be something specific to either your program or your platform.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |