Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!van-bc!rsoft!mindlink!a513 From: Rick_Vandenberg@mindlink.UUCP (Rick Vandenberg) Newsgroups: comp.os.msdos.programmer Subject: Re: Bug in TC findfirst()/findnext()! Message-ID: <4919@mindlink.UUCP> Date: 25 Feb 91 11:42:43 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 21 > gordon@osiris.cso.uiuc.edu 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? > > This is not a bug. The DOS calls for Search for first / next match work the same way. You might find it helpful to get a book along the lines of the DOS Programmers Reference, that documents each interrupt. By the way, the attribute for normal files in 0x00. Because no bits are set, these calls will always match normal files. Rick. -- Rick Vandenberg Rick_Vandenberg@Mindlink.UUCP Vandenberg Systems Research uunet!van-bc!rsoft!mindlink!Rick_Vandenberg