From a432b9670a3df4ddadc6979601c37204aab927cd Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Mon, 18 Dec 2006 18:02:33 +0100 Subject: minor simplification in expr2c --- src/expr2c.mac | 14 +++++++------- 1 file 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("}", " +"))$ -- cgit v1.2.3