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
June
May
April
March
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
April 2008
----- 2025 -----
June 2025
May 2025
April 2025
March 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
4 participants
1278 discussions
Start a n
N
ew thread
Rob Shearman : widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 14dd441c5b6f2a4303ae128883469f4f09dbc32b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14dd441c5b6f2a4303ae12888…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Fri Apr 25 10:58:40 2008 +0100 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. --- tools/widl/parser.y | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 461483c..1732eae 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -287,8 +287,8 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s %type <type> type %type <ifref> coclass_int %type <ifref_list> coclass_ints -%type <var> arg field s_field case enum constdef externdef -%type <var_list> m_args no_args args fields cases enums enum_list dispint_props +%type <var> arg field ne_union_field union_field s_field case enum constdef externdef +%type <var_list> m_args no_args args fields ne_union_fields cases enums enum_list dispint_props %type <var> m_ident t_ident ident %type <declarator> declarator func_declarator direct_declarator %type <declarator_list> declarator_list @@ -576,11 +576,11 @@ cases: { $$ = NULL; } | cases case { $$ = append_var( $1, $2 ); } ; -case: tCASE expr_const ':' field { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, $2 )); +case: tCASE expr_const ':' union_field { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, $2 )); $$ = $4; if (!$$) $$ = make_var(NULL); $$->attrs = append_attr( $$->attrs, a ); } - | tDEFAULT ':' field { attr_t *a = make_attr(ATTR_DEFAULT); + | tDEFAULT ':' union_field { attr_t *a = make_attr(ATTR_DEFAULT); $$ = $3; if (!$$) $$ = make_var(NULL); $$->attrs = append_attr( $$->attrs, a ); } @@ -707,10 +707,20 @@ fields: { $$ = NULL; } field: s_field ';' { $$ = $1; } | m_attributes uniondef ';' { $$ = make_var(NULL); $$->type = $2; $$->attrs = $1; } + ; + +ne_union_field: + s_field ';' { $$ = $1; } | attributes ';' { $$ = make_var(NULL); $$->attrs = $1; } - | ';' { $$ = NULL; } + +ne_union_fields: { $$ = NULL; } + | ne_union_fields ne_union_field { $$ = append_var( $1, $2 ); } ; +union_field: + s_field ';' { $$ = $1; } + | ';' { $$ = NULL; } + s_field: m_attributes type declarator { $$ = $3->var; $$->attrs = check_field_attrs($$->name, $1); set_type($$, $2, $3, FALSE); @@ -990,7 +1000,8 @@ typedef: tTYPEDEF m_attributes type declarator_list } ; -uniondef: tUNION t_ident '{' fields '}' { $$ = get_typev(RPC_FC_NON_ENCAPSULATED_UNION, $2, tsUNION); +uniondef: tUNION t_ident '{' ne_union_fields '}' + { $$ = get_typev(RPC_FC_NON_ENCAPSULATED_UNION, $2, tsUNION); $$->kind = TKIND_UNION; $$->fields_or_args = $4; $$->defined = TRUE;
1
0
0
0
Rob Shearman : widl: Consolidate most of the inner loop of reg_typedefs into set_type.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 2f381f30a69beb2ff79deb7bdb685cd73e409fac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f381f30a69beb2ff79deb7bd…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Fri Apr 25 10:58:08 2008 +0100 widl: Consolidate most of the inner loop of reg_typedefs into set_type. --- tools/widl/parser.y | 40 ++++++++++------------------------------ 1 files changed, 10 insertions(+), 30 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index b4805ed..5545e7d 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -1266,6 +1266,10 @@ static void set_type(var_t *v, type_t *type, const pident_t *pident, array_dims_ error_loc("%s: pointer attribute applied to non-pointer type\n", v->name); } + if (is_attr(v->attrs, ATTR_STRING) && !is_ptr(v->type) && !arr) + error_loc("'%s': [string] attribute applied to non-pointer, non-array type\n", + v->name); + sizeless = FALSE; if (arr) LIST_FOR_EACH_ENTRY_REV(dim, arr, expr_t, entry) { @@ -1592,7 +1596,6 @@ static type_t *reg_typedefs(type_t *type, pident_list_t *pidents, attr_list_t *a { const pident_t *pident; int is_str = is_attr(attrs, ATTR_STRING); - unsigned char ptr_type = get_attrv(attrs, ATTR_POINTERTYPE); if (is_str) { @@ -1628,36 +1631,13 @@ static type_t *reg_typedefs(type_t *type, pident_list_t *pidents, attr_list_t *a var_t *name = pident->var; if (name->name) { - type_t *cur = append_ptrchain_type(pident->type, type); - if (pident->func_type) - { - type_t *t; - type_t *return_type = cur; - cur = pident->func_type; - for (t = cur; is_ptr(t); t = t->ref) - ; - assert(t->type == RPC_FC_FUNCTION); - t->ref = return_type; - if (is_object_interface && !is_attr(t->attrs, ATTR_CALLCONV)) - { - static char *stdmethodcalltype; - if (!stdmethodcalltype) stdmethodcalltype = strdup("STDMETHODCALLTYPE"); - t->attrs = append_attr(NULL, make_attrp(ATTR_CALLCONV, stdmethodcalltype)); - } - } - cur = alias(cur, name->name); + type_t *cur; + + /* set the attributes to allow set_type to do some checks on them */ + name->attrs = attrs; + set_type(name, type, pident, NULL, 0); + cur = alias(name->type, name->name); cur->attrs = attrs; - if (ptr_type) - { - if (is_ptr(cur)) - cur->type = ptr_type; - else - error_loc("'%s': pointer attribute applied to non-pointer type\n", - cur->name); - } - else if (is_str && ! is_ptr(cur)) - error_loc("'%s': [string] attribute applied to non-pointer type\n", - cur->name); if (is_incomplete(cur)) add_incomplete(cur);
1
0
0
0
Alexandre Julliard : oleaut32/tests: Store the test typelib in resources instead of depending on an external file .
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: c76de89885c4c8cd97204d5e09b22ca0e3588b02 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c76de89885c4c8cd97204d5e0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Apr 25 12:09:03 2008 +0200 oleaut32/tests: Store the test typelib in resources instead of depending on an external file. --- dlls/oleaut32/tests/tmarshal.rc | 3 +++ dlls/oleaut32/tests/typelib.c | 30 +++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletions(-) diff --git a/dlls/oleaut32/tests/tmarshal.rc b/dlls/oleaut32/tests/tmarshal.rc index 30c2a9b..707895f 100644 --- a/dlls/oleaut32/tests/tmarshal.rc +++ b/dlls/oleaut32/tests/tmarshal.rc @@ -29,3 +29,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL /* @makedep: tmarshal.tlb */ 1 TYPELIB LOADONCALL DISCARDABLE tmarshal.tlb + +/* @makedep: test_tlb.tlb */ +2 TYPELIB LOADONCALL DISCARDABLE test_tlb.tlb diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index a30b275..74a7812 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -1337,13 +1337,41 @@ static void test_dump_typelib(const char *name) #endif +static const char *create_test_typelib(void) +{ + static char filename[MAX_PATH]; + HANDLE file; + HRSRC res; + void *ptr; + DWORD written; + + GetTempFileNameA( ".", "tlb", 0, filename ); + file = CreateFile( filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0 ); + ok( file != INVALID_HANDLE_VALUE, "file creation failed\n" ); + if (file == INVALID_HANDLE_VALUE) return NULL; + res = FindResource( GetModuleHandle(0), MAKEINTRESOURCE(2), "TYPELIB" ); + ok( res != 0, "couldn't find resource\n" ); + ptr = LockResource( LoadResource( GetModuleHandle(0), res )); + WriteFile( file, ptr, SizeofResource( GetModuleHandle(0), res ), &written, NULL ); + ok( written == SizeofResource( GetModuleHandle(0), res ), "couldn't write resource\n" ); + CloseHandle( file ); + return filename; +} + START_TEST(typelib) { + const char *filename; + ref_count_test(wszStdOle2); test_TypeComp(); test_CreateDispTypeInfo(); test_TypeInfo(); test_QueryPathOfRegTypeLib(); test_inheritance(); - test_dump_typelib("test_tlb.tlb"); + + if ((filename = create_test_typelib())) + { + test_dump_typelib( filename ); + DeleteFile( filename ); + } }
1
0
0
0
Eric Pouech : richedit: Ensure wrapping is done all the time after inserting an RTF stream.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 046cfcfd22c8ff7abdbbf7694add3089f6b5d899 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=046cfcfd22c8ff7abdbbf7694…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:04:36 2008 +0200 richedit: Ensure wrapping is done all the time after inserting an RTF stream. --- dlls/riched20/editor.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index e635e9f..dcb21d1 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1140,10 +1140,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre ME_ReleaseStyle(style); editor->nEventMask = nEventMask; - if (editor->bRedraw) - { - ME_UpdateRepaint(editor); - } + ME_UpdateRepaint(editor); if (!(format & SFF_SELECTION)) { ME_ClearTempStyle(editor); }
1
0
0
0
Eric Pouech : richedit: Properly handle the background in case of border in paragraph.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 60234f8fc4b1b50b3f3dfd7e27b2973746008ef6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60234f8fc4b1b50b3f3dfd7e2…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:04:26 2008 +0200 richedit: Properly handle the background in case of border in paragraph. --- dlls/riched20/paint.c | 114 +++++++++++++++++++++++++++++-------------------- 1 files changed, 67 insertions(+), 47 deletions(-) diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index ddd7de7..2ec7fb9 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -373,47 +373,51 @@ int ME_GetParaLineSpace(ME_Context* c, ME_Paragraph* para) return sp * c->editor->nZoomNumerator / c->editor->nZoomDenominator; } -static int ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y) +static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT* bounds) { - int idx, border_width; - int ybefore, yafter; + int idx, border_width, top_border, bottom_border; RECT rc; - if (!(para->pFmt->dwMask & (PFM_BORDER | PFM_SPACEBEFORE | PFM_SPACEAFTER))) return 0; + SetRectEmpty(bounds); + if (!(para->pFmt->dwMask & (PFM_BORDER | PFM_SPACEBEFORE | PFM_SPACEAFTER))) return; + + border_width = top_border = bottom_border = 0; + idx = (para->pFmt->wBorders >> 8) & 0xF; + if ((para->pFmt->dwMask & PFM_BORDER) && idx != 0 && (para->pFmt->wBorders & 0xF)) + { + if (para->pFmt->wBorders & 0x00B0) + FIXME("Unsupported border flags %x\n", para->pFmt->wBorders); + border_width = ME_GetParaBorderWidth(c->editor, para->pFmt->wBorders); + if (para->pFmt->wBorders & 4) top_border = border_width; + if (para->pFmt->wBorders & 8) bottom_border = border_width; + } if (para->pFmt->dwMask & PFM_SPACEBEFORE) { rc.left = c->rcView.left; rc.right = c->rcView.right; rc.top = y; - ybefore = ME_twips2pointsY(c, para->pFmt->dySpaceBefore); - rc.bottom = y + ybefore; + bounds->top = ME_twips2pointsY(c, para->pFmt->dySpaceBefore); + rc.bottom = y + bounds->top + top_border; FillRect(c->hDC, &rc, c->editor->hbrBackground); } - else ybefore = 0; + if (para->pFmt->dwMask & PFM_SPACEAFTER) { rc.left = c->rcView.left; rc.right = c->rcView.right; rc.bottom = y + para->nHeight; - yafter = ME_twips2pointsY(c, para->pFmt->dySpaceAfter); - rc.top = rc.bottom - yafter; + bounds->bottom = ME_twips2pointsY(c, para->pFmt->dySpaceAfter); + rc.top = rc.bottom - bounds->bottom - bottom_border; FillRect(c->hDC, &rc, c->editor->hbrBackground); } - else yafter = 0; - border_width = 0; - idx = (para->pFmt->wBorders >> 8) & 0xF; if ((para->pFmt->dwMask & PFM_BORDER) && idx != 0 && (para->pFmt->wBorders & 0xF)) { int pen_width; COLORREF pencr; HPEN pen = NULL, oldpen = NULL; POINT pt; - if (para->pFmt->wBorders & 0x00B0) - FIXME("Unsupported border flags %x\n", para->pFmt->wBorders); - border_width = ME_GetParaBorderWidth(c->editor, para->pFmt->wBorders); - if (para->pFmt->wBorders & 64) /* autocolor */ pencr = GetSysColor(COLOR_WINDOWTEXT); else @@ -425,50 +429,66 @@ static int ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y) MoveToEx(c->hDC, 0, 0, &pt); /* before & after spaces are not included in border */ + + /* helper to draw the double lines in case of corner */ +#define DD(x) ((para->pFmt->wBorders & (x)) ? (pen_width + 1) : 0) + if (para->pFmt->wBorders & 1) { - MoveToEx(c->hDC, c->rcView.left, y + ybefore, NULL); - LineTo(c->hDC, c->rcView.left, y + para->nHeight - yafter); + MoveToEx(c->hDC, c->rcView.left, y + bounds->top, NULL); + LineTo(c->hDC, c->rcView.left, y + para->nHeight - bounds->bottom); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + ybefore + pen_width + 1, NULL); - LineTo(c->hDC, c->rcView.left + pen_width + 1, y + para->nHeight - yafter - pen_width - 1); + rc.left = c->rcView.left + 1; + rc.right = rc.left + border_width; + rc.top = y + bounds->top; + rc.bottom = y + para->nHeight - bounds->bottom; + FillRect(c->hDC, &rc, c->editor->hbrBackground); + MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + bounds->top + DD(4), NULL); + LineTo(c->hDC, c->rcView.left + pen_width + 1, y + para->nHeight - bounds->bottom - DD(8)); } + bounds->left += border_width; } if (para->pFmt->wBorders & 2) { - MoveToEx(c->hDC, c->rcView.right, y + ybefore, NULL); - LineTo(c->hDC, c->rcView.right, y + para->nHeight - yafter); + MoveToEx(c->hDC, c->rcView.right - 1, y + bounds->top, NULL); + LineTo(c->hDC, c->rcView.right - 1, y + para->nHeight - bounds->bottom); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.right - pen_width - 1, y + ybefore + pen_width + 1, NULL); - LineTo(c->hDC, c->rcView.right - pen_width - 1, y + para->nHeight - yafter - pen_width - 1); + rc.left = c->rcView.right - pen_width - 1; + rc.right = c->rcView.right - 1; + rc.top = y + bounds->top; + rc.bottom = y + para->nHeight - bounds->bottom; + FillRect(c->hDC, &rc, c->editor->hbrBackground); + MoveToEx(c->hDC, c->rcView.right - 1 - pen_width - 1, y + bounds->top + DD(4), NULL); + LineTo(c->hDC, c->rcView.right - 1 - pen_width - 1, y + para->nHeight - bounds->bottom - DD(8)); } + bounds->right += border_width; } if (para->pFmt->wBorders & 4) { - MoveToEx(c->hDC, c->rcView.left, y + ybefore, NULL); - LineTo(c->hDC, c->rcView.right, y + ybefore); + MoveToEx(c->hDC, c->rcView.left, y + bounds->top, NULL); + LineTo(c->hDC, c->rcView.right, y + bounds->top); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + ybefore + pen_width + 1, NULL); - LineTo(c->hDC, c->rcView.right - pen_width - 1, y + ybefore + pen_width + 1); + MoveToEx(c->hDC, c->rcView.left + DD(1), y + bounds->top + pen_width + 1, NULL); + LineTo(c->hDC, c->rcView.right - DD(2), y + bounds->top + pen_width + 1); } + bounds->top += border_width; } if (para->pFmt->wBorders & 8) { - MoveToEx(c->hDC, c->rcView.left, y + para->nHeight - yafter - 1, NULL); - LineTo(c->hDC, c->rcView.right, y + para->nHeight - yafter - 1); + MoveToEx(c->hDC, c->rcView.left, y + para->nHeight - bounds->bottom - 1, NULL); + LineTo(c->hDC, c->rcView.right, y + para->nHeight - bounds->bottom - 1); if (border_details[idx].dble) { - MoveToEx(c->hDC, c->rcView.left + pen_width + 1, y + para->nHeight - yafter - 1 - pen_width - 1, NULL); - LineTo(c->hDC, c->rcView.right - pen_width - 1, y + para->nHeight - yafter - 1 - pen_width - 1); + MoveToEx(c->hDC, c->rcView.left + DD(1), y + para->nHeight - bounds->bottom - 1 - pen_width - 1, NULL); + LineTo(c->hDC, c->rcView.right - DD(2), y + para->nHeight - bounds->bottom - 1 - pen_width - 1); } + bounds->bottom += border_width; } +#undef DD MoveToEx(c->hDC, pt.x, pt.y, NULL); SelectObject(c->hDC, oldpen); DeleteObject(pen); } - return ybefore + - ((para->pFmt->dwMask & PFM_BORDER) && (para->pFmt->wBorders & 4) ? - border_width : 0); } void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { @@ -476,12 +496,11 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { ME_DisplayItem *p; ME_Run *run; ME_Paragraph *para = NULL; - RECT rc, rcPara; + RECT rc, rcPara, bounds; int y = c->pt.y; int height = 0, baseline = 0, no=0, pno = 0; - int xe = 0; + int xs = 0, xe = 0; BOOL visible = FALSE; - int nMargWidth = 0; c->pt.x = c->rcView.left; rcPara.left = c->rcView.left; @@ -491,11 +510,11 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { case diParagraph: para = &p->member.para; assert(para); - nMargWidth = ME_twips2pointsX(c, para->pFmt->dxStartIndent); - if (pno != 0) - nMargWidth += ME_twips2pointsX(c, para->pFmt->dxOffset); + pno = 0; + xs = c->rcView.left + ME_twips2pointsX(c, para->pFmt->dxStartIndent); xe = c->rcView.right - ME_twips2pointsX(c, para->pFmt->dxRightIndent); - y += ME_DrawParaDecoration(c, para, y); + ME_DrawParaDecoration(c, para, y, &bounds); + y += bounds.top; break; case diStartRow: y += height; @@ -504,16 +523,16 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { visible = RectVisible(c->hDC, &rcPara); if (visible) { /* left margin */ - rc.left = c->rcView.left; - rc.right = c->rcView.left+nMargWidth; + rc.left = c->rcView.left + bounds.left; + rc.right = xs; rc.top = y; rc.bottom = y+p->member.row.nHeight; FillRect(c->hDC, &rc, c->editor->hbrBackground); /* right margin */ rc.left = xe; - rc.right = c->rcView.right; + rc.right = c->rcView.right - bounds.right; FillRect(c->hDC, &rc, c->editor->hbrBackground); - rc.left = c->rcView.left+nMargWidth; + rc.left = xs; rc.right = xe; FillRect(c->hDC, &rc, c->editor->hbrBackground); } @@ -529,7 +548,8 @@ void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { height = p->member.row.nHeight; baseline = p->member.row.nBaseline; - pno++; + if (!pno++) + xe += ME_twips2pointsX(c, para->pFmt->dxOffset); break; case diRun: assert(para);
1
0
0
0
John Klehm : winex11: Add support for IsXExtensionPointer tablet devices.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 2c26ea609d6b2b8a25be20984c0014ceb202466a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c26ea609d6b2b8a25be20984…
Author: John Klehm <xixsimplicityxix(a)gmail.com> Date: Tue Apr 22 20:11:28 2008 -0500 winex11: Add support for IsXExtensionPointer tablet devices. --- dlls/winex11.drv/wintab.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 37596ba..b086e44 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -530,14 +530,15 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault) devices[loop].use == IsXKeyboard ? "IsXKeyboard" : devices[loop].use == IsXPointer ? "IsXPointer" : devices[loop].use == IsXExtensionDevice ? "IsXExtensionDevice" : + devices[loop].use == IsXExtensionPointer ? "IsXExtensionPointer" : "Unknown" ); - if (devices[loop].use == IsXExtensionDevice) + if ((devices[loop].use == IsXExtensionDevice) || (devices[loop].use == IsXExtensionPointer)) { LPWTI_CURSORS_INFO cursor; - TRACE("Is Extension Device\n"); + TRACE("Is XExtension%s\n", (devices[loop].use == IsXExtensionDevice)? "Device":"Pointer"); cursor_target++; target = &devices[loop]; cursor = &gSysCursor[cursor_target];
1
0
0
0
John Klehm : winex11: Allow wizardpen to be detected as a stylus.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 33d4117e1b988edbe0f7fa09817d97dcd920117d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33d4117e1b988edbe0f7fa098…
Author: John Klehm <xixsimplicityxix(a)gmail.com> Date: Thu Apr 17 09:48:50 2008 -0500 winex11: Allow wizardpen to be detected as a stylus. --- dlls/winex11.drv/wintab.c | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 8a2afd1..37596ba 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -414,10 +414,20 @@ static BOOL is_tablet_cursor(const char *name, const char *type) static BOOL is_stylus(const char *name, const char *type) { - if (name && match_token(name, "stylus")) - return TRUE; - if (type && match_token(type, "stylus")) - return TRUE; + int i; + static const char* tablet_stylus_whitelist[] = { + "stylus", + "wizardpen", + NULL + }; + + for (i=0; tablet_stylus_whitelist[i] != NULL; i++) { + if (name && match_token(name, tablet_stylus_whitelist[i])) + return TRUE; + if (type && match_token(type, tablet_stylus_whitelist[i])) + return TRUE; + } + return FALSE; }
1
0
0
0
John Klehm : winex11: Allow wintab devices with less than 5 axes.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: b95c091dbf7669361a3f720083cac52989866b0e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b95c091dbf7669361a3f72008…
Author: John Klehm <xixsimplicityxix(a)gmail.com> Date: Wed Apr 16 02:26:37 2008 -0500 winex11: Allow wintab devices with less than 5 axes. --- dlls/winex11.drv/wintab.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c index 16e369b..8a2afd1 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c @@ -620,7 +620,7 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault) ** the various inputs to see what the values are. Odds are that a ** more 'correct' algorithm would condense to this one anyway. */ - if (!axis_read_complete && Val->num_axes >= 5 && cursor->TYPE == CSR_TYPE_PEN) + if (!axis_read_complete && cursor->TYPE == CSR_TYPE_PEN) { Axis = (XAxisInfoPtr) ((char *) Val + sizeof (XValuatorInfo));
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipDrawImageRect/GdipDrawImageRectI.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 8cf5608089ad40f842ff8d518f428efebc95c517 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8cf5608089ad40f842ff8d518…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Fri Apr 25 01:58:36 2008 +0400 gdiplus: Implemented GdipDrawImageRect/GdipDrawImageRectI. --- dlls/gdiplus/gdiplus.spec | 4 ++-- dlls/gdiplus/graphics.c | 27 ++++++++++++++++++++++++++- include/gdiplusflat.h | 2 ++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 9fdd4be..bdead36 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -181,8 +181,8 @@ @ stub GdipDrawImagePointsI @ stdcall GdipDrawImagePointsRect(ptr ptr ptr long long long long long long ptr ptr ptr) @ stub GdipDrawImagePointsRectI -@ stub GdipDrawImageRect -@ stub GdipDrawImageRectI +@ stdcall GdipDrawImageRect(ptr ptr long long long long) +@ stdcall GdipDrawImageRectI(ptr ptr long long long long) @ stdcall GdipDrawImageRectRect(ptr ptr long long long long long long long long long ptr long ptr) @ stdcall GdipDrawImageRectRectI(ptr ptr long long long long long long long long long ptr long ptr) @ stdcall GdipDrawLine(ptr ptr long long long long) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index ef57def..b8a2efa 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1100,7 +1100,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback, callbackData); - if(!graphics || !image || !points || !imageAttributes || count != 3) + if(!graphics || !image || !points || count != 3) return InvalidParameter; if(srcUnit == UnitInch) @@ -1177,6 +1177,31 @@ GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics *graphics, GpImage *image, srcwidth, srcheight, srcUnit, imageAttributes, callback, callbackData); } +GpStatus WINGDIPAPI GdipDrawImageRect(GpGraphics *graphics, GpImage *image, + REAL x, REAL y, REAL width, REAL height) +{ + RectF bounds; + GpUnit unit; + GpStatus ret; + + if(!graphics || !image) + return InvalidParameter; + + ret = GdipGetImageBounds(image, &bounds, &unit); + if(ret != Ok) + return ret; + + return GdipDrawImageRectRect(graphics, image, x, y, width, height, + bounds.X, bounds.Y, bounds.Width, bounds.Height, + unit, NULL, NULL, NULL); +} + +GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics *graphics, GpImage *image, + INT x, INT y, INT width, INT height) +{ + return GdipDrawImageRect(graphics, image, (REAL)x, (REAL)y, (REAL)width, (REAL)height); +} + GpStatus WINGDIPAPI GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1, REAL y1, REAL x2, REAL y2) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index cd349ea..8df6c5b 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -87,6 +87,8 @@ GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics*,GpImage*,REAL,REAL,REAL, GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics*,GpImage*,INT,INT,INT, INT,INT,INT,INT,INT,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort, VOID*); +GpStatus WINGDIPAPI GdipDrawImageRect(GpGraphics*,GpImage*,REAL,REAL,REAL,REAL); +GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics*,GpImage*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipDrawLine(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics*,GpPen*,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipDrawLines(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT);
1
0
0
0
Nikolay Sivov : gdiplus: Implemented GdipAddPathBezier.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 19cc99c33387a3f0d7de208f6586ebac1081a61f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19cc99c33387a3f0d7de208f6…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Fri Apr 25 01:58:26 2008 +0400 gdiplus: Implemented GdipAddPathBezier. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphicspath.c | 27 +++++++++++++++++---------- include/gdiplusflat.h | 1 + 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 3905c74..9fdd4be 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -1,6 +1,6 @@ @ stdcall GdipAddPathArc(ptr long long long long long long) @ stdcall GdipAddPathArcI(ptr long long long long long long) -@ stub GdipAddPathBezier +@ stdcall GdipAddPathBezier(ptr long long long long long long long long) @ stdcall GdipAddPathBezierI(ptr long long long long long long long long) @ stdcall GdipAddPathBeziers(ptr ptr long) @ stub GdipAddPathBeziersI diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index d7be43e..3f83bea 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -103,8 +103,8 @@ GpStatus WINGDIPAPI GdipAddPathArcI(GpPath *path, INT x1, INT y1, INT x2, return GdipAddPathArc(path,(REAL)x1,(REAL)y1,(REAL)x2,(REAL)y2,startAngle,sweepAngle); } -GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, - INT y2, INT x3, INT y3, INT x4, INT y4) +GpStatus WINGDIPAPI GdipAddPathBezier(GpPath *path, REAL x1, REAL y1, REAL x2, + REAL y2, REAL x3, REAL y3, REAL x4, REAL y4) { INT old_count; @@ -116,14 +116,14 @@ GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, old_count = path->pathdata.Count; - path->pathdata.Points[old_count].X = (REAL) x1; - path->pathdata.Points[old_count].Y = (REAL) y1; - path->pathdata.Points[old_count + 1].X = (REAL) x2; - path->pathdata.Points[old_count + 1].Y = (REAL) y2; - path->pathdata.Points[old_count + 2].X = (REAL) x3; - path->pathdata.Points[old_count + 2].Y = (REAL) y3; - path->pathdata.Points[old_count + 3].X = (REAL) x4; - path->pathdata.Points[old_count + 3].Y = (REAL) y4; + path->pathdata.Points[old_count].X = x1; + path->pathdata.Points[old_count].Y = y1; + path->pathdata.Points[old_count + 1].X = x2; + path->pathdata.Points[old_count + 1].Y = y2; + path->pathdata.Points[old_count + 2].X = x3; + path->pathdata.Points[old_count + 2].Y = y3; + path->pathdata.Points[old_count + 3].X = x4; + path->pathdata.Points[old_count + 3].Y = y4; path->pathdata.Types[old_count] = (path->newfigure ? PathPointTypeStart : PathPointTypeLine); @@ -137,6 +137,13 @@ GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, return Ok; } +GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath *path, INT x1, INT y1, INT x2, + INT y2, INT x3, INT y3, INT x4, INT y4) +{ + return GdipAddPathBezier(path,(REAL)x1,(REAL)y1,(REAL)x2,(REAL)y2,(REAL)x3,(REAL)y3, + (REAL)x4,(REAL)y4); +} + GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points, INT count) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 366e8a5..cd349ea 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -189,6 +189,7 @@ GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *,GDIPCONST GpMatrix*); GpStatus WINGDIPAPI GdipAddPathArc(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathArcI(GpPath*,INT,INT,INT,INT,REAL,REAL); +GpStatus WINGDIPAPI GdipAddPathBezier(GpPath*,REAL,REAL,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipAddPathBezierI(GpPath*,INT,INT,INT,INT,INT,INT,INT,INT); GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath*,GDIPCONST GpPointF*,INT); GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
1
0
0
0
Erik de Castro Lopo : dbghelp: Fix pointer cast.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: ab2424710f7f76443aecdb5d0c6a69118e799116 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab2424710f7f76443aecdb5d0…
Author: Erik de Castro Lopo <mle+win(a)mega-nerd.com> Date: Fri Apr 25 10:36:03 2008 +1000 dbghelp: Fix pointer cast. --- dlls/dbghelp/dbghelp_private.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index c81f778..e4cae5b 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -106,7 +106,7 @@ void hash_table_iter_init(const struct hash_table* ht, void* hash_table_iter_up(struct hash_table_iter* hti); #define GET_ENTRY(__i, __t, __f) \ - ((__t*)((char*)(__i) - (unsigned int)(&((__t*)0)->__f))) + ((__t*)((char*)(__i) - FIELD_OFFSET(__t,__f))) extern unsigned dbghelp_options;
1
0
0
0
Erik de Castro Lopo : ntdll: Win64 fix for get_pointer_obfuscator.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: eba704b8bb756a91c455483a48d2e3bc30ec15c1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eba704b8bb756a91c455483a4…
Author: Erik de Castro Lopo <mle+win(a)mega-nerd.com> Date: Fri Apr 25 11:54:30 2008 +1000 ntdll: Win64 fix for get_pointer_obfuscator. --- dlls/ntdll/rtl.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c index 1390c64..a4d1dac 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -904,10 +904,10 @@ static DWORD_PTR get_pointer_obfuscator( void ) rand = RtlUniform( &seed ); /* handle 64bit pointers */ - rand ^= RtlUniform( &seed ) << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); + rand ^= (ULONG_PTR)RtlUniform( &seed ) << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); /* set the high bits so dereferencing obfuscated pointers will (usually) crash */ - rand |= 0xc0000000 << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); + rand |= (ULONG_PTR)0xc0000000 << ((sizeof (DWORD_PTR) - sizeof (ULONG))*8); interlocked_cmpxchg_ptr( (void**) &pointer_obfuscator, (void*) rand, NULL ); }
1
0
0
0
Erik de Castro Lopo : crypt32: Use LOWORD on LPCSTR type instead of casting to int.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 0ef69ef9dd04af37fedc0fbec1b40c98b2a7f11d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ef69ef9dd04af37fedc0fbec…
Author: Erik de Castro Lopo <mle+win(a)mega-nerd.com> Date: Fri Apr 25 11:14:35 2008 +1000 crypt32: Use LOWORD on LPCSTR type instead of casting to int. --- dlls/crypt32/chain.c | 8 ++++---- dlls/crypt32/store.c | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index 362eddc..a13a896 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -1780,16 +1780,16 @@ BOOL WINAPI CertVerifyCertificateChainPolicy(LPCSTR szPolicyOID, { switch (LOWORD(szPolicyOID)) { - case (int)CERT_CHAIN_POLICY_BASE: + case LOWORD(CERT_CHAIN_POLICY_BASE): verifyPolicy = verify_base_policy; break; - case (int)CERT_CHAIN_POLICY_AUTHENTICODE: + case LOWORD(CERT_CHAIN_POLICY_AUTHENTICODE): verifyPolicy = verify_authenticode_policy; break; - case (int)CERT_CHAIN_POLICY_BASIC_CONSTRAINTS: + case LOWORD(CERT_CHAIN_POLICY_BASIC_CONSTRAINTS): verifyPolicy = verify_basic_constraints_policy; break; - case (int)CERT_CHAIN_POLICY_MICROSOFT_ROOT: + case LOWORD(CERT_CHAIN_POLICY_MICROSOFT_ROOT): verifyPolicy = verify_ms_root_policy; break; default: diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 84d326c..9534e5c 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -674,43 +674,43 @@ HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider, { switch (LOWORD(lpszStoreProvider)) { - case (int)CERT_STORE_PROV_MSG: + case LOWORD(CERT_STORE_PROV_MSG): openFunc = CRYPT_MsgOpenStore; break; - case (int)CERT_STORE_PROV_MEMORY: + case LOWORD(CERT_STORE_PROV_MEMORY): openFunc = CRYPT_MemOpenStore; break; - case (int)CERT_STORE_PROV_FILE: + case LOWORD(CERT_STORE_PROV_FILE): openFunc = CRYPT_FileOpenStore; break; - case (int)CERT_STORE_PROV_PKCS7: + case LOWORD(CERT_STORE_PROV_PKCS7): openFunc = CRYPT_PKCSOpenStore; break; - case (int)CERT_STORE_PROV_REG: + case LOWORD(CERT_STORE_PROV_REG): openFunc = CRYPT_RegOpenStore; break; - case (int)CERT_STORE_PROV_FILENAME_A: + case LOWORD(CERT_STORE_PROV_FILENAME_A): openFunc = CRYPT_FileNameOpenStoreA; break; - case (int)CERT_STORE_PROV_FILENAME_W: + case LOWORD(CERT_STORE_PROV_FILENAME_W): openFunc = CRYPT_FileNameOpenStoreW; break; - case (int)CERT_STORE_PROV_COLLECTION: + case LOWORD(CERT_STORE_PROV_COLLECTION): openFunc = CRYPT_CollectionOpenStore; break; - case (int)CERT_STORE_PROV_SYSTEM_A: + case LOWORD(CERT_STORE_PROV_SYSTEM_A): openFunc = CRYPT_SysOpenStoreA; break; - case (int)CERT_STORE_PROV_SYSTEM_W: + case LOWORD(CERT_STORE_PROV_SYSTEM_W): openFunc = CRYPT_SysOpenStoreW; break; - case (int)CERT_STORE_PROV_SYSTEM_REGISTRY_A: + case LOWORD(CERT_STORE_PROV_SYSTEM_REGISTRY_A): openFunc = CRYPT_SysRegOpenStoreA; break; - case (int)CERT_STORE_PROV_SYSTEM_REGISTRY_W: + case LOWORD(CERT_STORE_PROV_SYSTEM_REGISTRY_W): openFunc = CRYPT_SysRegOpenStoreW; break; - case (int)CERT_STORE_PROV_PHYSICAL_W: + case LOWORD(CERT_STORE_PROV_PHYSICAL_W): openFunc = CRYPT_PhysOpenStoreW; break; default:
1
0
0
0
Erik de Castro Lopo : user32/tests: Use SetWindowLongPtr instead of SetWindowLong.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 56797f9c65e0611cccf5f3e77865a9e465583b85 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56797f9c65e0611cccf5f3e77…
Author: Erik de Castro Lopo <mle+win(a)mega-nerd.com> Date: Fri Apr 25 17:13:39 2008 +1000 user32/tests: Use SetWindowLongPtr instead of SetWindowLong. --- dlls/user32/tests/edit.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c index 9f40416..0c5a678 100644 --- a/dlls/user32/tests/edit.c +++ b/dlls/user32/tests/edit.c @@ -1930,7 +1930,7 @@ static void test_child_edit_wmkeydown(void) hwEdit = create_child_editcontrol(0, 0); hwParent = GetParent(hwEdit); - SetWindowLong(hwParent, GWL_WNDPROC, (LONG)child_edit_wmkeydown_proc); + SetWindowLongPtr(hwParent, GWLP_WNDPROC, (LONG_PTR)child_edit_wmkeydown_proc); r = SendMessage(hwEdit, WM_KEYDOWN, VK_RETURN, 0x1c0001); ok(1 == r, "expected 1, got %d\n", r); ok(0 == child_edit_wmkeydown_num_messages, "expected 0, got %d\n", child_edit_wmkeydown_num_messages);
1
0
0
0
James Hawkins : winmm: Remove a failing test that is driver-specific.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 4daec079c17c6e4644620b92132dc584f892b433 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4daec079c17c6e4644620b921…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Fri Apr 25 03:35:38 2008 -0500 winmm: Remove a failing test that is driver-specific. --- dlls/winmm/tests/mixer.c | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-) diff --git a/dlls/winmm/tests/mixer.c b/dlls/winmm/tests/mixer.c index 6cd1c7a..89ac7c9 100644 --- a/dlls/winmm/tests/mixer.c +++ b/dlls/winmm/tests/mixer.c @@ -382,12 +382,6 @@ static void mixer_test_deviceA(int device) ok(rc==MMSYSERR_INVALFLAG, "mixerOpen: MMSYSERR_INVALFLAG expected, got %s\n", mmsys_error(rc)); - /* Shouldn't open without a valid HWND */ - rc=mixerOpen(&mix, device, 0, 0, CALLBACK_WINDOW); - ok(rc==MMSYSERR_INVALPARAM, - "mixerOpen: MMSYSERR_INVALPARAM expected, got %s\n", mmsys_error(rc)); - - for (d=0;d<capsA.cDestinations;d++) { MIXERLINEA mixerlineA; mixerlineA.cbStruct = 0; @@ -775,11 +769,6 @@ static void mixer_test_deviceW(int device) ok(rc==MMSYSERR_INVALFLAG, "mixerOpen: MMSYSERR_INVALFLAG expected, got %s\n", mmsys_error(rc)); - /* Shouldn't open without a valid HWND */ - rc=mixerOpen(&mix, device, 0, 0, CALLBACK_WINDOW); - ok(rc==MMSYSERR_INVALPARAM, - "mixerOpen: MMSYSERR_INVALPARAM expected, got %s\n", mmsys_error(rc)); - for (d=0;d<capsW.cDestinations;d++) { MIXERLINEW mixerlineW; mixerlineW.cbStruct = 0;
1
0
0
0
James Hawkins : winspool.drv: Disable a test for capabilities not available on all printer drivers.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 1cf567ecc901239cc9a890636ea2d444bc95156c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1cf567ecc901239cc9a890636…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Fri Apr 25 01:10:02 2008 -0500 winspool.drv: Disable a test for capabilities not available on all printer drivers. --- dlls/winspool.drv/tests/info.c | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c index cd93f16..f0f4754 100644 --- a/dlls/winspool.drv/tests/info.c +++ b/dlls/winspool.drv/tests/info.c @@ -2345,15 +2345,19 @@ static void test_DeviceCapabilities(void) ok(n_copies > 0, "DeviceCapabilities DC_COPIES failed\n"); trace("n_copies = %d\n", n_copies); - ret = DeviceCapabilities(device, port, DC_MAXEXTENT, NULL, NULL); - ok(ret != -1, "DeviceCapabilities DC_MAXEXTENT failed\n"); - ext = MAKEPOINTS(ret); - trace("max ext = %d x %d\n", ext.x, ext.y); - - ret = DeviceCapabilities(device, port, DC_MINEXTENT, NULL, NULL); - ok(ret != -1, "DeviceCapabilities DC_MINEXTENT failed\n"); - ext = MAKEPOINTS(ret); - trace("min ext = %d x %d\n", ext.x, ext.y); + /* these capabilities not available on all printer drivers */ + if (0) + { + ret = DeviceCapabilities(device, port, DC_MAXEXTENT, NULL, NULL); + ok(ret != -1, "DeviceCapabilities DC_MAXEXTENT failed\n"); + ext = MAKEPOINTS(ret); + trace("max ext = %d x %d\n", ext.x, ext.y); + + ret = DeviceCapabilities(device, port, DC_MINEXTENT, NULL, NULL); + ok(ret != -1, "DeviceCapabilities DC_MINEXTENT failed\n"); + ext = MAKEPOINTS(ret); + trace("min ext = %d x %d\n", ext.x, ext.y); + } fields = DeviceCapabilities(device, port, DC_FIELDS, NULL, NULL); ok(fields != (DWORD)-1, "DeviceCapabilities DC_FIELDS failed\n");
1
0
0
0
James Hawkins : gdi32: Remove a dependence on the amount of available memory.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: b48118b4727373309f7e64aa8b5a622d9b24cc69 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b48118b4727373309f7e64aa8…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Apr 24 20:47:44 2008 -0500 gdi32: Remove a dependence on the amount of available memory. --- dlls/gdi32/tests/bitmap.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index f7bfdfd..00441c0 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -974,9 +974,13 @@ static void test_bitmap(void) SetLastError(0xdeadbeef); hbmp = CreateBitmap(0x7ffffff, 9, 1, 1, NULL); - ok(!hbmp, "CreateBitmap should fail\n"); - ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY, - "expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); + if (!hbmp) + { + ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY, + "expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError()); + } + else + DeleteObject(hbmp); SetLastError(0xdeadbeef); hbmp = CreateBitmap(0x7ffffff + 1, 1, 1, 1, NULL);
1
0
0
0
James Hawkins : d3d8: Fix a few test failures in win2k3.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 537c4babed22fec1f31fb3414528f4153b676045 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=537c4babed22fec1f31fb3414…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Apr 24 20:36:04 2008 -0500 d3d8: Fix a few test failures in win2k3. --- dlls/d3d8/tests/device.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 8617c0c..9ce967a 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -1174,7 +1174,8 @@ static void test_lights(void) hr = IDirect3D8_CreateDevice( d3d8, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &d3dpp, &device ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE || hr == D3DERR_INVALIDCALL, + "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); if(!device) { skip("Failed to create a d3d device\n"); @@ -1252,7 +1253,8 @@ static void test_render_zero_triangles(void) hr = IDirect3D8_CreateDevice( d3d8, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL /* no NULLREF here */, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &d3dpp, &device ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE || hr == D3DERR_INVALIDCALL, + "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); if(!device) { skip("Failed to create a d3d device\n"); @@ -1302,7 +1304,8 @@ static void test_set_material(void) hr = IDirect3D8_CreateDevice( d3d8, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &present_parameters, &device ); - ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); + ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE || hr == D3DERR_INVALIDCALL, + "IDirect3D8_CreateDevice failed with %s\n", DXGetErrorString8(hr)); if(!device) { skip("Failed to create a d3d device\n");
1
0
0
0
James Hawkins : advapi32: Fix a test that fails in win2k3 SP2.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 76dfff11a34a321040f6e7348dbafabdb09d9295 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=76dfff11a34a321040f6e7348…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Apr 24 20:19:35 2008 -0500 advapi32: Fix a test that fails in win2k3 SP2. --- dlls/advapi32/tests/registry.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index e027a97..fe3d3ff 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -806,8 +806,9 @@ static void test_get_value(void) size = 0; ret = pRegGetValueA(hkey_main, NULL, "TP2_EXP_SZ", RRF_RT_REG_SZ, NULL, NULL, &size); ok(ret == ERROR_SUCCESS, "ret=%d\n", ret); - /* At least v5.2.3790.1830 (2003 SP1) returns the unexpanded sTestpath2 length + 1 here. */ - ok((size == strlen(expanded2)+1) || (size == strlen(sTestpath2)+1), + ok((size == strlen(expanded2)+1) || /* win2k3 SP1 */ + (size == strlen(expanded2)+2) || /* win2k3 SP2 */ + (size == strlen(sTestpath2)+1), "strlen(expanded2)=%d, strlen(sTestpath2)=%d, size=%d\n", lstrlenA(expanded2), lstrlenA(sTestpath2), size); /* Query REG_EXPAND_SZ using RRF_RT_REG_SZ (ok, expands) */
1
0
0
0
Robert Reif : winmm: Fix a test failure on Windows with Terminal Server.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: fa9a26921c5021c3f227f44bc12b2a5b75c79be9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa9a26921c5021c3f227f44bc…
Author: Robert Reif <reif(a)earthlink.net> Date: Thu Apr 24 19:39:43 2008 -0400 winmm: Fix a test failure on Windows with Terminal Server. --- dlls/winmm/tests/wave.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c index 60f0622..2844be4 100644 --- a/dlls/winmm/tests/wave.c +++ b/dlls/winmm/tests/wave.c @@ -854,9 +854,9 @@ static void wave_out_test_device(int device) } rc=waveOutGetDevCapsA(device,&capsA,4); - ok(rc==MMSYSERR_NOERROR, - "waveOutGetDevCapsA(%s): MMSYSERR_NOERROR expected, got %s\n", - dev_name(device),wave_out_error(rc)); + ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_INVALPARAM, + "waveOutGetDevCapsA(%s): MMSYSERR_NOERROR or MMSYSERR_INVALPARAM " + "expected, got %s\n", dev_name(device),wave_out_error(rc)); rc=waveOutGetDevCapsW(device,&capsW,4); ok(rc==MMSYSERR_NOERROR || rc==MMSYSERR_NOTSUPPORTED, @@ -888,6 +888,13 @@ static void wave_out_test_device(int device) nameA=strdup("not supported"); } + rc=waveOutGetDevCapsA(device,&capsA,sizeof(capsA)); + ok(rc==MMSYSERR_NOERROR, + "waveOutGetDevCapsA(%s): MMSYSERR_NOERROR expected, got %s\n", + dev_name(device),wave_out_error(rc)); + if (rc!=MMSYSERR_NOERROR) + return; + trace(" %s: \"%s\" (%s) %d.%d (%d:%d)\n",dev_name(device),capsA.szPname, (nameA?nameA:"failed"),capsA.vDriverVersion >> 8, capsA.vDriverVersion & 0xff, capsA.wMid,capsA.wPid);
1
0
0
0
Andrew Talbot : secur32: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 49939ed5445cbe37c08d7222e7cf0c9ede5d92ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49939ed5445cbe37c08d7222e…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:45 2008 +0100 secur32: Remove unused variables. --- dlls/secur32/ntlm.c | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c index f971fc1..bcd65ef 100644 --- a/dlls/secur32/ntlm.c +++ b/dlls/secur32/ntlm.c @@ -615,8 +615,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( lstrcpyA(want_flags, "SF"); if(fContextReq & ISC_REQ_CONFIDENTIALITY) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SEAL")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SEAL") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SEAL"); } if(fContextReq & ISC_REQ_CONNECTION) @@ -625,22 +624,19 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( ctxt_attr |= ISC_RET_EXTENDED_ERROR; if(fContextReq & ISC_REQ_INTEGRITY) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SIGN")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SIGN") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SIGN"); } if(fContextReq & ISC_REQ_MUTUAL_AUTH) ctxt_attr |= ISC_RET_MUTUAL_AUTH; if(fContextReq & ISC_REQ_REPLAY_DETECT) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SIGN")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SIGN") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SIGN"); } if(fContextReq & ISC_REQ_SEQUENCE_DETECT) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SIGN")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SIGN") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SIGN"); } if(fContextReq & ISC_REQ_STREAM) @@ -1974,7 +1970,6 @@ static const SecPkgInfoA infoA = { void SECUR32_initNTLMSP(void) { - SECURITY_STATUS ret; PNegoHelper helper; static CHAR version[] = "--version"; @@ -1983,7 +1978,7 @@ void SECUR32_initNTLMSP(void) version, NULL }; - if((ret = fork_helper(&helper, ntlm_auth, args)) != SEC_E_OK) + if(fork_helper(&helper, ntlm_auth, args) != SEC_E_OK) { /* Cheat and allocate a helper anyway, so cleanup later will work. */ helper = HeapAlloc(GetProcessHeap(),0, sizeof(PNegoHelper));
1
0
0
0
Andrew Talbot : setupapi: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 362cd67d3b689b26d91db6974f2fd7da4b176ee8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=362cd67d3b689b26d91db6974…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:51 2008 +0100 setupapi: Remove unused variables. --- dlls/setupapi/parser.c | 4 ++-- dlls/setupapi/setupx_main.c | 12 +++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dlls/setupapi/parser.c b/dlls/setupapi/parser.c index a00e068..8c8a518 100644 --- a/dlls/setupapi/parser.c +++ b/dlls/setupapi/parser.c @@ -778,7 +778,7 @@ static const WCHAR *eol_backslash_state( struct parser *parser, const WCHAR *pos /* handler for parser QUOTES state */ static const WCHAR *quotes_state( struct parser *parser, const WCHAR *pos ) { - const WCHAR *p, *token_end = parser->start; + const WCHAR *p; for (p = pos; !is_eol( parser, p ); p++) { @@ -787,7 +787,7 @@ static const WCHAR *quotes_state( struct parser *parser, const WCHAR *pos ) if (p+1 < parser->end && p[1] == '"') /* double quotes */ { push_token( parser, p + 1 ); - parser->start = token_end = p + 2; + parser->start = p + 2; p++; } else /* end of quotes */ diff --git a/dlls/setupapi/setupx_main.c b/dlls/setupapi/setupx_main.c index 606ffb8..82593f3 100644 --- a/dlls/setupapi/setupx_main.c +++ b/dlls/setupapi/setupx_main.c @@ -401,7 +401,7 @@ RETERR16 WINAPI CtlDelLdd16(LOGDISKID16 ldid) */ RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC pldd) { - LDD_LIST *pCurr, *pPrev = NULL; + LDD_LIST *pCurr; TRACE("(%p)\n", pldd); @@ -414,10 +414,7 @@ RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC pldd) pCurr = pFirstLDD; /* search until we find the appropriate LDD or hit the end */ while ((pCurr != NULL) && (pldd->ldid > pCurr->pldd->ldid)) - { - pPrev = pCurr; pCurr = pCurr->next; - } if ( (pCurr == NULL) /* hit end of list */ || (pldd->ldid != pCurr->pldd->ldid) ) return ERR_VCP_LDDFIND; /* correct ? */ @@ -534,7 +531,7 @@ RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC pldd) */ static RETERR16 SETUPX_GetLdd(LPLOGDISKDESC pldd) { - LDD_LIST *pCurr, *pPrev = NULL; + LDD_LIST *pCurr; if (!std_LDDs_done) SETUPX_CreateStandardLDDs(); @@ -545,10 +542,7 @@ static RETERR16 SETUPX_GetLdd(LPLOGDISKDESC pldd) pCurr = pFirstLDD; /* search until we find the appropriate LDD or hit the end */ while ((pCurr != NULL) && (pldd->ldid > pCurr->pldd->ldid)) - { - pPrev = pCurr; - pCurr = pCurr->next; - } + pCurr = pCurr->next; if (pCurr == NULL) /* hit end of list */ return ERR_VCP_LDDFIND; /* correct ? */
1
0
0
0
Andrew Talbot : shell32: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: f692f19531fb1c552758e112608be24a2815d73a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f692f19531fb1c552758e1126…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:56 2008 +0100 shell32: Remove unused variables. --- dlls/shell32/shlfileop.c | 4 ++-- dlls/shell32/shlmenu.c | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 76f1309..7c10588 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -1002,7 +1002,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles) { LPCWSTR ptr = szFiles; WCHAR szCurFile[MAX_PATH]; - DWORD i = 0, dwDirLen; + DWORD i = 0; if (!szFiles) return ERROR_INVALID_PARAMETER; @@ -1027,7 +1027,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles) /* change relative to absolute path */ if (PathIsRelativeW(ptr)) { - dwDirLen = GetCurrentDirectoryW(MAX_PATH, szCurFile) + 1; + GetCurrentDirectoryW(MAX_PATH, szCurFile); PathCombineW(szCurFile, szCurFile, ptr); flList->feFiles[i].bFromRelative = TRUE; } diff --git a/dlls/shell32/shlmenu.c b/dlls/shell32/shlmenu.c index cdd08c9..c44f8c1 100644 --- a/dlls/shell32/shlmenu.c +++ b/dlls/shell32/shlmenu.c @@ -132,7 +132,7 @@ static LPFMINFO FM_SetMenuParameter( static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl) { IShellFolder *lpsf, *lpsf2; ULONG ulItemAttr = SFGAO_FOLDER; - UINT uID, uFlags, uEnumFlags; + UINT uID, uEnumFlags; LPFNFMCALLBACK lpfnCallback; LPCITEMIDLIST pidl; WCHAR sTemp[MAX_PATH]; @@ -164,7 +164,6 @@ static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl) return 0; uID = menudata->uID; - uFlags = menudata->uFlags; uEnumFlags = menudata->uEnumFlags; lpfnCallback = menudata->lpfnCallback; menudata->bInitialized = FALSE; @@ -593,7 +592,7 @@ LRESULT WINAPI FileMenu_DrawItem( COLORREF clrPrevText, clrPrevBkgnd; int xi,yi,xt,yt; HIMAGELIST hImageList; - RECT TextRect, BorderRect; + RECT TextRect; LPFMINFO menuinfo; TRACE("%p %p %s\n", hWnd, lpdis, debugstr_w(pMyItem->szItemText)); @@ -616,9 +615,6 @@ LRESULT WINAPI FileMenu_DrawItem( if (menuinfo->nBorderWidth) TextRect.left += menuinfo->nBorderWidth; - BorderRect.right = menuinfo->nBorderWidth; -/* FillRect(lpdis->hDC, &BorderRect, CreateSolidBrush( menuinfo->crBorderColor)); -*/ TextRect.left += FM_LEFTBORDER; xi = TextRect.left + FM_SPACE1; yi = TextRect.top + FM_Y_SPACE/2;
1
0
0
0
Andrew Talbot : rpcrt4: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 649c7aeb7c1fda49a76ad02105adde12baa2cf9c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=649c7aeb7c1fda49a76ad0210…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:40 2008 +0100 rpcrt4: Remove unused variables. --- dlls/rpcrt4/ndr_marshall.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index d2ef11b..25e6853 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2996,7 +2996,6 @@ ULONG WINAPI NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, { unsigned size = *(const WORD*)(pFormat+2); PFORMAT_STRING conf_array = NULL; - PFORMAT_STRING pointer_desc = NULL; TRACE("(%p,%p)\n", pStubMsg, pFormat); @@ -3004,9 +3003,7 @@ ULONG WINAPI NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, pFormat += 4; if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat; - pFormat += 2; - if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat; - pFormat += 2; + pFormat += 4; ComplexStructMemorySize(pStubMsg, pFormat); @@ -4124,7 +4121,6 @@ void WINAPI NdrConformantStructFree(PMIDL_STUB_MESSAGE pStubMsg, { const NDR_CSTRUCT_FORMAT *pCStructFormat = (const NDR_CSTRUCT_FORMAT *)pFormat; PFORMAT_STRING pCArrayFormat; - ULONG esize; TRACE("(%p, %p, %p)\n", pStubMsg, pMemory, pFormat); @@ -4144,7 +4140,6 @@ void WINAPI NdrConformantStructFree(PMIDL_STUB_MESSAGE pStubMsg, RpcRaiseException(RPC_S_INTERNAL_ERROR); return; } - esize = *(const WORD*)(pCArrayFormat+2); ComputeConformance(pStubMsg, pMemory + pCStructFormat->memory_size, pCArrayFormat + 4, 0); @@ -4490,7 +4485,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, { const NDR_CVSTRUCT_FORMAT *pCVStructFormat = (const NDR_CVSTRUCT_FORMAT *)pFormat; PFORMAT_STRING pCVArrayFormat; - ULONG esize; TRACE("(%p, %p, %p)\n", pStubMsg, pMemory, pFormat); @@ -4507,8 +4501,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, switch (*pCVArrayFormat) { case RPC_FC_CVARRAY: - esize = *(const WORD*)(pCVArrayFormat+2); - pCVArrayFormat = ComputeConformance(pStubMsg, pMemory + pCVStructFormat->memory_size, pCVArrayFormat + 4, 0); pCVArrayFormat = ComputeVariance(pStubMsg, pMemory + pCVStructFormat->memory_size, @@ -4517,7 +4509,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, case RPC_FC_C_CSTRING: TRACE("string=%s\n", debugstr_a((char*)pMemory + pCVStructFormat->memory_size)); pStubMsg->ActualCount = strlen((char*)pMemory + pCVStructFormat->memory_size)+1; - esize = sizeof(char); if (pCVArrayFormat[1] == RPC_FC_STRING_SIZED) pCVArrayFormat = ComputeConformance(pStubMsg, pMemory + pCVStructFormat->memory_size, pCVArrayFormat + 2, 0); @@ -4527,7 +4518,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, case RPC_FC_C_WSTRING: TRACE("string=%s\n", debugstr_w((LPWSTR)pMemory + pCVStructFormat->memory_size)); pStubMsg->ActualCount = strlenW((LPWSTR)pMemory + pCVStructFormat->memory_size)+1; - esize = sizeof(WCHAR); if (pCVArrayFormat[1] == RPC_FC_STRING_SIZED) pCVArrayFormat = ComputeConformance(pStubMsg, pMemory + pCVStructFormat->memory_size, pCVArrayFormat + 2, 0); @@ -5012,7 +5002,6 @@ void WINAPI NdrVaryingArrayFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat) { - unsigned char alignment; DWORD elements; TRACE("(%p, %p, %p)\n", pStubMsg, pMemory, pFormat); @@ -5025,8 +5014,6 @@ void WINAPI NdrVaryingArrayFree(PMIDL_STUB_MESSAGE pStubMsg, return; } - alignment = pFormat[1] + 1; - if (pFormat[0] == RPC_FC_SMVARRAY) { pFormat += 2;
1
0
0
0
Eric Pouech : winhelp: Emit the proper RTF stream for a metafile to RichEdit.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 5da401950c65a250af986f1469515313cca2ef47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5da401950c65a250af986f146…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:34 2008 +0200 winhelp: Emit the proper RTF stream for a metafile to RichEdit. --- programs/winhelp/hlpfile.c | 38 +++++++++++++++++++++++++++++++++++++- 1 files changed, 37 insertions(+), 1 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index 6417c90..f5935a1 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -806,7 +806,43 @@ done: */ static BOOL HLPFILE_RtfAddMetaFile(struct RtfData* rd, BYTE* beg, BYTE pack) { - return TRUE; + BYTE* ptr; + unsigned long size, csize; + unsigned long off, hsoff; + BYTE* bits; + char tmp[256]; + unsigned mm; + BOOL ret; + + WINE_TRACE("Loading metafile\n"); + + ptr = beg + 2; /* for type and pack */ + + mm = fetch_ushort(&ptr); /* mapping mode */ + sprintf(tmp, "{\\pict\\wmetafile%d\\picw%d\\pich%d", + mm, GET_USHORT(ptr, 0), GET_USHORT(ptr, 2)); + if (!HLPFILE_RtfAddControl(rd, tmp)) return FALSE; + ptr += 4; + + size = fetch_ulong(&ptr); /* decompressed size */ + csize = fetch_ulong(&ptr); /* compressed size */ + fetch_ulong(&ptr); /* hotspot size */ + off = GET_UINT(ptr, 0); + hsoff = GET_UINT(ptr, 4); + ptr += 8; + + WINE_TRACE("sz=%lu csz=%lu offs=%lu/%u,%lu\n", + size, csize, off, ptr - beg, hsoff); + + bits = HLPFILE_DecompressGfx(beg + off, csize, size, pack); + if (!bits) return FALSE; + + ret = HLPFILE_RtfAddHexBytes(rd, bits, size) && + HLPFILE_RtfAddControl(rd, "}"); + + if (bits != beg + off) HeapFree(GetProcessHeap(), 0, bits); + + return ret; } /******************************************************************
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
52
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
Results per page:
10
25
50
100
200