Page 1 of 1

Xboard match result outout

PostPosted: 11 May 2012, 19:49
by F. Bluemers
xboard emits the match result to stderr (like "xboard: match x vs. y final score: 1-0-0')
Is it possible to add this "feature"* to winboard,
It's very handy with clop.No need to parse a pgn for a result


Best
Fonzy

*It throws out a bit more with -debug.
Must have been used as a debugging aid.

Re: Xboard match result outout

PostPosted: 12 May 2012, 22:25
by H.G.Muller
The problem is that in WinBoard stderr (or stdout, etc.) is not open.

In XBoard stdin / stdout / stderr remain open, and associated with the terminal window from which you launched XBoard. This terminal is then also used as ICS interaction window. I think XBoard prints the result in the terminal because DisplayFatalError is used to display the result in a popup window. (Older versions used to always exit after finishing a match.) But DisplayFatalError also prints to the standard output, because some fatal errors can occur before the X-Windows stuff is initialized (e.g. during parsing of the command-line options), and at this time popups do not work yet. So then the terminal is the only place where the user can see the error message. (In WinBoard popups work from the very start, probably because it is compiled as a GUI application.)

Re: Xboard match result outout

PostPosted: 12 May 2012, 22:45
by F. Bluemers
H.G.Muller wrote:The problem is that in WinBoard stderr (or stdout, etc.) is not open.

In XBoard stdin / stdout / stderr remain open, and associated with the terminal window from which you launched XBoard. This terminal is then also used as ICS interaction window. I think XBoard prints the result in the terminal because DisplayFatalError is used to display the result in a popup window. (Older versions used to always exit after finishing a match.) But DisplayFatalError also prints to the standard output, because some fatal errors can occur before the X-Windows stuff is initialized (e.g. during parsing of the command-line options), and at this time popups do not work yet. So then the terminal is the only place where the user can see the error message. (In WinBoard popups work from the very start, probably because it is compiled as a GUI application.)

Thanks for clarifying.
Maybe its an idea to add an option to xboard and winboard to dump the matchresult in a file(name=commandline option).
No need then to rely on DisplayFatalError sideeffects.