Fix an assortment of compiler warnings.
A few potential bugs were removed in the process. Much code cleanup remains to be done.
This commit is contained in:
parent
de95b19cee
commit
7d459d7d36
47 changed files with 608 additions and 591 deletions
|
|
@ -238,7 +238,7 @@ do_fuses(int flag)
|
|||
void
|
||||
activity(void)
|
||||
{
|
||||
sprintf(outstring,"Daemons = %d : Fuses = %d : Memory Items = %d : Memory Used = %d",
|
||||
sprintf(outstring,"Daemons = %d : Fuses = %d : Memory Items = %d : Memory Used = %ld",
|
||||
demoncnt,fusecnt,total,md_memused());
|
||||
msg(outstring);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ new(int size)
|
|||
static char errbuf[LINELEN];
|
||||
|
||||
if (space == NULL) {
|
||||
sprintf(errbuf,"Rogue ran out of memory (used = %d, wanted = %d).",
|
||||
sprintf(errbuf,"Rogue ran out of memory (used = %ld, wanted = %d).",
|
||||
md_memused(), size);
|
||||
fatal(errbuf);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ struct cell {
|
|||
};
|
||||
|
||||
struct bordercells {
|
||||
char num_pos; /* number of frontier cells next to you */
|
||||
unsigned char num_pos; /* number of frontier cells next to you */
|
||||
struct cell conn[4]; /* the y,x position of above cell */
|
||||
} border_cells;
|
||||
|
||||
|
|
|
|||
|
|
@ -607,7 +607,7 @@ void writelog(unsigned long amount, int flags, short monst) {
|
|||
else
|
||||
return;
|
||||
|
||||
fprintf(logfile, "%d %d %s %d %s %d %d %d %c %s\n", time(NULL), amount,
|
||||
fprintf(logfile, "%ld %ld %s %d %s %d %d %d %c %s\n", time(NULL), amount,
|
||||
whoami, pstats.s_lvl, class, level, max_level, quest_item, had_quest,
|
||||
fate);
|
||||
fclose(logfile);
|
||||
|
|
|
|||
138
arogue5/rogue.c
138
arogue5/rogue.c
|
|
@ -420,78 +420,78 @@ char *cnames[4][11] = {
|
|||
} ;
|
||||
|
||||
struct h_list helpstr[] = {
|
||||
'?', " prints help",
|
||||
'/', " identify object",
|
||||
'h', " left",
|
||||
'j', " down",
|
||||
'k', " up",
|
||||
'l', " right",
|
||||
'y', " up & left",
|
||||
'u', " up & right",
|
||||
'b', " down & left",
|
||||
'n', " down & right",
|
||||
'H', " run left",
|
||||
'J', " run down",
|
||||
'K', " run up",
|
||||
'L', " run right",
|
||||
'Y', " run up & left",
|
||||
'U', " run up & right",
|
||||
'B', " run down & left",
|
||||
'N', " run down & right",
|
||||
't', "<dir> throw something",
|
||||
'f', "<dir> forward until find something",
|
||||
'z', "<dir> zap a wand or staff",
|
||||
'>', " go down a staircase",
|
||||
'<', " go up a staircase",
|
||||
's', " search for trap/secret door",
|
||||
'.', " rest for a while",
|
||||
'i', " inventory",
|
||||
'I', " inventory single item",
|
||||
'q', " quaff potion",
|
||||
'r', " read paper",
|
||||
'e', " eat food",
|
||||
'w', " wield a weapon",
|
||||
'W', " wear something",
|
||||
'T', " take off something",
|
||||
'd', " drop object",
|
||||
'P', " pick up object(s)",
|
||||
'c', " call object (generic)",
|
||||
'm', " mark object (specific)",
|
||||
'o', " examine/set options",
|
||||
'C', " cast a spell",
|
||||
'p', " pray",
|
||||
'a', " affect the undead",
|
||||
'^', " set a trap",
|
||||
'G', " sense gold",
|
||||
'D', " dip something (into a pool)",
|
||||
CTRL('T'), "<dir> take (steal) from (direction)",
|
||||
CTRL('U'), " use miscellaneous magic item",
|
||||
CTRL('L'), " redraw screen",
|
||||
CTRL('R'), " repeat last message",
|
||||
ESCAPE, " cancel command",
|
||||
'v', " print program version number",
|
||||
'!', " shell escape",
|
||||
'S', " save game",
|
||||
'Q', " quit",
|
||||
0, 0
|
||||
{ '?', " prints help" },
|
||||
{ '/', " identify object" },
|
||||
{ 'h', " left" },
|
||||
{ 'j', " down" },
|
||||
{ 'k', " up" },
|
||||
{ 'l', " right" },
|
||||
{ 'y', " up & left" },
|
||||
{ 'u', " up & right" },
|
||||
{ 'b', " down & left" },
|
||||
{ 'n', " down & right" },
|
||||
{ 'H', " run left" },
|
||||
{ 'J', " run down" },
|
||||
{ 'K', " run up" },
|
||||
{ 'L', " run right" },
|
||||
{ 'Y', " run up & left" },
|
||||
{ 'U', " run up & right" },
|
||||
{ 'B', " run down & left" },
|
||||
{ 'N', " run down & right" },
|
||||
{ 't', "<dir> throw something" },
|
||||
{ 'f', "<dir> forward until find something" },
|
||||
{ 'z', "<dir> zap a wand or staff" },
|
||||
{ '>', " go down a staircase" },
|
||||
{ '<', " go up a staircase" },
|
||||
{ 's', " search for trap/secret door" },
|
||||
{ '.', " rest for a while" },
|
||||
{ 'i', " inventory" },
|
||||
{ 'I', " inventory single item" },
|
||||
{ 'q', " quaff potion" },
|
||||
{ 'r', " read paper" },
|
||||
{ 'e', " eat food" },
|
||||
{ 'w', " wield a weapon" },
|
||||
{ 'W', " wear something" },
|
||||
{ 'T', " take off something" },
|
||||
{ 'd', " drop object" },
|
||||
{ 'P', " pick up object(s)" },
|
||||
{ 'c', " call object (generic)" },
|
||||
{ 'm', " mark object (specific)" },
|
||||
{ 'o', " examine/set options" },
|
||||
{ 'C', " cast a spell" },
|
||||
{ 'p', " pray" },
|
||||
{ 'a', " affect the undead" },
|
||||
{ '^', " set a trap" },
|
||||
{ 'G', " sense gold" },
|
||||
{ 'D', " dip something (into a pool)" },
|
||||
{ CTRL('T'), "<dir> take (steal) from (direction)" },
|
||||
{ CTRL('U'), " use miscellaneous magic item" },
|
||||
{ CTRL('L'), " redraw screen" },
|
||||
{ CTRL('R'), " repeat last message" },
|
||||
{ ESCAPE, " cancel command" },
|
||||
{ 'v', " print program version number" },
|
||||
{ '!', " shell escape" },
|
||||
{ 'S', " save game" },
|
||||
{ 'Q', " quit" },
|
||||
{ 0, 0 }
|
||||
} ;
|
||||
|
||||
struct h_list wiz_help[] = {
|
||||
CTRL('A'), " system activity",
|
||||
CTRL('C'), " move to another dungeon level",
|
||||
CTRL('D'), " down 1 dungeon level",
|
||||
CTRL('E'), " food remaining",
|
||||
CTRL('F'), " display entire level",
|
||||
CTRL('H'), " jump 9 experience levels",
|
||||
CTRL('I'), " inventory of level",
|
||||
CTRL('J'), " teleport",
|
||||
CTRL('N'), " recharge staff",
|
||||
CTRL('P'), " toggle wizard status",
|
||||
CTRL('U'), " up 1 dungeon level",
|
||||
CTRL('X'), " detect monsters",
|
||||
CTRL('Z'), " identify",
|
||||
'M', " make object",
|
||||
0, 0
|
||||
{ CTRL('A'), " system activity" },
|
||||
{ CTRL('C'), " move to another dungeon level" },
|
||||
{ CTRL('D'), " down 1 dungeon level" },
|
||||
{ CTRL('E'), " food remaining" },
|
||||
{ CTRL('F'), " display entire level" },
|
||||
{ CTRL('H'), " jump 9 experience levels" },
|
||||
{ CTRL('I'), " inventory of level" },
|
||||
{ CTRL('J'), " teleport" },
|
||||
{ CTRL('N'), " recharge staff" },
|
||||
{ CTRL('P'), " toggle wizard status" },
|
||||
{ CTRL('U'), " up 1 dungeon level" },
|
||||
{ CTRL('X'), " detect monsters" },
|
||||
{ CTRL('Z'), " identify" },
|
||||
{ 'M', " make object" },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue