Skip to content

Commit

Permalink
Revert "Fix for Issue energia#32: Line numbers incorrect in the compi…
Browse files Browse the repository at this point in the history
…ler messages"

This reverts commit f4ae1f3.
  • Loading branch information
robertinant committed Feb 15, 2013
1 parent f7096c7 commit fd6cd4d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/processing/app/preproc/PdePreprocessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ public String write() throws java.lang.Exception {

// Write the pde program to the cpp file
protected void writeProgram(PrintStream out, String program, List<String> prototypes) {

int prototypeInsertionPoint = firstStatement(program);

out.print(program.substring(0, prototypeInsertionPoint));
String arch = Base.getArch();
if(arch == "msp430") out.print("#include \"Energia.h\"\n");
else out.print("#include \"Arduino.h\"\n");
Expand All @@ -205,8 +207,8 @@ protected void writeProgram(PrintStream out, String program, List<String> protot
for (int i = 0; i < prototypes.size(); i++) {
out.print(prototypes.get(i) + "\n");
}
out.print("#line 1\n");
out.print(program.substring(0));

out.print(program.substring(prototypeInsertionPoint));
}


Expand Down

0 comments on commit fd6cd4d

Please sign in to comment.