Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!execu!sequoia!balkan!dogface!bei From: bei@dogface (Bob Izenberg) Newsgroups: comp.os.msdos.programmer Subject: Re: Bug in TC findfirst()/findnext()! Keywords: tc,bug,find,findfirst,findnext Message-ID: Date: 1 Mar 91 10:22:39 GMT References: <1991Feb25.192823.18224@ux1.cso.uiuc.edu> Distribution: na Lines: 14 gordon@osiris.cso.uiuc.edu (John Gordon) writes: > According to the _Turbo_C_Bible_, calls to findfirst() and findnext() > are supposed to return filenames that match *both* the given path *and* the > given attribute. However, the above program, which clearly specifies the > *directory* attribute (FA_DIREC), finds both directories *and* plain files. > Anyone have any comments/fixes/etc? It's exhibiting the same behavior that the DOS function calls do. Try it in assembler and you'll have the same experience. IMHO, this is an instance in which Borland might have improved upon DOS a bit. A Microsoft purist could mouth the reason for the way this was implemented. I'll reserve judgment, and re-check the "directory" matches. -- Bob