]> mj.ucw.cz Git - libucw.git/commitdiff
Returned back 'uns' and related functions for backwards compatibility.
authorTomas Valla <tom@ucw.cz>
Mon, 2 Jun 2014 16:02:31 +0000 (18:02 +0200)
committerTomas Valla <tom@ucw.cz>
Mon, 2 Jun 2014 16:02:31 +0000 (18:02 +0200)
maint/libucw.abi
ucw/conf.h
ucw/config.h
ucw/opt.h
ucw/strtonum.c
ucw/strtonum.h

index 27ddbd28e8952c8602b13e6a9cb2494f36ddefc3..b4fbcd0c04da5794dbfb7e7d40b015a74397c90d 100644 (file)
@@ -497,6 +497,8 @@ str_hier_suffix
 # ucw/strtonum.h
 str_to_uintmax
 str_to_uint
+# FIXME
+str_to_uns
 # ucw/tbf.h
 tbf_init
 tbf_limit
index e99d6e3138a42703a949184dee54a3db2fa3993d..11026b7a6fdf7d0bffde4468412e485ee11a12a8 100644 (file)
@@ -356,6 +356,12 @@ struct cf_section {                        /** A section. **/
 #define CF_IP(n,p)             CF_STATIC(n,p,IP,u32,1)                 /** Single IPv4 address. **/
 #define CF_IP_ARY(n,p,c)       CF_STATIC(n,p,IP,u32,c)                 /** Static array of IP addresses. **/.
 #define CF_IP_DYN(n,p,c)       CF_DYNAMIC(n,p,IP,u32,c)                /** Dynamic array of IP addresses. **/
+
+/* FIXME: Backwards compatibility only, should not be used at is will be removed soon. */
+#define CF_UNS CF_UINT
+#define CF_UNS_ARY CF_UINT_ARY
+#define CF_UNS_DYN CF_UINT_DYN
+
 /**
  * A string.
  * You provide a pointer to a `char *` variable and it will fill it with
index ffe61fc9599522dde9d3c9e7d8d293b01b87b3b5..a4768b721f073ed5c6e0769458ccd0c3d1244f00 100644 (file)
@@ -37,10 +37,11 @@ typedef uint64_t u64;                       /** Exactly 64 bits, unsigned **/
 typedef int64_t s64;                   /** Exactly 64 bits, signed **/
 
 typedef unsigned int uint;             /** A better pronounceable alias for `unsigned int` **/
-// FIXME
-// typedef uint uns;                   /** Backwards compatible alias for `uint' ***/
 typedef s64 timestamp_t;               /** Milliseconds since an unknown epoch **/
 
+// FIXME: This should be removed soon
+typedef uint uns;                      /** Backwards compatible alias for `uint' ***/
+
 #ifdef CONFIG_UCW_LARGE_FILES
 typedef s64 ucw_off_t;                 /** File position (either 32- or 64-bit, depending on `CONFIG_UCW_LARGE_FILES`). **/
 #else
index 5831102a193fed89a378b9071ab1eb37a6b6df30..557cadb16491255fcd62bf31ad120a87e9f001c9 100644 (file)
--- a/ucw/opt.h
+++ b/ucw/opt.h
@@ -206,6 +206,11 @@ struct opt_item {
 /** Incrementing option. @target should be a variable of type `int`. **/
 #define OPT_INC(shortopt, longopt, target, fl, desc) { .letter = shortopt, .name = longopt, .ptr = CHECK_PTR_TYPE(&target, int *), .flags = fl, .help = desc, .cls = OPT_CL_INC, .type = CT_INT }
 
+/* FIXME: Backwards compatibility only, should not be used anymore. */
+#define OPT_UNS OPT_UINT
+#define OPT_UNS_MULTIPLE OPT_UINT_MULTIPLE
+
+
 /**
  * When this option appears, call the function @fn with parameters @item, @value, @data,
  * where @item points to the <<struct_opt_item,`struct opt_item`>> of this option,
index 6667d47e197d610c3339b091d89244b9f85d8015..8468cf7525f9cf41a955686f56ed51de3274ccde 100644 (file)
@@ -105,3 +105,8 @@ static inline uint get_digit(const uint c)
 #define STN_TYPE uintmax_t
 #define STN_SUFFIX uintmax
 #include <ucw/strtonum-gen.h>
+
+// FIXME: For backwards compatibility, will be removed soon
+#define STN_TYPE uns
+#define STN_SUFFIX uns
+#include <ucw/strtonum-gen.h>
index 224a753af77aa3167207bbe400fce363991a6bbb..fc99e23749e39147784d1cd252b2c7e6a27102ad 100644 (file)
@@ -13,6 +13,9 @@
 #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
@@ -54,4 +57,7 @@ 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