summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Fumerola <billf@FreeBSD.org>2002-02-23 10:44:04 +0000
committerBill Fumerola <billf@FreeBSD.org>2002-02-23 10:44:04 +0000
commit1210c77166558eedf1c6525230c19a70f9a02da1 (patch)
tree90f14cd5bbae0092b074d3d1ef5de4ebf3c30981
parent578a176b1e27c8b8cdc1d47cd6d0aa3fd7151e41 (diff)
Notes
-rw-r--r--games/piano/piano.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/games/piano/piano.c b/games/piano/piano.c
index 484247a95f7c..5eca743a632c 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;