From afbfd236a4b718af9f636fd7047ae77d0186808f Mon Sep 17 00:00:00 2001 From: Carsten Larsen Date: Sat, 21 Jan 2017 20:50:01 +0100 Subject: [PATCH] Clarify source origin --- lib/clib/memcpy.c | 15 +++++++++++---- lib/clib/memset.c | 15 +++++++++++++-- lib/clib/strcmp.c | 7 ++++--- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/lib/clib/memcpy.c b/lib/clib/memcpy.c index ba23deb7..dfd26477 100644 --- a/lib/clib/memcpy.c +++ b/lib/clib/memcpy.c @@ -30,6 +30,17 @@ * SUCH DAMAGE. */ +/** + * @file memcpy.h + * @brief Copy a block of memory, handling overlap. + * + * Code originate from FreeBSD base, revision 229286. + * + * Browse at: + * https://svnweb.freebsd.org/base/head/lib/libc/string/bcopy.c?revision=229286 + * + */ + #include "clib.h" #if __GNUC__ > 2 @@ -52,10 +63,6 @@ typedef int word; // "word" used for optimal copy speed /** * @brief Copy a block of memory, handling overlap. - * - * Original file can be found at: - * https://svnweb.freebsd.org/base/release/9.0.0/lib/libc/string/bcopy.c?revision=229286 - * */ void MemCopy(void *destination, const void *source, unsigned int length) { diff --git a/lib/clib/memset.c b/lib/clib/memset.c index 388af3a1..3b8f9461 100644 --- a/lib/clib/memset.c +++ b/lib/clib/memset.c @@ -30,8 +30,16 @@ * SUCH DAMAGE. */ -//TODO -//https://svnweb.freebsd.org/base/release/9.0.0/lib/libc/string/memset.c?revision=229286 +/** + * @file memset.h + * @brief Fill block of memory with a constant value. + * + * Code originate from FreeBSD base, revision 229286. + * + * Browse at: + * https://svnweb.freebsd.org/base/head/lib/libc/string/memset.c?revision=229286 + * + */ #include "clib.h" @@ -39,6 +47,9 @@ #pragma GCC diagnostic ignored "-Wcast-align" #endif +/** + * @brief Fill block of memory with a constant value. + */ void MemSet(void *dst0, int c0, unsigned int length) { unsigned char *dst = (unsigned char*) dst0; diff --git a/lib/clib/strcmp.c b/lib/clib/strcmp.c index 065e9cb6..3fb856c3 100644 --- a/lib/clib/strcmp.c +++ b/lib/clib/strcmp.c @@ -34,8 +34,10 @@ * @file strcmp.h * @brief Compare two null terminated strings to each other. * - * Original file can be found at: - * https://svnweb.freebsd.org/base/release/9.0.0/lib/libc/string/strcmp.c?revision=229286 + * Code originate from FreeBSD base, revision 229286. + * + * Browse at: + * https://svnweb.freebsd.org/base/head/lib/libc/string/strcmp.c?revision=229286 * */ @@ -43,7 +45,6 @@ /** * @brief Compare two null terminated strings to each other. - * */ bool StrIsEqual(const char *s1, const char *s2) {