]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Common/StringFuncs.c
BaseTools: Add --version option in Brotli and BrotliCompress
[mirror_edk2.git] / BaseTools / Source / C / Common / StringFuncs.c
index b0ad2d165e10939337e7e3dcb382244c73618adf..a2bb87fe1b883944b5e3ee85a33336709a567c87 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
+Function prototypes and defines for string routines.\r
 \r
-Copyright (c) 2007 - 2008, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2007 - 2014, 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
@@ -9,14 +10,6 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
-\r
-  StringFuncs.c\r
-\r
-Abstract:\r
-\r
-  Function prototypes and defines for string routines.\r
-\r
 **/\r
 \r
 #include <string.h>\r
@@ -87,7 +80,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 +107,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 +153,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