Files
mosquitto/client
Michał Łyszczek 91bca8899c mosquitto_sub: add support to print floats
This patch adds support for two new format specifiers (%f and %d)
to print float and double data.

Generally it's not save to directly take native binary data of one machine and
print it on another one (since mosquitto is multiarch). But in case of floats
it's save to print representation of it, if __STDC_IEC_559__ is defined.

In C99 Annex F, standard we can read:
> This annex specifies C language support for the
> IEC 60559 floating-point standard.
> (...)
> An implementation that defines __STDC_IEC_559__
> shall conform to the specifications in this annex

All float printing code is behind __STDC_IEC_559__, so if that is not
defined, floating print will be disabled and error returned to user.

Documentation also describes restrictions about printing floats.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2022-04-24 17:33:37 +02:00
..
2021-11-03 22:10:06 +00:00
2021-11-03 22:10:06 +00:00
2022-02-09 22:19:35 +00:00
2022-02-09 14:44:09 +00:00
2021-11-03 22:10:06 +00:00
2021-11-03 22:10:06 +00:00
2021-11-03 22:10:06 +00:00
2021-11-03 22:10:06 +00:00
2021-11-03 22:10:06 +00:00
2021-11-03 22:10:06 +00:00