Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/mille eliminate non-literal format strings
details: https://anonhg.NetBSD.org/src/rev/421dffc528f3
branches: trunk
changeset: 768414:421dffc528f3
user: christos <christos%NetBSD.org@localhost>
date: Tue Aug 16 11:14:04 2011 +0000
description:
eliminate non-literal format strings
diffstat:
games/mille/extern.c | 5 ++---
games/mille/mille.h | 5 +++--
games/mille/print.c | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)
diffs (72 lines):
diff -r c1af080ca112 -r 421dffc528f3 games/mille/extern.c
--- a/games/mille/extern.c Tue Aug 16 11:10:54 2011 +0000
+++ b/games/mille/extern.c Tue Aug 16 11:14:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.c,v 1.10 2009/08/12 08:07:27 dholland Exp $ */
+/* $NetBSD: extern.c,v 1.11 2011/08/16 11:14:04 christos Exp $ */
/*
* Copyright (c) 1982, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)extern.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: extern.c,v 1.10 2009/08/12 08:07:27 dholland Exp $");
+__RCSID("$NetBSD: extern.c,v 1.11 2011/08/16 11:14:04 christos Exp $");
#endif
#endif /* not lint */
@@ -52,7 +52,6 @@
Saved; /* set if game just saved */
char Initstr[INITSTR_SIZE]; /* initial string for error field */
-const char *C_fmt = "%-18.18s"; /* format for printing cards */
const char *Fromfile = NULL; /* startup file for game */
static const char *const _cn[NUM_CARDS] = {/* Card name buffer */
"",
diff -r c1af080ca112 -r 421dffc528f3 games/mille/mille.h
--- a/games/mille/mille.h Tue Aug 16 11:10:54 2011 +0000
+++ b/games/mille/mille.h Tue Aug 16 11:14:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mille.h,v 1.17 2009/08/12 08:07:27 dholland Exp $ */
+/* $NetBSD: mille.h,v 1.18 2011/08/16 11:14:04 christos Exp $ */
/*
* Copyright (c) 1982, 1993
@@ -212,7 +212,8 @@
#define INITSTR_SIZE 100
extern char Initstr[INITSTR_SIZE];
-extern const char *C_fmt, *const *C_name, *Fromfile;
+extern const char *const *C_name, *Fromfile;
+#define C_fmt "%-18.18s"
extern int Card_no, End, Handstart, Movetype, Numgos,
Numneed[], Numseen[NUM_CARDS], Play, Window;
diff -r c1af080ca112 -r 421dffc528f3 games/mille/print.c
--- a/games/mille/print.c Tue Aug 16 11:10:54 2011 +0000
+++ b/games/mille/print.c Tue Aug 16 11:14:04 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.16 2011/05/23 22:59:27 joerg Exp $ */
+/* $NetBSD: print.c,v 1.17 2011/08/16 11:14:04 christos Exp $ */
/*
* Copyright (c) 1982, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: print.c,v 1.16 2011/05/23 22:59:27 joerg Exp $");
+__RCSID("$NetBSD: print.c,v 1.17 2011/08/16 11:14:04 christos Exp $");
#endif
#endif /* not lint */
@@ -115,7 +115,7 @@
*lc = c;
}
-static char Score_fmt[] = "%4d";
+#define Score_fmt "%4d"
void
prscore(bool for_real)
Home |
Main Index |
Thread Index |
Old Index