rem: while ((c = getopt_long(argc, argv, "r:d:foc:spn:?hM:S:T:emq:ua:", long_options, &option_index)) != -1)
add: while ((c = getopt_long(argc, argv, "r:d:foc:spn:?hM:S:T:m:q:ua:", long_options, &option_index)) != -1)
context: main (int argc, char *argv[]){	int gfxdriver = TFB_GFXDRIVER_SDL_PURE;	int gfxflags = 0;	int soundflags = TFB_SOUNDFLAGS_MQAUDIO;	int width = 640, height = 480, bpp = 16;	int vol;	int val;	char contentdir[1000];	enum	{		CSCAN_OPT = 1000,		MENU_OPT,		FONT_OPT	};	int option_index = 0, c;	static struct option long_options[] = 	{		{"res", 1, NULL, 'r'},		{"bpp", 1, NULL, 'd'},		{"fullscreen", 0, NULL, 'f'},		{"opengl", 0, NULL, 'o'},		{"scale", 1, NULL, 'c'},		{"scanlines", 0, NULL, 's'},		{"fps", 0, NULL, 'p'},		{"contentdir", 1, NULL, 'n'},		{"help", 0, NULL, 'h'},		{"musicvol", 1, NULL, 'M'},		{"sfxvol", 1, NULL, 'S'},		{"speechvol", 1, NULL, 'T'},		{"audioquality", 1, NULL, 'q'},		{"nosubtitles", 0, NULL, 'u'},		{"music", 1, NULL, 'm'},		//  options with no short equivalent		{"cscan", 1, NULL, CSCAN_OPT},		{"menu", 1, NULL, MENU_OPT},		{"font", 1, NULL, FONT_OPT},		{0, 0, 0, 0}	};	fprintf (stderr, "The Ur-Quan Masters v%d.%d (compiled %s %s)\n", UQM_MAJOR_VERSION, UQM_MINOR_VERSION, __DATE__, __TIME__);#ifdef CONTENTDIR	strcpy (contentdir, CONTENTDIR);#elif defined (win32)	strcpy (contentdir, "../../content");#else	strcpy (contentdir, "content");#endif	while ((c = getopt_long(argc, argv, "r:d:foc:spn:?hM:S:T:emq:ua:", long_options, &option_index)) != -1)	{		switch (c) {			case 'r':				sscanf(optarg, "%dx%d", &width, &height);			break;			case 'd':				sscanf(optarg, "%d", &bpp);			break;			case 'f':				gfxflags |= TFB_GFXFLAGS_FULLSCREEN;			break;			case 'o':				gfxdriver = TFB_GFXDRIVER_SDL_OPENGL;			break;			case 'c':				if (!strcmp (optarg, "bilinear"))				{					gfxflags |= TFB_GFXFLAGS_SCALE_BILINEAR;				}				else if (!strcmp (optarg, "biadapt"))				{					gfxflags |= TFB_GFXFLAGS_SCALE_BIADAPT;				}			break;			case 's':				gfxflags |= TFB_GFXFLAGS_SCANLINES;			break;			case 'p':				gfxflags |= TFB_GFXFLAGS_SHOWFPS;			break;			case 'n':				sscanf(optarg, "%s", contentdir);			break;			case 'M':				sscanf(optarg, "%d", &vol);				if (vol < 0)					vol = 0;				if (vol > 100)					vol = 100;				musicVolumeScale = vol / 100.0f;			break;			case 'S':				sscanf(optarg, "%d", &vol);				if (vol < 0)					vol = 0;				if (vol > 100)					vol = 100;				sfxVolumeScale = vol / 100.0f;			break;			case 'T':				sscanf(optarg, "%d", &vol);				if (vol < 0)					vol = 0;				if (vol > 100)					vol = 100;				speechVolumeScale = vol / 100.0f;			break;			case 'q':				if (!strcmp (optarg, "high"))				{					soundflags &= ~(TFB_SOUNDFLAGS_MQAUDIO|TFB_SOUNDFLAGS_LQAUDIO);					soundflags |= TFB_SOUNDFLAGS_HQAUDIO;				}				else if (!strcmp (optarg, "medium"))				{					soundflags &= ~(TFB_SOUNDFLAGS_HQAUDIO|TFB_SOUNDFLAGS_LQAUDIO);					soundflags |= TFB_SOUNDFLAGS_MQAUDIO;				}				else if (!strcmp (optarg, "low"))				{					soundflags &= ~(TFB_SOUNDFLAGS_HQAUDIO|TFB_SOUNDFLAGS_MQAUDIO);					soundflags |= TFB_SOUNDFLAGS_LQAUDIO;				}			break;		    case 'u':			    optSubtitles = FALSE;			break;			case 'm':				if ((val = Check_PC_3DO_opt (optarg, 						OPT_PC | OPT_3DO, 						(char *)long_options[option_index].name)) != -1)					optWhichMusic = val;			break;			case CSCAN_OPT:				if ((val = Check_PC_3DO_opt (optarg, 						OPT_PC | OPT_3DO, 						(char *)long_options[option_index].name)) != -1)					optWhichCoarseScan = val;			break;			case MENU_OPT:				if ((val = Check_PC_3DO_opt (optarg, 						OPT_PC | OPT_3DO, 						(char *)long_options[option_index].name)) != -1)					optWhichMenu = val;			break;			case FONT_OPT:				if ((val = Check_PC_3DO_opt (optarg, 						OPT_PC | OPT_3DO, 						(char *)long_options[option_index].name)) != -1)					optWhichFonts = val;			break;			default:				printf ("\nOption %s not found!\n", long_options[option_index].name);			case '?':			case 'h':				printf("\nOptions:\n");				printf("  -r, --res=WIDTHxHEIGHT (default 640x480, bigger works only with --opengl)\n");				printf("  -d, --bpp=BITSPERPIXEL (default 16)\n");				printf("  -f, --fullscreen (default off)\n");				printf("  -o, --opengl (default off)\n");				printf("  -c, --scale=mode (bilinear or biadapt, default is none)\n");				printf("  -s, --scanlines (default off)\n");				printf("  -p, --fps (default off)\n");				printf("  -n, --contentdir=CONTENTDIR\n");				printf("  -M, --musicvol=VOLUME (0-100, default 100)\n");				printf("  -S, --sfxvol=VOLUME (0-100, default 100)\n");				printf("  -T, --speechvol=VOLUME (0-100, default 100)\n");				printf("  -q, --audioquality=QUALITY (high, medium or low, default medium)\n");				printf("  -u, --nosubtitles\n");				printf("The following options can take either '3do' or 'pc' as an option:\n");				printf("  -m, --music : Music version (default 3do)\n");				printf("  --cscan     : coarse-scan display, pc=text, 3do=hieroglyphs (default 3do)\n");				printf("  --menu      : menu type, pc=text, 3do=graphical (default 3do)\n");				printf("  --font      : font types and colors (default 3do)\n");				return 0;			break;		}	}		initTempDir();	CDToContentDir (contentdir);	prepareConfigDir();	prepareMeleeDir();	prepareSaveDir();		InitThreadSystem ();	InitTimeSystem ();	InitTaskSystem ();	mem_init ();	GraphicsSem = CreateSemaphore (1, "Graphics");	RenderingCond = CreateCondVar ();	init_xform_control ();	TFB_InitGraphics (gfxdriver, gfxflags, width, height, bpp);	TFB_InitSound (TFB_SOUNDDRIVER_SDL, soundflags);	TFB_InitInput (TFB_INPUTDRIVER_SDL, 0);	AssignTask (Starcon2Main, 1024, "Starcon2Main");	for (;;)	{		TFB_ProcessEvents ();		TFB_FlushGraphics ();	}	unInitTempDir();	exit(EXIT_SUCCESS);}