source:
trunk/sys/dietlibc/memchr.c
@
46
Last change on this file since 46 was 1, checked in by , 8 years ago | |
---|---|
File size: 245 bytes |
Rev | Line | |
---|---|---|
[1] | 1 | #include <string.h> |
2 | #include "dietfeatures.h" | |
3 | #include "dietstring.h" | |
4 | ||
5 | void* memchr(const void *s, int c, size_t n) { | |
6 | const unsigned char *pc = (unsigned char *) s; | |
7 | for (;n--;pc++) | |
8 | if (*pc == c) | |
9 | return ((void *) pc); | |
10 | return 0; | |
11 | } |
Note: See TracBrowser
for help on using the repository browser.