picrin-scheme / picrin

lightweight scheme interpreter
MIT License
414 stars 35 forks source link

Address some issues with flushbuf, display, and build. #352

Closed dcurrie closed 7 months ago

dcurrie commented 7 years ago

Addressing issue #351 a bit.

The definition of display in error.scm always uses current-error-port, which was causing the build to fail making init_lib.c and others. Changed to use current-output-port in the non-error case.

The function flushbuf would always return EOF when called from pic_fwrite causing some characters to be dropped. Fixed by returning 0 when EOF passed in and there are no errors.

Other cleanup to eliminate build errors is included.