Replace fDATIME with ANSI/POSIX clock_gettime(). Rip out DOS/AMIGA shims.
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index 6977bc5d06c4eea1253d0113cb88fd16e1ee587d..54b33da625cc88a63c8085b4c0a27518fe3b538b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1,16 +1,23 @@
+/*
+ * The author - Don Woods - apologises for the style of the code; it
+ * is a result of running the original Fortran IV source through a
+ * home-brew Fortran-to-C converter.)
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include "main.h"
+
 #include "misc.h"
-#ifdef __MSDOS__
-#include "alloc.h"
-#endif
 
 #define TRUE  (0==0)
 #define FALSE (0!=0)
+
 long ABB[186], ATAB[331], ATLOC[186], BLKLIN = TRUE, DFLAG,
                DLOC[7], FIXED[101], HOLDNG,
                KTAB[331], *LINES, LINK[201], LNLENG, LNPOSN,
                PARMS[26], PLACE[101], PTEXT[101], RTEXT[278],
                SETUP = 0, TABSIZ = 330;
-char INLINE[101], MAP1[129], MAP2[129];
+signed char INLINE[LINESIZE], MAP1[129], MAP2[129];
 
 long ABBNUM, ACTSPK[36], AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, BONUS,
                 BOTTLE, CAGE, CAVE, CAVITY, CHAIN, CHASM, CHEST, CHLOC, CHLOC2,
@@ -35,15 +42,15 @@ long ABBNUM, ACTSPK[36], AMBER, ATTACK, AXE, BACK, BATTER, BEAR, BIRD, BLOOD, BO
                VOLCAN, VRBSIZ = 35, VRSION = 25, WATER, WD1, WD1X, WD2, WD2X,
                WZDARK = FALSE, ZZWORD;
 
-extern initialise();
+extern void initialise();
 extern void score(long);
-extern action(long);
+extern int action(long);
 
 /*
  * MAIN PROGRAM
  */
 
-main() {
+int main(int argc, char *argv[]) {
 
 /*  ADVENTURE (REV 2: 20 TREASURES) */