diff --git a/src/equal.c b/src/equal.c index ebb085e..0f0597c 100644 --- a/src/equal.c +++ b/src/equal.c @@ -80,8 +80,8 @@ bool equal( struct cons_pointer a, struct cons_pointer b ) { && ( equal( cell_a->payload.string.cdr, cell_b->payload.string.cdr ) || ( end_of_string( cell_a->payload.string.cdr ) - && end_of_string( cell_b->payload.string. - cdr ) ) ); + && end_of_string( cell_b->payload. + string.cdr ) ) ); break; case INTEGERTV: result = diff --git a/src/init.c b/src/init.c index 70e2499..876bdad 100644 --- a/src/init.c +++ b/src/init.c @@ -103,6 +103,7 @@ int main( int argc, char *argv[] ) { bind_function( "*", &lisp_multiply ); bind_function( "-", &lisp_subtract ); bind_function( "/", &lisp_divide ); + bind_function( "=", &lisp_equal ); /* * primitive special forms diff --git a/src/lispops.c b/src/lispops.c index cf70d8a..46ebed3 100644 --- a/src/lispops.c +++ b/src/lispops.c @@ -390,8 +390,10 @@ lisp_eval( struct stack_frame *frame, struct cons_pointer env ) { internedp( frame->arg[0], env ); if ( nilp( canonical ) ) { struct cons_pointer message = + c_cons( c_string_to_lisp_string - ( "Attempt to take value of unbound symbol." ); + ( "Attempt to take value of unbound symbol." ), + frame->arg[0]); result = lisp_throw( message, frame ); } else { result = c_assoc( canonical, env ); diff --git a/src/print.c b/src/print.c index 42bf8b4..87eff85 100644 --- a/src/print.c +++ b/src/print.c @@ -132,8 +132,8 @@ void print( FILE * output, struct cons_pointer pointer ) { case LAMBDATV: print( output, make_cons( c_string_to_lisp_symbol( "lambda" ), make_cons( cell.payload.lambda.args, - cell.payload. - lambda.body ) ) ); + cell.payload.lambda. + body ) ) ); break; case NILTV: fwprintf( output, L"nil" ); @@ -141,8 +141,8 @@ void print( FILE * output, struct cons_pointer pointer ) { case NLAMBDATV: print( output, make_cons( c_string_to_lisp_symbol( "nlambda" ), make_cons( cell.payload.lambda.args, - cell.payload. - lambda.body ) ) ); + cell.payload.lambda. + body ) ) ); break; case READTV: fwprintf( output, L"(Input stream)" );