| delorie.com/archives/browse.cgi | search |
| From: | "A. Sinan Unur" <asu1 AT c-o-r-n-e-l-l DOT edu> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | getenv problem |
| Date: | 16 Dec 2002 14:05:57 GMT |
| Organization: | Cornell University |
| Lines: | 43 |
| Sender: | asu1 AT cornell DOT invalid (on pool-141-149-208-61.syr.east.verizon.net) |
| Message-ID: | <Xns92E65C91B405Aasu1cornelledu@132.236.56.8> |
| References: | <atkeh5$1fh$1 AT c3p0 DOT cc DOT swin DOT edu DOT au> <Xns92E654D4AD5CAasu1cornelledu AT 132 DOT 236 DOT 56 DOT 8> |
| NNTP-Posting-Host: | pool-141-149-208-61.syr.east.verizon.net |
| X-Trace: | news01.cit.cornell.edu 1040047557 22178 141.149.208.61 (16 Dec 2002 14:05:57 GMT) |
| X-Complaints-To: | usenet AT news01 DOT cit DOT cornell DOT edu |
| NNTP-Posting-Date: | 16 Dec 2002 14:05:57 GMT |
| User-Agent: | Xnews/5.04.25 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
"A. Sinan Unur" <asu1 AT c-o-r-n-e-l-l DOT edu> wrote in
news:Xns92E654D4AD5CAasu1cornelledu AT 132 DOT 236 DOT 56 DOT 8:
> C:\Dload\misc>cat eee.c
> #include <stdio.h>
> #include <stdlib.h>
> #include <sys/stat.h>
>
> int main(void)
> {
> char fixed_path[FILENAME_MAX];
> puts(getenv("TEMP"));
> _fixpath(getenv("TEMP"), fixed_path);
> puts(fixed_path);
>
> return 0;
> }
>
>
> C:\Dload\misc>gcc -Wall eee.c -o eee.exe
>
> C:\Dload\misc>eee
> C:\WINDOWS\TEMP
> c:/WINDOWS/TEMP
I posted the above code in response to another problem. After posting, I
noticed that the string getenv returns for TEMP does not match the value
of TEMP on my system. Typing set shows:
TEMP=C:\DOCUME~1\asu1\LOCALS~1\Temp
TMP=C:\DOCUME~1\asu1\LOCALS~1\Temp
whereas getenv("TEMP") returns c:\windows\temp.
I am using XP Pro. I do have the v2.03 refresh distribution installed.
What might be the reason?
Sinan.
--
A. Sinan Unur
asu1 AT c-o-r-n-e-l-l DOT edu
Remove dashes for address
Spam bait: mailto:uce AT ftc DOT gov
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |