]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Common/StringFuncs.c
Sync EDKII BaseTools to BaseTools project r2100.
[mirror_edk2.git] / BaseTools / Source / C / Common / StringFuncs.c
index b0ad2d165e10939337e7e3dcb382244c73618adf..bccb0b2d3423e51eda45a333c288899cd047297e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 \r
-Copyright (c) 2007 - 2008, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2007 - 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
@@ -87,7 +87,7 @@ Returns:
   //\r
   // Remove leading whitespace\r
   //\r
-  for (Pos = String; isspace (*Pos); Pos++) {\r
+  for (Pos = String; isspace ((int)*Pos); Pos++) {\r
   }\r
   if (Pos != String) {\r
     memmove (String, Pos, strlen (Pos) + 1);\r
@@ -114,7 +114,7 @@ Returns:
   // Remove trailing whitespace\r
   //\r
   for (Pos = String + strlen (String);\r
-       ((Pos - 1) >= String) && (isspace (*(Pos - 1)));\r
+       ((Pos - 1) >= String) && (isspace ((int)*(Pos - 1)));\r
        Pos--\r
       ) {\r
   }\r
@@ -160,12 +160,12 @@ Returns:
   Output = NewStringList ();\r
 \r
   for (Pos = String, Item = 0; Pos < EndOfString; Item++) {\r
-    while (isspace (*Pos)) {\r
+    while (isspace ((int)*Pos)) {\r
       Pos++;\r
     }\r
 \r
     for (EndOfSubString=Pos;\r
-         (*EndOfSubString != '\0') && !isspace (*EndOfSubString);\r
+         (*EndOfSubString != '\0') && !isspace ((int)*EndOfSubString);\r
          EndOfSubString++\r
          ) {\r
     }\r