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>
This commit is contained in:
@@ -250,6 +250,7 @@ extern char **xstrtokenize(const char *str, const char *separators);
|
||||
extern void FormatInt64(int64_t num, char *string);
|
||||
extern void FormatUInt64(uint64_t num, char *string);
|
||||
extern void FormatUInt64Hex(uint64_t num, char *string);
|
||||
extern void FormatDouble(double dbl, char *string);
|
||||
|
||||
/**
|
||||
* Compare the two version numbers comprising of major.minor.
|
||||
|
||||
Reference in New Issue
Block a user