rfcdiff-v1.44 | rfcdiff | |||
---|---|---|---|---|
skipping to change at line 105 ¶ | 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.44" | export version="1.45" | |||
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 1009 ¶ | skipping to change at line 1009 ¶ | |||
# If there's a rfcdiff.js script in the current directory, include that | # If there's a rfcdiff.js script in the current directory, include that | |||
# in the output html, otherwise use the inline script expansion below. | # in the output html, otherwise use the inline script expansion below. | |||
if [ -e rfcdiff.js ]; then | if [ -e rfcdiff.js ]; then | |||
jsinc=" | jsinc=" | |||
<script> | <script> | |||
$(< rfcdiff.js ) | $(< rfcdiff.js ) | |||
</script> | </script> | |||
" | " | |||
else | else | |||
jsinc=$(cat <<'ENDOFSCRIPT' | jsinc=$(cat <<'ENDOFSCRIPT' | |||
<script src="rfcdiff.js"></script> | <script> | |||
var chunk_index = 0; | ||||
var old_chunk = null; | ||||
function format_chunk(index) { | ||||
var prefix = "diff"; | ||||
var str = index.toString(); | ||||
for (x=0; x<(4-str.length); ++x) { | ||||
prefix+='0'; | ||||
} | ||||
return prefix + str; | ||||
} | ||||
function find_chunk(n){ | ||||
return document.querySelector('tr[id$="' + n + '"]'); | ||||
} | ||||
function change_chunk(offset) { | ||||
var index = chunk_index + offset; | ||||
var new_str; | ||||
var new_chunk; | ||||
new_str = format_chunk(index); | ||||
new_chunk = find_chunk(new_str); | ||||
if (!new_chunk) { | ||||
return; | ||||
} | ||||
if (old_chunk) { | ||||
old_chunk.style.outline = ""; | ||||
} | ||||
old_chunk = new_chunk; | ||||
old_chunk.style.outline = "1px solid red"; | ||||
window.location.hash = "#" + new_str; | ||||
window.scrollBy(0,-100); | ||||
chunk_index = index; | ||||
} | ||||
document.onkeydown = function(e) { | ||||
switch (e.keyCode) { | ||||
case 78: | ||||
change_chunk(1); | ||||
break; | ||||
case 80: | ||||
change_chunk(-1); | ||||
break; | ||||
} | ||||
}; | ||||
</script> | ||||
ENDOFSCRIPT | ENDOFSCRIPT | |||
) | ) | |||
fi | fi | |||
export jsinc | export jsinc | |||
# ---------------------------------------------------------------------- | # ---------------------------------------------------------------------- | |||
# Check that we don't have a broken awk | # Check that we don't have a broken awk | |||
# ---------------------------------------------------------------------- | # ---------------------------------------------------------------------- | |||
if [ $opthtml -gt 0 -a "${uname%% *}" == "Darwin" -a "$awkver" == "awk version 200 70501" ]; then | if [ $opthtml -gt 0 -a "${uname%% *}" == "Darwin" -a "$awkver" == "awk version 200 70501" ]; then | |||
echo -e "\n Oops. Awk version 20070501 on OS X doesn't work with rfcdiff's html mode.\n To make rfcdiff work, you could install Gnu Awk (gawk), for instance using\n MacPorts, http://www.macports.org/." | echo -e "\n Oops. Awk version 20070501 on OS X doesn't work with rfcdiff's html mode.\n To make rfcdiff work, you could install Gnu Awk (gawk), for instance using\n MacPorts, http://www.macports.org/." | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 49 lines changed or added | |||
This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |