From 0f032c1fb8e59857da515ba85032bb706d471ec2 Mon Sep 17 00:00:00 2001 From: dholland Date: Mon, 28 Jan 2008 06:18:23 +0000 Subject: [PATCH] Make this build with WARNS=4 by not reusing names from ctype.h. --- games/morse/morse.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/games/morse/morse.c b/games/morse/morse.c index dfafa5c3c42e..293ec92789a3 100644 --- a/games/morse/morse.c +++ b/games/morse/morse.c @@ -1,4 +1,4 @@ -/* $NetBSD: morse.c,v 1.13 2004/02/13 23:16:11 jsm Exp $ */ +/* $NetBSD: morse.c,v 1.14 2008/01/28 06:18:23 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\n\ #if 0 static char sccsid[] = "@(#)morse.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: morse.c,v 1.13 2004/02/13 23:16:11 jsm Exp $"); +__RCSID("$NetBSD: morse.c,v 1.14 2008/01/28 06:18:23 dholland Exp $"); #endif #endif /* not lint */ @@ -152,10 +152,10 @@ main(argc, argv) } while (*++argv); } else { char foo[10]; /* All morse chars shorter than this */ - int isblank, i; + int is_blank, i; i = 0; - isblank = 0; + is_blank = 0; while ((ch = getchar()) != EOF) { if (ch == '-' || ch == '.') { foo[i++] = ch; @@ -167,20 +167,20 @@ main(argc, argv) while ((ch = getchar()) != EOF && (ch == '.' || ch == '-')) ; - isblank = 1; + is_blank = 1; } } else if (i) { foo[i] = '\0'; decode(foo); i = 0; - isblank = 0; + is_blank = 0; } else if (isspace(ch)) { - if (isblank) { + if (is_blank) { /* print whitespace for each double blank */ putchar(' '); - isblank = 0; + is_blank = 0; } else - isblank = 1; + is_blank = 1; } } }