diff --git a/library.scm b/library.scm
index 76eb046..6fe4735 100644
a
|
b
|
fast_read_string_from_file(C_word dest, C_word port, C_word len, C_word pos) |
106 | 106 | char * buf = ((char *)C_data_pointer (dest) + C_unfix (pos)); |
107 | 107 | C_FILEPTR fp = C_port_file (port); |
108 | 108 | |
| 109 | if(feof(fp)) return C_SCHEME_END_OF_FILE; |
| 110 | |
109 | 111 | size_t m = fread (buf, sizeof (char), n, fp); |
110 | 112 | |
111 | 113 | if(m == EOF && errno == EINTR) { |
… |
… |
fast_read_string_from_file(C_word dest, C_word port, C_word len, C_word pos) |
114 | 116 | } |
115 | 117 | else if (m < n) { |
116 | 118 | if (feof (fp)) { |
117 | | clearerr (fp); |
118 | 119 | if (0 == m) |
119 | 120 | return C_SCHEME_END_OF_FILE; |
120 | 121 | } else if (ferror (fp)) { |