tests: fix base_inline
[nit.git] / c_src / stream_nit.c
index e7b1174..14bfece 100644 (file)
@@ -4,7 +4,7 @@
  *
  * This file is free software, which comes along with NIT.  This software is
  * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without  even  the implied warranty of  MERCHANTABILITY or  FITNESS FOR A
+ * without  even  the implied warranty of  MERCHANTABILITY or  FITNESS FOR A 
  * PARTICULAR PURPOSE.  You can modify it is you want,  provided this header
  * is kept unaltered, and a notification of the changes is added.
  * You  are  allowed  to  redistribute it and sell it, alone or is a part of
 
 #include "stream_nit.h"
 
-int stream_FDStream_FDStream_native_read_char_1(FDStream s, int fd) {
+int stream_FDStream_FDStream_native_read_char_1(void *s, int fd) {
        int result;
        char buf;
        ssize_t r = read(fd, &buf, 1);
-       if (r == 0) 
+       if (r == 0)
                result = -1;
-       else 
+       else
                result = buf;
        return result;
 }
-
-void stream_FDStream_FDStream_write_char_1(FDStream s, int fd, int c) {
-       write(fd, &c, 1);
-}
-