-enum { O_VERBOSE, O_QUIET, O_DEBUG, O_HELP, O_VERSION };
-
-static struct option my_options[] =
-{
- {"verbose", 0, 0, O_VERBOSE},
- {"quiet", 0, 0, O_QUIET},
- {"debug", 0, 0, O_DEBUG},
- {"help", 0, 0, O_HELP},
- {"version", 0, 0, O_VERSION},
- {0, 0, 0, 0}
-};
-
-static const char* g_szIdStr = "$Id: wdq2wav.cpp,v 1.9 2003/01/21 09:38:59 kevin Exp $";
+const char* g_szIdStr = "$Id$";
+
+bool g_quiet = false;
+bool g_verbose = false;
+bool g_debug = false;
+bool g_ignore_zero = false;
+bool g_dont_demean = false;
+
+
+#ifdef WIN32
+#define lseek _lseek
+#define close _close
+#define open _open
+#define read _read
+#define write _write
+#define O_BINARY _O_BINARY
+#define O_RDONLY _O_RDONLY
+#define O_WRONLY _O_WRONLY
+#define O_RDWR _O_RDRW
+#define O_TRUNC _O_TRUNC
+#define O_CREAT _O_CREAT
+const int g_fileMode = _S_IWRITE | _S_IREAD;
+struct fpos_t std::_Fpz = {0,0};
+#else
+const int g_fileMode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
+// Define as NULL for non-Windows platforms
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+#endif