rfcdiff-v1.37   rfcdiff 
skipping to change at line 97 skipping to change at line 97
# 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.37" export version="1.38"
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 272 skipping to change at line 272
while ( getline < ENVIRON["pagecache2"] > 0) { while ( getline < ENVIRON["pagecache2"] > 0) {
pageend[2,$1] = $2; pageend[2,$1] = $2;
if ($1+0 > maxpage[2]) maxpage[2] = $1+0; if ($1+0 > maxpage[2]) maxpage[2] = $1+0;
} }
wdiff = ENVIRON["wdiffbin"] wdiff = ENVIRON["wdiffbin"]
base1 = ENVIRON["base1"] base1 = ENVIRON["base1"]
base2 = ENVIRON["base2"] base2 = ENVIRON["base2"]
optwidth = ENVIRON["optwidth"] optwidth = ENVIRON["optwidth"]
optnums = ENVIRON["optnums"] optnums = ENVIRON["optnums"]
optlinks = ENVIRON["optlinks"]
cmdline = ENVIRON["cmdline"] cmdline = ENVIRON["cmdline"]
gsub("--", "- -", cmdline) gsub("--", "- -", cmdline)
ENVIRON["cmdline"] = cmdline ENVIRON["cmdline"] = cmdline
header(base1, base2) header(base1, base2)
difflines1 = 0 difflines1 = 0
difflines2 = 0 difflines2 = 0
} }
function header(file1, file2) { function header(file1, file2) {
url1 = file1;
url2 = file2;
if (optlinks) {
if (file1 ~ /^draft-/) { url1 = sprintf("<a href=\"/id/%s\" style=\"color:#0
08\">%s</a>", file1, file1); }
if (file1 ~ /^draft-/) { prev = sprintf("<a href=\"/rfcdiff?url2=%s\" style=
\"color:#008; text-decoration:none;\">&lt;</a>", file1); }
if (file2 ~ /^draft-/) { url2 = sprintf("<a href=\"/id/%s\" style=\"color:#0
08\">%s</a>", file2, file2); }
if (file2 ~ /^draft-/) { nxt = sprintf("<a href=\"/rfcdiff?url1=%s\" style=
\"color:#008; text-decoration:none;\">&gt;</a>", file2) }
}
printf "" \ printf "" \
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3. org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> \n" \ "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3. org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> \n" \
"<!-- Generated by rfcdiff %s: rfcdiff %s --> \n" \ "<!-- Generated by rfcdiff %s: rfcdiff %s --> \n" \
"<!-- <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional\" > -->\n" \ "<!-- <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional\" > -->\n" \
"<!-- System: %s --> \n" \ "<!-- System: %s --> \n" \
"<!-- Using awk: %s: %s --> \n" \ "<!-- Using awk: %s: %s --> \n" \
"<!-- Using diff: %s: %s --> \n" \ "<!-- Using diff: %s: %s --> \n" \
"<!-- Using wdiff: %s: %s --> \n" \ "<!-- Using wdiff: %s: %s --> \n" \
"<html> \n" \ "<html> \n" \
"<head> \n" \ "<head> \n" \
skipping to change at line 324 skipping to change at line 333
" .right .cont { background-color: #EEE; } \n" \ " .right .cont { background-color: #EEE; } \n" \
" .lblock .cont { background-color: #9D9; } \n" \ " .lblock .cont { background-color: #9D9; } \n" \
" .rblock .cont { background-color: #DD6; } \n" \ " .rblock .cont { background-color: #DD6; } \n" \
" .insert .cont { background-color: #0DD; } \n" \ " .insert .cont { background-color: #0DD; } \n" \
" .delete .cont { background-color: #8AD; } \n" \ " .delete .cont { background-color: #8AD; } \n" \
" .stats, .stats td, .stats th { background-color: #EEE; padding: 2px 0; } \n" \ " .stats, .stats td, .stats th { background-color: #EEE; padding: 2px 0; } \n" \
" </style> \n" \ " </style> \n" \
"</head> \n" \ "</head> \n" \
"<body > \n" \ "<body > \n" \
" <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> \n" \ " <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> \n" \
" <tr bgcolor=\"orange\"><th></th><th>&nbsp;%s&nbsp;</th><th> </th><th>&nbsp;%s&n " <tr bgcolor=\"orange\"><th></th><th>%s&nbsp;%s&nbsp;</th><th> </th><th>&nbsp;%s
bsp;</th><th></th></tr> \n" \ &nbsp;%s</th><th></th></tr> \n" \
"", ENVIRON["version"], ENVIRON["cmdline"], ENVIRON["uname"], ENVIRON["awkbin"], E "", ENVIRON["version"], ENVIRON["cmdline"], ENVIRON["uname"], ENVIRON["awkbin"], E
NVIRON["awkver"], ENVIRON["diffbin"], ENVIRON["diffver"], ENVIRON["wdiffbin"], ENV NVIRON["awkver"], ENVIRON["diffbin"], ENVIRON["diffver"], ENVIRON["wdiffbin"], ENV
IRON["wdiffver"], file1, file2, file1, file2; IRON["wdiffver"], file1, file2, prev, url1, url2, nxt;
} }
function worddiff(w1, w2) { function worddiff(w1, w2) {
prefixlen = 0; prefixlen = 0;
word1 = w1; word1 = w1;
do { do {
if (substr(w1,1,1) == substr(w2,1,1)) { if (substr(w1,1,1) == substr(w2,1,1)) {
w1 = substr(w1,2); w1 = substr(w1,2);
w2 = substr(w2,2); w2 = substr(w2,2);
} else { } else {
skipping to change at line 752 skipping to change at line 761
exit 1; exit 1;
} }
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# 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; optstrip=1; opthwdiff=0; optlinks=0;
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;;
skipping to change at line 777 skipping to change at line 786
--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;;
--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;;
--) 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
export optwidth export optwidth
export optnums export optnums
export optlinks
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Determine output file name. Maybe output usage and exit. # Determine output file name. Maybe output usage and exit.
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
#set -x #set -x
if [ $optinfo -gt 0 ]; then if [ $optinfo -gt 0 ]; then
extract $keyword $0 extract $keyword $0
exit exit
fi fi
 End of changes. 7 change blocks. 
7 lines changed or deleted 22 lines changed or added

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