source: trunk/sys/dietlibc/strchr.c @ 240

Last change on this file since 240 was 1, checked in by alain, 8 years ago

First import

File size: 469 bytes
Line 
1#include "dietfeatures.h"
2#include <string.h>
3
4char *strchr(register const char *t, int c) {
5  register char ch;
6
7  ch = c;
8  for (;;) {
9    if (*t == ch) break; if (!(*t)) return 0; ++t;
10#ifndef WANT_SMALL_STRING_ROUTINES
11    if (*t == ch) break; if (!*t) return 0; ++t;
12    if (*t == ch) break; if (!*t) return 0; ++t;
13    if (*t == ch) break; if (!*t) return 0; ++t;
14#endif
15  }
16  return (char*)t;
17}
18
19char *index(char *t,int c)      __attribute__((weak,alias("strchr")));
Note: See TracBrowser for help on using the repository browser.