/trunk/uspace/lib/libc/generic/console.c |
---|
219,7 → 219,7 |
size_t len; |
ssize_t rc; |
len = strlen(s); |
len = str_size(s); |
while (len > 0) { |
rc = console_write(s, len); |
if (rc < 0) |
/trunk/uspace/lib/libc/generic/getopt.c |
---|
382,7 → 382,7 |
current_argv_len = has_equal - current_argv; |
has_equal++; |
} else |
current_argv_len = strlen(current_argv); |
current_argv_len = str_size(current_argv); |
for (i = 0; long_options[i].name; i++) { |
/* find matching long option */ |
390,7 → 390,7 |
current_argv_len)) |
continue; |
if (strlen(long_options[i].name) == |
if (str_size(long_options[i].name) == |
(unsigned)current_argv_len) { |
/* exact match */ |
match = i; |
/trunk/uspace/lib/libc/generic/string.c |
---|
606,31 → 606,6 |
return true; |
} |
/** Count the number of characters in the string, not including terminating 0. |
* |
* @param str String. |
* @return Number of characters in string. |
*/ |
size_t strlen(const char *str) |
{ |
size_t counter = 0; |
while (str[counter] != 0) |
counter++; |
return counter; |
} |
int strcmp(const char *a, const char *b) |
{ |
int c = 0; |
while (a[c] && b[c] && (!(a[c] - b[c]))) |
c++; |
return (a[c] - b[c]); |
} |
int strncmp(const char *a, const char *b, size_t n) |
{ |
size_t c = 0; |
870,7 → 845,7 |
char * strdup(const char *s1) |
{ |
size_t len = strlen(s1) + 1; |
size_t len = str_size(s1) + 1; |
void *ret = malloc(len); |
if (ret == NULL) |