diff --git a/webrev.ksh b/webrev.ksh old mode 100644 new mode 100755 --- a/webrev.ksh +++ b/webrev.ksh @@ -218,19 +218,26 @@ PREVIOUS_FILE=$2 NEXT_FILE=$3 EXTENSION=$4 + + if [[ $EXTENSION = "" ]] + then + EXTSTRING="" + else + EXTSTRING=".${EXTENSION}" + fi if [[ $PREVIOUS_FILE = "no_prev" ]] then PREV_LINK="< prev" else - PREV_LINK="< prev" + PREV_LINK="< prev" fi if [[ $NEXT_FILE = "no_next" ]] then NEXT_LINK="next >" else - NEXT_LINK="next >" + NEXT_LINK="next >" fi print "
${PREV_LINK} index ${NEXT_LINK}
" @@ -1084,7 +1091,7 @@ # -# source_to_html { new | old } +# source_to_html { new | old } # # Process a plain vanilla source file to transform it into an HTML file. # @@ -1092,13 +1099,30 @@ { WHICH=$1 TNAME=$2 + RELROOT=$3 + PREVIOUS_FILE=$4 + NEXT_FILE=$5 + if [[ $WHICH = "Old" ]] + then + if [[ $PREVIOUS_FILE != "no_prev" ]] + then + PREVIOUS_FILE=${PREVIOUS_FILE}- + fi + if [[ $NEXT_FILE != "no_next" ]] + then + NEXT_FILE=${NEXT_FILE}- + fi + fi print "$HTML$STDHEAD" print "$WHICH $TNAME" print "" + prev_index_next_html "$RELROOT" "$PREVIOUS_FILE" "$NEXT_FILE" "" print "
"
 	html_quote | $AWK '{line += 1 ; printf "%4d %s\n", line, $0 }'
-	print "
" + print "" + prev_index_next_html "$RELROOT" "$PREVIOUS_FILE" "$NEXT_FILE" "" + print "" } comments_from_mercurial() @@ -2585,18 +2609,18 @@ if [[ -f $ofile && -z $mv_but_nodiff ]]; then if [[ -n $its_a_jar ]]; then - source_to_html Old $P < $ofile.lst > $WDIR/$DIR/$F-.html + source_to_html Old $P $RELROOT $PREVIOUS_FILE $NEXT_FILE < $ofile.lst > $WDIR/$DIR/$F-.html else - source_to_html Old $P < $ofile > $WDIR/$DIR/$F-.html + source_to_html Old $P $RELROOT $PREVIOUS_FILE $NEXT_FILE < $ofile > $WDIR/$DIR/$F-.html fi print " old\c" fi if [[ -f $nfile ]]; then if [[ -n $its_a_jar ]]; then - source_to_html New $P < $nfile.lst > $WDIR/$DIR/$F.html + source_to_html New $P $RELROOT $PREVIOUS_FILE $NEXT_FILE < $nfile.lst > $WDIR/$DIR/$F.html else - source_to_html New $P < $nfile > $WDIR/$DIR/$F.html + source_to_html New $P $RELROOT $PREVIOUS_FILE $NEXT_FILE < $nfile > $WDIR/$DIR/$F.html fi print " new\c" fi