mescc: Tinycc support: strchr.

* mlibc/libc-mes+tcc.c (strchr): Implement.
This commit is contained in:
Jan Nieuwenhuizen 2017-07-30 12:55:58 +02:00
parent 18cb982687
commit 8991e927c3
1 changed files with 6 additions and 1 deletions

View File

@ -277,7 +277,12 @@ strcat (char *dest, char const *src)
char *
strchr (char const *s, int c)
{
eputs ("strchr stub\n");
char const *p = s;
while (*p || !c)
{
if (c == *p) return p;
*p++;
}
return 0;
}