]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/io.hpp
io.streams.256color: faster by caching styles
[factor.git] / vm / io.hpp
old mode 100755 (executable)
new mode 100644 (file)
index d94d640..60cae14
--- a/vm/io.hpp
+++ b/vm/io.hpp
@@ -1,24 +1,12 @@
-namespace factor
-{
+namespace factor {
 
-void init_c_io();
-void io_error();
+// Safe IO functions that does not throw Factor errors.
+int raw_fclose(FILE* stream);
+size_t raw_fread(void* ptr, size_t size, size_t nitems, FILE* stream);
 
-PRIMITIVE(fopen);
-PRIMITIVE(fgetc);
-PRIMITIVE(fread);
-PRIMITIVE(fputc);
-PRIMITIVE(fwrite);
-PRIMITIVE(fflush);
-PRIMITIVE(fseek);
-PRIMITIVE(fclose);
-
-/* Platform specific primitives */
-PRIMITIVE(open_file);
-PRIMITIVE(existsp);
-PRIMITIVE(read_dir);
+// Platform specific primitives
 
 VM_C_API int err_no();
-VM_C_API void clear_err_no();
+VM_C_API void set_err_no(int err);
 
 }