openbsd-ports/games/wmminichess/patches/patch-chess_c
2002-02-26 13:26:21 +00:00

32 lines
815 B
Plaintext

$OpenBSD: patch-chess_c,v 1.2 2002/02/26 13:26:21 wilfried Exp $
--- chess.c.orig Mon Sep 13 19:15:50 1999
+++ chess.c Tue Feb 26 14:20:47 2002
@@ -1864,7 +1864,8 @@ void textGame
/* get the move from stdin */
bzero(move, 10);
printf(" > ");
- fgets(move, 10, stdin);
+ if(!fgets(move, 10, stdin))
+ strcpy(move, Q);
#ifdef DEBUG
if (strncasecmp(move, "gch", 3) == 0)
@@ -1972,7 +1973,7 @@ int checkColor
*
* RETURNS: N/A
*/
-void main(int argc, char* argv[])
+int main(int argc, char* argv[])
{
int toChild[2];
int fromChild[2];
@@ -1986,7 +1987,7 @@ void main(int argc, char* argv[])
char * timer;
char ** valid;
char * pTemp;
- char ch;
+ int ch;
char * color;
/* set up the default colors in the xpm */