Date: Sun, 13 Jun 1999 12:01:28 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Johan Venter cc: djgpp AT delorie DOT com Subject: Re: djgpp.env parser In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 13 Jun 1999, Johan Venter wrote: > I'm looking for the source file that contains the djgpp.env parser (ie the code that opens > the djgpp.env file and adds all the variables to the environment, while parsing the > modifiers, like /, :, \, > etc...) The source of this is in the djlsr202.zip archive, file name src/libc/crt0/c1loadef.c. > Also, can someone explain to me how the sections work? What I mean is how are the sections > like [gcc] and [cpp] parsed? Are they done only at the time that those programs are run? The function that parses the environment file runs as part of the startup code, yes. The syntax of the file is described in the kb.info file (type "info know hidden djgpp" from the DOS prompt and read there). Basically, the code looks at argv[0] and then searches for the "[prog]" string in DJGPP.ENV, where `prog' is what argv[0] contains, after removing leading directories and the .exe extension. > My way, when done, will require the user only to set one environment variable in their > autoexec.bat: > > SET RSXNTDJ = C:\RSXNTDJ\rsxntdj.env > > That's it, everything else will be done in that file, and all will be well in directory > land :-) Perhaps it is much better to add RSXNT-specific settings to the stock DJGPP.ENV that is distributed with djdevNNN.zip? This way, users won't need to add anything at all, and you will be spared extra work. If doing that requires to add some features to the syntax of DJGPP.ENV, perhaps you could explain what features are missing now (assuming you have read the docs mentioned above and didn't find anything appropriate), and we could consider adding these feature to a future version of DJGPP.