]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Split/Split.c
Sync BaseTools Branch (version r2321) to EDKII main trunk.
[mirror_edk2.git] / BaseTools / Source / C / Split / Split.c
index 5ebda0901bae0c476de5ea6abe27ba260afcf577..9b81eeb76291807f1ecbc0299a8e68f804db6b91 100644 (file)
@@ -2,7 +2,7 @@
 \r
   Split a file into two pieces at the request offset.\r
 \r
-Copyright (c)  1999-2008 Intel Corporation. All rights reserved\r
+Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available\r
 under the terms and conditions of the BSD License which accompanies this\r
 distribution.  The full text of the license may be found at\r
@@ -19,11 +19,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <stdlib.h>\r
 #ifdef __GNUC__\r
 #include <unistd.h>\r
+#else\r
+#include <direct.h>\r
 #endif\r
 #include <ctype.h>\r
 #include "ParseInf.h"\r
 #include "CommonLib.h"\r
 #include "EfiUtilityMsgs.h"\r
+\r
 //\r
 // Utility Name\r
 //\r
@@ -55,8 +58,8 @@ Returns:
 \r
 --*/\r
 {\r
-  printf ("%s v%d.%d -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION);\r
-  printf ("Copyright (c) 1999-2007 Intel Corporation. All rights reserved.\n");\r
+  printf ("%s v%d.%d %s -Utility to break a file into two pieces at the request offset.\n", UTILITY_NAME, UTILITY_MAJOR_VERSION, UTILITY_MINOR_VERSION, __BUILD_VERSION);\r
+  printf ("Copyright (c) 1999-2010 Intel Corporation. All rights reserved.\n");\r
 }\r
 \r
 void\r
@@ -122,14 +125,14 @@ GetSplitValue (
     }\r
   }\r
 \r
-  lastCHAR = (CHAR8)toupper(SplitValueString[len - 1]);\r
+  lastCHAR = (CHAR8)toupper((int)SplitValueString[len - 1]);\r
 \r
   if (lastCHAR != 'K' && lastCHAR != 'M' && lastCHAR != 'G') {\r
     return STATUS_ERROR;\r
   }\r
 \r
   for (;index < len - 1; ++index) {\r
-    if (!isdigit(SplitValueString[index])) {\r
+    if (!isdigit((int)SplitValueString[index])) {\r
       return EFI_ABORTED;\r
     }\r
   }\r
@@ -219,7 +222,7 @@ Returns:
   CHAR8         *OutputDir = NULL;\r
   CHAR8         *OutFileName1 = NULL;\r
   CHAR8         *OutFileName2 = NULL;\r
-  UINT64        SplitValue = -1;\r
+  UINT64        SplitValue = (UINT64) -1;\r
   FILE          *Out1;\r
   FILE          *Out2;\r
   CHAR8         *OutName1 = NULL;\r