X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=ee2ba94c300612fd779b85ae84222b4e27e669ab;hb=2f87a1e662ed6f7d958d11fa78eff9aa1708a390;hp=c6ef883753790685476767f4c0cb7629822934a4;hpb=5f05bf2e58fab151886184643c75f9d9b677b0a3;p=xboard.git diff --git a/xboard.c b/xboard.c index c6ef883..ee2ba94 100644 --- a/xboard.c +++ b/xboard.c @@ -1347,7 +1347,7 @@ XtResource clientResources[] = { XtRImmediate, (XtPointer) "xboard.debug"}, { "engineDebugOutput", "engineDebugOutput", XtRInt, sizeof(int), XtOffset(AppDataPtr, engineComments), - XtRImmediate, (XtPointer) 0}, + XtRImmediate, (XtPointer) 1}, { "noGUI", "noGUI", XtRBoolean, sizeof(Boolean), XtOffset(AppDataPtr, noGUI), XtRImmediate, (XtPointer) 0}, @@ -1404,6 +1404,9 @@ XtResource clientResources[] = { { "keepAlive", "keepAlive", XtRInt, sizeof(int), XtOffset(AppDataPtr, keepAlive), XtRImmediate, (XtPointer) 0}, + { "forceIllegalMoves", "forceIllegalMoves", XtRBoolean, + sizeof(Boolean), XtOffset(AppDataPtr, forceIllegal), + XtRImmediate, (XtPointer) False}, }; XrmOptionDescRec shellOptions[] = { @@ -1772,6 +1775,7 @@ XrmOptionDescRec shellOptions[] = { { "-firstNeedsNoncompliantFEN", "firstNeedsNoncompliantFEN", XrmoptionSepArg, NULL }, { "-secondNeedsNoncompliantFEN", "secondNeedsNoncompliantFEN", XrmoptionSepArg, NULL }, { "-keepAlive", "keepAlive", XrmoptionSepArg, NULL }, + { "-forceIllegalMoves", "forceIllegalMoves", XrmoptionNoArg, "True" }, }; @@ -7641,19 +7645,34 @@ void Iconify(w, event, prms, nprms) void DisplayMessage(message, extMessage) char *message, *extMessage; { - char buf[MSG_SIZ]; - Arg arg; - - if (extMessage) { - if (*message) { - snprintf(buf, sizeof(buf), "%s %s", message, extMessage); - message = buf; - } else { - message = extMessage; - } - } - XtSetArg(arg, XtNlabel, message); - XtSetValues(messageWidget, &arg, 1); + /* display a message in the message widget */ + + char buf[MSG_SIZ]; + Arg arg; + + if (extMessage) + { + if (*message) + { + snprintf(buf, sizeof(buf), "%s %s", message, extMessage); + message = buf; + } + else + { + message = extMessage; + }; + }; + + /* need to test if messageWidget already exists, since this function + can also be called during the startup, if for example a Xresource + is not set up correctly */ + if(messageWidget) + { + XtSetArg(arg, XtNlabel, message); + XtSetValues(messageWidget, &arg, 1); + }; + + return; } void DisplayTitle(text) @@ -9490,4 +9509,4 @@ SetProgramStats( FrontEndProgramStats * stats ) // [HR] TODO // [HGM] done, but perhaps backend should call this directly? EngineOutputUpdate( stats ); -} \ No newline at end of file +}