Various cleanups.
[open-adventure.git] / cheat.c
diff --git a/cheat.c b/cheat.c
index 4643462c1a659b0497ba34b024941660f6897481..d1e45e00a418675a1c50087c7b63d6de24c98a30 100644 (file)
--- a/cheat.c
+++ b/cheat.c
@@ -1,4 +1,3 @@
-#define DEFINE_GLOBALS_FROM_INCLUDES
 #include <getopt.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -10,9 +9,6 @@
 
 struct game_t game;
 
-long LNLENG, LNPOSN;
-char rawbuf[LINESIZE], INLINE[LINESIZE + 1];
-
 FILE  *logfp = NULL, *rfp = NULL;
 bool oldstyle = false;
 bool editline = true;
@@ -54,7 +50,7 @@ int main(int argc, char *argv[])
                     "        -v version number of save format.\n");
             fprintf(stderr,
                     "        -o file name of save game to write.\n");
-            exit(-1);
+            exit(EXIT_FAILURE);
             break;
         }
     }
@@ -64,7 +60,7 @@ int main(int argc, char *argv[])
                 usage, argv[0]);
         fprintf(stderr,
                 "ERROR: filename required\n");
-        exit(-1);
+        exit(EXIT_FAILURE);
     }
 
     FILE *fp = NULL;
@@ -92,7 +88,7 @@ int main(int argc, char *argv[])
     if (fp == NULL) {
         fprintf(stderr,
                 "Can't open file %s. Exiting.\n", savefilename);
-        exit(-1);
+        exit(EXIT_FAILURE);
     }
 
     savefile(fp, version);