Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/banner Make this compile again. Cast char variable ...
details: https://anonhg.NetBSD.org/src/rev/850d31ae624f
branches: trunk
changeset: 544181:850d31ae624f
user: he <he%NetBSD.org@localhost>
date: Thu Mar 13 20:49:11 2003 +0000
description:
Make this compile again. Cast char variable to int before comparing
> 0x7f, so that this gives the same result for machines with signed
and unsigned char.
diffstat:
usr.bin/banner/banner.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 80cbba2065cf -r 850d31ae624f usr.bin/banner/banner.c
--- a/usr.bin/banner/banner.c Thu Mar 13 19:51:33 2003 +0000
+++ b/usr.bin/banner/banner.c Thu Mar 13 20:49:11 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: banner.c,v 1.9 2003/03/13 12:13:43 mjl Exp $ */
+/* $NetBSD: banner.c,v 1.10 2003/03/13 20:49:11 he Exp $ */
/*
* Changes for banner(1)
@@ -62,7 +62,7 @@
#if 0
static char sccsid[] = "@(#)printjob.c 8.2 (Berkeley) 4/16/94";
#else
-__RCSID("$NetBSD: banner.c,v 1.9 2003/03/13 12:13:43 mjl Exp $");
+__RCSID("$NetBSD: banner.c,v 1.10 2003/03/13 20:49:11 he Exp $");
#endif
#endif /* not lint */
@@ -143,7 +143,7 @@
sp = scsp;
for (nchrs = 0; *sp != dlm && *sp != '\0'; ) {
cc = *sp++;
- if(cc < ' ' || cc > 0x7f)
+ if(cc < ' ' || ((int)cc) >= 0x7f)
cc = ' ';
d = dropit(c = TRC(cc));
if ((!d && scnhgt > HEIGHT) || (scnhgt <= Drop && d))
Home |
Main Index |
Thread Index |
Old Index