Commit 0512829a authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msvcrt: Add _get_output_format() and return default value.

parent 6194d301
......@@ -684,7 +684,7 @@
@ cdecl _get_heap_handle() msvcrt._get_heap_handle
@ cdecl _get_invalid_parameter_handler() msvcrt._get_invalid_parameter_handler
@ cdecl _get_osfhandle(long) msvcrt._get_osfhandle
@ stub _get_output_format
@ cdecl _get_output_format() msvcrt._get_output_format
@ stub _get_pgmptr
@ stub _get_printf_count_output
@ stub _get_purecall_handler
......
......@@ -528,7 +528,7 @@
@ cdecl _get_osfhandle(long) msvcrt._get_osfhandle
@ cdecl _get_osplatform(ptr) msvcrt._get_osplatform
@ stub _get_osver
@ stub _get_output_format
@ cdecl _get_output_format() msvcrt._get_output_format
@ stub _get_pgmptr
@ stub _get_printf_count_output
@ stub _get_purecall_handler
......
......@@ -518,7 +518,7 @@
@ cdecl _get_heap_handle() msvcrt._get_heap_handle
@ cdecl _get_invalid_parameter_handler() msvcrt._get_invalid_parameter_handler
@ cdecl _get_osfhandle(long) msvcrt._get_osfhandle
@ stub _get_output_format
@ cdecl _get_output_format() msvcrt._get_output_format
@ stub _get_pgmptr
@ stub _get_printf_count_output
@ stub _get_purecall_handler
......
......@@ -253,3 +253,12 @@ void CDECL MSVCRT_qsort_s(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size,
MSVCRT_mergesort(base, secondarr, size, compar, 0, nmemb-1, context);
MSVCRT_free(secondarr);
}
/*********************************************************************
* _get_output_format (MSVCRT.@)
*
*/
unsigned int CDECL _get_output_format(void)
{
return 0;
}
......@@ -769,6 +769,9 @@ typedef void (__cdecl *MSVCRT___sighandler_t)(int);
#define MSVCRT__WRITE_ABORT_MSG 1
#define MSVCRT__CALL_REPORTFAULT 2
/* _get_output_format return code */
#define MSVCRT__TWO_DIGIT_EXPONENT 0x1
void __cdecl MSVCRT_free(void*);
void* __cdecl MSVCRT_malloc(MSVCRT_size_t);
void* __cdecl MSVCRT_calloc(MSVCRT_size_t,MSVCRT_size_t);
......
......@@ -473,7 +473,7 @@
@ cdecl _get_osfhandle(long)
@ cdecl _get_osplatform(ptr) MSVCRT__get_osplatform
# stub _get_osver
# stub _get_output_format
@ cdecl _get_output_format()
# stub _get_pgmptr
@ cdecl _get_sbh_threshold()
# stub _get_wenviron
......
......@@ -457,6 +457,7 @@ static void test_defines(void)
CHECK_DEF(_UNDERFLOW);
CHECK_DEF(_WRITE_ABORT_MSG);
CHECK_DEF(_CALL_REPORTFAULT);
CHECK_DEF(_TWO_DIGIT_EXPONENT);
}
#endif /* __WINE_USE_MSVCRT */
......
......@@ -43,6 +43,7 @@ static int (__cdecl *p__ecvt_s)(char *buffer, size_t length, double number,
int ndigits, int *decpt, int *sign);
static int (__cdecl *p__fcvt_s)(char *buffer, size_t length, double number,
int ndigits, int *decpt, int *sign);
static unsigned int (__cdecl *p__get_output_format)(void);
static void init( void )
{
......@@ -53,6 +54,7 @@ static void init( void )
p__vsnwprintf_s = (void *)GetProcAddress(hmod, "_vsnwprintf_s");
p__ecvt_s = (void *)GetProcAddress(hmod, "_ecvt_s");
p__fcvt_s = (void *)GetProcAddress(hmod, "_fcvt_s");
p__get_output_format = (void *)GetProcAddress(hmod, "_get_output_format");
}
static void test_sprintf( void )
......@@ -1013,6 +1015,20 @@ static void test_vsnwprintf_s(void)
ok( !wcscmp(out1, buffer), "buffer wrong, got=%s\n", wine_dbgstr_w(buffer));
}
static void test__get_output_format(void)
{
unsigned int ret;
if (!p__get_output_format)
{
win_skip("_get_output_format not available\n");
return;
}
ret = p__get_output_format();
ok(ret == 0, "got %d\n", ret);
}
START_TEST(printf)
{
init();
......@@ -1026,4 +1042,5 @@ START_TEST(printf)
test_vscprintf();
test_vscwprintf();
test_vsnwprintf_s();
test__get_output_format();
}
......@@ -94,6 +94,9 @@ FILE* __cdecl __iob_func(void);
#define stdout (_iob+STDOUT_FILENO)
#define stderr (_iob+STDERR_FILENO)
/* return value for _get_output_format */
#define _TWO_DIGIT_EXPONENT 0x1
#ifndef _STDIO_DEFINED
#define _STDIO_DEFINED
int __cdecl _fcloseall(void);
......@@ -173,6 +176,7 @@ int __cdecl vprintf(const char*,__ms_va_list);
int __cdecl vprintf_s(const char*,__ms_va_list);
int __cdecl vsprintf(char*,const char*,__ms_va_list);
int __cdecl vsprintf_s(char*,size_t,const char*,__ms_va_list);
unsigned int __cdecl _get_output_format(void);
#ifndef _WSTDIO_DEFINED
#define _WSTDIO_DEFINED
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment