msvcrt: Added _fgetc_nolock implementation.
This commit is contained in:
parent
f896cd3dc9
commit
878b4a9280
|
@ -800,6 +800,7 @@
|
||||||
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
||||||
@ cdecl _fdopen(long str) MSVCRT__fdopen
|
@ cdecl _fdopen(long str) MSVCRT__fdopen
|
||||||
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
|
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
|
||||||
|
@ cdecl _fgetc_nolock(ptr) MSVCRT__fgetc_nolock
|
||||||
@ cdecl _fgetchar() MSVCRT__fgetchar
|
@ cdecl _fgetchar() MSVCRT__fgetchar
|
||||||
@ stub _fgetwc_nolock
|
@ stub _fgetwc_nolock
|
||||||
@ cdecl _fgetwchar() MSVCRT__fgetwchar
|
@ cdecl _fgetwchar() MSVCRT__fgetwchar
|
||||||
|
|
|
@ -1148,6 +1148,7 @@
|
||||||
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
||||||
@ cdecl _fdopen(long str) MSVCRT__fdopen
|
@ cdecl _fdopen(long str) MSVCRT__fdopen
|
||||||
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
|
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
|
||||||
|
@ cdecl _fgetc_nolock(ptr) MSVCRT__fgetc_nolock
|
||||||
@ cdecl _fgetchar() MSVCRT__fgetchar
|
@ cdecl _fgetchar() MSVCRT__fgetchar
|
||||||
@ stub _fgetwc_nolock
|
@ stub _fgetwc_nolock
|
||||||
@ cdecl _fgetwchar() MSVCRT__fgetwchar
|
@ cdecl _fgetwchar() MSVCRT__fgetwchar
|
||||||
|
|
|
@ -467,6 +467,7 @@
|
||||||
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
||||||
@ cdecl _fdopen(long str) MSVCRT__fdopen
|
@ cdecl _fdopen(long str) MSVCRT__fdopen
|
||||||
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
|
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
|
||||||
|
@ cdecl _fgetc_nolock(ptr) MSVCRT__fgetc_nolock
|
||||||
@ cdecl _fgetchar() MSVCRT__fgetchar
|
@ cdecl _fgetchar() MSVCRT__fgetchar
|
||||||
@ stub _fgetwc_nolock
|
@ stub _fgetwc_nolock
|
||||||
@ cdecl _fgetwchar() MSVCRT__fgetwchar
|
@ cdecl _fgetwchar() MSVCRT__fgetwchar
|
||||||
|
|
|
@ -449,6 +449,7 @@
|
||||||
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
||||||
@ cdecl _fdopen(long str) MSVCRT__fdopen
|
@ cdecl _fdopen(long str) MSVCRT__fdopen
|
||||||
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
|
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
|
||||||
|
@ cdecl _fgetc_nolock(ptr) MSVCRT__fgetc_nolock
|
||||||
@ cdecl _fgetchar() MSVCRT__fgetchar
|
@ cdecl _fgetchar() MSVCRT__fgetchar
|
||||||
@ stub _fgetwc_nolock
|
@ stub _fgetwc_nolock
|
||||||
@ cdecl _fgetwchar() MSVCRT__fgetwchar
|
@ cdecl _fgetwchar() MSVCRT__fgetwchar
|
||||||
|
|
|
@ -3502,11 +3502,24 @@ int CDECL MSVCRT__filbuf(MSVCRT_FILE* file)
|
||||||
* fgetc (MSVCRT.@)
|
* fgetc (MSVCRT.@)
|
||||||
*/
|
*/
|
||||||
int CDECL MSVCRT_fgetc(MSVCRT_FILE* file)
|
int CDECL MSVCRT_fgetc(MSVCRT_FILE* file)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
MSVCRT__lock_file(file);
|
||||||
|
ret = MSVCRT__fgetc_nolock(file);
|
||||||
|
MSVCRT__unlock_file(file);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
* _fgetc_nolock (MSVCRT.@)
|
||||||
|
*/
|
||||||
|
int CDECL MSVCRT__fgetc_nolock(MSVCRT_FILE* file)
|
||||||
{
|
{
|
||||||
unsigned char *i;
|
unsigned char *i;
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
|
|
||||||
MSVCRT__lock_file(file);
|
|
||||||
if (file->_cnt>0) {
|
if (file->_cnt>0) {
|
||||||
file->_cnt--;
|
file->_cnt--;
|
||||||
i = (unsigned char *)file->_ptr++;
|
i = (unsigned char *)file->_ptr++;
|
||||||
|
@ -3514,7 +3527,6 @@ int CDECL MSVCRT_fgetc(MSVCRT_FILE* file)
|
||||||
} else
|
} else
|
||||||
j = MSVCRT__filbuf(file);
|
j = MSVCRT__filbuf(file);
|
||||||
|
|
||||||
MSVCRT__unlock_file(file);
|
|
||||||
return j;
|
return j;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -916,6 +916,7 @@ int __cdecl MSVCRT__isleadbyte_l(int, MSVCRT__locale_t);
|
||||||
void __cdecl MSVCRT__lock_file(MSVCRT_FILE*);
|
void __cdecl MSVCRT__lock_file(MSVCRT_FILE*);
|
||||||
void __cdecl MSVCRT__unlock_file(MSVCRT_FILE*);
|
void __cdecl MSVCRT__unlock_file(MSVCRT_FILE*);
|
||||||
int __cdecl MSVCRT_fgetc(MSVCRT_FILE*);
|
int __cdecl MSVCRT_fgetc(MSVCRT_FILE*);
|
||||||
|
int __cdecl MSVCRT__fgetc_nolock(MSVCRT_FILE*);
|
||||||
int __cdecl MSVCRT_ungetc(int,MSVCRT_FILE*);
|
int __cdecl MSVCRT_ungetc(int,MSVCRT_FILE*);
|
||||||
MSVCRT_wint_t __cdecl MSVCRT_fgetwc(MSVCRT_FILE*);
|
MSVCRT_wint_t __cdecl MSVCRT_fgetwc(MSVCRT_FILE*);
|
||||||
MSVCRT_wint_t __cdecl MSVCRT_ungetwc(MSVCRT_wint_t,MSVCRT_FILE*);
|
MSVCRT_wint_t __cdecl MSVCRT_ungetwc(MSVCRT_wint_t,MSVCRT_FILE*);
|
||||||
|
|
|
@ -131,6 +131,7 @@ size_t __cdecl _fread_nolock(void*,size_t,size_t,FILE*);
|
||||||
size_t __cdecl _fwrite_nolock(const void*,size_t,size_t,FILE*);
|
size_t __cdecl _fwrite_nolock(const void*,size_t,size_t,FILE*);
|
||||||
int __cdecl _fclose_nolock(FILE*);
|
int __cdecl _fclose_nolock(FILE*);
|
||||||
int __cdecl _fflush_nolock(FILE*);
|
int __cdecl _fflush_nolock(FILE*);
|
||||||
|
int __cdecl _fgetc_nolock(FILE*);
|
||||||
int __cdecl _fseek_nolock(FILE*,__msvcrt_long,int);
|
int __cdecl _fseek_nolock(FILE*,__msvcrt_long,int);
|
||||||
int __cdecl _fseeki64_nolock(FILE*,__int64,int);
|
int __cdecl _fseeki64_nolock(FILE*,__int64,int);
|
||||||
__msvcrt_long __cdecl _ftell_nolock(FILE*);
|
__msvcrt_long __cdecl _ftell_nolock(FILE*);
|
||||||
|
|
Loading…
Reference in New Issue