fixed segfaul in convert.c used to convert pixmaps
[xboard.git] / xengineoutput.c
index 6c640ea..0ce019b 100644 (file)
@@ -132,7 +132,7 @@ Pixmap icons[8]; // [HGM] this front-end array translates back-end icon indicato
 Widget outputField[2][7]; // [HGM] front-end array to translate output field to window handle
 
 void EngineOutputPopDown();
-void engineOutputPopUp(char *title, char *text);
+void engineOutputPopUp();
 int  EngineOutputIsUp();
 static void SetEngineColorIcon( int which );
 
@@ -349,13 +349,9 @@ void PositionControlSet(which, form, bw_width)
     XtSetArg(args[j], XtNright, XtChainRight);  j++;
     XtSetArg(args[j], XtNresizable, True);  j++;
     XtSetArg(args[j], XtNwidth, bw_width);  j++; /*force wider than buttons*/
-#if 0
-    XtSetArg(args[j], XtNscrollVertical, XawtextScrollWhenNeeded);  j++;
-#else
     /* !!Work around an apparent bug in XFree86 4.0.1 (X11R6.4.3) */
     XtSetArg(args[j], XtNscrollVertical, XawtextScrollAlways);  j++;
     XtSetArg(args[j], XtNscrollHorizontal, XawtextScrollWhenNeeded);  j++;
-#endif
 //    XtSetArg(args[j], XtNautoFill, True);  j++;
 //    XtSetArg(args[j], XtNwrap, XawtextWrapWord); j++;
     outputField[which][nMemo] = edit =
@@ -417,20 +413,8 @@ Widget EngineOutputCreate(name, text)
        Window junk;
        Dimension pw_height;
        Dimension ew_height;
-#if 0
-       j = 0;
-       XtSetArg(args[j], XtNheight, &ew_height);  j++;
-       XtGetValues(edit, args, j);
-
-       j = 0;
-       XtSetArg(args[j], XtNheight, &pw_height);  j++;
-       XtGetValues(shell, args, j);
-       engineOutputH = pw_height + (lines - 1) * ew_height;
-       engineOutputW = bw_width - 16;
-#else
        engineOutputH = bw_height/2;
        engineOutputW = bw_width-16;
-#endif
 
        XSync(xDisplay, False);
 #ifdef NOTDEF
@@ -499,12 +483,13 @@ void ResizeWindowControls(shell, mode)
     }
 }
 
-void EngineOutputPopUp(title, text)
-     char *title, *text;
+void 
+EngineOutputPopUp()
 {
     Arg args[16];
     int j;
     Widget edit;
+    static char *title = _("Engine output"), *text = _("This feature is experimental");
 
     if (engineOutputShell == NULL) {
        engineOutputShell =
@@ -953,7 +938,7 @@ EngineOutputProc(w, event, prms, nprms)
   if (engineOutputDialogUp) {
     EngineOutputPopDown();
   } else {
-    EngineOutputPopUp(_("engine output"),_("This feature is experimental"));
+    EngineOutputPopUp();
   }
 //  ToNrEvent(currentMove);
 }