|
From: Daniel J S. <dan...@ie...> - 2003-11-25 15:33:28
|
Petr Mikulik wrote: >>>Man page of tmpnam() and of tempnam() says: >>> Never use this function. Use mkstemp(3) instead. >>> >>>Is there any safe and portable way to create a file in a temporary >>>directory, like /tmp or C:\TMP? >>> >>> >><stdio.h>: FILE *tmpfile(void) >> >> > >Unfortunately this does not provide name of the file which I could use in > plot 'tmp_file1' > save set 'tmp_file2' > An alternative if these temp files are not too big might be to slightly alter the "datafile.c" so that it doesn't necessarily need to read from a file stream but can instead read from some internal memory stream. That way you could temporarily put memory on the heap and not have to deal with files... or the equivalent, some type of mechanism to generate an arbitrary function mapping points from one set to another set that you can plot without having to use a datafile but rather a function... or, could datafile.c be rewritten so that the name of the file is not needed, just the FILE *. That is, there is already a special case '-'. Maybe there is something simple to do there. Dan |