From b5896ba9f6047e7031e2bdee0622d543e11a6734 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 03:46:30 +0200 Subject: Adding upstream version 3.4.23. Signed-off-by: Daniel Baumann --- mantools/hchangered | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 mantools/hchangered (limited to 'mantools/hchangered') diff --git a/mantools/hchangered b/mantools/hchangered new file mode 100755 index 0000000..044f2db --- /dev/null +++ b/mantools/hchangered @@ -0,0 +1,40 @@ +#!/bin/sh + +# Usage: hchangered oldfile newfile + +# hchangered - crude tool to red-color changes in HTML text. Text is +# also underlined so it shows on monochrome printers. + +# Bugs: does not red-color text inside tables. Fascist software may +# complain about tags being out of order. + +diff -e $1 $2 | (sed -n -e ' +/[ac]$/{ + p + a\ + +: loop + n + /^\.$/b done1 + p + b loop +: done1 + a\ +\ +. + b +} +/d$/{ + a\ + i\ +[DELETED]\ +. + p + b +} +'; echo '1,$p') | ed - $1 | perl -e ' +$buf = join("", ); +$buf =~ s/pre>\s+\s+<\/pre/font><\/pre/g; +print $buf; +' -- cgit v1.2.3