]> git.pond.sub.org Git - empserver/commitdiff
Fix timestamps for data files and lost command
authorRon Koenderink <rkoenderink@yahoo.ca>
Sun, 17 Aug 2008 21:13:57 +0000 (15:13 -0600)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sun, 17 Aug 2008 21:13:57 +0000 (15:13 -0600)
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 [new file with mode: 0644]
src/scripts/nightly/patches/All/lost.c.patch [new file with mode: 0644]

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 (file)
index 0000000..c995fd3
--- /dev/null
@@ -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 (file)
index 0000000..ceb2006
--- /dev/null
@@ -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 ");