X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xengineoutput.c;h=5ef6f0fc59b54c8fb801ee80cfcd26e57246169d;hb=add17fd2668118b7c00fa0cb7065b8c34836d886;hp=0ce019be2e7ce73c373bca6ed8500db562e1e121;hpb=8735ad4bc9c3438d1df66f02809554109e950db3;p=xboard.git diff --git a/xengineoutput.c b/xengineoutput.c index 0ce019b..5ef6f0f 100644 --- a/xengineoutput.c +++ b/xengineoutput.c @@ -5,7 +5,7 @@ * * Copyright 2005 Alessandro Scotti * - * Enhancements Copyright 2009 Free Software Foundation, Inc. + * Enhancements Copyright 2009, 2010 Free Software Foundation, Inc. * * ------------------------------------------------------------------------ * @@ -230,6 +230,10 @@ static void InsertIntoMemo( int which, char * text ) { Arg arg; XawTextBlock t; Widget edit; + /* the backend adds \r\n, which is needed for winboard, + * for xboard we delete them again over here */ + if(t.ptr = strchr(text, '\r')) *t.ptr = ' '; + t.ptr = text; t.firstPos = 0; t.length = strlen(text); t.format = XawFmt8Bit; edit = XtNameToWidget(engineOutputShell, which ? "*form2.text" : "*form.text"); XawTextReplace(edit, 0, 0, &t); @@ -381,7 +385,11 @@ Widget EngineOutputCreate(name, text) j = 0; XtSetArg(args[j], XtNresizable, True); j++; shell = +#if TOPLEVEL + XtCreatePopupShell(name, topLevelShellWidgetClass, +#else XtCreatePopupShell(name, transientShellWidgetClass, +#endif shellWidget, args, j); layout = XtCreateManagedWidget(layoutName, formWidgetClass, shell, @@ -847,7 +855,8 @@ static void UpdateControls( EngineOutputData * ed ) strncpy( mov, ed->hint, sizeof(mov) ); mov[ sizeof(mov)-1 ] = '\0'; - sprintf( buf, "%d/%d: %s [%02d:%02d:%02d]", ed->an_move_index, ed->an_move_count, mov, time_mins / 60, time_mins % 60, time_secs % 60 ); + sprintf( buf, "[%d] %d/%d: %s [%02d:%02d:%02d]", ed->depth, ed->an_move_index, + ed->an_move_count, mov, time_mins / 60, time_mins % 60, time_secs % 60 ); } SetEngineState( ed->which, STATE_ANALYZING, buf );