X-Git-Url: http://svarog.pmf.uns.ac.rs/gitweb/?p=mjc2wsl.git;a=blobdiff_plain;f=src%2Fcom%2Fquemaster%2Ftransformations%2Fmjc2wsl%2Fmjc2wsl.java;h=6ff03f47b8e126b722dc2fbd0597033dbf58c2d1;hp=c6830a5e33dc2b908a8e4d7d57ccbfc3846aeccc;hb=fe1bfd73d2ccac1c35625815fe85080ff1a0f50a;hpb=78fdd5d95044327d638dcdf0b238165c33230525 diff --git a/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java b/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java index c6830a5..6ff03f4 100644 --- a/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java +++ b/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java @@ -1,6 +1,6 @@ package com.quemaster.transformations.mjc2wsl; /* - Copyright (C) 2014 Doni Pracner + Copyright (C) 2014,2015 Doni Pracner This file is part of mjc2wsl. @@ -40,7 +40,7 @@ import com.quemaster.transformations.TransMessages; */ public class mjc2wsl{ //default version name, used if the file is not found - private static String versionN = "0.1.x"; + private static String versionN = "v0.2.x"; private String versionFile = "/version.properties"; @@ -176,7 +176,7 @@ public class mjc2wsl{ public String createStandardStart(int numWords){ StringBuilder ret = new StringBuilder( "C:\" This file automatically converted from microjava bytecode\";\n" - +"C:\" with mjc2wsl v "+getVersion()+"\";\n"); + +"C:\" with mjc2wsl "+getVersion()+"\";\n"); ret.append("\nBEGIN"); ret.append("\nVAR <\n\t"); @@ -790,7 +790,7 @@ public class mjc2wsl{ } public void printVersion() { - System.out.println("MicroJava bytecode to WSL converter. v " + getVersion() + System.out.println("MicroJava bytecode to WSL converter " + getVersion() + ", by Doni Pracner"); } @@ -806,7 +806,7 @@ public class mjc2wsl{ printHelp(); } else { int i = 0; - while (i < args.length && args[i].charAt(0) == '-') { + while (i < args.length && args[i].length() > 0 && args[i].charAt(0) == '-') { if (args[i].compareTo("-h") == 0) { printHelp(); return; @@ -870,7 +870,7 @@ public class mjc2wsl{ } Path p = FileSystems.getDefault().getPath(args[i]); - if (!Files.exists(p)){ + if (!Files.isRegularFile(p)){ System.err.println("input file does not exist"); System.exit(1); }