*/
#include "frotz.h"
-f_setup_t f_setup;
+/*f_setup_t f_setup; */
/* Define stuff for stricter Z-code error checking, for the generic
Unix/DOS/etc terminal-window interface. Feel free to change the way
typedef unsigned char zbyte;
typedef unsigned short zword;
+#ifdef MSDOS_16BIT
+typedef unsigned char zchar;
+#else
+typedef unsigned short zchar;
+#endif
+
enum story {
BEYOND_ZORK,
SHERLOCK,
#include "setup.h"
-typedef unsigned char zchar;
-
/*** Constants that may be set at compile time ***/
#ifndef MAX_UNDO_SLOTS
#include <curses.h>
#endif
+#ifndef WIN32
#include <termios.h>
+#endif
#include "ux_frotz.h"
+#include "ux_blorb.h"
f_setup_t f_setup;
u_setup_t u_setup;
char *home;
char configfile[FILENAME_MAX + 1];
+#ifndef WIN32
if ((getuid() == 0) || (geteuid() == 0)) {
printf("I won't run as root!\n");
exit(1);
}
+#endif
+
+#ifdef WIN32
+#define HOMEDIR "USERPROFILE"
+#else
+#define HOMEDIR "HOME"
+#endif
- if ((home = getenv("HOME")) == NULL) {
+ if ((home = getenv(HOMEDIR)) == NULL) {
printf("Hard drive on fire!\n");
exit(1);
}