+// The following defines flight gear options. Because glutlib will also
+// want to parse its own options, those options must not be included here
+// or they will get parsed by the main program option parser. Hence case
+// is significant for any option added that might be in conflict with
+// glutlib's parser.
+//
+// glutlib parses for:
+// -display
+// -direct (invalid in Win32)
+// -geometry
+// -gldebug
+// -iconized
+// -indirect (invalid in Win32)
+// -synce
+//
+// Note that glutlib depends upon strings while this program's
+// option parser wants only initial characters followed by numbers
+// or pathnames.
+//
+const char *fg_cmdargopts = "a:c:Hhp:r:v:x:?";
+//
+// Where
+// -a aircraftfilename aircraft start over ride
+// -c0x0000 - 0xffffffff debug class setting
+// H,h.? help on command line use (does not need Option struct)
+// -p priority
+// -r flightgear root path to program support files
+// -v0 -v1 initial view mode (hud/no_hud currently)
+// -xlogpathname debug logfile name
+//
+// Defaults in arguments to indicate not set on command line.
+// Program defaults set variables from constants if neither command
+// options or environmental variables effect values.
+//
+
+char acArgbuf [ MAXPATH + 1] = "\0";
+int debugArgValue = -2;
+int priorityArgValue = -1;
+char rootArgbuf [ MAXPATH + 1] = "\0";
+int viewArg = -1;
+char logArgbuf [ MAXPATH + 1] = "\0";
+
+// There is a reason for defining the option structs by name and then
+// creating an array of pointers to options. C++ is unfriendly to
+// initializing arrays of objects that are not built in types. Always
+// look forward. (Besides, you can follow what is going on better and
+// add or modify with greater security. -ch
+//
+Option aircraftOption = { 'a',
+ OPT_STRING,
+ acArgbuf,
+ "Startup aircraft pathname override"
+ };
+Option debugOption = { 'c',
+ OPT_LHEX, // Long int (32 bits)
+ &debugArgValue,
+ "Debug trace level"
+ };
+Option priorityOption = { 'p',
+ OPT_INTEGER,
+ &priorityArgValue,
+ "Debug priority Threshold"
+ };
+Option rootOption = { 'r',
+ OPT_STRING,
+ rootArgbuf,
+ "Root directory for execution"
+ };
+Option hudOption = { 'v',
+ OPT_SWITCH,
+ &viewArg,
+ "View mode start" // HUD,Panel,Chase,Tower
+ };
+Option logfileOption = { 'x',
+ OPT_STRING,
+ logArgbuf,
+ "Debug log file name"
+ };
+
+//
+#define OptsDefined 6
+Option *CmdLineOptions[ OptsDefined ] = {
+ &aircraftOption,
+ &debugOption,
+ &hudOption,
+ &priorityOption,
+ &rootOption,
+ &logfileOption
+ };
+
+const char *DefaultRootDir = "\\Flightgear";
+const char *DefaultAircraft = "Navion.acf";
+const char *DefaultDebuglog = "fgdebug.log";
+const int DefaultViewMode = HUD_VIEW;
+//
+// Debug defaults handled in fg_debug.c
+//