summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseLib/String.c
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-23 03:11:45 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-04-23 03:11:45 +0000
commit53e96610365922de38db356d8aa0cffda8be3923 (patch)
tree5ed5d20e7889cebec4730aff1bff99cb16390779 /MdePkg/Library/BaseLib/String.c
parent97d77ccf43a14a8e82e283b016d8bcc255e1e6b4 (diff)
downloadedk2-53e96610365922de38db356d8aa0cffda8be3923.tar.gz
edk2-53e96610365922de38db356d8aa0cffda8be3923.tar.bz2
edk2-53e96610365922de38db356d8aa0cffda8be3923.zip
update string function comment to clear the semantic meaning.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8153 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseLib/String.c')
-rw-r--r--MdePkg/Library/BaseLib/String.c44
1 files changed, 26 insertions, 18 deletions
diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c
index bdd31766b9..6717308473 100644
--- a/MdePkg/Library/BaseLib/String.c
+++ b/MdePkg/Library/BaseLib/String.c
@@ -1,7 +1,7 @@
/** @file
Unicode and ASCII string primatives.
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
+ Copyright (c) 2006 - 2009, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -95,9 +95,11 @@ StrCpy (
If Length > 0 and Source is NULL, then ASSERT().
If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
If Source and Destination overlap, then ASSERT().
+ If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
+ PcdMaximumUnicodeStringLength, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than
PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,
- and Length is greater than PcdMaximumUnicodeStringLength, then ASSERT().
+ then ASSERT().
@param Destination Pointer to a Null-terminated Unicode string.
@param Source Pointer to a Null-terminated Unicode string.
@@ -277,12 +279,13 @@ StrCmp (
If Length > 0 and FirstString is not aligned on a 16-bit boundary, then ASSERT().
If Length > 0 and SecondString is NULL, then ASSERT().
If Length > 0 and SecondString is not aligned on a 16-bit boundary, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and FirstString contains more
- than PcdMaximumUnicodeStringLength Unicode characters, not including the
- Null-terminator, then ASSERT().
- If PcdMaximumUnicodeStringLength is not zero, and SecondString contains more
- than PcdMaximumUnicodeStringLength Unicode characters, not including the
- Null-terminator, and Length is greater than PcdMaximumUnicodeStringLength,
+ If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
+ PcdMaximumUnicodeStringLength, then ASSERT().
+ If PcdMaximumUnicodeStringLength is not zero, and FirstString contains more than
+ PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,
+ then ASSERT().
+ If PcdMaximumUnicodeStringLength is not zero, and SecondString contains more than
+ PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,
then ASSERT().
@param FirstString Pointer to a Null-terminated Unicode string.
@@ -394,6 +397,8 @@ StrCat (
If Length > 0 and Source is NULL, then ASSERT().
If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
If Source and Destination overlap, then ASSERT().
+ If PcdMaximumUnicodeStringLength is not zero, and Length is greater than
+ PcdMaximumUnicodeStringLength, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and Destination contains more
than PcdMaximumUnicodeStringLength Unicode characters, not including the
Null-terminator, then ASSERT().
@@ -401,10 +406,8 @@ StrCat (
PcdMaximumUnicodeStringLength Unicode characters, not including the
Null-terminator, then ASSERT().
If PcdMaximumUnicodeStringLength is not zero, and concatenating Destination
- and Source results in a Unicode string with more than
- PcdMaximumUnicodeStringLength Unicode characters, not including the
- Null-terminator, and Length is greater than PcdMaximumUnicodeStringLength,
- then ASSERT().
+ and Source results in a Unicode string with more than PcdMaximumUnicodeStringLength
+ Unicode characters, not including the Null-terminator, then ASSERT().
@param Destination Pointer to a Null-terminated Unicode string.
@param Source Pointer to a Null-terminated Unicode string.
@@ -1142,9 +1145,11 @@ AsciiStrCpy (
If Destination is NULL, then ASSERT().
If Source is NULL, then ASSERT().
If Source and Destination overlap, then ASSERT().
+ If PcdMaximumAsciiStringLength is not zero, and Length is greater than
+ PcdMaximumAsciiStringLength, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, and Source contains more than
PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
- and Length is greater than PcdMaximumAsciiStringLength, then ASSERT().
+ then ASSERT().
@param Destination Pointer to a Null-terminated ASCII string.
@param Source Pointer to a Null-terminated ASCII string.
@@ -1424,12 +1429,14 @@ AsciiStriCmp (
If Length > 0 and FirstString is NULL, then ASSERT().
If Length > 0 and SecondString is NULL, then ASSERT().
- If PcdMaximumAsciiStringLength is not zero and FirstString contains more than
+ If PcdMaximumAsciiStringLength is not zero, and Length is greater than
+ PcdMaximumAsciiStringLength, then ASSERT().
+ If PcdMaximumAsciiStringLength is not zero, and FirstString contains more than
PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
then ASSERT().
- If PcdMaximumAsciiStringLength is not zero and SecondString contains more than
+ If PcdMaximumAsciiStringLength is not zero, and SecondString contains more than
PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
- and Length is greater than PcdMaximumAsciiStringLength, then ASSERT().
+ then ASSERT().
@param FirstString Pointer to a Null-terminated ASCII string.
@param SecondString Pointer to a Null-terminated ASCII string.
@@ -1531,6 +1538,8 @@ AsciiStrCat (
If Length > 0 and Destination is NULL, then ASSERT().
If Length > 0 and Source is NULL, then ASSERT().
If Source and Destination overlap, then ASSERT().
+ If PcdMaximumAsciiStringLength is not zero, and Length is greater than
+ PcdMaximumAsciiStringLength, then ASSERT().
If PcdMaximumAsciiStringLength is not zero, and Destination contains more than
PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,
then ASSERT().
@@ -1539,8 +1548,7 @@ AsciiStrCat (
then ASSERT().
If PcdMaximumAsciiStringLength is not zero, and concatenating Destination and
Source results in a ASCII string with more than PcdMaximumAsciiStringLength
- ASCII characters, not including the Null-terminator, and Length is greater than
- PcdMaximumAsciiStringLength, then ASSERT()..
+ ASCII characters, not including the Null-terminator, then ASSERT().
@param Destination Pointer to a Null-terminated ASCII string.
@param Source Pointer to a Null-terminated ASCII string.