|
From: <bma...@we...> - 2005-08-09 21:38:11
|
Currently tilde expansion of paths like "~/gnuplot.history" via gp_expand_tilde() on Windows 9x will fail unless the user sets the HOME environment variable. The string containing the path is left unchanged and does therefore not contain a valid path. This problem came up while I was working on the GNUPLOT_HISTORY patch (see SF). It applies to locating wgnuplot.ini as well as tilde expansion in "load/save" commands. I could think of different solutions: 1) Issue a warning that a certain functionality (e.g. saving of history) of gnuplot requires HOME to be set and do nothing if it is not. (I.e. don't load/save history.) 2) Use a default directory instead, where 'default' could be the current directory or the directory where gnuplot.exe resides. The first being more reasonable for "load/save" commands and the later for locating the history file and wgnuplot.ini. 3) Use a completely different approach to locate files on Windows and disable tilde expansion there as most users of that platform don't know that concept anyway. (No, this would not introduce a lot of #ifdefs. Only gp_expand_tilde would have to be modfied. What would be a good solution? Bastian |