ofstream out(outname, ios::binary|ios::out);
std::ofstream out(outname, ios::binary|ios::out);
int main	(	int argc,	char **argv	)	{	extern int yyparse();	extern FILE *yyin;	char *src;	char outbuf[256];	char *outname = 0;	static char *optstring = "o:I:";	extern int optind, opterr, optopt;	extern char *optarg;	opterr = 0;			// Don't let getopt() print errs.	int optchr;	while ((optchr = getopt(argc, argv, optstring)) != -1)		switch (optchr)			{		case 'o':		// Output to write.			outname = optarg;			break;		case 'I':		// Include dir.			include_dirs.push_back(optarg);			break;			}	if (optind < argc)		// Filename?		{		src = argv[optind];		yyin = fopen(argv[optind], "r");		if (!outname)		// No -o option?			{		// Set up output name.			outname = strncpy(outbuf, src, sizeof(outbuf) - 5);			outbuf[sizeof(outbuf) - 5] = 0;			char *dot = strrchr(outname, '.');			if (!dot)				dot = outname + strlen(outname);			strcpy(dot, ".uco");			}		}	else		{		src = "<stdin>";		yyin = stdin;		if (!outname)			outname = strcpy(outbuf, "a.ucout");		}	Uc_location::set_cur(src, 0);					// For now, use black gate.	Uc_function::set_intrinsics(Uc_function::bg);#if 0//++++TESTING	int tok;	extern int yylex();	while ((tok = yylex()) != EOF)		printf("%d\n", tok);#endif	yyparse();	int errs = Uc_location::get_num_errors();	if (errs > 0)			// Check for errors.		return errs;					// Open output.	ofstream out(outname, ios::binary|ios::out);	for (std::vector<Uc_function *>::iterator it = functions.begin();					it != functions.end(); it++)		{		Uc_function *fun = *it;		fun->gen(out);		// Generate function.		}	return Uc_location::get_num_errors();	}