nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Java FFI: enable inserting additionnal Java files to a project
[nit.git]
/
c_src
/
stream_nit.c
diff --git
a/c_src/stream_nit.c
b/c_src/stream_nit.c
index
c48e2ce
..
14bfece
100644
(file)
--- a/
c_src/stream_nit.c
+++ b/
c_src/stream_nit.c
@@
-11,20
+11,15
@@
* another product.
*/
* another product.
*/
-#include <unistd.h>
+#include "stream_nit.h"
int stream_FDStream_FDStream_native_read_char_1(void *s, int fd) {
int result;
char buf;
ssize_t r = read(fd, &buf, 1);
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;
result = -1;
- else
+ else
result = buf;
return result;
}
result = buf;
return result;
}
-
-void stream_FDStream_FDStream_write_char_1(void *s, int fd, int c) {
- write(fd, &c, 1);
-}
-