iris

small scheme interpreter
git clone git://git.2f30.org/iris
Log | Files | Refs | LICENSE

commit 4db212d423da3639af21f77dce6bf2d897d8fcc3
parent 6f472dca9eddb30dc8fbb108200442242dbba022
Author: sin <sin@2f30.org>
Date:   Thu, 15 May 2014 16:09:34 +0100

Use car()/cdr()

Diffstat:
Mparser.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/parser.c b/parser.c @@ -457,22 +457,22 @@ eval(struct object *o) static void printpair(struct object *o) { - struct object *car, *cdr; + struct object *ocar, *ocdr; - car = o->d.pair.car; - cdr = o->d.pair.cdr; - print(car); - switch (cdr->type) { + ocar = car(o); + ocdr = cdr(o); + print(ocar); + switch (ocdr->type) { case OPair: putchar(' '); - printpair(cdr); + printpair(ocdr); case OEmptylist: return; default: putchar(' '); putchar('.'); putchar(' '); - print(cdr); + print(ocdr); } }