Advanced Rogue 7: convert to ANSI-style function declarations.

Almost 1500 lines of compiler warnings remain, and the GCC developers
are already working on a new version with even more warnings turned on
by default.
This commit is contained in:
John "Elwin" Edwards 2016-02-19 21:02:28 -05:00
parent f38b2223c8
commit e8e6e604c3
39 changed files with 1181 additions and 889 deletions

View file

@ -65,6 +65,7 @@
#endif
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <fcntl.h>
#include <limits.h>
@ -74,7 +75,7 @@
#define MOD_MOVE(c) (toupper(c) )
void
md_init()
md_init(void)
{
#ifdef __INTERIX
char *term;
@ -107,7 +108,7 @@ md_putchar(int c)
static int md_standout_mode = 0;
int
md_raw_standout()
md_raw_standout(void)
{
#ifdef _WIN32
CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
@ -130,7 +131,7 @@ md_raw_standout()
}
int
md_raw_standend()
md_raw_standend(void)
{
#ifdef _WIN32
CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
@ -209,7 +210,7 @@ md_creat(char *file, int mode)
int
md_normaluser()
md_normaluser(void)
{
#ifndef _WIN32
setuid(getuid());
@ -218,7 +219,7 @@ md_normaluser()
}
int
md_getuid()
md_getuid(void)
{
#ifndef _WIN32
return( getuid() );
@ -228,7 +229,7 @@ md_getuid()
}
char *
md_getusername()
md_getusername(void)
{
static char login[80];
char *l = NULL;
@ -263,7 +264,7 @@ md_getusername()
}
char *
md_gethomedir()
md_gethomedir(void)
{
static char homedir[PATH_MAX];
char *h = NULL;
@ -318,7 +319,7 @@ md_gethomedir()
}
char *
md_getshell()
md_getshell(void)
{
static char shell[PATH_MAX];
char *s = NULL;
@ -346,7 +347,7 @@ md_getshell()
}
int
md_shellescape()
md_shellescape(void)
{
#if (!defined(_WIN32) && !defined(__DJGPP__))
int ret_status;
@ -408,7 +409,7 @@ directory_exists(char *dirname)
}
char *
md_getroguedir()
md_getroguedir(void)
{
static char path[1024];
char *end,*home;
@ -472,8 +473,7 @@ md_crypt(char *key, char *salt)
}
char *
md_getpass(prompt)
char *prompt;
md_getpass(char *prompt)
{
#ifdef _WIN32
static char password_buffer[9];
@ -568,7 +568,7 @@ md_htonl(unsigned long int x)
}
int
md_rand()
md_rand(void)
{
#ifdef _WIN32
return(rand());
@ -578,8 +578,7 @@ md_rand()
}
int
md_srand(seed)
register int seed;
md_srand(int seed)
{
#ifdef _WIN32
srand(seed);
@ -589,7 +588,7 @@ register int seed;
}
long
md_memused()
md_memused(void)
{
#ifdef _WIN32
MEMORYSTATUS stat;
@ -603,7 +602,7 @@ md_memused()
}
char *
md_gethostname()
md_gethostname(void)
{
static char nodename[80];
char *n = NULL;
@ -625,7 +624,7 @@ md_gethostname()
}
int
md_erasechar()
md_erasechar(void)
{
#ifdef BSD
return(_tty.sg_erase); /* process erase character */
@ -637,7 +636,7 @@ md_erasechar()
}
int
md_killchar()
md_killchar(void)
{
#ifdef BSD
return(_tty.sg_kill);
@ -654,8 +653,7 @@ md_killchar()
*/
char *
md_unctrl(ch)
char ch;
md_unctrl(char ch)
{
#if USG5_0
extern char *_unctrl[]; /* Defined in curses library */
@ -667,7 +665,7 @@ char ch;
}
void
md_flushinp()
md_flushinp(void)
{
#ifdef BSD
ioctl(0, TIOCFLUSH);