Path: utzoo!utgpu!watmath!clyde!att!pacbell!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!HASARA5.BITNET!DEVR%AMCCCA.SURFNET From: DEVR%AMCCCA.SURFNET@HASARA5.BITNET Newsgroups: comp.sys.atari.st Subject: Environment problem Message-ID: <8811160846.AA14132@ucbvax.Berkeley.EDU> Date: 16 Nov 88 08:30:00 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 38 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).