]> thyrsus.com Git - comparator.git/commitdiff
Remove the no-local-duplicates option.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 2 Sep 2003 07:10:46 +0000 (07:10 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 2 Sep 2003 07:10:46 +0000 (07:10 +0000)
report.c
shredcompare.py

index 482f189f0d6eaa20ad19a3aafe614748eee63599..578640d182570cb5386a8af42b52c2c8ebc98193 100644 (file)
--- a/report.c
+++ b/report.c
@@ -12,8 +12,6 @@
 #define min(x, y)      ((x < y) ? (x) : (y)) 
 #define max(x, y)      ((x > y) ? (x) : (y)) 
 
-static int local_duplicates;
-
 struct item
 {
     char       *file;
@@ -310,7 +308,7 @@ static int sametree(const char *s, const char *t)
     return (sn == tn) && strncmp(s, t, sn); 
 }
 
-struct match_t *reduce_matches(int localdups)
+struct match_t *reduce_matches(void)
 /* assemble list of duplicated hashes */
 {
      static struct match_t dummy; 
@@ -459,18 +457,13 @@ main(int argc, char *argv[])
     int        status;
     struct match_t *hitlist;
 
-    while ((status = getopt(argc, argv, "dh")) != EOF)
+    while ((status = getopt(argc, argv, "h")) != EOF)
     {
        switch (status)
        {
-       case 'd':
-           local_duplicates = 1;
-           break;
-
        case 'h':
        default:
-           fprintf(stderr,"usage: shredtree [-d] hashfile...\n");
-           fprintf(stderr,"  -d      = remove local duplicates.\n");
+           fprintf(stderr,"usage: shredtree hashfile...\n");
            fprintf(stderr,"  -h      = help (display this message).\n");
            exit(0);
        }
@@ -489,7 +482,7 @@ main(int argc, char *argv[])
        printf("%d: %s:%d:%d (%02x%02x)\n", np-obarray, np->file, np->hash.start, np->hash.end, np->hash.hash[0], np->hash.hash[1]);
 #endif /* ODEBUG */
 
-    hitlist = reduce_matches(local_duplicates);
+    hitlist = reduce_matches();
     report_time("Reduction done");
 
     puts("#SHIF-B 1.0");
index 7bce9905d7ee8cc5ef11ce7d4db3ccb2b5a2cbd3..a3d3e0c45560fab4031a5e918188a8042e1a636f 100755 (executable)
@@ -135,15 +135,11 @@ if __name__ == '__main__':
     try:
         (optlist, args) = getopt.getopt(sys.argv[1:], 'd')
     except getopt.GetoptError:
-        sys.stderr.write("usage: shredcompare [-h] [-d] file\n")
+        sys.stderr.write("usage: shredcompare [-h] file\n")
         sys.exit(2)
-    local_duplicates = True
     for (opt, val) in optlist:
-        if opt == '-d':
-            local_duplicates = False
-        elif opt == '-h':
+        if opt == '-h':
            sys.stderr.write("usage: shredcompare [-d] file\n");
-           sys.stderr.write(" -d      = discard local duplicates.\n");
            sys.stderr.write(" -h      = help (display this message).\n");
            sys.exit(0);