file.h is now stdio.h-free
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef EOF
|
||||
# define EOF (-1)
|
||||
#endif
|
||||
|
||||
+6
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user