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
Usermode/libc,libposix - Fixing errors in headers
[tpg/acess2.git]
/
Usermode
/
Libraries
/
libc.so_src
/
string.c
diff --git
a/Usermode/Libraries/libc.so_src/string.c
b/Usermode/Libraries/libc.so_src/string.c
index
d8d0872
..
3d30f1c
100644
(file)
--- a/
Usermode/Libraries/libc.so_src/string.c
+++ b/
Usermode/Libraries/libc.so_src/string.c
@@
-100,6
+100,18
@@
EXPORT char *strcat(char *dst, const char *src)
return dst;
}
return dst;
}
+EXPORT char *strncat(char *dst, const char *src, size_t n)
+{
+ char *to = dst;
+ // Find the end
+ while(*to) to++;
+ // Copy
+ while(*src && n--) *to++ = *src++;
+ // End string
+ *to = '\0';
+ return dst;
+}
+
/**
* \brief Get the length of a string
*/
/**
* \brief Get the length of a string
*/
UCC
git Repository :: git.ucc.asn.au