ports/cad/jspice3/files/patch-src_lib_plot_postsc.c
John Marino 643f83a81d Stage cad/jspice3 and unbreak on FreeBSD 10+
It would have been easy just to set this to "USE_GCC=any" to fix it,
but the code had plenty of undefined returns when a type was expected.
Using clang exposed those problems.  Hopefully I defined the missing
return values correctly.
2014-08-18 08:32:20 +00:00

26 lines
627 B
C

--- src/lib/plot/postsc.c.orig 1997-03-21 22:03:37.000000000 +0000
+++ src/lib/plot/postsc.c
@@ -343,12 +343,12 @@ int linestyleid;
get it when PS_Text restores a -1 linestyle */
if (linestyleid == -1) {
currentgraph->linestyle = -1;
- return;
+ return (0);
}
if (linestyleid < 0) {
internalerror("bad linestyleid");
- return;
+ return (0);
}
if (linestyleid > dispdev->numlinestyles)
@@ -407,7 +407,7 @@ int x, y, Xform;
if (Xform == (char)0) {
PS_Text(text,x,y);
- return;
+ return (0);
}
s = tbuf;