From 851ccd4876cac711b07e4190eefe176074f77edb Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sun, 17 Aug 2008 15:13:57 -0600 Subject: [PATCH] Fix timestamps for data files and lost command Set the ef_timestamp to 100 for the nightly build. Set the DUMP LOST timestamp to 101 for the nightly build. This will the suppress the timestamp differences that occur when testing lost command and will facilitate testing for dump and xdump commands. --- src/scripts/nightly/patches/All/common_file.c.patch | 13 +++++++++++++ src/scripts/nightly/patches/All/lost.c.patch | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 src/scripts/nightly/patches/All/common_file.c.patch create mode 100644 src/scripts/nightly/patches/All/lost.c.patch diff --git a/src/scripts/nightly/patches/All/common_file.c.patch b/src/scripts/nightly/patches/All/common_file.c.patch new file mode 100644 index 00000000..c995fd34 --- /dev/null +++ b/src/scripts/nightly/patches/All/common_file.c.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/common/file.c b/src/lib/common/file.c +index ae851ae..872c363 100644 +--- a/src/lib/common/file.c ++++ b/src/lib/common/file.c +@@ -384,7 +384,7 @@ do_write(struct empfile *ep, void *buf, int id, int count) + return -1; + + if (ep->flags & EFF_TYPED) { +- now = ep->flags & EFF_NOTIME ? (time_t)-1 : time(NULL); ++ now = ep->flags & EFF_NOTIME ? (time_t)-1 : (time_t)100; + for (i = 0; i < count; i++) { + /* + * TODO Oopses here could be due to bad data corruption. diff --git a/src/scripts/nightly/patches/All/lost.c.patch b/src/scripts/nightly/patches/All/lost.c.patch new file mode 100644 index 00000000..ceb20064 --- /dev/null +++ b/src/scripts/nightly/patches/All/lost.c.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib/commands/lost.c b/src/lib/commands/lost.c +index 8e410e6..b29c0a2 100644 +--- a/src/lib/commands/lost.c ++++ b/src/lib/commands/lost.c +@@ -51,7 +51,7 @@ lost(void) + + prdate(); + nlost = 0; +- time(&now); ++ now = (time_t)101; + pr("DUMP LOST ITEMS %ld\n", (long)now); + if (player->god) + pr("owner ");