Commit Graph

4 Commits

Author SHA1 Message Date
Lephe 7e0ccc3f69
kprint: do not call Grisu2b with input 0.0
It doesn't generate the expected string "0" for some reason, which
causes a freeze somewhere.
2021-05-21 22:30:51 +02:00
Lephe bc3b8f5602
kprint: add support for L modifier in %f
This is just a parsing trick because long double and double are the same
type on this platform.
2021-05-21 22:30:30 +02:00
Lephe bbf6401213
kprint: add floating-point formatting based in Grisu2b 59,56 2021-02-02 22:18:15 +01:00
Lephe 023675d449
improve structure of sources and formatted printer
* Create an `src/3rdparty` folder for third-party code (to add the
  Grisu2B alfogithm soon).
* Split the formatted printer into gint's kprint (src/kprint), its
  extension and interface (include/gint/kprint.h), and its use in the
  standard stdio functions (src/std/print.c).
* Slightly improve the interface of kformat_geometry() to avoid relying
  on knowing format specifiers.
* Add a function to register more formatters, to allow floating-point
  formatters without requiring them.
2021-02-02 18:19:10 +01:00