summaryrefslogtreecommitdiffstats
path: root/bcd
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2009-07-26 03:02:38 +0000
committerdholland <dholland@NetBSD.org>2009-07-26 03:02:38 +0000
commit6ee975e21fcf991ef591682630e1259efc1e2d46 (patch)
treefb6e2d3aff56365e09d63b787c03dabb0017b492 /bcd
parentbfb149ab182f4c873c3c8eed8a00bdb81539513a (diff)
downloadbsdgames-darwin-6ee975e21fcf991ef591682630e1259efc1e2d46.tar.gz
bsdgames-darwin-6ee975e21fcf991ef591682630e1259efc1e2d46.tar.zst
bsdgames-darwin-6ee975e21fcf991ef591682630e1259efc1e2d46.zip
Remove the need for -Wno-pointer-sign. Object diffs checked.
Diffstat (limited to 'bcd')
-rw-r--r--bcd/Makefile6
-rw-r--r--bcd/bcd.c14
2 files changed, 8 insertions, 12 deletions
diff --git a/bcd/Makefile b/bcd/Makefile
index 0dddf59c..beaace06 100644
--- a/bcd/Makefile
+++ b/bcd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2008/08/29 00:02:22 gmcgarry Exp $
+# $NetBSD: Makefile,v 1.8 2009/07/26 03:02:38 dholland Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= bcd
@@ -7,7 +7,3 @@ MLINKS= bcd.6 morse.6 bcd.6 ppt.6
HIDEGAME=hidegame
.include <bsd.prog.mk>
-
-.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
-COPTS.bcd.c+= -Wno-pointer-sign
-.endif
diff --git a/bcd/bcd.c b/bcd/bcd.c
index c683e4e9..c6298dba 100644
--- a/bcd/bcd.c
+++ b/bcd/bcd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bcd.c,v 1.15 2008/07/20 01:03:21 lukem Exp $ */
+/* $NetBSD: bcd.c,v 1.16 2009/07/26 03:02:38 dholland Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\
#if 0
static char sccsid[] = "@(#)bcd.c 8.2 (Berkeley) 3/20/94";
#else
-__RCSID("$NetBSD: bcd.c,v 1.15 2008/07/20 01:03:21 lukem Exp $");
+__RCSID("$NetBSD: bcd.c,v 1.16 2009/07/26 03:02:38 dholland Exp $");
#endif
#endif /* not lint */
@@ -155,7 +155,7 @@ printcard(char *str)
{
static const char rowchars[] = " 123456789";
int i, row;
- unsigned char *p;
+ char *p;
/* ruthlessly remove newlines and truncate at 48 characters. */
if ((p = strchr(str, '\n')))
@@ -166,8 +166,8 @@ printcard(char *str)
/* make string upper case. */
for (p = str; *p; ++p)
- if (isascii(*p) && islower(*p))
- *p = toupper(*p);
+ if (isascii((unsigned char)*p) && islower((unsigned char)*p))
+ *p = toupper((unsigned char) *p);
/* top of card */
putchar(' ');
@@ -182,7 +182,7 @@ printcard(char *str)
p = str;
putchar('/');
for (i = 1; *p; i++, p++)
- if (holes[(int)*p])
+ if (holes[(unsigned char)*p])
putchar(*p);
else
putchar(' ');
@@ -200,7 +200,7 @@ printcard(char *str)
for (row = 0; row <= 11; ++row) {
putchar('|');
for (i = 0, p = str; *p; i++, p++) {
- if (bit(holes[(int)*p], 11 - row))
+ if (bit(holes[(unsigned char)*p], 11 - row))
putchar(']');
else
putchar(rowchars[row]);