Re: riched20: Set control content in WM_CREATE message

2013-10-08 Thread Piotr Caban
Hi Akihiro, On 10/08/13 12:51, Akihiro Sagawa wrote: On Sat, 05 Oct 2013 14:54:07 +0200, Piotr Caban wrote: + if (!(editor->styleFlags & ES_MULTILINE)) + { +len = 0; +while(textW[len] != '0' && textW[len] != '\r' &a

Re: msvcrt: add support for _chsize_s (try #2)

2013-10-07 Thread Piotr Caban
Hi, On 10/06/13 00:45, morphiend wrote: + * _chsize_s (MSVCRT.@) + */ +int CDECL MSVCRT__chsize_s(int fd, __int64 size) +{ +LARGE_INTEGER cur, pos; +LARGE_INTEGER temp = { 0 }; This causes compilation warnings. There's also a trailing space in this line. +TRACE("(fd=%

Re: [PATCH 2/2] msvcrt: Fix lookahead buffer usage on pipes (try2)

2013-08-21 Thread Piotr Caban
Please ignore this patch, I'll send a better version.

Re: [PATCH 2/4] oleaut32: Implement ICreateTypeInfo::SetTypeDescAlias

2013-08-20 Thread Piotr Caban
On 08/20/13 16:57, Andrew Eikum wrote: @@ -10530,8 +10541,28 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeDescAlias(ICreateTypeInfo2 *ifac +This->cbSizeInstance = VARIANT_DataSize(This->tdescAlias->vt, This->pTypeLib->ptr_size); +if(!This->cbSizeInstance){ +FIXME("Wrong si

Re: [PATCH 4/6] oleaut32: TKIND_ALIAS improvements

2013-08-17 Thread Piotr Caban
On 08/16/13 21:40, Andrew Eikum wrote: @@ -8502,7 +8502,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnCreateTypeInfo(ICreateTypeLib2 *iface, info->cbSizeInstance = 2; break; case TKIND_ALIAS: -info->cbSizeInstance = -0x75; +info->cbSizeInstance = 4;

Re: msvcp90/tests: Skip tests on missing functions

2013-08-07 Thread Piotr Caban
On 08/06/13 23:00, André Hentschel wrote: @@ -749,6 +749,13 @@ static BOOL init(void) SET(p_basic_istream_char_read_uint64, "??5?$basic_istream@DU?$char_traits@D@std@@@std@@QAEAAV01@AA_K@Z"); + +if (!p_basic_istream_char_read_uint64) +{ +skip(

Re: msvcrt: invoke invalid_handler in _wcscpy_s

2013-08-05 Thread Piotr Caban
On 08/02/13 20:08, Daniel Lehman wrote: +if(!MSVCRT_CHECK_PMT(wcDest)) +{ +*MSVCRT__errno() = MSVCRT_EINVAL; return MSVCRT_EINVAL; +} The MSVCRT_CHECK_PMT macro sets the errno value. There's also MSVCRT_CHECK_PMT_ERR macro if you need to set different error.

Re: [PATCH 1/6] scrrun: Store reference count inside IFileSystem3 object

2013-07-25 Thread Piotr Caban
On 07/25/13 14:36, Nikolay Sivov wrote: On 7/25/2013 16:35, Piotr Caban wrote: --- dlls/scrrun/filesystem.c | 163 +++ 1 file changed, 123 insertions(+), 40 deletions(-) Why do you need this? My bad, I was planning to store some kind of seed inside

Re: gdiplus: Added support for UTF16 encoded strings in load_ttf_name_id

2013-07-03 Thread Piotr Caban
On 07/03/13 13:34, Alexandre Julliard wrote: Piotr Caban writes: This patch fixes bug 33880. It's reported as regression but I think that it stopped working because of game update. I would guess that it's because gdi32 is properly loading localized names now. Gdiplus should m

Re: [PATCH 2/2] msvcrt: Add some _mbstok tests

2013-06-21 Thread Piotr Caban
On 06/21/13 12:24, Marvin wrote: Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at http://testbot.winehq.org/JobDetails.

Re: [PATCH 1/2] server: Don't create new handle when DUP_HANDLE_CLOSE_SOURCE is used if possible (try2)

2013-06-05 Thread Piotr Caban
On 06/04/13 21:56, Alexandre Julliard wrote: Piotr Caban writes: @@ -890,6 +890,7 @@ struct rawinput_device obj_handle_t handle; /* duplicated handle in dst process */ int self; /* is the source the current process? */ int closed

Re: msvcp90: Prefer native version.

2013-05-17 Thread Piotr Caban
On 05/17/13 10:47, Dmitry Timoshkov wrote: Piotr Caban wrote: Just like msvcp60,msvcp70,msvcp71,msvcp80,msvcp100,msvcp110 do. ... msvcp90 has some wine specific exports. This patch breaks other msvcpXX dlls when native msvcp90 is installed. Isn't that the case for other msvcp* dlls?

Re: msvcp90: Prefer native version.

2013-05-17 Thread Piotr Caban
On 05/17/13 10:22, Dmitry Timoshkov wrote: Piotr Caban wrote: Just like msvcp60,msvcp70,msvcp71,msvcp80,msvcp100,msvcp110 do. ... msvcp90 has some wine specific exports. This patch breaks other msvcpXX dlls when native msvcp90 is installed. Isn't that the case for other msvcp* dlls?

Re: msvcp90: Prefer native version.

2013-05-17 Thread Piotr Caban
On 05/17/13 08:01, Dmitry Timoshkov wrote: Just like msvcp60,msvcp70,msvcp71,msvcp80,msvcp100,msvcp110 do. --- dlls/msvcp90/msvcp90_main.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/msvcp90/msvcp90_main.c b/dlls/msvcp90/msvcp90_main.c index 7a7aafe..ce56c14 10

Re: [PATCH] msvcrt: fix character/byte confusion in buffer overflow branch

2013-05-07 Thread Piotr Caban
On 05/07/13 17:46, Juan Lang wrote: In general, I think you want to send this to wine-patches, not here. This patch was also sent to wine-patches. On Mon, May 6, 2013 at 12:26 PM, Max Kellermann mailto:m...@duempel.org>> wrote: --- dlls/msvcrt/printf.h |2 +- 1 file changed

Re: Problem about declarations of strcoll functions

2013-04-01 Thread Piotr Caban
Hi Jactry. On 03/31/13 14:40, Jactry Zeng wrote: As we can see, _strcoll_l and _mbsnbcoll_l were implemented but they were not declared. Should we declare all of them? And whether the sequence was important? The functions should have been defined in headers. The order of definitions is not impo

Re: msvcp110: Add VS2012 C/C++ runtime

2013-03-29 Thread Piotr Caban
On 03/28/13 23:22, Stefan Leichter wrote: --- configure.ac|1 + dlls/msvcp110/Makefile.in |5 + dlls/msvcp110/msvcp110.c| 37 + dlls/msvcp110/msvcp110.spec | 3900 +++ 4 files changed, 3943 insertions(+), 0 deletions(-)

Re: [PATCH 1/3] msvcr90: Forward some functions directly to ntdll

2013-03-27 Thread Piotr Caban
On 03/27/13 12:13, Alexandre Julliard wrote: Piotr Caban writes: These functions are currently forwarded from msvcr90 to msvcrt which forwards to ntdll. Naver LINE is crashing while trying to call them. Does it work if you remove the forward in msvcrt instead? That would be a better fix

Re: [PATCH 2/2] msvcrt: Fixed fgetwc behavior on multibyte characters and unicode files

2013-03-20 Thread Piotr Caban
On 03/20/13 09:41, Akihiro Sagawa wrote: On Mon, 18 Mar 2013 17:11:04 +0100, Piotr Caban wrote: +char mbs[2]; This should be a constant, like MSVCRT_MB_LEN_MAX. +int len = 0; +ch = MSVCRT_fgetc(file); +if(ch != MSVCRT_EOF) { +mbs[0] = (char)ch

Re: msvcrt/tests: Mark win8 behaviour as broken

2013-02-27 Thread Piotr Caban
On 02/26/13 23:57, André Hentschel wrote: diff --git a/dlls/msvcrt/tests/time.c b/dlls/msvcrt/tests/time.c index 30d9fa7..3d00769 100644 --- a/dlls/msvcrt/tests/time.c +++ b/dlls/msvcrt/tests/time.c @@ -181,8 +181,8 @@ static void test_gmtime(void) err = p_gmtime32_s(&gmt_tm_s, &gmt); -

Re: [PATCH 5/8] vbscript: Added RegExp.Execute tests

2013-02-19 Thread Piotr Caban
On 02/19/13 12:47, Marvin wrote: Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at http://testbot.winehq.org/JobDetails.

Re: [PATCH 7/8] vbscript: Added tests for invalid parameters in regular expression functions

2013-02-19 Thread Piotr Caban
On 02/19/13 12:48, Marvin wrote: Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at http://testbot.winehq.org/JobDetails.

Re: [PATCH 2/5] vbscript: Added IRegExp2_QueryInterface tests

2013-02-15 Thread Piotr Caban
On 02/15/13 15:13, Marvin wrote: Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at http://testbot.winehq.org/JobDetails.

Re: [PATCH 2/2] jscript: Fixed a leak in regexp_match function

2013-01-25 Thread Piotr Caban
On 01/25/13 16:30, Marcus Meissner wrote: On Fri, Jan 25, 2013 at 04:26:59PM +0100, Piotr Caban wrote: @@ -3466,10 +3466,15 @@ static HRESULT regexp_match(script_ctx_t *ctx, jsdisp_t *dispex, jsstr_t *str, B break; if(ret_size == i) { -if(ret

Re: Reload a DLL and _getptd returns zero

2013-01-16 Thread Piotr Caban
On 01/15/13 22:36, Michael Ost wrote: Do you know what the implications are of using this hack? Would it simply be that any windows code that wants to use FlsAlloc would fail to load with a wine linkage error? Yes, any code that uses the function will fail while trying to call it. Also, is thi

Re: Reload a DLL and _getptd returns zero

2013-01-15 Thread Piotr Caban
On 1/15/13 7:59 PM, Michael Ost wrote: On 01/15/2013 03:39 AM, Piotr Caban wrote: The crash is caused by incomplete FlsFree implementation. There's a comment in it's code that says what needs to be added: /* FIXME: add equivalent of ThreadZeroTlsCell here */ Really? Are you sure

Re: Reload a DLL and _getptd returns zero

2013-01-15 Thread Piotr Caban
On 01/15/13 00:32, Michael Ost wrote: Here's a link to a zip file that includes the prebuilt .exe and .dll windows binaries that crash in wine. Plus the code. https://dl.dropbox.com/u/97386125/msvcrt-dll-problem.zip The crash is caused by incomplete FlsFree implementation. There's a comment in

Re: msvcrt: implement _strxfrm_l

2012-12-17 Thread Piotr Caban
On 12/14/12 10:28, Jérôme Gardou wrote: --- dlls/msvcrt/msvcrt.spec |2 +- dlls/msvcrt/string.c| 26 -- 2 files changed, 25 insertions(+), 3 deletions(-) Please add parameters validation. The function also behaves differently with native msvcrt when output

Re: msvcrt: implement _ftol in msvcrt instead of forwarding to ntdll (1/2)

2012-12-13 Thread Piotr Caban
On 12/13/12 02:57, Austin English wrote: + * Based on MSVCRT__ftol in dlls/ntdll/misc.c + */ +#if defined(__GNUC__) && defined(__i386__) +LONGLONG CDECL MSVCRT__ftol(void) +{ +@ cdecl -ret64 _ftol() MSVCRT__ftol +@ cdecl -ret64 _ftol2() MSVCRT__ftol This will not work on 64-bit build or when __G

Re: [PATCH 2/2] gdi32: Added GetGlyphOutlineW tests on glyph that contains empty contour (try3)

2012-11-13 Thread Piotr Caban
On 11/13/12 13:10, Dmitry Timoshkov wrote: Piotr Caban wrote: create mode 100644 dlls/gdi32/tests/test_empty_contour.sfd create mode 100644 dlls/gdi32/tests/test_empty_contour.ttf Is it possible to add the desired glyph to an already existing test font? Yes, I was adding it first to

Re: [PATCH 1/2] gdi32: Ignore contours containing one point in get_glyph_outline function

2012-11-09 Thread Piotr Caban
Please ignore this patches for now, the tests are broken.

Re: scrrun: Implement IDictionary get_HashVal (try 3)

2012-11-08 Thread Piotr Caban
On 11/8/2012 12:31, Alistair Leslie-Hughes wrote: +static LONG create_hash_val(BSTR name) +{ +LONG hash = 0; The create_hash_val function should do the computations on unsigned variable. On 11/08/12 15:26, Nikolay Sivov wrote: On 11/8/2012 12:31, Alistair Leslie-Hughes wrote: +static LONG

Re: [PATCH 2/4] msvcrt: Improved _atoflt_l precision

2012-11-06 Thread Piotr Caban
On 11/05/12 18:02, Alexandre Julliard wrote: Piotr Caban writes: --- dlls/msvcrt/string.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) It doesn't work here: ../../../tools/runtest -q -P wine -M msvcr90.dll -T ../../.. -p msvcr90_test.exe.so msvcr90.c &&

Re: scrrun: Implement IDictionary get_HashVal (try 2)

2012-11-02 Thread Piotr Caban
On 11/02/12 10:49, Alistair Leslie-Hughes wrote: +static LONG create_hash_val(BSTR name) +{ +LONG hash = 0; +int len = SysStringLen(name); The hash should be unsigned. +if(V_VT(Key) != VT_R8) + hr = VariantChangeType(&real, Key, 0, VT_R8); I'm not sure if you want to use

Re: [PATCH 3/4] msvcp90: in istream<>::tellg don't use sentry

2012-10-30 Thread Piotr Caban
On 10/30/12 10:16 PM, Daniel Lehman wrote: +tpos.pos = 0xdeadbeefdeadbeef; Long long constants are not supported in C89. You can use 0xdeadbeef here.

Re: scrrun: Add basic IDictionary getHasVal support

2012-10-30 Thread Piotr Caban
Hi, On 10/30/12 09:51, Alistair Leslie-Hughes wrote: +static LONG create_hash_val(BSTR name) +{ +LONG hash = 0; +int len = SysStringLen(name); +int i; + +for(i =0; i < len; i++) +{ + hash += name[i]; +} + +return hash; +} This hashing function will have lots of c

Re: msvcp: free facet and _Locimp in Locimp dtor

2012-10-18 Thread Piotr Caban
On 10/17/12 19:20, Daniel Lehman wrote: How about something like the attached? Looks good for me. I would add base class destruction in _Locimp_dtor (locale::facet class). It's an empty function, but it's probably good to call it anyway, so if something changes in future it will be less likely

Re: msvcp: free facet and _Locimp in Locimp dtor

2012-10-17 Thread Piotr Caban
On 10/17/12 5:04 PM, Daniel Lehman wrote: Memory allocated for locale__Locimp object should be freed in locale class (locale_dtor function). You can't delete it here. Yeah, wasn't entirely sure about the location, but I want to call delete as soon as the refcount is 0 and can only reliably do

Re: msvcp: free facet and _Locimp in Locimp dtor

2012-10-17 Thread Piotr Caban
On 10/17/12 02:35, Daniel Lehman wrote: @@ -7241,10 +7241,11 @@ void __thiscall locale__Locimp_dtor(locale__Locimp *this) MSVCP_size_t i; for(i=0; ifacet_cnt; i++) if(this->facetvec[i] && locale_facet__Decref(this->facetvec[i])) -call_locale_facet

Re: msvcp90: fix parsing in num_get<>::_Getifld

2012-10-11 Thread Piotr Caban
On 10/11/12 00:27, Daniel Lehman wrote: -if(!base && first->strbuf && first->val==digits[0]) { +if(first->strbuf && first->val==digits[0]) { +found_zero = TRUE; istreambuf_iterator_wchar_inc(first); if(first->strbuf && (first->val==mb_to_wc('x', &this->cvt) || fi

Re: msvcp90: in codecvt::do_out, copy local buffer to *to_next

2012-10-10 Thread Piotr Caban
On 10/10/12 19:42, Daniel Lehman wrote: +memcpy_s(*to_next, MB_LEN_MAX, buf, size); You may use memory after to_end in this code. to_next buffer size should be probably following: memcpy_s(*to_next, to_end-to_next, buf, size); Cheers, Piotr

Re: wininet/tests(1/2): Test CommitUrlCacheEntry with the original URL parameter

2012-10-02 Thread Piotr Caban
On 10/02/12 03:30, Juan Lang wrote: +/* On the other hande, GetUrlCacheEntryInfoEx allows you to query the + * original URL. + */ There's a typo, should be "On the other hand". +/* Strangely, you can create a cache entry redirected to itself. */ +ret = CreateUrlCacheEntry(test

Re: wininet(2/2): Fail to commit a url cache entry when the original URL is specified and no local filename is given

2012-10-02 Thread Piotr Caban
On 10/02/12 03:31, Juan Lang wrote: @@ -3084,6 +3084,11 @@ static BOOL CommitUrlCacheEntryInternal( SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } +if (lpszOriginalUrl && !lpszLocalFileName) +{ +SetLastError(ERROR_INVALID_PARAMETER); +return F

Re: [1/4] Assorted spelling fixes.

2012-10-01 Thread Piotr Caban
Hi, On 10/01/12 13:07, Julian Rüger wrote: Hi Francois, - * size [I] How much percent of cache space should be free. + * size [I] How many percents of the cache should be free. Maybe something like "Precentage of cache that should be free" would sound more natural. Howe

Re: Unused msvcp100 functions?

2012-08-27 Thread Piotr Caban
On 08/27/12 02:02, Francois Gouget wrote: There are a lot of msvcp100 functions that look like they are unused: * In string.c all of the MSVCP__String_base_*(), MSVCP_basic_string_*(), MSVCP_basic_string_wchar_*() and MSVCP_char_traits_*() functions, basic_string_w?char_replace_hel

Re: user32: Don't limit time needed for WM_DDE_INITIATE processing.

2012-08-21 Thread Piotr Caban
On 08/21/12 17:40, Alexandre Julliard wrote: Piotr Caban writes: Current timeout is too small for Microsoft Office 2010 in some cases. I've checked that DdeConnect succeeds on windows when it needs to wait for 10 minutes. Are you sure that you want to remove the SMTO_ABORTIFHUNG flag?

Incompatibilities between different versions of msvcp dlls

2012-07-27 Thread Piotr Caban
Hi, There are many small differences between functions exported by different versions of msvcp. Currently only msvcp60 contains a partial copy of msvcp90 dll but it needs to be done for other dlls as well. There are classes that are very similar but have different virtual functions table dep

Re: [rfc msvcp100] add Container_base::_Orphan_all

2012-07-24 Thread Piotr Caban
On 07/20/12 19:32, Dan Kegel wrote: I have not tested at all on 64 bits, and am only guessing on the calling convention stuff. The calling convention is correct. The class name is _Container_base0 (not _Container_base). I can't say anything about the implementation. I don't know what this cla

Re: msvcp90: Fix __cdecl functions definitions that returns structures

2012-07-02 Thread Piotr Caban
On 06/29/12 19:33, Alexandre Julliard wrote: Piotr Caban writes: In code produced by gcc callee removes hidden return argument. In code produced by MS Visual Studio caller is responsible for removing the hidden argument. That's only for structures larger than 8 bytes, which isn'

Re: Integer overflow problem in string::compare()

2012-07-02 Thread Piotr Caban
Hi, On 07/02/12 04:13, Dan Kegel wrote: could you review the patch in http://bugs.winehq.org/show_bug.cgi?id=31085 ? If you like it, I'll submit it to wine-patches. It passes winetestbot and gets pulsen and stepmania past the splash screen abort. This patch looks correct. It's also good to fix

Re: Unused msvcp60 functions

2012-06-28 Thread Piotr Caban
On 06/28/12 16:33, Francois Gouget wrote: Actually there are some implementation differences between msvcp60's and msvcp90's misc.c code. In particular for the init_lockit(), free_lockit() and various _Lockit_ctor_*() functions. Are the two implementations supposed to be identical? I forgot that

Re: [2/2] msvcp90: Sync spec files

2012-06-28 Thread Piotr Caban
First patch looks correct. On 06/28/12 12:33, Owen Rudge wrote: dlls/msvcp60/msvcp60.spec | 638 ++-- You can't update msvcp60.spec file this way (most of functions there should not be forwarded to msvcp90).

Re: Unused msvcp60 functions

2012-06-28 Thread Piotr Caban
On 06/28/12 09:30, Francois Gouget wrote: I get the following warnings when compiling msvcp60: main.c:108:51: warning: ‘std_BADOFF_func’ defined but not used [-Wunused-function] misc.c:66:40: warning: ‘mutex_mutex_lock’ defined but not used [-Wunused-function] misc.c:73:40: warning: ‘mutex_mut

Re: msvcrt/tests: Fix portuguese locale test on NT4

2012-06-14 Thread Piotr Caban
On 06/14/12 11:41, Marvin wrote: === WINEBUILD (build) === Patch failed to apply Looks like wine source was not updated on testbot yesterday.

Re: msvcrt: Fix the name of the Portuguese locale alias.

2012-06-14 Thread Piotr Caban
On 06/13/12 23:51, Bruno Jesus wrote: Just a side note. Although I'm not sure I think portuguese is "ptg", brazilian portuguese is "ptb". So the correct may be: +"portuguese", "ptg", A Portugal user would be able to check that, or maybe it's easier to write a testcase. There already is a

Re: Misspelt Portuguese in msvcrt

2012-06-13 Thread Piotr Caban
On 06/13/12 05:19, Francois Gouget wrote: Is there a reason why Portuguese is misspelt in these two places? It's a typo. Thanks for spotting it.

Re: Fix the FIXME message to reflect the real problem.

2012-06-04 Thread Piotr Caban
On 06/02/12 13:35, m...@mtew.isa-geek.net wrote: @@ -2735,7 +2735,7 @@ static BOOL CommitUrlCacheEntryInternal( goto cleanup; } -FIXME("entry already in cache - don't know what to do!\n"); +FIXME("collision handler needed - the entry is already in use!\n")

Re: [PATCH 1/3] user32: Added GetMenuBarInfo implementation

2012-05-12 Thread Piotr Caban
On 05/11/12 17:49, Alexandre Julliard wrote: Do you really have an app that requires an exception handler? No, I'll resend the patches without exception handling.

Re: [PATCH 2/2] wininet: Add a new common module information struct

2012-04-18 Thread Piotr Caban
On 04/16/12 22:03, Morten Rønne wrote: Add a new common module information struct for urlcache and functions to do initialization of the struct. This is intended to be a new way to more easily create Ansi and Unicode version of the functions, by doing a Ansi/Unicode preamble code that calls a com

Re: [PATCH 1/2] wininet: Update structs with more information in preparation for implementation of more functionality.

2012-04-18 Thread Piotr Caban
On 04/16/12 22:00, Morten Rønne wrote: +DWORD AllocationTable[0xF6C]; There are defines describing allocation table size. It's better to define it as BYTE AllocationTable[ALLOCATION_TABLE_SIZE];

Re: msvcp90: Add codecvt ctors and dtors

2012-04-16 Thread Piotr Caban
Hi, On 04/16/12 02:50, William Panlener wrote: typedef struct { + locale_facet facet; + /* FIXME: type definition in standard but var here */ + enum { ok, partial, error, noconv } result; +} codecvt_base; This structure has incorrect size. It should not contain result variable. +typed

Re: [PATCH 1/6] msvcrt: Rewrite asctime function

2012-04-11 Thread Piotr Caban
On 04/10/12 20:04, David Laight wrote: But see also http://www.hermetic.ch/cal_stud/cal_art.html for some info about which years were/are actually leap years ... This is not how msvcrt handles dates. Additionally most of the functions are refusing to work on dates before 1900.

Re: [PATCH 2/3] wininet/tests: Added more tests for urlcache, including a new flag in CacheEntryType.

2012-04-07 Thread Piotr Caban
On 4/7/12 12:48 PM, Morten Rønne wrote: How should I go about moving it? Should the patch (as it has been commited) be removed from wine or should I send a new one, based on the current state? Send a new patch based on current state. You can also change it a little later, e.g. while improving D

Re: ddraw: Improve GetScanLine stub so it's usable for timing related tasks

2012-04-06 Thread Piotr Caban
On 04/06/12 13:33, Christian Costa wrote: Le 06/04/2012 12:35, Piotr Caban a écrit : + /* Simulate a 60Hz display */ + time = GetTickCount(); + frame_progress = time& 15; /* time % (1000 / 60) */ + if (!frame_progress) + { + *Scanline = 0; + return DDERR_VERTICALBLANKINPROG

Re: [PATCH 2/3] wininet/tests: Added more tests for urlcache, including a new flag in CacheEntryType.

2012-04-06 Thread Piotr Caban
Hi, On 04/05/12 08:50, Morten Rønne wrote: diff --git a/include/wininet.h b/include/wininet.h #define URLHISTORY_CACHE_ENTRY 0x0020 +#define DELETED_CACHE_ENTRY 0x0040 #define TRACK_OFFLINE_CACHE_ENTRY 0x0010 DELETED_CACHE_ENTRY is not defined in native w

Re: urlcache: what all are you working on?

2012-04-05 Thread Piotr Caban
Hi, It's hard to divide the work in any ways right now, since all of us were looking for bugs and fixing them. Before the work may be split in any way, some basic problems needs to be fixed. I think we're slowly getting to the point when index.dat is no longer getting corrupted (of course the

Re: [PATCH 1/2] urlmon: Add mime handler layer before data is processed

2012-03-16 Thread Piotr Caban
On 03/16/12 15:05, Marvin wrote: Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at http://testbot.winehq.org/JobDetails.

Re: services: Avoid a race when service_entry is freed and process is terminated

2012-01-13 Thread Piotr Caban
On 01/13/12 20:40, Piotr Caban wrote: --- programs/services/rpc.c | 7 --- 1 files changed, 4 insertions(+), 3 deletions(-) Please ignore this patch.

Re: msvcp90: add basic_ios stubs

2012-01-06 Thread Piotr Caban
On 01/05/12 22:41, Daniel Lehman wrote: +/* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QAE?AVlocale@2@ABV32@@Z */ +/* ?imbue@?$basic_ios@_WU?$char_traits@_W@std@@@std@@QEAA?AVlocale@2@AEBV32@@Z */ +DEFINE_THISCALL_WRAPPER(basic_ios_wchar_imbue, 4) +locale __thiscall basic_ios_wchar_imbu

Re: [PATCH] msvcp60: Avoid a crash, when the ptr in basic_string_char is NULL

2012-01-05 Thread Piotr Caban
Hi, void __thiscall basic_string_char__Eos(basic_string_char *this, MSVCP_size_t len) { -this->size = len; -this->ptr[len] = 0; +if (this->ptr) { +this->size = len; +this->ptr[len] = 0; +} } This function should not be called if this->ptr is NULL. The bug i

Re: msvcr90: Implement fread_s. (try 2)

2011-12-23 Thread Piotr Caban
On 12/23/11 08:44, Kusanagi Kouichi wrote: + if (!buf) + { +_invalid_parameter(NULL, NULL, NULL, 0, 0); +return 0; + } You should set errno here. + if (bufsize / size< count) + { +fread(buf, bufsize, 1, fp); +if (!feof(fp)) +{ + _invalid_parameter(NULL, NULL, NUL

Re: [2/2] msvcr90: Implement fread_s.

2011-12-22 Thread Piotr Caban
On 12/22/11 12:08, Kusanagi Kouichi wrote: It might be my fault. I can mix them normally. But even if the test do only fopen() fread_s() I've send a simple test to test bot. It doesn't crash there, it also shows when read_s should succeed and fails with your implementation. https://testbot.win

Re: [2/2] msvcr90: Implement fread_s.

2011-12-21 Thread Piotr Caban
On 12/21/11 16:49, Kusanagi Kouichi wrote: + if (bufsize / size< count) + { +_invalid_parameter(NULL, NULL, NULL, 0, 0); +fseek(fp, bufsize, SEEK_CUR); It's not correct to make a seek here. The file position changes you're observing is related to data being read to FILE buffer. This

Re: Looking to implement msvcp90's basic_ifstream (and friends)

2011-12-19 Thread Piotr Caban
On 12/19/11 07:44, Aaron Faanes wrote: My plan is to put codecvt stuff in a new dlls/msvcp90/codecvt.c file, with header definitions in msvcp90.h. Is this a good idea, or should it go elsewhere? I would probably add it to locale.c file. If I do put them in a new file, should I put myself as th

Re: Looking to implement msvcp90's basic_ifstream (and friends)

2011-12-18 Thread Piotr Caban
On 12/17/11 10:10 PM, Aaron Faanes wrote: I agree that the locale stuff should come first. Would implementing the stubs in dlls/msvcp90/locale.c be a good place to start? I'm working on implementing collate and ctype classes. You can pick some other locale facet classes to implement (e.g. codec

Re: Looking to implement msvcp90's basic_ifstream (and friends)

2011-12-17 Thread Piotr Caban
On 12/16/11 11:18 PM, Aaron Faanes wrote: The bug is due to msvcp90 missing its file I/O stuff. There's a lot of classes/functions that io classes depends on. My current goal is to implement cout in msvcp90, in order to do it I need to add support for locales first (there's still around 40 clas

Re: [PATCH 1/7] msvcrt: Added _get_current_locale impementation

2011-12-06 Thread Piotr Caban
This patches are broken, please ignore them. I'll need to implement locale reference counters inside msvcrt first.

Re: Using native msvc*.dll: all or nothing?

2011-11-18 Thread Piotr Caban
On 11/17/11 21:34, Dan Kegel wrote: err:module:find_forwarded_export function not found for forward 'msvcrt.__CxxFrameHandler3' used by L"C:\\windows\\system32\\msvcr90.dll". If you are using builtin L"msvcr90.dll", try using the native one instead. This error is about using native msvcrt. Make s

Re: msvcrt: Don't hold FILE critical section in some functions

2011-11-15 Thread Piotr Caban
On 11/15/11 16:34, Alexandre Julliard wrote: Piotr Caban writes: @@ -3117,25 +3098,20 @@ int CDECL MSVCRT_fputc(int c, MSVCRT_FILE* file) */ int CDECL MSVCRT__flsbuf(int c, MSVCRT_FILE* file) { -MSVCRT__lock_file(file); - /* Flush output buffer */ if(file->_bufsiz =

Re: [PATCH 1/2] userenv: Improved CreateEnvironmentBlock implementation (try2)

2011-11-15 Thread Piotr Caban
On 11/14/11 18:26, Alexandre Julliard wrote: Piotr Caban writes: +static void set_wow64_environment(WCHAR **env) +{ +static const WCHAR archW[]= {'P','R','O','C','E','S','S','O','R','_'

Re: basic_ifstream implementation

2011-10-27 Thread Piotr Caban
On 10/27/11 2:01 AM, Josh Juran wrote: On Oct 26, 2011, at 11:59 AM, Josh Juran wrote: I'm ready to begin work on a basic_ifstream implementation for Wine, which is needed for the game Vampire Secrets among others. In order to implement it correctly lots of functions/classes needs to be imple

Re: [2/2] shell32: Be safe against removal of entries in SHChangeNotify

2011-09-20 Thread Piotr Caban
Hi, On 09/19/11 20:52, André Hentschel wrote: @@ -325,7 +325,7 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID EnterCriticalSection(&SHELL32_ChangenotifyCS); /* loop through the list */ -LIST_FOR_EACH_ENTRY( ptr,¬ifications, NOTIFICATIONLIST,

Re: __ms_va_list and NULL

2011-05-10 Thread Piotr Caban
On 05/10/11 20:02, André Hentschel wrote: Hi Piotr and folks, Most ARM crosscompilers (can't test with a native ARM one right now) don't like using NULL for a va_list and i'm not the only one seeing this issue. Piotr, i think that's your code, so maybe you can tell if it needs to be tuned or if

Re: [PATCH 2/4] wintrust: Added CryptSIPPutSignedDataMsg implementation (for PE files)

2011-05-03 Thread Piotr Caban
On 05/03/11 13:07, Piotr Caban wrote: --- dlls/wintrust/crypt.c | 66 ++-- 1 files changed, 57 insertions(+), 9 deletions(-) Patches 2 and 3 in this series are not correct. Please ignore them.

Re: [PATCH 1/4] msvcp90: Added basic_string::append(size_t, char) implementation.

2011-04-20 Thread Piotr Caban
Hi, On 04/18/11 23:53, Vincas Miliūnas wrote: My remark: (The method is implemented by reusing existing code) this->size+countsize is the same as count< 0 and throwing a "string too long" exception in that case is not semantic. count is an unsigned variable so it cannot be smaller then 0. My

Re: msvcrt: Added _resetstkoflw implementation

2011-04-20 Thread Piotr Caban
On 04/19/11 18:04, Alexandre Julliard wrote: This doesn't make sense to me, why do you need a VirtualAlloc in there? It's not needed. And what about the limits in the TEB? StackLimit is updated by virtual_handle_stack_fault before _resetstkoflw exits. Should I update it explicitly in _resetst

Re: [PATCH 1/2] ntdll: Restore stack guard and prevent stack from shrinking

2011-04-07 Thread Piotr Caban
On 04/07/11 11:22, Alexandre Julliard wrote: Piotr Caban writes: Without this patch there's following condition for stack growing: if ((char *)page + page_size == NtCurrentTeb()->Tib.StackLimit) NtCurrentTeb()->Tib.StackLimit = page; If after growing the stack application p

Re: [PATCH 1/2] ntdll: Restore stack guard and prevent stack from shrinking

2011-04-07 Thread Piotr Caban
On 04/07/11 11:00, Alexandre Julliard wrote: Piotr Caban writes: It's not needed (I thought it may be not valid for whole stack). I'll send fixed version. There also should be "growing" instead of "shrinking" in commit message. It was meant to point that it&#

Re: [PATCH 1/2] ntdll: Restore stack guard and prevent stack from shrinking

2011-04-07 Thread Piotr Caban
On 04/07/11 10:24, Alexandre Julliard wrote: Piotr Caban writes: @@ -1617,9 +1617,18 @@ BOOL virtual_handle_stack_fault( void *addr ) BYTE vprot = view->prot[((const char *)page - (const char *)view->base)>> page_shift]; if (vprot&a

Re: msvcp90: Implement basic_string and cstring versions of basic_string::find.

2011-04-02 Thread Piotr Caban
Hi, On 04/02/11 08:49, Vincent Pelletier wrote: +size_t __thiscall MSVCP_basic_string_char_find_cstr( +basic_string_char *this, const char *str, size_t offset) +{ +const char *this_str = basic_string_char_const_ptr(this); +const char *found = strstr(this_str+offset, str); +if

Re: mshtml: Report an error when navigation fails

2011-03-15 Thread Piotr Caban
On 03/14/11 16:59, Piotr Caban wrote: --- dlls/mshtml/navigate.c | 110 1 files changed, 110 insertions(+), 0 deletions(-) Please ignore this patch. It doesn't work as native do. Cheers, Piotr

Re: [1/2] msvcrt: Fixes multi-byte detection problem with MSVCRT_isleadbyte() (try 2)

2010-11-24 Thread Piotr Caban
_mbspbrk function needs to be fixed, not isleadbyte. Cheers, Piotr

Re: msvcrt: Add implementation of _strncoll

2010-11-17 Thread Piotr Caban
On 11/17/10 15:14, Vitaly Perov wrote: On Monday 15 November 2010 17:16:32 Piotr Caban wrote: On 11/15/10 14:53, Vitaly Perov wrote: This function should be implemented without memory allocations. Why? I don't think it is possible to implement it without any memory allocations. I

Re: [PATCH 1/4] msvcp90: Added basic_string::swap implementation. (try 2)

2010-11-15 Thread Piotr Caban
On 11/15/10 18:26, Vincas Miliūnas wrote: The way I see this is that the code above handles the case when lhs string is in the local buffer and rhs is allocated. The exchange requires copying (lhs->data->buf into rhs->data->buf and rhs->data->ptr into lhs->data->ptr), since setting one's ptr to

Re: msvcrt: Add implementation of _strncoll

2010-11-15 Thread Piotr Caban
On 11/15/10 14:53, Vitaly Perov wrote: This function should be implemented without memory allocations. Why? I don't think it is possible to implement it without any memory allocations. I mean without copying the strings. Using strcoll doesn't make much sense (here and in MSVCRT_strcoll implem

Re: msvcrt: Add implementation of _strncoll

2010-11-15 Thread Piotr Caban
Hi, +char * nstr1 = HeapAlloc(GetProcessHeap(), 0, count + 1); +char * nstr2 = HeapAlloc(GetProcessHeap(), 0, count + 1); + +memcpy(nstr1, str1, count + 1); strncoll is used to compare at most count characters (you can't access data after nullbyte). You're not null terminating nstr1

Re: [PATCH 1/4] msvcp90: Added basic_string::swap implementation.

2010-11-14 Thread Piotr Caban
On 11/11/10 18:55, Vincas Miliūnas wrote: This implementation handles cases when basic_strings are allocated using different allocators, however WINE's implementation seems to ignore allocators. It's not ignoring allocators (but it's not setting allocator field). There's no legal way of accessi

Re: [PATCH 2/3] [Msvcrt]: put in place the full scheme for paramter validation (the _s family of functions)

2010-10-24 Thread Piotr Caban
Hi, Only debugging version of the dll is passing data to invalid_paramter_handler. I guess it's why we shouldn't do it. There already is a test for it in msvcr90 (see strtoi64 tests). Because it was not strict enough it will not show it very well. Currently it will not show that it was expec

Re: [1/2] msvcrt: Implement _mbsnbcat_s.

2010-10-20 Thread Piotr Caban
Hi, On 10/20/10 08:49, Andrew Nguyen wrote: + * a lead byte and move the pointer back by one for later overwrite. */ +if (get_locale()->locinfo->mb_cur_max > 1 && MSVCRT_isleadbyte(*(ptr - 1))) +size++, ptr--; You may access dst-1. +ok(errno == EINVAL, "Expected errno to be

Re: [PATCH 5/5] shlwapi/tests: Add more tests

2010-10-12 Thread Piotr Caban
On 10/12/10 16:56, (Marvin) wrote: While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? My tests are not introducing new failures.

  1   2   >