$NetBSD: patch-af,v 1.1 2000/10/15 01:53:41 jlam Exp $ --- main.c.orig Sat Oct 23 11:50:27 1999 +++ main.c @@ -277,6 +277,9 @@ 0x7F, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01 }; +char *booksrc = BOOKSRC; +char *bookbin = BOOKBIN; + int main (int argc, char *argv[]) { int compilebook = 0; @@ -302,8 +305,14 @@ SET (flags, XBOARD); } else if (strcmp(argv[i],"post") == 0) { SET (flags, POST); - } else if (strcmp(argv[i],"compile") == 0) + } else if (strcmp(argv[i],"compile") == 0) { compilebook++; + if (argc > 2) { + booksrc = argv[2]; + if (argc > 3) + bookbin = argv[3]; + } + } } } @@ -318,8 +327,14 @@ SET (flags, XBOARD); } else if (strcmp(argv[i],"post") == 0) { SET (flags, POST); - } else if (strcmp(argv[i],"compile") == 0) + } else if (strcmp(argv[i],"compile") == 0) { compilebook++; + if (argc > 2) { + booksrc = argv[2]; + if (argc > 3) + bookbin = argv[3]; + } + } } } @@ -327,8 +342,8 @@ bookfirstlast = 3; if (compilebook) { - unlink(BOOKBIN); - genbook(); + unlink(bookbin); + genbook(booksrc, bookbin); } else { while (!(flags & QUIT)) {