digcomp.pl (1.1.1.1) | digcomp.pl (1.1.1.2) |
---|---|
1#!/usr/bin/perl 2# 3# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 4# 5# This Source Code Form is subject to the terms of the Mozilla Public 6# License, v. 2.0. If a copy of the MPL was not distributed with this 7# file, You can obtain one at http://mozilla.org/MPL/2.0/. 8# --- 43 unchanged lines hidden (view full) --- 52 } 53 } 54 if ($entry{"$name ; $class.$type ; $value"} ne "") { 55 $line = $entry{"$name ; $class.$type ; $value"}; 56 print("Duplicate entry in $file1:\n> $_\n< $line\n"); 57 } else { 58 $entry{"$name ; $class.$type ; $value"} = $_; 59 } | 1#!/usr/bin/perl 2# 3# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 4# 5# This Source Code Form is subject to the terms of the Mozilla Public 6# License, v. 2.0. If a copy of the MPL was not distributed with this 7# file, You can obtain one at http://mozilla.org/MPL/2.0/. 8# --- 43 unchanged lines hidden (view full) --- 52 } 53 } 54 if ($entry{"$name ; $class.$type ; $value"} ne "") { 55 $line = $entry{"$name ; $class.$type ; $value"}; 56 print("Duplicate entry in $file1:\n> $_\n< $line\n"); 57 } else { 58 $entry{"$name ; $class.$type ; $value"} = $_; 59 } |
60 } elsif (/^(\S+)\s+\S+\s+(\S+)\s+(\S+)\s*$/) { 61 $name = $1; 62 $class = $2; 63 $type = $3; 64 $value = ""; 65 if ($lc) { 66 $name = lc($name); 67 $value = lc($value); 68 } 69 if ($type eq "SOA") { 70 $firstname = $name if ($firstname eq ""); 71 if ($name eq $firstname) { 72 $name = "$name$count"; 73 $count++; 74 } 75 } 76 if ($entry{"$name ; $class.$type ; $value"} ne "") { 77 $line = $entry{"$name ; $class.$type ; $value"}; 78 print("Duplicate entry in $file1:\n> $_\n< $line\n"); 79 } else { 80 $entry{"$name ; $class.$type ; $value"} = $_; 81 } |
|
60 } 61} 62close(FILE1); 63 64$printed = 0; 65 66open(FILE2, $file2) || die("open: $file2: $!\n"); 67while (<FILE2>) { --- 20 unchanged lines hidden (view full) --- 88 $entry{"$name ; $class.$type ; $value"} = ""; 89 } else { 90 print("Only in $file2 (missing from $file1):\n") 91 if ($printed == 0); 92 print("> $_\n"); 93 $printed++; 94 $status = 1; 95 } | 82 } 83} 84close(FILE1); 85 86$printed = 0; 87 88open(FILE2, $file2) || die("open: $file2: $!\n"); 89while (<FILE2>) { --- 20 unchanged lines hidden (view full) --- 110 $entry{"$name ; $class.$type ; $value"} = ""; 111 } else { 112 print("Only in $file2 (missing from $file1):\n") 113 if ($printed == 0); 114 print("> $_\n"); 115 $printed++; 116 $status = 1; 117 } |
118 } elsif (/^(\S+)\s+\S+\s+(\S+)\s+(\S+)\s*$/) { 119 $name = $1; 120 $class = $2; 121 $type = $3; 122 $value = ""; 123 if ($lc) { 124 $name = lc($name); 125 $value = lc($value); 126 } 127 if (($name eq $firstname) && ($type eq "SOA")) { 128 $count--; 129 $name = "$name$count"; 130 } 131 if ($entry{"$name ; $class.$type ; $value"} ne "") { 132 $entry{"$name ; $class.$type ; $value"} = ""; 133 } else { 134 print("Only in $file2 (missing from $file1):\n") 135 if ($printed == 0); 136 print("> $_\n"); 137 $printed++; 138 $status = 1; 139 } |
|
96 } 97} 98close(FILE2); 99 100$printed = 0; 101 102foreach $key (keys(%entry)) { 103 if ($entry{$key} ne "") { --- 15 unchanged lines hidden --- | 140 } 141} 142close(FILE2); 143 144$printed = 0; 145 146foreach $key (keys(%entry)) { 147 if ($entry{$key} ne "") { --- 15 unchanged lines hidden --- |