switch source tree from k&r to c99

This commit is contained in:
nhmall
2021-01-26 21:06:16 -05:00
parent a2a9cb7b4f
commit f963c5aca7
232 changed files with 12099 additions and 17782 deletions
+13 -14
View File
@@ -29,11 +29,11 @@
#endif
#if defined(MICRO) || defined(OS2)
void FDECL(nethack_exit, (int)) NORETURN;
void nethack_exit(int) NORETURN;
#else
#define nethack_exit exit
#endif
static void NDECL(msexit);
static void msexit(void);
#ifdef MOVERLAY
extern void __far __cdecl _movepause(void);
@@ -43,11 +43,12 @@ extern unsigned short __far __cdecl _movefpaused;
#define __MOVE_PAUSE_DISK 2 /* Represents the executable file */
#define __MOVE_PAUSE_CACHE 4 /* Represents the cache memory */
#endif /* MOVERLAY */
FILE * fopenp(const char *name, const char *mode);
#if defined(MICRO)
void
flushout()
flushout(void)
{
(void) fflush(stdout);
return;
@@ -64,9 +65,11 @@ static const char *COMSPEC =
#ifdef SHELL
int
dosh()
dosh(void)
{
#ifndef NOCWD_ASSUMPTIONS
extern char orgdir[];
#endif
char *comspec;
#ifndef __GO32__
int spawnstat;
@@ -132,8 +135,7 @@ dosh()
* be room for the \
*/
void
append_slash(name)
char *name;
append_slash(char *name)
{
char *ptr;
@@ -148,8 +150,7 @@ char *name;
}
void
getreturn(str)
const char *str;
getreturn(const char *str)
{
#ifdef TOS
msmsg("Hit <Return> %s.", str);
@@ -194,8 +195,7 @@ VA_DECL(const char *, fmt)
#endif
FILE *
fopenp(name, mode)
const char *name, *mode;
fopenp(const char *name, const char *mode)
{
char buf[BUFSIZ], *bp, *pp, lastch = 0;
FILE *fp;
@@ -243,8 +243,7 @@ const char *name, *mode;
#if defined(MICRO) || defined(OS2)
void
nethack_exit(code)
int code;
nethack_exit(int code)
{
msexit();
exit(code);
@@ -257,9 +256,9 @@ extern boolean run_from_desktop; /* set in pcmain.c */
#endif
static void
msexit()
msexit(void)
{
#ifdef CHDIR
#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS)
extern char orgdir[];
#endif