Subject: Re: bug with gcc with findfirst/findnext
From: [email-masked] (John Mullee)

7 Nov 1998 05:39:34 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked] (root)

At 01:50 1998-11-04 +0100, you wrote:
>The functions _findfirst and  _findnext Will not work with the last version of gcc (mingw32).
(snip)
>int main(int argc,char *argv[])
>	printf("Listing of\t%s\n\n",argv[1]);
>	/* find the first file that matches */
>	if ((handle = FindFirstFile(argv[1],&data)) == INVALID_HANDLE_VALUE) {
(snip)
>Example of usage:
>D:\lcc\demo\findfirst>gcc findfiles.c
>D:\lcc\demo\findfirst>a
>Usage: findfiles <pattern>
>D:\lcc\demo\findfirst>a *.*
>Listing of      a.exe
>
>a.exe                                  20998 1998 Nov 04:01:33:20
>
>D:\lcc\demo\findfirst>

>What is REALLY WEIRD is that if you run the same executable that fails under
>the msvc debugger, it will work!!!

I think you might examine the 'globbing' more closely.
I think that when you run >a *.*, your main gets argc=num_files+1,
but you only FindFirstFile with the first argv[1].
Try looping over argv?

HTH

John.
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".