|
From: Ethan M. <merritt@u.washington.edu> - 2009-02-03 03:23:31
|
On Monday 02 February 2009 16:50:55 Tait wrote:
> > > Further I have noticed `pwd` command from shell is needed to set a variable
> > > for the current working directory because
> > > gnuplot> pwd
> > > just prints it to screen, but I cannot do
> > > a=pwd
> > > or a=eval pwd
> >
> > The "pwd" command from the shell is needed in any case. It is only a matter
> > of whether it is called directly or called via the internal routine pwd_command().
> > I would do
> > a = system("pwd")
>
> gnuplot> a=system("pwd")
> warning: system evaluation not supported by MS-Windows 32 bit
> gnuplot> pwd
> C:\Program Files\gnuplot\bin
> gnuplot>
>
> So there is a need for something portable, and it's not system("pwd").
Huh. I did not know that.
So the windows code does not support the system() command?
Can that be fixed?
It seems to me that's a more serious issue than the details
of how best to query the current working directory.
> > I don't know. I don't think that the concept of "current working directory"
> > is universally portable even apart from how you would issue the command.
> > In VMS, for example, the current directory name and the current disk are
> > separate things. Just asking for the current directory would not tell you
> > what disk you would be writing to.
>
> In Windows, the drive is given as part of pwd, so it would make sense,
> I think, to emulate the same behavior in VMS and return the full path,
> diskname$foo:[path.to.dir].
I can see that the configuration tool does set HAVE_GETCWD for VMS, but
I don't currently have a VMS system to check on what exactly it returns.
--
Ethan A Merritt
|