mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-18 21:29:18 +02:00
WIP
This commit is contained in:
parent
8aec6c4c83
commit
92bc2364fe
1 changed files with 13 additions and 0 deletions
13
runtime.c
13
runtime.c
|
@ -7942,6 +7942,19 @@ object Cyc_io_read_line(void *data, object cont, object port)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
char *fgets_port(char *buf, int size, port_type *p)
|
||||
{
|
||||
// TODO: keep reading until fgets conditions are true
|
||||
// also ensure we read a full code point for the last char
|
||||
do {
|
||||
_read_next_char(data, NULL, p);
|
||||
c = p->mem_buf[p->buf_idx++];
|
||||
if (c == EOF) break;
|
||||
} while(Cyc_utf8_decode(&state, &codepoint, (uint8_t)c));
|
||||
}
|
||||
*/
|
||||
|
||||
// WIP - a version of read_line that uses our internal port buffer.
|
||||
// This will be compatible with other I/O function such as read-char
|
||||
object Cyc_io_read_line_slow(void *data, object cont, object port)
|
||||
|
|
Loading…
Add table
Reference in a new issue