diff --git a/jode/jode/Decompiler.java b/jode/jode/Decompiler.java index f44a05e..6d35a08 100644 --- a/jode/jode/Decompiler.java +++ b/jode/jode/Decompiler.java @@ -25,27 +25,13 @@ import java.util.zip.ZipOutputStream; import java.util.zip.ZipEntry; public class Decompiler { - public final static String version = "1.0"; - public final static String email = "jochen@gnu.org"; - public final static String copyright = - "Jode (c) 1998,1999 Jochen Hoenicke <"+email+">"; - public final static int TAB_SIZE_MASK = 0x0f; public final static int BRACE_AT_EOL = 0x10; public final static int SUN_STYLE = 0x14; public final static int GNU_STYLE = 0x02; - public static PrintStream err = System.err; - public static boolean isVerbose = false; - public static boolean isDebugging = false; - public static boolean isTypeDebugging = false; - public static boolean isFlowDebugging = false; public static boolean usePUSH = false; - public static boolean debugInOut = false; - public static boolean debugAnalyze = false; - public static boolean showLVT = false; public static boolean useLVT = true; - public static boolean doChecks = false; public static boolean prettyLocals = false; public static boolean immediateOutput = false; public static boolean highlevelTrafos = true; @@ -53,21 +39,19 @@ public class Decompiler { public static boolean undoOptimizations = true; public static boolean removeOnetimeLocals = false; public static int outputStyle = SUN_STYLE; - public static int importPackageLimit = 3; - public static int importClassLimit = 3; public static void usage() { - err.println("Version: " + version); + PrintStream err = GlobalOptions.err; + err.println("Version: " + GlobalOptions.version); err.println("use: jode [-v][--dest ]" +"[--imm][--pretty]" +"[--cp ]" +"[--nolvt][--usepush][--nodecrypt]" +"[--import ]" - +"[--debug][--analyze][--flow]" - +"[--type][--inout][--lvt][--check]" + +"[--debug=...]" +" class1 [class2 ...]"); err.println("\t-v "+ - "show progress."); + "be verbose (multiple times means more verbose)."); err.println("\t--dest "+ "write decompiled files to disk into directory destdir."); err.println("\t--imm "+ @@ -90,20 +74,8 @@ public class Decompiler { err.println("\t "+ "and packages with more then pkglimit used classes"); err.println("Debugging options, mainly used to debug this decompiler:"); - err.println("\t--debug "+ - "output some debugging messages into the source code."); - err.println("\t--analyze "+ - "show analyzation order of flow blocks."); - err.println("\t--flow "+ - "show flow block merging."); - err.println("\t--type "+ - "show how types are guessed."); - err.println("\t--inout "+ - "show T1/T2 in/out-set analysis."); - err.println("\t--lvt "+ - "dump the local variable table."); - err.println("\t--check "+ - "do flow block sanity checks."); + err.println("\t--debug=... "+ + "use --debug=help for more information."); } public static void main(String[] params) { @@ -111,32 +83,29 @@ public class Decompiler { String classPath = System.getProperty("java.class.path"); File destDir = null; ZipOutputStream destZip = null; - err.println(copyright); + int importPackageLimit = 3; + int importClassLimit = 3; + GlobalOptions.err.println(GlobalOptions.copyright); for (i=0; i