1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-15 23:50:44 +00:00
freebsd-ports/games/yahtzee/files/patch-ac
Thomas Gellekum d8df56cea7 Import a yahtzee port.
PR:		4026
Submitted by:	Joel Sutton <sutton@aardvark.apana.org.au>
1997-07-04 09:36:41 +00:00

49 lines
1.0 KiB
Plaintext

--- main.c.orig Sat Jan 25 19:41:13 1992
+++ main.c Fri Jul 4 13:39:01 1997
@@ -12,7 +12,7 @@
* (c)1992 by orest zborowski
*/
-static char *header = "Yahtzee Version 1.00 (c)1992 by zorst";
+static char *header = "Yahtzee Version 1.00p1 (c)1992 by zorst, FreeBSD port by Joel Sutton";
extern errno;
@@ -820,6 +820,7 @@
int i;
int topscore;
int winner;
+ char dummy[5];
for (;;)
{
@@ -844,7 +845,9 @@
winner = i;
}
- say("The winner is %s", players[winner].name);
+ say("The winner is %s. Press <enter> to continue...", players[winner].name);
+ fgets(dummy,5,stdin);
+ fflush(stdin);
}
#define L_LOCK 0
@@ -1117,7 +1120,8 @@
printf ("How many times to you wish to roll? ");
- gets(nrollstr);
+ fflush(stdin);
+ fgets(nrollstr, 10, stdin);
nroll = atoi(nrollstr);
printf("Generating...\n");
@@ -1270,6 +1274,7 @@
printf("How many computers to play (max of %d) ? ",
MAX_NUMBER_OF_PLAYERS - num_players);
fflush(stdout);
+ fpurge(stdin);
fgets(num, sizeof(num), stdin);