Tidied up 'wide' printing.

This commit is contained in:
Simon Brooke 2017-10-15 14:31:57 +01:00
parent ba4a31c25a
commit 0685442e1a
3 changed files with 6 additions and 6 deletions

View file

@ -26,7 +26,7 @@ test:
.PHONY: clean
clean:
$(RM) $(TARGET) $(OBJS) $(DEPS)
$(RM) $(TARGET) $(OBJS) $(DEPS) $(SRC_DIRS)/*~
repl:
$(TARGET) -p 2> psse.log

View file

@ -63,7 +63,7 @@ void make_cons_page( ) {
cell->count = MAXREFERENCE;
cell->payload.free.car = 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 ) {
/*
* initialise cell as T
@ -74,7 +74,7 @@ void make_cons_page( ) {
0, 1};
cell->payload.free.cdr = ( struct cons_pointer ) {
0, 1};
fprintf( stderr, "Allocated special cell T\n" );
fwprintf( stderr, L"Allocated special cell T\n" );
}
} else {
/*

View file

@ -71,7 +71,7 @@ struct cons_pointer read_continuation( FILE * input, wint_t initial ) {
} else if ( iswprint( c ) ) {
result = read_symbol( input, c );
} 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;
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( '.' );
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 );
result = make_cons( car, read_list( input, fgetwc( input ) ) );
} else {
fprintf( stderr, "End of list detected\n" );
fwprintf( stderr, L"End of list detected\n" );
}
return result;