Mail Archives: djgpp/1996/09/29/16:53:10
Hi,
When I use the findfirst() and findnext() functions of libc,
the first 2 characters of the names in ffblk.ff_name dissapear.
Is this a bug in libc.a ? With Borland C, this works fine.
The program:
#include <dir.h>
#include <iostream.h>
int main(void)
{ struct ffblk fblk;
char ftemp[MAXPATH]=3D"c:/data/*.*";
=
if (!findfirst(ftemp,&fblk,FA_DIREC))
do
{ if (fblk.ff_attrib & FA_DIREC) =
{ cout << "Dir: ";
cout << fblk.ff_name << "\n";
}
} while(!findnext(&fblk));
return 0;
}
Gives as result:
Dir: outsid=01>P=80=020
Dir: =
Dir: _SPR
Dir: SIC
Dir: G
Dir: XT
Dir: NDOWS
Dir: ET
While the directory c:/data contains:
Volume in drive C has no label
Volume Serial Number is 212C-73A8
Directory of C:\DATA
=2E <DIR> 06-08-96 15:15
=2E. <DIR> 06-08-96 15:15
DB_SPR <DIR> 06-08-96 15:16
MUSIC <DIR> 06-08-96 15:16
PRG <DIR> 06-08-96 15:17
TEXT <DIR> 06-08-96 15:18
WINDOWS <DIR> 06-08-96 15:19
INET <DIR> 06-08-96 15:43
8 file(s) 0 bytes
142.958.592 bytes free
- Raw text -