#include <sys/wait.h>
#include <sys/stat.h>
#include <time.h>
+
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
+#include <iostream>
+#include <strstream>
+#include <fstream>
+#else
#include <iostream.h>
#include <strstream.h>
#include <fstream.h>
+#endif
+
#include <Dt/Term.h>
#include <Tt/tt_c.h>
#include <Tt/tttk.h>
char * optTraceScript = 0;
String apiTracerArgv[ 10 ];
String snooperArgv[ 10 ];
-ostrstream tttraceCmd;
-ofstream snoopStream;
+std::ostrstream tttraceCmd;
+std::ofstream snoopStream;
// Xt squats on -tf ?! XXX
const char Usage[] =
}
}
-#if defined(SVR4) || defined(aix) || defined(hpux) || defined(__osf__)
+#if defined(SVR4) || defined(aix) || defined(hpux) || defined(__linux__) || defined(CSRG_BASED)
#if !defined(SIG_PF)
typedef void (*sig_pf_t)(int);
#define SIG_PF sig_pf_t
int sig,
SIG_PF handler )
{
-#if defined(hpux)
+#if defined(hpux) || defined(__linux__) || defined(CSRG_BASED)
struct sigaction act;
act.sa_handler = handler;
sigemptyset(&act.sa_mask);
)
{
DtTtCreated( DTTT_MESSAGE, msg ); // XXX bad idea?
- snoopIt( "Tt_callback_action", justSnoopIt, msg, pat, True );
+ snoopIt( "Tt_callback_action", (void *) justSnoopIt, msg, pat, True );
return TT_CALLBACK_PROCESSED;
}
tt_free( (caddr_t)contents );
tt_free( file );
tt_free( docname );
- snoopIt( "Ttmedia_load_pat_cb", _DtTtMediaLoadPatCb, msg );
+ snoopIt( "Ttmedia_load_pat_cb", (void *) _DtTtMediaLoadPatCb, msg );
return 0;
}
XtAppContext app;
Atom save_yourself_atom;
- Pixmap icon_pixmap = NULL;
- Pixmap icon_mask_pixmap = NULL;
+ Pixmap icon_pixmap = 0;
+ Pixmap icon_mask_pixmap = 0;
/**************************************************************************
*** DTB_USER_CODE_START
}
Tt_status status;
snoopStream.open( snoopFile, ios::app );
- ostrstream envStr;
+ std::ostrstream envStr;
envStr << "TT_TRACE_SCRIPT=> ";
envStr << traceFile << ends;
traceScript = envStr.str();
for (int i = 0; i < opsCount; i++) {
tt_pattern_op_add( pat, ops[i] );
}
- for (i = 0; i < sendersCount; i++) {
+ for (int i = 0; i < sendersCount; i++) {
tt_pattern_sender_add( pat, senders[i] );
}
if (vtype != 0) {
snoopPatIsRegistered ? "Off" : "On" );
if (optMapOnOutput) {
XtVaSetValues( dtb_ttsnoop_ttsnoop_win.ttsnoopPane,
- DtNmapOnOutput, optMapOnOutput, 0 );
+ DtNmapOnOutput, optMapOnOutput, NULL );
}
installSignalHandler();