Fix buffer overflow in parser

When a line ended with a comment, the parser had to read a line ahead
to check if there was a PGNresult following, without being able to
throw away the previous line yet. This could lead to buffer overflow
in a long game where every line ended in a comment. The buffer now is
cleansed of already parsed data when starting on a new syntactical unit.
Fix adjudication of Giveaway stalemates

The case where the side-to-move would win by stalemate was not treated
in the Adjudicate switch.
Fix node count range

The node count was still clipped to 32 bit because one of the structs
it passes through (FrontEndProgramStats) had the nodes field declared
as an unsigned long.
WinBoard multi-monitor support

A patch provided by Tim Kosse
Repair XBoard from node-count patch

u64 was #defined in backend.h, which unfortunately was almost alwats
(Not sure why WinBoard did not suffer from this!) This, and related
definitions have now been moved to common.h (which is always #included
first).
Repair FRC A-side castling legality testing

XBoard allowed A-side castling when a rook started on the a-file,
and the b-file was blocked.
Allow castling and e.p. to be edited in opening book
Remove width limiting of shuffle checkbox
Widen Xaw text entries for larger square sizes

Presumably people will use larger fonts if they use larger board squares.
(And in any case te default fonts would be larger.) This means they need
more space to see what is the current value of text options.
Fix Xaw file-browser New Directory

Prevent people from using the error messages that will be printed here
as directory name by pressing New Directory a second time after first
pressing it with an empty or existing name.
Fix packing of FRC castlings

The routine for packing moves to the internal database format was not
working for FRC castlings, totally messing up position search for FRC
and CRC.
Make filler variant button inactive
Fix sorting of lines in Engine Output

Lines tat were fail-lows or fail-ighs should get the scores on the basis
of wich they are sorted corrected to that of te line (for the same move)
superceding them, so that other moves can rise to above them, when they
score higher than the corrected score.
Improve Edit Position mode

Clear Board now cycles trough boards:
current -> empty -> some pieces -> all pieces -> current
were 'some pieces' sows every piece type once (ad no Pawns), while
'all pieces' is the stadard opening position. In the end you get the
position that was erased back (to recover from accidental erasure).
Clear memory of erased position on variant switch

The Edit Position clear-board cycle would go from initial position to
last-erased position (if this is different), but the latter could have been
from another variant. In wich case we also want to clear.
  also print a message to alert people to the fact that they can click the
clock again to restore the position.
Automatically adapt board format to FEN

In some situations (such as loading a game or poition) the board-size
overrules are directly set to the values that can be deduced from the FEN.
The routine ParseFEN() has an extra parameter autoSize to control that.
Increase number of piece types to 44

SVG pieces are added for implementing Chu Shogi; the promoted versions for
Chu are offset by 22 rather than the usual 11.
Implement Chu Shogi

Chu Shogi is added as a new variant, usig the extended piece set.
Implement Lion double-moves. Apart from a from- and a to-square, each move
now also has a kill square (all represented by X and Y coordinate). This
is set on receiving a pair of partial moves (and passed around as a global;
sorry about that). MakeMove uses the kill-square to remove an extra piece,
and append it as ";SQUARE" to the long-algebraic move. SendMoveToProgram()
converts this back to a double move of the Alien protocol (two comma-separated
long-algebraic moves, stepping via SQUARE).
  For user input, releasing or to-clicking on a cyan square sets the kill-
square, and sends a lift command to prompt the engine for the markers for
the second leg. The to-click of this second leg then determines the to-square.
Fix hover event

HoverEvent was relying on highlight-dragging to detect if the mouse pointer
entered a new square, but on XBoard highlight dragging is sick. Now the
routine remembers the previous mouse position independent of the highlights.
To detect if we are in the starting square, it looks for change of the
from-square, in which case it fakes (first) entry of the current square
(where it saves marker state, so it can be restored after we leave the
square again, in case the engine saw fit to respond to the hover command).
Fix sweep promotions