2
==================================================================
3
--- src/plotone.c (revision 309)
4
+++ src/plotone.c (revision 312)
6
sprintf(print_file, "%s.%s", get_docbname(), dev.fext);
8
strcpy(fname, print_file);
9
+ prstream = grace_openw(fname);
14
if (s == NULL || s[0] == '\0') {
15
errmsg("No print command defined, output aborted");
19
- /* VMS doesn't like extensionless files */
20
- strcat(fname, ".prn");
21
+ strcpy(fname, "grace-hardcopy-XXXXXX");
22
+ hdfd=mkstemp(fname);
24
+ errmsg("Could not create a temporary file, output aborted.");
27
+ prstream = fdopen(hdfd, "wb");
28
+ if (prstream == NULL) {
29
+ errmsg("Could not create a temporary file, output aborted.");
34
- prstream = grace_openw(fname);
36
if (prstream == NULL) {
39
==================================================================
40
--- src/editpwin.c (revision 309)
41
+++ src/editpwin.c (revision 312)
44
void do_ext_editor(int gno, int setno)
46
- char *fname, ebuf[256];
47
+ char fname[64], ebuf[256];
51
- fname = tmpnam(NULL);
52
- cp = grace_openw(fname);
53
+ strcpy(fname, "grace-XXXXXX");
54
+ cp = fdopen(mkstemp(fname), "wb");