X-Git-Url: http://winboard.nl/cgi-bin?p=polyglot.git;a=blobdiff_plain;f=io.h;h=3ef43d02b1913bc9610df4b0c5103d3fd1feaf8a;hp=2e048ff4a89f730da9c8adc5826ec12ac1ff53b9;hb=HEAD;hpb=de010509fa0e57ba955da6512c714fbff8606af3 diff --git a/io.h b/io.h index 2e048ff..3ef43d0 100644 --- a/io.h +++ b/io.h @@ -1,53 +1,53 @@ - -// io.h - -#ifndef IO_H -#define IO_H - -// includes - -#include "util.h" - -// defined - -#define BufferSize 16384 - -// types - -typedef struct { - - int in_fd; - int out_fd; - - const char * name; - - bool in_eof; - - sint32 in_size; - sint32 out_size; - - char in_buffer[BufferSize]; - char out_buffer[BufferSize]; -} io_t; - -// functions - -extern bool io_is_ok (const io_t * io); - -extern void io_init (io_t * io); -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); - -extern void io_send (io_t * io, const char format[], ...); -extern void io_send_queue (io_t * io, const char format[], ...); - -#endif // !defined IO_H - -// end of io.h - + +// io.h + +#ifndef IO_H +#define IO_H + +// includes + +#include "util.h" + +// defined + +#define BufferSize 16384 + +// types + +typedef struct { + + int in_fd; + int out_fd; + + const char * name; + + bool in_eof; + + sint32 in_size; + sint32 out_size; + + char in_buffer[BufferSize]; + char out_buffer[BufferSize]; +} io_t; + +// functions + +extern bool io_is_ok (const io_t * io); + +extern void io_init (io_t * io); +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); + +extern void io_send (io_t * io, const char format[], ...); +extern void io_send_queue (io_t * io, const char format[], ...); + +#endif // !defined IO_H + +// end of io.h +