***/
#include <unistd.h>
+
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
+#include <fstream>
+#include <strstream>
+#else
#include <fstream.h>
#include <strstream.h>
+#endif
+
#include "apiTracer_ui.h"
#include "DtTt.h"
extern "C" { const char *_tt_lib_version; };
-extern ofstream snoopStream;
+extern std::ofstream snoopStream;
extern unsigned int globalSaveLines;
extern char * traceScript;
extern const char * globalVersionString;
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
DtbTtsnoopTtsnoopWinInfo instance = (DtbTtsnoopTtsnoopWinInfo)clientData;
- ostrstream tttraceCmd;
+ std::ostrstream tttraceCmd;
tttraceCmd << "unset TT_TRACE_SCRIPT; dtterm -sb -sl ";
tttraceCmd << globalSaveLines;
tttraceCmd << " -title tttrace -geometry 120x24 -e tttrace &";
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
DtbTtsnoopTtsnoopWinInfo instance = (DtbTtsnoopTtsnoopWinInfo)clientData;
- ostrstream advice;
+ std::ostrstream advice;
advice << "pause(); /* kill -CONT " << getpid() << " */";
DtTtSetLabel( instance->ttsnoopWin_label, advice.str() );
delete advice.str();
//
// run "(if dterror.ds blah blah; then kill -CONT pid; fi)&"
//
- ostrstream script;
+ std::ostrstream script;
script << "(if dterror.ds ";
// arg 1: text
script << "\"kill -CONT " << getpid() << "\" ";
if (! tt_is_err( status )) {
snoopPatIsRegistered = ! snoopPatIsRegistered;
}
- ostrstream stream;
+ std::ostrstream stream;
stream << func << (void *)snoopPat << ")" << ends;
DtTtSetLabel( instance->ttsnoopWin_label, stream.str(), status );
delete stream.str();