From 38fcbc993ebe30afcfd6a554cad85873fdd0f9c0 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sat, 16 Jul 2011 09:31:12 -0700 Subject: [PATCH] Revert "fixed segfault in xengineoutput", fixed in the backend now (from HGM) This reverts commit 33a0e73843115ff6d4eacaf963a38f2e8b20b295. --- engineoutput.c | 2 ++ xengineoutput.c | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/engineoutput.c b/engineoutput.c index 78117a7..0a4e46a 100644 --- a/engineoutput.c +++ b/engineoutput.c @@ -84,6 +84,8 @@ void MakeEngineOutputTitle() static char oldTitle[MSG_SIZ]; char *title = "Engine Output"; int count, rule = 2*appData.ruleMoves; + + if(!EngineOutputIsUp()) return; // figure out value of 50-move counter count = currentMove; while( (signed char)boards[count][EP_STATUS] <= EP_NONE && count > backwardMostMove ) count--; diff --git a/xengineoutput.c b/xengineoutput.c index 3c0921e..11b0695 100644 --- a/xengineoutput.c +++ b/xengineoutput.c @@ -112,7 +112,7 @@ void SetEngineColorIcon( int which ); Position engineOutputX = -1, engineOutputY = -1; Dimension engineOutputW, engineOutputH; -Widget engineOutputShell = NULL; +Widget engineOutputShell; static int engineOutputDialogUp; /* Module variables */ @@ -161,18 +161,17 @@ static void InitializeEngineOutput() void DoSetWindowText(int which, int field, char *s_label) { - Arg args[16]; + Arg arg; - XtSetArg(args[0], XtNlabel, (XtArgVal) s_label); - XtSetValues(outputField[which][field], args, 1); + XtSetArg(arg, XtNlabel, (XtArgVal) s_label); + XtSetValues(outputField[which][field], &arg, 1); } void SetEngineOutputTitle(char *title) { - Arg args[16]; - if(engineOutputShell==NULL) return; - XtSetArg(args[0], XtNtitle, (XtArgVal) title); - XtSetValues(engineOutputShell, args, 1); + Arg arg; + XtSetArg(arg, XtNtitle, (XtArgVal) title); + XtSetValues(engineOutputShell, &arg, 1); } void InsertIntoMemo( int which, char * text, int where ) -- 1.7.0.4