]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/strtonum.h
Table: renamed table_col_order[_by_name] -> table_set_col_order[_by_name]
[libucw.git] / ucw / strtonum.h
index 865dda7d3eebdeee91e3ab6dfca04a8c3c0ecbc3..fc99e23749e39147784d1cd252b2c7e6a27102ad 100644 (file)
 #ifndef _STRTONUM_H
 #define _STRTONUM_H
 
+#ifdef CONFIG_UCW_CLEAN_ABI
+#define str_to_uintmax ucw_str_to_uintmax
+#define str_to_uint ucw_str_to_uint
+
+// FIXME: For backwards compatibility, will be removed soon
+#define str_to_uns ucw_str_to_uns
+#endif
+
 // Set (flags & 0x1f) in the range 1 to 31 to denote the default base of the number
 enum str_to_num_flags {
   STN_SIGNED = 0x20,       // The resulting range is signed
@@ -35,18 +43,21 @@ enum str_to_num_flags {
 #define STN_USFLAGS        (STN_SFLAGS | STN_UNDERSCORE)
 
 #define STN_DECLARE_CONVERTOR(type, suffix)                                                               \
-const char *str_to_##suffix(type *num, const char *str, const char **next, const uns flags)
+const char *str_to_##suffix(type *num, const char *str, const char **next, const uint flags)
 
 #define STN_SIGNED_CONVERTOR(type, suffix, usuffix)                                                       \
-static inline const char *str_to_##suffix(type *num, const char *str, const char **next, const uns flags) \
+static inline const char *str_to_##suffix(type *num, const char *str, const char **next, const uint flags) \
 {                                                                                                         \
   return str_to_##usuffix((void *) num, str, next, flags | STN_SIGNED | STN_PLUS | STN_MINUS);            \
 }
 
-STN_DECLARE_CONVERTOR(uns, uns);
-STN_SIGNED_CONVERTOR(int, int, uns)
+STN_DECLARE_CONVERTOR(uint, uint);
+STN_SIGNED_CONVERTOR(int, int, uint)
 
 STN_DECLARE_CONVERTOR(uintmax_t, uintmax);
 STN_SIGNED_CONVERTOR(intmax_t, intmax, uintmax)
 
+// FIXME: For backwards compatibility, will be removed soon
+STN_DECLARE_CONVERTOR(uns, uns);
+
 #endif