cross compilier working
[xboard.git] / xboard.c
index af116f0..3698728 100644 (file)
--- a/xboard.c
+++ b/xboard.c
@@ -1873,6 +1873,7 @@ main(argc, argv)
 #ifdef ENABLE_NLS
     XtSetLanguageProc(NULL, NULL, NULL);
     bindtextdomain(PRODUCT, LOCALEDIR);
+    bind_textdomain_codeset(PRODUCT, "UTF-8");
     textdomain(PRODUCT);
 #endif
 
@@ -1907,7 +1908,15 @@ main(argc, argv)
     XtGetApplicationResources(shellWidget, (XtPointer) &appData,
                              clientResources, XtNumber(clientResources),
                              NULL, 0);
-
+                             
+    if (appData.debugMode) {
+       if ((debugFP = fopen("xboard.debug", "w")) == NULL)  {
+          printf(_("Failed to open file xboard.debug \n"));
+          exit(errno);
+       }
+        setbuf(debugFP, NULL);
+    }
+    
 #if !HIGHDRAG
     /* This feature does not work; animation needs a rewrite */
     appData.highlightDragging = FALSE;
@@ -2553,6 +2562,8 @@ XBoard square size (hint): %d\n\
     }
 
     XtAppMainLoop(appContext);
+    if (appData.debugMode) fclose(debugFP);
+    
     return 0;
 }