Clarify source origin

This commit is contained in:
Carsten Larsen 2017-01-21 20:50:01 +01:00
parent 25c618d57f
commit afbfd236a4
3 changed files with 28 additions and 9 deletions

View File

@ -30,6 +30,17 @@
* SUCH DAMAGE. * 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" #include "clib.h"
#if __GNUC__ > 2 #if __GNUC__ > 2
@ -52,10 +63,6 @@ typedef int word; // "word" used for optimal copy speed
/** /**
* @brief Copy a block of memory, handling overlap. * @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) void MemCopy(void *destination, const void *source, unsigned int length)
{ {

View File

@ -30,8 +30,16 @@
* SUCH DAMAGE. * 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" #include "clib.h"
@ -39,6 +47,9 @@
#pragma GCC diagnostic ignored "-Wcast-align" #pragma GCC diagnostic ignored "-Wcast-align"
#endif #endif
/**
* @brief Fill block of memory with a constant value.
*/
void MemSet(void *dst0, int c0, unsigned int length) void MemSet(void *dst0, int c0, unsigned int length)
{ {
unsigned char *dst = (unsigned char*) dst0; unsigned char *dst = (unsigned char*) dst0;

View File

@ -34,8 +34,10 @@
* @file strcmp.h * @file strcmp.h
* @brief Compare two null terminated strings to each other. * @brief Compare two null terminated strings to each other.
* *
* Original file can be found at: * Code originate from FreeBSD base, revision 229286.
* https://svnweb.freebsd.org/base/release/9.0.0/lib/libc/string/strcmp.c?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. * @brief Compare two null terminated strings to each other.
*
*/ */
bool StrIsEqual(const char *s1, const char *s2) bool StrIsEqual(const char *s1, const char *s2)
{ {