diff --git a/WHATSNEW b/WHATSNEW index cdfa8b5b3..0aa53f169 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -141,6 +141,8 @@ Other changes: * can now store Unix permissions in a way that can be reconstructed by Info-Zip's unzip command. +* 's eol attribute now also understand "mac", "unix" and "dos". + Changes from Ant 1.5.1Beta1 to 1.5.1 ==================================== diff --git a/build.xml b/build.xml index 27ac14204..6e63abf9f 100644 --- a/build.xml +++ b/build.xml @@ -970,8 +970,8 @@ - - + + @@ -1142,8 +1142,8 @@ - - + + diff --git a/docs/manual/CoreTasks/fixcrlf.html b/docs/manual/CoreTasks/fixcrlf.html index 7698da9e2..bc9b40955 100644 --- a/docs/manual/CoreTasks/fixcrlf.html +++ b/docs/manual/CoreTasks/fixcrlf.html @@ -100,6 +100,9 @@ supports all attributes of <fileset>
  • cr: convert all EOLs to a single CR
  • lf: convert all EOLs to a single LF
  • crlf: convert all EOLs to the pair CRLF
  • +
  • mac: convert all EOLs to a single CR
  • +
  • unix: convert all EOLs to a single LF
  • +
  • dos: convert all EOLs to the pair CRLF
  • Default is based on the platform on which you are running this task. For Unix platforms, the default is "lf". diff --git a/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java b/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java index 6815078c8..eba445c9c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java +++ b/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java @@ -226,10 +226,10 @@ public class FixCRLF extends MatchingTask { String option = attr.getValue(); if (option.equals("asis")) { eol = ASIS; - } else if (option.equals("cr")) { + } else if (option.equals("cr") || option.equals("mac")) { eol = CR; eolstr = "\r"; - } else if (option.equals("lf")) { + } else if (option.equals("lf") || option.equals("unix")) { eol = LF; eolstr = "\n"; } else { @@ -1045,7 +1045,8 @@ public class FixCRLF extends MatchingTask { * @see EnumeratedAttribute#getValues */ public String[] getValues() { - return new String[] {"asis", "cr", "lf", "crlf"}; + return new String[] {"asis", "cr", "lf", "crlf", + "mac", "unix", "dos"}; } }