]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseMemoryLib/CopyMem.c
Minor grammatical work--mostly adding periods. Items with ONLY period added did...
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLib / CopyMem.c
index f2106acb18639b879bae8e0771cd08d5ce593183..b30faed5607d8a7cbf034fb1cca4df639708d3e7 100644 (file)
@@ -1,11 +1,10 @@
 /** @file\r
-  Implementation of the EfiCopyMem routine. This function is broken\r
-  out into its own source file so that it can be excluded from a\r
-  build for a particular platform easily if an optimized version\r
-  is desired.\r
+  Implementation of the InternalMemCopyMem routine. This function is broken\r
+  out into its own source file so that it can be excluded from a build for a\r
+  particular platform easily if an optimized version is desired.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  Module Name:  EfiCopyMem.c\r
-\r
 **/\r
 \r
+\r
+\r
+\r
+#include "MemLibInternals.h"\r
+\r
 /**\r
   Copy Length bytes from Source to Destination.\r
 \r
-  @param  Destination Target of copy\r
-  @param  Source Place to copy from\r
-  @param  Length Number of bytes to copy\r
+  @param  DestinationBuffer Target of copy\r
+  @param  SourceBuffer      Place to copy from\r
+  @param  Length            Number of bytes to copy\r
 \r
   @return Destination\r
 \r
@@ -30,8 +32,8 @@
 VOID *\r
 EFIAPI\r
 InternalMemCopyMem (\r
-  OUT     VOID                      *Destination,\r
-  IN      CONST VOID                *Source,\r
+  OUT     VOID                      *DestinationBuffer,\r
+  IN      CONST VOID                *SourceBuffer,\r
   IN      UINTN                     Length\r
   )\r
 {\r
@@ -43,18 +45,18 @@ InternalMemCopyMem (
   volatile UINT8                    *Destination8;\r
   CONST UINT8                       *Source8;\r
 \r
-  if (Source > Destination) {\r
-    Destination8 = (UINT8*)Destination;\r
-    Source8 = (CONST UINT8*)Source;\r
+  if (SourceBuffer > DestinationBuffer) {\r
+    Destination8 = (UINT8*)DestinationBuffer;\r
+    Source8 = (CONST UINT8*)SourceBuffer;\r
     while (Length-- != 0) {\r
       *(Destination8++) = *(Source8++);\r
     }\r
-  } else if (Source < Destination) {\r
-    Destination8 = (UINT8*)Destination + Length;\r
-    Source8 = (CONST UINT8*)Source + Length;\r
+  } else if (SourceBuffer < DestinationBuffer) {\r
+    Destination8 = (UINT8*)DestinationBuffer + Length;\r
+    Source8 = (CONST UINT8*)SourceBuffer + Length;\r
     while (Length-- != 0) {\r
       *(--Destination8) = *(--Source8);\r
     }\r
   }\r
-  return Destination;\r
+  return DestinationBuffer;\r
 }\r