Mail Archives: djgpp/1998/06/05/03:42:52
On Thu, 4 Jun 1998, Salvador Eduardo Tropea (SET) wrote:
> so now I simply try to figure out where is the directory just using the
> argv[0].
This is a very good solution, used by other packages as well. (See the
TeX-related programs, for one example.) However, it has a small but nasty
pitfall: argv[0] is always the short 8+3 path, even if you run on Windows
9X. This might not be a problem at all if you only need to access a file
using that path, but if you use argv[0] to compare it to some other file
name, you might think they aren't the same if the other file name is long.
I don't know if this is a problem in the current context. If it is, a
call to _truename should solve it, but _truename might return remote files
in the UNC-style \\SERVER\SHARE\FOO form, and you then need to convert it
to the normal d:/foo/bar form. (Yes, the DJGPP port of TeX does all
that.)
- Raw text -