From: Eric S. Raymond Date: Tue, 16 Sep 2003 05:33:30 +0000 (+0000) Subject: Hashes are now magic cookies. X-Git-Tag: 2.0~54 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=41b4667668fe0c41ab71c18b756e2150832f3300;p=comparator.git Hashes are now magic cookies. --- diff --git a/shred.h b/shred.h index 83a2f13..527f6ce 100644 --- a/shred.h +++ b/shred.h @@ -23,13 +23,14 @@ typedef u_int32_t linenum_t; /* use this to hold total line count of the entire source tree set */ typedef u_int32_t linecount_t; -#define HASHSIZE 16 +#include "hash.h" + struct hash_t { linenum_t start, end; - unsigned char hash[HASHSIZE]; + hashval_t hash; }; -#define SORTHASHCMP(s, t) memcmp((s)->hash.hash, (t)->hash.hash, HASHSIZE) +#define SORTHASHCMP(s, t) hash_compare((s)->hash.hash, (t)->hash.hash) struct filehdr_t {