home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / amiga / programm / 19017 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.0 KB  |  30 lines

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!male.EBay.Sun.COM!exodus.Eng.Sun.COM!sun!amdcad!netcomsv!terapin!paulk
  2. From: paulk@terapin.com (Paul Kienitz)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: system call to get AmigaDos PATH string(s) ?
  5. Message-ID: <paulk.3cz7@terapin.com>
  6. Date: 21 Jan 93 03:40:14 GMT
  7. References: <1993Jan17.230704.27737@philips.oz.au>
  8. Organization: BBS
  9. Lines: 19
  10.  
  11. > system call to get AmigaDos PATH string(s) ?
  12.  
  13. > One klugey way is :-
  14. > Execute ("PATH >T:file", 0L,0L);
  15. > then parse T:file.
  16. > But there's got to be a neater way.
  17.  
  18. What you gots ta do is follow the BPTR list in cli_CommandDir of the
  19. struct CommandLineInterface of the process that has the path you want
  20. to trace.  It's a list in which each node is a BPTR to the next node,
  21. and a FileLock BPTR.  Convert the locks to path strings the usual way
  22. -- either with LockToPath() or, under 1.x, a loop doing ParentDir()
  23. and Examine().
  24.  
  25. This list does not include the "Current directory" at the beginning and "C:" at
  26. the end that you see in the output from "Path".
  27.