[comp.sys.atari.st] Environment problem

DEVR%AMCCCA.SURFNET@HASARA5.BITNET (11/16/88)

Hello,

I  have  a problem with Lattice C.  I have written a  program  to
translate wordplus files to postscript. This program makes use of
a  resource  file.  If this program is started from  within  e.g.
MENU+ it can't find its resource.  So I like to determine in  the
main subroutine the complete path of the executable file.  In the
argument array the first argument always says "CPROG".  Maybe  it
is possible to extract the information I need from the environmet
string, but until now I am not succesfull.
Who can help me?  Fill in the missing lines:

#include "stdio.h"

void main(argc,argv,envp)
int argc;
char *argv[];
char *envp[];
{
   extern char *_VARG;
   extern char *_VBASE;
   extern char *_VENV;
   extern char *_VENVL;
   extern char *_VENVP[];
   extern char *_VSIZE;
   char orig_path[30];
   .
   .
   .
   org_path=?????;
}

Thanks,
Berend F. de Vries.
DEVR%AMCCCA.SURFNET@HASARA5.BITNET
or of domain SURFNET is known
DEVR@AMCCCA.SURFNET
(Old adress U00170@HASARA5 still works).