XRogue: convert to ANSI-style function declarations.
This commit is contained in:
parent
e8e6e604c3
commit
2853120387
41 changed files with 1281 additions and 908 deletions
|
|
@ -27,10 +27,13 @@
|
|||
#include "rogue.h"
|
||||
|
||||
void open_records(void);
|
||||
bool too_much(void);
|
||||
bool author(void);
|
||||
bool playtime(void);
|
||||
bool betaover(void);
|
||||
|
||||
main(argc, argv, envp)
|
||||
char **argv;
|
||||
char **envp;
|
||||
int
|
||||
main(int argc, char *argv[], char *envp[])
|
||||
{
|
||||
register char *env;
|
||||
time_t now;
|
||||
|
|
@ -283,10 +286,8 @@ char **envp;
|
|||
* Exit the program abnormally.
|
||||
*/
|
||||
|
||||
/*UNUSED*/
|
||||
void
|
||||
endit(sig)
|
||||
int sig;
|
||||
endit(int sig)
|
||||
{
|
||||
NOOP(sig);
|
||||
fatal("Ok, if you want to exit that badly, I'll have to allow it\n");
|
||||
|
|
@ -297,8 +298,8 @@ int sig;
|
|||
* Exit the program, printing a message.
|
||||
*/
|
||||
|
||||
fatal(s)
|
||||
char *s;
|
||||
void
|
||||
fatal(char *s)
|
||||
{
|
||||
clear();
|
||||
move(lines-2, 0);
|
||||
|
|
@ -313,8 +314,8 @@ char *s;
|
|||
* Pick a very random number.
|
||||
*/
|
||||
|
||||
rnd(range)
|
||||
register int range;
|
||||
int
|
||||
rnd(int range)
|
||||
{
|
||||
return( md_rand(range) );
|
||||
}
|
||||
|
|
@ -324,8 +325,8 @@ register int range;
|
|||
* roll a number of dice
|
||||
*/
|
||||
|
||||
roll(number, sides)
|
||||
register int number, sides;
|
||||
int
|
||||
roll(int number, int sides)
|
||||
{
|
||||
register int dtotal = 0;
|
||||
|
||||
|
|
@ -334,7 +335,8 @@ register int number, sides;
|
|||
return dtotal;
|
||||
}
|
||||
|
||||
setup()
|
||||
void
|
||||
setup(void)
|
||||
{
|
||||
md_setup();
|
||||
}
|
||||
|
|
@ -345,7 +347,8 @@ setup()
|
|||
* refreshing things and looking at the proper times.
|
||||
*/
|
||||
|
||||
playit()
|
||||
void
|
||||
playit(void)
|
||||
{
|
||||
register char *opts;
|
||||
|
||||
|
|
@ -366,7 +369,8 @@ playit()
|
|||
* see if the system is being used too much for this game
|
||||
*/
|
||||
|
||||
too_much()
|
||||
bool
|
||||
too_much(void)
|
||||
{
|
||||
/* we no longer do load checking or user counts */
|
||||
return(FALSE);
|
||||
|
|
@ -377,7 +381,8 @@ too_much()
|
|||
* See if a user is an author of the program
|
||||
*/
|
||||
|
||||
author()
|
||||
bool
|
||||
author(void)
|
||||
{
|
||||
switch (md_getuid()) {
|
||||
case 0: /* always OK for root to play */
|
||||
|
|
@ -392,7 +397,8 @@ author()
|
|||
* Returns TRUE when it is a good time to play rogue
|
||||
*/
|
||||
|
||||
playtime()
|
||||
bool
|
||||
playtime(void)
|
||||
{
|
||||
/* we no longer do playtime checking */
|
||||
|
||||
|
|
@ -404,14 +410,15 @@ playtime()
|
|||
* Returns TRUE if the test period of this version of the game is over
|
||||
*/
|
||||
|
||||
betaover()
|
||||
bool
|
||||
betaover(void)
|
||||
{
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
||||
exit_game(flag)
|
||||
int flag;
|
||||
void
|
||||
exit_game(int flag)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue