diff arogue5/mdport.c @ 218:56e748983fa8

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.
author John "Elwin" Edwards
date Sun, 07 Feb 2016 14:39:21 -0500
parents 61d1c9ac9be7
children 3d4252fa2ed3
line wrap: on
line diff
--- a/arogue5/mdport.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/mdport.c	Sun Feb 07 14:39:21 2016 -0500
@@ -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 @@
 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 @@
 }
 
 int
-md_raw_standend()
+md_raw_standend(void)
 {
 #ifdef _WIN32
     CONSOLE_SCREEN_BUFFER_INFO csbiInfo; 
@@ -223,7 +224,7 @@
 }
 
 int
-md_normaluser()
+md_normaluser(void)
 {
 #ifndef _WIN32
     setuid(getuid());
@@ -232,7 +233,7 @@
 }
 
 int
-md_getuid()
+md_getuid(void)
 {
 #ifndef _WIN32
     return( getuid() );
@@ -242,7 +243,7 @@
 }
 
 char *
-md_getusername()
+md_getusername(void)
 {
     static char login[80];
     char *l = NULL;
@@ -279,7 +280,7 @@
 }
 
 char *
-md_gethomedir()
+md_gethomedir(void)
 {
     static char homedir[PATH_MAX];
     char *h = NULL;
@@ -335,7 +336,7 @@
 }
 
 char *
-md_getshell()
+md_getshell(void)
 {
     static char shell[PATH_MAX];
     char *s = NULL;
@@ -365,7 +366,7 @@
 }
 
 int
-md_shellescape()
+md_shellescape(void)
 {
 #if (!defined(_WIN32) && !defined(__DJGPP__))
     int ret_status;
@@ -427,7 +428,7 @@
 }
 
 char *
-md_getroguedir()
+md_getroguedir(void)
 {
     static char path[1024];
     char *end,*home;
@@ -491,8 +492,7 @@
 }
 
 char *
-md_getpass(prompt)
-char *prompt;
+md_getpass(char *prompt)
 {
 #ifdef _WIN32
     static char password_buffer[9];
@@ -587,7 +587,7 @@
 }
 
 int
-md_rand()
+md_rand(void)
 {
 #ifdef _WIN32
     return(rand());
@@ -597,8 +597,7 @@
 }
 
 int
-md_srand(seed)
-register int seed;
+md_srand(int seed)
 {
 #ifdef _WIN32
     srand(seed);
@@ -608,7 +607,7 @@
 }
 
 long
-md_memused()
+md_memused(void)
 {
 #ifdef _WIN32
     MEMORYSTATUS stat;
@@ -622,7 +621,7 @@
 }
 
 char *
-md_gethostname()
+md_gethostname(void)
 {
     static char nodename[80];
     char *n = NULL;
@@ -644,7 +643,7 @@
 }
 
 int
-md_erasechar()
+md_erasechar(void)
 {
 #ifdef BSD
     return(_tty.sg_erase); /* process erase character */
@@ -656,7 +655,7 @@
 }
 
 int
-md_killchar()
+md_killchar(void)
 {
 #ifdef BSD
     return(_tty.sg_kill);
@@ -673,8 +672,7 @@
  */
 
 char *
-md_unctrl(ch)
-char ch;
+md_unctrl(char ch)
 {
 #if USG5_0
     extern char *_unctrl[];		/* Defined in curses library */
@@ -686,7 +684,7 @@
 }
 
 void
-md_flushinp()
+md_flushinp(void)
 {
 #ifdef BSD
     ioctl(0, TIOCFLUSH);