home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / msdos / 4dos / 18
Encoding:
Internet Message Format  |  1992-08-13  |  1.7 KB

  1. Xref: sparky comp.os.msdos.4dos:18 comp.os.msdos.programmer:8521
  2. Path: sparky!uunet!cs.utexas.edu!news
  3. From: phil@cs.utexas.edu (Philip Smolen)
  4. Newsgroups: comp.os.msdos.4dos,comp.os.msdos.programmer
  5. Subject: Re: Patches to make BC++ 3.0 generated code 4DOS-aware
  6. Date: 13 Aug 1992 14:01:18 -0500
  7. Organization: U Texas Dept of Computer Sciences, Austin TX
  8. Lines: 25
  9. Distribution: inet
  10. Message-ID: <l8lcbuINNh32@muleshoe.cs.utexas.edu>
  11. References: <1992Aug08.180127.23394@donau.et.tudelft.nl> <b8zmck_.messina@netcom.com> <Bsq3rs.Dz0@wpi.WPI.EDU>
  12. NNTP-Posting-Host: muleshoe.cs.utexas.edu
  13. Keywords: 4DOS, C, BC++ 3.0, setargv
  14.  
  15. In article <Bsq3rs.Dz0@wpi.WPI.EDU> nyh@wpi.WPI.EDU (Nevo Y Hed) writes:
  16. >>findfirst() and findnext() have nothing to do with the shell.  They
  17. >>are DOS interrupts (21/4E & 21/4F, respectively).  Unless you are
  18. >>willing to invoke shell to search for each file, which would be
  19. >>pathetically slow, there is nothing JP Software can do for you. 
  20. >>You may use FCBs if you wish, they're faster... not any better though.
  21. >
  22. >BorlandC  has it's own, non-dos findfirst find-next.  I didn't do any
  23. >reading on the difference.
  24. >
  25.  
  26. That's not quite correct.  I was just looking at the source
  27. code for firstfirst, findnext, _dos_findfirst, _dos_findnext.
  28. Each one makes calls to the appropriate dos call (21/4e or
  29. 21/4f).  The only thing that they do on top of that is set
  30. the DTA, restore the DTA, and translate the error message.
  31. The only difference between the _dos_find's and the find's
  32. is that they call different functions to translate from DOS's
  33. error code to their own return values.
  34.  
  35. I don't know why they use different structure definitions
  36. for the two types of functions.  They pass each structure
  37. directly to DOS, then directly back to the caller.
  38.  
  39.                     --Phil
  40.