Redundant information, but makes the journal easier to read. The
redundancy might help making a journal replay tool robust.
Put it in Hvy Metal II now to gather some real data.
void journal_logout(void);
void journal_prng(unsigned);
void journal_input(char *);
void journal_logout(void);
void journal_prng(unsigned);
void journal_input(char *);
+void journal_command(char *);
void journal_update(int);
#endif
void journal_update(int);
#endif
#include "com.h"
#include "empio.h"
#include "file.h"
#include "com.h"
#include "empio.h"
#include "file.h"
#include "match.h"
#include "misc.h"
#include "nat.h"
#include "match.h"
#include "misc.h"
#include "nat.h"
+ journal_command(command->c_form);
switch (command->c_addr()) {
case RET_OK:
player->btused += command->c_cost;
switch (command->c_addr()) {
case RET_OK:
player->btused += command->c_cost;
* prng NAME SEED
* login CNUM HOSTADDR USER
* logout CNUM
* prng NAME SEED
* login CNUM HOSTADDR USER
* logout CNUM
* input INPUT
* update ETU
*/
* input INPUT
* update ETU
*/
journal_entry("input %s", input);
}
journal_entry("input %s", input);
}
+void
+journal_command(char *cmd)
+{
+ char *eptr = strchr(cmd, ' ');
+ journal_entry("command %.*s", eptr ? (int)(eptr - cmd) : -1, cmd);
+}
+
void
journal_update(int etu)
{
void
journal_update(int etu)
{