home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17869 < prev    next >
Encoding:
Internet Message Format  |  1992-12-28  |  1.4 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!uwm.edu!rutgers!cbmvax!jesup
  2. From: jesup@cbmvax.commodore.com (Randell Jesup)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: AmigaDos Assign command
  5. Message-ID: <38158@cbmvax.commodore.com>
  6. Date: 28 Dec 92 19:18:10 GMT
  7. References: <ianm.03r4@laghey.UUCP> <37922@cbmvax.commodore.com> <1992Dec21.185417.21889@jato.jpl.nasa.gov>
  8. Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
  9. Organization: Commodore, West Chester, PA
  10. Lines: 24
  11.  
  12. jdickson@jato.jpl.nasa.gov (Jeff Dickson) writes:
  13. >In article <37922@cbmvax.commodore.com> jesup@cbmvax.commodore.com (Randell Jesup) writes:
  14. >>
  15. >>    while (1) {
  16. >>        dp = GetDeviceProc(path,dp);
  17. >>        if (!dp)
  18. >>        {    /* getdevproc freed dp for us */
  19. >               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  20. >
  21. >    How? Before getdevproc returned dp?
  22.  
  23.     Read the autodocs.  When making multiple calls to GetDeviceProc, the
  24. end of the list is signaled by GetDeviceProc returning NULL.  You pass in your
  25. old dp (a) so it can decide what to give you next, and (b) so it can free it
  26. if you've hit the end.  If you have the autodocs, always check them before
  27. posting questions about routines - it saves everyone (including you) time and
  28. trouble.
  29.  
  30. -- 
  31. To be or not to be = 0xff
  32. -
  33. Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
  34. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
  35. Disclaimer: Nothing I say is anything other than my personal opinion.
  36.