screenGeometry.bottom = screenGeometry.top + screenHeight;\r
}\r
\r
+ChessProgramState broadcast;\r
+\r
BOOL\r
InitInstance(HINSTANCE hInstance, int nCmdShow, LPSTR lpCmdLine)\r
{\r
appData.ringBellAfterMoves = TRUE;\r
}\r
if (appData.debugMode) {\r
- debugFP = fopen(appData.nameOfDebugFile, "w");\r
+ char *c = appData.nameOfDebugFile;\r
+ if(strstr(c, "///") == c) {\r
+ broadcast.which = "broadcaster";\r
+ broadcast.pr = NoProc;\r
+ broadcast.isr = NULL;\r
+ broadcast.prog = c + 3;\r
+ broadcast.dir = ".";\r
+ broadcast.host = "localhost";\r
+ StartChessProgram(&broadcast);\r
+ debugFP = (FILE*) _fdopen(_open_osfhandle((long)(((ChildProc*)(broadcast.pr))->hTo), _O_WRONLY), "w");\r
+ } else\r
+ debugFP = fopen(c, "w");\r
setbuf(debugFP, NULL);\r
}\r
\r