winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
866 discussions
Start a n
N
ew thread
Vincas Miliūnas : msvcr90/tests: Added qsort_s tests.
by Alexandre Julliard
18 Nov '10
18 Nov '10
Module: wine Branch: master Commit: 5083f0d20c77aa1732e9c3c8d0c98def44577cd4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5083f0d20c77aa1732e9c3c8d…
Author: Vincas Miliūnas <vincas.miliunas(a)gmail.com> Date: Wed Nov 17 18:07:58 2010 +0200 msvcr90/tests: Added qsort_s tests. --- dlls/msvcr90/tests/msvcr90.c | 134 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 134 insertions(+), 0 deletions(-) diff --git a/dlls/msvcr90/tests/msvcr90.c b/dlls/msvcr90/tests/msvcr90.c index 1a94182..874f98d 100644 --- a/dlls/msvcr90/tests/msvcr90.c +++ b/dlls/msvcr90/tests/msvcr90.c @@ -65,10 +65,12 @@ static __int64 (__cdecl *p_strtoi64)(const char *, char **, int); static unsigned __int64 (__cdecl *p_strtoui64)(const char *, char **, int); static errno_t (__cdecl *p_itoa_s)(int,char*,size_t,int); static int (__cdecl *p_wcsncat_s)(wchar_t *dst, size_t elem, const wchar_t *src, size_t count); +static void (__cdecl *p_qsort_s)(void *, size_t, size_t, int (__cdecl *)(void *, const void *, const void *), void *); static void* (WINAPI *pEncodePointer)(void *); static int cb_called[4]; +static int g_qsort_s_context_counter; /* ########## */ @@ -442,6 +444,136 @@ static void test_wcsncat_s(void) CHECK_CALLED(invalid_parameter_handler); } +/* Based on dlls/ntdll/tests/string.c */ +static __cdecl int intcomparefunc(void *context, const void *a, const void*b) +{ + ok (a != b, "must never get the same pointer\n"); + ++*(int *) context; + return (*(int*)a) - (*(int*)b); +} + +static __cdecl int charcomparefunc(void *context, const void *a, const void*b) +{ + ok (a != b, "must never get the same pointer\n"); + ++*(int *) context; + return (*(char*)a) - (*(char*)b); +} + +static __cdecl int strcomparefunc(void *context, const void *a, const void*b) +{ + ok (a != b, "must never get the same pointer\n"); + ++*(int *) context; + return lstrcmpA(*(char**)a,*(char**)b); +} + +static void test_qsort_s(void) +{ + int arr[5] = { 23, 42, 8, 4, 16 }; + int arr2[5] = { 23, 42, 8, 4, 16 }; + char carr[5] = { 42, 23, 4, 8, 16 }; + const char *strarr[7] = { + "Hello", + "Wine", + "World", + "!", + "Hopefully", + "Sorted", + "." + }; + + if(!p_qsort_s) { + win_skip("qsort_s not found\n"); + return; + } + + SET_EXPECT(invalid_parameter_handler); + p_qsort_s(NULL, 0, 0, NULL, NULL); + CHECK_CALLED(invalid_parameter_handler); + + SET_EXPECT(invalid_parameter_handler); + p_qsort_s(NULL, 0, 0, intcomparefunc, NULL); + CHECK_CALLED(invalid_parameter_handler); + + SET_EXPECT(invalid_parameter_handler); + p_qsort_s(NULL, 0, sizeof(int), NULL, NULL); + CHECK_CALLED(invalid_parameter_handler); + + SET_EXPECT(invalid_parameter_handler); + p_qsort_s(NULL, 1, sizeof(int), intcomparefunc, NULL); + CHECK_CALLED(invalid_parameter_handler); + + g_qsort_s_context_counter = 0; + p_qsort_s(NULL, 0, sizeof(int), intcomparefunc, NULL); + ok(g_qsort_s_context_counter == 0, "callback shouldn't have been called\n"); + + /* overflow without side effects, other overflow values crash */ + g_qsort_s_context_counter = 0; + p_qsort_s((void*)arr2, (1 << (8*sizeof(size_t) - 1)) + 1, sizeof(int), intcomparefunc, &g_qsort_s_context_counter); + ok(g_qsort_s_context_counter == 0, "callback shouldn't have been called\n"); + ok(arr2[0] == 23, "should remain unsorted, arr2[0] is %d\n", arr2[0]); + ok(arr2[1] == 42, "should remain unsorted, arr2[1] is %d\n", arr2[1]); + ok(arr2[2] == 8, "should remain unsorted, arr2[2] is %d\n", arr2[2]); + ok(arr2[3] == 4, "should remain unsorted, arr2[3] is %d\n", arr2[3]); + + g_qsort_s_context_counter = 0; + p_qsort_s((void*)arr, 0, sizeof(int), intcomparefunc, &g_qsort_s_context_counter); + ok(g_qsort_s_context_counter == 0, "callback shouldn't have been called\n"); + ok(arr[0] == 23, "badly sorted, nmemb=0, arr[0] is %d\n", arr[0]); + ok(arr[1] == 42, "badly sorted, nmemb=0, arr[1] is %d\n", arr[1]); + ok(arr[2] == 8, "badly sorted, nmemb=0, arr[2] is %d\n", arr[2]); + ok(arr[3] == 4, "badly sorted, nmemb=0, arr[3] is %d\n", arr[3]); + ok(arr[4] == 16, "badly sorted, nmemb=0, arr[4] is %d\n", arr[4]); + + g_qsort_s_context_counter = 0; + p_qsort_s((void*)arr, 1, sizeof(int), intcomparefunc, &g_qsort_s_context_counter); + ok(g_qsort_s_context_counter == 0, "callback shouldn't have been called\n"); + ok(arr[0] == 23, "badly sorted, nmemb=1, arr[0] is %d\n", arr[0]); + ok(arr[1] == 42, "badly sorted, nmemb=1, arr[1] is %d\n", arr[1]); + ok(arr[2] == 8, "badly sorted, nmemb=1, arr[2] is %d\n", arr[2]); + ok(arr[3] == 4, "badly sorted, nmemb=1, arr[3] is %d\n", arr[3]); + ok(arr[4] == 16, "badly sorted, nmemb=1, arr[4] is %d\n", arr[4]); + + SET_EXPECT(invalid_parameter_handler); + g_qsort_s_context_counter = 0; + p_qsort_s((void*)arr, 5, 0, intcomparefunc, &g_qsort_s_context_counter); + ok(g_qsort_s_context_counter == 0, "callback shouldn't have been called\n"); + ok(arr[0] == 23, "badly sorted, size=0, arr[0] is %d\n", arr[0]); + ok(arr[1] == 42, "badly sorted, size=0, arr[1] is %d\n", arr[1]); + ok(arr[2] == 8, "badly sorted, size=0, arr[2] is %d\n", arr[2]); + ok(arr[3] == 4, "badly sorted, size=0, arr[3] is %d\n", arr[3]); + ok(arr[4] == 16, "badly sorted, size=0, arr[4] is %d\n", arr[4]); + CHECK_CALLED(invalid_parameter_handler); + + g_qsort_s_context_counter = 0; + p_qsort_s((void*)arr, 5, sizeof(int), intcomparefunc, &g_qsort_s_context_counter); + ok(g_qsort_s_context_counter > 0, "callback wasn't called\n"); + ok(arr[0] == 4, "badly sorted, arr[0] is %d\n", arr[0]); + ok(arr[1] == 8, "badly sorted, arr[1] is %d\n", arr[1]); + ok(arr[2] == 16, "badly sorted, arr[2] is %d\n", arr[2]); + ok(arr[3] == 23, "badly sorted, arr[3] is %d\n", arr[3]); + ok(arr[4] == 42, "badly sorted, arr[4] is %d\n", arr[4]); + + g_qsort_s_context_counter = 0; + p_qsort_s((void*)carr, 5, sizeof(char), charcomparefunc, &g_qsort_s_context_counter); + ok(g_qsort_s_context_counter > 0, "callback wasn't called\n"); + ok(carr[0] == 4, "badly sorted, carr[0] is %d\n", carr[0]); + ok(carr[1] == 8, "badly sorted, carr[1] is %d\n", carr[1]); + ok(carr[2] == 16, "badly sorted, carr[2] is %d\n", carr[2]); + ok(carr[3] == 23, "badly sorted, carr[3] is %d\n", carr[3]); + ok(carr[4] == 42, "badly sorted, carr[4] is %d\n", carr[4]); + + g_qsort_s_context_counter = 0; + p_qsort_s((void*)strarr, 7, sizeof(char*), strcomparefunc, &g_qsort_s_context_counter); + ok(g_qsort_s_context_counter > 0, "callback wasn't called\n"); + ok(!strcmp(strarr[0],"!"), "badly sorted, strarr[0] is %s\n", strarr[0]); + ok(!strcmp(strarr[1],"."), "badly sorted, strarr[1] is %s\n", strarr[1]); + ok(!strcmp(strarr[2],"Hello"), "badly sorted, strarr[2] is %s\n", strarr[2]); + ok(!strcmp(strarr[3],"Hopefully"), "badly sorted, strarr[3] is %s\n", strarr[3]); + ok(!strcmp(strarr[4],"Sorted"), "badly sorted, strarr[4] is %s\n", strarr[4]); + ok(!strcmp(strarr[5],"Wine"), "badly sorted, strarr[5] is %s\n", strarr[5]); + ok(!strcmp(strarr[6],"World"), "badly sorted, strarr[6] is %s\n", strarr[6]); +} + /* ########## */ START_TEST(msvcr90) @@ -473,6 +605,7 @@ START_TEST(msvcr90) p_strtoui64 = (void *) GetProcAddress(hcrt, "_strtoui64"); p_itoa_s = (void *)GetProcAddress(hcrt, "_itoa_s"); p_wcsncat_s = (void *)GetProcAddress( hcrt,"wcsncat_s" ); + p_qsort_s = (void *) GetProcAddress(hcrt, "qsort_s"); hkernel32 = GetModuleHandleA("kernel32.dll"); pEncodePointer = (void *) GetProcAddress(hkernel32, "EncodePointer"); @@ -483,4 +616,5 @@ START_TEST(msvcr90) test__strtoi64(); test__itoa_s(); test_wcsncat_s(); + test_qsort_s(); }
1
0
0
0
Vincas Miliūnas : msvcrt: Added qsort_s implementation .
by Alexandre Julliard
18 Nov '10
18 Nov '10
Module: wine Branch: master Commit: 955e2f90505a6e6e591e447e1dcc4dacab56f6cf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=955e2f90505a6e6e591e447e1…
Author: Vincas Miliūnas <vincas.miliunas(a)gmail.com> Date: Wed Nov 17 18:07:47 2010 +0200 msvcrt: Added qsort_s implementation. --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/misc.c | 67 +++++++++++++++++++++++++++++++++++++++++++ dlls/msvcrt/msvcrt.spec | 2 +- 5 files changed, 71 insertions(+), 4 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 28243de..6e860e8 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1550,7 +1550,7 @@ @ cdecl putwc(long ptr) msvcrt.putwc @ cdecl putwchar(long) msvcrt.putwchar @ cdecl qsort(ptr long long ptr) msvcrt.qsort -@ stub qsort_s +@ cdecl qsort_s(ptr long long ptr ptr) msvcrt.qsort_s @ cdecl raise(long) msvcrt.raise @ cdecl rand() msvcrt.rand @ cdecl rand_s(ptr) msvcrt.rand_s diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 9206b93..17785be 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1404,7 +1404,7 @@ @ cdecl putwc(long ptr) msvcrt.putwc @ cdecl putwchar(long) msvcrt.putwchar @ cdecl qsort(ptr long long ptr) msvcrt.qsort -@ stub qsort_s +@ cdecl qsort_s(ptr long long ptr ptr) msvcrt.qsort_s @ cdecl raise(long) msvcrt.raise @ cdecl rand() msvcrt.rand @ cdecl rand_s(ptr) msvcrt.rand_s diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index ea00630..663e1b7 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1388,7 +1388,7 @@ @ cdecl putwc(long ptr) msvcrt.putwc @ cdecl putwchar(long) msvcrt.putwchar @ cdecl qsort(ptr long long ptr) msvcrt.qsort -@ stub qsort_s +@ cdecl qsort_s(ptr long long ptr ptr) msvcrt.qsort_s @ cdecl raise(long) msvcrt.raise @ cdecl rand() msvcrt.rand @ cdecl rand_s(ptr) msvcrt.rand_s diff --git a/dlls/msvcrt/misc.c b/dlls/msvcrt/misc.c index c044d63..d37fc72 100644 --- a/dlls/msvcrt/misc.c +++ b/dlls/msvcrt/misc.c @@ -186,3 +186,70 @@ void CDECL _chkesp(void) # endif /* __GNUC__ */ #endif /* __i386__ */ + +/********************************************************************* + * Helper function for MSVCRT_qsort_s. + * + * Based on NTDLL_qsort in dlls/ntdll/misc.c + */ +static void MSVCRT_mergesort( void *arr, void *barr, size_t elemsize, + int (CDECL *compar)(void *, const void *, const void *), + size_t left, size_t right, void *context ) +{ + if (right>left) { + size_t i, j, k, m; + m=left+(right-left)/2; + MSVCRT_mergesort(arr, barr, elemsize, compar, left, m, context); + MSVCRT_mergesort(arr, barr, elemsize, compar, m+1, right, context); + +#define X(a,i) ((char*)a+elemsize*(i)) + for (i=m+1; i>left; i--) + memcpy (X(barr,(i-1)),X(arr,(i-1)),elemsize); + for (j=m; j<right; j++) + memcpy (X(barr,(right+m-j)),X(arr,(j+1)),elemsize); + + /* i=left; j=right; */ + for (k=left; i<=m && j>m; k++) { + if (i==j || compar(context, X(barr,i),X(barr,j))<=0) { + memcpy(X(arr,k),X(barr,i),elemsize); + i++; + } else { + memcpy(X(arr,k),X(barr,j),elemsize); + j--; + } + } + for (; i<=m; i++, k++) + memcpy(X(arr,k),X(barr,i),elemsize); + for (; j>m; j--, k++) + memcpy(X(arr,k),X(barr,j),elemsize); + } +#undef X +} + +/********************************************************************* + * qsort_s (MSVCRT.@) + * + * Based on NTDLL_qsort in dlls/ntdll/misc.c + */ +void CDECL MSVCRT_qsort_s(void *base, MSVCRT_size_t nmemb, MSVCRT_size_t size, + int (CDECL *compar)(void *, const void *, const void *), void *context) +{ + void *secondarr; + const size_t total_size = nmemb*size; + + if (!MSVCRT_CHECK_PMT(base != NULL || (base == NULL && nmemb == 0)) || + !MSVCRT_CHECK_PMT(size > 0) || !MSVCRT_CHECK_PMT(compar != NULL) || + total_size / size != nmemb) + { + *MSVCRT__errno() = MSVCRT_EINVAL; + return; + } + + if (nmemb < 2) return; + + secondarr = MSVCRT_malloc(total_size); + if (!secondarr) + return; + MSVCRT_mergesort(base, secondarr, size, compar, 0, nmemb-1, context); + MSVCRT_free(secondarr); +} diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 63e3b71..3db6fa4 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1344,7 +1344,7 @@ @ cdecl putwc(long ptr) MSVCRT_fputwc @ cdecl putwchar(long) _fputwchar @ cdecl qsort(ptr long long ptr) ntdll.qsort -# stub qsort_s +@ cdecl qsort_s(ptr long long ptr ptr) MSVCRT_qsort_s @ cdecl raise(long) MSVCRT_raise @ cdecl rand() MSVCRT_rand @ cdecl rand_s(ptr) MSVCRT_rand_s
1
0
0
0
Henri Verbeet : ddraw: Return DDERR_INVALIDPARAMS for 0 width / height surface creation.
by Alexandre Julliard
18 Nov '10
18 Nov '10
Module: wine Branch: master Commit: 63316d096702393691236b29bc3bf7f8e414a49c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=63316d096702393691236b29b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Nov 18 12:21:42 2010 +0100 ddraw: Return DDERR_INVALIDPARAMS for 0 width / height surface creation. --- dlls/ddraw/ddraw.c | 6 ++++++ dlls/ddraw/tests/dsurface.c | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 0 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index b9ff201..c0354ce 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -3069,6 +3069,12 @@ static HRESULT CreateSurface(IDirectDraw7 *iface, desc2.dwHeight = Mode.Height; } + if (!desc2.dwWidth || !desc2.dwHeight) + { + LeaveCriticalSection(&ddraw_cs); + return DDERR_INVALIDPARAMS; + } + /* Mipmap count fixes */ if(desc2.ddsCaps.dwCaps & DDSCAPS_MIPMAP) { diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index ee221ce..8bc849d 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -2391,6 +2391,30 @@ static void SizeTest(void) dsurface = NULL; } + /* Test 0 height. */ + memset(&desc, 0, sizeof(desc)); + desc.dwSize = sizeof(desc); + desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + desc.dwWidth = 1; + desc.dwHeight = 0; + ret = IDirectDraw_CreateSurface(lpDD, &desc, &dsurface, NULL); + ok(ret == DDERR_INVALIDPARAMS, "Creating a 0 height surface returned %#x, expected DDERR_INVALIDPARAMS.\n", ret); + if (SUCCEEDED(ret)) IDirectDrawSurface_Release(dsurface); + dsurface = NULL; + + /* Test 0 width. */ + memset(&desc, 0, sizeof(desc)); + desc.dwSize = sizeof(desc); + desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + desc.dwWidth = 0; + desc.dwHeight = 1; + ret = IDirectDraw_CreateSurface(lpDD, &desc, &dsurface, NULL); + ok(ret == DDERR_INVALIDPARAMS, "Creating a 0 width surface returned %#x, expected DDERR_INVALIDPARAMS.\n", ret); + if (SUCCEEDED(ret)) IDirectDrawSurface_Release(dsurface); + dsurface = NULL; + /* Sanity check */ ZeroMemory(&desc, sizeof(desc)); desc.dwSize = sizeof(desc);
1
0
0
0
Henri Verbeet : d3d8/tests: Add a test for 0 width / height surface creation.
by Alexandre Julliard
18 Nov '10
18 Nov '10
Module: wine Branch: master Commit: f683fe313b9b45f316e3095de366a66c77e978b4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f683fe313b9b45f316e3095de…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Nov 18 12:21:41 2010 +0100 d3d8/tests: Add a test for 0 width / height surface creation. --- dlls/d3d8/tests/surface.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/dlls/d3d8/tests/surface.c b/dlls/d3d8/tests/surface.c index 4980a41..f75c15b 100644 --- a/dlls/d3d8/tests/surface.c +++ b/dlls/d3d8/tests/surface.c @@ -320,6 +320,20 @@ static void test_private_data(IDirect3DDevice8 *device) ok(ref2 == (ref - 1), "Object reference is %d, expected %d\n", ref2, ref - 1); } +static void test_surface_dimensions(IDirect3DDevice8 *device) +{ + IDirect3DSurface8 *surface; + HRESULT hr; + + hr = IDirect3DDevice8_CreateImageSurface(device, 0, 1, D3DFMT_A8R8G8B8, &surface); + ok(hr == D3DERR_INVALIDCALL, "CreateOffscreenPlainSurface returned %#x, expected D3DERR_INVALIDCALL.\n", hr); + if (SUCCEEDED(hr)) IDirect3DSurface8_Release(surface); + + hr = IDirect3DDevice8_CreateImageSurface(device, 1, 0, D3DFMT_A8R8G8B8, &surface); + ok(hr == D3DERR_INVALIDCALL, "CreateOffscreenPlainSurface returned %#x, expected D3DERR_INVALIDCALL.\n", hr); + if (SUCCEEDED(hr)) IDirect3DSurface8_Release(surface); +} + START_TEST(surface) { HMODULE d3d8_handle; @@ -340,6 +354,7 @@ START_TEST(surface) test_surface_get_container(device_ptr); test_lockrect_invalid(device_ptr); test_private_data(device_ptr); + test_surface_dimensions(device_ptr); refcount = IDirect3DDevice8_Release(device_ptr); ok(!refcount, "Device has %u references left\n", refcount);
1
0
0
0
Henri Verbeet : d3d9/tests: Add a test for 0 width / height surface creation.
by Alexandre Julliard
18 Nov '10
18 Nov '10
Module: wine Branch: master Commit: 4ea2d9f62f03d645876bc9d9a9ee5ed487d7857f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4ea2d9f62f03d645876bc9d9a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Nov 18 12:21:40 2010 +0100 d3d9/tests: Add a test for 0 width / height surface creation. --- dlls/d3d9/tests/surface.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/dlls/d3d9/tests/surface.c b/dlls/d3d9/tests/surface.c index c1246fc..7fcf6e4 100644 --- a/dlls/d3d9/tests/surface.c +++ b/dlls/d3d9/tests/surface.c @@ -491,6 +491,20 @@ static void test_getdc(IDirect3DDevice9 *device) } } +static void test_surface_dimensions(IDirect3DDevice9 *device) +{ + IDirect3DSurface9 *surface; + HRESULT hr; + + hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 0, 1, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &surface, NULL); + ok(hr == D3DERR_INVALIDCALL, "CreateOffscreenPlainSurface returned %#x, expected D3DERR_INVALIDCALL.\n", hr); + if (SUCCEEDED(hr)) IDirect3DSurface9_Release(surface); + + hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &surface, NULL); + ok(hr == D3DERR_INVALIDCALL, "CreateOffscreenPlainSurface returned %#x, expected D3DERR_INVALIDCALL.\n", hr); + if (SUCCEEDED(hr)) IDirect3DSurface9_Release(surface); +} + START_TEST(surface) { HMODULE d3d9_handle; @@ -513,6 +527,7 @@ START_TEST(surface) test_lockrect_invalid(device_ptr); test_private_data(device_ptr); test_getdc(device_ptr); + test_surface_dimensions(device_ptr); refcount = IDirect3DDevice9_Release(device_ptr); ok(!refcount, "Device has %u references left\n", refcount);
1
0
0
0
Henri Verbeet : wined3d: Disallow empty surfaces.
by Alexandre Julliard
18 Nov '10
18 Nov '10
Module: wine Branch: master Commit: 4f651808fcae9c378af58585a28d265578b27899 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4f651808fcae9c378af58585a…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Nov 18 12:21:39 2010 +0100 wined3d: Disallow empty surfaces. --- dlls/d3d9/tests/visual.c | 7 ++----- dlls/wined3d/surface.c | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 9e5b9a0..f2eb4b4 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -10613,11 +10613,8 @@ static void depth_bounds_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 32, 32, MAKEFOURCC('N','V','D','B'), D3DPOOL_DEFAULT, &offscreen_surface, NULL); - todo_wine ok(hr != D3D_OK, "Able to create surface, hr = %08x\n", hr); - if(offscreen_surface) - { - IDirect3DSurface9_Release(offscreen_surface); - } + ok(FAILED(hr), "Able to create surface, hr %#x.\n", hr); + if (offscreen_surface) IDirect3DSurface9_Release(offscreen_surface); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 1.0, 0); ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 432eb9b..e60a684 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -353,6 +353,7 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type, /* FIXME: Check that the format is supported by the device. */ resource_size = wined3d_format_calculate_size(format, alignment, width, height); + if (!resource_size) return WINED3DERR_INVALIDCALL; /* Look at the implementation and set the correct Vtable. */ switch (surface_type)
1
0
0
0
Piotr Caban : msvcp80: Update spec file.
by Alexandre Julliard
18 Nov '10
18 Nov '10
Module: wine Branch: master Commit: 2fb7edc325ad5e580a3557aadd42ed00a1bb0dc0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2fb7edc325ad5e580a3557aad…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Nov 18 12:20:45 2010 +0100 msvcp80: Update spec file. --- dlls/msvcp80/msvcp80.spec | 48 ++++++++++++++++++++++---------------------- 1 files changed, 24 insertions(+), 24 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2fb7edc325ad5e580a355…
1
0
0
0
Piotr Caban : msvcp90/tests: Added basic_string<char>::append tests.
by Alexandre Julliard
18 Nov '10
18 Nov '10
Module: wine Branch: master Commit: d3b89e2d971146585e68620f87d11641aca245a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d3b89e2d971146585e68620f8…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Nov 18 12:20:36 2010 +0100 msvcp90/tests: Added basic_string<char>::append tests. --- dlls/msvcp90/tests/string.c | 80 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 80 insertions(+), 0 deletions(-) diff --git a/dlls/msvcp90/tests/string.c b/dlls/msvcp90/tests/string.c index 5d31289..15e46a4 100644 --- a/dlls/msvcp90/tests/string.c +++ b/dlls/msvcp90/tests/string.c @@ -61,6 +61,8 @@ static const char* (WINAPI *p_basic_string_char_cstr)(void); static const char* (WINAPI *p_basic_string_char_data)(void); static size_t (WINAPI *p_basic_string_char_size)(void); static void (WINAPI *p_basic_string_char_swap)(basic_string_char*); +static basic_string_char* (WINAPI *p_basic_string_char_append)(basic_string_char*); +static basic_string_char* (WINAPI *p_basic_string_char_append_substr)(basic_string_char*, size_t, size_t); static basic_string_wchar* (WINAPI *p_basic_string_wchar_ctor)(void); static basic_string_wchar* (WINAPI *p_basic_string_wchar_copy_ctor)(basic_string_wchar*); @@ -83,6 +85,8 @@ static const char* (__cdecl *p_basic_string_char_cstr)(basic_string_char*); static const char* (__cdecl *p_basic_string_char_data)(basic_string_char*); static size_t (__cdecl *p_basic_string_char_size)(basic_string_char*); static void (__cdecl *p_basic_string_char_swap)(basic_string_char*, basic_string_char*); +static basic_string_char* (WINAPI *p_basic_string_char_append)(basic_string_char*, basic_string_char*); +static basic_string_char* (WINAPI *p_basic_string_char_append_substr)(basic_string_char*, basic_string_char*, size_t, size_t); static basic_string_wchar* (__cdecl *p_basic_string_wchar_ctor)(basic_string_wchar*); static basic_string_wchar* (__cdecl *p_basic_string_wchar_copy_ctor)(basic_string_wchar*, basic_string_wchar*); @@ -157,6 +161,24 @@ static inline void* do_call_func3(void *func, void *_this, } return (void*)retval; } + +static inline void* do_call_func4(void *func, void *_this, + const void *arg1, const void *arg2, const void *arg3) +{ + volatile void* retval = 0; + __asm + { + push ecx + push arg1 + push arg2 + push arg3 + mov ecx, _this + call func + mov retval, eax + pop ecx + } + return (void*)retval; +} #else static void* do_call_func1(void *func, void *_this) { @@ -194,17 +216,32 @@ static void* do_call_func3(void *func, void *_this, ); return ret; } + +static void* do_call_func4(void *func, void *_this, + const void *arg1, const void *arg2, const void *arg3) +{ + void *ret, *dummy; + __asm__ __volatile__ ( + "pushl %5\n\tpushl %4\n\tpushl %3\n\tcall *%2" + : "=a" (ret), "=c" (dummy) + : "r" (func), "r" (arg1), "r" (arg2), "m" (arg3), "1" (_this) + : "edx", "memory" + ); + return ret; +} #endif #define call_func1(func,_this) do_call_func1(func,_this) #define call_func2(func,_this,a) do_call_func2(func,_this,(const void*)a) #define call_func3(func,_this,a,b) do_call_func3(func,_this,(const void*)a,(const void*)b) +#define call_func4(func,_this,a,b,c) do_call_func4(func,_this,(const void*)a,(const void*)b,(const void*)c) #else #define call_func1(func,_this) func(_this) #define call_func2(func,_this,a) func(_this,a) #define call_func3(func,_this,a,b) func(_this,a,b) +#define call_func4(func,_this,a,b,c) func(_this,a,b,c) #endif /* __i386__ */ @@ -246,6 +283,10 @@ static BOOL init(void) "?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEBA_KXZ"); p_basic_string_char_swap = (void*)GetProcAddress(msvcp, "?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAXAEAV12@@Z"); + p_basic_string_char_append = (void*)GetProcAddress(msvcp, + "?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z"); + p_basic_string_char_append_substr = (void*)GetProcAddress(msvcp, + "?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z "); p_basic_string_wchar_ctor = (void*)GetProcAddress(msvcp, "??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAA@XZ"); @@ -288,6 +329,10 @@ static BOOL init(void) "?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ"); p_basic_string_char_swap = (void*)GetProcAddress(msvcp, "?swap@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEXAAV12@@Z"); + p_basic_string_char_append = (void*)GetProcAddress(msvcp, + "?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z"); + p_basic_string_char_append_substr = (void*)GetProcAddress(msvcp, + "?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z"); p_basic_string_wchar_ctor = (void*)GetProcAddress(msvcp, "??0?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ"); @@ -420,6 +465,40 @@ static void test_basic_string_char_swap(void) { call_func1(p_basic_string_char_dtor, &str2); } +static void test_basic_string_char_append(void) { + basic_string_char str1, str2; + const char *str; + + if(!p_basic_string_char_ctor_cstr || !p_basic_string_char_dtor + || !p_basic_string_char_append || !p_basic_string_char_append_substr + || !p_basic_string_char_cstr) { + win_skip("basic_string<char> unavailable\n"); + return; + } + + call_func2(p_basic_string_char_ctor_cstr, &str1, ""); + call_func2(p_basic_string_char_ctor_cstr, &str2, "append"); + + call_func2(p_basic_string_char_append, &str1, &str2); + str = call_func1(p_basic_string_char_cstr, &str1); + ok(!memcmp(str, "append", 7), "str = %s\n", str); + + call_func4(p_basic_string_char_append_substr, &str1, &str2, 3, 1); + str = call_func1(p_basic_string_char_cstr, &str1); + ok(!memcmp(str, "appende", 8), "str = %s\n", str); + + call_func4(p_basic_string_char_append_substr, &str1, &str2, 5, 100); + str = call_func1(p_basic_string_char_cstr, &str1); + ok(!memcmp(str, "appended", 9), "str = %s\n", str); + + call_func4(p_basic_string_char_append_substr, &str1, &str2, 6, 100); + str = call_func1(p_basic_string_char_cstr, &str1); + ok(!memcmp(str, "appended", 9), "str = %s\n", str); + + call_func1(p_basic_string_char_dtor, &str1); + call_func1(p_basic_string_char_dtor, &str2); +} + static void test_basic_string_wchar(void) { static const wchar_t test[] = { 't','e','s','t',0 }; @@ -536,6 +615,7 @@ START_TEST(string) test_basic_string_char(); test_basic_string_char_swap(); + test_basic_string_char_append(); test_basic_string_wchar(); test_basic_string_wchar_swap();
1
0
0
0
Piotr Caban : msvcp90: Added basic_string<wchar_t>::append implementation.
by Alexandre Julliard
18 Nov '10
18 Nov '10
Module: wine Branch: master Commit: b99c582402a23199a979118ad7a16f85a6bf50da URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b99c582402a23199a979118ad…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Nov 18 12:20:26 2010 +0100 msvcp90: Added basic_string<wchar_t>::append implementation. --- dlls/msvcp90/msvcp90.spec | 8 ++++---- dlls/msvcp90/string.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index f3bfd74..f41cf79 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -2944,10 +2944,10 @@ @ stub -arch=win64 ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0@Z @ stub -arch=win32 ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAEAAV12@V?$_String_const_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@0@Z @ stub -arch=win64 ?append@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QEAAAEAV12@_KG@Z -@ stub -arch=win32 ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@@Z -@ stub -arch=win64 ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@@Z -@ stub -arch=win32 ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@II@Z -@ stub -arch=win64 ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@_K1@Z +@ thiscall -arch=win32 ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@@Z(ptr ptr) MSVCP_basic_string_wchar_append +@ cdecl -arch=win64 ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@@Z(ptr ptr) MSVCP_basic_string_wchar_append +@ thiscall -arch=win32 ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@II@Z(ptr ptr long long) MSVCP_basic_string_wchar_append_substr +@ cdecl -arch=win64 ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@_K1@Z(ptr ptr long long) MSVCP_basic_string_wchar_append_substr @ stub -arch=win32 ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@I_W@Z @ stub -arch=win64 ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@PEB_W0@Z @ stub -arch=win32 ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@PB_W0@Z diff --git a/dlls/msvcp90/string.c b/dlls/msvcp90/string.c index 6fa65bd..db9022f 100644 --- a/dlls/msvcp90/string.c +++ b/dlls/msvcp90/string.c @@ -1092,3 +1092,34 @@ void __thiscall MSVCP_basic_string_wchar_swap(basic_string_wchar *this, basic_st str->res = res; } } + +/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@II@Z */ +/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */ +DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_substr, 16) +basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_substr(basic_string_wchar *this, + basic_string_wchar *append, size_t offset, size_t count) +{ + if(append->size < offset) + MSVCP__String_base_Xran(); + + if(count > append->size-offset) + count = append->size-offset; + + if(basic_string_wchar_grow(this, this->size+count, FALSE)) { + MSVCP_char_traits_wchar__Copy_s(basic_string_wchar_ptr(this)+this->size, + this->res-this->size, basic_string_wchar_ptr(append)+offset, count); + basic_string_wchar_eos(this, this->size+count); + } + + return this; +} + +/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@ABV12@@Z */ +/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QEAAAEAV12@AEBV12@@Z */ +DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append, 8) + basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append( + basic_string_wchar *this, basic_string_wchar *append) +{ + return MSVCP_basic_string_wchar_append_substr(this, append, + 0, MSVCP_basic_string_wchar_npos); +}
1
0
0
0
Piotr Caban : msvcp90: Added basic_string<char>::append implementation.
by Alexandre Julliard
18 Nov '10
18 Nov '10
Module: wine Branch: master Commit: 44039975c8cf232b1334e66cd25bc7e5cd680e80 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44039975c8cf232b1334e66cd…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Thu Nov 18 12:19:59 2010 +0100 msvcp90: Added basic_string<char>::append implementation. --- dlls/msvcp90/msvcp90.spec | 8 ++++---- dlls/msvcp90/string.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index dbbf0b5..f3bfd74 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -2916,10 +2916,10 @@ @ cdecl -arch=win64 ?allocate@?$allocator@_W@std@@QEAAPEA_W_KPEBX@Z(ptr long ptr) MSVCP_allocator_wchar_allocate_hint @ stub -arch=win32 ?always_noconv@codecvt_base@std@@QBE_NXZ @ stub -arch=win64 ?always_noconv@codecvt_base@std@@QEBA_NXZ -@ stub -arch=win32 ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z -@ stub -arch=win64 ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z -@ stub -arch=win32 ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z -@ stub -arch=win64 ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z +@ thiscall -arch=win32 ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z(ptr ptr) MSVCP_basic_string_char_append +@ cdecl -arch=win64 ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z(ptr ptr) MSVCP_basic_string_char_append +@ thiscall -arch=win32 ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z(ptr ptr long long) MSVCP_basic_string_char_append_substr +@ cdecl -arch=win64 ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z(ptr ptr long long) MSVCP_basic_string_char_append_substr @ stub -arch=win32 ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z @ stub -arch=win64 ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@PEBD0@Z @ stub -arch=win32 ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD0@Z diff --git a/dlls/msvcp90/string.c b/dlls/msvcp90/string.c index fb51ae4..6fa65bd 100644 --- a/dlls/msvcp90/string.c +++ b/dlls/msvcp90/string.c @@ -757,6 +757,37 @@ size_t __thiscall MSVCP_basic_string_char_length(basic_string_char *this) return this->size; } +/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z */ +/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@_K1@Z */ +DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_substr, 16) +basic_string_char* __thiscall MSVCP_basic_string_char_append_substr(basic_string_char *this, + basic_string_char *append, size_t offset, size_t count) +{ + if(append->size < offset) + MSVCP__String_base_Xran(); + + if(count > append->size-offset) + count = append->size-offset; + + if(basic_string_char_grow(this, this->size+count, FALSE)) { + MSVCP_char_traits_char__Copy_s(basic_string_char_ptr(this)+this->size, + this->res-this->size, basic_string_char_ptr(append)+offset, count); + basic_string_char_eos(this, this->size+count); + } + + return this; +} + +/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@@Z */ +/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QEAAAEAV12@AEBV12@@Z */ +DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append, 8) +basic_string_char* __thiscall MSVCP_basic_string_char_append( + basic_string_char *this, basic_string_char *append) +{ + return MSVCP_basic_string_char_append_substr(this, append, + 0, MSVCP_basic_string_char_npos); +} + /* basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t>> */ /* ?npos@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@2IB */
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
87
Older →
Jump to page:
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200