Subject: Gnuplot
To: RiscBSD <port-arm32@NetBSD.ORG>
From: Patrick Welche <prlw1@cam.ac.uk>
List: port-arm32
Date: 07/16/1997 11:24:21
I just compiled the gnuplot pre 3.6 beta 330 source, and found (as for
the standard 3.5 distribution) that gplt_x11 died with a segmentation
fault. The error apparently is caused by the line
vis = DefaultVisual(dpy,scr);
and goes away if vis is declared locally rather than globally. Maybe
with the ?new compiler? in the ?new release? this arm32 specific
oddity will go away? Diff attached for your amusement.
Cheers,
Patrick
=======================================================================
*** gplt_x11.c.orig Mon Jul 14 22:41:22 1997
--- gplt_x11.c Mon Jul 14 22:49:06 1997
***************
*** 209,215 ****
Display *dpy;
int scr;
Window root;
- Visual *vis;
GC gc = (GC)0;
XFontStruct *font;
int do_raise=1, persist=0;
--- 209,214 ----
***************
*** 1179,1185 ****
EXIT(1);
}
scr = DefaultScreen(dpy);
- vis = DefaultVisual(dpy,scr);
D = DefaultDepth(dpy,scr);
root = DefaultRootWindow(dpy);
server_defaults = XResourceManagerString(dpy);
--- 1178,1183 ----
***************
*** 1296,1306 ****
--- 1294,1306 ----
Colormap cmap;
double intensity = -1;
int n;
+ Visual *vis;
pr_GetR(db, ".mono") && On(value.addr) && Mono++;
pr_GetR(db, ".gray") && On(value.addr) && Gray++;
pr_GetR(db, ".reverseVideo") && On(value.addr) && Rv++;
+ vis = DefaultVisual(dpy,scr);
if (!Gray && (vis->class == GrayScale || vis->class == StaticGray)) Mono++;
if (!Mono) {