Article View: comp.os.msdos.programmer
Article #4949Re: Bug in TC findfirst()/findnext()!
From: Bob Izenberg
Date: Fri, 01 Mar 1991 10:22
Date: Fri, 01 Mar 1991 10:22
14 lines
1162 bytes
1162 bytes
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
Technical Details
Message-ID:
<gcL5X4w164w@dogface>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!execu!sequoia!balkan!dogface!beiReferences:
<1991Feb25.192823.18224@ux1.cso.uiuc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <gcL5X4w164w@dogface> Date: 1 Mar 91 10:22:39 GMT References: <1991Feb25.192823.18224@ux1.cso.uiuc.edu> Distribution: na Lines: 14