From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: How to read/modify environment variables? Date: Tue, 24 Jun 1997 19:44:18 +0000 Organization: Two pounds of chaos and a pinch of salt Lines: 21 Message-ID: <33B02392.4151@cs.com> References: <33B013CC DOT E452725B AT po DOT uni-stuttgart DOT de> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp102.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Martin Bernreuther wrote: > > I like to write a small tool to add a path to the PATH variable > only if it's not already in. > How can I get a hold of the environment variables? > Is there already a tool to do this? > Is there maybe a tool just to search a environment variable for > a string? getenv(). Look it up in the libc docs. See also its complement, putenv(). -- John M. Aldrich, aka Fighteer I -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>++ W++ N++ o+>++ K? w(---) O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+(++) tv+() b+++ DI++ D++ G>++ e(*)>++++ h!() !r !y+() ------END GEEK CODE BLOCK------