From 1357589ecaff3b1252f963a19c14ad1662b55f18 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Fri, 1 Jul 2011 21:42:06 -0700 Subject: [PATCH] msvcrt: Add _get_pgmptr and _get_wpgmptr. --- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr80/msvcr80.spec | 4 ++-- dlls/msvcr90/msvcr90.spec | 4 ++-- dlls/msvcrt/data.c | 30 ++++++++++++++++++++++++++++++ dlls/msvcrt/msvcrt.spec | 4 ++-- 5 files changed, 38 insertions(+), 8 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 537c5caec57..1a2fa4b3d6f 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -685,14 +685,14 @@ @ cdecl _get_invalid_parameter_handler() msvcrt._get_invalid_parameter_handler @ cdecl _get_osfhandle(long) msvcrt._get_osfhandle @ cdecl _get_output_format() msvcrt._get_output_format -@ stub _get_pgmptr +@ cdecl _get_pgmptr(ptr) msvcrt._get_pgmptr @ cdecl _get_printf_count_output() msvcrt._get_printf_count_output @ stub _get_purecall_handler @ cdecl _get_terminate() msvcrt._get_terminate @ stub _get_timezone @ cdecl _get_tzname(ptr str long long) msvcrt._get_tzname @ cdecl _get_unexpected() msvcrt._get_unexpected -@ stub _get_wpgmptr +@ cdecl _get_wpgmptr(ptr) msvcrt._get_wpgmptr @ stub _getc_nolock @ cdecl _getch() msvcrt._getch @ stub _getch_nolock diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index d9b451e824a..1e14bfc6a9e 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -529,7 +529,7 @@ @ cdecl _get_osplatform(ptr) msvcrt._get_osplatform @ stub _get_osver @ cdecl _get_output_format() msvcrt._get_output_format -@ stub _get_pgmptr +@ cdecl _get_pgmptr(ptr) msvcrt._get_pgmptr @ cdecl _get_printf_count_output() msvcrt._get_printf_count_output @ stub _get_purecall_handler @ cdecl _get_sbh_threshold() msvcrt._get_sbh_threshold @@ -540,7 +540,7 @@ @ stub _get_winmajor @ stub _get_winminor @ stub _get_winver -@ stub _get_wpgmptr +@ cdecl _get_wpgmptr(ptr) msvcrt._get_wpgmptr @ cdecl _getch() msvcrt._getch @ stub _getch_nolock @ cdecl _getche() msvcrt._getche diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index f2b3770583d..02cb845367a 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -519,7 +519,7 @@ @ cdecl _get_invalid_parameter_handler() msvcrt._get_invalid_parameter_handler @ cdecl _get_osfhandle(long) msvcrt._get_osfhandle @ cdecl _get_output_format() msvcrt._get_output_format -@ stub _get_pgmptr +@ cdecl _get_pgmptr(ptr) msvcrt._get_pgmptr @ cdecl _get_printf_count_output() msvcrt._get_printf_count_output @ stub _get_purecall_handler @ cdecl _get_sbh_threshold() msvcrt._get_sbh_threshold @@ -527,7 +527,7 @@ @ stub _get_timezone @ cdecl _get_tzname(ptr str long long) msvcrt._get_tzname @ cdecl _get_unexpected() msvcrt._get_unexpected -@ stub _get_wpgmptr +@ cdecl _get_wpgmptr(ptr) msvcrt._get_wpgmptr @ stub _getc_nolock @ cdecl _getch() msvcrt._getch @ stub _getch_nolock diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c index 9e9d460b586..78298467a74 100644 --- a/dlls/msvcrt/data.c +++ b/dlls/msvcrt/data.c @@ -156,6 +156,36 @@ char** CDECL __p__pgmptr(void) { return &MSVCRT__pgmptr; } WCHAR** CDECL __p__wpgmptr(void) { return &MSVCRT__wpgmptr; } /*********************************************************************** + * _get_pgmptr (MSVCRT.@) + */ +int CDECL _get_pgmptr(char** p) +{ + if (!MSVCRT_CHECK_PMT(p)) + { + *MSVCRT__errno() = MSVCRT_EINVAL; + return MSVCRT_EINVAL; + } + + *p = MSVCRT__pgmptr; + return 0; +} + +/*********************************************************************** + * _get_wpgmptr (MSVCRT.@) + */ +int CDECL _get_wpgmptr(WCHAR** p) +{ + if (!MSVCRT_CHECK_PMT(p)) + { + *MSVCRT__errno() = MSVCRT_EINVAL; + return MSVCRT_EINVAL; + } + + *p = MSVCRT__wpgmptr; + return 0; +} + +/*********************************************************************** * __p__fmode (MSVCRT.@) */ unsigned int* CDECL __p__fmode(void) { return &MSVCRT__fmode; } diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 41d95bcb76a..7d65642dbfc 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -480,13 +480,13 @@ @ cdecl _get_osplatform(ptr) MSVCRT__get_osplatform # stub _get_osver(ptr) @ cdecl _get_output_format() -# stub _get_pgmptr(ptr) +@ cdecl _get_pgmptr(ptr) @ cdecl _get_sbh_threshold() # stub _get_wenviron(ptr) # stub _get_winmajor(ptr) # stub _get_winminor(ptr) # stub _get_winver(ptr) -# stub _get_wpgmptr(ptr) +@ cdecl _get_wpgmptr(ptr) @ cdecl _get_terminate() MSVCRT__get_terminate @ cdecl _get_tzname(ptr str long long) MSVCRT__get_tzname @ cdecl _get_unexpected() MSVCRT__get_unexpected -- 2.11.4.GIT