🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #4888

Re: Bug in TC findfirst()/findnext()!

#4888
From: Rick Vandenberg
Date: Mon, 25 Feb 1991 11:42
21 lines
1265 bytes
> 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
Technical Details
Message-ID: <4919@mindlink.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!van-bc!rsoft!mindlink!a513

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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