diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms index cd5306e..297e6a7 100755 --- a/eeprom/decode-dimms +++ b/eeprom/decode-dimms @@ -347,7 +347,9 @@ sub cas_latencies(@) return join ', ', map("${_}T", sort { $b <=> $a } @_); } -sub printl($$) # print a line w/ label and value +# Real printing functions + +sub real_printl($$) # print a line w/ label and value { my ($label, $value) = @_; if ($opt_html) { @@ -379,7 +381,7 @@ sub printl2($$) # print a line w/ label and value (outside a table) print "$label: $value\n"; } -sub prints($) # print separator w/ given text +sub real_prints($) # print separator w/ given text { my ($label) = @_; if ($opt_html) { @@ -422,6 +424,24 @@ sub printc($) # print comment } } +# Fake printing functions +# These don't actually print anything, instead they store the desired +# output for later processing. + +sub printl($$) # print a line w/ label and value +{ + my @output = (\&real_printl, @_); + push @{$dimm[$current]->{output}}, \@output; +} + +sub prints($) # print separator w/ given text +{ + my @output = (\&real_prints, @_); + push @{$dimm[$current]->{output}}, \@output; +} + +# Helper functions + sub tns($) # print a time in ns { return sprintf("%3.2f ns", $_[0]); @@ -1677,10 +1697,6 @@ if (!$opt_igncheck) { for $current (0 .. $#dimm) { my @bytes = @{$dimm[$current]->{bytes}}; - print "" if $opt_html; - printl2("\n\nDecoding EEPROM", $dimm[$current]->{file}); - print "" if $opt_html; - print "