diff options
author | abs <abs> | 2001-02-04 11:32:34 +0000 |
---|---|---|
committer | abs <abs> | 2001-02-04 11:32:34 +0000 |
commit | 0a6c794e08aaa9b127b15f01d65b985e4ba9cb6d (patch) | |
tree | 75582a1af14e904d4ee4a804d9865045426fc477 /games/tscp | |
parent | 40616a277c27449a77a035fff86ac2704bb7698c (diff) | |
download | pkgsrc-0a6c794e08aaa9b127b15f01d65b985e4ba9cb6d.tar.gz |
Handle EOF as 'exit', rather than infinitely repeat last command.
Update to 1.71nb2
Diffstat (limited to 'games/tscp')
-rw-r--r-- | games/tscp/Makefile | 4 | ||||
-rw-r--r-- | games/tscp/files/patch-sum | 4 | ||||
-rw-r--r-- | games/tscp/patches/patch-aa | 24 |
3 files changed, 26 insertions, 6 deletions
diff --git a/games/tscp/Makefile b/games/tscp/Makefile index 133dccb83e4..f8c606863af 100644 --- a/games/tscp/Makefile +++ b/games/tscp/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2001/01/31 10:07:02 abs Exp $ +# $NetBSD: Makefile,v 1.3 2001/02/04 11:32:34 abs Exp $ # DISTNAME= tscp171 -PKGNAME= tscp-1.71nb1 +PKGNAME= tscp-1.71nb2 CATEGORIES= games benchmarks MASTER_SITES= http://ucsu.colorado.edu/~kerrigat/ EXTRACT_SUFX= .zip diff --git a/games/tscp/files/patch-sum b/games/tscp/files/patch-sum index 8df258b3212..c97928c4eb7 100644 --- a/games/tscp/files/patch-sum +++ b/games/tscp/files/patch-sum @@ -1,3 +1,3 @@ -$NetBSD: patch-sum,v 1.1 2001/01/31 10:07:03 abs Exp $ +$NetBSD: patch-sum,v 1.2 2001/02/04 11:32:35 abs Exp $ -MD5 (patch-aa) = 89a42d42292614132472b41fd10f626c +MD5 (patch-aa) = e7e9d919f32a094bba1722d5f5cd129b diff --git a/games/tscp/patches/patch-aa b/games/tscp/patches/patch-aa index 7c621a8d88b..28f1952733d 100644 --- a/games/tscp/patches/patch-aa +++ b/games/tscp/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.1 2001/01/31 10:07:03 abs Exp $ +$NetBSD: patch-aa,v 1.2 2001/02/04 11:32:35 abs Exp $ ---- main.c.orig Tue Jan 30 18:06:21 2001 +--- main.c.orig Thu Nov 30 19:28:18 2000 +++ main.c @@ -51,7 +51,7 @@ init(); @@ -11,3 +11,23 @@ $NetBSD: patch-aa,v 1.1 2001/01/31 10:07:03 abs Exp $ max_depth = 4; for (;;) { if (side == computer_side) { /* computer's turn */ +@@ -73,7 +73,8 @@ + + /* get user input */ + printf("tscp> "); +- scanf("%s", s); ++ if (scanf("%s", s) == EOF) ++ return 0; + if (!strcmp(s, "on")) { + computer_side = side; + continue; +@@ -279,7 +280,8 @@ + print_result(); + continue; + } +- fgets(line, 256, stdin); ++ if (!fgets(line, 256, stdin)) ++ return; + if (line[0] == '\n') + continue; + sscanf(line, "%s", command); |