delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/31/00:45:22

Message-ID: <3799E8EA.83585DA8@multimania.com>
From: Sylvain VIART <molo AT multimania DOT com>
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Setting DOS environment varible with C program and export it ?
Lines: 35
Date: Sat, 24 Jul 1999 16:25:04 GMT
NNTP-Posting-Host: 206.172.152.34
X-Trace: news20.bellglobal.com 932833504 206.172.152.34 (Sat, 24 Jul 1999 12:25:04 EDT)
NNTP-Posting-Date: Sat, 24 Jul 1999 12:25:04 EDT
Organization: Sympatico
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,

I'm writing CGI script in perl, and for debugging from command
line, under win95, I need to set some environment variable with
an equal sign inside its value. DOS seem to be unable to do such simple
thing. So I try to do it in C.

I use the standard function setenv() getenv(), but I can export what
is done during the program to the upper shell. Is there a way for doing
such thing ?

Currently, I've written a wrapper which set var and run the script
passed as argument or from a file...

What I want is to recreate a setenv command. So I just have to do :

setenv QUERY_STRING "pattern=HTML"

and the environment variable is updated (or created) to this new value.

Any idea ?
May be creating the var with batch file, and keeping modifications done
by the program...

Sylvain.
-- 
Sylvain VIART - Computer scientist - Programmer analyst
         -+= -------------------- * --------------------- =+-
             Editor : VIM - 5.3 Win32                   
	              VIM - 5.4o Linux
             OS     : Win95                             
                      Linux kernel 2.0.29 (Debian 1.3.1)
         -+= -------------------- * --------------------- =+-
Je suis présentement à Montréal
MAILTO:viarts AT jsp DOT umontreal DOT ca

- Raw text -


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