4ever4ever
T.E.T.Я.I.S
- 15/5/04
- 517
- 0
Hôm bữa mình đang chơi HKGH thì nó xuất hiện cái lỗi này , mình phải connect lại game cứ 10ph là lại xuất hiện tiếp ko thể chơi được lâu dài .
Mình lên google tìm kiếm thì kiếm đc cái file fseek.c này
mình thì lại chẳng biết sử dụng nó thế nào , chỉ biết là save as nó = cvs thôi , rồi làm gì tiếp theo thì mình thua , có bạn nào giúp giùm mình nhé .Đây là link trực tiếp của file fseek.c http://www.koders.com/c/fid4C64801B64C3BCDFF5E74DCF1003FF8E6CDC8AEA.aspx
Mình lên google tìm kiếm thì kiếm đc cái file fseek.c này
Mã:
/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <crtdll/stdio.h>
#include <crtdll/errno.h>
#include <crtdll/internal/file.h>
#include <crtdll/fcntl.h>
#include <crtdll/io.h>
int fseek(FILE *f, long offset, int ptrname)
{
long p = -1; /* can't happen? */
if ( f == NULL ) {
__set_errno (EINVAL);
return -1;
}
f->_flag &= ~_IOEOF;
if (!OPEN4WRITING(f))
{
if (f->_base && !(f->_flag & _IONBF))
{
p = ftell(f);
if (ptrname == SEEK_CUR)
{
offset += p;
ptrname = SEEK_SET;
}
/* check if the target position is in the buffer and
optimize seek by moving inside the buffer */
if (ptrname == SEEK_SET && (f->_flag & (_IOUNGETC|_IOREAD|_IOWRT )) == 0
&& p-offset <= f->_ptr-f->_base && offset-p <= f->_cnt)
{
f->_ptr+=offset-p;
f->_cnt+=p-offset;
return 0;
}
}
p = lseek(fileno(f), offset, ptrname);
f->_cnt = 0;
f->_ptr = f->_base;
f->_flag &= ~_IOUNGETC;
}
else
{
p = fflush(f);
return lseek(fileno(f), offset, ptrname) == -1 || p == EOF ?
-1 : 0;
}
return p==-1 ? -1 : 0;
}
mình thì lại chẳng biết sử dụng nó thế nào , chỉ biết là save as nó = cvs thôi , rồi làm gì tiếp theo thì mình thua , có bạn nào giúp giùm mình nhé .Đây là link trực tiếp của file fseek.c http://www.koders.com/c/fid4C64801B64C3BCDFF5E74DCF1003FF8E6CDC8AEA.aspx
