Tt_status status = tt_ptr_error( val );
std::ostringstream errStream;
errStream << func << " = " << val << " (" << status << ")" << ends;
- const char *label = errStream.str().c_str();
- DtTtSetLabel( labelWidget, label );
+ DtTtSetLabel( labelWidget, errStream.str().c_str() );
return status;
}
{
std::ostringstream errStream;
errStream << func << " = " << status << ends;
- const char *label = errStream.str().c_str();
- DtTtSetLabel( labelWidget, label );
+ DtTtSetLabel( labelWidget, errStream.str().c_str() );
return status;
}
{
std::ostringstream errStream;
errStream << func << " = " << returnVal << ends;
- const char *label = errStream.str().c_str();
- DtTtSetLabel( labelWidget, label );
+ DtTtSetLabel( labelWidget,
+ const_cast<char *>(errStream.str().c_str()) );
return returnVal;
}
tt_free( name );
}
itemStream << ends;
- char *string = const_cast<char *>(itemStream.str().c_str());
- items[ i ] = XmStringCreateLocalized( string );
+ items[ i ] =
+ XmStringCreateLocalized(const_cast<char *>(itemStream.str().c_str()));
}
return items;
}
tt_free( id );
}
itemStream << ends;
- char *string = const_cast<char *>(itemStream.str().c_str());
- items[ i ] = XmStringCreateLocalized( string );
+ items[ i ] =
+ XmStringCreateLocalized(const_cast<char *>(itemStream.str().c_str()));
}
return items;
case DTTT_PATTERN:
Boolean unlinkSnoopFile = True;
char * traceFile = 0;
Boolean unlinkTraceFile = True;
-const char * traceScript = 0;
+std::string traceScript;
int globalTimeout = 20000;
unsigned int globalSaveLines = 5000;
const char * globalVersionString = "1.0";
std::ostringstream envStr;
envStr << "TT_TRACE_SCRIPT=> ";
envStr << traceFile << ends;
- traceScript = envStr.str().c_str();
+ traceScript = envStr.str();
if (optImmediateTracing) {
turnOnTracing( 0, 0, 0 );
}
extern std::ofstream snoopStream;
extern unsigned int globalSaveLines;
-extern char * traceScript;
+extern std::string traceScript;
extern const char * globalVersionString;
extern Tt_pattern snoopPat;
extern Boolean snoopPatIsRegistered;
DtTtSetLabel( instance->cancelButton, "Stop" );
XtManageChild(instance->tracer_shellform);
tt_trace_control( 0 );
- putenv( traceScript );
+ putenv( const_cast<char *>(traceScript.c_str()) );
tt_trace_control( 1 );
/*** DTB_USER_CODE_END ^^^ Add C code above ^^^ ***/
}