]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/xtypes-basic.c
tableprinter: removed some obsolete FIXME, added some comments
[libucw.git] / ucw / xtypes-basic.c
index 94dc1ed0328e17965f43f63d10bd70f581ed837b..26d7cb1f54b191ac64cdbcd2014573d83ed09a73 100644 (file)
@@ -13,8 +13,8 @@
 #include <ucw/strtonum.h>
 #include <ucw/xtypes.h>
 #include <errno.h>
-#include <stdlib.h>
 #include <inttypes.h>
+#include <stdlib.h>
 
 #define XTYPE_NUM_FORMAT(_type, _fmt, _typename) static const char *xt_##_typename##_format(void *src, u32 fmt UNUSED, struct mempool *pool) \
 {\
@@ -50,9 +50,9 @@ static const char *xt_double_format(void *src, u32 fmt, struct mempool *pool)
 {
   double val = *((double *)src);
 
-  if (fmt & XTYPE_FMT_DBL_PREC)
+  if (fmt & XT_DOUBLE_FMT_PREC_FLAG)
     {
-      uint prec = fmt & ~XTYPE_FMT_DBL_PREC;
+      uint prec = fmt & ~XT_DOUBLE_FMT_PREC_FLAG;
       return mp_printf(pool, "%.*lf", prec, val);
     }
 
@@ -88,7 +88,7 @@ static const char * xt_double_fmt_parse(const char *str, u32 *dest, struct mempo
   if (tmp_err)
     return mp_printf(pool, "Could not parse floating point number precision: %s", tmp_err);
 
-  *dest = XTYPE_FMT_DBL_FIXED_PREC(precision);
+  *dest = XT_DOUBLE_FMT_PREC(precision);
   return NULL;
 }