From f5921264e53af4c642939f5dc1e617363edd7865 Mon Sep 17 00:00:00 2001
From: Peter Reilly
Date: Fri, 9 Jan 2004 17:36:16 +0000
Subject: [PATCH] fix for CRLF adds extraneous character at the end of File if
a file does not end in an eol, fixcrlf will add an eol this patch adds an
attribute to fixcrlf to stop this behaviour PR: 23262 Obtained from:
gudnabrsam at yahoo dot com
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275886 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/CoreTasks/fixcrlf.html | 9 ++++++--
src/etc/testcases/taskdefs/fixcrlf/build.xml | 15 ++++++++++++
.../taskdefs/fixcrlf/expected/fixlast.dos | 2 ++
.../fixcrlf/expected/fixlastfalse.mac | 1 +
.../taskdefs/fixcrlf/input/fixlastfalse.lf | 2 ++
.../apache/tools/ant/taskdefs/FixCRLF.java | 23 ++++++++++++++-----
.../tools/ant/taskdefs/FixCrLfTest.java | 16 +++++++++++--
7 files changed, 58 insertions(+), 10 deletions(-)
create mode 100644 src/etc/testcases/taskdefs/fixcrlf/expected/fixlast.dos
create mode 100644 src/etc/testcases/taskdefs/fixcrlf/expected/fixlastfalse.mac
create mode 100644 src/etc/testcases/taskdefs/fixcrlf/input/fixlastfalse.lf
diff --git a/docs/manual/CoreTasks/fixcrlf.html b/docs/manual/CoreTasks/fixcrlf.html
index dfa478ed6..a0b79942a 100644
--- a/docs/manual/CoreTasks/fixcrlf.html
+++ b/docs/manual/CoreTasks/fixcrlf.html
@@ -219,6 +219,12 @@ supports all attributes of <fileset>
The encoding of the files |
No - defaults to default JVM encoding |
+
+ fixlast |
+ Whether to add a missing EOL to the last line
+ of a processed file. (Since ant 1.6.1) |
+ No - default is true |
+
Examples
<fixcrlf srcdir="${src}"
@@ -271,9 +277,8 @@ EOF characters are left alone if run on
DOS systems, and are removed if run on Unix systems.
You never know what editor a user will use to browse README's.
-Copyright © 2000-2003 Apache Software Foundation. All rights
+
Copyright © 2000-2004 Apache Software Foundation. All rights
Reserved.