From 1210c77166558eedf1c6525230c19a70f9a02da1 Mon Sep 17 00:00:00 2001 From: Bill Fumerola Date: Sat, 23 Feb 2002 10:44:04 +0000 Subject: [PATCH] BDECFLAGS Reviewed by: md5(1) --- games/piano/piano.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/games/piano/piano.c b/games/piano/piano.c index 484247a95f7..5eca743a632 100644 --- a/games/piano/piano.c +++ b/games/piano/piano.c @@ -13,7 +13,7 @@ static const char rcsid[] = char *myname; int verbose; -static char *initcmd = "t160 o1 l16 ml"; +static const char *initcmd = "t160 o1 l16 ml"; static const char usage_msg[] = "simple keyboard player V0.8086\n" @@ -27,10 +27,10 @@ static const char usage_msg[] = struct kdef_t { int ch; - char *str; + const char *str; }; -static char *kstr[256]; +static const char *kstr[256]; static struct kdef_t kdef[] = { /* white key */ @@ -80,12 +80,14 @@ init_kstr(void) }/* init_kstr */ static int -fdputs(const char *s, int fd, int echo) +fdputs(const char *s, int fd, int p_echo) { - int err, len = strlen(s); + int err; + size_t len; + len = strlen(s); write(fd, s, len); err = write(fd, "\n", 1); - if (echo) { + if (p_echo) { fputs(s, stdout); } return err;