Some overhauls of the modified replay code.

This commit is contained in:
2023-02-20 16:02:18 -05:00
parent 9eeaa04159
commit f9aafee165
4 changed files with 47 additions and 9 deletions

View File

@@ -405,6 +405,12 @@ class Driver {
return 0;
}
static void replay_cb_sent_outgoing(void *vp, int chid, int ndata, const char *data) {
if (chid == 0) {
std::cerr.write(data, ndata);
}
}
int drive(int argc, char *argv[]) {
// Remove the program name from argv.
std::string program = argv[0];
@@ -413,6 +419,7 @@ class Driver {
// Load the DLL and gain access to its functions.
call_init_engine_wrapper(&engw);
engw.replay_cb_sent_outgoing = replay_cb_sent_outgoing;
// If argv contains "replay <filename>", do a replay,
// and then skip everything else.