]> Dogcows Code - chaz/vimcoder/commitdiff
line-endings now correct for Windows
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sat, 20 Nov 2010 07:01:50 +0000 (00:01 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sat, 20 Nov 2010 07:01:50 +0000 (00:01 -0700)
closes #18

src/com/dogcows/Editor.java
src/com/dogcows/Util.java
src/com/dogcows/VimCoder.java

index 2f2896248113e30da45d75d3d68995bc04141389..57e1b779a2a74aedb9f71aa5b1ac26e60d3c1e16 100644 (file)
@@ -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;
index 47fdd20d1cdef9c51d0d23ad90c7e0702ba59ab1..40303b6b7aac26dfa5854b9ce1dc7d032bf08eb1 100644 (file)
@@ -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"));
        }
 
        /**
index 658bae13051ddc080a266bd9610cec8bf721929e..21374bb0877c8d9e29edb52d5e59e1a6db8c5c7c 100644 (file)
@@ -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.*;
This page took 0.027235 seconds and 4 git commands to generate.