From: Eric S. Raymond Date: Tue, 2 Sep 2003 06:55:06 +0000 (+0000) Subject: There is now a cononical order of metadata headers. X-Git-Tag: 1.0~74 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=9ee05cea7ec8e1a08ec1045f2dc8083536996f94;p=comparator.git There is now a cononical order of metadata headers. --- diff --git a/report.c b/report.c index f1c63b8..482f189 100644 --- a/report.c +++ b/report.c @@ -493,10 +493,10 @@ main(int argc, char *argv[]) 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); + puts("Merge-Program: shredcompare 1.0"); printf("Normalization: %s\n", shiflist[0].normalization); + printf("Shred-Size: %d\n", shiflist[0].shred_size); puts("%%"); for (; hitlist->next; hitlist = hitlist->next) diff --git a/shredcompare.py b/shredcompare.py index ae83973..7bce990 100755 --- a/shredcompare.py +++ b/shredcompare.py @@ -241,10 +241,10 @@ if __name__ == '__main__': report_time("Reduction done") # OK, dump all matches. print "#SHIF-B 1.0" - print "Merge-Program: shredcompare.py 1.0" print "Hash-Method: MD5" - print "Shred-Size: %d" % shiflist[0].shredsize print "Normalization:", ",".join(shiflist[0].normalization) + print "Merge-Program: shredcompare.py 1.0" + print "Shred-Size: %d" % shiflist[0].shredsize print "%%" # FIXME: do something appropriate with comments for match in matches: diff --git a/shredtree.c b/shredtree.c index 0ff4181..6e3f642 100644 --- a/shredtree.c +++ b/shredtree.c @@ -230,8 +230,8 @@ main(int argc, char *argv[]) puts("#SHIF-A 1.0"); puts("Generator-Program: shredtree 1.0"); puts("Hash-Method: MD5"); - printf("Shred-Size: %d\n", shredsize); printf("Normalization: %s\n", rws ? "remove_whitespace" : "none"); + printf("Shred-Size: %d\n", shredsize); puts("%%"); /* make file list */ diff --git a/shredtree.py b/shredtree.py index d9b9685..2196c9e 100755 --- a/shredtree.py +++ b/shredtree.py @@ -102,12 +102,12 @@ if __name__ == '__main__': print "#SHIF-A 1.0" print "Generator-Program: shredtree.py 1.0" print "Hash-Method: MD5" + print "Normalization: %s" % ",".join(normalization); print "Shred-Size: %d" % shredsize normalization = [] if ws: normalization.append("remove_whitespace") if not normalization: normalization.append("none") - print "Normalization: %s" % ",".join(normalization); print "%%" filenames = [] for root, dirs, files in os.walk(args[0]):