From 12be3ddea55e32be7272a4f2e5a4b3c5e39239a7 Mon Sep 17 00:00:00 2001 From: dholland Date: Sun, 8 Jan 2012 18:16:00 +0000 Subject: 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. --- adventure/extern.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'adventure/extern.h') 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 /* 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); -- cgit v1.2.3