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
4f807d9a
Commit
4f807d9a
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 _ungetwc_nolock implementation.
parent
6f24dd96
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
27 additions
and
17 deletions
+27
-17
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
+20
-12
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 @
4f807d9a
...
...
@@ -1408,7 +1408,7 @@
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@
stub
_ungetwc_nolock
@
cdecl _ungetwc_nolock(long ptr) MSVCRT_
_ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
@ cdecl _unlink(str) MSVCRT__unlink
...
...
dlls/msvcr110/msvcr110.spec
View file @
4f807d9a
...
...
@@ -1766,7 +1766,7 @@
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@
stub
_ungetwc_nolock
@
cdecl _ungetwc_nolock(long ptr) MSVCRT_
_ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
@ cdecl _unlink(str) MSVCRT__unlink
...
...
dlls/msvcr120/msvcr120.spec
View file @
4f807d9a
...
...
@@ -1780,7 +1780,7 @@
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@
stub
_ungetwc_nolock
@
cdecl _ungetwc_nolock(long ptr) MSVCRT_
_ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
@ cdecl _unlink(str) MSVCRT__unlink
...
...
dlls/msvcr80/msvcr80.spec
View file @
4f807d9a
...
...
@@ -1087,7 +1087,7 @@
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@
stub
_ungetwc_nolock
@
cdecl _ungetwc_nolock(long ptr) MSVCRT_
_ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
@ cdecl _unlink(str) MSVCRT__unlink
...
...
dlls/msvcr90/msvcr90.spec
View file @
4f807d9a
...
...
@@ -1063,7 +1063,7 @@
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@
stub
_ungetwc_nolock
@
cdecl _ungetwc_nolock(long ptr) MSVCRT_
_ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
@ cdecl _unlink(str) MSVCRT__unlink
...
...
dlls/msvcrt/file.c
View file @
4f807d9a
...
...
@@ -5053,43 +5053,51 @@ int CDECL MSVCRT__ungetc_nolock(int c, MSVCRT_FILE * file)
*/
MSVCRT_wint_t
CDECL
MSVCRT_ungetwc
(
MSVCRT_wint_t
wc
,
MSVCRT_FILE
*
file
)
{
MSVCRT_wint_t
ret
;
if
(
!
MSVCRT_CHECK_PMT
(
file
!=
NULL
))
return
MSVCRT_WEOF
;
MSVCRT__lock_file
(
file
);
ret
=
MSVCRT__ungetwc_nolock
(
wc
,
file
);
MSVCRT__unlock_file
(
file
);
return
ret
;
}
/*********************************************************************
* _ungetwc_nolock (MSVCRT.@)
*/
MSVCRT_wint_t
CDECL
MSVCRT__ungetwc_nolock
(
MSVCRT_wint_t
wc
,
MSVCRT_FILE
*
file
)
{
MSVCRT_wchar_t
mwc
=
wc
;
if
(
!
MSVCRT_CHECK_PMT
(
file
!=
NULL
))
return
MSVCRT_WEOF
;
if
(
wc
==
MSVCRT_WEOF
)
return
MSVCRT_WEOF
;
MSVCRT__lock_file
(
file
);
if
((
msvcrt_get_ioinfo
(
file
->
_file
)
->
exflag
&
(
EF_UTF8
|
EF_UTF16
))
||
!
(
msvcrt_get_ioinfo
(
file
->
_file
)
->
wxflag
&
WX_TEXT
))
{
unsigned
char
*
pp
=
(
unsigned
char
*
)
&
mwc
;
int
i
;
for
(
i
=
sizeof
(
MSVCRT_wchar_t
)
-
1
;
i
>=
0
;
i
--
)
{
if
(
pp
[
i
]
!=
MSVCRT_ungetc
(
pp
[
i
],
file
))
{
MSVCRT__unlock_file
(
file
);
if
(
pp
[
i
]
!=
MSVCRT__ungetc_nolock
(
pp
[
i
],
file
))
return
MSVCRT_WEOF
;
}
}
}
else
{
char
mbs
[
MSVCRT_MB_LEN_MAX
];
int
len
;
len
=
MSVCRT_wctomb
(
mbs
,
mwc
);
if
(
len
==
-
1
)
{
MSVCRT__unlock_file
(
file
);
if
(
len
==
-
1
)
return
MSVCRT_WEOF
;
}
for
(
len
--
;
len
>=
0
;
len
--
)
{
if
(
mbs
[
len
]
!=
MSVCRT_ungetc
(
mbs
[
len
],
file
))
{
MSVCRT__unlock_file
(
file
);
if
(
mbs
[
len
]
!=
MSVCRT__ungetc_nolock
(
mbs
[
len
],
file
))
return
MSVCRT_WEOF
;
}
}
}
MSVCRT__unlock_file
(
file
);
return
mwc
;
}
...
...
dlls/msvcrt/msvcrt.h
View file @
4f807d9a
...
...
@@ -924,6 +924,7 @@ 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
*
);
MSVCRT_wint_t
__cdecl
MSVCRT_ungetwc
(
MSVCRT_wint_t
,
MSVCRT_FILE
*
);
MSVCRT_wint_t
__cdecl
MSVCRT__ungetwc_nolock
(
MSVCRT_wint_t
,
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT__fseeki64_nolock
(
MSVCRT_FILE
*
,
__int64
,
int
);
__int64
__cdecl
MSVCRT__ftelli64
(
MSVCRT_FILE
*
file
);
__int64
__cdecl
MSVCRT__ftelli64_nolock
(
MSVCRT_FILE
*
);
...
...
include/msvcrt/stdio.h
View file @
4f807d9a
...
...
@@ -207,6 +207,7 @@ int __cdecl _putws(const wchar_t*);
int
__cdecl
_snwprintf
(
wchar_t
*
,
size_t
,
const
wchar_t
*
,...);
int
__cdecl
_snwprintf_s
(
wchar_t
*
,
size_t
,
size_t
,
const
wchar_t
*
,...);
int
__cdecl
_scwprintf
(
const
wchar_t
*
,...);
wint_t
__cdecl
_ungetwc_nolock
(
wint_t
,
FILE
*
);
int
__cdecl
_vscwprintf
(
const
wchar_t
*
,
__ms_va_list
);
int
__cdecl
_vscwprintf_p_l
(
const
wchar_t
*
,
_locale_t
,
__ms_va_list
);
int
__cdecl
_vsnwprintf
(
wchar_t
*
,
size_t
,
const
wchar_t
*
,
__ms_va_list
);
...
...
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