mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-12 23:37:38 +02:00
Posted requirements for char-ready
This commit is contained in:
parent
1146e10f44
commit
4d03c00f1c
1 changed files with 13 additions and 1 deletions
14
runtime.c
14
runtime.c
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue