git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel - Fixed ARMv7 build, doesn't run
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
libc.c
diff --git
a/KernelLand/Kernel/libc.c
b/KernelLand/Kernel/libc.c
index
08ebc62
..
ef94426
100644
(file)
--- a/
KernelLand/Kernel/libc.c
+++ b/
KernelLand/Kernel/libc.c
@@
-49,6
+49,7
@@
EXPORT(tolower);
EXPORT(strucmp);
EXPORT(strchr);
EXPORT(strucmp);
EXPORT(strchr);
+EXPORT(strrchr);
EXPORT(strpos);
EXPORT(strlen);
EXPORT(strcpy);
EXPORT(strpos);
EXPORT(strlen);
EXPORT(strcpy);
@@
-529,6
+530,15
@@
char *strchr(const char *__s, int __c)
return NULL;
}
return NULL;
}
+char *strrchr(const char *__s, int __c)
+{
+ size_t ofs = strlen(__s);
+ while(--ofs && __s[ofs] != __c);
+ if( __s[ofs] == __c )
+ return (char*)__s + ofs;
+ return NULL;
+}
+
/**
* \fn int strpos(const char *Str, char Ch)
* \brief Search a string for an ascii character
/**
* \fn int strpos(const char *Str, char Ch)
* \brief Search a string for an ascii character
UCC
git Repository :: git.ucc.asn.au