|
|
|
@ -132,7 +132,7 @@ X11_Init(void) |
|
|
|
char *argv[2]; |
|
|
|
int argc = 2; |
|
|
|
|
|
|
|
if (cp_getvar("display", CP_STRING, buf)) { |
|
|
|
if (cp_getvar("display", CP_STRING, buf, sizeof(buf))) { |
|
|
|
displayname = buf; |
|
|
|
} else if (!(displayname = getenv("DISPLAY"))) { |
|
|
|
internalerror("Can't open X display."); |
|
|
|
@ -233,7 +233,7 @@ initcolors(GRAPH *graph) |
|
|
|
|
|
|
|
for (i = 0; i < xmaxcolors; i++) { |
|
|
|
(void) sprintf(buf, "color%d", i); |
|
|
|
if (!cp_getvar(buf, CP_STRING, colorstring)) |
|
|
|
if (!cp_getvar(buf, CP_STRING, colorstring, sizeof(colorstring))) |
|
|
|
(void) strcpy(colorstring, colornames[i]); |
|
|
|
if (!XAllocNamedColor(display, |
|
|
|
DefaultColormap(display, DefaultScreen(display)), |
|
|
|
@ -425,7 +425,7 @@ X11_NewViewport(GRAPH *graph) |
|
|
|
XtAddCallback(DEVDEP(graph).buttons[1], XtNcallback, hardcopy, graph); |
|
|
|
|
|
|
|
/* set up fonts */ |
|
|
|
if (!cp_getvar("xfont", CP_STRING, fontname)) |
|
|
|
if (!cp_getvar("xfont", CP_STRING, fontname, sizeof(fontname))) |
|
|
|
(void) strcpy(fontname, DEF_FONT); |
|
|
|
|
|
|
|
for (p = fontname; *p && *p <= ' '; p++) |
|
|
|
@ -529,7 +529,7 @@ X11_Arc(int x0, int y0, int radius, double theta, double delta_theta) |
|
|
|
{ |
|
|
|
int t1, t2; |
|
|
|
|
|
|
|
if (0 && !cp_getvar("x11lineararcs", CP_BOOL, NULL)) |
|
|
|
if (0 && !cp_getvar("x11lineararcs", CP_BOOL, NULL, 0)) |
|
|
|
linear_arc(x0, y0, radius, theta, delta_theta); |
|
|
|
|
|
|
|
if (DEVDEP(currentgraph).isopen) { |
|
|
|
@ -837,7 +837,7 @@ zoomin(GRAPH *graph) |
|
|
|
|
|
|
|
/* hack for Gordon Jacobs */ |
|
|
|
/* add to history list if plothistory is set */ |
|
|
|
if (cp_getvar("plothistory", CP_BOOL, NULL)) { |
|
|
|
if (cp_getvar("plothistory", CP_BOOL, NULL, 0)) { |
|
|
|
wl = cp_parse(buf); |
|
|
|
(void) cp_addhistent(cp_event++, wl); |
|
|
|
} |
|
|
|
|