X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=book.c;h=bb9d1703307249c4b2b654ddf6a689e46e545111;hb=f1549d478be5058606811dac414d79492d1ebe5c;hp=ec3f543809e04e0ff5a53fd469016cd531b5635f;hpb=d6fdb1cf4c1fa20af2648cfcde215e69ec23029a;p=xboard.git diff --git a/book.c b/book.c index ec3f543..bb9d170 100644 --- a/book.c +++ b/book.c @@ -984,6 +984,15 @@ AddGameToBook (int always) } void +PlayBookMove(char *text, int index) +{ + char *start = text+index, *end = start; + while(start > text && start[-1] != ' ' && start[-1] != '\t') start--; + while(*end && *++end != ' ' && *end != '\n'); *end = NULLCHAR; // find clicked word + if(start != end) TypeInDoneEvent(start); // fake it was typed in move type-in +} + +void FlushBook () { FILE *f;