]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/BaseLib.h
MdePkg: Remove code wrapped by DISABLE_NEW_DEPRECATED_INTERFACES
[mirror_edk2.git] / MdePkg / Include / Library / BaseLib.h
index 04fb329eaabb58906074d73a64b862c576aec0f8..1171a0ffb51b37fee353d41ac4366790b4e3c7d8 100644 (file)
@@ -962,82 +962,6 @@ AsciiStrHexToUint64S (
   );\r
 \r
 \r
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
-\r
-/**\r
-  [ATTENTION] This function is deprecated for security reason.\r
-\r
-  Copies one Null-terminated Unicode string to another Null-terminated Unicode\r
-  string and returns the new Unicode string.\r
-\r
-  This function copies the contents of the Unicode string Source to the Unicode\r
-  string Destination, and returns Destination. If Source and Destination\r
-  overlap, then the results are undefined.\r
-\r
-  If Destination is NULL, then ASSERT().\r
-  If Destination is not aligned on a 16-bit boundary, then ASSERT().\r
-  If Source is NULL, then ASSERT().\r
-  If Source is not aligned on a 16-bit boundary, then ASSERT().\r
-  If Source and Destination overlap, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
-  PcdMaximumUnicodeStringLength Unicode characters not including the\r
-  Null-terminator, then ASSERT().\r
-\r
-  @param  Destination The pointer to a Null-terminated Unicode string.\r
-  @param  Source      The pointer to a Null-terminated Unicode string.\r
-\r
-  @return Destination.\r
-\r
-**/\r
-CHAR16 *\r
-EFIAPI\r
-StrCpy (\r
-  OUT     CHAR16                    *Destination,\r
-  IN      CONST CHAR16              *Source\r
-  );\r
-\r
-\r
-/**\r
-  [ATTENTION] This function is deprecated for security reason.\r
-\r
-  Copies up to a specified length from one Null-terminated Unicode string to\r
-  another Null-terminated Unicode string and returns the new Unicode string.\r
-\r
-  This function copies the contents of the Unicode string Source to the Unicode\r
-  string Destination, and returns Destination. At most, Length Unicode\r
-  characters are copied from Source to Destination. If Length is 0, then\r
-  Destination is returned unmodified. If Length is greater that the number of\r
-  Unicode characters in Source, then Destination is padded with Null Unicode\r
-  characters. If Source and Destination overlap, then the results are\r
-  undefined.\r
-\r
-  If Length > 0 and Destination is NULL, then ASSERT().\r
-  If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().\r
-  If Length > 0 and Source is NULL, then ASSERT().\r
-  If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().\r
-  If Source and Destination overlap, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and Length is greater than\r
-  PcdMaximumUnicodeStringLength, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
-  PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,\r
-  then ASSERT().\r
-\r
-  @param  Destination The pointer to a Null-terminated Unicode string.\r
-  @param  Source      The pointer to a Null-terminated Unicode string.\r
-  @param  Length      The maximum number of Unicode characters to copy.\r
-\r
-  @return Destination.\r
-\r
-**/\r
-CHAR16 *\r
-EFIAPI\r
-StrnCpy (\r
-  OUT     CHAR16                    *Destination,\r
-  IN      CONST CHAR16              *Source,\r
-  IN      UINTN                     Length\r
-  );\r
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)\r
-\r
 /**\r
   Returns the length of a Null-terminated Unicode string.\r
 \r
@@ -1164,99 +1088,6 @@ StrnCmp (
   );\r
 \r
 \r
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
-\r
-/**\r
-  [ATTENTION] This function is deprecated for security reason.\r
-\r
-  Concatenates one Null-terminated Unicode string to another Null-terminated\r
-  Unicode string, and returns the concatenated Unicode string.\r
-\r
-  This function concatenates two Null-terminated Unicode strings. The contents\r
-  of Null-terminated Unicode string Source are concatenated to the end of\r
-  Null-terminated Unicode string Destination. The Null-terminated concatenated\r
-  Unicode String is returned. If Source and Destination overlap, then the\r
-  results are undefined.\r
-\r
-  If Destination is NULL, then ASSERT().\r
-  If Destination is not aligned on a 16-bit boundary, then ASSERT().\r
-  If Source is NULL, then ASSERT().\r
-  If Source is not aligned on a 16-bit boundary, then ASSERT().\r
-  If Source and Destination overlap, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and Destination contains more\r
-  than PcdMaximumUnicodeStringLength Unicode characters, not including the\r
-  Null-terminator, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
-  PcdMaximumUnicodeStringLength Unicode characters, not including the\r
-  Null-terminator, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and concatenating Destination\r
-  and Source results in a Unicode string with more than\r
-  PcdMaximumUnicodeStringLength Unicode characters, not including the\r
-  Null-terminator, then ASSERT().\r
-\r
-  @param  Destination The pointer to a Null-terminated Unicode string.\r
-  @param  Source      The pointer to a Null-terminated Unicode string.\r
-\r
-  @return Destination.\r
-\r
-**/\r
-CHAR16 *\r
-EFIAPI\r
-StrCat (\r
-  IN OUT  CHAR16                    *Destination,\r
-  IN      CONST CHAR16              *Source\r
-  );\r
-\r
-\r
-/**\r
-  [ATTENTION] This function is deprecated for security reason.\r
-\r
-  Concatenates up to a specified length one Null-terminated Unicode to the end\r
-  of another Null-terminated Unicode string, and returns the concatenated\r
-  Unicode string.\r
-\r
-  This function concatenates two Null-terminated Unicode strings. The contents\r
-  of Null-terminated Unicode string Source are concatenated to the end of\r
-  Null-terminated Unicode string Destination, and Destination is returned. At\r
-  most, Length Unicode characters are concatenated from Source to the end of\r
-  Destination, and Destination is always Null-terminated. If Length is 0, then\r
-  Destination is returned unmodified. If Source and Destination overlap, then\r
-  the results are undefined.\r
-\r
-  If Destination is NULL, then ASSERT().\r
-  If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().\r
-  If Length > 0 and Source is NULL, then ASSERT().\r
-  If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().\r
-  If Source and Destination overlap, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and Length is greater than\r
-  PcdMaximumUnicodeStringLength, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and Destination contains more\r
-  than PcdMaximumUnicodeStringLength Unicode characters, not including the\r
-  Null-terminator, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
-  PcdMaximumUnicodeStringLength Unicode characters, not including the\r
-  Null-terminator, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and concatenating Destination\r
-  and Source results in a Unicode string with more than PcdMaximumUnicodeStringLength\r
-  Unicode characters, not including the Null-terminator, then ASSERT().\r
-\r
-  @param  Destination The pointer to a Null-terminated Unicode string.\r
-  @param  Source      The pointer to a Null-terminated Unicode string.\r
-  @param  Length      The maximum number of Unicode characters to concatenate from\r
-                      Source.\r
-\r
-  @return Destination.\r
-\r
-**/\r
-CHAR16 *\r
-EFIAPI\r
-StrnCat (\r
-  IN OUT  CHAR16                    *Destination,\r
-  IN      CONST CHAR16              *Source,\r
-  IN      UINTN                     Length\r
-  );\r
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)\r
-\r
 /**\r
   Returns the first occurrence of a Null-terminated Unicode sub-string\r
   in a Null-terminated Unicode string.\r
@@ -1655,51 +1486,6 @@ StrHexToBytes (
   IN  UINTN              MaxBufferSize\r
   );\r
 \r
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
-\r
-/**\r
-  [ATTENTION] This function is deprecated for security reason.\r
-\r
-  Convert a Null-terminated Unicode string to a Null-terminated\r
-  ASCII string and returns the ASCII string.\r
-\r
-  This function converts the content of the Unicode string Source\r
-  to the ASCII string Destination by copying the lower 8 bits of\r
-  each Unicode character. It returns Destination.\r
-\r
-  The caller is responsible to make sure Destination points to a buffer with size\r
-  equal or greater than ((StrLen (Source) + 1) * sizeof (CHAR8)) in bytes.\r
-\r
-  If any Unicode characters in Source contain non-zero value in\r
-  the upper 8 bits, then ASSERT().\r
-\r
-  If Destination is NULL, then ASSERT().\r
-  If Source is NULL, then ASSERT().\r
-  If Source is not aligned on a 16-bit boundary, then ASSERT().\r
-  If Source and Destination overlap, then ASSERT().\r
-\r
-  If PcdMaximumUnicodeStringLength is not zero, and Source contains\r
-  more than PcdMaximumUnicodeStringLength Unicode characters not including\r
-  the Null-terminator, then ASSERT().\r
-\r
-  If PcdMaximumAsciiStringLength is not zero, and Source contains more\r
-  than PcdMaximumAsciiStringLength Unicode characters not including the\r
-  Null-terminator, then ASSERT().\r
-\r
-  @param  Source        The pointer to a Null-terminated Unicode string.\r
-  @param  Destination   The pointer to a Null-terminated ASCII string.\r
-\r
-  @return Destination.\r
-\r
-**/\r
-CHAR8 *\r
-EFIAPI\r
-UnicodeStrToAsciiStr (\r
-  IN      CONST CHAR16              *Source,\r
-  OUT     CHAR8                     *Destination\r
-  );\r
-\r
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)\r
 \r
 /**\r
   Convert a Null-terminated Unicode string to a Null-terminated\r
@@ -1802,76 +1588,6 @@ UnicodeStrnToAsciiStrS (
   OUT     UINTN                     *DestinationLength\r
   );\r
 \r
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
-\r
-/**\r
-  [ATTENTION] This function is deprecated for security reason.\r
-\r
-  Copies one Null-terminated ASCII string to another Null-terminated ASCII\r
-  string and returns the new ASCII string.\r
-\r
-  This function copies the contents of the ASCII string Source to the ASCII\r
-  string Destination, and returns Destination. If Source and Destination\r
-  overlap, then the results are undefined.\r
-\r
-  If Destination is NULL, then ASSERT().\r
-  If Source is NULL, then ASSERT().\r
-  If Source and Destination overlap, then ASSERT().\r
-  If PcdMaximumAsciiStringLength is not zero and Source contains more than\r
-  PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
-  then ASSERT().\r
-\r
-  @param  Destination The pointer to a Null-terminated ASCII string.\r
-  @param  Source      The pointer to a Null-terminated ASCII string.\r
-\r
-  @return Destination\r
-\r
-**/\r
-CHAR8 *\r
-EFIAPI\r
-AsciiStrCpy (\r
-  OUT     CHAR8                     *Destination,\r
-  IN      CONST CHAR8               *Source\r
-  );\r
-\r
-\r
-/**\r
-  [ATTENTION] This function is deprecated for security reason.\r
-\r
-  Copies up to a specified length one Null-terminated ASCII string to another\r
-  Null-terminated ASCII string and returns the new ASCII string.\r
-\r
-  This function copies the contents of the ASCII string Source to the ASCII\r
-  string Destination, and returns Destination. At most, Length ASCII characters\r
-  are copied from Source to Destination. If Length is 0, then Destination is\r
-  returned unmodified. If Length is greater that the number of ASCII characters\r
-  in Source, then Destination is padded with Null ASCII characters. If Source\r
-  and Destination overlap, then the results are undefined.\r
-\r
-  If Destination is NULL, then ASSERT().\r
-  If Source is NULL, then ASSERT().\r
-  If Source and Destination overlap, then ASSERT().\r
-  If PcdMaximumAsciiStringLength is not zero, and Length is greater than\r
-  PcdMaximumAsciiStringLength, then ASSERT().\r
-  If PcdMaximumAsciiStringLength is not zero, and Source contains more than\r
-  PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
-  then ASSERT().\r
-\r
-  @param  Destination The pointer to a Null-terminated ASCII string.\r
-  @param  Source      The pointer to a Null-terminated ASCII string.\r
-  @param  Length      The maximum number of ASCII characters to copy.\r
-\r
-  @return Destination\r
-\r
-**/\r
-CHAR8 *\r
-EFIAPI\r
-AsciiStrnCpy (\r
-  OUT     CHAR8                     *Destination,\r
-  IN      CONST CHAR8               *Source,\r
-  IN      UINTN                     Length\r
-  );\r
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)\r
 \r
 /**\r
   Returns the length of a Null-terminated ASCII string.\r
@@ -2031,92 +1747,6 @@ AsciiStrnCmp (
   );\r
 \r
 \r
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
-\r
-/**\r
-  [ATTENTION] This function is deprecated for security reason.\r
-\r
-  Concatenates one Null-terminated ASCII string to another Null-terminated\r
-  ASCII string, and returns the concatenated ASCII string.\r
-\r
-  This function concatenates two Null-terminated ASCII strings. The contents of\r
-  Null-terminated ASCII string Source are concatenated to the end of Null-\r
-  terminated ASCII string Destination. The Null-terminated concatenated ASCII\r
-  String is returned.\r
-\r
-  If Destination is NULL, then ASSERT().\r
-  If Source is NULL, then ASSERT().\r
-  If PcdMaximumAsciiStringLength is not zero and Destination contains more than\r
-  PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
-  then ASSERT().\r
-  If PcdMaximumAsciiStringLength is not zero and Source contains more than\r
-  PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
-  then ASSERT().\r
-  If PcdMaximumAsciiStringLength is not zero and concatenating Destination and\r
-  Source results in a ASCII string with more than PcdMaximumAsciiStringLength\r
-  ASCII characters, then ASSERT().\r
-\r
-  @param  Destination The pointer to a Null-terminated ASCII string.\r
-  @param  Source      The pointer to a Null-terminated ASCII string.\r
-\r
-  @return Destination\r
-\r
-**/\r
-CHAR8 *\r
-EFIAPI\r
-AsciiStrCat (\r
-  IN OUT CHAR8    *Destination,\r
-  IN CONST CHAR8  *Source\r
-  );\r
-\r
-\r
-/**\r
-  [ATTENTION] This function is deprecated for security reason.\r
-\r
-  Concatenates up to a specified length one Null-terminated ASCII string to\r
-  the end of another Null-terminated ASCII string, and returns the\r
-  concatenated ASCII string.\r
-\r
-  This function concatenates two Null-terminated ASCII strings. The contents\r
-  of Null-terminated ASCII string Source are concatenated to the end of Null-\r
-  terminated ASCII string Destination, and Destination is returned. At most,\r
-  Length ASCII characters are concatenated from Source to the end of\r
-  Destination, and Destination is always Null-terminated. If Length is 0, then\r
-  Destination is returned unmodified. If Source and Destination overlap, then\r
-  the results are undefined.\r
-\r
-  If Length > 0 and Destination is NULL, then ASSERT().\r
-  If Length > 0 and Source is NULL, then ASSERT().\r
-  If Source and Destination overlap, then ASSERT().\r
-  If PcdMaximumAsciiStringLength is not zero, and Length is greater than\r
-  PcdMaximumAsciiStringLength, then ASSERT().\r
-  If PcdMaximumAsciiStringLength is not zero, and Destination contains more than\r
-  PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
-  then ASSERT().\r
-  If PcdMaximumAsciiStringLength is not zero, and Source contains more than\r
-  PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
-  then ASSERT().\r
-  If PcdMaximumAsciiStringLength is not zero, and concatenating Destination and\r
-  Source results in a ASCII string with more than PcdMaximumAsciiStringLength\r
-  ASCII characters, not including the Null-terminator, then ASSERT().\r
-\r
-  @param  Destination The pointer to a Null-terminated ASCII string.\r
-  @param  Source      The pointer to a Null-terminated ASCII string.\r
-  @param  Length      The maximum number of ASCII characters to concatenate from\r
-                      Source.\r
-\r
-  @return Destination\r
-\r
-**/\r
-CHAR8 *\r
-EFIAPI\r
-AsciiStrnCat (\r
-  IN OUT  CHAR8                     *Destination,\r
-  IN      CONST CHAR8               *Source,\r
-  IN      UINTN                     Length\r
-  );\r
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)\r
-\r
 /**\r
   Returns the first occurrence of a Null-terminated ASCII sub-string\r
   in a Null-terminated ASCII string.\r
@@ -2496,45 +2126,6 @@ AsciiStrHexToBytes (
   IN  UINTN              MaxBufferSize\r
   );\r
 \r
-#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
-\r
-/**\r
-  [ATTENTION] This function is deprecated for security reason.\r
-\r
-  Convert one Null-terminated ASCII string to a Null-terminated\r
-  Unicode string and returns the Unicode string.\r
-\r
-  This function converts the contents of the ASCII string Source to the Unicode\r
-  string Destination, and returns Destination.  The function terminates the\r
-  Unicode string Destination by appending a Null-terminator character at the end.\r
-  The caller is responsible to make sure Destination points to a buffer with size\r
-  equal or greater than ((AsciiStrLen (Source) + 1) * sizeof (CHAR16)) in bytes.\r
-\r
-  If Destination is NULL, then ASSERT().\r
-  If Destination is not aligned on a 16-bit boundary, then ASSERT().\r
-  If Source is NULL, then ASSERT().\r
-  If Source and Destination overlap, then ASSERT().\r
-  If PcdMaximumAsciiStringLength is not zero, and Source contains more than\r
-  PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
-  then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
-  PcdMaximumUnicodeStringLength ASCII characters not including the\r
-  Null-terminator, then ASSERT().\r
-\r
-  @param  Source        The pointer to a Null-terminated ASCII string.\r
-  @param  Destination   The pointer to a Null-terminated Unicode string.\r
-\r
-  @return Destination.\r
-\r
-**/\r
-CHAR16 *\r
-EFIAPI\r
-AsciiStrToUnicodeStr (\r
-  IN      CONST CHAR8               *Source,\r
-  OUT     CHAR16                    *Destination\r
-  );\r
-\r
-#endif // !defined (DISABLE_NEW_DEPRECATED_INTERFACES)\r
 \r
 /**\r
   Convert one Null-terminated ASCII string to a Null-terminated\r