diff options
Diffstat (limited to 'src/main/java/org/anarres/cpp/CppTask.java')
-rw-r--r-- | src/main/java/org/anarres/cpp/CppTask.java | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/main/java/org/anarres/cpp/CppTask.java b/src/main/java/org/anarres/cpp/CppTask.java index a569054..cc9c4d3 100644 --- a/src/main/java/org/anarres/cpp/CppTask.java +++ b/src/main/java/org/anarres/cpp/CppTask.java @@ -25,8 +25,6 @@ import java.util.Enumeration; import java.util.List; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.taskdefs.Copy; -import org.apache.tools.ant.types.FilterSet; -import org.apache.tools.ant.types.FilterSetCollection; import org.apache.tools.ant.types.Path; /** @@ -117,6 +115,11 @@ public class CppTask extends Copy { } */ private void preprocess(File input, File output) throws Exception { + if (input == null) + throw new BuildException("Input not specified"); + if (output == null) + throw new BuildException("Output not specified"); + Preprocessor cpp = new Preprocessor(); cpp.setListener(listener); for (Macro macro : macros) @@ -135,10 +138,6 @@ public class CppTask extends Copy { } FileWriter writer = null; try { - if (input == null) - throw new BuildException("Input not specified"); - if (output == null) - throw new BuildException("Output not specified"); cpp.addInput(input); writer = new FileWriter(output); for (;;) { @@ -181,18 +180,19 @@ public class CppTask extends Copy { try { log("Copying " + fromFile + " to " + toFile, verbosity); - FilterSetCollection executionFilters - = new FilterSetCollection(); - if (filtering) { - executionFilters - .addFilterSet(getProject().getGlobalFilterSet()); - } - for (Enumeration filterEnum = getFilterSets().elements(); - filterEnum.hasMoreElements();) { - executionFilters - .addFilterSet((FilterSet) filterEnum.nextElement()); - } - + /* + FilterSetCollection executionFilters + = new FilterSetCollection(); + if (filtering) { + executionFilters + .addFilterSet(getProject().getGlobalFilterSet()); + } + for (Enumeration filterEnum = getFilterSets().elements(); + filterEnum.hasMoreElements();) { + executionFilters + .addFilterSet((FilterSet) filterEnum.nextElement()); + } + */ File srcFile = new File(fromFile); File dstFile = new File(toFile); preprocess(srcFile, dstFile); |