Mail Archives: djgpp/1997/09/03/01:19:56
Karl Garrison <karlos AT eznet DOT net> wrote:
>Does anyone know how I can find out what directory a program was invoked
>from? I would perfer an ANSI-C method, but, failing that, a
>DJGPP-specific method would be acceptable. Specifically:
>
>I am making a HTML editor that will look for configuration files and the
>like in the same directory as the executable. I don't want to force the
>user to install in a particular directory, or make them add enviroment
>variables to their autoexec.bat.
I *think* that's what is in argv[0] when your main program starts.
I'm not sure the whole path is there, though. Maybe just the "command
line" that started the program.
----------------------------------------------------
Peter J. Farley III (pjfarley AT dorsai DOT org)
- Raw text -