Mail Archives: djgpp/1996/11/29/23:14:53
Hello,
I am having trouble using the findfirst() function, when I use the
example in the docs and when I write my own function the same event
occurs. The filename's first two characters are dropped, and the file's
size is totally wrong. I am inserting a code sample below:
int dirtest() {
struct ffblk f;
int done = findfirst("*.*", &f, FA_ARCH|FA_RDONLY);
while (!done)
{
printf("%10u %2u:%02u:%02u %2u/%02u/%4u %s\n",
f.ff_fsize,
(f.ff_ftime >>11) & 0x1f,
(f.ff_ftime >>5) & 0x3f,
(f.ff_ftime & 0x14) * 2,
(f.ff_fdate >> 5) & 0x0f,
(f.ff_fdate & 0x14),
((f.ff_fdate >> 9) & 0x7f) + 1980,
f.ff_name);
done = findnext(&f);
}
}
Could you please find out what I or the docs are doing wrong, and let me
know. Thank you for your time.
Rusty Conover
RConover AT wyellowstone DOT com
- Raw text -