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