X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=io.h;h=2e048ff4a89f730da9c8adc5826ec12ac1ff53b9;hb=de010509fa0e57ba955da6512c714fbff8606af3;hp=ed470d6953e04eafcaf4eaa002411677654fd3d3;hpb=64f72f31685ea1dff12b19b22cfaf7a53ccc079f;p=polyglot.git diff --git a/io.h b/io.h index ed470d6..2e048ff 100644 --- a/io.h +++ b/io.h @@ -8,13 +8,13 @@ #include "util.h" -// constants +// defined -const int BufferSize = 16384; +#define BufferSize 16384 // types -struct io_t { +typedef struct { int in_fd; int out_fd; @@ -28,7 +28,7 @@ struct io_t { char in_buffer[BufferSize]; char out_buffer[BufferSize]; -}; +} io_t; // functions @@ -39,6 +39,8 @@ extern void io_close (io_t * io); extern void io_get_update (io_t * io); +extern bool io_peek (io_t * io); + extern bool io_line_ready (const io_t * io); extern bool io_get_line (io_t * io, char string[], int size);