openbsd-ports/math/plplot/patches/patch-drivers_pstex_c
steven 8d41b59cd3 import plplot 5.6.0
PLplot is a library of functions that are useful for making scientific
plots. PLplot can be used from within compiled languages such as C, C++,
Fortran and Java, and interactively from interpreted languages such as
Octave, Python, Perl and Tcl.

The PLplot library can be used to create standard x-y plots, semilog
plots, log-log plots, contour plots, 3D surface plots, mesh plots,
bar charts and pie charts. Multiple graphs (of the same or different
sizes) may be placed on a single page with multiple lines in each
graph.

some initial work by Matthias Kilian.
thanks to the people who tested this.
2006-05-12 13:35:38 +00:00

26 lines
649 B
Plaintext

$OpenBSD: patch-drivers_pstex_c,v 1.1.1.1 2006/05/12 13:35:39 steven Exp $
--- drivers/pstex.c.orig Mon Jan 19 20:10:19 2004
+++ drivers/pstex.c Mon Apr 17 01:34:40 2006
@@ -229,7 +229,8 @@ proc_str (PLStream *pls, EscText *args)
fprintf(fp,"\\special{ps: 0 0 0 setrgbcolor}{");
fprintf(fp,"%% Your text follows:\n");
- fprintf(fp,"%s\n", cptr);
+ if (strlen(cptr) > 0)
+ fprintf(fp,"%s\n", cptr);
fprintf(fp,"}}}}");
/*
@@ -260,6 +261,11 @@ parse_str(const char *str, char *dest)
"psi", "Psi", "omega", "Omega"};
plgesc(&esc);
+
+ if (str == NULL) {
+ *tp = '\0';
+ return;
+ }
while (*str) {