From: "Richard L.F. van Paasen" Newsgroups: comp.os.msdos.djgpp Subject: findfirst() findnext() bug? Date: Sun, 29 Sep 1996 21:34:49 -0700 Organization: University of Technology Eindhoven Lines: 57 Message-ID: <324F4DE9.70FC@stud.tue.nl> Reply-To: R DOT L DOT F DOT v DOT Paasen AT stud DOT tue DOT nl NNTP-Posting-Host: annex1s7.urc.tue.nl Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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 #include 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 06-08-96 15:15 =2E. 06-08-96 15:15 DB_SPR 06-08-96 15:16 MUSIC 06-08-96 15:16 PRG 06-08-96 15:17 TEXT 06-08-96 15:18 WINDOWS 06-08-96 15:19 INET 06-08-96 15:43 8 file(s) 0 bytes 142.958.592 bytes free