X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xengineoutput.c;h=455453d6a2af7c6ef47a3ea6ce66bf28c9c6bd0b;hb=76d2f540a0bc0a54bbb2aba5e29d5412e7f2191c;hp=77d5bf31108026eb97c6b8e288c9d6d092b767dd;hpb=21b2748b7e01ca15af0c2dce7102df401dc2666f;p=xboard.git diff --git a/xengineoutput.c b/xengineoutput.c index 77d5bf3..455453d 100644 --- a/xengineoutput.c +++ b/xengineoutput.c @@ -188,9 +188,9 @@ typedef struct { int an_move_count; } EngineOutputData; -static int VerifyDisplayMode(); +static void VerifyDisplayMode(); static void UpdateControls( EngineOutputData * ed ); -static SetEngineState( int which, int state, char * state_data ); +static void SetEngineState( int which, int state, char * state_data ); void ReadIcon(char *pixData[], int iconNr) { @@ -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 @@ -570,7 +554,7 @@ void EngineOutputPopDown() // back end, due to front-end wrapper for SetWindowText, and new SetIcon arguments -static SetEngineState( int which, int state, char * state_data ) +static void SetEngineState( int which, int state, char * state_data ) { int x_which = 1 - which; @@ -661,7 +645,7 @@ void EngineOutputUpdate( FrontEndProgramStats * stats ) if( clearMemo ) DoClearMemo(which); /* Update */ - lastDepth[which] = depth; + lastDepth[which] = depth == 1 && ed.nodes == 0 ? 0 : depth; // [HGM] info-line kudge lastForwardMostMove[which] = forwardMostMove; if( ed.pv != 0 && ed.pv[0] == ' ' ) { @@ -756,7 +740,7 @@ static void SetDisplayMode( int mode ) } // pure back end -int VerifyDisplayMode() +void VerifyDisplayMode() { int mode; @@ -917,6 +901,7 @@ static void UpdateControls( EngineOutputData * ed ) sprintf( s_time, "%d:%02d.%02d", time_secs / 60, time_secs % 60, time_cent ); /* Put all together... */ + if(ed->nodes == 0 && ed->score == 0 && ed->time == 0) sprintf( buf, "%3d\t", ed->depth ); else sprintf( buf, "%3d %s %s\t%s\t", ed->depth, s_score, s_nodes, s_time ); /* Add PV */