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
405e6eb3
Commit
405e6eb3
authored
Apr 05, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Added _snscanf implementation.
parent
220b6ab3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
104 additions
and
18 deletions
+104
-18
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+4
-4
msvcr70.spec
dlls/msvcr70/msvcr70.spec
+1
-1
msvcr71.spec
dlls/msvcr71/msvcr71.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+4
-4
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+4
-4
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+4
-4
scanf.c
dlls/msvcrt/scanf.c
+68
-0
scanf.h
dlls/msvcrt/scanf.h
+18
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
405e6eb3
...
...
@@ -1093,10 +1093,10 @@
@ stub _snprintf_l
@ varargs _snprintf_s(ptr long long str) msvcrt._snprintf_s
@ stub _snprintf_s_l
@
stub
_snscanf
@
stub
_snscanf_l
@
stub
_snscanf_s
@
stub
_snscanf_s_l
@
varargs _snscanf(str long str) msvcrt.
_snscanf
@
varargs _snscanf_l(str long str ptr) msvcrt.
_snscanf_l
@
varargs _snscanf_s(str long str) msvcrt.
_snscanf_s
@
varargs _snscanf_s_l(str long str ptr) msvcrt.
_snscanf_s_l
@ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf
@ stub _snwprintf_l
@ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s
...
...
dlls/msvcr70/msvcr70.spec
View file @
405e6eb3
...
...
@@ -526,7 +526,7 @@
@ stub _setsystime
@ cdecl _sleep(long) msvcrt._sleep
@ varargs _snprintf(ptr long str) msvcrt._snprintf
@
stub
_snscanf
@
varargs _snscanf(str long str) msvcrt.
_snscanf
@ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf
@ stub _snwscanf
@ varargs _sopen(str long long) msvcrt._sopen
...
...
dlls/msvcr71/msvcr71.spec
View file @
405e6eb3
...
...
@@ -522,7 +522,7 @@
@ cdecl _setsystime(ptr long) msvcrt._setsystime
@ cdecl _sleep(long) msvcrt._sleep
@ varargs _snprintf(str long str) msvcrt._snprintf
@
stub
_snscanf
@
varargs _snscanf(str long str) msvcrt.
_snscanf
@ varargs _snwprintf(wstr long wstr) msvcrt._snwprintf
@ stub _snwscanf
@ varargs _sopen(str long long) msvcrt._sopen
...
...
dlls/msvcr80/msvcr80.spec
View file @
405e6eb3
...
...
@@ -947,10 +947,10 @@
@ stub _snprintf_l
@ varargs _snprintf_s(ptr long long str) msvcrt._snprintf_s
@ stub _snprintf_s_l
@
stub
_snscanf
@
stub
_snscanf_l
@
stub
_snscanf_s
@
stub
_snscanf_s_l
@
varargs _snscanf(str long str) msvcrt.
_snscanf
@
varargs _snscanf_l(str long str ptr) msvcrt.
_snscanf_l
@
varargs _snscanf_s(str long str) msvcrt.
_snscanf_s
@
varargs _snscanf_s_l(str long str ptr) msvcrt.
_snscanf_s_l
@ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf
@ stub _snwprintf_l
@ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s
...
...
dlls/msvcr90/msvcr90.spec
View file @
405e6eb3
...
...
@@ -933,10 +933,10 @@
@ stub _snprintf_l
@ varargs _snprintf_s(ptr long long str) msvcrt._snprintf_s
@ stub _snprintf_s_l
@
stub
_snscanf
@
stub
_snscanf_l
@
stub
_snscanf_s
@
stub
_snscanf_s_l
@
varargs _snscanf(str long str) msvcrt.
_snscanf
@
varargs _snscanf_l(str long str ptr) msvcrt.
_snscanf_l
@
varargs _snscanf_s(str long str) msvcrt.
_snscanf_s
@
varargs _snscanf_s_l(str long str ptr) msvcrt.
_snscanf_s_l
@ varargs _snwprintf(ptr long wstr) msvcrt._snwprintf
@ stub _snwprintf_l
@ varargs _snwprintf_s(ptr long long wstr) msvcrt._snwprintf_s
...
...
dlls/msvcrt/msvcrt.spec
View file @
405e6eb3
...
...
@@ -876,10 +876,10 @@
# stub _snprintf_l
@ varargs _snprintf_s(ptr long long str) MSVCRT__snprintf_s
# stub _snprintf_s_l
# stub
_snscanf
# stub
_snscanf_l
# stub
_snscanf_s
# stub
_snscanf_s_l
@ varargs _snscanf(str long str) MSVCRT_
_snscanf
@ varargs _snscanf_l(str long str ptr) MSVCRT_
_snscanf_l
@ varargs _snscanf_s(str long str) MSVCRT_
_snscanf_s
@ varargs _snscanf_s_l(str long str ptr) MSVCRT_
_snscanf_s_l
@ varargs _snwprintf(ptr long wstr) MSVCRT__snwprintf
# stub _snwprintf_l
@ varargs _snwprintf_s(ptr long long wstr) MSVCRT__snwprintf_s
...
...
dlls/msvcrt/scanf.c
View file @
405e6eb3
...
...
@@ -91,6 +91,16 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) {
#define SECURE 1
#include "scanf.h"
/* vsnscanf_l */
#undef SECURE
#define STRING_LEN 1
#include "scanf.h"
/* vsnscanf_s_l */
#define SECURE
#include "scanf.h"
#undef STRING_LEN
/* vswscanf_l */
#define WIDE_SCANF 1
#undef CONSOLE
...
...
@@ -582,3 +592,61 @@ int CDECL _cwscanf_s_l(const char *format, MSVCRT__locale_t locale, ...)
__ms_va_end
(
valist
);
return
res
;
}
/*********************************************************************
* _snscanf (MSVCRT.@)
*/
int
CDECL
MSVCRT__snscanf
(
char
*
input
,
MSVCRT_size_t
length
,
const
char
*
format
,
...)
{
__ms_va_list
valist
;
int
res
;
__ms_va_start
(
valist
,
format
);
res
=
MSVCRT_vsnscanf_l
(
input
,
length
,
format
,
NULL
,
valist
);
__ms_va_end
(
valist
);
return
res
;
}
/*********************************************************************
* _snscanf_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__snscanf_l
(
char
*
input
,
MSVCRT_size_t
length
,
const
char
*
format
,
MSVCRT__locale_t
locale
,
...)
{
__ms_va_list
valist
;
int
res
;
__ms_va_start
(
valist
,
locale
);
res
=
MSVCRT_vsnscanf_l
(
input
,
length
,
format
,
locale
,
valist
);
__ms_va_end
(
valist
);
return
res
;
}
/*********************************************************************
* _snscanf_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__snscanf_s
(
char
*
input
,
MSVCRT_size_t
length
,
const
char
*
format
,
...)
{
__ms_va_list
valist
;
int
res
;
__ms_va_start
(
valist
,
format
);
res
=
MSVCRT_vsnscanf_s_l
(
input
,
length
,
format
,
NULL
,
valist
);
__ms_va_end
(
valist
);
return
res
;
}
/*********************************************************************
* _snscanf_s_l (MSVCRT.@)
*/
int
CDECL
MSVCRT__snscanf_s_l
(
char
*
input
,
MSVCRT_size_t
length
,
const
char
*
format
,
MSVCRT__locale_t
locale
,
...)
{
__ms_va_list
valist
;
int
res
;
__ms_va_start
(
valist
,
locale
);
res
=
MSVCRT_vsnscanf_s_l
(
input
,
length
,
format
,
locale
,
valist
);
__ms_va_end
(
valist
);
return
res
;
}
dlls/msvcrt/scanf.h
View file @
405e6eb3
...
...
@@ -65,6 +65,23 @@
#ifdef STRING
#undef _EOF_
#define _EOF_ 0
#ifdef STRING_LEN
#define _GETC_(file) (consumed==length ? '\0' : (consumed++, *file++))
#define _UNGETC_(nch, file) do { file--; consumed--; } while(0)
#ifdef WIDE_SCANF
#ifdef SECURE
#define _FUNCTION_ static int MSVCRT_vsnwscanf_s_l(const MSVCRT_wchar_t *file, MSVCRT_size_t length, const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, __ms_va_list ap)
#else
/* SECURE */
#define _FUNCTION_ static int MSVCRT_vsnwscanf_l(const MSVCRT_wchar_t *file, MSVCRT_size_t length, const MSVCRT_wchar_t *format, MSVCRT__locale_t locale, __ms_va_list ap)
#endif
/* SECURE */
#else
/* WIDE_SCANF */
#ifdef SECURE
#define _FUNCTION_ static int MSVCRT_vsnscanf_s_l(const char *file, MSVCRT_size_t length, const char *format, MSVCRT__locale_t locale, __ms_va_list ap)
#else
/* SECURE */
#define _FUNCTION_ static int MSVCRT_vsnscanf_l(const char *file, MSVCRT_size_t length, const char *format, MSVCRT__locale_t locale, __ms_va_list ap)
#endif
/* SECURE */
#endif
/* WIDE_SCANF */
#else
/* STRING_LEN */
#define _GETC_(file) (consumed++, *file++)
#define _UNGETC_(nch, file) do { file--; consumed--; } while(0)
#ifdef WIDE_SCANF
...
...
@@ -80,6 +97,7 @@
#define _FUNCTION_ static int MSVCRT_vsscanf_l(const char *file, const char *format, MSVCRT__locale_t locale, __ms_va_list ap)
#endif
/* SECURE */
#endif
/* WIDE_SCANF */
#endif
/* STRING_LEN */
#else
/* STRING */
#ifdef WIDE_SCANF
#define _GETC_(file) (consumed++, MSVCRT_fgetwc(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