Xref: utzoo comp.unix.wizards:8417 comp.sources.d:2091
Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!ll-xn!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!mhres!jv
From: jv@mhres.mh.nl (Johan Vromans)
Newsgroups: comp.unix.wizards,comp.sources.d
Subject: Re: Finding where an executable was run from -- a proposal.
Message-ID: <1854@mhres.mh.nl>
Date: 12 May 88 18:58:33 GMT
References: <4527@hoptoad.uucp>
Organization: Multihouse NV, the Netherlands
Lines: 14

From article <4527@hoptoad.uucp>, by gnu@hoptoad.uucp (John Gilmore):
> If anyone implements this, I recommend providing a #define AV_EXECNAME -1
> and documenting that argv[AV_EXECNAME] is the pathname given to exec().

I'm already using the convention that library/data files belonging to a
program are located in a path relative to the name of the program. So I
strongly second this suggestion. Until this is adopted by the next C
standard, we'll need to have a library routine which does the job, based on
argv[0] and the PATH variable (despite of the possible problems - there's
no better way).
-- 
Johan Vromans                              | jv@mh.nl via European backbone
Multihouse N.V., Gouda, the Netherlands    | uucp: ..{uunet!}mcvax!mh.nl!jv
"It is better to light a candle than to curse the darkness"