eliminate "backwards compatibility" types from type.h, remove unused func
Removed macros and typedefs from type.h Removed unused function from type.c that used those macros, and replaced the macros where used in fedex_plus/. For example: sed -i -e 's/Class_Integer_Type/integer_/g;' * The typedefs were not in use anywhere.
This commit is contained in:
@@ -126,39 +126,12 @@ typedef struct TypeHead_ * TypeHead;
|
||||
typedef struct TypeBody_ * TypeBody;
|
||||
typedef enum type_enum TypeType;
|
||||
|
||||
/* following are all for backwards compatibility - not otherwise necessary */
|
||||
typedef Type Aggregate_Type, Composed_Type, Sized_Type, Type_Reference;
|
||||
typedef Aggregate_Type Array_Type, List_Type, Bag_Type;
|
||||
typedef Bag_Type Set_Type;
|
||||
typedef Composed_Type Entity_Type, Enumeration_Type, Select_Type;
|
||||
typedef Sized_Type Integer_Type, Real_Type, String_Type, Binary_Type;
|
||||
|
||||
/* provide a replacement for Class */
|
||||
typedef enum type_enum Class_Of_Type;
|
||||
typedef enum type_enum Class;
|
||||
#define OBJget_class(typ) ((typ)->u.type->body->type)
|
||||
#define CLASSinherits_from TYPEinherits_from
|
||||
|
||||
/* backwards compatibility */
|
||||
#define Class_Integer_Type integer_
|
||||
#define Class_Number_Type number_
|
||||
#define Class_Real_Type real_
|
||||
#define Class_Entity_Type entity_
|
||||
#define Class_Entity_List_Type entity_list_
|
||||
#define Class_Enumeration_Type enumeration_
|
||||
#define Class_Boolean_Type boolean_
|
||||
#define Class_Logical_Type logical_
|
||||
#define Class_Binary_Type binary_
|
||||
#define Class_String_Type string_
|
||||
#define Class_Array_Type array_
|
||||
#define Class_List_Type list_
|
||||
#define Class_Set_Type set_
|
||||
#define Class_Bag_Type bag_
|
||||
#define Class_Generic_Type generic_
|
||||
#define Class_Select_Type select_
|
||||
#define Class_Reference_Type reference_
|
||||
#define Class_Aggregate_Type aggregate_
|
||||
|
||||
/****************/
|
||||
/* modules used */
|
||||
/****************/
|
||||
|
||||
+6
-90
@@ -390,97 +390,13 @@ TYPEinitialize() {
|
||||
ERRORcreate( "Undefined type tag %s", SEVERITY_ERROR );
|
||||
}
|
||||
|
||||
/*
|
||||
** Procedure: TYPEget_size
|
||||
** Parameters: Type type - type to examine
|
||||
** Returns: Boolean - logical size of a type instance
|
||||
** Description: Compute the size of an instance of some type.
|
||||
**
|
||||
** Notes: Simple types all have size 1, as does a select type.
|
||||
** The size of an aggregate type is the maximum number
|
||||
** of elements an instance can contain; and the size of
|
||||
** an entity type is its total attribute count.
|
||||
*/
|
||||
|
||||
int
|
||||
TYPEget_size( Type type ) {
|
||||
Class class;
|
||||
int size;
|
||||
Expression upper;
|
||||
Error experrc;
|
||||
|
||||
class = OBJget_class( type );
|
||||
if( class == Class_Select_Type ) {
|
||||
fprintf( stderr, "NOTICE: TYPEget_size(Select_Type) called\n" );
|
||||
return 1;
|
||||
} else if( class == Class_String_Type ) {
|
||||
return 1;
|
||||
} else if( ( class == Class_Enumeration_Type ) ||
|
||||
( class == Class_Generic_Type ) ||
|
||||
( class == Class_Number_Type ) ||
|
||||
TYPEinherits_from( type, Class_Logical_Type ) ||
|
||||
/* TYPEinherits_from(type, Class_Sized_Type)) {*/
|
||||
TYPEinherits_from( type, Class_Binary_Type ) ||
|
||||
TYPEinherits_from( type, Class_Integer_Type ) ||
|
||||
TYPEinherits_from( type, Class_Real_Type ) ||
|
||||
TYPEinherits_from( type, Class_String_Type ) ) {
|
||||
return 1;
|
||||
} else if( TYPEinherits_from( type, Class_Bag_Type ) ) {
|
||||
upper = AGGR_TYPEget_upper_limit( type );
|
||||
if( ( upper == LITERAL_INFINITY ) ||
|
||||
( upper == EXPRESSION_NULL ) ) {
|
||||
return AGGR_CHUNK_SIZE;
|
||||
}
|
||||
experrc = 0;
|
||||
size = EXPget_integer_value( upper );
|
||||
if( experrc ) {
|
||||
ERRORreport_with_symbol( experrc, &type->symbol );
|
||||
}
|
||||
return size;
|
||||
} else if( TYPEinherits_from( type, Class_Aggregate_Type ) ) {
|
||||
upper = AGGR_TYPEget_upper_limit( type );
|
||||
if( ( upper == LITERAL_INFINITY ) ||
|
||||
( upper == EXPRESSION_NULL ) ||
|
||||
TYPEis_identifier( upper->type ) ) {
|
||||
return AGGR_CHUNK_SIZE;
|
||||
}
|
||||
experrc = 0;
|
||||
size = EXPget_integer_value( upper );
|
||||
if( experrc ) {
|
||||
ERRORreport_with_symbol( experrc, &type->symbol );
|
||||
}
|
||||
experrc = 0;
|
||||
size = size - EXPget_integer_value( AGGR_TYPEget_lower_limit( type ) ) + 1;
|
||||
if( experrc ) {
|
||||
ERRORreport_with_symbol( experrc, &type->symbol );
|
||||
}
|
||||
return size;
|
||||
} else if( class == Class_Entity_Type ) {
|
||||
#if 0
|
||||
list = COMP_TYPEget_items( type );
|
||||
list = ENTITYget_attributes( ENT_TYPEget_entity( type ) );
|
||||
size = 0;
|
||||
LISTdo( list, entity, Entity )
|
||||
size += ENTITYget_size( entity );
|
||||
LISTod;
|
||||
return size;
|
||||
#endif
|
||||
return( ENTITYget_size( ENT_TYPEget_entity( type ) ) );
|
||||
} else {
|
||||
ERRORreport( ERROR_corrupted_type, "TYPEget_size" );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Procedure: AGGR_TYPEget_base_type
|
||||
** Parameters: Aggregate_Type type - type to examine
|
||||
** Returns: Type - the base type of the aggregate type
|
||||
** Description: Retrieve the base type of an aggregate.
|
||||
*/
|
||||
|
||||
Type
|
||||
TYPEget_nonaggregate_base_type( Type t ) {
|
||||
/**
|
||||
* \param t type to examine
|
||||
* \return the base type of the aggregate type
|
||||
* Retrieve the base type of an aggregate.
|
||||
*/
|
||||
Type TYPEget_nonaggregate_base_type( Type t ) {
|
||||
while( TYPEis_aggregate( t ) ) {
|
||||
t = t->u.type->body->base;
|
||||
}
|
||||
|
||||
+44
-44
@@ -225,46 +225,46 @@ const char * GetAggrElemType( const Type type ) {
|
||||
class = TYPEget_type( bt );
|
||||
|
||||
/* case TYPE_INTEGER: */
|
||||
if( class == Class_Integer_Type ) {
|
||||
if( class == integer_ ) {
|
||||
strcpy( retval, "long" );
|
||||
}
|
||||
|
||||
/* case TYPE_REAL:
|
||||
case TYPE_NUMBER: */
|
||||
if( ( class == Class_Number_Type ) || ( class == Class_Real_Type ) ) {
|
||||
if( ( class == number_ ) || ( class == real_ ) ) {
|
||||
strcpy( retval, "double" );
|
||||
}
|
||||
|
||||
/* case TYPE_ENTITY: */
|
||||
if( class == Class_Entity_Type ) {
|
||||
if( class == entity_ ) {
|
||||
strcpy( retval, IdlEntityTypeName( bt ) );
|
||||
}
|
||||
|
||||
|
||||
/* case TYPE_ENUM: */
|
||||
/* case TYPE_SELECT: */
|
||||
if( ( class == Class_Enumeration_Type )
|
||||
|| ( class == Class_Select_Type ) ) {
|
||||
if( ( class == enumeration_ )
|
||||
|| ( class == select_ ) ) {
|
||||
strcpy( retval, TYPEget_ctype( bt ) );
|
||||
}
|
||||
|
||||
/* case TYPE_LOGICAL: */
|
||||
if( class == Class_Logical_Type ) {
|
||||
if( class == logical_ ) {
|
||||
strcpy( retval, "Logical" );
|
||||
}
|
||||
|
||||
/* case TYPE_BOOLEAN: */
|
||||
if( class == Class_Boolean_Type ) {
|
||||
if( class == boolean_ ) {
|
||||
strcpy( retval, "Bool" );
|
||||
}
|
||||
|
||||
/* case TYPE_STRING: */
|
||||
if( class == Class_String_Type ) {
|
||||
if( class == string_ ) {
|
||||
strcpy( retval, "string" );
|
||||
}
|
||||
|
||||
/* case TYPE_BINARY: */
|
||||
if( class == Class_Binary_Type ) {
|
||||
if( class == binary_ ) {
|
||||
strcpy( retval, "binary" );
|
||||
}
|
||||
}
|
||||
@@ -287,19 +287,19 @@ const char * TYPEget_idl_type( const Type t ) {
|
||||
|
||||
/* ///////////////////////// */
|
||||
/* case TYPE_ARRAY: */
|
||||
if( TYPEget_type( t ) == Class_Array_Type ) {
|
||||
if( TYPEget_type( t ) == array_ ) {
|
||||
strcat( retval, "__array" );
|
||||
}
|
||||
/* case TYPE_LIST: */
|
||||
if( TYPEget_type( t ) == Class_List_Type ) {
|
||||
if( TYPEget_type( t ) == list_ ) {
|
||||
strcat( retval, "__list" );
|
||||
}
|
||||
/* case TYPE_SET: */
|
||||
if( TYPEget_type( t ) == Class_Set_Type ) {
|
||||
if( TYPEget_type( t ) == set_ ) {
|
||||
strcat( retval, "__set" );
|
||||
}
|
||||
/* case TYPE_BAG: */
|
||||
if( TYPEget_type( t ) == Class_Bag_Type ) {
|
||||
if( TYPEget_type( t ) == bag_ ) {
|
||||
strcat( retval, "__bag" );
|
||||
}
|
||||
return retval;
|
||||
@@ -312,40 +312,40 @@ const char * TYPEget_idl_type( const Type t ) {
|
||||
class = TYPEget_type( t );
|
||||
|
||||
/* case TYPE_LOGICAL: */
|
||||
if( class == Class_Logical_Type ) {
|
||||
if( class == logical_ ) {
|
||||
return ( "Logical" );
|
||||
}
|
||||
|
||||
/* case TYPE_BOOLEAN: */
|
||||
if( class == Class_Boolean_Type ) {
|
||||
if( class == boolean_ ) {
|
||||
return ( "Boolean" );
|
||||
}
|
||||
|
||||
/* case TYPE_INTEGER: */
|
||||
if( class == Class_Integer_Type ) {
|
||||
if( class == integer_ ) {
|
||||
return ( "SDAI_Integer" );
|
||||
}
|
||||
/* return ("CORBA::Long");*/
|
||||
|
||||
/* case TYPE_REAL:
|
||||
case TYPE_NUMBER: */
|
||||
if( ( class == Class_Number_Type ) || ( class == Class_Real_Type ) ) {
|
||||
if( ( class == number_ ) || ( class == real_ ) ) {
|
||||
return ( "SDAI_Real" );
|
||||
}
|
||||
/* return ("CORBA::Double"); */
|
||||
|
||||
/* case TYPE_STRING: */
|
||||
if( class == Class_String_Type ) {
|
||||
if( class == string_ ) {
|
||||
return ( "char *" );
|
||||
}
|
||||
|
||||
/* case TYPE_BINARY: */
|
||||
if( class == Class_Binary_Type ) {
|
||||
if( class == binary_ ) {
|
||||
return ( AccessType( t ) );
|
||||
}
|
||||
|
||||
/* case TYPE_ENTITY: */
|
||||
if( class == Class_Entity_Type ) {
|
||||
if( class == entity_ ) {
|
||||
/* better do this because the return type might go away */
|
||||
strcpy( retval, IdlEntityTypeName( t ) );
|
||||
strcat( retval, "_ptr" );
|
||||
@@ -354,7 +354,7 @@ const char * TYPEget_idl_type( const Type t ) {
|
||||
}
|
||||
/* case TYPE_ENUM: */
|
||||
/* case TYPE_SELECT: */
|
||||
if( class == Class_Enumeration_Type ) {
|
||||
if( class == enumeration_ ) {
|
||||
strncpy( retval, EnumName( TYPEget_name( t ) ), BUFSIZ - 2 );
|
||||
|
||||
strcat( retval, " /*" );
|
||||
@@ -363,7 +363,7 @@ const char * TYPEget_idl_type( const Type t ) {
|
||||
/* strcat (retval, "_var");*/
|
||||
return retval;
|
||||
}
|
||||
if( class == Class_Select_Type ) {
|
||||
if( class == select_ ) {
|
||||
return ( IdlEntityTypeName( t ) );
|
||||
}
|
||||
|
||||
@@ -509,28 +509,28 @@ char * TYPEget_express_type( const Type t ) {
|
||||
class = TYPEget_type( t );
|
||||
|
||||
/* case TYPE_LOGICAL: */
|
||||
if( ( class == Class_Boolean_Type ) || ( class == Class_Logical_Type ) ) {
|
||||
if( ( class == boolean_ ) || ( class == logical_ ) ) {
|
||||
return ( "Logical" );
|
||||
}
|
||||
|
||||
/* case TYPE_INTEGER: */
|
||||
if( class == Class_Integer_Type ) {
|
||||
if( class == integer_ ) {
|
||||
return ( "Integer " );
|
||||
}
|
||||
|
||||
/* case TYPE_REAL:
|
||||
case TYPE_NUMBER: */
|
||||
if( ( class == Class_Number_Type ) || ( class == Class_Real_Type ) ) {
|
||||
if( ( class == number_ ) || ( class == real_ ) ) {
|
||||
return ( "Real " );
|
||||
}
|
||||
|
||||
/* case TYPE_STRING: */
|
||||
if( class == Class_String_Type ) {
|
||||
if( class == string_ ) {
|
||||
return ( "String " ) ;
|
||||
}
|
||||
|
||||
/* case TYPE_BINARY: */
|
||||
if( class == Class_Binary_Type ) {
|
||||
if( class == binary_ ) {
|
||||
return ( "Binary " ) ;
|
||||
}
|
||||
|
||||
@@ -545,19 +545,19 @@ char * TYPEget_express_type( const Type t ) {
|
||||
class = TYPEget_type( bt );
|
||||
|
||||
/* case TYPE_ARRAY: */
|
||||
if( TYPEget_type( t ) == Class_Array_Type ) {
|
||||
if( TYPEget_type( t ) == array_ ) {
|
||||
aggr_type = "Array";
|
||||
}
|
||||
/* case TYPE_LIST: */
|
||||
if( TYPEget_type( t ) == Class_List_Type ) {
|
||||
if( TYPEget_type( t ) == list_ ) {
|
||||
aggr_type = "List";
|
||||
}
|
||||
/* case TYPE_SET: */
|
||||
if( TYPEget_type( t ) == Class_Set_Type ) {
|
||||
if( TYPEget_type( t ) == set_ ) {
|
||||
aggr_type = "Set";
|
||||
}
|
||||
/* case TYPE_BAG: */
|
||||
if( TYPEget_type( t ) == Class_Bag_Type ) {
|
||||
if( TYPEget_type( t ) == bag_ ) {
|
||||
aggr_type = "Bag";
|
||||
}
|
||||
|
||||
@@ -721,7 +721,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) {
|
||||
ATTRprint_access_methods_get_head( entnm, a, file );
|
||||
|
||||
/* case TYPE_ENTITY: */
|
||||
if( class == Class_Entity_Type ) {
|
||||
if( class == entity_ ) {
|
||||
|
||||
fprintf( file, "{\n" );
|
||||
if( print_logging ) {
|
||||
@@ -777,7 +777,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) {
|
||||
return;
|
||||
}
|
||||
/* case TYPE_LOGICAL: */
|
||||
if( ( class == Class_Boolean_Type ) || ( class == Class_Logical_Type ) ) {
|
||||
if( ( class == boolean_ ) || ( class == logical_ ) ) {
|
||||
|
||||
fprintf( file, "{\n" );
|
||||
if( print_logging ) {
|
||||
@@ -818,7 +818,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) {
|
||||
return;
|
||||
}
|
||||
/* case TYPE_ENUM: */
|
||||
if( class == Class_Enumeration_Type ) {
|
||||
if( class == enumeration_ ) {
|
||||
fprintf( file, "{\n" );
|
||||
if( print_logging ) {
|
||||
fprintf( file, "#ifdef SCL_LOGGING\n" );
|
||||
@@ -855,7 +855,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) {
|
||||
return;
|
||||
}
|
||||
/* case TYPE_SELECT: */
|
||||
if( class == Class_Select_Type ) {
|
||||
if( class == select_ ) {
|
||||
fprintf( file, " { return (const %s) &_%s; }\n", ctype, attrnm );
|
||||
ATTRprint_access_methods_put_head( entnm, a, file );
|
||||
fprintf( file, " { _%s = x; }\n", attrnm );
|
||||
@@ -863,7 +863,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) {
|
||||
}
|
||||
/* case STRING:*/
|
||||
/* case TYPE_BINARY: */
|
||||
if( ( class == Class_String_Type ) || ( class == Class_Binary_Type ) ) {
|
||||
if( ( class == string_ ) || ( class == binary_ ) ) {
|
||||
fprintf( file, "{\n" );
|
||||
if( print_logging ) {
|
||||
fprintf( file, "#ifdef SCL_LOGGING\n" );
|
||||
@@ -903,7 +903,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) {
|
||||
return;
|
||||
}
|
||||
/* case TYPE_INTEGER: */
|
||||
if( class == Class_Integer_Type ) {
|
||||
if( class == integer_ ) {
|
||||
fprintf( file, "{\n" );
|
||||
if( print_logging ) {
|
||||
fprintf( file, "#ifdef SCL_LOGGING\n" );
|
||||
@@ -947,7 +947,7 @@ void ATTRprint_access_methods( CONST char * entnm, Variable a, FILE * file ) {
|
||||
|
||||
/* case TYPE_REAL:
|
||||
case TYPE_NUMBER: */
|
||||
if( ( class == Class_Number_Type ) || ( class == Class_Real_Type ) ) {
|
||||
if( ( class == number_ ) || ( class == real_ ) ) {
|
||||
fprintf( file, "{\n" );
|
||||
if( print_logging ) {
|
||||
fprintf( file, "#ifdef SCL_LOGGING\n" );
|
||||
@@ -1359,33 +1359,33 @@ void LIBcopy_constructor( Entity ent, FILE * file ) {
|
||||
sprintf( b, " _%s = e.%s();\n", attrnm, attrnm );
|
||||
|
||||
/*mjm7/11/91 case TYPE_STRING */
|
||||
if( ( class == Class_String_Type ) || ( class == Class_Binary_Type ) ) {
|
||||
if( ( class == string_ ) || ( class == binary_ ) ) {
|
||||
sprintf( b, " _%s = strdup(e.%s());\n", attrnm, attrnm );
|
||||
}
|
||||
|
||||
|
||||
/* case TYPE_ENTITY: */
|
||||
if( class == Class_Entity_Type ) {
|
||||
if( class == entity_ ) {
|
||||
sprintf( b, " _%s = e.%s();\n", attrnm, attrnm );
|
||||
}
|
||||
/* previous line modified to conform with SDAI C++ Binding for PDES, Inc. Prototyping 5/22/91 CD */
|
||||
|
||||
/* case TYPE_ENUM: */
|
||||
if( class == Class_Enumeration_Type ) {
|
||||
if( class == enumeration_ ) {
|
||||
sprintf( b, " _%s.put(e.%s().asInt());\n", attrnm, attrnm );
|
||||
}
|
||||
/* case TYPE_SELECT: */
|
||||
if( class == Class_Select_Type ) {
|
||||
if( class == select_ ) {
|
||||
sprintf( b, "DDDDDDD _%s.put(e.%s().asInt());\n", attrnm, attrnm );
|
||||
}
|
||||
/* case TYPE_BOOLEAN */
|
||||
if( class == Class_Boolean_Type ) {
|
||||
if( class == boolean_ ) {
|
||||
sprintf( b, " _%s.put(e.%s().asInt());\n", attrnm, attrnm );
|
||||
}
|
||||
/* previous line modified to conform with SDAI C++ Binding for PDES, Inc. Prototyping 5/22/91 CD */
|
||||
|
||||
/* case TYPE_LOGICAL */
|
||||
if( class == Class_Logical_Type ) {
|
||||
if( class == logical_ ) {
|
||||
sprintf( b, " _%s.put(e.%s().asInt());\n", attrnm, attrnm );
|
||||
}
|
||||
/* previous line modified to conform with SDAI C++ Binding for PDES, Inc. Prototyping 5/22/91 CD */
|
||||
|
||||
@@ -208,25 +208,25 @@ TYPEget_ctype( const Type t ) {
|
||||
class = TYPEget_type( bt );
|
||||
|
||||
/* case TYPE_INTEGER: */
|
||||
if( class == Class_Integer_Type ) {
|
||||
if( class == integer_ ) {
|
||||
return ( "IntAggregate" );
|
||||
}
|
||||
|
||||
/* case TYPE_REAL:
|
||||
case TYPE_NUMBER: */
|
||||
if( ( class == Class_Number_Type ) || ( class == Class_Real_Type ) ) {
|
||||
if( ( class == number_ ) || ( class == real_ ) ) {
|
||||
return ( "RealAggregate" );
|
||||
}
|
||||
|
||||
/* case TYPE_ENTITY: */
|
||||
if( class == Class_Entity_Type ) {
|
||||
if( class == entity_ ) {
|
||||
return( "EntityAggregate" );
|
||||
}
|
||||
|
||||
/* case TYPE_ENUM: */
|
||||
/* case TYPE_SELECT: */
|
||||
if( ( class == Class_Enumeration_Type )
|
||||
|| ( class == Class_Select_Type ) ) {
|
||||
if( ( class == enumeration_ )
|
||||
|| ( class == select_ ) ) {
|
||||
/*
|
||||
strcpy (retval, ClassName (TYPEget_name (bt)));
|
||||
*/
|
||||
@@ -236,22 +236,22 @@ TYPEget_ctype( const Type t ) {
|
||||
}
|
||||
|
||||
/* case TYPE_LOGICAL: */
|
||||
if( class == Class_Logical_Type ) {
|
||||
if( class == logical_ ) {
|
||||
return ( "LOGICALS" );
|
||||
}
|
||||
|
||||
/* case TYPE_BOOLEAN: */
|
||||
if( class == Class_Boolean_Type ) {
|
||||
if( class == boolean_ ) {
|
||||
return ( "BOOLEANS" );
|
||||
}
|
||||
|
||||
/* case TYPE_STRING: */
|
||||
if( class == Class_String_Type ) {
|
||||
if( class == string_ ) {
|
||||
return( "StringAggregate" );
|
||||
}
|
||||
|
||||
/* case TYPE_BINARY: */
|
||||
if( class == Class_Binary_Type ) {
|
||||
if( class == binary_ ) {
|
||||
return( "BinaryAggregate" );
|
||||
}
|
||||
}
|
||||
@@ -261,38 +261,38 @@ TYPEget_ctype( const Type t ) {
|
||||
class = TYPEget_type( t );
|
||||
|
||||
/* case TYPE_LOGICAL: */
|
||||
if( class == Class_Logical_Type ) {
|
||||
if( class == logical_ ) {
|
||||
return ( "SDAI_LOGICAL" );
|
||||
}
|
||||
|
||||
/* case TYPE_BOOLEAN: */
|
||||
if( class == Class_Boolean_Type ) {
|
||||
if( class == boolean_ ) {
|
||||
return ( "SDAI_BOOLEAN" );
|
||||
}
|
||||
|
||||
/* case TYPE_INTEGER: */
|
||||
if( class == Class_Integer_Type ) {
|
||||
if( class == integer_ ) {
|
||||
return ( "SDAI_Integer" );
|
||||
}
|
||||
|
||||
/* case TYPE_REAL:
|
||||
case TYPE_NUMBER: */
|
||||
if( ( class == Class_Number_Type ) || ( class == Class_Real_Type ) ) {
|
||||
if( ( class == number_ ) || ( class == real_ ) ) {
|
||||
return ( "SDAI_Real" ) ;
|
||||
}
|
||||
|
||||
/* case TYPE_STRING: */
|
||||
if( class == Class_String_Type ) {
|
||||
if( class == string_ ) {
|
||||
return ( "SDAI_String" );
|
||||
}
|
||||
|
||||
/* case TYPE_BINARY: */
|
||||
if( class == Class_Binary_Type ) {
|
||||
if( class == binary_ ) {
|
||||
return ( "SDAI_Binary" );
|
||||
}
|
||||
|
||||
/* case TYPE_ENTITY: */
|
||||
if( class == Class_Entity_Type ) {
|
||||
if( class == entity_ ) {
|
||||
strncpy( retval, TypeName( t ), BUFSIZ - 2 );
|
||||
strcat( retval, "_ptr" );
|
||||
return retval;
|
||||
@@ -300,12 +300,12 @@ TYPEget_ctype( const Type t ) {
|
||||
}
|
||||
/* case TYPE_ENUM: */
|
||||
/* case TYPE_SELECT: */
|
||||
if( class == Class_Enumeration_Type ) {
|
||||
if( class == enumeration_ ) {
|
||||
strncpy( retval, TypeName( t ), BUFSIZ - 2 );
|
||||
strcat( retval, "_var" );
|
||||
return retval;
|
||||
}
|
||||
if( class == Class_Select_Type ) {
|
||||
if( class == select_ ) {
|
||||
return ( TypeName( t ) );
|
||||
}
|
||||
|
||||
@@ -360,17 +360,17 @@ AccessType( Type t ) {
|
||||
return nm;
|
||||
}
|
||||
class = TYPEget_type( t );
|
||||
if( class == Class_Enumeration_Type ) {
|
||||
if( class == enumeration_ ) {
|
||||
strncpy( nm, TypeName( t ), BUFSIZ - 2 );
|
||||
strcat( nm, "_var" );
|
||||
return nm;
|
||||
}
|
||||
if( class == Class_Logical_Type ) {
|
||||
if( class == logical_ ) {
|
||||
strncpy( nm, "Logical", BUFSIZ - 2 );
|
||||
}
|
||||
|
||||
/* case TYPE_BOOLEAN: */
|
||||
if( class == Class_Boolean_Type ) {
|
||||
if( class == boolean_ ) {
|
||||
strncpy( nm, "Boolean", BUFSIZ - 2 );
|
||||
}
|
||||
return nm;
|
||||
|
||||
@@ -218,28 +218,28 @@ const char *
|
||||
SEL_ITEMget_dmname( Type t ) {
|
||||
Class_Of_Type class = TYPEget_type( t );
|
||||
|
||||
if( class == Class_Integer_Type ) {
|
||||
if( class == integer_ ) {
|
||||
return "integer";
|
||||
}
|
||||
if( class == Class_Real_Type ) {
|
||||
if( class == real_ ) {
|
||||
return "real";
|
||||
}
|
||||
if( class == Class_Number_Type ) {
|
||||
if( class == number_ ) {
|
||||
return "real";
|
||||
}
|
||||
if( class == Class_String_Type ) {
|
||||
if( class == string_ ) {
|
||||
return "string";
|
||||
}
|
||||
if( class == Class_Binary_Type ) {
|
||||
if( class == binary_ ) {
|
||||
return "binary";
|
||||
}
|
||||
if( class == Class_Logical_Type ) {
|
||||
if( class == logical_ ) {
|
||||
return "logical";
|
||||
}
|
||||
if( class == Class_Boolean_Type ) {
|
||||
if( class == boolean_ ) {
|
||||
return "boolean";
|
||||
}
|
||||
if( class == Class_Entity_Type ) {
|
||||
if( class == entity_ ) {
|
||||
return "app_inst";
|
||||
}
|
||||
return ( StrToLower( TYPEget_utype( t ) ) );
|
||||
|
||||
Reference in New Issue
Block a user