Tidied up 'wide' printing.
This commit is contained in:
parent
ba4a31c25a
commit
0685442e1a
2
Makefile
2
Makefile
|
@ -26,7 +26,7 @@ test:
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(TARGET) $(OBJS) $(DEPS)
|
$(RM) $(TARGET) $(OBJS) $(DEPS) $(SRC_DIRS)/*~
|
||||||
|
|
||||||
repl:
|
repl:
|
||||||
$(TARGET) -p 2> psse.log
|
$(TARGET) -p 2> psse.log
|
||||||
|
|
|
@ -63,7 +63,7 @@ void make_cons_page( ) {
|
||||||
cell->count = MAXREFERENCE;
|
cell->count = MAXREFERENCE;
|
||||||
cell->payload.free.car = NIL;
|
cell->payload.free.car = NIL;
|
||||||
cell->payload.free.cdr = NIL;
|
cell->payload.free.cdr = NIL;
|
||||||
fprintf( stderr, "Allocated special cell NIL\n" );
|
fwprintf( stderr, L"Allocated special cell NIL\n" );
|
||||||
} else if ( i == 1 ) {
|
} else if ( i == 1 ) {
|
||||||
/*
|
/*
|
||||||
* initialise cell as T
|
* initialise cell as T
|
||||||
|
@ -74,7 +74,7 @@ void make_cons_page( ) {
|
||||||
0, 1};
|
0, 1};
|
||||||
cell->payload.free.cdr = ( struct cons_pointer ) {
|
cell->payload.free.cdr = ( struct cons_pointer ) {
|
||||||
0, 1};
|
0, 1};
|
||||||
fprintf( stderr, "Allocated special cell T\n" );
|
fwprintf( stderr, L"Allocated special cell T\n" );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -71,7 +71,7 @@ struct cons_pointer read_continuation( FILE * input, wint_t initial ) {
|
||||||
} else if ( iswprint( c ) ) {
|
} else if ( iswprint( c ) ) {
|
||||||
result = read_symbol( input, c );
|
result = read_symbol( input, c );
|
||||||
} else {
|
} else {
|
||||||
fprintf( stderr, "Unrecognised start of input character %c\n", c );
|
fwprintf( stderr, L"Unrecognised start of input character %c\n", c );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ struct cons_pointer read_number( FILE * input, wint_t initial ) {
|
||||||
bool seen_period = false;
|
bool seen_period = false;
|
||||||
wint_t c;
|
wint_t c;
|
||||||
|
|
||||||
fprintf( stderr, "read_number starting '%c' (%d)\n", initial, initial );
|
fwprintf( stderr, L"read_number starting '%c' (%d)\n", initial, initial );
|
||||||
|
|
||||||
for ( c = initial; iswdigit( c ) || c == btowc( '.' );
|
for ( c = initial; iswdigit( c ) || c == btowc( '.' );
|
||||||
c = fgetwc( input ) ) {
|
c = fgetwc( input ) ) {
|
||||||
|
@ -137,7 +137,7 @@ struct cons_pointer read_list( FILE * input, wint_t initial ) {
|
||||||
struct cons_pointer car = read_continuation( input, initial );
|
struct cons_pointer car = read_continuation( input, initial );
|
||||||
result = make_cons( car, read_list( input, fgetwc( input ) ) );
|
result = make_cons( car, read_list( input, fgetwc( input ) ) );
|
||||||
} else {
|
} else {
|
||||||
fprintf( stderr, "End of list detected\n" );
|
fwprintf( stderr, L"End of list detected\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in a new issue