]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/io.cpp
webapps.wiki: adding search bar
[factor.git] / vm / io.cpp
index 4132e28b0b3327180da97efe6c3ce6d49494bba0..e299e9888607e392d5da89f5dd55a3c3134c48a3 100644 (file)
--- a/vm/io.cpp
+++ b/vm/io.cpp
@@ -109,7 +109,7 @@ size_t factor_vm::safe_fwrite(void* ptr, size_t size, size_t nitems,
   return items_written;
 }
 
-int factor_vm::safe_ftell(FILE* stream) {
+off_t factor_vm::safe_ftell(FILE* stream) {
   off_t offset;
   for (;;) {
     if ((offset = FTELL(stream)) == -1)
@@ -132,7 +132,7 @@ void factor_vm::safe_fseek(FILE* stream, off_t offset, int whence) {
       whence = SEEK_END;
       break;
     default:
-      critical_error("Bad value for whence", whence);
+      general_error(ERROR_IO, tag_fixnum(EINVAL), false_object);
   }
 
   for (;;) {