mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 00:17:11 +02:00
schhist/schhist2web: correct handling of deferred columns
This fixes two bugs: - the last column could leave td=true, causing an extra column to be erroneously inserted at the beginning of the next row - a deferred <TD> at the end of the row would be output before $s, placing it right after the last thumbnail instead of the end of the thumbnail section Also combines flushing of "td" for all code paths that produce a difference image.
This commit is contained in:
parent
c9bd26a34d
commit
78bcb8d3de
@ -385,11 +385,11 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
next="$head"
|
next="$head"
|
||||||
td=false
|
|
||||||
for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do
|
for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do
|
||||||
[ -d "$cache/$n/ppm0" ] || continue
|
[ -d "$cache/$n/ppm0" ] || continue
|
||||||
empty=true
|
empty=true
|
||||||
s="<TR>"
|
s="<TR>"
|
||||||
|
td=false
|
||||||
mkdir -p "$out/$next/"{diff,thumb,html,pdf}
|
mkdir -p "$out/$next/"{diff,thumb,html,pdf}
|
||||||
while read m; do
|
while read m; do
|
||||||
a0="$cache/$n/ppm0/$m.ppm"
|
a0="$cache/$n/ppm0/$m.ppm"
|
||||||
@ -418,21 +418,15 @@ for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do
|
|||||||
s="$s<IMG src=\"unchanged.png\">"
|
s="$s<IMG src=\"unchanged.png\">"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
$td && s="$s<TD>"
|
|
||||||
td=false
|
|
||||||
pngdiff shrink "$thumb" -f $THUMB_OPTS "$a2" "$b2" "$a0" "$b0" ||
|
pngdiff shrink "$thumb" -f $THUMB_OPTS "$a2" "$b2" "$a0" "$b0" ||
|
||||||
exit
|
exit
|
||||||
schps2pdf -T BEFORE -T AFTER -o "$pdf" "$aps" "$bps" || exit
|
schps2pdf -T BEFORE -T AFTER -o "$pdf" "$aps" "$bps" || exit
|
||||||
elif [ -f "$a0" ]; then
|
elif [ -f "$a0" ]; then
|
||||||
$td && s="$s<TD>"
|
|
||||||
td=false
|
|
||||||
pngdiff cat "$diff" -f -c 1,0,0 "$a1" "$a1" || exit
|
pngdiff cat "$diff" -f -c 1,0,0 "$a1" "$a1" || exit
|
||||||
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 1,0,0 "$a2" "$a2" ||
|
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 1,0,0 "$a2" "$a2" ||
|
||||||
exit
|
exit
|
||||||
schps2pdf -T DELETED -o "$pdf" "$aps" || exit
|
schps2pdf -T DELETED -o "$pdf" "$aps" || exit
|
||||||
elif [ -f "$b0" ]; then
|
elif [ -f "$b0" ]; then
|
||||||
$td && s="$s<TD>"
|
|
||||||
td=false
|
|
||||||
pngdiff cat "$diff" -f -c 0,1,0 "$b1" "$b1" || exit
|
pngdiff cat "$diff" -f -c 0,1,0 "$b1" "$b1" || exit
|
||||||
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 0,1,0 "$b2" "$b2" ||
|
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 0,1,0 "$b2" "$b2" ||
|
||||||
exit
|
exit
|
||||||
@ -440,13 +434,15 @@ for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do
|
|||||||
else
|
else
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
$td && s="$s<TD>"
|
||||||
|
td=false
|
||||||
echo "$s"
|
echo "$s"
|
||||||
s=
|
s=
|
||||||
wrapped_png "$out" "$next" "$m"
|
wrapped_png "$out" "$next" "$m"
|
||||||
empty=false
|
empty=false
|
||||||
done < <(ordered_names)
|
done < <(ordered_names)
|
||||||
$td && echo "<TD>"
|
|
||||||
if ! $empty; then
|
if ! $empty; then
|
||||||
|
$td && s="$s<TD>"
|
||||||
echo "$s<TD valign=\"middle\">"
|
echo "$s<TD valign=\"middle\">"
|
||||||
commit_entry "$dir" $next
|
commit_entry "$dir" $next
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user