altos/lisp: Fix some scheme compat issues
[fw/altos] / src / lisp / ao_lisp_atom.c
index 6705f14036c07748a9b3a9004936c67b8bac3cdc..ede13567fd3a1973f05e9557d8548c48f3a20d4f 100644 (file)
@@ -108,7 +108,7 @@ ao_lisp_atom_init(void)
                ao_lisp_frame_global = ao_lisp_frame_new(0);
 }
 
-static ao_poly *
+ao_poly *
 ao_lisp_atom_ref(struct ao_lisp_frame *frame, ao_poly atom)
 {
        ao_poly *ref;
@@ -117,7 +117,7 @@ ao_lisp_atom_ref(struct ao_lisp_frame *frame, ao_poly atom)
                ref = ao_lisp_frame_ref(frame, atom);
                if (ref)
                        return ref;
-               frame = ao_lisp_poly_frame(frame->next);
+               frame = ao_lisp_poly_frame(frame->prev);
        }
        if (ao_lisp_frame_global) {
                ref = ao_lisp_frame_ref(ao_lisp_frame_global, atom);
@@ -158,7 +158,7 @@ ao_lisp_atom_set(ao_poly atom, ao_poly val)
 }
 
 void
-ao_lisp_atom_print(ao_poly a)
+ao_lisp_atom_write(ao_poly a)
 {
        struct ao_lisp_atom *atom = ao_lisp_poly_atom(a);
        printf("%s", atom->name);