X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=book.c;h=89ac6103de0a53c2f2c182c37b886f78d36b3da6;hb=faf7933d96193d30d052f2e75a0271c4309d965b;hp=ec3f543809e04e0ff5a53fd469016cd531b5635f;hpb=843777bb3395730392eea2e54c0dd4aae5e019ac;p=xboard.git diff --git a/book.c b/book.c index ec3f543..89ac610 100644 --- a/book.c +++ b/book.c @@ -792,6 +792,7 @@ DisplayBook (int moveNr) p = MovesToText(count, entries); EditTagsPopUp(p, NULL); free(p); + addToBookFlag = FALSE; return TRUE; } @@ -984,6 +985,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;