Improve variant recognition from PGN Event tag
authorH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 19 Nov 2025 20:40:37 +0000 (21:40 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 19 Nov 2025 20:47:34 +0000 (21:47 +0100)
commitb72ccfb1ceec5a63d41edc4aadec91577bb891aa
tree6b8f946f1cdf8b4ee1c80c6e147bd220c5f81007
parent67930174b43e8e36217cd6e7b67433c06ff22a94
Improve variant recognition from PGN Event tag

Before the Variant tag was invented XBoard extracted the variant name
from the Event tag, and ICS still use this method. The recognition was
too liberal, though, as any occurence of w or wild followed by a number
would be taken as an ICS 'wild' variant. Now we check at least whether
the suspected variant name is not part of a larger word: it must be
preceded by a space, or be at the start of the tag's value string.
  This is also applied to strings that indicate FRC.
backend.c