rfcdiff-v1.38   rfcdiff 
skipping to change at line 25 skipping to change at line 25
# --html Produce side-by-side .html diff (default) # --html Produce side-by-side .html diff (default)
# #
# --chbars Produce changebar marked .txt output # --chbars Produce changebar marked .txt output
# #
# --diff Produce a regular diff output # --diff Produce a regular diff output
# #
# --wdiff Produce paged wdiff output # --wdiff Produce paged wdiff output
# #
# --hwdiff Produce html-wrapped coloured wdiff output # --hwdiff Produce html-wrapped coloured wdiff output
# #
# --oldcolour COLOURNAME Colour for new file in hwdiff (default is "green")
# --oldcolor COLORNAME Color for old file in hwdiff (default is "red")
#
# --newcolour COLOURNAME Colour for new file in hwdiff (default is "green")
# --newcolor COLORNAME Color for new file in hwdiff (default is "green")
#
# --larger Make difference text in hwdiff slightly larger
#
# --browse Show html output in browser # --browse Show html output in browser
# #
# --keep Don't delete temporary workfiles # --keep Don't delete temporary workfiles
# #
# --version Show version # --version Show version
# #
# --help Show this help # --help Show this help
# #
# --info "Synopsis|Usage|Copyright|Description|Log" # --info "Synopsis|Usage|Copyright|Description|Log"
# Show various info # Show various info
skipping to change at line 97 skipping to change at line 105
# generating the diff, to produce a cleaner diff. # generating the diff, to produce a cleaner diff.
# #
# It is called as # It is called as
# #
# rfcdiff first-file second-file # rfcdiff first-file second-file
# #
# The latest version is available from # The latest version is available from
# http://tools.ietf.org/tools/rfcdiff/ # http://tools.ietf.org/tools/rfcdiff/
# #
export version="1.38" export version="1.39"
export progdate="" export progdate=""
export prelines="10" export prelines="10"
export basename=$(basename $0) export basename=$(basename $0)
export workdir="/tmp/$basename-$$" export workdir="/tmp/$basename-$$"
export pagecache1="$workdir/pagecache1" export pagecache1="$workdir/pagecache1"
export pagecache2="$workdir/pagecache2" export pagecache2="$workdir/pagecache2"
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Utility to find an executable # Utility to find an executable
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
skipping to change at line 762 skipping to change at line 770
} }
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Process options # Process options
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Default values # Default values
opthtml=1; optdiff=0; optchbars=0; optwdiff=0; optshow=0; optnowdiff=0; opthtml=1; optdiff=0; optchbars=0; optwdiff=0; optshow=0; optnowdiff=0;
optkeep=0; optinfo=0; optwidth=0; optnums=0; optbody=0; optabdiff=0; optkeep=0; optinfo=0; optwidth=0; optnums=0; optbody=0; optabdiff=0;
optstrip=1; opthwdiff=0; optlinks=0; optstrip=1; opthwdiff=0; optlinks=0;
optoldcolour="red"; optnewcolour="green"; optlarger=""
optstdout=0; optstdout=0;
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
case "$1" in case "$1" in
--html) opthtml=1; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=0; optabd iff=0;; --html) opthtml=1; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=0; optabd iff=0;;
--diff) opthtml=0; optdiff=1; optchbars=0; optwdiff=0; opthwdiff=0; optabd iff=0;; --diff) opthtml=0; optdiff=1; optchbars=0; optwdiff=0; opthwdiff=0; optabd iff=0;;
--chbars) opthtml=0; optdiff=0; optchbars=1; optwdiff=0; opthwdiff=0; optabd iff=0;; --chbars) opthtml=0; optdiff=0; optchbars=1; optwdiff=0; opthwdiff=0; optabd iff=0;;
--wdiff) opthtml=0; optdiff=0; optchbars=0; optwdiff=1; opthwdiff=0; optabd iff=0;; --wdiff) opthtml=0; optdiff=0; optchbars=0; optwdiff=1; opthwdiff=0; optabd iff=0;;
--hwdiff) opthtml=0; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=1; optabd iff=0;; --hwdiff) opthtml=0; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=1; optabd iff=0;;
--changes)opthtml=0; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=0; optabd iff=1;; --changes)opthtml=0; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=0; optabd iff=1;;
--abdiff) opthtml=0; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=0; optabdiff=1;; --abdiff) opthtml=0; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=0; optabdiff=1;;
--ab-diff)opthtml=0; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=0; optabd iff=1;; --ab-diff)opthtml=0; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=0; optabd iff=1;;
--rfc-editor-diff)opthtml=0; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=0 ; optabdiff=1;; --rfc-editor-diff)opthtml=0; optdiff=0; optchbars=0; optwdiff=0; opthwdiff=0 ; optabdiff=1;;
--version)echo -e "$basename\t$version\t$progdate"; exit 0;; --version)echo -e "$basename\t$version\t$progdate"; exit 0;;
--browse) optshow=1;; --browse) optshow=1;;
--nowdiff)optnowdiff=1;; --nowdiff)optnowdiff=1;;
--keep) optkeep=1;; --keep) optkeep=1;;
--info) optinfo=1; keyword=$2; shift;; --info) optinfo=1; keyword=$2; shift;;
--help) optinfo=1; keyword="Usage";; --help) optinfo=1; keyword="Usage";;
--width) optwidth=$2; shift;; --width) optwidth=$2; shift;;
--oldcolor) optoldcolour=$2; shift;;
--oldcolour) optoldcolour=$2; shift;;
--newcolor) optnewcolour=$2; shift;;
--newcolour) optnewcolour=$2; shift;;
--larger) optlarger='size="+1"';;
--linenum)optnums=1;; --linenum)optnums=1;;
--body) optbody=1;; --body) optbody=1;;
--nostrip)optstrip=0; optbody=0;; --nostrip)optstrip=0; optbody=0;;
--stdout) optstdout=1;; --stdout) optstdout=1;;
--links) optlinks=1;; --links) optlinks=1;;
--no-space-changes) optnospacechange=1;;
--ignore-whitespace) optignorewhite=1;;
--wdiff-args) optwdiffargs=$2; shift;;
--) shift; break;; --) shift; break;;
-v) echo "$basename $version"; exit 0;; -v) echo "$basename $version"; exit 0;;
-*) echo "Unrecognized option: $1"; -*) echo "Unrecognized option: $1";
exit 1;; exit 1;;
*) break;; *) break;;
esac esac
shift shift
done done
skipping to change at line 965 skipping to change at line 982
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
origdir=$PWD origdir=$PWD
cd $workdir cd $workdir
if cmp 1/"$base1" 2/"$base2" >/dev/null; then if cmp 1/"$base1" 2/"$base2" >/dev/null; then
echo "" echo ""
echo "The files are identical." echo "The files are identical."
fi fi
if [ $opthtml -gt 0 ]; then if [ $opthtml -gt 0 ]; then
diff -Bd -U $prelines 1/"$base1" 2/"$base2" | tee $workdir/diff | htmldiff > "$ tempout" diff -Bd ${optnospacechange:+-b} ${optignorewhite:+-w} -U $prelines 1/"$base1" 2/"$base2" | tee $workdir/diff | htmldiff > "$tempout"
fi fi
if [ $optchbars -gt 0 ]; then if [ $optchbars -gt 0 ]; then
diff -Bwd -U 10000 1/"$base1" 2/"$base2" | tee $workdir/diff | grep -v "^-" | t ail -n +3 | sed 's/^+/|/' > "$tempout" diff -Bwd -U 10000 1/"$base1" 2/"$base2" | tee $workdir/diff | grep -v "^-" | t ail -n +3 | sed 's/^+/|/' > "$tempout"
fi fi
if [ $optdiff -gt 0 ]; then if [ $optdiff -gt 0 ]; then
diff -Bwd -U $prelines 1/"$base1" 2/"$base2" | tee $workdir/diff > "$tempout" diff -Bwd -U $prelines 1/"$base1" 2/"$base2" | tee $workdir/diff > "$tempout"
fi fi
if [ $optabdiff -gt 0 ]; then if [ $optabdiff -gt 0 ]; then
diff -wd -U 1000 1/"$base1" 2/"$base2" | tee $workdir/diff | abdiff diff -wd -U 1000 1/"$base1" 2/"$base2" | tee $workdir/diff | abdiff
fi fi
if [ $optwdiff -gt 0 ]; then if [ $optwdiff -gt 0 ]; then
wdiff -a 1/"$base1" 2/"$base2" wdiff -a $optwdiffargs 1/"$base1" 2/"$base2"
fi fi
if [ $opthwdiff -gt 0 ]; then if [ $opthwdiff -gt 0 ]; then
echo "<html><head><title>wdiff "$base1" "$base2"</title></head><body>" > "$tempout" echo "<html><head><title>wdiff "$base1" "$base2"</title></head><body>" > "$tempout"
echo "<pre>" >> "$tempout" echo "<pre>" >> "$tempout"
wdiff -w "<strike><font color='red'>" -x "</font></strike>" -y "<strong><font wdiff -w "<strike><font color='$optoldcolour' $optlarger>" -x "</font></strike
color='green'>" -z "</font></strong>" 1/"$base1" 2/"$base2" >> "$tempout" >" \
-y "<strong><font color='$optnewcolour' $optlarger>" -z "</font></strong
>" \
1/"$base1" 2/"$base2" >>
"$tempout"
echo "</pre>" >> "$tempout" echo "</pre>" >> "$tempout"
echo "</body></html>" >> "$tempout" echo "</body></html>" >> "$tempout"
fi fi
if [ $optstdout -gt 0 ]; then if [ $optstdout -gt 0 ]; then
cat "$tempout" cat "$tempout"
rm "$tempout" rm "$tempout"
else else
cd "$origdir"; if [ -f $workdir/"$tempout" ]; then mv $workdir/"$tempout" "$outf ile"; fi cd "$origdir"; if [ -f $workdir/"$tempout" ]; then mv $workdir/"$tempout" "$outf ile"; fi
fi fi
 End of changes. 9 change blocks. 
6 lines changed or deleted 27 lines changed or added

This html diff was produced by rfcdiff 1.39. The latest version is available from http://tools.ietf.org/tools/rfcdiff/