|
From: Petr M. <mi...@ph...> - 2006-03-09 20:33:40
|
>> What's the point of asking a question like "if fileexists", when >> there's nothing useful that could be done with the answer, that we > I simply don't believe that either of these functions does something that > gnuplot has to do, or even *can* do meaningfully. The fileexist() is a long time on my done list, I needed that several times, so finally decided to commit it. Some applications: number of fit files, availability of extracted experimental data files. This function is a good candidate for the group of string-related functions for the "strings" patch which has become part of gnuplot recently. Based on the discussion: it is fully sufficient to have fileexist() for testing whether the given file exist. Nothing more (no pipes, no loadpaths). Thus I still wish to commit it (unless there is really still big big opposition). > My preferred method of dealing with this issue is to handle > missing/empty files cleanly during the plotting process. Gnuplot support files with palettes as well. > Should I go ahead and apply the patch for 2D code, > which is after all a major category of use? Yes. >> Trimmed from lines 1240-1280 of datafile.c: >> ========================================================================= >> /* filename cannot be static array! */ >> gp_expand_tilde(&df_filename); > This line makes sense only for regular files and thus it should be moved > to just above the "stat" function. And this change should be committed too. --- PM |