Jan Breuer
2016-05-31 c8c00d2032c12f79df352d4eb573c228099b30cf
libscpi/inc/scpi/config.h
@@ -246,17 +246,17 @@
#endif
#if HAVE_DTOSTRE
#define SCPIDEFINE_floatToStr(v, s, l) strlen(dtostre((double)(v), (s), 6, DTOSTR_PLUS_SIGN | DTOSTR_ALWAYS_SIGN | DTOSTR_UPPERCASE))
#define SCPIDEFINE_floatToStr(v, s, l) dtostre((double)(v), (s), 6, DTOSTR_PLUS_SIGN | DTOSTR_ALWAYS_SIGN | DTOSTR_UPPERCASE)
#elif USE_CUSTOM_DTOSTRE
#define SCPIDEFINE_floatToStr(v, s, l) strlen(SCPI_dtostre((v), (s), (l), 6, 0))
#define SCPIDEFINE_floatToStr(v, s, l) SCPI_dtostre((v), (s), (l), 6, 0)
#else
#define SCPIDEFINE_floatToStr(v, s, l) snprintf((s), (l), "%g", (v))
#endif
#if HAVE_DTOSTRE
#define SCPIDEFINE_doubleToStr(v, s, l) strlen(dtostre((v), (s), 15, DTOSTR_PLUS_SIGN | DTOSTR_ALWAYS_SIGN | DTOSTR_UPPERCASE))
#define SCPIDEFINE_doubleToStr(v, s, l) dtostre((v), (s), 15, DTOSTR_PLUS_SIGN | DTOSTR_ALWAYS_SIGN | DTOSTR_UPPERCASE)
#elif USE_CUSTOM_DTOSTRE
#define SCPIDEFINE_doubleToStr(v, s, l) strlen(SCPI_dtostre((v), (s), (l), 15, 0))
#define SCPIDEFINE_doubleToStr(v, s, l) SCPI_dtostre((v), (s), (l), 15, 0)
#else
#define SCPIDEFINE_doubleToStr(v, s, l) snprintf((s), (l), "%.15lg", (v))
#endif
@@ -271,14 +271,14 @@
#define SCPIDEFINE_free(h, s, r)                        free((s))
#else
#define SCPIDEFINE_DESCRIPTION_MAX_PARTS                3
#define SCPIDEFINE_strndup(h, s, l)                     OUR_strndup((h), (s), (l))
#define SCPIDEFINE_free(h, s, r)                        OUR_free((h), (s), (r))
#define SCPIDEFINE_get_parts(h, s, l1, s2, l2)          OUR_get_parts((h), (s), (l1), (s2), (l2))
#define SCPIDEFINE_strndup(h, s, l)                     scpiheap_strndup((h), (s), (l))
#define SCPIDEFINE_free(h, s, r)                        scpiheap_free((h), (s), (r))
#define SCPIDEFINE_get_parts(h, s, l1, s2, l2)          scpiheap_get_parts((h), (s), (l1), (s2), (l2))
#endif
#else
#define SCPIDEFINE_DESCRIPTION_MAX_PARTS                1
#define SCPIDEFINE_strdup(h, s, l)                      NULL
#define SCPIDEFINE_free(h, s, r)                        (void)
#define SCPIDEFINE_strndup(h, s, l)                     NULL
#define SCPIDEFINE_free(h, s, r)
#endif
#ifdef   __cplusplus