SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
34
math/grace/patches/patch-src_plotone_c
Normal file
34
math/grace/patches/patch-src_plotone_c
Normal file
|
@ -0,0 +1,34 @@
|
|||
--- src/plotone.c.orig Wed Feb 27 21:29:56 2002
|
||||
+++ src/plotone.c Mon Aug 26 11:11:08 2002
|
||||
@@ -113,7 +113,7 @@ void do_hardcopy(void)
|
||||
char fname[GR_MAXPATHLEN];
|
||||
view v;
|
||||
double vx, vy;
|
||||
- int truncated_out;
|
||||
+ int truncated_out, fd;
|
||||
|
||||
if (get_ptofile()) {
|
||||
if (print_file[0] == '\0') {
|
||||
@@ -127,12 +127,19 @@ void do_hardcopy(void)
|
||||
errmsg("No print command defined, output aborted");
|
||||
return;
|
||||
}
|
||||
- tmpnam(fname);
|
||||
+
|
||||
/* VMS doesn't like extensionless files */
|
||||
- strcat(fname, ".prn");
|
||||
+ strlcpy(fname, P_tmpdir, sizeof fname);
|
||||
+ strlcat(fname, "grace-XXXXXXXXXX.prn", sizeof fname);
|
||||
+ fd = mkstemps(fname, 4);
|
||||
+ if (fd == -1) {
|
||||
+ errmsg("Could not create tmp file.");
|
||||
+ return;
|
||||
+ } else
|
||||
+ close(fd);
|
||||
}
|
||||
|
||||
- prstream = grace_openw(fname);
|
||||
+ prstream = filter_write(fname);
|
||||
|
||||
if (prstream == NULL) {
|
||||
return;
|
Loading…
Add table
Add a link
Reference in a new issue