summaryrefslogtreecommitdiff
path: root/nuttx/lib/string/lib_memcpy.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-29 14:50:02 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-29 14:50:02 +0000
commitc28168e6888089662f84f65e848797a2d3f73eed (patch)
tree77e5f804f4e375eb10fec291862f331f9a20556d /nuttx/lib/string/lib_memcpy.c
parent16cadcf45159dfa6fa4b57be276cde3c259d83a3 (diff)
downloadpx4-nuttx-c28168e6888089662f84f65e848797a2d3f73eed.tar.gz
px4-nuttx-c28168e6888089662f84f65e848797a2d3f73eed.tar.bz2
px4-nuttx-c28168e6888089662f84f65e848797a2d3f73eed.zip
Add memccpy{}
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4990 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/lib/string/lib_memcpy.c')
-rw-r--r--nuttx/lib/string/lib_memcpy.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/nuttx/lib/string/lib_memcpy.c b/nuttx/lib/string/lib_memcpy.c
index 745bafe98..3b62edbab 100644
--- a/nuttx/lib/string/lib_memcpy.c
+++ b/nuttx/lib/string/lib_memcpy.c
@@ -1,8 +1,8 @@
-/************************************************************
+/****************************************************************************
* lib/string/lib_memcpy.c
*
* Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,29 +31,33 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- ************************************************************/
+ ****************************************************************************/
-/************************************************************
+/****************************************************************************
* Compilation Switches
- ************************************************************/
+ ****************************************************************************/
-/************************************************************
+/****************************************************************************
* Included Files
- ************************************************************/
+ ****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <string.h>
-/************************************************************
+/****************************************************************************
* Global Functions
- ************************************************************/
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: memcpy
+ ****************************************************************************/
#ifndef CONFIG_ARCH_MEMCPY
-void *memcpy(void *dest, const void *src, size_t n)
+FAR void *memcpy(FAR void *dest, FAR const void *src, size_t n)
{
- unsigned char *pout = (unsigned char*)dest;
- unsigned char *pin = (unsigned char*)src;
+ FAR unsigned char *pout = (FAR unsigned char*)dest;
+ FAR unsigned char *pin = (FAR unsigned char*)src;
while (n-- > 0) *pout++ = *pin++;
return dest;
}