From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2001-12-12 18:18:45
Hi! On Tue, Dec 11, 2001 at 08:40:01PM +0100, groepaz wrote: > 1) at program start, get current working dir and remember that It's not as simple as that, since DOS has a current directory per drive. Things like d:..\..\include are completely legal. The example above would be a path relative to the current directory on drive d: > 2) whenever you want to access files from the current working dir (as > in, from where the tool has been launched), or any paths relative to > it, prepend the path remembered before. > 3) whenever you access (read) a sourcefile, set current working dir to > directory of that file So if I have a path like the one above, and the next include directive is #include "/foo/bar/baz.h" which directory should be searched, d:/foo/bar, or <current drive>/foo/bar? Drive handling and the fact that there is a current directory for each drive makes the necessary decisions difficult. > i think that might even work in a portable way (getcwd/setcwd should > be available everywhere no?) - well except a "collapsepath" > functionality would be needed for "OSes" like ms-dos... Path handling in Windows/DOS is a mess, especially of you start to add UNC network paths (which are also legal paths). So I would be really glad if you could find another solution for your problem :-) Regards Uz -- Ullrich von Bassewitz uz_at_musoftware.de ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:44 CET