From: H.G.Muller Date: Sat, 6 Sep 2014 20:29:43 +0000 (+0200) Subject: Let Save Games as Book only use selected games X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=3d4f4c07067f9789ac9f74fa8208d6f91fc94848 Let Save Games as Book only use selected games The book-creation code now only takes games into account that are selected for display in the Game List. --- diff --git a/backend.c b/backend.c index f3f86c6..57775f3 100644 --- a/backend.c +++ b/backend.c @@ -15887,8 +15887,10 @@ CreateBookEvent () /* Get list size */ for (nItem = 1; nItem <= ((ListGame *) gameList.tailPred)->number; nItem++){ - LoadGame(f, nItem, "", TRUE); - AddGameToBook(TRUE); + if(lg->position >= 0) { + LoadGame(f, nItem, "", TRUE); + AddGameToBook(TRUE); + } lg = (ListGame *) lg->node.succ; } diff --git a/xboard.texi b/xboard.texi index 1c5fd43..bb72c65 100644 --- a/xboard.texi +++ b/xboard.texi @@ -337,7 +337,8 @@ human-readable format that is specific to XBoard. Both formats can be read back by the @samp{Load Position} command. @item Save Games as Book @cindex Save Games as Book, Menu Item -Creates an opening book from the currently loaded game file. +Creates an opening book from the currently loaded game file, +incorporating only the games currently selected in the Game List. The book will be saved on the file specified in the @samp{Common Engine} options dialog. The value of @samp{Book Depth} specified in that same dialog will @@ -346,7 +347,7 @@ the internal book buffer. This command can take a long time to process, and the size of the buffer is currently limited. At the end the buffer will be saved as a Polyglot book, -but the buffer will ot be cleared, +but the buffer will not be cleared, so that you can continue adding games from other game files. @item Mail Move @itemx Reload CMail Message