Posted requirements for char-ready

This commit is contained in:
Justin Ethier 2017-09-07 17:54:21 -04:00
parent 1146e10f44
commit 4d03c00f1c

View file

@ -6151,9 +6151,21 @@ object Cyc_io_peek_char(void *data, object cont, object port)
return Cyc_EOF;
}
// TODO: full requirements are:
//
// Returns #t if a character is ready on the textual input
// port and returns #f otherwise. If char-ready returns #t
// then the next read-char operation on the given port is
// guaranteed not to hang. If the port is at end of file then
// char-ready? returns #t.
//
// This is a bit of a challenge because the internal buffers
// cannot differentiate between being empty and being at EOF.
//
//object Cyc_io_char_ready(void *data, object cont, object port)
//{
// // TODO: inspect mem_buf and associated fields to see if data is ready
// port_type *p = (port_type *)port;
// Cyc_check_port(data, port);
//}
object Cyc_io_read_char(void *data, object cont, object port)