- /*bernie: save some memory, who cares about floats with lots of decimals? */
- #define FRMWRI_BUFSIZE 134
- #warning 134 is too much, the code must be fixed to have a lower precision limit
+ #if CONFIG_FRMWRI_BUFSIZE
+ #define FRMWRI_BUFSIZE CONFIG_FRMWRI_BUFSIZE
+ #else
+ /* Conservative estimate. Max float is 3.40282e+038, so %f (but not %e or %g) must have
+ * space for: sign + all 38 digits + '.' + 6 decimal digits (default)
+ * Use a high value to avoid unexpected buffer overflows.
+ */
+ #define FRMWRI_BUFSIZE 134
+ #endif