Xref: utzoo comp.sys.ibm.pc:16944 comp.lang.c:11126 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!husc6!cmcl2!phri!dasys1!tneff From: tneff@dasys1.UUCP (Tom Neff) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: Re: MSC V5.x, tempnam function gotcha Summary: a detail Message-ID: <5348@dasys1.UUCP> Date: 5 Jul 88 20:19:52 GMT References: <250@optilink.UUCP> Reply-To: tneff@dasys1.UUCP (Tom Neff) Organization: Independent Users Guild Lines: 23 Clayton Cramer points out that the MSC5.x 'tempnam' function doesn't recognize an environment variable of the form 'TMP=e:' -- it requires the trailing backslash, as in 'TMP=e:\'. Perhaps the MSC RTL people were being a tad literal-minded here, but I ought to point out that in DOS parlance, "e:" is NOT a unique and invariable directory specification -- in particular it does NOT mean the root directory of the disk in the E drive. What it means is the *current* directory selected on the disk in the E drive. This can change with every CHDIR command and chdir() call. MS-DOS retains a separate "current directory" for every disk drive attached. If a path specification does not include a leading backslash (after any drive identifier), DOS will attempt to base the path from the current directory on the specified (or default) drive. The MSC folks probably decided that only an invariant, absolute path spec was suitable for what they wanted to do with the TMP variable. Reasonable people might disagree on this, but I don't think they are completely in left field. -- Tom Neff UUCP: ...!cmcl2!phri!dasys1!tneff "None of your toys CIS: 76556,2536 MCI: TNEFF will function..." GEnie: TOMNEFF BIX: t.neff (no kidding)