From 26e7629391c7e34522dff7ebea448781152079c0 Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Fri, 7 Feb 2014 21:12:13 +0100 Subject: [PATCH] mjc2wsl extract the print version function --- src/mjc2wsl.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mjc2wsl.java b/src/mjc2wsl.java index 133ca3d..bed0f37 100644 --- a/src/mjc2wsl.java +++ b/src/mjc2wsl.java @@ -635,8 +635,7 @@ public class mjc2wsl{ } public void printHelp() { - System.out.println("MicroJava bytecode to WSL converter. v " + versionN - + ", by Doni Pracner"); + printVersion(); System.out.println("usage:\n\t mjc2wsl {options} filename [outfile]"); System.out.println("basic options:\n\t--screen print output to screen"); System.out.println("\t-o --oc[+-] include original code in comments"); @@ -648,8 +647,7 @@ public class mjc2wsl{ } public void printLongHelp() { - System.out.println("MicroJava bytecode to WSL converter. v " + versionN - + ", by Doni Pracner"); + printVersion(); System.out.println("usage:\n\t mjc2wsl {options} filename [outfile]"); System.out.println("Output options:"); System.out.println(" --screen print output to screen"); @@ -670,6 +668,11 @@ public class mjc2wsl{ System.out.println(" --help print more detailed help; this screen"); } + public void printVersion() { + System.out.println("MicroJava bytecode to WSL converter. v " + versionN + + ", by Doni Pracner"); + } + public String makeDefaultOutName(String inname){ String rez = inname; if (inname.endsWith(".obj")) -- 2.25.1