**/\r
\r
#include <assert.h>\r
-#include <Base.h>\r
-#include <UefiBaseTypes.h>\r
-#include <BaseLib.h>\r
-#include <PcdLib.h>\r
-#include <CommonLib.h>\r
-#define _gPcd_FixedAtBuild_PcdMaximumUnicodeStringLength 0\r
-#define _gPcd_FixedAtBuild_PcdMaximumAsciiStringLength 0\r
+\r
+#include <Common/UefiBaseTypes.h>\r
+\r
+#include "CommonLib.h"\r
\r
/**\r
Copies one Null-terminated Unicode string to another Null-terminated Unicode\r
If Destination is NULL, then ASSERT().\r
If Source is NULL, 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, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
@param Source Pointer to a Null-terminated Unicode string.\r
If Destination is NULL, then ASSERT().\r
If Source is NULL, 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, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
@param Source Pointer to a Null-terminated Unicode string.\r
Length--;\r
}\r
\r
- // ZeroMem (Destination, Length * sizeof (*Destination));\r
memset (Destination, 0, Length * sizeof (*Destination));\r
return ReturnValue;\r
}\r
Unicode string specified by String.\r
\r
If String is NULL, then ASSERT().\r
- If PcdMaximumUnicodeStringLength is not zero, and String contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
\r
@param String Pointer to a Null-terminated Unicode string.\r
\r
ASSERT (String != NULL);\r
\r
for (Length = 0; *String != L'\0'; String++, Length++) {\r
- //\r
- // If PcdMaximumUnicodeStringLength is not zero,\r
- // length should not more than PcdMaximumUnicodeStringLength\r
- //\r
- if (FixedPcdGet32 (PcdMaximumUnicodeStringLength) != 0) {\r
- ASSERT (Length < FixedPcdGet32 (PcdMaximumUnicodeStringLength));\r
- }\r
+ ;\r
}\r
return Length;\r
}\r
string specified by String.\r
\r
If String is NULL, then ASSERT().\r
- If PcdMaximumUnicodeStringLength is not zero, and String contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
\r
@param String Pointer to a Null-terminated Unicode string.\r
\r
\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
- If PcdMaximumUnicodeStringLength is not zero, and FirstString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
- If PcdMaximumUnicodeStringLength is not zero, and SecondString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated Unicode string.\r
@param SecondString Pointer to a Null-terminated Unicode string.\r
)\r
{\r
//\r
- // ASSERT both strings are less long than PcdMaximumUnicodeStringLength\r
+ // ASSERT both strings should never be zero\r
//\r
ASSERT (StrSize (FirstString) != 0);\r
ASSERT (StrSize (SecondString) != 0);\r
\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
- If PcdMaximumUnicodeStringLength is not zero, and FirstString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
- If PcdMaximumUnicodeStringLength is not zero, and SecondString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated Unicode string.\r
@param SecondString Pointer to a Null-terminated Unicode string.\r
}\r
\r
//\r
- // ASSERT both strings are less long than PcdMaximumUnicodeStringLength.\r
- // Length tests are performed inside StrLen().\r
+ // ASSERT both strings should never be zero\r
//\r
ASSERT (StrSize (FirstString) != 0);\r
ASSERT (StrSize (SecondString) != 0);\r
If Destination is NULL, then ASSERT().\r
If Source is NULL, 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, then ASSERT().\r
- If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters, 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, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
@param Source Pointer to a Null-terminated Unicode string.\r
\r
//\r
// Size of the resulting string should never be zero.\r
- // PcdMaximumUnicodeStringLength is tested inside StrLen().\r
//\r
ASSERT (StrSize (Destination) != 0);\r
return Destination;\r
If Destination is NULL, then ASSERT().\r
If Source is NULL, 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, then ASSERT().\r
- If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters, 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, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
@param Source Pointer to a Null-terminated Unicode string.\r
\r
//\r
// Size of the resulting string should never be zero.\r
- // PcdMaximumUnicodeStringLength is tested inside StrLen().\r
//\r
ASSERT (StrSize (Destination) != 0);\r
return Destination;\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, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated ASCII string.\r
@param Source Pointer to a Null-terminated ASCII string.\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, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated ASCII string.\r
@param Source Pointer to a Null-terminated ASCII string.\r
ASCII string specified by String.\r
\r
If String is NULL, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero and String contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
\r
@param String Pointer to a Null-terminated ASCII string.\r
\r
ASSERT (String != NULL);\r
\r
for (Length = 0; *String != '\0'; String++, Length++) {\r
- //\r
- // If PcdMaximumUnicodeStringLength is not zero,\r
- // length should not more than PcdMaximumUnicodeStringLength\r
- //\r
- if (FixedPcdGet32 (PcdMaximumAsciiStringLength) != 0) {\r
- ASSERT (Length < FixedPcdGet32 (PcdMaximumAsciiStringLength));\r
- }\r
+ ;\r
}\r
return Length;\r
}\r
specified by String.\r
\r
If String is NULL, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero and String contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
\r
@param String Pointer to a Null-terminated ASCII string.\r
\r
\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero and FirstString contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero and SecondString contains more\r
- than PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated ASCII string.\r
@param SecondString Pointer to a Null-terminated ASCII string.\r
)\r
{\r
//\r
- // ASSERT both strings are less long than PcdMaximumAsciiStringLength\r
+ // ASSERT both strings should never be zero\r
//\r
ASSERT (AsciiStrSize (FirstString));\r
ASSERT (AsciiStrSize (SecondString));\r
\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero and FirstString contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero and SecondString contains more\r
- than PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated ASCII string.\r
@param SecondString Pointer to a Null-terminated ASCII string.\r
)\r
{\r
//\r
- // ASSERT both strings are less long than PcdMaximumAsciiStringLength\r
+ // ASSERT both strings should never be zero\r
//\r
ASSERT (AsciiStrSize (FirstString));\r
ASSERT (AsciiStrSize (SecondString));\r
\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero and FirstString contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero and SecondString contains more\r
- than PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated ASCII string.\r
@param SecondString Pointer to a Null-terminated ASCII string.\r
)\r
{\r
//\r
- // ASSERT both strings are less long than PcdMaximumAsciiStringLength\r
+ // ASSERT both strings should never be zero\r
//\r
ASSERT (AsciiStrSize (FirstString));\r
ASSERT (AsciiStrSize (SecondString));\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, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero and Source contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, 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 Pointer to a Null-terminated ASCII string.\r
@param Source Pointer to a Null-terminated ASCII string.\r
\r
//\r
// Size of the resulting string should never be zero.\r
- // PcdMaximumUnicodeStringLength is tested inside StrLen().\r
//\r
ASSERT (AsciiStrSize (Destination) != 0);\r
return Destination;\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 Destination contains more\r
- than PcdMaximumAsciiStringLength ASCII characters, then ASSERT().\r
- If PcdMaximumAsciiStringLength is not zero, and Source contains more than\r
- PcdMaximumAsciiStringLength ASCII characters, 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 Pointer to a Null-terminated ASCII string.\r
@param Source Pointer to a Null-terminated ASCII string.\r
\r
//\r
// Size of the resulting string should never be zero.\r
- // PcdMaximumUnicodeStringLength is tested inside StrLen().\r
//\r
ASSERT (AsciiStrSize (Destination) != 0);\r
return Destination;\r