diff options
author | Guo Mang <mang.guo@intel.com> | 2017-08-02 09:54:47 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-09-05 19:45:08 +0800 |
commit | 6c128c65b5ec0e5b8b5a0ccb165f3afd29e485f8 (patch) | |
tree | 444372d92a0ae8991fe4d15eb3937df43690dfda /StdLib/LibC/String/Concatenation.c | |
parent | b207c6434d7a5a4502975d322312e07017e8a8cb (diff) | |
download | edk2-platforms-6c128c65b5ec0e5b8b5a0ccb165f3afd29e485f8.tar.xz |
Remove core packages since we can get them from edk2 repository
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'StdLib/LibC/String/Concatenation.c')
-rw-r--r-- | StdLib/LibC/String/Concatenation.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/StdLib/LibC/String/Concatenation.c b/StdLib/LibC/String/Concatenation.c deleted file mode 100644 index e76bea0bf8..0000000000 --- a/StdLib/LibC/String/Concatenation.c +++ /dev/null @@ -1,83 +0,0 @@ -/** @file
- Concatenation Functions for <string.h>.
-
- Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials are licensed and made available under
- the terms and conditions of the BSD License that accompanies this distribution.
- The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-#include <Uefi.h>
-#include <Library/BaseLib.h>
-
-#include <LibConfig.h>
-
-#include <string.h>
-
-/** The strcat function appends a copy of the string pointed to by s2
- (including the terminating null character) to the end of the string pointed
- to by s1. The initial character of s2 overwrites the null character at the
- end of s1. If copying takes place between objects that overlap, the
- behavior is undefined.
-
- @return The strcat function returns the value of s1.
-**/
-char *
-strcat(char * __restrict s1, const char * __restrict s2)
-{
- return AsciiStrCat( s1, s2);
-}
-
-/** The strncat function appends not more than n characters (a null character
- and characters that follow it are not appended) from the array pointed to
- by s2 to the end of the string pointed to by s1. The initial character of
- s2 overwrites the null character at the end of s1. A terminating null
- character is always appended to the result. If copying takes place
- between objects that overlap, the behavior is undefined.
-
- @return The strncat function returns the value of s1.
-**/
-char *
-strncat(char * __restrict s1, const char * __restrict s2, size_t n)
-{
- return AsciiStrnCat( s1, s2, n);
-}
-
-/** The strncatX function appends not more than n characters (a null character
- and characters that follow it are not appended) from the array pointed to
- by s2 to the end of the string pointed to by s1. The initial character of
- s2 overwrites the null character at the end of s1. The result is always
- terminated with a null character. If copying takes place between objects
- that overlap, the behavior is undefined.
-
- strncatX exists because normal strncat does not indicate if the operation
- was terminated because of exhausting n or reaching the end of s2.
-
- @return The strncatX function returns 0 if the operation was terminated
- because it reached the end of s1. Otherwise, a non-zero value is
- returned indicating how many characters remain in s1.
-**/
-int
-strncatX(char * __restrict s1, const char * __restrict s2, size_t n)
-{
- int NumLeft;
-
- // Find s1's terminating NUL
- for( ; n != 0; --n) {
- if( *s1++ == '\0') break;
- }
-
- // Now copy *s2 into s1, overwriting s1's terminating NUL
- for( --s1; n != 0; --n) {
- if((*s1++ = *s2++) == '\0') break;
- }
- NumLeft = (int)n;
-
- // Guarantee that s1 is NUL terminated.
- *--s1 = '\0';
-
- return NumLeft; // Zero if we ran out of buffer ( strlen(s1) < strlen(s2) )
-}
|