From 13cdace1459b932489b8b43885504d701643f1bd Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Sat, 20 Nov 2010 00:01:50 -0700 Subject: [PATCH] line-endings now correct for Windows closes #18 --- src/com/dogcows/Editor.java | 3 --- src/com/dogcows/Util.java | 4 ++-- src/com/dogcows/VimCoder.java | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/com/dogcows/Editor.java b/src/com/dogcows/Editor.java index 2f28962..57e1b77 100644 --- a/src/com/dogcows/Editor.java +++ b/src/com/dogcows/Editor.java @@ -1,12 +1,9 @@ package com.dogcows; -import java.io.BufferedReader; import java.io.File; -import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; -import java.io.InputStream; import java.util.*; import com.topcoder.client.contestant.ProblemComponentModel; diff --git a/src/com/dogcows/Util.java b/src/com/dogcows/Util.java index 47fdd20..40303b6 100644 --- a/src/com/dogcows/Util.java +++ b/src/com/dogcows/Util.java @@ -98,7 +98,7 @@ public abstract class Util reader.close(); } - return text.toString(); + return text.toString().replaceAll("\n", System.getProperty("line.separator")); } /** @@ -132,7 +132,7 @@ public abstract class Util } } - return text.toString(); + return text.toString().replaceAll("\n", System.getProperty("line.separator")); } /** diff --git a/src/com/dogcows/VimCoder.java b/src/com/dogcows/VimCoder.java index 658bae1..21374bb 100644 --- a/src/com/dogcows/VimCoder.java +++ b/src/com/dogcows/VimCoder.java @@ -4,7 +4,6 @@ package com.dogcows; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.beans.PropertyChangeListener; import java.io.*; import java.text.SimpleDateFormat; import java.util.*; -- 2.45.2