From bd2368959084d675d48672f648ce90caa8c25efc Mon Sep 17 00:00:00 2001 From: jjin9 Date: Thu, 2 Nov 2006 08:55:15 +0000 Subject: [PATCH] Fix the bug EDKT464. ? and * are regarded as wildcard char by OS. so we have to remove the support of /? and -? To show the help info, ContextTool only support: -h, /h, --help, /help. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1887 6f19259b-4bc3-4df7-8a09-765794883524 --- .../org/tianocore/context/ContextMain.java | 2 +- .../org/tianocore/context/ParseParameter.java | 61 ++++--------------- 2 files changed, 13 insertions(+), 50 deletions(-) diff --git a/Tools/Java/Source/ContextTool/org/tianocore/context/ContextMain.java b/Tools/Java/Source/ContextTool/org/tianocore/context/ContextMain.java index e96bb07fe0..94ea56a5c7 100644 --- a/Tools/Java/Source/ContextTool/org/tianocore/context/ContextMain.java +++ b/Tools/Java/Source/ContextTool/org/tianocore/context/ContextMain.java @@ -43,6 +43,6 @@ public class ContextMain { } String workspacePath = System.getenv("WORKSPACE"); - System.out.printf("%n%s%n", workspacePath + "\\Tool\\Conf\\target.txt is generated successfully!"); + System.out.printf("%n%s%n", workspacePath + "\\Tool\\Conf\\target.txt is updated successfully!"); } } diff --git a/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java b/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java index d58d28b010..24adfb70f1 100644 --- a/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java +++ b/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java @@ -29,8 +29,7 @@ public class ParseParameter { return false; } else { if( (args[0].compareToIgnoreCase("-h") == 0) || (args[0].compareToIgnoreCase("/h") == 0) || - (args[0].compareToIgnoreCase("-?") == 0) || (args[0].compareToIgnoreCase("/?") == 0) || - (args[0].compareToIgnoreCase("-help") == 0) || (args[0].compareToIgnoreCase("/help") == 0) ){ + (args[0].compareToIgnoreCase("--help") == 0) || (args[0].compareToIgnoreCase("/help") == 0) ){ HelpInfo.outputUsageInfo(); return false; } @@ -209,58 +208,22 @@ public class ParseParameter { public static boolean outputCurSetting(){ System.out.printf( "%s\n", "The current setting is:" ); + String[] A = { pstr, tstr, astr, cstr, nstr, mstr, mestr }; + String[] B = { curpstr, curtstr, curastr, curcstr, curnstr, curmstr, curmestr }; - if(curpstr != null){ - System.out.printf( "%s\n", curpstr ); - } - else{ - System.out.printf( "%s\n", pstr ); - } - - if(curtstr != null){ - System.out.printf( "%s\n", curtstr ); - } - else{ - System.out.printf( "%s\n", tstr ); - } - - if(curastr != null){ - System.out.printf( "%s\n", curastr ); - } - else{ - System.out.printf( "%s\n", astr ); - } - - if(curcstr != null){ - System.out.printf( "%s\n", curcstr ); - } - else{ - System.out.printf( "%s\n", cstr ); - } - - if(curnstr != null){ - System.out.printf( "%s\n", curnstr ); - } - else{ - System.out.printf( "%s\n", nstr ); - } - - if(curmstr != null){ - System.out.printf( "%s\n", curmstr ); - } - else{ - System.out.printf( "%s\n", mstr ); - } - - if(curmstr != null){ - System.out.printf( "%s\n", curmestr ); - } - else{ - System.out.printf( "%s\n", mestr ); + for(int i=0; i