From mipos3!intelca!oliveb!pyramid!decwrl!decvax!tektronix!tekgen!tekred!games-request Wed Jul 8 07:24:44 PDT 1987 Article 26 of comp.sources.games: Path: td2cad!mipos3!intelca!oliveb!pyramid!decwrl!decvax!tektronix!tekgen!tekred!games-request From: games-request@tekred.TEK.COM Newsgroups: comp.sources.games Subject: v01i079: kriegspiel - A chess variant, Patch1 Message-ID: <1376@tekred.TEK.COM> Date: 6 Jul 87 17:20:37 GMT Sender: billr@tekred.TEK.COM Lines: 89 Approved: billr@tekred.TEK.COM Submitted by: Steve Schoch Comp.sources.games: Volume 1, Issue 79 Archive-name: kriegspiel/Patch1 [This is an official patch from the author. -br] [After my game was posted, I got some bug reports about some stuff I used from 4.3 BSD that is not in 4.2 BSD, Ultrix, or Sun's OS. Here is a diff to make xks compile under 4.2.] *** movecycle.c.old Thu Jul 2 11:10:39 1987 --- movecycle.c Thu Jul 2 11:13:38 1987 *************** *** 7,13 **** #ifdef XKS movecycle() { ! fd_set readfds, fds; extern int sock; int n; --- 7,13 ---- #ifdef XKS movecycle() { ! auto int readfds, fds; extern int sock; int n; *************** *** 14,27 **** XSelectInput(window, ExposeWindow | ExposeRegion | ButtonPressed | ButtonReleased | LeaveWindow | LeftDownMotion | KeyPressed); ! FD_ZERO(&fds); ! FD_SET(dpyno(), &fds); ! FD_SET(sock, &fds); for(;;) { while (XPending()) handle_input(); readfds = fds; ! n = select(FD_SETSIZE, &readfds, 0, 0, 0); if (n < 0) { if (errno == EINTR) continue; --- 14,25 ---- XSelectInput(window, ExposeWindow | ExposeRegion | ButtonPressed | ButtonReleased | LeaveWindow | LeftDownMotion | KeyPressed); ! fds = 1<