freebsd-ports/cad/spice/files/patch-src_lib_fte_doplot_c
Maho Nakata 43801110c6 1. REAL cleaning on this port. The files dir is now organized so the
port can be maintained: previously there were multifile patches and several
patches for the same file, now it is a lot cleaner.

2. I also merged a memory leak fix and some fixes from
spice3f5-spaghetti.

4. MFB and removed GNUREADLINE support

5. honor CFLAGS and CC.

6. Add documentation.

7. Maho didn't change the name of port spice to spice3.
because spice4 might :) appear in the future. version number
should be listed on *only* PORTVERSION.

8. drom maintainership

PR:		54603
Submitted by:	"Pedro F. Giffuni" <giffunip@yahoo.com>
2003-07-19 03:13:48 +00:00

36 lines
1.1 KiB
Text

--- src/lib/fte/doplot.c.orig Sun Apr 25 23:48:45 1993
+++ src/lib/fte/doplot.c Mon Feb 26 18:03:20 2001
@@ -117,7 +117,7 @@
}
if (!cp_getvar("hcopydevtype", VT_STRING, buf)) {
- devtype = "plot5";
+ devtype = "postscript";
} else {
devtype = buf;
}
@@ -147,10 +147,23 @@
DevSwitch(NULL);
return;
}
+ /*
+ * Since the hardcopy output routines rely on currentgraph
+ * being set, we need to set it to our tempgraph. Note
+ * that DevSwitch(NULL) causes the Close() function of the
+ * hardcopy device to be called which will in turn
+ * finalize the output, thus still needs a valid
+ * currentgraph. For that reason, we may only pop the
+ * context after calling it, and likewise we should not
+ * destroy the tempgraph until the hardcopy device has
+ * been closed.
+ */
+ PushGraphContext(tempgraph);
gr_resize(tempgraph);
gr_redraw(tempgraph);
- DestroyGraph(tempgraph->graphid);
DevSwitch(NULL);
+ PopGraphContext();
+ DestroyGraph(tempgraph->graphid);
foundit = 1;
}
}