Author: Lukas Geyer Description: Adjust book locations (book.c). --- sjeng-11.2.orig/book.c +++ sjeng-11.2/book.c @@ -21,6 +21,8 @@ */ +#include + #include "sjeng.h" #include "protos.h" #include "extvars.h" @@ -38,6 +40,8 @@ #define book_solid 4 /* = */ #define book_murky 5 /* ?! */ +#define BOOK_PATH "/usr/share/games/sjeng/" + int init_book (void) { /* simply read all the book moves into a book array. The book will be @@ -63,27 +67,27 @@ if (Variant == Normal) { - if ((f_book = fopen ("normal.opn", "r")) == NULL) + if ((f_book = fopen (BOOK_PATH "normal.opn", "r")) == NULL) return FALSE; } else if (Variant == Crazyhouse) { - if ((f_book = fopen ("zh.opn", "r")) == NULL) + if ((f_book = fopen (BOOK_PATH "zh.opn", "r")) == NULL) return FALSE; } else if (Variant == Suicide) { - if ((f_book = fopen ("suicide.opn", "r")) == NULL) + if ((f_book = fopen (BOOK_PATH "suicide.opn", "r")) == NULL) return FALSE; } else if (Variant == Losers) { - if ((f_book = fopen ("losers.opn", "r")) == NULL) + if ((f_book = fopen (BOOK_PATH "losers.opn", "r")) == NULL) return FALSE; } else { - if ((f_book = fopen ("bug.opn", "r")) == NULL) + if ((f_book = fopen (BOOK_PATH "bug.opn", "r")) == NULL) return FALSE; }