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
+ shredtree -c test1 >TEST1
+ shredtree -c test2 >TEST2
+ shredcompare TEST1 TEST2
+
+testgood:
+ shredtree -c test3 >TEST1
+ shredtree -c test4 >TEST2
+ shredcompare TEST1 TEST2
char *hash_method;
char *generator_program;
};
+static struct shif_t *shiflist;
struct sorthash_t
{
static void merge_hashes(int argc, char *argv[])
/* merge hashes from specified files into an in-code list */
{
- struct shif_t *shiflist, *sp;
+ struct shif_t *sp;
struct stat sb;
long total;
break;
value = strchr(buf, ':');
*value++ = '\0';
+ while(*value == ' ')
+ value++;
strchr(value, '\n')[0] = '\0';
if (!strcmp(buf, "Normalization"))
/* if all these matches are within the same tree, toss them */
heterogenous = 0;
for (i = 0; i < nmatches; i++)
- if (sametree(mp[i].file,mp[(i+1) % nmatches].file))
+ if (sametree(np[i].file, np[(i+1) % nmatches].file))
heterogenous++;
if (!heterogenous)
continue;
hitlist = reduce_matches(local_duplicates);
report_time("Reduction done");
+ puts("#SHIF-B 1.0");
+ puts("Merge-Program: shredcompare 1.0");
+ printf("Shred-Size: %d\n", shiflist[0].shred_size);
+ printf("Hash-Method: %s\n", shiflist[0].hash_method);
+ printf("Normalization: %s\n", shiflist[0].normalization);
+ puts("%%");
+
for (; hitlist->next; hitlist = hitlist->next)
if (hitlist->matches)
{