summaryrefslogtreecommitdiff
path: root/games/rogue/play.c
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>2002-07-18 07:13:58 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>2002-07-18 07:13:58 +0000
commit54a6ff4e941f27f74b5c69277796845213e0d171 (patch)
tree2c06b08145f5cdf2bf02ab2032ff977b2e523505 /games/rogue/play.c
parent58277074e3e354b7bbce4f4f0f8c25ae270f47cb (diff)
- string handling patch from David Holland, minimally modified. Highlights
are fewer magic constants, sprintf->snprintf, and better scorefile handling. Also, won't hang if forking a subshell fails. - a few needless functions have been trimmed, and a few extra defaults have been added to a few switches, just in case.
Diffstat (limited to 'games/rogue/play.c')
-rw-r--r--games/rogue/play.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/games/rogue/play.c b/games/rogue/play.c
index 9bd41cc9bcd..b650ef7f7ab 100644
--- a/games/rogue/play.c
+++ b/games/rogue/play.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: play.c,v 1.3 1998/08/22 08:55:39 pjanzen Exp $ */
+/* $OpenBSD: play.c,v 1.4 2002/07/18 07:13:57 pjanzen Exp $ */
/* $NetBSD: play.c,v 1.3 1995/04/22 10:28:04 cgd Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)play.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: play.c,v 1.3 1998/08/22 08:55:39 pjanzen Exp $";
+static const char rcsid[] = "$OpenBSD: play.c,v 1.4 2002/07/18 07:13:57 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -71,7 +71,7 @@ play_level()
for (;;) {
interrupted = 0;
if (hit_message[0]) {
- message(hit_message, 1);
+ messagef(1, "%s", hit_message);
hit_message[0] = 0;
}
if (trap_door) {
@@ -218,7 +218,7 @@ CH:
throw();
break;
case 'v':
- message("rogue-clone: Version III. (Tim Stoehr was here), tektronix!zeus!tims", 0);
+ messagef(0, "rogue-clone: Version III. (Tim Stoehr was here), tektronix!zeus!tims");
break;
case 'Q':
quit(0);
@@ -250,28 +250,28 @@ CH:
if (wizard) {
inventory(&level_objects, ALL_OBJECTS);
} else {
- message(unknown_command, 0);
+ messagef(0, "%s", unknown_command);
}
break;
case '\023':
if (wizard) {
draw_magic_map();
} else {
- message(unknown_command, 0);
+ messagef(0, "%s", unknown_command);
}
break;
case '\024':
if (wizard) {
show_traps();
} else {
- message(unknown_command, 0);
+ messagef(0, "%s", unknown_command);
}
break;
case '\017':
if (wizard) {
show_objects();
} else {
- message(unknown_command, 0);
+ messagef(0, "%s", unknown_command);
}
break;
case '\001':
@@ -281,21 +281,21 @@ CH:
if (wizard) {
c_object_for_wizard();
} else {
- message(unknown_command, 0);
+ messagef(0, "%s", unknown_command);
}
break;
case '\015':
if (wizard) {
show_monsters();
} else {
- message(unknown_command, 0);
+ messagef(0, "%s", unknown_command);
}
break;
case 'S':
save_game();
break;
default:
- message(unknown_command, 0);
+ messagef(0, "%s", unknown_command);
break;
}
}