From 4ccb1ba0fc7d7e936a6699a9ab8956b3e41faeba Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 3 Aug 2017 21:09:56 -0400 Subject: [PATCH] EOL mess --- java_console/ui/src/com/rusefi/CompileTool.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/java_console/ui/src/com/rusefi/CompileTool.java b/java_console/ui/src/com/rusefi/CompileTool.java index 7cf95d5669..9fd02eb5df 100644 --- a/java_console/ui/src/com/rusefi/CompileTool.java +++ b/java_console/ui/src/com/rusefi/CompileTool.java @@ -12,6 +12,7 @@ import java.util.List; * 1/19/2017 */ public class CompileTool { + private static String NEWLINE = "\n"; public static void run(List args) throws IOException { System.out.println("Params " + args); @@ -28,9 +29,9 @@ public class CompileTool { BufferedReader br = new BufferedReader(new FileReader(inputFileName)); try (BufferedWriter bw = new BufferedWriter(new FileWriter(outputFileName))) { - bw.write("// this https://en.wikipedia.org/wiki/Reverse_Polish_notation is generated automatically\r\n"); - bw.write("// from " + inputFileName + "\r\n"); - bw.write("// on " + FileLog.getDate() + "\r\n//\r\n"); + bw.write("// this https://en.wikipedia.org/wiki/Reverse_Polish_notation is generated automatically" + NEWLINE); + bw.write("// from " + inputFileName + NEWLINE); + bw.write("// on " + FileLog.getDate() + NEWLINE + "//" + NEWLINE); String line; while ((line = br.readLine()) != null) { @@ -48,7 +49,7 @@ public class CompileTool { return; if (line.charAt(0) == '#') { // forwarding comment into the output - bw.write("//" + line.substring(1) + "\r\n"); + bw.write("//" + line.substring(1) + NEWLINE); return; } @@ -70,8 +71,8 @@ public class CompileTool { } catch (Throwable e) { throw new IllegalStateException("For " + expression, e); } - bw.write("\n// Human-readable: " + expression + "\r\n"); - bw.write("#define " + name + " \"" + rpn + "\"\r\n"); + bw.write(NEWLINE + "// Human-readable: " + expression + NEWLINE); + bw.write("#define " + name + " \"" + rpn + "\"" + NEWLINE); } }