Re: [AD] al_findfirst() win2k.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


{from the old AD list}

>I definitely can't reproduce the problem under Win98, so I guess Win2k
sets 
>some additional flags in the bitmask. Does it help to pass -1 instead of 
>FA_ARCH | FA_RDONLY ?
>

I tried his original snippet on MinGW32 + Win2K using Allegro 4.1.5. (He
was using DJGPP + Win2K on Allegro 4.1.6.)

I had a bunch of text files, and I did an "attrib -a" on a couple of them
to remove the archive flag. I did a "attrib" to confirm that the archive
bit was unset. I then ran the code below, and they all worked fine.

I then right-clicked on the file, and modified a bunch of properties,
including "Indexing", "Compression", and "Encryption", and it always was
displayed by allegro. 

The only time it was not displayed was when I marked the "Hidden"
attribute. I think that's by design? Anyway those flags always did confuse
me. :P

This may be a DJGPP + Win2K issue? I don't have DJGPP on this system, but I
could try if it would be of any help.

--
Matthew Leverton - matthew@xxxxxxxxxx
http://www.allegro.cc


~~~

#include <allegro.h>
#include <stdio.h>
int main(void)
{
allegro_init();
struct al_ffblk blk;
if ( 0 != al_findfirst("*.txt", &blk, FA_ARCH | FA_RDONLY ))
{
printf("no match found\n");
return 2;
}
printf("name = %s\n", blk.name );

while ( 0 == al_findnext(&blk))
{
printf("name = %s\n", blk.name );
}
return 0;
}
END_OF_MAIN()


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/