From f84adee2137203351374c24da2c4244dab191ae1 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Wed, 7 May 2008 18:25:40 +0000 Subject: [PATCH] Moving #include WProgram.h to after other preprocessor directives in the main sketch file. --- app/preproc/PdePreprocessor.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/preproc/PdePreprocessor.java b/app/preproc/PdePreprocessor.java index 9c44e8963..ff3e00a84 100755 --- a/app/preproc/PdePreprocessor.java +++ b/app/preproc/PdePreprocessor.java @@ -321,6 +321,7 @@ public class PdePreprocessor { int prototypeInsertionPoint = firstStatement(program); out.print(program.substring(0, prototypeInsertionPoint)); + out.print("#include \"WProgram.h\"\n"); // print user defined prototypes for (int i = 0; i < prototypes.size(); i++) { @@ -336,10 +337,7 @@ public class PdePreprocessor { * * @param out PrintStream to write it to. */ - void writeHeader(PrintStream out) - throws IOException { - out.print("#include \"WProgram.h\"\n"); - } + void writeHeader(PrintStream out) throws IOException {} /** * Write any necessary closing text.