From 177651bddab145c8a56cdfeb0d57b5fd95a6d0e2 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 27 Jun 2019 09:32:46 -0400 Subject: Move contrib -> filters --- contrib/hldiff | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100755 contrib/hldiff (limited to 'contrib/hldiff') diff --git a/contrib/hldiff b/contrib/hldiff deleted file mode 100755 index b672e21f..00000000 --- a/contrib/hldiff +++ /dev/null @@ -1,39 +0,0 @@ -# vim: set ft=awk : -BEGIN { - bright = "\x1B[1m" - red = "\x1B[31m" - green = "\x1B[32m" - cyan = "\x1B[36m" - reset = "\x1B[0m" - - hit_diff = 0 -} -{ - if (hit_diff == 0) { - if ($0 ~ /^diff /) { - hit_diff = 1; - print bright $0 reset - } else if ($0 ~ /^.*\|.*(\+|-)/) { - left = substr($0, 0, index($0, "|")-1) - right = substr($0, index($0, "|")) - gsub(/-+/, red "&" reset, right) - gsub(/\++/, green "&" reset, right) - print left right - } else { - print $0 - } - } else { - if ($0 ~ /^-/) { - print red $0 reset - } else if ($0 ~ /^+/) { - print green $0 reset - } else if ($0 ~ /^ /) { - print $0 - } else if ($0 ~ /^@@ (-[0-9]+,[0-9]+ \+[0-9]+,[0-9]+) @@.*/) { - sub(/^@@ (-[0-9]+,[0-9]+ \+[0-9]+,[0-9]+) @@/, cyan "&" reset) - print $0 - } else { - print bright $0 reset - } - } -} -- cgit