gitweb on Svarog
projekti pod git sistemom za održavanje verzija -- projects under the git version control system
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f9832be)
raw | patch | inline | side by side (parent: f9832be)
author | Doni Pracner <quinnuendo@gmail.com> | |
Tue, 26 Nov 2013 20:57:27 +0000 (21:57 +0100) | ||
committer | Doni Pracner <quinnuendo@gmail.com> | |
Tue, 26 Nov 2013 20:57:27 +0000 (21:57 +0100) |
src/mjc2wsl.java | patch | blob | history |
diff --git a/src/mjc2wsl.java b/src/mjc2wsl.java
index ecf634a502dc11c26bb8d77db48af32170ec497f..574adcc523ccf7177ffba95f4aa17f48b29e64f0 100644 (file)
--- a/src/mjc2wsl.java
+++ b/src/mjc2wsl.java
public class mjc2wsl{
public static String versionN = "0.1.2";
- public static final int M_ERR = 2, M_WAR = 1;
+ public static final int M_ERR = 2, M_WAR = 1, M_DEB = 0;
- private int printLevel = 0;
+ private int printLevel = M_ERR;
private int[] messageCounters = new int[M_ERR+1];
private void message(String mes, int level){
- if (level>printLevel)
+ if (level>=printLevel)
System.out.println(mes);
messageCounters[level]++;
}
System.out.println("usage:\n\t {options} mjc2wsl filename [outfile]");
System.out.println("options:\n\t--screen print output to screen");
System.out.println("\t-o --oc[+-] include original code in comments");
+ System.out.println("\t-v verbose, print warning messages");
+ System.out.println("\t-q don't print even the error messages");
+ System.out.println("\t-d print detailed debug messages");
}
public String makeDefaultOutName(String inname){
originalInComments = true;
} else if (args[i].startsWith("--screen")) {
out = new PrintWriter(System.out);
+ } else if (args[i].compareTo("-d") == 0) {
+ printLevel = M_DEB;//print debug info
+ } else if (args[i].compareTo("-v") == 0) {
+ printLevel = M_WAR;//print warnings
+ } else if (args[i].compareTo("-q") == 0) {
+ printLevel = M_ERR+1;//no printing
}
i++;
}
}
if (f.exists()) {
Calendar now = Calendar.getInstance();
- printLevel=10;
convertFile(f);
long mili = Calendar.getInstance().getTimeInMillis()
- now.getTimeInMillis();