Re: [PATCH] gdi32: Adjust a fixed-pitch full-width character has double advance of a half-width character. (try 5)

2013-01-25 Thread Akihiro Sagawa
On Fri, 25 Jan 2013 12:07:14 +0100, Alexandre Julliard wrote:
> This is still failing here:
...
> font.c:3756: Test failed: expected 19, got 0 (@IPAGothic:128)
> make[1]: *** [font.ok] Error 1

Could you let me know IPAGothic font file's version or MD5 value?
I guess this caused by font file (*.ttf) or FreeType bug. Because
I had no test failures with IPAGothic on my environment (Ubuntu 12.04
with fonts-ipafont-gothic 00303-5).

Regards,
Akihiro Sagawa





Why 0.1.0.0 as local socket address instead of 127.0.0.1?

2013-01-25 Thread Francois Gouget

The ws2_32:sock fails on some of my machines with the following error:

sock.c:4794: Test failed: Local socket address is different 0.1.0.0 != 127.0.0.1

Does anyone know why we GetAcceptExSockaddrs() would return 0.1.0.0 
instead of 127.0.0.1? Looking at the Windows 7 winetest results it does 
not appear to be correlated with either the SP1 or IE9.

For instance got an error on Windows 7 + SP1 + IE9 (32 and 64-bit):
http://test.winehq.org/data/b233d2054e64e216a5b3868f301bfc934b019b4b/win7_fg-win7u64-1spie9/ws2_32:sock.html
http://test.winehq.org/data/b233d2054e64e216a5b3868f301bfc934b019b4b/win7_fg-win7u64-1spie9t64/ws2_32:sock.html

But not here (Windows 7 + SP1 + IE9 64-bit):
http://test.winehq.org/data/83846cd131aac33228bf08aefae0bf0ea93d4273/win7_fg-win7u64-1spie9t64/ws2_32:sock.html

I also got it failing at least once on a Windows 2000 SP4 VM:
http://test.winehq.org/data/b233d2054e64e216a5b3868f301bfc934b019b4b/2000_fg-win2000-4sp/ws2_32:sock.html

But never saw it fail on my Windows XP or 2003 VMs.


-- 
Francois Gouget 





Re: [PATCH] winebuild: Use Clang to assemble if found. (try 4)

2013-01-25 Thread Alexandre Julliard
Charles Davis  writes:

> @@ -346,13 +352,26 @@ struct strarray *get_as_command(void)
>  struct strarray *args = strarray_init();
>  
>  if (!as_command)
> +as_command = find_tool( "clang", NULL );
> +
> +if (!as_command)
>  {
>  static const char * const commands[] = { "gas", "as", NULL };
>  as_command = find_tool( "as", commands );
>  }
> +
> +if (!as_command)
> +fatal_error( "cannot find suitable assembler\n" );
> +
>  strarray_add_one( args, as_command );
>  
> -if (force_pointer_size)
> +if (strstr( as_command, "clang" ))

It's looking better, but strstr is not appropriate here.

-- 
Alexandre Julliard
julli...@winehq.org




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)
-ret = heap_realloc(ret, (ret_size <<= 1) * 
sizeof(match_result_t));
-else
+if(ret) {
+match_result_t *old_ret = ret;
+
+ret = heap_realloc(old_ret, (ret_size <<= 1) * 
sizeof(match_result_t));
+if(!ret)
+heap_free(old_ret);


Should be probably if (ret) heap_free(old_ret);  here.
I think it's correct. I want to free old buffer in case of HeapRealloc 
error.





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

2013-01-25 Thread Marcus Meissner
On Fri, Jan 25, 2013 at 04:26:59PM +0100, Piotr Caban wrote:
> ---
>  dlls/jscript/regexp.c | 11 ---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> 

> diff --git a/dlls/jscript/regexp.c b/dlls/jscript/regexp.c
> index 0d66551..fa2668c 100644
> --- a/dlls/jscript/regexp.c
> +++ b/dlls/jscript/regexp.c
> @@ -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)
> -ret = heap_realloc(ret, (ret_size <<= 1) * 
> sizeof(match_result_t));
> -else
> +if(ret) {
> +match_result_t *old_ret = ret;
> +
> +ret = heap_realloc(old_ret, (ret_size <<= 1) * 
> sizeof(match_result_t));
> +if(!ret)
> +heap_free(old_ret);

Should be probably if (ret) heap_free(old_ret);  here.

> +}else {
>  ret = heap_alloc((ret_size=4) * sizeof(match_result_t));
> +}
>  if(!ret) {
>  hres = E_OUTOFMEMORY;
>  break;
> 

> 





Re: [PATCH] gdi32: Adjust a fixed-pitch full-width character has double advance of a half-width character. (try 5)

2013-01-25 Thread Alexandre Julliard
Akihiro Sagawa  writes:

> Hi,
>
> This patch enhances full-width character glyph advance when we choose
> fixed-pitch font.
>
> Windows 2000 (or XP for Japanese) and later adjust fixed-pitch
> full-width character glyph advances so that two half-width characters'
> advance equals to one full-width character's advance.  Because CJK
> fixed-pitch font, such as MS Gothic, is designed as full-width character
> (e.g. Kanji) has a double advance of half-width character (e.g. ASCII)
> and many developpers expect that.
>
> Please refer Microsoft document KB 417434 [1] and white paper [2] for
> details.
>
> [1] ... http://support.microsoft.com/kb/417434/ja (written in Japanese)
> [2] ... http://msdn.microsoft.com/ja-jp/library/cc979401.aspx (written in 
> Japanese)
>
> try 5:
>  - Add patch description above.
>  - Fix avgAdvance's rounding method. (as in get_outline_text_metrics)
>  - Refine a commit message, "Ensure" to "Adjust" and "double width" to
>"double advance".
>
> try 4:
>  - Fix full-width character detection that causes test failure.
>
> try 3:
>  - Improve full-width character detection.
>  - Support fake italic transformation.
>  - Choose non-linked fonts in the test case.
>  - Add more trace messages.
>
> try 2:
>  - Add rotated transformation tests.
>
> Regards,
> Akihiro Sagawa
>
> ---
>  dlls/gdi32/freetype.c   |   37 ++--
>  dlls/gdi32/tests/font.c |   87 
> +++
>  2 files changed, 121 insertions(+), 3 deletions(-)

This is still failing here:

../../../tools/runtest -q -P wine -M gdi32.dll -T ../../.. -p gdi32_test.exe.so 
font.c && touch font.ok
font.c:2549: Tests skipped: Font Droid Arabic Naskh doesn't contain 'x', 
skipping the test
font.c:2549: Tests skipped: Font Droid Sans Armenian doesn't contain 'x', 
skipping the test
font.c:2549: Tests skipped: Font Droid Sans Ethiopic doesn't contain 'x', 
skipping the test
font.c:2549: Tests skipped: Font Droid Sans Georgian doesn't contain 'x', 
skipping the test
font.c:2549: Tests skipped: Font Droid Sans Hebrew doesn't contain 'x', 
skipping the test
font.c:2549: Tests skipped: Font Droid Sans Hebrew doesn't contain 'x', 
skipping the test
font.c:3008: Tests skipped: Unable to retrieve first and last glyphs from cmap
font.c:2549: Tests skipped: Font Droid Sans Japanese doesn't contain 'x', 
skipping the test
font.c:2549: Tests skipped: Font Droid Sans Thai doesn't contain 'x', skipping 
the test
font.c:2549: Tests skipped: Font OpenSymbol doesn't contain 'x', skipping the 
test
font.c:2549: Tests skipped: Font rsfs10 doesn't contain 'x', skipping the test
font.c:3756: Test failed: expected 19, got 0 (@IPAGothic:128)
make[1]: *** [font.ok] Error 1

-- 
Alexandre Julliard
julli...@winehq.org




Re: [1/5] comctl32/tests: more tests for icon spacing calculation

2013-01-25 Thread Nikolay Sivov

On 1/25/2013 12:47, Daniel Jelinski wrote:

Hello,
Thanks for reviewing. What's the preferred way of checking whether the
code is compiled for 32 or 64bit?
Regards,
Daniel

Check for pointer size.


2013/1/24 Alexandre Julliard :

Daniel Jelinski  writes:


+#ifdef _WIN64
+/* NOTE: -1 is not treated the same as (DWORD)-1 by 64bit listview */
+ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, (DWORD)-1);
+todo_wine {
+expect(100, LOWORD(ret));
+expect(0x, HIWORD(ret));
+}
+ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, 0xBAADF00DDEADBEEFLL);

Please avoid ifdefs and long long constants.

--
Alexandre Julliard
julli...@winehq.org









Re: [1/5] comctl32/tests: more tests for icon spacing calculation

2013-01-25 Thread Daniel Jelinski
Hello,
Thanks for reviewing. What's the preferred way of checking whether the
code is compiled for 32 or 64bit?
Regards,
Daniel

2013/1/24 Alexandre Julliard :
> Daniel Jelinski  writes:
>
>> +#ifdef _WIN64
>> +/* NOTE: -1 is not treated the same as (DWORD)-1 by 64bit listview */
>> +ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, (DWORD)-1);
>> +todo_wine {
>> +expect(100, LOWORD(ret));
>> +expect(0x, HIWORD(ret));
>> +}
>> +ret = SendMessage(hwnd, LVM_SETICONSPACING, 0, 0xBAADF00DDEADBEEFLL);
>
> Please avoid ifdefs and long long constants.
>
> --
> Alexandre Julliard
> julli...@winehq.org