# error This library requires C++
#endif
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include <string>
#include <sys/types.h> // for open(), read(), write(), close()
#include <sys/stat.h> // for open(), read(), write(), close()
#include <fcntl.h> // for open(), read(), write(), close()
-#include <unistd.h> // for open(), read(), write(), close()
+#if !defined( _MSC_VER )
+# include <unistd.h> // for open(), read(), write(), close()
+#endif
#include "iochannel.hxx"
#include "protocol.hxx"
// open the file based on specified direction
bool open( FGProtocol::fgProtocolDir dir );
- // read data from file
- bool read( char *buf, int *length );
+ // read a block of data of specified size
+ int read( char *buf, int length );
+
+ // read a line of data, length is max size of input buffer
+ int readline( char *buf, int length );
// write data to a file
- bool write( char *buf, int length );
+ int write( char *buf, int length );
+
+ // write null terminated string to a file
+ int writestring( char *str );
// close file
bool close();