File size: 1,414 Bytes
90219c5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | //
// cscanf.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// The core formatted input functions for direct console I/O.
//
#define _ALLOW_OLD_VALIDATE_MACROS
#include <corecrt_internal_stdio_input.h>
using namespace __crt_stdio_input;
template <typename Character>
static int __cdecl common_cscanf(
unsigned __int64 const options,
Character const* const format,
_locale_t const locale,
va_list const arglist
) throw()
{
typedef input_processor<
Character,
console_input_adapter<Character>
> processor_type;
_LocaleUpdate locale_update(locale);
processor_type processor(
console_input_adapter<Character>(),
options,
format,
locale_update.GetLocaleT(),
arglist);
return processor.process();
}
extern "C" int __cdecl __conio_common_vcscanf(
unsigned __int64 const options,
char const* const format,
_locale_t const locale,
va_list const arglist
)
{
return common_cscanf(options, format, locale, arglist);
}
extern "C" int __cdecl __conio_common_vcwscanf(
unsigned __int64 const options,
wchar_t const* const format,
_locale_t const locale,
va_list const arglist
)
{
return common_cscanf(options, format, locale, arglist);
}
|