Calculate the chosen consolidation function I<CF> over the data-source
variable I<vname> and C<printf> the result to stdout using I<format>.
-In the I<format> string there should be a '%lf' or '%le' marker in the
+In the I<format> string there should be a '%lf', '%le' or'%lg' marker in the
place where the number should be printed.
If an additional '%s' is found AFTER the marker, the value will be scaled
=item *
-B<%#.#le> (where # is an optional number) prints like 1.2346e+04
+B<%#.#le> prints like 1.2346e+04. Optional numbers # are field width and
+decimal precision
=item *
-B<%#.#lf> prints like 12345.6789
+B<%#.#lf> prints like 12345.6789, with optional field width and precision
=item *
-B<%s> place this after B<%le> or B<%lf>. This will be replaced by the
+B<%#.#lg> prints like 12345.6789, with optional field width and number of
+significant digits
+
+=item *
+
+B<%s> place this after B<%le>, B<%lf> or B<%lg>. This will be replaced by the
appropriate SI magnitude unit and the value will be scaled
accordingly (123456 -> 123.456 k)
if (*ptr == '.') ptr++;
while (*ptr >= '0' && *ptr <= '9') ptr++;
- /* Either 'le' or 'lf' must follow here */
+ /* Either 'le', 'lf' or 'lg' must follow here */
if (*ptr++ != 'l') return 1;
- if (*ptr == 'e' || *ptr == 'f') ptr++;
+ if (*ptr == 'e' || *ptr == 'f' || *ptr == 'g') ptr++;
else return 1;
n++;
}