/* string.c */
#ifdef CONFIG_DARWIN
-uns strnlen(const char *str, uns n);
+size_t strnlen(const char *str, size_t n); // NOAPI
#endif
/**
* Format a set of flag bits. When the i-th bit of @flags is 1,
* set the i-th character of @dest to @fmt[i], otherwise to '-'.
**/
-char *str_format_flags(char *dest, const char *fmt, uns flags);
+char *str_format_flags(char *dest, const char *fmt, uint flags);
/** Counts occurrences of @chr in @str. **/
-uns str_count_char(const char *str, uns chr);
+size_t str_count_char(const char *str, uint chr);
/* str-esc.c */
* When there are more than @max fields in @str, the first @max fields
* are processed and -1 is returned.
**/
-int str_sepsplit(char *str, uns sep, char **rec, uns max);
+int str_sepsplit(char *str, uint sep, char **rec, uint max);
/**
* Split @str to words separated by white-space characters. The spaces
* Fields surrounded by double quotes are also recognized. They can contain
* spaces, but no mechanism for escaping embedded quotes is defined.
**/
-int str_wordsplit(char *str, char **rec, uns max);
+int str_wordsplit(char *str, char **rec, uint max);
/* str-(i)match.c: Matching of shell patterns */
* 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, uns 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, uns 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
* - "/" is a prefix,
* - "" is a prefix.
**/
-int str_hier_prefix(const char *str, const char *prefix, uns sep);
-int str_hier_suffix(const char *str, const char *suffix, uns sep); /** Like @str_hier_prefix(), but for suffixes. **/
+int str_hier_prefix(const char *str, const char *prefix, uint sep);
+int str_hier_suffix(const char *str, const char *suffix, uint sep); /** Like @str_hier_prefix(), but for suffixes. **/
#endif