]> thyrsus.com Git - comparator.git/commitdiff
Initial revision
authorEric S. Raymond <esr@thyrsus.com>
Sun, 31 Aug 2003 10:24:05 +0000 (10:24 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 31 Aug 2003 10:24:05 +0000 (10:24 +0000)
Makefile [new file with mode: 0644]
hashmap.c [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
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 (file)
index 0000000..faf5692
--- /dev/null
+++ b/hashmap.c
@@ -0,0 +1,16 @@
+/* hashmap.c -- custom data type for hash lists. */
+
+#include <sys/types.h>
+#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 */