void DumpTemplateInfo( TEMPLATE_INFO *tinfo ) { TEMPLATE_SPECIALIZATION *tprimary; VBUF prefix, suffix; int i; char delim; tprimary = RingFirst( tinfo->specializations ); printf( " TEMPLATE_INFO" F_BADDR " defn" F_PTR " num_args" F_HEX_4 F_EOL , tinfo , tprimary->defn , tprimary->num_args ); printf( " %s", NameStr( tinfo->sym->name->name ) ); delim = '<'; for( i = 0; i < tprimary->num_args; ++i ) { FormatType( tprimary->type_list[i], &prefix, &suffix ); printf( "%c %s<id> %s", delim, VbufString( &prefix ), VbufString( &suffix ) ); VbufFree( &prefix ); VbufFree( &suffix ); delim = ','; } printf( ">\n" ); }
void PrintFullType( // PRINT FULL TYPE INFORMATION TYPE tp ) // - type pointer { VBUF prefix, suffix; FormatType( tp, &prefix, &suffix ); printf( " Type" F_BADDR ": %s<id> %s" F_EOL, tp, VbufString( &prefix ), VbufString( &suffix ) ); VbufFree( &prefix ); VbufFree( &suffix ); }
void FormatTemplateParmScope( VBUF *parms, SCOPE parm_scope ) /***********************************************************/ { SYMBOL stop; SYMBOL curr; SYMBOL sym; const char *delim; TYPE type; auto VBUF sym_parm; auto VBUF type_parm_prefix; auto VBUF type_parm_suffix; VbufInit( parms ); if( parm_scope == NULL ) { makeUnknownTemplate( parms ); return; } delim = templateParmStart; curr = NULL; stop = ScopeOrderedStart( parm_scope ); for(;;) { curr = ScopeOrderedNext( stop, curr ); if( curr == NULL ) break; VbufConcStr( parms, delim ); type = curr->sym_type; if( SymIsConstantInt( curr ) ) { if( UnsignedIntType( type ) ) { VbufConcDecimal( parms, curr->u.uval ); } else { VbufConcInteger( parms, curr->u.sval ); } } else if( SymIsTypedef( curr ) ) { FormatType( type, &type_parm_prefix, &type_parm_suffix ); VbufTruncWhite( &type_parm_prefix ); VbufTruncWhite( &type_parm_suffix ); VbufConcVbuf( parms, &type_parm_prefix ); VbufConcVbuf( parms, &type_parm_suffix ); VbufFree( &type_parm_prefix ); VbufFree( &type_parm_suffix ); } else { sym = SymAddressOf( curr ); if( sym != NULL ) { FormatSym( sym, &sym_parm ); VbufConcVbuf( parms, &sym_parm ); VbufFree( &sym_parm ); } } delim = templateParmNext; } if( delim == templateParmStart ) { VbufConcStr( parms, templateParmStart ); } VbufConcStr( parms, templateParmStop ); }
static bool cgrfDumpNode( // DUMP CALL GRAPH NODE CALLGRAPH *ctl, // - call graph information CALLNODE *node ) // - node to dump { SYMBOL func; VBUF vbuf; func = node->base.object; if( func == NULL ) { func = ModuleInitFuncSym(); } printf( "\nNode[%p] depth(%d) refs(%d) addrs(%d) opcodes(%d) cflags(%d)\n" " inline_fun(%d) inlineable(%d) oe(%d) cgfile(%p)\n" " state_table(%d) rescan(%d) stab_gen(%d)\n" " %s flags(%x)\n" , node , node->depth , node->refs , node->addrs , node->opcodes , node->cond_flags , node->inline_fun , node->inlineable , node->inlineable_oe , node->cgfile , node->state_table , node->rescan , node->stab_gen , DbgSymNameFull( node->base.object, &vbuf ) , func->flag ); CgrfWalkCalls( ctl, node, &cgrfDumpCall ); VbufFree( &vbuf ); return false; }
static void printArgs( arg_list *args ) /*************************************/ { int i; VBUF prefix, suffix, flags; FormatTypeModFlags( args->qualifier, &flags ); printf( " 'this qualifier': '%s'\n", VbufString( &flags ) ); VbufFree( &flags ); for( i = 0 ; i < args->num_args ; i++ ) { FormatType( args->type_list[i], &prefix, &suffix ); printf( " [%d]: '%s<id> %s'\n", i+1, VbufString( &prefix ), VbufString( &suffix ) ); VbufFree( &prefix ); VbufFree( &suffix ); } }
static void statsPrint( // PRINT STATISTICS INITFINI* defn ) // - definition { defn = defn; if( CompFlags.stats_printed ) { return; } if( CompFlags.quiet_mode ) { return; } if( ! CompFlags.srcfile_compiled ) { return; } if( WholeFName != NULL ) { VBUF buffer; VbufInit( &buffer ); VbufConcStr( &buffer, WholeFName ); VbufConcStr( &buffer, ": " ); intPrint( &buffer, "line", ", ", SrcLineCount ); if( IncLineCount != 0 ) { VbufConcStr( &buffer, "included " ); VbufConcDecimal( &buffer, IncLineCount ); VbufConcStr( &buffer, ", " ); } intPrint( &buffer, "warning", ", ", WngCount ); intPrint( &buffer, "error", "", ErrCount ); MsgDisplayLine( VbufString( &buffer ) ); CompFlags.stats_printed = 1; VbufFree( &buffer ); } }
static void fmtTemplateParms( VBUF *pvbuf, TYPE class_type ) { auto VBUF parms; FormatTemplateParms( &parms, class_type ); VbufConcVbufRev( pvbuf, &parms ); VbufFree( &parms ); }
// // SYMBOL-TABLE FUNCTIONS // void DumpSymbol( // DUMP SYMBOL ENTRY void *_sym ) // - symbol { SYMBOL sym = _sym; VBUF vbuf; static char const *ids[] = { #define SC_DEF(a) #a SC_DEFS #undef SC_DEF }; if( sym != NULL ) { printf( "SYMBOL" F_BADDR " next" F_PTR " thread" F_PTR " sym_type" F_PTR " name" F_PTR " cg_handle" F_PTR F_NL " u" F_PTR " id=" F_STRING " flag" F_HEX_1 " flag2" F_HEX_1 " segid" F_HEX_2 F_NL " symbol-name=" F_QSTRING F_EOL , sym , sym->next , sym->thread , sym->sym_type , sym->name , ( sym->flag2 & SF2_TOKEN_LOCN ) ? sym->locn->u.cg_handle : 0 , sym->u.tinfo , ids[sym->id] , sym->flag , sym->flag2 , sym->segid , FormatSym( sym, &vbuf ) ); if( sym->sym_type != NULL ) { DumpFullType( sym->sym_type ); } VbufFree( &vbuf ); if( sym->flag2 & SF2_TOKEN_LOCN ) { dumpLocation( &sym->locn->tl ); } switch( sym->id ) { case SC_CLASS_TEMPLATE: DumpTemplateInfo( sym->u.tinfo ); break; case SC_NAMESPACE: dumpNameSpaceInfo( sym->u.ns ); break; } } }
static void fmtSymScope( SCOPE scope, VBUF *pvbuf, boolean include_function ) /***************************************************************************/ { TYPE class_type; NAME name; char *sname; SYMBOL sym; VBUF prefix; while( scope != NULL ) { switch( scope->id ) { case SCOPE_FILE: sname = ScopeNameSpaceFormatName( scope ); if( sname != NULL ) { VbufConcStrRev( pvbuf, scopeSep ); VbufConcStrRev( pvbuf, sname ); } break; case SCOPE_CLASS: class_type = ScopeClass( scope ); name = SimpleTypeName( class_type ); if( name != NULL ) { VbufConcStrRev( pvbuf, scopeSep ); if( class_type->flag & TF1_INSTANTIATION ) { fmtTemplateParms( pvbuf, class_type ); } VbufConcStrRev( pvbuf, NameStr( name ) ); } break; case SCOPE_FUNCTION: if( include_function ) { VbufInit( &prefix ); sym = ScopeFunction( scope ); formatScopedSym( sym, &prefix, FF_NULL ); if( VbufLen( &prefix ) > 0 ) { VbufConcStrRev( &prefix, functionDelim ); VbufPrepVbuf( pvbuf, &prefix ); } VbufFree( &prefix ); } return; // function scope resolved on function name case SCOPE_BLOCK: case SCOPE_TEMPLATE_DECL: case SCOPE_TEMPLATE_INST: case SCOPE_TEMPLATE_PARM: case SCOPE_TEMPLATE_SPEC_PARM: break; case SCOPE_MAX: default: VbufConcStrRev( pvbuf, scopeSep ); VbufConcStrRev( pvbuf, scopeError ); break; } scope = scope->enclosing; } }
static void fmtSymOpName( SYMBOL sym, VBUF *pvbuf ) /*************************************************/ { VBUF prefix, suffix; TYPE type; VbufInit( pvbuf ); type = FunctionDeclarationType( sym->sym_type ); if( type != NULL ) { FormatFunctionType( type->of , &prefix , &suffix , 0 , FormatTypeDefault | FF_TYPEDEF_STOP ); VbufConcVbufRev( pvbuf, &suffix ); VbufTruncWhite( pvbuf ); VbufConcVbufRev( pvbuf, &prefix ); VbufFree( &prefix ); VbufFree( &suffix ); } }
static void pragError( // #PRAGMA ERROR void ) { VBUF str; if( CurToken == T_STRING ) { PPCTL_ENABLE_MACROS(); collectStrings( &str ); CErr2p( ERR_USER_ERROR_MSG, VbufString( &str ) ); VbufFree( &str ); PPCTL_DISABLE_MACROS(); } }
void DumpTemplateSpecialization(// DUMP A TEMPLATE SPECIALIZATION TEMPLATE_SPECIALIZATION *tspec )// - template specialization { TEMPLATE_INFO *tinfo = tspec->tinfo; VBUF vbuf; // - variable-sized buffer FormatTemplateSpecialization( tspec, &vbuf ); printf( " TEMPLATE_SPECIALIZATION" F_BADDR " tinfo" F_BADDR F_EOL , tspec, tinfo ); printf( " %s\n", VbufString( &vbuf ) ); VbufFree( &vbuf ); }
static bool cgrfDumpCall( // DUMP CALL GRAPH EDGE CALLGRAPH *ctl, // - call graph information CALLEDGE *edge ) // - edge in graph { VBUF vbuf; ctl = ctl; printf( "- calls[%p] refs(%d) addrs(%d) %s\n" , edge , edge->refs , edge->addrs , DbgSymNameFull( edge->base.target->object, &vbuf ) ); VbufFree( &vbuf ); return false; }
void DbgGenned( // INDICATE SYMBOL GENERATED SYMBOL sym ) // - the symbol { if( NULL == sym ) { printf( "Generated: module initialization\n" ); } else { VBUF vbuf; printf( "Generated: %s\n" , DbgSymNameFull( sym, &vbuf ) ); if( sym->flag2 & SF2_TOKEN_LOCN ) { dumpLocation( &sym->locn->tl ); } VbufFree( &vbuf ); } }
char *FormatName( NAME name, VBUF *pvbuf ) /****************************************/ { VBUF prefix; bool ctordtor; VbufInit( pvbuf ); VbufInit( &prefix ); ctordtor = fmtSymName( NULL, name, &prefix, pvbuf, FF_NULL ); if( !ctordtor ) { VbufConcVbuf( pvbuf, &prefix ); } VbufFree( &prefix ); return( strrev( VbufString( pvbuf ) ) ); }
void CppStartFuncMessage( SYMBOL sym ) /************************************/ { #if defined(wpp_dll) auto VBUF buff; DbgAssert( CompFlags.progress_messages ); if( sym != NULL ) { IDEFN(ProgressMessage)( CompInfo.idehdl, FormatSymWithTypedefs( sym, &buff ) ); VbufFree( &buff ); } #else sym = sym; #endif }
void VbufPrepVbuf // PREPEND A VBUF TO VBUF ( VBUF *vbuf1 // - VBUF structure , VBUF *vbuf2 ) // - VBUF structure to be prepended { VBUF temp; if( vbuf2->used > 0 ) { VbufInit( &temp ); VbufReqd( &temp, vbuf1->used + vbuf2->used ); stxvcpy( temp.buf, vbuf2->buf, vbuf2->used ); stxvcpy( temp.buf + vbuf2->used, vbuf1->buf, vbuf1->used ); temp.used = vbuf1->used + vbuf2->used; VbufFree( vbuf1 ); *vbuf1 = temp; } }
static PC_SEGMENT *addDefSeg( // ADD A DEFAULT PC SEGMENT DEF_SEG *def_seg, // - default segment info. unsigned ads_control ) // - control mask { unsigned attrs; // - attributes for segment PC_SEGMENT *curr; // - segment pointer VBUF seg_name; // - virtual buffer for name unsigned sa_control; // - segmentAlloc control mask VbufInit( &seg_name ); ++def_seg->ctr; sa_control = SA_NULL; if( ads_control & ADS_MODULE_PREFIX ) { if(( ads_control & ADS_CODE_SEGMENT ) == 0 && DataSegName[0] != '\0' ) { VbufConcStr( &seg_name, DataSegName ); } else { VbufConcStr( &seg_name, ModuleName ); } sa_control |= SA_MODULE_PREFIX; } if( ads_control & ADS_STRING_SEGMENT ) { sa_control |= SA_DEFINE_ANYTIME; } VbufConcStr( &seg_name, def_seg->pcseg->name ); if( ads_control & ADS_ZM_SEGMENT ) { VbufConcDecimal( &seg_name, def_seg->ctr ); } if( def_seg == &code_def_seg ) { attrs = SGAT_CODE_GEN; } else { if( ads_control & ADS_CONST_SEGMENT ) { attrs = SGAT_DATA_PRIVATE_RO; } else { attrs = SGAT_DATA_PRIVATE_RW; } VbufConcDecimal( &seg_name, def_seg->ctr ); } curr = segmentAlloc( VbufString( &seg_name ), NULL, SEG_NULL, attrs, sa_control ); if( 0 == ( attrs & EXEC ) ) { _markUsed( curr, TRUE ); } if( ads_control & ADS_STRING_SEGMENT ) { curr->only_strings = TRUE; } VbufFree( &seg_name ); return( curr ); }
static void pragMessage( // #PRAGMA MESSAGE void ) { VBUF str; if( ExpectingToken( T_LEFT_PAREN ) ) { PPCTL_ENABLE_MACROS(); NextToken(); if( CurToken == T_STRING ) { collectStrings( &str ); CErr2p( WARN_USER_WARNING_MSG, VbufString( &str ) ); VbufFree( &str ); } PPCTL_DISABLE_MACROS(); MustRecog( T_RIGHT_PAREN ); } }
void DumpObjectModelClass( // DUMP OBJECT MODEL: CLASS TYPE type ) // - structure type { DUMP_INFO di; // - dump information if( ! type->u.c.info->corrupted ) { CompFlags.log_note_msgs = TRUE; di.original = type; di.offset = 0; VbufInit( &di.buffer ); VstkOpen( &di.stack, sizeof( char* ), 16 ); dumpStruct( type, &di, "Object Model for:", DS_NULL ); VbufFree( &di.buffer ); VstkClose( &di.stack ); CompFlags.log_note_msgs = FALSE; } }
void MsgDisplayLineArgs // DISPLAY A BARE LINE, FROM ARGUMENTS ( char* seg // - the line segments , ... ) { va_list args; // - arg list char* str; // - current segment VBUF buffer; // - buffer VbufInit( &buffer ); va_start( args, seg ); for( str = seg; str != NULL; str = va_arg( args, char* ) ) { VbufConcStr( &buffer, str ); } ideDisplay( IDEMSGSEV_NOTE_MSG, 0, VbufString( &buffer ), NULL ); va_end( args ); VbufFree( &buffer ); }
void CmdLnCtxInfo( // PRINT CONTEXT INFO void ) { CTX_CL* entry; // - current entry VBUF buf; // - buffer VbufInit( &buf ); for( entry = VstkTop( &cmdLnContexts ) ; entry != NULL ; entry = VstkNext( &cmdLnContexts, entry ) ) { VbufRewind( &buf ); switch( entry->base.ctx_type ) { case CTX_CLTYPE_ENV : VbufConcChr( &buf, '@' ); VbufConcStr( &buf, entry->env.var ); break; case CTX_CLTYPE_FC : VbufConcStr( &buf, "batch file of commands, line " ); VbufConcDecimal( &buf, CompInfo.fc_file_line ); break; case CTX_CLTYPE_PGM : VbufConcStr( &buf, "command line" ); break; case CTX_CLTYPE_FILE : VbufConcStr( &buf, SrcFileFullName( entry->file.source ) ); break; DbgDefault( "bad command-line context" ); } if( entry->base.sw_ptr != NULL ) { size_t size; char const * not_used; char const* old = CmdScanAddr(); CmdScanInit( entry->base.sw_ptr ); CmdScanChar(); size = CmdScanOption( ¬_used ) + 1; CmdScanInit( old ); VbufConcStr( &buf, ", switch: " ); for( old = entry->base.sw_ptr; size > 0; ++old, --size ) { VbufConcChr( &buf, *old ); } } InfMsgPtr( INF_SWITCH, VbufString( &buf ) ); } VbufFree( &buf ); }
void VbufPrepStr( // PREPEND STRING TO vbuf->buf VBUF *vbuf, // - VBUF structure char const *string ) // - string to be prepended { size_t prep_size; VBUF temp; prep_size = strlen( string ); if( prep_size > 0 ) { VbufInit( &temp ); VbufReqd( &temp, prep_size + vbuf->used ); stxvcpy( temp.buf, string, prep_size ); stxvcpy( temp.buf + prep_size, vbuf->buf, vbuf->used ); temp.used = prep_size + vbuf->used; VbufFree( vbuf ); *vbuf = temp; } }
void *CtxWhereAreYou( // SET DEBUGGING BUFFER void ) { char *buf; // - points into buffer buf = stpcpy( CompilerContext, ctx_names[ context ] ); switch( context ) { case CTX_CMDLN_ENV : case CTX_CMDLN_PGM : buf = stpcpy( buf, ": " ); buf = stpcpy( buf, CtxGetSwitchAddr() ); break; case CTX_FORCED_INCS : case CTX_SOURCE : if( location.src_file == NULL ) break; buf = stpcpy( buf, ": " ); buf = stpcpy( buf, SrcFileName( location.src_file ) ); buf = stpcpy( buf, "(" ); buf = stdcpy( buf, location.line ); buf = stpcpy( buf, "," ); buf = stdcpy( buf, location.column ); buf = stpcpy( buf, ")" ); break; case CTX_CG_FUNC : case CTX_FUNC_GEN : buf = stpcpy( buf, ": " ); if( func == NULL ) { buf = stpcpy( buf, "data generation" ); } else { VBUF vbuf; buf = stpcpy( buf, DbgSymNameFull( func, &vbuf ) ); VbufFree( &vbuf ); } if( ( context == CTX_FUNC_GEN ) &&( line != 0 ) ) { buf = stpcpy( buf, "(" ); buf = stdcpy( buf, location.line ); buf = stpcpy( buf, ")" ); } break; } return CompilerContext; }
void PrintFnovResolution( FNOV_RESULT result, arg_list *args, /***********************************************************/ FNOV_LIST *match, FNOV_LIST *reject, SYMBOL sym ) // pseudo pretty display of overloaded ranking information { int length; VBUF name; if( sym != NULL ) { FormatSym( sym, &name ); } else if( match != NULL ) { FormatSym( match->sym, &name ); } else if( reject != NULL ) { FormatSym( reject->sym, &name ); } else { VbufInit( &name ); } printf( " Result: %s\n", resultNames[result] ); if( VbufLen( &name ) > 0 ) { printf( "Symbol: '%s'", VbufString( &name ) ); VbufFree( &name ); length = RingCount( match ) + RingCount( reject ); if( length > 0 ) { printf( " occurs %d time%s", length, (length != 1 ? "s " : " " ) ); } } printf( "\n" ); if( sym == NULL && args != NULL ) { printf( "Ranked Arguments:\n" ); printArgs( args ); } if( match != NULL ) { printf( "Matching Functions:\n" ); PrintFnovList( match ); } if( reject != NULL ) { printf( "Rejected Functions:\n" ); PrintFnovList( reject ); } }
static void formatScopedSym( SYMBOL sym, VBUF *pvbuf, FMT_CONTROL control ) /*************************************************************************/ { VBUF prefix; boolean ctordtor; VbufInit( &prefix ); if( sym->name == NULL ) { ctordtor = fmtSymName( sym, NULL, &prefix, pvbuf, control ); } else { ctordtor = fmtSymName( sym, sym->name->name, &prefix, pvbuf, control ); } if( !SymIsAnonymous( sym ) ) { fmtSymScope( SymScope( sym ), pvbuf, TRUE ); } if( !ctordtor ) { VbufConcVbuf( pvbuf, &prefix ); } VbufFree( &prefix ); }
static char *formatScopedSym( SYMBOL sym, VBUF *pvbuf, FMT_CONTROL control ) /**************************************************************************/ { VBUF prefix; bool ctordtor; VbufInit( &prefix ); if( sym->name == NULL ) { ctordtor = fmtSymName( sym, NULL, &prefix, pvbuf, control ); } else { ctordtor = fmtSymName( sym, sym->name->name, &prefix, pvbuf, control ); } if( !SymIsAnonymous( sym ) ) { fmtSymScope( SymScope( sym ), pvbuf, true ); } if( !ctordtor ) { VbufConcVbuf( pvbuf, &prefix ); } VbufFree( &prefix ); return( VbufString( pvbuf ) ); }
void PrintFnovList( FNOV_LIST *root ) /***********************************/ // pretty display of list of overloaded function rankings { int i; FNOV_LIST *entry; VBUF name; i = 1; RingIterBeg( root, entry ) { printf( "[%d]: '%s'", i++, FormatSym( entry->sym, &name ) ); VbufFree( &name ); if( entry->member || entry->stdops ) { printf( " flags=( " ); if( entry->member ) { printf( "member " ); } if( entry->stdops ) { printf( "stdops " ); } printf( ")" ); } printf( "\n" ); if( SymIsThisFuncMember( entry->sym ) ) { printRank( 1, &entry->thisrank, PRINT_THIS ); } if( entry->rankvector == NULL ) { printf( " (no rank available)\n" ); } else { if( entry->rankvector->control & FNC_RANK_RETURN ) { printRank( 1, entry->rankvector, PRINT_RETURN ); } else { printRank( entry->alist->num_args , entry->rankvector , PRINT_DEFAULT ); } } } RingIterEnd( entry )
static void processCmdFile( // PROCESS A COMMAND FILE OPT_STORAGE *data ) // - option data { VBUF rec; // - record for file int c; // - next character VbufInit( &rec ); for(;;) { for(;;) { c = NextChar(); if( c == LCHR_EOF ) break; if( c == '\n' ) break; if( c == '\r' ) break; VbufConcChr( &rec, (char)c ); } procOptions( data, VbufString( &rec ) ); for( ; ( c == '\n' ) || ( c == '\r' ); c = NextChar() ); if( c == LCHR_EOF ) break; VbufRewind( &rec ); VbufConcChr( &rec, (char)c ); } VbufFree( &rec ); }
static bool fmtSymName( SYMBOL sym, NAME name, VBUF *pvprefix, VBUF *pvbuf, FMT_CONTROL control ) /***********************************************************************************************/ // returns true if sym is CTOR/DTOR so that the caller drop the return type { VBUF prefix, suffix, op_name; CGOP oper; bool ctordtor = false; if( CppLookupOperatorName( name, &oper ) ) { switch( oper ) { case CO_CONVERT: if( sym == NULL ) { VbufConcStrRev( pvbuf, operatorSuffix ); VbufConcStrRev( pvbuf, operatorUnknown ); } else { fmtSymOpName( sym, &op_name ); fmtSymFunction( sym, &prefix, &suffix, (FormatTypeDefault & ~FF_USE_VOID) | FF_DROP_RETURN ); VbufConcVbufRev( pvbuf, &suffix ); VbufConcVbuf( pvbuf, &op_name ); VbufConcStrRev( pvbuf, operatorPrefix ); VbufConcVbufRev( pvbuf, &prefix ); VbufFree( &op_name ); VbufFree( &prefix ); VbufFree( &suffix ); } break; case CO_CTOR: if( sym == NULL ) { VbufConcStrRev( pvbuf, constructorName ); } else { name = SimpleTypeName( ScopeClass( SymScope( sym ) ) ); ctordtor = true; fmtSymFunction( sym, &prefix, &suffix, FormatTypeDefault ); VbufConcVbufRev( pvbuf, &suffix ); if( name != NULL ) { VbufConcStrRev( pvbuf, NameStr( name ) ); } VbufConcVbufRev( pvprefix, &prefix ); VbufFree( &prefix ); VbufFree( &suffix ); } break; case CO_DTOR: if( sym == NULL ) { VbufConcStrRev( pvbuf, destructorName ); } else { name = SimpleTypeName( ScopeClass( SymScope( sym ) ) ); ctordtor = true; fmtSymFunction( sym, &prefix, &suffix, FormatTypeDefault ); VbufConcVbufRev( pvbuf, &suffix ); if( name != NULL ) { VbufConcStrRev( pvbuf, NameStr( name ) ); } VbufConcStrRev( pvbuf, dtorPrefix ); VbufConcVbufRev( pvprefix, &prefix ); VbufFree( &prefix ); VbufFree( &suffix ); } break; default: if( sym == NULL ) { VbufConcStrRev( pvbuf, fmtSymCgop( oper ) ); VbufConcStrRev( pvbuf, operatorPrefix ); } else { fmtSymFunction( sym, &prefix, &suffix, FormatTypeDefault | control ); VbufConcVbufRev( pvbuf, &suffix ); VbufConcStrRev( pvbuf, fmtSymCgop( oper ) ); VbufConcStrRev( pvbuf, operatorPrefix ); VbufConcVbufRev( pvprefix, &prefix ); VbufFree( &prefix ); VbufFree( &suffix ); } break; } } else if( sym != NULL ) { if( SymIsFunction( sym ) ) { fmtSymFunction( sym, &prefix, &suffix, FormatTypeDefault | control ); } else if( !SymIsTypedef( sym ) ) { FormatType( sym->sym_type, &prefix, &suffix ); } else { VbufInit( &prefix ); VbufInit( &suffix ); } VbufConcVbufRev( pvbuf, &suffix ); if( name == NULL ) { VbufConcStrRev( pvbuf, nullSymname ); } else { VbufConcStrRev( pvbuf, NameStr( name ) ); } VbufConcVbufRev( pvprefix, &prefix ); VbufFree( &prefix ); VbufFree( &suffix ); } else if( name != NULL ) { VbufConcStrRev( pvbuf, NameStr( name ) ); } else { VbufConcStrRev( pvbuf, nullSymname ); } return( ctordtor ); }