[PATCH] games/piano cleanup
Peter Avalos
pavalos at theshell.com
Sun May 1 03:44:25 PDT 2005
WARNS6 for games/piano:
http://www.theshell.com/~pavalos/wip/piano.patch
Index: Makefile
===================================================================
RCS file: /ftp/pub/DragonFly/dcvs/src/games/piano/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile 17 Jun 2003 04:25:24 -0000 1.2
+++ Makefile 30 Apr 2005 04:02:30 -0000
@@ -6,5 +6,6 @@
MAN= piano.6
DPADD= ${LIBCURSES} ${LIBTERMCAP}
LDADD= -lcurses -ltermcap
+WARNS?= 6
.include <bsd.prog.mk>
Index: piano.c
===================================================================
RCS file: /ftp/pub/DragonFly/dcvs/src/games/piano/piano.c,v
retrieving revision 1.2
diff -u -r1.2 piano.c
--- piano.c 17 Jun 2003 04:25:24 -0000 1.2
+++ piano.c 30 Apr 2005 04:16:29 -0000
@@ -14,9 +14,9 @@
char *myname;
int verbose;
-static char *initcmd = "t160 o1 l16 ml";
+static const char *initcmd = "t160 o1 l16 ml";
-static char usage_msg[] =
+static const char usage_msg[] =
"simple keyboard player V0.8086\n"
"usage: %s [-v][-i str]\n"
"\t-i str defaults 't160 o1 l16 ml'\n"
@@ -28,10 +28,10 @@
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 */
@@ -81,12 +81,13 @@
}/* 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 = strlen(s);
write(fd, s, len);
err = write(fd, "\n", 1);
- if (echo) {
+ if (p_echo) {
fputs(s, stdout);
}
return err;
Attachment:
pgp00001.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00001.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20050501/0c186cb4/attachment-0018.obj>
More information about the Submit
mailing list