Newsgroups: comp.sys.atari.st.tech
Path: utzoo!utdoe!david
From: david@doe.utoronto.ca (David Megginson)
Subject: Re: The program's name and path - how can I get them?
Message-ID: <1990Oct8.144907.12697@doe.utoronto.ca>
Keywords: arcgsh
Organization: Dictionary of Old English Project - U of Toronto
References: <1990Oct8.085411@heike.informatik.uni-dortmund.de>
Date: Mon, 8 Oct 90 14:49:07 GMT

THIS INFORMATION IS IMPORTANT ENOUGH THAT I AM POSTING IT INSTEAD
OF REPLYING PERSONALLY.

In article <1990Oct8.085411@heike.informatik.uni-dortmund.de> klute@heike.informatik.uni-dortmund.de (Rainer Klute) writes:
>
>However, what I need to know is the complete path of the executing program.
>This is neccessary to read (resp. write) the configuration file which is in
>the same directory as the program itself. 

[Stuff omitted]

>Does someone have a general solution? It would be sufficient to get only
>the directory where the program is located - without knowing the program's
>name. Even better would be a possibility to retrieve the program's name
>also, and the best would be if this could be done without GEM functions.
>And yes, of course only legal solutions are useful.

DO NOT (repeat) DO NOT use the horrible hack introduced in the dlibs
startup code. It dies completely under RTX, and MiNT takes precautions
to make sure that it does not work. There is _no_ legal way that I know
of that you will always be able to do this. You can check to see if
the program was started from a shell which supports the ARGV= protocol,
but that's about it.


David Megginson
-- 
////////////////////////////////////////////////////////////////////////
/  David Megginson                      david@doe.utoronto.ca          /
/  Centre for Medieval Studies          meggin@vm.epas.utoronto.ca     /
////////////////////////////////////////////////////////////////////////
