ReactOS 0.4.16-dev-959-g2ec3a19
input.cpp File Reference
Include dependency graph for input.cpp:

Go to the source code of this file.

Macros

#define _ALLOW_OLD_VALIDATE_MACROS
 

Functions

template<typename Character >
static int __cdecl common_vfscanf (unsigned __int64 const options, FILE *const stream, Character const *const format, _locale_t const locale, va_list const arglist) throw ()
 
int __cdecl __stdio_common_vfscanf (unsigned __int64 const options, FILE *const stream, char const *const format, _locale_t const locale, va_list const arglist)
 
int __cdecl __stdio_common_vfwscanf (unsigned __int64 const options, FILE *const stream, wchar_t const *const format, _locale_t const locale, va_list const arglist)
 
template<typename Character >
static int __cdecl common_vsscanf (unsigned __int64 const options, Character const *const buffer, size_t const buffer_count, Character const *const format, _locale_t const locale, va_list const arglist) throw ()
 
int __cdecl __stdio_common_vsscanf (unsigned __int64 const options, char const *const buffer, size_t const buffer_count, char const *const format, _locale_t const locale, va_list const arglist)
 
int __cdecl __stdio_common_vswscanf (unsigned __int64 const options, wchar_t const *const buffer, size_t const buffer_count, wchar_t const *const format, _locale_t const locale, va_list const arglist)
 

Macro Definition Documentation

◆ _ALLOW_OLD_VALIDATE_MACROS

#define _ALLOW_OLD_VALIDATE_MACROS

Definition at line 9 of file input.cpp.

Function Documentation

◆ __stdio_common_vfscanf()

int __cdecl __stdio_common_vfscanf ( unsigned __int64 const  options,
FILE *const  stream,
char const *const  format,
_locale_t const  locale,
va_list const  arglist 
)

Definition at line 51 of file input.cpp.

58{
60}
Definition: _locale.h:75
static int __cdecl common_vfscanf(unsigned __int64 const options, FILE *const stream, Character const *const format, _locale_t const locale, va_list const arglist)
Definition: input.cpp:20
va_lists_t arglist[FMT_ARGMAX+1]
Definition: format.c:284
Definition: format.c:58
Definition: parse.h:23

◆ __stdio_common_vfwscanf()

int __cdecl __stdio_common_vfwscanf ( unsigned __int64 const  options,
FILE *const  stream,
wchar_t const *const  format,
_locale_t const  locale,
va_list const  arglist 
)

Definition at line 62 of file input.cpp.

69{
71}

◆ __stdio_common_vsscanf()

int __cdecl __stdio_common_vsscanf ( unsigned __int64 const  options,
char const *const  buffer,
size_t const  buffer_count,
char const *const  format,
_locale_t const  locale,
va_list const  arglist 
)

Definition at line 113 of file input.cpp.

121{
123}
GLuint buffer
Definition: glext.h:5915
static int __cdecl common_vsscanf(unsigned __int64 const options, Character const *const buffer, size_t const buffer_count, Character const *const format, _locale_t const locale, va_list const arglist)
Definition: input.cpp:77
size_t const buffer_count
Definition: xtoa.cpp:36

Referenced by vsscanf_wrapper().

◆ __stdio_common_vswscanf()

int __cdecl __stdio_common_vswscanf ( unsigned __int64 const  options,
wchar_t const *const  buffer,
size_t const  buffer_count,
wchar_t const *const  format,
_locale_t const  locale,
va_list const  arglist 
)

Definition at line 125 of file input.cpp.

◆ common_vfscanf()

template<typename Character >
static int __cdecl common_vfscanf ( unsigned __int64 const  options,
FILE *const  stream,
Character const *const  format,
_locale_t const  locale,
va_list const  arglist 
)
throw (
)
static

Definition at line 20 of file input.cpp.

27{
28 typedef input_processor<
29 Character,
31 > processor_type;
32
33 _VALIDATE_RETURN(stream != nullptr, EINVAL, EOF);
34 _VALIDATE_RETURN(format != nullptr, EINVAL, EOF);
35
37 {
38 _LocaleUpdate locale_update(locale);
39
40 processor_type processor(
42 options,
43 format,
44 locale_update.GetLocaleT(),
45 arglist);
46
47 return processor.process();
48 });
49}
#define EINVAL
Definition: acclib.h:90
auto __acrt_lock_stream_and_call(FILE *const stream, Action &&action) -> decltype(action())
#define _VALIDATE_RETURN(expr, errorcode, retexpr)
#define EOF
Definition: stdio.h:24

Referenced by __stdio_common_vfscanf(), and __stdio_common_vfwscanf().

◆ common_vsscanf()

template<typename Character >
static int __cdecl common_vsscanf ( unsigned __int64 const  options,
Character const *const  buffer,
size_t const  buffer_count,
Character const *const  format,
_locale_t const  locale,
va_list const  arglist 
)
throw (
)
static

Definition at line 77 of file input.cpp.

85{
87
88 typedef input_processor<
89 Character,
91 > processor_type;
92
93 _VALIDATE_RETURN(buffer != nullptr, EINVAL, EOF);
94 _VALIDATE_RETURN(format != nullptr, EINVAL, EOF);
95
96 // The number of elements to consider when scanning is the lesser of [1] the
97 // specified number of elements in the buffer or [2] the length of the string
98 // in the buffer.
99 size_t const buffer_count_for_stream = char_traits::tcsnlen(buffer, buffer_count);
100
101 _LocaleUpdate locale_update(locale);
102
103 processor_type processor(
104 string_input_adapter<Character>(buffer, buffer_count_for_stream),
105 options,
106 format,
107 locale_update.GetLocaleT(),
108 arglist);
109
110 return processor.process();
111}

Referenced by __stdio_common_vsscanf(), and __stdio_common_vswscanf().