summaryrefslogtreecommitdiffstats
path: root/adventure/extern.h
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2012-01-08 18:16:00 +0000
committerdholland <dholland@NetBSD.org>2012-01-08 18:16:00 +0000
commit12be3ddea55e32be7272a4f2e5a4b3c5e39239a7 (patch)
tree2a37d6e3ebed32df01983536df8301f7b34a8be9 /adventure/extern.h
parentc7181d82c389743f54a91288f6c871b280f1cf71 (diff)
downloadbsdgames-darwin-12be3ddea55e32be7272a4f2e5a4b3c5e39239a7.tar.gz
bsdgames-darwin-12be3ddea55e32be7272a4f2e5a4b3c5e39239a7.tar.zst
bsdgames-darwin-12be3ddea55e32be7272a4f2e5a4b3c5e39239a7.zip
Oops, I forgot to actually implement the checksumming code for the new
savefile format, so any savefiles generated yesterday can be tampered with. Oh well. While here, tidy up the crc code.
Diffstat (limited to 'adventure/extern.h')
-rw-r--r--adventure/extern.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/adventure/extern.h b/adventure/extern.h
index 0e87e070..548a270c 100644
--- a/adventure/extern.h
+++ b/adventure/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.14 2009/10/21 01:07:44 snj Exp $ */
+/* $NetBSD: extern.h,v 1.15 2012/01/08 18:16:00 dholland Exp $ */
/*
* Copyright (c) 1997 Christos Zoulas. All rights reserved.
@@ -27,8 +27,14 @@
#include <string.h>
/* crc.c */
-void crc_start(void);
-unsigned long crc(const char *, int);
+struct crcstate {
+ uint32_t crcval;
+ unsigned step;
+};
+
+void crc_start(struct crcstate *);
+void crc_add(struct crcstate *, const void *, size_t);
+uint32_t crc_get(struct crcstate *);
/* done.c */
int score(void);