Path: utzoo!utgpu!watmath!clyde!att!ucbvax!Berend From: Berend F. de Vries, Dept. of Biochem., UVA Amsterdam Newsgroups: comp.sys.atari.st Subject: (none) Message-ID: <8811160546.AA11160@ucbvax.Berkeley.EDU> Date: 15 Nov 88 23:17:00 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 44 RFNET@HASARA5.BITNET> To: INFO-ATARI16@SCORE.STANFORD.EDU X-VMS-To: SARA5::INM%"INFO-ATARI16@SCORE.STANFORD.EDU", DEVR Subject: Environment question 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 if domain SURFNET is known DEVR@AMCCCA.SURFNET (Old adress U00170@HASARA5 still works).