CVS commit: src/games/backgammon/backgammon
Module Name:src Committed By: dholland Date: Wed Aug 12 04:51:11 UTC 2009 Modified Files: src/games/backgammon/backgammon: main.c Log Message: looks as if "ospeed" here was meant to be extern. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/games/backgammon/backgammon/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/backgammon/backgammon/main.c diff -u src/games/backgammon/backgammon/main.c:1.25 src/games/backgammon/backgammon/main.c:1.26 --- src/games/backgammon/backgammon/main.c:1.25 Mon Jul 21 13:24:38 2008 +++ src/games/backgammon/backgammon/main.c Wed Aug 12 04:51:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.25 2008/07/21 13:24:38 lukem Exp $ */ +/* $NetBSD: main.c,v 1.26 2009/08/12 04:51:11 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: main.c,v 1.25 2008/07/21 13:24:38 lukem Exp $"); +__RCSID("$NetBSD: main.c,v 1.26 2009/08/12 04:51:11 dholland Exp $"); #endif #endif/* not lint */ @@ -52,7 +52,7 @@ extern const char *const instr[]; /* text of instructions */ extern const char *const message[]; /* update message */ -short ospeed; /* tty output speed */ +extern short ospeed; /* tty output speed */ const char *const helpm[] = { /* help message */ "Enter a space or newline to roll, or",
CVS commit: src/games/backgammon/backgammon
Module Name:src Committed By: dholland Date: Sat Oct 13 19:39:57 UTC 2012 Modified Files: src/games/backgammon/backgammon: move.c Log Message: Add strategic assertion, now passes -Wstrict-overflow. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/games/backgammon/backgammon/move.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/backgammon/backgammon/move.c diff -u src/games/backgammon/backgammon/move.c:1.12 src/games/backgammon/backgammon/move.c:1.13 --- src/games/backgammon/backgammon/move.c:1.12 Sat Oct 13 19:19:38 2012 +++ src/games/backgammon/backgammon/move.c Sat Oct 13 19:39:57 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: move.c,v 1.12 2012/10/13 19:19:38 dholland Exp $ */ +/* $NetBSD: move.c,v 1.13 2012/10/13 19:39:57 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: move.c,v 1.12 2012/10/13 19:19:38 dholland Exp $"); +__RCSID("$NetBSD: move.c,v 1.13 2012/10/13 19:39:57 dholland Exp $"); #endif #endif /* not lint */ @@ -167,6 +167,14 @@ move(struct move *mm, int okay) writec('-'); wrint(mm->g[i] = cg[i]); makmove(mm, i); + + /* + * This assertion persuades gcc 4.5 that the loop + * doesn't result in signed overflow of i. mvlim + * isn't, or at least shouldn't be, changed by makmove + * at all. + */ + assert(mm->mvlim >= 0 && mm->mvlim <= 5); } writec('.');
CVS commit: src/games/backgammon/backgammon
Module Name:src Committed By: dholland Date: Sat Mar 22 23:10:36 UTC 2014 Modified Files: src/games/backgammon/backgammon: main.c Log Message: don't declare ospeed; it's in To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/games/backgammon/backgammon/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/backgammon/backgammon/main.c diff -u src/games/backgammon/backgammon/main.c:1.31 src/games/backgammon/backgammon/main.c:1.32 --- src/games/backgammon/backgammon/main.c:1.31 Sat Oct 13 19:25:22 2012 +++ src/games/backgammon/backgammon/main.c Sat Mar 22 23:10:36 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.31 2012/10/13 19:25:22 dholland Exp $ */ +/* $NetBSD: main.c,v 1.32 2014/03/22 23:10:36 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: main.c,v 1.31 2012/10/13 19:25:22 dholland Exp $"); +__RCSID("$NetBSD: main.c,v 1.32 2014/03/22 23:10:36 dholland Exp $"); #endif #endif/* not lint */ @@ -52,7 +52,6 @@ __RCSID("$NetBSD: main.c,v 1.31 2012/10/ extern const char *const instr[]; /* text of instructions */ extern const char *const message[]; /* update message */ -extern short ospeed; /* tty output speed */ static const char *const helpm[] = { /* help message */ "Enter a space or newline to roll, or",