Advanced Rogue 5: convert to ANSI function declarations.
This still leaves over a thousand lines of warning messages, mostly related to the return types of daemons and fuses.
This commit is contained in:
parent
59f448e92e
commit
f38b2223c8
37 changed files with 977 additions and 733 deletions
|
|
@ -55,6 +55,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
#define PATH_MAX MAX_PATH
|
||||
|
|
@ -81,7 +82,7 @@
|
|||
#define MOD_MOVE(c) (toupper(c) )
|
||||
|
||||
void
|
||||
md_init()
|
||||
md_init(void)
|
||||
{
|
||||
#ifdef __INTERIX
|
||||
char *term;
|
||||
|
|
@ -132,7 +133,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;
|
||||
|
|
@ -155,7 +156,7 @@ md_raw_standout()
|
|||
}
|
||||
|
||||
int
|
||||
md_raw_standend()
|
||||
md_raw_standend(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbiInfo;
|
||||
|
|
@ -223,7 +224,7 @@ md_fdopen(int fd, char *mode)
|
|||
}
|
||||
|
||||
int
|
||||
md_normaluser()
|
||||
md_normaluser(void)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
setuid(getuid());
|
||||
|
|
@ -232,7 +233,7 @@ md_normaluser()
|
|||
}
|
||||
|
||||
int
|
||||
md_getuid()
|
||||
md_getuid(void)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
return( getuid() );
|
||||
|
|
@ -242,7 +243,7 @@ md_getuid()
|
|||
}
|
||||
|
||||
char *
|
||||
md_getusername()
|
||||
md_getusername(void)
|
||||
{
|
||||
static char login[80];
|
||||
char *l = NULL;
|
||||
|
|
@ -279,7 +280,7 @@ md_getusername()
|
|||
}
|
||||
|
||||
char *
|
||||
md_gethomedir()
|
||||
md_gethomedir(void)
|
||||
{
|
||||
static char homedir[PATH_MAX];
|
||||
char *h = NULL;
|
||||
|
|
@ -335,7 +336,7 @@ md_gethomedir()
|
|||
}
|
||||
|
||||
char *
|
||||
md_getshell()
|
||||
md_getshell(void)
|
||||
{
|
||||
static char shell[PATH_MAX];
|
||||
char *s = NULL;
|
||||
|
|
@ -365,7 +366,7 @@ md_getshell()
|
|||
}
|
||||
|
||||
int
|
||||
md_shellescape()
|
||||
md_shellescape(void)
|
||||
{
|
||||
#if (!defined(_WIN32) && !defined(__DJGPP__))
|
||||
int ret_status;
|
||||
|
|
@ -427,7 +428,7 @@ directory_exists(char *dirname)
|
|||
}
|
||||
|
||||
char *
|
||||
md_getroguedir()
|
||||
md_getroguedir(void)
|
||||
{
|
||||
static char path[1024];
|
||||
char *end,*home;
|
||||
|
|
@ -491,8 +492,7 @@ md_crypt(char *key, char *salt)
|
|||
}
|
||||
|
||||
char *
|
||||
md_getpass(prompt)
|
||||
char *prompt;
|
||||
md_getpass(char *prompt)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
static char password_buffer[9];
|
||||
|
|
@ -587,7 +587,7 @@ md_htonl(unsigned long int x)
|
|||
}
|
||||
|
||||
int
|
||||
md_rand()
|
||||
md_rand(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return(rand());
|
||||
|
|
@ -597,8 +597,7 @@ md_rand()
|
|||
}
|
||||
|
||||
int
|
||||
md_srand(seed)
|
||||
register int seed;
|
||||
md_srand(int seed)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
srand(seed);
|
||||
|
|
@ -608,7 +607,7 @@ register int seed;
|
|||
}
|
||||
|
||||
long
|
||||
md_memused()
|
||||
md_memused(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
MEMORYSTATUS stat;
|
||||
|
|
@ -622,7 +621,7 @@ md_memused()
|
|||
}
|
||||
|
||||
char *
|
||||
md_gethostname()
|
||||
md_gethostname(void)
|
||||
{
|
||||
static char nodename[80];
|
||||
char *n = NULL;
|
||||
|
|
@ -644,7 +643,7 @@ md_gethostname()
|
|||
}
|
||||
|
||||
int
|
||||
md_erasechar()
|
||||
md_erasechar(void)
|
||||
{
|
||||
#ifdef BSD
|
||||
return(_tty.sg_erase); /* process erase character */
|
||||
|
|
@ -656,7 +655,7 @@ md_erasechar()
|
|||
}
|
||||
|
||||
int
|
||||
md_killchar()
|
||||
md_killchar(void)
|
||||
{
|
||||
#ifdef BSD
|
||||
return(_tty.sg_kill);
|
||||
|
|
@ -673,8 +672,7 @@ md_killchar()
|
|||
*/
|
||||
|
||||
char *
|
||||
md_unctrl(ch)
|
||||
char ch;
|
||||
md_unctrl(char ch)
|
||||
{
|
||||
#if USG5_0
|
||||
extern char *_unctrl[]; /* Defined in curses library */
|
||||
|
|
@ -686,7 +684,7 @@ char ch;
|
|||
}
|
||||
|
||||
void
|
||||
md_flushinp()
|
||||
md_flushinp(void)
|
||||
{
|
||||
#ifdef BSD
|
||||
ioctl(0, TIOCFLUSH);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue