Fixed, working.

This commit is contained in:
Simon Brooke 2019-01-29 22:36:20 +00:00
parent eb394d153f
commit f9bcac10e7
14 changed files with 159 additions and 155 deletions

View file

@ -168,7 +168,7 @@ void free_cell( struct cons_pointer pointer ) {
break;
case READTV:
case WRITETV:
dec_ref(cell->payload.stream.meta);
dec_ref( cell->payload.stream.meta );
url_fclose( cell->payload.stream.stream );
break;
case SPECIALTV:

View file

@ -158,7 +158,7 @@ make_function( struct cons_pointer meta, struct cons_pointer ( *executable )
struct cons_pointer, struct cons_pointer ) ) {
struct cons_pointer pointer = allocate_cell( FUNCTIONTAG );
struct cons_space_object *cell = &pointer2cell( pointer );
inc_ref( meta);
inc_ref( meta );
cell->payload.function.meta = meta;
cell->payload.function.executable = executable;
@ -261,11 +261,11 @@ struct cons_pointer make_symbol_or_key( wint_t c, struct cons_pointer tail,
if ( strncmp( tag, KEYTAG, 4 ) == 0 ) {
struct cons_pointer r = internedp( result, oblist );
if ( nilp(r)) {
intern(result, oblist);
} else {
result = r;
}
if ( nilp( r ) ) {
intern( result, oblist );
} else {
result = r;
}
}
return result;
@ -280,7 +280,7 @@ make_special( struct cons_pointer meta, struct cons_pointer ( *executable )
struct cons_pointer, struct cons_pointer env ) ) {
struct cons_pointer pointer = allocate_cell( SPECIALTAG );
struct cons_space_object *cell = &pointer2cell( pointer );
inc_ref( meta);
inc_ref( meta );
cell->payload.special.meta = meta;
cell->payload.special.executable = executable;

View file

@ -108,14 +108,14 @@ void dump_object( URL_FILE * output, struct cons_pointer pointer ) {
case RATIOTV:
url_fwprintf( output,
L"\t\tRational cell: value %ld/%ld, count %u\n",
pointer2cell( cell.payload.ratio.dividend ).payload.
integer.value,
pointer2cell( cell.payload.ratio.divisor ).payload.
integer.value, cell.count );
pointer2cell( cell.payload.ratio.dividend ).
payload.integer.value,
pointer2cell( cell.payload.ratio.divisor ).
payload.integer.value, cell.count );
break;
case READTV:
url_fputws( L"\t\tInput stream; metadata: ", output );
print(output, cell.payload.stream.meta);
url_fputws( L"\t\tInput stream; metadata: ", output );
print( output, cell.payload.stream.meta );
url_fputws( L"\n", output );
break;
case REALTV:
@ -150,8 +150,8 @@ void dump_object( URL_FILE * output, struct cons_pointer pointer ) {
}
break;
case WRITETV:
url_fputws( L"\t\tOutput stream; metadata: ", output );
print(output, cell.payload.stream.meta);
url_fputws( L"\t\tOutput stream; metadata: ", output );
print( output, cell.payload.stream.meta );
url_fputws( L"\n", output );
break;
}