Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6f24dd96
Commit
6f24dd96
authored
Nov 04, 2014
by
Iván Matellanes
Committed by
Alexandre Julliard
Nov 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Added _ungetc_nolock implementation.
parent
b536ff62
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
10 deletions
+24
-10
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+1
-1
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
file.c
dlls/msvcrt/file.c
+17
-5
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
stdio.h
include/msvcrt/stdio.h
+1
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
6f24dd96
...
...
@@ -1405,7 +1405,7 @@
@ cdecl _ultow_s(long ptr long long) MSVCRT__ultow_s
@ cdecl _umask(long) MSVCRT__umask
@ stub _umask_s
@
stub
_ungetc_nolock
@
cdecl _ungetc_nolock(long ptr) MSVCRT_
_ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@ stub _ungetwc_nolock
...
...
dlls/msvcr110/msvcr110.spec
View file @
6f24dd96
...
...
@@ -1763,7 +1763,7 @@
@ cdecl _ultow_s(long ptr long long) MSVCRT__ultow_s
@ cdecl _umask(long) MSVCRT__umask
@ stub _umask_s
@
stub
_ungetc_nolock
@
cdecl _ungetc_nolock(long ptr) MSVCRT_
_ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@ stub _ungetwc_nolock
...
...
dlls/msvcr120/msvcr120.spec
View file @
6f24dd96
...
...
@@ -1777,7 +1777,7 @@
@ cdecl _ultow_s(long ptr long long) MSVCRT__ultow_s
@ cdecl _umask(long) MSVCRT__umask
@ stub _umask_s
@
stub
_ungetc_nolock
@
cdecl _ungetc_nolock(long ptr) MSVCRT_
_ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@ stub _ungetwc_nolock
...
...
dlls/msvcr80/msvcr80.spec
View file @
6f24dd96
...
...
@@ -1084,7 +1084,7 @@
@ cdecl _ultow_s(long ptr long long) MSVCRT__ultow_s
@ cdecl _umask(long) MSVCRT__umask
@ stub _umask_s
@
stub
_ungetc_nolock
@
cdecl _ungetc_nolock(long ptr) MSVCRT_
_ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@ stub _ungetwc_nolock
...
...
dlls/msvcr90/msvcr90.spec
View file @
6f24dd96
...
...
@@ -1060,7 +1060,7 @@
@ cdecl _ultow_s(long ptr long long) MSVCRT__ultow_s
@ cdecl _umask(long) MSVCRT__umask
@ stub _umask_s
@
stub
_ungetc_nolock
@
cdecl _ungetc_nolock(long ptr) MSVCRT_
_ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@ stub _ungetwc_nolock
...
...
dlls/msvcrt/file.c
View file @
6f24dd96
...
...
@@ -5002,13 +5002,28 @@ int CDECL MSVCRT_printf_s(const char *format, ...)
*/
int
CDECL
MSVCRT_ungetc
(
int
c
,
MSVCRT_FILE
*
file
)
{
int
ret
;
if
(
!
MSVCRT_CHECK_PMT
(
file
!=
NULL
))
return
MSVCRT_EOF
;
MSVCRT__lock_file
(
file
);
ret
=
MSVCRT__ungetc_nolock
(
c
,
file
);
MSVCRT__unlock_file
(
file
);
return
ret
;
}
/*********************************************************************
* _ungetc_nolock (MSVCRT.@)
*/
int
CDECL
MSVCRT__ungetc_nolock
(
int
c
,
MSVCRT_FILE
*
file
)
{
if
(
!
MSVCRT_CHECK_PMT
(
file
!=
NULL
))
return
MSVCRT_EOF
;
if
(
c
==
MSVCRT_EOF
||
!
(
file
->
_flag
&
MSVCRT__IOREAD
||
(
file
->
_flag
&
MSVCRT__IORW
&&
!
(
file
->
_flag
&
MSVCRT__IOWRT
))))
return
MSVCRT_EOF
;
MSVCRT__lock_file
(
file
);
if
((
!
(
file
->
_flag
&
(
MSVCRT__IONBF
|
MSVCRT__IOMYBUF
|
MSVCRT__USERBUF
))
&&
msvcrt_alloc_buffer
(
file
))
||
(
!
file
->
_cnt
&&
file
->
_ptr
==
file
->
_base
))
...
...
@@ -5019,20 +5034,17 @@ int CDECL MSVCRT_ungetc(int c, MSVCRT_FILE * file)
if
(
file
->
_flag
&
MSVCRT__IOSTRG
)
{
if
(
*
file
->
_ptr
!=
c
)
{
file
->
_ptr
++
;
MSVCRT__unlock_file
(
file
);
return
MSVCRT_EOF
;
}
}
else
{
*
file
->
_ptr
=
c
;
}
file
->
_cnt
++
;
MSVCRT_clearerr
(
file
);
file
->
_flag
&=
~
(
MSVCRT__IOERR
|
MSVCRT__IOEOF
);
file
->
_flag
|=
MSVCRT__IOREAD
;
MSVCRT__unlock_file
(
file
);
return
c
;
}
MSVCRT__unlock_file
(
file
);
return
MSVCRT_EOF
;
}
...
...
dlls/msvcrt/msvcrt.h
View file @
6f24dd96
...
...
@@ -919,6 +919,7 @@ int __cdecl MSVCRT_fgetc(MSVCRT_FILE*);
int
__cdecl
MSVCRT__fgetc_nolock
(
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT__fputc_nolock
(
int
,
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT_ungetc
(
int
,
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT__ungetc_nolock
(
int
,
MSVCRT_FILE
*
);
MSVCRT_wint_t
__cdecl
MSVCRT_fgetwc
(
MSVCRT_FILE
*
);
MSVCRT_wint_t
__cdecl
MSVCRT__fgetwc_nolock
(
MSVCRT_FILE
*
);
MSVCRT_wint_t
__cdecl
MSVCRT__fputwc_nolock
(
MSVCRT_wint_t
,
MSVCRT_FILE
*
);
...
...
include/msvcrt/stdio.h
View file @
6f24dd96
...
...
@@ -137,6 +137,7 @@ int __cdecl _fseek_nolock(FILE*,__msvcrt_long,int);
int
__cdecl
_fseeki64_nolock
(
FILE
*
,
__int64
,
int
);
__msvcrt_long
__cdecl
_ftell_nolock
(
FILE
*
);
__int64
__cdecl
_ftelli64_nolock
(
FILE
*
);
int
__cdecl
_ungetc_nolock
(
int
,
FILE
*
);
void
__cdecl
clearerr
(
FILE
*
);
int
__cdecl
fclose
(
FILE
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment