From: "Chris A. Triebel" Newsgroups: comp.os.msdos.djgpp Subject: about setting enviroment variables (dos/4dos/bash) Date: Mon, 3 Feb 1997 08:49:33 -0500 Organization: University of New Hampshire - Durham, NH Lines: 30 Message-ID: NNTP-Posting-Host: sun4.iol.unh.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi, I was wondering, is it possible to set an enviroment variable in the parent shell using a djgpp program. I noted putenv() which states that it changes the program's variables, and setenv(). I had hoped setenv() would do this, but it seems like it only sets the program's env. Any help would be appreciated. Quick related topic: Does pushd and popd exist for DOS? I've tried a bunch freeware utilities off of simtelnet but they don't have the look and feel. I noticed that bash has builtin functions for that. If these exist and I can get a hold of them then my above question becomes curiousity. My above line of thought was to store the push/pop stack in an enviroment and manipulate it in my program. This seemed the easiest to manage. My other plan was to use a file which makes things a little more difficult to manage what with opening, reading/appending/deleting, appending and such. The advantage is that people who use a cdpath could easily store and restore this information. I have heard that 4dos has a pushd/popd kind of thing, I am only beginning to learn how to use 4dos effectively ... And as for bash I haven't quite got that configured properly, it seems that when I run vim I get trash on my screen ( wrong term setting ), and I am not familiar enough with bash, yet, to set it up properly. If anyone has any advice on this topic I would be appreciative, but I haven't done much in the way of research yet, so I won't ask more than that ... TIA cat