billr@saab.CNA.TEK.COM (Bill Randle) (08/25/90)
Submitted-by: Robert Steven Glickstein <bobg+@andrew.cmu.edu> Posting-number: Volume 11, Issue 36 Archive-name: vcraps/Patch1 Patch-To: vcraps: Volume 11, Issue 34-35 [[This patch adds the '$' keystroke to the list of commands. '$' tallies up the players wagers and reports the total.]] #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: patches01 # Wrapped by billr@saab on Fri Aug 24 11:07:27 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'patches01' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'patches01'\" else echo shar: Extracting \"'patches01'\" \(2062 characters\) sed "s/^X//" >'patches01' <<'END_OF_FILE' X*** dist/vcraps.c Thu Aug 23 16:30:41 1990 X--- vcraps.c Thu Aug 23 16:25:29 1990 X*************** X*** 159,168 **** X Update(fullupdate); X bcopy(&Table, &OldTable, (sizeof(CrapsTable_t))); X fullupdate = 0; X! Prompt("Command [12345689abcdfhprtX?]:"); X wclear(commandwin); X wrefresh(commandwin); X! c = Getch("12345689abcdfhprtX?", 1); X switch (c) { X case '1': X Prompt("[012]:"); X--- 159,168 ---- X Update(fullupdate); X bcopy(&Table, &OldTable, (sizeof(CrapsTable_t))); X fullupdate = 0; X! Prompt("Command [12345689abcdfhprt$X?]:"); X wclear(commandwin); X wrefresh(commandwin); X! c = Getch("12345689abcdfhprt$X?", 1); X switch (c) { X case '1': X Prompt("[012]:"); X*************** X*** 870,875 **** X--- 870,878 ---- X break; X } X break; X+ case '$': X+ ShowTotal(); X+ break; X case 'X': X return (0); X case '?': X*************** X*** 1694,1702 **** X addstr("4dc - don't-come odds on 4 4dp - don't place 4\n\n"); X addstr("Bets are taken down by typing t followed by one of the\n"); X addstr("bet commands above.\n\n"); X! addstr("X - Exit program\n"); X! addstr(" continue..."); X refresh(); X getch(); X longjmp(LoopEnv, 2); X } X--- 1697,1716 ---- X addstr("4dc - don't-come odds on 4 4dp - don't place 4\n\n"); X addstr("Bets are taken down by typing t followed by one of the\n"); X addstr("bet commands above.\n\n"); X! addstr("$ - show total bets X - Exit program\n"); X! addstr(" continue..."); X refresh(); X getch(); X longjmp(LoopEnv, 2); X+ } X+ X+ ShowTotal() X+ { X+ int i, total = 0; X+ char buf[80]; X+ X+ for (i = craps_PassLine; i < craps_Bets; ++i) X+ total += Craps_GetBet(&Table, i); X+ sprintf(buf, "Wagers on table total $%d", total); X+ Message(buf); X } X X*** /dev/null Fri Aug 24 11:00:03 1990 X--- patchlevel.h Fri Aug 24 11:04:33 1990 X*************** X*** 0 **** X--- 1 ---- X+ #define PATCHLEVEL 1 END_OF_FILE if test 2062 -ne `wc -c <'patches01'`; then echo shar: \"'patches01'\" unpacked with wrong size! fi # end of 'patches01' fi echo shar: End of shell archive. exit 0