delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/13/12:17:13

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199706131612.AA175428379@typhoon.rose.hp.com>
Subject: Re: environment variables
To: max AT alcyone DOT com (Erik Max Francis)
Date: Fri, 13 Jun 1997 9:12:59 PDT
Cc: djgpp AT delorie DOT com
In-Reply-To: <33A01B95.61A9E85F@alcyone.com>; from "Erik Max Francis" at Jun 12, 97 8:53 am

> If memory servers, Turbo/Borland C++ at one point (and may well still)
> used a third argument, char *envp[] (the name is of course irrelevant), to
> represent the environment variables.  As you correctly point out, this is
> non ANSI C and will not work in other compilers.

It is non-ansi C, but it is also fairly common.  DJGPP supports
it even.  If you look in crt1.c, when main is called it is 
passed 3 arguments.  The third being environ. 

Andrew

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019