remove goto
This commit is contained in:
+14
-11
@@ -2907,10 +2907,12 @@ void Type_Description( const Type t, char * buf ) {
|
||||
** Other redefined types and aggregate types may be declared here.
|
||||
** Side Effects:
|
||||
** Status: 16-Mar-1993 kcm; updated 04-Feb-1997 dar
|
||||
** Dec 2011 - MAP - remove goto
|
||||
**************************************************************************/
|
||||
void TYPEprint_typedefs( Type t, FILE * classes ) {
|
||||
char nm [BUFSIZ];
|
||||
Type i;
|
||||
bool aggrNot1d = true; //added so I can get rid of a goto
|
||||
|
||||
/* Print the typedef statement (poss also a forward class def: */
|
||||
if( TYPEis_enumeration( t ) ) {
|
||||
@@ -2948,22 +2950,23 @@ void TYPEprint_typedefs( Type t, FILE * classes ) {
|
||||
// loop at the end (in multpass.c). 2d aggrs (or higher), how-
|
||||
// ever, can be processed now - they only require GenericAggr
|
||||
// for their definition here. */
|
||||
goto externln;
|
||||
aggrNot1d = false;
|
||||
}
|
||||
}
|
||||
/* At this point, we'll print typedefs for types which are redefined
|
||||
// fundamental types and their aggregates, and for 2D aggregates(aggre-
|
||||
// gates of aggregates) of enum's and selects. */
|
||||
strncpy( nm, ClassName( TYPEget_name( t ) ), BUFSIZ );
|
||||
fprintf( classes, "typedef %s %s;\n", TYPEget_ctype( t ), nm );
|
||||
if( TYPEis_aggregate( t ) ) {
|
||||
fprintf( classes, "typedef %s * %sH;\n", nm, nm );
|
||||
fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
|
||||
fprintf( classes, "typedef %s_ptr %s_var;\n", nm, nm );
|
||||
if( aggrNot1d ) {
|
||||
/* At this point, we'll print typedefs for types which are redefined
|
||||
// fundamental types and their aggregates, and for 2D aggregates(aggre-
|
||||
// gates of aggregates) of enum's and selects. */
|
||||
strncpy( nm, ClassName( TYPEget_name( t ) ), BUFSIZ );
|
||||
fprintf( classes, "typedef %s %s;\n", TYPEget_ctype( t ), nm );
|
||||
if( TYPEis_aggregate( t ) ) {
|
||||
fprintf( classes, "typedef %s * %sH;\n", nm, nm );
|
||||
fprintf( classes, "typedef %s * %s_ptr;\n", nm, nm );
|
||||
fprintf( classes, "typedef %s_ptr %s_var;\n", nm, nm );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
externln:
|
||||
/* Print the extern statement: */
|
||||
strncpy( nm, TYPEtd_name( t ), BUFSIZ );
|
||||
fprintf( classes, "extern %s *%s;\n", GetTypeDescriptorName( t ), nm );
|
||||
|
||||
Reference in New Issue
Block a user