diff arogue7/mdport.c @ 219:f9ef86cf22b2

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.
author John "Elwin" Edwards
date Fri, 19 Feb 2016 21:02:28 -0500
parents aa8e1fc62926
children 3d4252fa2ed3
line wrap: on
line diff
--- a/arogue7/mdport.c	Sun Feb 07 14:39:21 2016 -0500
+++ b/arogue7/mdport.c	Fri Feb 19 21:02:28 2016 -0500
@@ -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 @@
 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 @@
 }
 
 int
-md_raw_standend()
+md_raw_standend(void)
 {
 #ifdef _WIN32
     CONSOLE_SCREEN_BUFFER_INFO csbiInfo; 
@@ -209,7 +210,7 @@
 
 
 int
-md_normaluser()
+md_normaluser(void)
 {
 #ifndef _WIN32
     setuid(getuid());
@@ -218,7 +219,7 @@
 }
 
 int
-md_getuid()
+md_getuid(void)
 {
 #ifndef _WIN32
     return( getuid() );
@@ -228,7 +229,7 @@
 }
 
 char *
-md_getusername()
+md_getusername(void)
 {
     static char login[80];
     char *l = NULL;
@@ -263,7 +264,7 @@
 }
 
 char *
-md_gethomedir()
+md_gethomedir(void)
 {
     static char homedir[PATH_MAX];
     char *h = NULL;
@@ -318,7 +319,7 @@
 }
 
 char *
-md_getshell()
+md_getshell(void)
 {
     static char shell[PATH_MAX];
     char *s = NULL;
@@ -346,7 +347,7 @@
 }
 
 int
-md_shellescape()
+md_shellescape(void)
 {
 #if (!defined(_WIN32) && !defined(__DJGPP__))
     int ret_status;
@@ -408,7 +409,7 @@
 }
 
 char *
-md_getroguedir()
+md_getroguedir(void)
 {
     static char path[1024];
     char *end,*home;
@@ -472,8 +473,7 @@
 }
 
 char *
-md_getpass(prompt)
-char *prompt;
+md_getpass(char *prompt)
 {
 #ifdef _WIN32
     static char password_buffer[9];
@@ -568,7 +568,7 @@
 }
 
 int
-md_rand()
+md_rand(void)
 {
 #ifdef _WIN32
     return(rand());
@@ -578,8 +578,7 @@
 }
 
 int
-md_srand(seed)
-register int seed;
+md_srand(int seed)
 {
 #ifdef _WIN32
     srand(seed);
@@ -589,7 +588,7 @@
 }
 
 long
-md_memused()
+md_memused(void)
 {
 #ifdef _WIN32
     MEMORYSTATUS stat;
@@ -603,7 +602,7 @@
 }
 
 char *
-md_gethostname()
+md_gethostname(void)
 {
     static char nodename[80];
     char *n = NULL;
@@ -625,7 +624,7 @@
 }
 
 int
-md_erasechar()
+md_erasechar(void)
 {
 #ifdef BSD
     return(_tty.sg_erase); /* process erase character */
@@ -637,7 +636,7 @@
 }
 
 int
-md_killchar()
+md_killchar(void)
 {
 #ifdef BSD
     return(_tty.sg_kill);
@@ -654,8 +653,7 @@
  */
 
 char *
-md_unctrl(ch)
-char ch;
+md_unctrl(char ch)
 {
 #if USG5_0
     extern char *_unctrl[];		/* Defined in curses library */
@@ -667,7 +665,7 @@
 }
 
 void
-md_flushinp()
+md_flushinp(void)
 {
 #ifdef BSD
     ioctl(0, TIOCFLUSH);