]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Sample/Tools/Source/GenDepex/GenDepex.c
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / GenDepex / GenDepex.c
index 37c1039c0f135a91a882f3ecdc325402a3c11891..2cfc3079abc9cb3f8b62b9d229cf8e1972f4b0cc 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2010, 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
@@ -77,7 +77,15 @@ Abstract:
 \r
 #include "GenDepex.h"\r
 \r
-#define TOOL_NAME "GenDepex"\r
+//\r
+// Utility Name\r
+//\r
+#define UTILITY_NAME  "GenDepex"\r
+\r
+//\r
+// Utility version information\r
+//\r
+#define UTILITY_VERSION "v1.0"\r
 \r
 extern\r
 BOOLEAN\r
@@ -106,13 +114,19 @@ Returns:
 \r
 --*/\r
 {\r
-  printf (\r
-    "%s, Tiano Dependency Expression Generation Utility. Version %d.%d.\n",\r
-    UTILITY_NAME,\r
-    UTILITY_MAJOR_VERSION,\r
-    UTILITY_MINOR_VERSION\r
-    );\r
-  printf ("Copyright (C) 1996-2002 Intel Corporation.  All rights reserved.\n\n");\r
+  int         Index;\r
+  const char  *Str[] = {\r
+    UTILITY_NAME" "UTILITY_VERSION" - Intel Generate Dependency Expression Utility",\r
+    "  Copyright (C), 1996 - 2008 Intel Corporation",\r
+    \r
+#if ( defined(UTILITY_BUILD) && defined(UTILITY_VENDOR) )\r
+    "  Built from "UTILITY_BUILD", project of "UTILITY_VENDOR,\r
+#endif\r
+    NULL\r
+  };\r
+  for (Index = 0; Str[Index] != NULL; Index++) {\r
+    fprintf (stdout, "%s\n", Str[Index]);\r
+  }\r
 }\r
 \r
 VOID\r
@@ -135,15 +149,22 @@ Returns:
 \r
 --*/\r
 {\r
-  printf (\r
-    "Usage: %s -I <INFILE> -O <OUTFILE> [-P <Optional Boundary for padding up>] \n",\r
-    UTILITY_NAME\r
-    );\r
-  printf (" Where:\n");\r
-  printf ("  <INFILE> is the input pre-processed dependency text files name.\n");\r
-  printf ("  <OUTFILE> is the output binary dependency files name.\n");\r
-  printf ("  <Optional Boundary for padding up> is the padding integer value.\n");\r
-  printf ("    This is the boundary to align the output file size to.\n");\r
+  int         Index;\r
+  const char  *Str[] = {\r
+    "",\r
+    "Usage:",\r
+    "  "UTILITY_NAME" [OPTION]...",\r
+    "Options:",\r
+    "  -I INFILE    The input pre-processed dependency text files name",\r
+    "  -O OUTFILE   The output binary dependency files name",\r
+    "  -P BOUNDARY  The padding integer value to align the output file size",\r
+    NULL\r
+  };\r
+\r
+  PrintGenDepexUtilityInfo ();\r
+  for (Index = 0; Str[Index] != NULL; Index++) {\r
+    fprintf (stdout, "%s\n", Str[Index]);\r
+  }\r
 }\r
 \r
 DEPENDENCY_OPCODE\r
@@ -742,7 +763,7 @@ Returns:
       // print an error message.\r
       //\r
       *(Ptrx + 20) = 0;\r
-      printf (TOOL_NAME " ERROR: Unrecognized input at: \"%s\"...\n", Ptrx);\r
+      printf (UTILITY_NAME" ERROR: Unrecognized input at: \"%s\"...\n", Ptrx);\r
       return EFI_INVALID_PARAMETER;\r
     }\r
   }\r