file.h is now stdio.h-free

This commit is contained in:
Yuichi Nishiwaki
2015-06-19 05:14:18 +09:00
parent a0d6c5800c
commit 20cb77bbbe
5 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ int x_flushbuf(pic_state *pic, int x, xFILE *fp) {
}
fp->ptr = fp->base;
fp->cnt = BUFSIZ - 1;
fp->cnt = XBUFSIZ - 1;
}
if (num_written == bufsize) {
-2
View File
@@ -5,8 +5,6 @@
extern "C" {
#endif
#include <stdio.h>
#ifndef EOF
# define EOF (-1)
#endif
+6 -1
View File
@@ -4,6 +4,8 @@
#include "picrin.h"
#include <stdio.h>
pic_value
pic_eof_object()
{
@@ -69,7 +71,10 @@ file_seek(pic_state PIC_UNUSED(*pic), void *cookie, long pos, int whence) {
whence = SEEK_END;
break;
}
return fseek(cookie, pos, whence);
if (fseek(cookie, pos, whence) == 0) {
return ftell(cookie);
}
return -1;
}
static int