]> gitweb.factorcode.org Git - factor.git/blob - native/fd.h
03ecc8056227712af3098687745f137c2f4ab2d6
[factor.git] / native / fd.h
1 #define LINE_SIZE 80
2 #define BUF_SIZE (32 * 1024)
3
4 bool read_step(PORT* port);
5
6 /* read_line_step() return values */
7 typedef enum {
8         READLINE_WAIT, /* means we have to wait for more I/O */
9         READLINE_AGAIN,
10         READLINE_EOL,
11         READLINE_EOF
12 } READLINE_STAT;
13
14 READLINE_STAT read_line_step(PORT* port);
15 bool write_step(PORT* port);
16 void flush_buffer(PORT* port);
17 void init_io(void);
18 void primitive_read_line_fd_8(void);
19 void write_fd_char_8(PORT* port, FIXNUM ch);
20 void write_fd_string_8(PORT* port, STRING* str);
21 void primitive_write_fd_8(void);
22 void primitive_flush_fd(void);
23 void primitive_close_fd(void);
24 void set_nonblocking(int fd);