summaryrefslogtreecommitdiffstats
path: root/rogue
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2011-05-23 23:01:17 +0000
committerjoerg <joerg@NetBSD.org>2011-05-23 23:01:17 +0000
commitccd296bf30f6edab4a9db5c43bfa65fa7d25a7ef (patch)
tree32b80bbb12d3bbfb5ef388188a0de32e1d104612 /rogue
parent0aa54da72125ab6eec1f8dd721546f109aa6df70 (diff)
downloadbsdgames-darwin-ccd296bf30f6edab4a9db5c43bfa65fa7d25a7ef.tar.gz
bsdgames-darwin-ccd296bf30f6edab4a9db5c43bfa65fa7d25a7ef.tar.zst
bsdgames-darwin-ccd296bf30f6edab4a9db5c43bfa65fa7d25a7ef.zip
Kill some pointer indirections. Don't use variables as format strings.
Diffstat (limited to 'rogue')
-rw-r--r--rogue/move.c8
-rw-r--r--rogue/pack.c6
-rw-r--r--rogue/rogue.h6
-rw-r--r--rogue/spec_hit.c6
-rw-r--r--rogue/throw.c6
5 files changed, 16 insertions, 16 deletions
diff --git a/rogue/move.c b/rogue/move.c
index 7d1c2ca1..8378654f 100644
--- a/rogue/move.c
+++ b/rogue/move.c
@@ -1,4 +1,4 @@
-/* $NetBSD: move.c,v 1.12 2009/08/12 08:44:45 dholland Exp $ */
+/* $NetBSD: move.c,v 1.13 2011/05/23 23:01:17 joerg Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: move.c,v 1.12 2009/08/12 08:44:45 dholland Exp $");
+__RCSID("$NetBSD: move.c,v 1.13 2011/05/23 23:01:17 joerg Exp $");
#endif
#endif /* not lint */
@@ -57,7 +57,7 @@ __RCSID("$NetBSD: move.c,v 1.12 2009/08/12 08:44:45 dholland Exp $");
short m_moves = 0;
boolean jump = 0;
-const char *you_can_move_again = "you can move again";
+const char you_can_move_again[] = "you can move again";
static boolean can_turn(short, short);
static boolean check_hunger(boolean);
@@ -405,7 +405,7 @@ check_hunger(boolean msg_only)
mv_mons();
}
}
- messagef(1, you_can_move_again);
+ messagef(1, "%s", you_can_move_again);
}
}
if (msg_only) {
diff --git a/rogue/pack.c b/rogue/pack.c
index 14bb6369..f8aed6ea 100644
--- a/rogue/pack.c
+++ b/rogue/pack.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pack.c,v 1.11 2009/08/12 08:44:45 dholland Exp $ */
+/* $NetBSD: pack.c,v 1.12 2011/05/23 23:01:17 joerg Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)pack.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pack.c,v 1.11 2009/08/12 08:44:45 dholland Exp $");
+__RCSID("$NetBSD: pack.c,v 1.12 2011/05/23 23:01:17 joerg Exp $");
#endif
#endif /* not lint */
@@ -55,7 +55,7 @@ __RCSID("$NetBSD: pack.c,v 1.11 2009/08/12 08:44:45 dholland Exp $");
#include "rogue.h"
-const char *curse_message = "you can't, it appears to be cursed";
+const char curse_message[] = "you can't, it appears to be cursed";
static object *check_duplicate(object *, object *);
static boolean is_pack_letter(short *, unsigned short *);
diff --git a/rogue/rogue.h b/rogue/rogue.h
index e46de5d8..d1bd8b5e 100644
--- a/rogue/rogue.h
+++ b/rogue/rogue.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rogue.h,v 1.20 2009/08/12 08:44:45 dholland Exp $ */
+/* $NetBSD: rogue.h,v 1.21 2011/05/23 23:01:17 joerg Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -667,7 +667,7 @@ extern char hit_message[HIT_MESSAGE_SIZE];
extern char hunger_str[HUNGER_STR_LEN];
extern char login_name[MAX_OPT_LEN];
extern const char *byebye_string;
-extern const char *curse_message;
+extern const char curse_message[];
extern const char *error_file;
extern char *fruit;
extern const char *const m_names[];
@@ -676,7 +676,7 @@ extern const char *new_level_message;
extern char *nick_name;
extern const char *press_space;
extern char *save_file;
-extern const char *you_can_move_again;
+extern const char you_can_move_again[];
extern const long level_points[];
extern short add_strength;
extern short auto_search;
diff --git a/rogue/spec_hit.c b/rogue/spec_hit.c
index 6f0d3626..69e314c3 100644
--- a/rogue/spec_hit.c
+++ b/rogue/spec_hit.c
@@ -1,4 +1,4 @@
-/* $NetBSD: spec_hit.c,v 1.8 2008/01/14 03:50:02 dholland Exp $ */
+/* $NetBSD: spec_hit.c,v 1.9 2011/05/23 23:01:17 joerg Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)spec_hit.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: spec_hit.c,v 1.8 2008/01/14 03:50:02 dholland Exp $");
+__RCSID("$NetBSD: spec_hit.c,v 1.9 2011/05/23 23:01:17 joerg Exp $");
#endif
#endif /* not lint */
@@ -147,7 +147,7 @@ freeze(object *monster)
}
killed_by(NULL, HYPOTHERMIA);
}
- messagef(1, you_can_move_again);
+ messagef(1, "%s", you_can_move_again);
monster->m_flags &= (~FREEZING_ROGUE);
}
}
diff --git a/rogue/throw.c b/rogue/throw.c
index f8663dc9..93c88c5a 100644
--- a/rogue/throw.c
+++ b/rogue/throw.c
@@ -1,4 +1,4 @@
-/* $NetBSD: throw.c,v 1.11 2009/08/12 08:44:45 dholland Exp $ */
+/* $NetBSD: throw.c,v 1.12 2011/05/23 23:01:17 joerg Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)throw.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: throw.c,v 1.11 2009/08/12 08:44:45 dholland Exp $");
+__RCSID("$NetBSD: throw.c,v 1.12 2011/05/23 23:01:17 joerg Exp $");
#endif
#endif /* not lint */
@@ -89,7 +89,7 @@ throw(void)
return;
}
if ((weapon->in_use_flags & BEING_USED) && weapon->is_cursed) {
- messagef(0, curse_message);
+ messagef(0, "%s", curse_message);
return;
}
row = rogue.row; col = rogue.col;