Hot damn! When you see an obvious, stupid bug you created, you can't unsee it!

This commit is contained in:
Simon Brooke 2026-04-18 11:02:35 +01:00
parent ca5671f613
commit 02a4bc3e28
8 changed files with 563 additions and 495 deletions

View file

@ -81,11 +81,11 @@ struct pso_pointer make_string_like_thing( wint_t c, struct pso_pointer tail,
cell->payload.string.cdr = tail;
cell->payload.string.hash = calculate_hash( c, tail );
debug_printf( DEBUG_ALLOC, 0,
L"Building string-like-thing of type %3.3s: ",
cell->header.tag.bytes.mnemonic);
debug_print_object(pointer, DEBUG_ALLOC, 0);
debug_println(DEBUG_ALLOC);
debug_printf( DEBUG_ALLOC, 0,
L"Building string-like-thing of type %3.3s: ",
cell->header.tag.bytes.mnemonic );
debug_print_object( pointer, DEBUG_ALLOC, 0 );
debug_println( DEBUG_ALLOC );
} else {
// \todo should throw an exception!
struct pso2 *tobj = pointer_to_object( tail );
@ -94,7 +94,7 @@ struct pso_pointer make_string_like_thing( wint_t c, struct pso_pointer tail,
tag, tobj->header.tag.bytes.mnemonic );
}
return pointer;
}
@ -145,8 +145,8 @@ struct pso_pointer c_string_to_lisp_string( wchar_t *string ) {
if ( string[i] != '"' ) {
result = make_string( string[i], result );
} else {
result = make_string( L'\\', make_string( string[i], result));
}
result = make_string( L'\\', make_string( string[i], result ) );
}
}
return result;
@ -163,7 +163,7 @@ struct pso_pointer c_string_to_lisp_symbol( wchar_t *symbol ) {
for ( int i = wcslen( symbol ) - 1; i >= 0; i-- ) {
wchar_t c = towlower( symbol[i] );
if ( iswalpha( c ) || c == L'-' || c == L'*') {
if ( iswalpha( c ) || c == L'-' || c == L'*' ) {
result = make_symbol( c, result );
}
}