X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fstring.h;h=b49370edb056b33c1bfc2cac8d2c065b66041467;hb=f1155256f7a168f5e2c0097cb4e7197b79c4f041;hp=a38ab938f4f6b32331f3197952690ac488ac326f;hpb=c8ffd6e3b4fc8fd6437c04282c357b2dc290bbbd;p=libucw.git diff --git a/ucw/string.h b/ucw/string.h index a38ab938..b49370ed 100644 --- a/ucw/string.h +++ b/ucw/string.h @@ -30,7 +30,7 @@ /* string.c */ #ifdef CONFIG_DARWIN -uint strnlen(const char *str, uint n); // NOAPI +size_t strnlen(const char *str, size_t n); // NOAPI #endif /** @@ -40,7 +40,7 @@ uint strnlen(const char *str, uint n); // NOAPI char *str_format_flags(char *dest, const char *fmt, uint flags); /** Counts occurrences of @chr in @str. **/ -uint str_count_char(const char *str, uint chr); +size_t str_count_char(const char *str, uns 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, uint bytes, uint flags); +void mem_to_hex(char *dest, const byte *src, size_t bytes, uns 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, uint max_bytes, uint flags); +const char *hex_to_mem(byte *dest, const char *src, size_t max_bytes, uns flags); // Bottom 8 bits of flags are an optional separator of bytes, the rest is: #define MEM_TO_HEX_UPCASE 0x100