print_stat(&def->def.un.enum_decl); f_print(fout, "\tswitch (objp->%s) {\n", def->def.un.enum_decl.name); for (cl = def->def.un.cases; cl != NULL; cl = cl->next) { cs = &cl->case_decl; f_print(fout, "\tcase %s:\n", cl->case_name); if (!streq(cs->type, "void")) { object = alloc(strlen(def->def_name) + strlen(format) + strlen(cs->name) + 1); s_print(object, format, def->def_name, cs->name); print_ifstat(2, cs->prefix, cs->type, cs->rel, cs->array_max, object, cs->name); free(object); } f_print(fout, "\t\tbreak;\n"); } dflt = def->def.un.default_decl; if (dflt != NULL) { if (!streq(dflt->type, "void")) { f_print(fout, "\tdefault:\n"); object = alloc(strlen(def->def_name) + strlen(format) + strlen(dflt->name) + 1); s_print(object, format, def->def_name, dflt->name); print_ifstat(2, dflt->prefix, dflt->type, dflt->rel, dflt->array_max, object, dflt->name); free(object); f_print(fout, "\t\tbreak;\n"); } } else { f_print(fout, "\tdefault:\n"); f_print(fout, "\t\treturn (FALSE);\n"); } f_print(fout, "\t}\n");
print_stat(1,&def->def.un.enum_decl); f_print(fout, "\tswitch (objp->%s) {\n", def->def.un.enum_decl.name); for (cl = def->def.un.cases; cl != NULL; cl = cl->next) {  f_print(fout, "\tcase %s:\n", cl->case_name); if(cl->contflag == 1)	 continue; cs = &cl->case_decl; if (!streq(cs->type, "void")) { object = alloc(strlen(def->def_name) + strlen(format) + strlen(cs->name) + 1); if (isvectordef(cs->type, cs->rel)) { s_print(object, vecformat, def->def_name, cs->name); } else { s_print(object, format, def->def_name, cs->name); } print_ifstat(2, cs->prefix, cs->type, cs->rel, cs->array_max, object, cs->name); free(object); } f_print(fout, "\t\tbreak;\n"); } dflt = def->def.un.default_decl; if (dflt != NULL) { if (!streq(dflt->type, "void")) { f_print(fout, "\tdefault:\n"); object = alloc(strlen(def->def_name) + strlen(format) + strlen(dflt->name) + 1); if (isvectordef(dflt->type, dflt->rel)) { s_print(object, vecformat, def->def_name, dflt->name); } else { s_print(object, format, def->def_name, dflt->name); }  print_ifstat(2, dflt->prefix, dflt->type, dflt->rel, dflt->array_max, object, dflt->name); free(object); f_print(fout, "\t\tbreak;\n"); } #ifdef __GNU_LIBRARY__ else { f_print(fout, "\tdefault:\n"); f_print(fout, "\t\tbreak;\n"); } #endif } else { f_print(fout, "\tdefault:\n"); f_print(fout, "\t\treturn (FALSE);\n"); }  f_print(fout, "\t}\n");
emit_union(def)	definition *def;{	declaration *dflt;	case_list *cl;	declaration *cs;	char *object;	char *format = "&objp->%s_u.%s";	print_stat(&def->def.un.enum_decl);	f_print(fout, "\tswitch (objp->%s) {\n", def->def.un.enum_decl.name);	for (cl = def->def.un.cases; cl != NULL; cl = cl->next) {		cs = &cl->case_decl;		f_print(fout, "\tcase %s:\n", cl->case_name);		if (!streq(cs->type, "void")) {			object = alloc(strlen(def->def_name) + strlen(format) +				       strlen(cs->name) + 1);			s_print(object, format, def->def_name, cs->name);			print_ifstat(2, cs->prefix, cs->type, cs->rel, cs->array_max,				     object, cs->name);			free(object);		}		f_print(fout, "\t\tbreak;\n");	}	dflt = def->def.un.default_decl;	if (dflt != NULL) {		if (!streq(dflt->type, "void")) {			f_print(fout, "\tdefault:\n");			object = alloc(strlen(def->def_name) + strlen(format) +				       strlen(dflt->name) + 1);			s_print(object, format, def->def_name, dflt->name);			print_ifstat(2, dflt->prefix, dflt->type, dflt->rel,				     dflt->array_max, object, dflt->name);			free(object);			f_print(fout, "\t\tbreak;\n");		}	} else {		f_print(fout, "\tdefault:\n");		f_print(fout, "\t\treturn (FALSE);\n");	}	f_print(fout, "\t}\n");}