Module Name:    src
Committed By:   dholland
Date:           Sun Mar 30 05:46:54 UTC 2014

Modified Files:
        src/games/hunt/hunt: hunt.c

Log Message:
curses has printw, use it.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/games/hunt/hunt/hunt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/hunt/hunt/hunt.c
diff -u src/games/hunt/hunt/hunt.c:1.56 src/games/hunt/hunt/hunt.c:1.57
--- src/games/hunt/hunt/hunt.c:1.56	Sun Mar 30 05:44:55 2014
+++ src/games/hunt/hunt/hunt.c	Sun Mar 30 05:46:54 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: hunt.c,v 1.56 2014/03/30 05:44:55 dholland Exp $	*/
+/*	$NetBSD: hunt.c,v 1.57 2014/03/30 05:46:54 dholland Exp $	*/
 /*
  * Copyright (c) 1983-2003, Regents of the University of California.
  * All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: hunt.c,v 1.56 2014/03/30 05:44:55 dholland Exp $");
+__RCSID("$NetBSD: hunt.c,v 1.57 2014/03/30 05:46:54 dholland Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -376,7 +376,6 @@ find_driver(void)
 	socklen_t hostlen;
 	unsigned num;
 	int i, c;
-	char buf[128];
 
 	msg = C_PLAYER;
 #ifdef MONITOR
@@ -408,10 +407,8 @@ find_driver(void)
 		for (i = 0; i < HEIGHT - 4 && i < (int)num; i++) {
 			move(3 + i, 0);
 			host = serverlist_gethost(i, &hostlen);
-			(void) snprintf(buf, sizeof(buf),
-					"%8c    %.64s", 'a' + i,
-					lookuphost(host, hostlen));
-			addstr(buf);
+			printw("%8c    %.64s", 'a' + i,
+			       lookuphost(host, hostlen));
 		}
 		move(4 + i, 0);
 		addstr("Enter letter: ");

Reply via email to