OpenBSD patches for ttsnoop.
Mostly adding std:: for strstream interfaces.
This commit is contained in:
committed by
Jon Trulson
parent
76984653b4
commit
43bae997c8
@@ -37,7 +37,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(linux) || defined(CSRG_BASED)
|
||||
#include <fstream>
|
||||
#include <strstream>
|
||||
#else
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
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;
|
||||
@@ -93,7 +93,7 @@ fork_tttrace(
|
||||
|
||||
/*** 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 &";
|
||||
@@ -659,7 +659,7 @@ libcPause(
|
||||
|
||||
/*** 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();
|
||||
@@ -667,7 +667,7 @@ libcPause(
|
||||
//
|
||||
// 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() << "\" ";
|
||||
@@ -1343,7 +1343,7 @@ toggleSnooping(
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user