Allow popup-less (fatal) exit of engine after tellusererror
[xboard.git] / xengineoutput.c
index f7f5638..10c59bf 100644 (file)
@@ -115,7 +115,6 @@ int  EngineOutputIsUp();
 void SetEngineColorIcon( int which );
 
 /* Imports from backend.c */
-char * SavePart(char *str);
 extern int opponentKibitzes;
 
 /* Imports from xboard.c */
@@ -184,6 +183,10 @@ void InsertIntoMemo( int which, char * text, int where )
 {
        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, where, where, &t);