summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-12-18 18:02:33 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2006-12-18 18:02:33 +0100
commita432b9670a3df4ddadc6979601c37204aab927cd (patch)
tree180642a8c5639da5c50cca20f1539835d7fa9edf
parent654ba2975793608dfa5588bddca775d24779f17c (diff)
minor simplification in expr2c
-rw-r--r--src/expr2c.mac14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/expr2c.mac b/src/expr2c.mac
index dba5987..2a33090 100644
--- a/src/expr2c.mac
+++ b/src/expr2c.mac
@@ -9,12 +9,12 @@ block2c(expr) :=
if ?equal(op(expr), block) then (
printdecl(first(expr)),
for d in reverse(rest(reverse(rest(expr)))) do printdef(d),
- sprint("return", string(last(expr)), ";}", "
-"))
+ sprint("return", string(last(expr)), ";"))
else
- sprint("return", string(expr), ";}", "
-")$
+ sprint("return", string(expr), ";")$
-expr2c(funcname, args, expr) := (
- sprint("double", funcname, "(", args, ") {"),
- block2c(subst(pow, "^", optimize(expr))))$
+expr2c(funcname, argstr, expr) := (
+ sprint("double", funcname, "(", argstr, ") {"),
+ block2c(subst(pow, "^", optimize(expr))),
+ sprint("}", "
+"))$