diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-03 17:39:24 -0700 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-03 17:39:24 -0700 |
commit | a6c1ed4716cf02626ea035beb6dd4a921642ba80 (patch) | |
tree | ef582c1b52819e27bdd16097ec03b69799d04ede /newlib/libc/string/strrchr.c | |
parent | f6c9a624fa8a6878a7fb2b02f55e4990a20feb59 (diff) |
Use libc from agbcc instead of standalone newlib\nYou must have AGBCC commit 80d029caec189587f8b9294b6c8a5a489b8f5f88 in order to compile pmd_red.gbalibc
Diffstat (limited to 'newlib/libc/string/strrchr.c')
-rw-r--r-- | newlib/libc/string/strrchr.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/newlib/libc/string/strrchr.c b/newlib/libc/string/strrchr.c deleted file mode 100644 index 65160f5..0000000 --- a/newlib/libc/string/strrchr.c +++ /dev/null @@ -1,61 +0,0 @@ -/* -FUNCTION - <<strrchr>>---reverse search for character in string - -INDEX - strrchr - -ANSI_SYNOPSIS - #include <string.h> - char * strrchr(const char *<[string]>, int <[c]>); - -TRAD_SYNOPSIS - #include <string.h> - char * strrchr(<[string]>, <[c]>); - char *<[string]>; - int *<[c]>; - -DESCRIPTION - This function finds the last occurence of <[c]> (converted to - a char) in the string pointed to by <[string]> (including the - terminating null character). - -RETURNS - Returns a pointer to the located character, or a null pointer - if <[c]> does not occur in <[string]>. - -PORTABILITY -<<strrchr>> is ANSI C. - -<<strrchr>> requires no supporting OS subroutines. - -QUICKREF - strrchr ansi pure -*/ - -#include <string.h> - -char * -_DEFUN (strrchr, (s, i), - _CONST char *s _AND - int i) -{ - _CONST char *last = NULL; - char c = i; - - while (*s) - { - if (*s == c) - { - last = s; - } - s++; - } - - if (*s == c) - { - last = s; - } - - return (char *) last; -} |