bodewig 2002/12/13 05:45:02 Modified: . WHATSNEW build.xml docs/manual/CoreTasks fixcrlf.html src/main/org/apache/tools/ant/taskdefs FixCRLF.java Log: Add mac, unix and dos as alternatives for <fixcrlf>'s eol option. Submitted by: Martin van den Bemt <mllist at mvdb dot net> Revision Changes Path 1.333 +2 -0 jakarta-ant/WHATSNEW Index: WHATSNEW =================================================================== RCS file: /home/cvs/jakarta-ant/WHATSNEW,v retrieving revision 1.332 retrieving revision 1.333 diff -u -r1.332 -r1.333 --- WHATSNEW 13 Dec 2002 12:29:33 -0000 1.332 +++ WHATSNEW 13 Dec 2002 13:45:00 -0000 1.333 @@ -141,6 +141,8 @@ * <zip> can now store Unix permissions in a way that can be reconstructed by Info-Zip's unzip command. +* <fixcrlf>'s eol attribute now also understand "mac", "unix" and "dos". + Changes from Ant 1.5.1Beta1 to 1.5.1 ==================================== 1.339 +4 -4 jakarta-ant/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-ant/build.xml,v retrieving revision 1.338 retrieving revision 1.339 diff -u -r1.338 -r1.339 --- build.xml 9 Dec 2002 12:40:37 -0000 1.338 +++ build.xml 13 Dec 2002 13:45:00 -0000 1.339 @@ -970,8 +970,8 @@ <fileset dir="${script.dir}/"/> </copy> - <fixcrlf srcdir="${dist.bin}" eol="crlf" includes="*.bat"/> - <fixcrlf srcdir="${dist.bin}" eol="lf"> + <fixcrlf srcdir="${dist.bin}" eol="dos" includes="*.bat"/> + <fixcrlf srcdir="${dist.bin}" eol="unix"> <include name="ant"/> <include name="antRun"/> <include name="*.pl"/> @@ -1142,8 +1142,8 @@ </fileset> </copy> - <fixcrlf srcdir="${src.dist.dir}" eol="crlf" includes="*.bat"/> - <fixcrlf srcdir="${src.dist.dir}" eol="lf"> + <fixcrlf srcdir="${src.dist.dir}" eol="dos" includes="*.bat"/> + <fixcrlf srcdir="${src.dist.dir}" eol="unix"> <include name="**/*.sh"/> <include name="**/*.pl"/> <include name="**/ant"/> 1.12 +3 -0 jakarta-ant/docs/manual/CoreTasks/fixcrlf.html Index: fixcrlf.html =================================================================== RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/fixcrlf.html,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- fixcrlf.html 22 Jun 2002 23:38:27 -0000 1.11 +++ fixcrlf.html 13 Dec 2002 13:45:01 -0000 1.12 @@ -100,6 +100,9 @@ <li>cr: convert all EOLs to a single CR</li> <li>lf: convert all EOLs to a single LF</li> <li>crlf: convert all EOLs to the pair CRLF</li> + <li>mac: convert all EOLs to a single CR</li> + <li>unix: convert all EOLs to a single LF</li> + <li>dos: convert all EOLs to the pair CRLF</li> </ul> Default is based on the platform on which you are running this task. For Unix platforms, the default is "lf". 1.43 +5 -4 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java Index: FixCRLF.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- FixCRLF.java 8 Nov 2002 14:59:46 -0000 1.42 +++ FixCRLF.java 13 Dec 2002 13:45:02 -0000 1.43 @@ -226,10 +226,10 @@ 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 @@ * @see EnumeratedAttribute#getValues */ public String[] getValues() { - return new String[] {"asis", "cr", "lf", "crlf"}; + return new String[] {"asis", "cr", "lf", "crlf", + "mac", "unix", "dos"}; } }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>