]> mj.ucw.cz Git - libucw.git/commitdiff
Removed some remaining "uns" relics
authorMartin Mares <mj@ucw.cz>
Thu, 5 Jun 2014 13:59:25 +0000 (15:59 +0200)
committerMartin Mares <mj@ucw.cz>
Thu, 5 Jun 2014 13:59:25 +0000 (15:59 +0200)
ucw/doc/heap.txt
ucw/mempool.h
ucw/str-hex.c
ucw/string.c
ucw/string.h
ucw/strtonum.h

index 605c696dadfe650d257e5dafc492fcd95a8a7a77..df4f7534b8db5a719c727e44baaf6e1ed14dd377 100644 (file)
@@ -11,7 +11,7 @@ Binary heaps
 Example
 -------
 
-  static uns n;
+  static uint n;
   static int heap[4];
 
   // Create an empty heap
index 59ef22960e0df875f8beaec5f99b69dcaea406c7..f819a0f1e50a06c9af0ca8ea185029044bcad9ae 100644 (file)
@@ -72,7 +72,7 @@ struct mempool {
   struct mempool_state state;
   void *unused, *last_big;
   size_t chunk_size, threshold;
-  uns idx;
+  uint idx;
   u64 total_size;
 };
 
index f8595edfb8a233213fd3479afa9d9d11ac182cf0..04290489c5c512373f768d7fa7e678191fab1baf 100644 (file)
@@ -18,7 +18,7 @@ hex_make(uint x)
 }
 
 void
-mem_to_hex(char *dest, const byte *src, size_t bytes, uns flags)
+mem_to_hex(char *dest, const byte *src, size_t bytes, uint flags)
 {
   uint sep = flags & 0xff;
 
@@ -48,7 +48,7 @@ hex_parse(uint c)
 }
 
 const char *
-hex_to_mem(byte *dest, const char *src, size_t max_bytes, uns flags)
+hex_to_mem(byte *dest, const char *src, size_t max_bytes, uint flags)
 {
   uint sep = flags & 0xff;
   while (max_bytes-- && Cxdigit(src[0]) && Cxdigit(src[1]))
index 21556ec3ba423a5ed878d2b1ed4207d7718b0b2f..29cfa42b5e50699de6fd5f4e62645fbb380c8d15 100644 (file)
@@ -40,7 +40,7 @@ str_format_flags(char *dest, const char *fmt, uint flags)
 }
 
 size_t
-str_count_char(const char *str, uns chr)
+str_count_char(const char *str, uint chr)
 {
   const byte *s = str;
   size_t i = 0;
index b49370edb056b33c1bfc2cac8d2c065b66041467..9c527ba968b67b04ac298f851e34c5ab6a7b0bec 100644 (file)
@@ -40,7 +40,7 @@ size_t strnlen(const char *str, size_t n); // NOAPI
 char *str_format_flags(char *dest, const char *fmt, uint flags);
 
 /** Counts occurrences of @chr in @str. **/
-size_t str_count_char(const char *str, uns chr);
+size_t str_count_char(const char *str, uint chr);
 
 /* str-esc.c */
 
@@ -94,14 +94,14 @@ int str_match_pattern_nocase(const char *patt, const char *str);
  * not be separated), possibly OR-ed with `MEM_TO_HEX_UPCASE` when upper-case
  * characters should be used.
  **/
-void mem_to_hex(char *dest, const byte *src, size_t bytes, uns flags);
+void mem_to_hex(char *dest, const byte *src, size_t bytes, uint flags);
 
 /**
  * An inverse function to @mem_to_hex(). Takes a hexdump of at most @max_bytes
  * bytes and stores the bytes to a buffer starting at @dest. Returns a pointer
  * at the first character after the dump.
  **/
-const char *hex_to_mem(byte *dest, const char *src, size_t max_bytes, uns flags);
+const char *hex_to_mem(byte *dest, const char *src, size_t max_bytes, uint flags);
 
 // Bottom 8 bits of flags are an optional separator of bytes, the rest is:
 #define MEM_TO_HEX_UPCASE 0x100
index fc99e23749e39147784d1cd252b2c7e6a27102ad..d33c35fc65860f7af349397ca0f0044eee20cbd2 100644 (file)
@@ -57,7 +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
+// FIXME: For backward compatibility, will be removed soon
 STN_DECLARE_CONVERTOR(uns, uns);
 
 #endif