constify, per PR 6148

This commit is contained in:
hubertf 1998-11-10 13:01:31 +00:00
parent 2e48cf531e
commit 6d265b3268
20 changed files with 181 additions and 176 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: hit.c,v 1.4 1997/10/12 11:45:05 lukem Exp $ */
/* $NetBSD: hit.c,v 1.5 1998/11/10 13:01:31 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)hit.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: hit.c,v 1.4 1997/10/12 11:45:05 lukem Exp $");
__RCSID("$NetBSD: hit.c,v 1.5 1998/11/10 13:01:31 hubertf Exp $");
#endif
#endif /* not lint */
@ -67,7 +67,7 @@ mon_hit(monster)
object *monster;
{
short damage, hit_chance;
char *mn;
const char *mn;
float minus;
if (fight_monster && (monster != fight_monster)) {
@ -183,7 +183,7 @@ rogue_damage(d, monster, other)
int
get_damage(ds, r)
char *ds;
const char *ds;
boolean r;
{
int i = 0, j, n, d, total = 0;
@ -210,7 +210,7 @@ get_damage(ds, r)
int
get_w_damage(obj)
object *obj;
const object *obj;
{
char new_damage[12];
int to_hit, damage;
@ -230,7 +230,7 @@ get_w_damage(obj)
int
get_number(s)
char *s;
const char *s;
{
int i = 0;
int total = 0;
@ -244,7 +244,7 @@ get_number(s)
long
lget_number(s)
char *s;
const char *s;
{
short i = 0;
long total = 0;
@ -258,7 +258,7 @@ lget_number(s)
int
to_hit(obj)
object *obj;
const object *obj;
{
if (!obj) {
return(1);
@ -302,7 +302,7 @@ mon_damage(monster, damage)
object *monster;
short damage;
{
char *mn;
const char *mn;
short row, col;
monster->hp_to_kill -= damage;
@ -440,7 +440,7 @@ get_dir_rc(dir, row, col, allow_off_screen)
int
get_hit_chance(weapon)
object *weapon;
const object *weapon;
{
short hit_chance;
@ -452,7 +452,7 @@ get_hit_chance(weapon)
int
get_weapon_damage(weapon)
object *weapon;
const object *weapon;
{
short damage;

View File

@ -1,4 +1,4 @@
/* $NetBSD: init.c,v 1.6 1998/07/27 01:12:35 mycroft Exp $ */
/* $NetBSD: init.c,v 1.7 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: init.c,v 1.6 1998/07/27 01:12:35 mycroft Exp $");
__RCSID("$NetBSD: init.c,v 1.7 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -70,8 +70,8 @@ boolean save_is_interactive = 1;
boolean ask_quit = 1;
boolean no_skull = 0;
boolean passgo = 0;
char *error_file = "rogue.esave";
char *byebye_string = "Okay, bye bye!";
const char *error_file = "rogue.esave";
const char *byebye_string = "Okay, bye bye!";
int
init(argc, argv)
@ -177,7 +177,7 @@ player_init()
void
clean_up(estr)
char *estr;
const char *estr;
{
if (save_is_interactive) {
if (init_curses) {
@ -318,7 +318,7 @@ env_get_value(s, e, add_blank)
boolean add_blank;
{
short i = 0;
char *t;
const char *t;
t = e;
@ -341,7 +341,8 @@ env_get_value(s, e, add_blank)
void
init_str(str, dflt)
char **str, *dflt;
char **str;
const char *dflt;
{
if (!(*str)) {
*str = md_malloc(MAX_OPT_LEN + 2);

View File

@ -1,4 +1,4 @@
/* $NetBSD: inventory.c,v 1.5 1997/10/12 11:45:11 lukem Exp $ */
/* $NetBSD: inventory.c,v 1.6 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)inventory.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: inventory.c,v 1.5 1997/10/12 11:45:11 lukem Exp $");
__RCSID("$NetBSD: inventory.c,v 1.6 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -60,9 +60,9 @@ __RCSID("$NetBSD: inventory.c,v 1.5 1997/10/12 11:45:11 lukem Exp $");
#include "rogue.h"
boolean is_wood[WANDS];
char *press_space = " --press space to continue--";
const char *press_space = " --press space to continue--";
char *wand_materials[WAND_MATERIALS] = {
const char *const wand_materials[WAND_MATERIALS] = {
"steel ",
"bronze ",
"gold ",
@ -96,7 +96,7 @@ char *wand_materials[WAND_MATERIALS] = {
"wooden "
};
char *gems[GEMS] = {
const char *const gems[GEMS] = {
"diamond ",
"stibotantalite ",
"lapi-lazuli ",
@ -113,7 +113,7 @@ char *gems[GEMS] = {
"garnet "
};
char *syllables[MAXSYLLABLES] = {
const char *const syllables[MAXSYLLABLES] = {
"blech ",
"foo ",
"barf ",
@ -160,10 +160,10 @@ char *syllables[MAXSYLLABLES] = {
struct id_com_s {
short com_char;
char *com_desc;
const char *com_desc;
};
struct id_com_s com_id_tab[COMS] = {
const struct id_com_s com_id_tab[COMS] = {
{'?', "? prints help"},
{'r', "r read scroll"},
{'/', "/ identify object"},
@ -216,7 +216,7 @@ struct id_com_s com_id_tab[COMS] = {
void
inventory(pack, mask)
object *pack;
const object *pack;
unsigned short mask;
{
object *obj;
@ -453,10 +453,10 @@ make_scroll_titles()
void
get_desc(obj, desc)
object *obj;
const object *obj;
char *desc;
{
char *item_name;
const char *item_name;
struct id *id_table;
char more_info[32];
short i;
@ -671,7 +671,7 @@ single_inv(ichar)
struct id *
get_id_table(obj)
object *obj;
const object *obj;
{
switch(obj->what_is) {
case SCROL:
@ -712,7 +712,7 @@ inv_armor_weapon(is_weapon)
void
id_type()
{
char *id;
const char *id;
int ch;
char buf[DCOLS];

View File

@ -1,4 +1,4 @@
/* $NetBSD: level.c,v 1.4 1997/10/12 11:45:16 lukem Exp $ */
/* $NetBSD: level.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)level.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: level.c,v 1.4 1997/10/12 11:45:16 lukem Exp $");
__RCSID("$NetBSD: level.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -64,11 +64,11 @@ __RCSID("$NetBSD: level.c,v 1.4 1997/10/12 11:45:16 lukem Exp $");
short cur_level = 0;
short max_level = 1;
short cur_room;
char *new_level_message = 0;
const char *new_level_message = 0;
short party_room = NO_ROOM;
short r_de;
long level_points[MAX_EXP_LEVEL] = {
const long level_points[MAX_EXP_LEVEL] = {
10L,
20L,
40L,
@ -591,7 +591,7 @@ fill_it(rn, do_rec_de)
void
recursive_deadend(rn, offsets, srow, scol)
short rn;
short *offsets;
const short *offsets;
short srow, scol;
{
short i, de;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.8 1998/07/27 01:12:35 mycroft Exp $ */
/* $NetBSD: machdep.c,v 1.9 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)machdep.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: machdep.c,v 1.8 1998/07/27 01:12:35 mycroft Exp $");
__RCSID("$NetBSD: machdep.c,v 1.9 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -192,7 +192,7 @@ md_ignore_signals()
int
md_get_file_id(fname)
char *fname;
const char *fname;
{
struct stat sbuf;
@ -212,7 +212,7 @@ md_get_file_id(fname)
int
md_link_count(fname)
char *fname;
const char *fname;
{
struct stat sbuf;
@ -270,7 +270,7 @@ md_gct(rt_buf)
void
md_gfmt(fname, rt_buf)
char *fname;
const char *fname;
struct rogue_time *rt_buf;
{
struct stat sbuf;
@ -302,7 +302,7 @@ md_gfmt(fname, rt_buf)
boolean
md_df(fname)
char *fname;
const char *fname;
{
if (unlink(fname)) {
return(0);
@ -384,7 +384,7 @@ md_sleep(nsecs)
char *
md_getenv(name)
char *name;
const char *name;
{
char *value;
@ -495,7 +495,7 @@ md_lock(l)
void
md_shell(shell)
char *shell;
const char *shell;
{
int w;

View File

@ -1,4 +1,4 @@
/* $NetBSD: message.c,v 1.6 1997/10/12 11:45:25 lukem Exp $ */
/* $NetBSD: message.c,v 1.7 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)message.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: message.c,v 1.6 1997/10/12 11:45:25 lukem Exp $");
__RCSID("$NetBSD: message.c,v 1.7 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -65,11 +65,11 @@ char msgs[NMESSAGES][DCOLS] = {"", "", "", "", ""};
short msg_col = 0, imsg = -1;
boolean msg_cleared = 1, rmsg = 0;
char hunger_str[8] = "";
char *more = "-more-";
const char *more = "-more-";
void
message(msg, intrpt)
char *msg;
const char *msg;
boolean intrpt;
{
cant_int = 1;
@ -137,8 +137,9 @@ check_message()
int
get_input_line(prompt, insert, buf, if_cancelled, add_blank, do_echo)
char *prompt, *buf, *insert;
char *if_cancelled;
const char *prompt, *insert;
char *buf;
const char *if_cancelled;
boolean add_blank;
boolean do_echo;
{
@ -316,7 +317,7 @@ print_stats(stat_mask)
void
pad(s, n)
char *s;
const char *s;
short n;
{
short i;
@ -371,7 +372,7 @@ is_digit(ch)
int
r_index(str, ch, last)
char *str;
const char *str;
int ch;
boolean last;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: monster.c,v 1.6 1998/09/11 14:07:51 hubertf Exp $ */
/* $NetBSD: monster.c,v 1.7 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)monster.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: monster.c,v 1.6 1998/09/11 14:07:51 hubertf Exp $");
__RCSID("$NetBSD: monster.c,v 1.7 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -62,7 +62,7 @@ __RCSID("$NetBSD: monster.c,v 1.6 1998/09/11 14:07:51 hubertf Exp $");
object level_monsters;
boolean mon_disappeared;
char *m_names[] = {
const char *const m_names[] = {
"aquator",
"bat",
"centaur",
@ -509,7 +509,7 @@ move_mon_to(monster, row, col)
int
mon_can_go(monster, row, col)
object *monster;
const object *monster;
short row, col;
{
object *obj;
@ -595,9 +595,9 @@ wake_room(rn, entering, row, col)
}
}
char *
const char *
mon_name(monster)
object *monster;
const object *monster;
{
short ch;
@ -823,7 +823,7 @@ char
gr_obj_char()
{
short r;
char *rs = "%!?]=/):*";
const char *rs = "%!?]=/):*";
r = get_rand(0, 8);
@ -867,7 +867,7 @@ aggravate()
boolean
mon_sees(monster, row, col)
object *monster;
const object *monster;
int row, col;
{
short rn, rdif, cdif, retval;

View File

@ -1,4 +1,4 @@
/* $NetBSD: move.c,v 1.4 1997/10/12 11:45:31 lukem Exp $ */
/* $NetBSD: move.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: move.c,v 1.4 1997/10/12 11:45:31 lukem Exp $");
__RCSID("$NetBSD: move.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -61,7 +61,7 @@ __RCSID("$NetBSD: move.c,v 1.4 1997/10/12 11:45:31 lukem Exp $");
short m_moves = 0;
boolean jump = 0;
char *you_can_move_again = "you can move again";
const char *you_can_move_again = "you can move again";
int
one_move_rogue(dirch, pickup)

View File

@ -1,4 +1,4 @@
/* $NetBSD: object.c,v 1.7 1998/09/11 14:09:27 hubertf Exp $ */
/* $NetBSD: object.c,v 1.8 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)object.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: object.c,v 1.7 1998/09/11 14:09:27 hubertf Exp $");
__RCSID("$NetBSD: object.c,v 1.8 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -295,11 +295,11 @@ free_stuff(objlist)
}
}
char *
const char *
name_of(obj)
object *obj;
const object *obj;
{
char *retstring;
const char *retstring;
switch(obj->what_is) {
case SCROL:
@ -624,7 +624,7 @@ put_stairs()
int
get_armor_class(obj)
object *obj;
const object *obj;
{
if (obj) {
return(obj->class + obj->d_enchant);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pack.c,v 1.5 1998/09/11 14:10:39 hubertf Exp $ */
/* $NetBSD: pack.c,v 1.6 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)pack.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: pack.c,v 1.5 1998/09/11 14:10:39 hubertf Exp $");
__RCSID("$NetBSD: pack.c,v 1.6 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -59,7 +59,7 @@ __RCSID("$NetBSD: pack.c,v 1.5 1998/09/11 14:10:39 hubertf Exp $");
#include "rogue.h"
char *curse_message = "you can't, it appears to be cursed";
const char *curse_message = "you can't, it appears to be cursed";
object *
add_to_pack(obj, pack, condense)
@ -280,7 +280,7 @@ wait_for_ack()
short
pack_letter(prompt, mask)
char *prompt;
const char *prompt;
unsigned short mask;
{
short ch;
@ -479,7 +479,7 @@ call_it()
short
pack_count(new_obj)
object *new_obj;
const object *new_obj;
{
object *obj;
short count = 0;
@ -507,7 +507,7 @@ pack_count(new_obj)
boolean
mask_pack(pack, mask)
object *pack;
const object *pack;
unsigned short mask;
{
while (pack->next_object) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: play.c,v 1.4 1997/10/12 11:45:40 lukem Exp $ */
/* $NetBSD: play.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)play.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: play.c,v 1.4 1997/10/12 11:45:40 lukem Exp $");
__RCSID("$NetBSD: play.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -60,7 +60,7 @@ __RCSID("$NetBSD: play.c,v 1.4 1997/10/12 11:45:40 lukem Exp $");
#include "rogue.h"
boolean interrupted = 0;
char *unknown_command = "unknown command";
const char *unknown_command = "unknown command";
void
play_level()

View File

@ -1,4 +1,4 @@
/* $NetBSD: ring.c,v 1.4 1997/10/12 11:45:47 lukem Exp $ */
/* $NetBSD: ring.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)ring.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: ring.c,v 1.4 1997/10/12 11:45:47 lukem Exp $");
__RCSID("$NetBSD: ring.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -59,8 +59,8 @@ __RCSID("$NetBSD: ring.c,v 1.4 1997/10/12 11:45:47 lukem Exp $");
#include "rogue.h"
char *left_or_right = "left or right hand?";
char *no_ring = "there's no ring on that hand";
const char *left_or_right = "left or right hand?";
const char *no_ring = "there's no ring on that hand";
short stealthy;
short r_rings;
short add_strength;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rogue.h,v 1.7 1998/09/13 15:27:30 hubertf Exp $ */
/* $NetBSD: rogue.h,v 1.8 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -222,7 +222,7 @@ struct id {
struct obj { /* comment is monster meaning */
unsigned long m_flags; /* monster flags */
char *damage; /* damage it does */
const char *damage; /* damage it does */
short quantity; /* hit points to kill */
short ichar; /* 'A' is for aquatar */
short kill_exp; /* exp for killing it */
@ -460,18 +460,18 @@ extern char *CL;
object *alloc_object __P((void));
object *check_duplicate __P((object *, object *));
char *get_ench_color __P((void));
const char *get_ench_color __P((void));
object *get_letter_object __P((int));
object *get_thrown_at_monster __P((object *, short, short *, short *));
object *get_zapped_monster __P((short, short *, short *));
object *gr_monster __P((object *, int));
object *gr_object __P((void));
char *md_getenv __P((char *));
char *md_getenv __P((const char *));
const char *
md_gln __P((void));
char *md_malloc __P((int));
char *mon_name __P((object *));
char *name_of __P((object *));
const char *mon_name __P((const object *));
const char *name_of __P((const object *));
object *object_at __P((object *, short, short));
object *pick_up __P((int, int, short *));
void add_exp __P((int, boolean));
@ -485,13 +485,13 @@ void c_object_for_wizard __P((void));
void call_it __P((void));
boolean can_move __P((int, int, int, int));
boolean can_turn __P((int, int));
void center __P((short, char *));
void center __P((short, const char *));
void check_gold_seeker __P((object *));
boolean check_hunger __P((boolean));
boolean check_imitator __P((object *));
void check_message __P((void));
int check_up __P((void));
void clean_up __P((char *)) __attribute__((__noreturn__));
void clean_up __P((const char *)) __attribute__((__noreturn__));
void clear_level __P((void));
void cnfs __P((void));
int coin_toss __P((void));
@ -527,26 +527,26 @@ void flop_weapon __P((object *, short, short));
void free_object __P((object *));
void free_stuff __P((object *));
void freeze __P((object *));
int get_armor_class __P((object *));
int get_armor_class __P((const object *));
int get_com_id __P((int *, short));
int get_damage __P((char *, boolean));
void get_desc __P((object *, char *));
int get_damage __P((const char *, boolean));
void get_desc __P((const object *, char *));
int get_dir __P((short, short, short, short));
void get_dir_rc __P((short, short *, short *, short));
char get_dungeon_char __P((short, short));
int get_exp_level __P((long));
void get_food __P((object *, boolean));
int get_hit_chance __P((object *));
int get_input_line __P((char *, char *, char *, char *, boolean, boolean));
int get_hit_chance __P((const object *));
int get_input_line __P((const char *, const char *, char *, const char *, boolean, boolean));
char get_mask_char __P((unsigned short));
int get_number __P((char *));
int get_number __P((const char *));
boolean get_oth_room __P((short, short *, short *));
int get_rand __P((int, int));
short get_room_number __P((int, int));
int get_value __P((object *));
int get_w_damage __P((object *));
int get_value __P((const object *));
int get_w_damage __P((const object *));
void get_wand_and_ring_materials __P((void));
int get_weapon_damage __P((object *));
int get_weapon_damage __P((const object *));
char gmc __P((object *));
char gmc_row_col __P((int, int));
void go_blind __P((void));
@ -563,7 +563,7 @@ void gr_wand __P((object *));
void gr_weapon __P((object *, int));
void hallucinate __P((void));
boolean has_amulet __P((void));
boolean has_been_touched __P((struct rogue_time *, struct rogue_time *));
boolean has_been_touched __P((const struct rogue_time *, const struct rogue_time *));
void heal __P((void));
void hide_boxed_passage __P((int, int, int, int, int));
void hold_monster __P((void));
@ -575,11 +575,11 @@ void id_type __P((void));
void idntfy __P((void));
boolean imitating __P((int, int));
int init __P((int, char **));
void init_str __P((char **, char *));
void insert_score __P((char [][], char [][], char *, short, short, object *, int));
void init_str __P((char **, const char *));
void insert_score __P((char [][], char [][], const char *, short, short, const object *, int));
void inv_armor_weapon __P((boolean));
void inv_rings __P((void));
void inventory __P((object *, unsigned short));
void inventory __P((const object *, unsigned short));
boolean is_all_connected __P((void));
boolean is_digit __P((int));
boolean is_direction __P((short, short *));
@ -587,8 +587,8 @@ boolean is_pack_letter __P((short *, unsigned short *));
boolean is_passable __P((int, int));
boolean is_vowel __P((short));
void kick_into_pack __P((void));
void killed_by __P((object *, short));
long lget_number __P((char *));
void killed_by __P((const object *, short));
long lget_number __P((const char *));
void light_passage __P((int, int));
void light_up_room __P((int));
boolean m_confuse __P((object *));
@ -597,32 +597,32 @@ void make_maze __P((short, short, short, short, short, short));
void make_party __P((void));
void make_room __P((short, short, short, short));
void make_scroll_titles __P((void));
boolean mask_pack __P((object *, unsigned short));
boolean mask_pack __P((const object *, unsigned short));
boolean mask_room __P((short, short *, short *, unsigned short));
void md_cbreak_no_echo_nonl __P((boolean));
boolean md_df __P((char *));
boolean md_df __P((const char *));
void md_exit __P((int)) __attribute__((__noreturn__));
void md_gct __P((struct rogue_time *));
char *md_gdtcf __P((void));
int md_get_file_id __P((char *));
void md_gfmt __P((char *, struct rogue_time *));
int md_get_file_id __P((const char *));
void md_gfmt __P((const char *, struct rogue_time *));
int md_gseed __P((void));
void md_heed_signals __P((void));
void md_ignore_signals __P((void));
int md_link_count __P((char *));
int md_link_count __P((const char *));
void md_lock __P((boolean));
void md_shell __P((char *));
void md_shell __P((const char *));
void md_sleep __P((int));
void md_slurp __P((void));
void md_tstp __P((void));
void message __P((char *, boolean));
void message __P((const char *, boolean));
void mix_colors __P((void));
void mix_colors __P((void));
void mix_random_rooms __P((void));
int mon_can_go __P((object *, int, int));
int mon_can_go __P((const object *, int, int));
int mon_damage __P((object *, short));
void mon_hit __P((object *));
boolean mon_sees __P((object *, int, int));
boolean mon_sees __P((const object *, int, int));
int move_confused __P((object *));
void move_mon_to __P((object *, int, int));
void move_onto __P((void));
@ -631,19 +631,19 @@ void multiple_move_rogue __P((short));
void mv_1_monster __P((object *, int, int));
void mv_aquatars __P((void));
void mv_mons __P((void));
int name_cmp __P((char *, char *));
int name_cmp __P((char *, const char *));
short next_avail_ichar __P((void));
boolean next_to_something __P((int, int));
void nickize __P((char *, char *, char *));
void nickize __P((char *, const char *, const char *));
int no_room_for_monster __P((int));
int one_move_rogue __P((short, short));
void onintr __P((int));
void opt_erase __P((int));
void opt_go __P((int));
void opt_show __P((int));
short pack_count __P((object *));
short pack_letter __P((char *, unsigned short));
void pad __P((char *, short));
short pack_count __P((const object *));
short pack_letter __P((const char *, unsigned short));
void pad __P((const char *, short));
void party_monsters __P((int, int));
short party_objects __P((int));
void place_at __P((object *, int, int));
@ -663,26 +663,26 @@ void put_mons __P((void));
void put_objects __P((void));
void put_on_ring __P((void));
void put_player __P((short));
void put_scores __P((object *, short)) __attribute__((__noreturn__));
void put_scores __P((const object *, short)) __attribute__((__noreturn__));
void put_stairs __P((void));
void quaff __P((void));
void quit __P((boolean));
int r_index __P((char *, int, boolean));
int r_index __P((const char *, int, boolean));
void r_read __P((FILE *, char *, int));
void r_write __P((FILE *, char *, int));
void r_write __P((FILE *, const char *, int));
void rand_around __P((short, short *, short *));
int rand_percent __P((int));
void rand_place __P((object *));
void read_pack __P((object *, FILE *, boolean));
void read_scroll __P((void));
void read_string __P((char *, FILE *));
void recursive_deadend __P((short, short *, short, short));
void recursive_deadend __P((short, const short *, short, short));
boolean reg_move __P((void));
void relight __P((void));
void remessage __P((short));
void remove_ring __P((void));
void rest __P((int));
void restore __P((char *));
void restore __P((const char *));
int rgetchar __P((void));
void ring_stats __P((boolean));
int rogue_can_see __P((int, int));
@ -698,7 +698,7 @@ void s_con_mon __P((object *));
int same_col __P((int, int));
int same_row __P((int, int));
void save_game __P((void));
void save_into_file __P((char *));
void save_into_file __P((const char *));
void save_screen __P((void));
void search __P((short, boolean));
boolean seek_gold __P((object *));
@ -726,7 +726,7 @@ void tele __P((void));
void tele_away __P((object *));
void throw __P((void));
boolean throw_at_monster __P((object *, object *));
int to_hit __P((object *));
int to_hit __P((const object *));
short trap_at __P((int, int));
void trap_player __P((int, int));
boolean try_to_cough __P((short, short, object *));
@ -749,14 +749,14 @@ void wear __P((void));
void wield __P((void));
void win __P((void));
void wizardize __P((void));
void write_pack __P((object *, FILE *));
void write_pack __P((const object *, FILE *));
void write_string __P((char *, FILE *));
long xxx __P((boolean));
void xxxx __P((char *, short));
void zap_monster __P((object *, unsigned short));
void zapp __P((void));
object *add_to_pack __P((object *, object *, int));
struct id *get_id_table __P((object *));
struct id *get_id_table __P((const object *));
unsigned short gr_what_is __P((void));
extern boolean ask_quit;
@ -784,18 +784,18 @@ extern boolean wizard;
extern char hit_message[];
extern char hunger_str[];
extern char login_name[];
extern char *byebye_string;
extern char *curse_message;
extern char *error_file;
extern const char *byebye_string;
extern const char *curse_message;
extern const char *error_file;
extern char *fruit;
extern char *m_names[];
extern char *more;
extern char *new_level_message;
extern const char *const m_names[];
extern const char *more;
extern const char *new_level_message;
extern char *nick_name;
extern char *press_space;
extern const char *press_space;
extern char *save_file;
extern char *you_can_move_again;
extern long level_points[];
extern const char *you_can_move_again;
extern const long level_points[];
extern short add_strength;
extern short auto_search;
extern short bear_trap;

View File

@ -1,4 +1,4 @@
/* $NetBSD: room.c,v 1.5 1998/09/11 14:11:57 hubertf Exp $ */
/* $NetBSD: room.c,v 1.6 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)room.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: room.c,v 1.5 1998/09/11 14:11:57 hubertf Exp $");
__RCSID("$NetBSD: room.c,v 1.6 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -65,7 +65,7 @@ boolean rooms_visited[MAXROOMS];
#define NOPTS 7
struct option {
char *prompt;
const char *prompt;
boolean is_bool;
char **strval;
boolean *bval;
@ -627,7 +627,7 @@ void
opt_show(i)
int i;
{
char *s;
const char *s;
struct option *opt = &options[i];
opt_erase(i);
@ -661,7 +661,7 @@ void
do_shell()
{
#ifdef UNIX
char *sh;
const char *sh;
md_ignore_signals();
if (!(sh = md_getenv("SHELL"))) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: save.c,v 1.4 1997/10/12 11:45:58 lukem Exp $ */
/* $NetBSD: save.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)save.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: save.c,v 1.4 1997/10/12 11:45:58 lukem Exp $");
__RCSID("$NetBSD: save.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -79,7 +79,7 @@ save_game()
void
save_into_file(sfile)
char *sfile;
const char *sfile;
{
FILE *fp;
int file_id;
@ -149,7 +149,7 @@ save_into_file(sfile)
void
restore(fname)
char *fname;
const char *fname;
{
FILE *fp;
struct rogue_time saved_time, mod_time;
@ -231,16 +231,16 @@ restore(fname)
void
write_pack(pack, fp)
object *pack;
const object *pack;
FILE *fp;
{
object t;
while ((pack = pack->next_object) != NULL) {
r_write(fp, (char *) pack, sizeof(object));
r_write(fp, (const char *) pack, sizeof(object));
}
t.ichar = t.what_is = 0;
r_write(fp, (char *) &t, sizeof(object));
r_write(fp, (const char *) &t, sizeof(object));
}
void
@ -310,8 +310,8 @@ rw_id(id_table, fp, n, wr)
for (i = 0; i < n; i++) {
if (wr) {
r_write(fp, (char *) &(id_table[i].value), sizeof(short));
r_write(fp, (char *) &(id_table[i].id_status),
r_write(fp, (const char *) &(id_table[i].value), sizeof(short));
r_write(fp, (const char *) &(id_table[i].id_status),
sizeof(unsigned short));
write_string(id_table[i].title, fp);
} else {
@ -375,7 +375,7 @@ r_read(fp, buf, n)
void
r_write(fp, buf, n)
FILE *fp;
char *buf;
const char *buf;
int n;
{
if (!write_failed) {
@ -389,7 +389,7 @@ r_write(fp, buf, n)
boolean
has_been_touched(saved_time, mod_time)
struct rogue_time *saved_time, *mod_time;
const struct rogue_time *saved_time, *mod_time;
{
if (saved_time->year < mod_time->year) {
return(1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: score.c,v 1.6 1997/10/12 11:46:01 lukem Exp $ */
/* $NetBSD: score.c,v 1.7 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)score.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: score.c,v 1.6 1997/10/12 11:46:01 lukem Exp $");
__RCSID("$NetBSD: score.c,v 1.7 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -63,7 +63,7 @@ __RCSID("$NetBSD: score.c,v 1.6 1997/10/12 11:46:01 lukem Exp $");
void
killed_by(monster, other)
object *monster;
const object *monster;
short other;
{
char buf[128];
@ -200,7 +200,7 @@ quit(from_intrpt)
void
put_scores(monster, other)
object *monster;
const object *monster;
short other;
{
short i, n, rank = 10, x, ne = 0, found_player = -1;
@ -329,9 +329,9 @@ void
insert_score(scores, n_names, n_name, rank, n, monster, other)
char scores[][82];
char n_names[][30];
char *n_name;
const char *n_name;
short rank, n;
object *monster;
const object *monster;
int other;
{
short i;
@ -436,7 +436,7 @@ sell_pack()
int
get_value(obj)
object *obj;
const object *obj;
{
short wc;
int val;
@ -507,7 +507,8 @@ id_all()
int
name_cmp(s1, s2)
char *s1, *s2;
char *s1;
const char *s2;
{
short i = 0;
int r;
@ -558,7 +559,8 @@ xxx(st)
void
nickize(buf, score, n_name)
char *buf, *score, *n_name;
char *buf;
const char *score, *n_name;
{
short i = 15, j;
@ -585,7 +587,7 @@ nickize(buf, score, n_name)
void
center(row, buf)
short row;
char *buf;
const char *buf;
{
short margin;

View File

@ -1,4 +1,4 @@
/* $NetBSD: throw.c,v 1.4 1997/10/12 11:46:07 lukem Exp $ */
/* $NetBSD: throw.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)throw.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: throw.c,v 1.4 1997/10/12 11:46:07 lukem Exp $");
__RCSID("$NetBSD: throw.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -269,7 +269,7 @@ void
rand_around(i, r, c)
short i, *r, *c;
{
static char* pos = "\010\007\001\003\004\005\002\006\0";
static char pos[] = "\010\007\001\003\004\005\002\006\0";
static short row, col;
short j;

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.4 1997/10/12 11:46:09 lukem Exp $ */
/* $NetBSD: trap.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)trap.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: trap.c,v 1.4 1997/10/12 11:46:09 lukem Exp $");
__RCSID("$NetBSD: trap.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -63,7 +63,7 @@ trap traps[MAX_TRAPS];
boolean trap_door = 0;
short bear_trap = 0;
char *trap_strings[TRAPS * 2] = {
const char *const trap_strings[TRAPS * 2] = {
"trap door",
"you fell down a trap",
"bear trap",

View File

@ -1,4 +1,4 @@
/* $NetBSD: use.c,v 1.4 1997/10/12 11:46:11 lukem Exp $ */
/* $NetBSD: use.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)use.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: use.c,v 1.4 1997/10/12 11:46:11 lukem Exp $");
__RCSID("$NetBSD: use.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -68,7 +68,7 @@ boolean see_invisible = 0;
short extra_hp = 0;
boolean detect_monster = 0;
boolean con_mon = 0;
char *strange_feeling = "you have a strange feeling for a moment, then it passes";
const char *strange_feeling = "you have a strange feeling for a moment, then it passes";
void
quaff()
@ -594,7 +594,7 @@ go_blind()
mvaddch(rogue.row, rogue.col, rogue.fchar);
}
char *
const char *
get_ench_color()
{
if (halluc) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: zap.c,v 1.4 1997/10/12 11:46:15 lukem Exp $ */
/* $NetBSD: zap.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $ */
/*
* Copyright (c) 1988, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)zap.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: zap.c,v 1.4 1997/10/12 11:46:15 lukem Exp $");
__RCSID("$NetBSD: zap.c,v 1.5 1998/11/10 13:01:32 hubertf Exp $");
#endif
#endif /* not lint */
@ -285,7 +285,8 @@ bounce(ball, dir, row, col, r)
short ball, dir, row, col, r;
{
short orow, ocol;
char buf[DCOLS], *s;
char buf[DCOLS];
const char *s;
short i, ch, new_dir = -1, damage;
static short btime;