Commit 878b4a92 authored by Iván Matellanes's avatar Iván Matellanes Committed by Alexandre Julliard

msvcrt: Added _fgetc_nolock implementation.

parent f896cd3d
......@@ -800,6 +800,7 @@
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
@ cdecl _fdopen(long str) MSVCRT__fdopen
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
@ cdecl _fgetc_nolock(ptr) MSVCRT__fgetc_nolock
@ cdecl _fgetchar() MSVCRT__fgetchar
@ stub _fgetwc_nolock
@ cdecl _fgetwchar() MSVCRT__fgetwchar
......
......@@ -1148,6 +1148,7 @@
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
@ cdecl _fdopen(long str) MSVCRT__fdopen
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
@ cdecl _fgetc_nolock(ptr) MSVCRT__fgetc_nolock
@ cdecl _fgetchar() MSVCRT__fgetchar
@ stub _fgetwc_nolock
@ cdecl _fgetwchar() MSVCRT__fgetwchar
......
......@@ -467,6 +467,7 @@
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
@ cdecl _fdopen(long str) MSVCRT__fdopen
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
@ cdecl _fgetc_nolock(ptr) MSVCRT__fgetc_nolock
@ cdecl _fgetchar() MSVCRT__fgetchar
@ stub _fgetwc_nolock
@ cdecl _fgetwchar() MSVCRT__fgetwchar
......
......@@ -449,6 +449,7 @@
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
@ cdecl _fdopen(long str) MSVCRT__fdopen
@ cdecl _fflush_nolock(ptr) MSVCRT__fflush_nolock
@ cdecl _fgetc_nolock(ptr) MSVCRT__fgetc_nolock
@ cdecl _fgetchar() MSVCRT__fgetchar
@ stub _fgetwc_nolock
@ cdecl _fgetwchar() MSVCRT__fgetwchar
......
......@@ -3503,10 +3503,23 @@ int CDECL MSVCRT__filbuf(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 int j;
MSVCRT__lock_file(file);
if (file->_cnt>0) {
file->_cnt--;
i = (unsigned char *)file->_ptr++;
......@@ -3514,7 +3527,6 @@ int CDECL MSVCRT_fgetc(MSVCRT_FILE* file)
} else
j = MSVCRT__filbuf(file);
MSVCRT__unlock_file(file);
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__unlock_file(MSVCRT_FILE*);
int __cdecl MSVCRT_fgetc(MSVCRT_FILE*);
int __cdecl MSVCRT__fgetc_nolock(MSVCRT_FILE*);
int __cdecl MSVCRT_ungetc(int,MSVCRT_FILE*);
MSVCRT_wint_t __cdecl MSVCRT_fgetwc(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*);
int __cdecl _fclose_nolock(FILE*);
int __cdecl _fflush_nolock(FILE*);
int __cdecl _fgetc_nolock(FILE*);
int __cdecl _fseek_nolock(FILE*,__msvcrt_long,int);
int __cdecl _fseeki64_nolock(FILE*,__int64,int);
__msvcrt_long __cdecl _ftell_nolock(FILE*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment