diff --git a/plugins/Stock/README b/plugins/Stock/README new file mode 100644 index 000000000..4ed47262c --- /dev/null +++ b/plugins/Stock/README @@ -0,0 +1,10 @@ +Note that reproducing a third party's quotes without their permission +may be prohibited by their terms and conditions, copyright law or other +laws in your area. VA Software, OSDN, and the Slash coders take no +responsibility for how you use or misuse this software. Read the +"perldoc Finance::Quote" page and the perldoc pages from its subclasses +for more information, and if you are in doubt, consult a lawyer. You +may also want to reread the "NO WARRANTY" section of the GPL, which +you can find in the file COPYING, two directories up from this one, +section 11. + diff --git a/plugins/Stock/stockquotes.pl b/plugins/Stock/stockquotes.pl index 3e3e7cf01..dfda91b3a 100755 --- a/plugins/Stock/stockquotes.pl +++ b/plugins/Stock/stockquotes.pl @@ -59,10 +59,8 @@ $stock->{year_hi} = sprintf("%.1f", $2); } if ($stockfetch{$sym,"cap"} ne "" - and $stockfetch{$sym,"cap"} =~ /([\d.]+)/) { - # XXX something wrong here... market caps seem - # way off, not sure why - $stock->{cap} = sprintf("%.0fM", $1); + and $stockfetch{$sym,"cap"} =~ /([\d.]+)([BM])?/) { + $stock->{cap} = sprintf("%.0f$2", $1); } else { $stock->{cap} = "n/a"; }