adds 'nativeavailable()' and 'read(buf,offset,len)' methods into FileInputStream...
[IRC.git] / Robust / src / Runtime / file.c
index 46740b5cdc583afd0d43cc7b119cb771a40d7548..c8997a10601eff191ac8571c45fde704a8ad2b3b 100644 (file)
@@ -144,3 +144,17 @@ long long CALL01(___File______nativeLength_____AR_B, struct ArrayObject * ___pat
 #endif
 }
 #endif
+
+#ifdef D___FileInputStream______nativeAvailable____I
+int CALL11(___FileInputStream______nativeAvailable____I, int fd, int fd) {
+#ifdef MULTICORE
+  return 0;
+#else
+  int avail;
+  int cur=lseek(fd, 0, SEEK_CUR);
+  int fsize = lseek(fd, 0, SEEK_END);
+  avail=fsize-cur;
+  return avail;
+#endif
+}
+#endif