From c73901389af1fb94a43d4d62fab75ca44cb8190c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 31 Aug 2003 10:24:05 +0000 Subject: [PATCH] Initial revision --- Makefile | 27 +++++++++++++++++++++++++++ hashmap.c | 16 ++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 Makefile create mode 100644 hashmap.c diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9998127 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +# Makefile for shredcompare tools + +SOURCES = shredtree.c md5.c md5.h + +CFLAGS=-g + +all: shredtree shredcompare + +shredtree: shredtree.o md5.o + $(CC) shredtree.o md5.o -o shredtree +shredtree.o: shredtree.c shred.h + $(CC) -c $(CFLAGS) shredtree.c + +hashmap.o: hashmap.c shred.h + $(CC) -c $(CFLAGS) hashmap.c +shredcompare.o: shredcompare.c shred.h + $(CC) -c $(CFLAGS) shredcompare.c +shredcompare: shredcompare.o hashmap.o + $(CC) $(LFLAGS) shredcompare.o hashmap.o -o shredcompare + +clean: + rm -f shredtree shredcompare shredtree.o md5.o shredcompare.o + +test: + time shredtree -c -w -d ~/src/unix src5r4 >src5r4.shif + time shredtree -c -w -d ~/src/unix linux-2.6.0-test4 >linux-2.6.0-test4.shif + time shredcompare.py src5r4.shif linux-2.6.0-test4.shif >TEST.LOG diff --git a/hashmap.c b/hashmap.c new file mode 100644 index 0000000..faf5692 --- /dev/null +++ b/hashmap.c @@ -0,0 +1,16 @@ +/* hashmap.c -- custom data type for hash lists. */ + +#include +#include "shred.h" + +void file_intern(const char *file) +{ + printf("Interning %s\n", file); +} + +void hash_intern(const struct hash_t *chunk) +{ + printf("Chunk: %d, %d\n", chunk->start, chunk->end); +} + +/* hashmap.c ends here */ -- 2.43.0