Line
Link Here
|
0 |
-- src/plotone.c (revision 309) |
0 |
++ src/plotone.c (revision 312) |
Lines 121-138
Link Here
|
121 |
sprintf(print_file, "%s.%s", get_docbname(), dev.fext); |
121 |
sprintf(print_file, "%s.%s", get_docbname(), dev.fext); |
122 |
} |
122 |
} |
123 |
strcpy(fname, print_file); |
123 |
strcpy(fname, print_file); |
|
|
124 |
prstream = grace_openw(fname); |
124 |
} else { |
125 |
} else { |
|
|
126 |
int hdfd; |
125 |
s = get_print_cmd(); |
127 |
s = get_print_cmd(); |
126 |
if (s == NULL || s[0] == '\0') { |
128 |
if (s == NULL || s[0] == '\0') { |
127 |
errmsg("No print command defined, output aborted"); |
129 |
errmsg("No print command defined, output aborted"); |
128 |
return; |
130 |
return; |
129 |
} |
131 |
} |
130 |
tmpnam(fname); |
132 |
strcpy(fname, "grace-hardcopy-XXXXXX"); |
131 |
/* VMS doesn't like extensionless files */ |
133 |
hdfd=mkstemp(fname); |
132 |
strcat(fname, ".prn"); |
134 |
if (hdfd == -1) { |
|
|
135 |
errmsg("Could not create a temporary file, output aborted."); |
136 |
return; |
137 |
} |
138 |
prstream = fdopen(hdfd, "wb"); |
139 |
if (prstream == NULL) { |
140 |
errmsg("Could not create a temporary file, output aborted."); |
141 |
return; |
142 |
} |
133 |
} |
143 |
} |
134 |
|
144 |
|
135 |
prstream = grace_openw(fname); |
|
|
136 |
|
145 |
|
137 |
if (prstream == NULL) { |
146 |
if (prstream == NULL) { |
138 |
return; |
147 |
return; |
139 |
-- src/editpwin.c (revision 309) |
148 |
++ src/editpwin.c (revision 312) |
Lines 776-787
Link Here
|
776 |
*/ |
776 |
*/ |
777 |
void do_ext_editor(int gno, int setno) |
777 |
void do_ext_editor(int gno, int setno) |
778 |
{ |
778 |
{ |
779 |
char *fname, ebuf[256]; |
779 |
char fname[64], ebuf[256]; |
780 |
FILE *cp; |
780 |
FILE *cp; |
781 |
int save_autos; |
781 |
int save_autos; |
782 |
|
782 |
|
783 |
fname = tmpnam(NULL); |
783 |
strcpy(fname, "grace-XXXXXX"); |
784 |
cp = grace_openw(fname); |
784 |
cp = fdopen(mkstemp(fname), "wb"); |
785 |
if (cp == NULL) { |
785 |
if (cp == NULL) { |
786 |
} |
786 |
} |