os: add support for %f to pnprintf
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 10 Jan 2013 03:20:12 +0000 (13:20 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 17 Jan 2013 07:17:41 +0000 (17:17 +1000)
commitcde7cbe9674e8a771f9a4e646c1772a46a8230fb
tree6614374b40805df9eddbd83bb7eb1994765daa23
parent20def57632583aef095ca18792c7fce16d2d9004
os: add support for %f to pnprintf

This is the lazy man's %f support. Print the decimal part of the number,
then append a decimal point, then print the first two digits of the
fractional part. So %f in sigsafe printing is really %.2f.

No boundary checks in place here.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
include/misc.h
os/log.c
os/utils.c
test/signal-logging.c