winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
839 discussions
Start a n
N
ew thread
Gerald Pfeifer : winhttp: Include <sys/socket.h>.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: c3818f5cd98b5a8903291eef8efd677e71b04c3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3818f5cd98b5a8903291eef8…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Thu Aug 28 20:37:00 2008 +0200 winhttp: Include <sys/socket.h>. --- dlls/winhttp/request.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 3449ce6..b0b81f0 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -24,6 +24,9 @@ #ifdef HAVE_ARPA_INET_H # include <arpa/inet.h> #endif +#ifdef HAVE_SYS_SOCKET_H +# include <sys/socket.h> +#endif #include "windef.h" #include "winbase.h"
1
0
0
0
Dylan Smith : richedit: Prevent typing text at end of table row.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: f11fe1c7a98b76eec509269cc8defafa5772e0b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f11fe1c7a98b76eec509269cc…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Thu Aug 28 16:52:00 2008 -0400 richedit: Prevent typing text at end of table row. --- dlls/riched20/editor.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++- dlls/riched20/editor.h | 1 + dlls/riched20/table.c | 10 +++++-- 3 files changed, 78 insertions(+), 4 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 3e6c79b..adc9362 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3685,6 +3685,8 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, if (((unsigned)wstr)>=' ' || (wstr=='\r' && (GetWindowLongW(hWnd, GWL_STYLE) & ES_MULTILINE)) || wstr=='\t') { + ME_Cursor cursor = editor->pCursors[0]; + ME_DisplayItem *para = ME_GetParagraph(cursor.pRun); int from, to; BOOL ctrl_is_down = GetKeyState(VK_CONTROL) & 0x8000; ME_GetSelection(editor, &from, &to); @@ -3693,7 +3695,6 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, && !(ctrl_is_down && !editor->bEmulateVersion10) ) { - ME_Cursor cursor = editor->pCursors[0]; ME_DisplayItem *para; BOOL bSelectedRow = FALSE; @@ -3712,6 +3713,74 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, ME_CommitUndo(editor); return 0; } + } else if (!editor->bEmulateVersion10) { /* v4.1 */ + if (para->member.para.nFlags & MEPF_ROWEND) { + if (wstr=='\r') { + /* FIXME: Add a new table row after this row. */ + return 0; + } else if (from == to) { + para = para->member.para.next_para; + if (para->member.para.nFlags & MEPF_ROWSTART) + para = para->member.para.next_para; + editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun); + editor->pCursors[0].nOffset = 0; + editor->pCursors[1] = editor->pCursors[0]; + } + } + else if (para == ME_GetParagraph(editor->pCursors[1].pRun) && + cursor.nOffset + cursor.pRun->member.run.nCharOfs == 0 && + para->member.para.prev_para->member.para.nFlags & MEPF_ROWSTART && + !para->member.para.prev_para->member.para.nCharOfs) + { + /* FIXME: Insert a newline before the table. */ + } + } else { /* v1.0 - 3.0 */ + ME_DisplayItem *para = ME_GetParagraph(cursor.pRun); + if (ME_IsInTable(cursor.pRun)) + { + if (cursor.pRun->member.run.nFlags & MERF_ENDPARA) + { + if (from == to) { + if (wstr=='\r') { + ME_ContinueCoalescingTransaction(editor); + para = ME_AppendTableRow(editor, para); + editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun); + editor->pCursors[0].nOffset = 0; + editor->pCursors[1] = editor->pCursors[0]; + ME_CommitCoalescingUndo(editor); + ME_UpdateRepaint(editor); + } else { + /* Text should not be inserted at the end of the table. */ + MessageBeep(-1); + } + return 0; + } + } else if (wstr == '\r') { + ME_ContinueCoalescingTransaction(editor); + if (cursor.pRun->member.run.nCharOfs + cursor.nOffset == 0 && + !ME_IsInTable(para->member.para.prev_para)) + { + /* Insert newline before table */ + WCHAR endl = '\r'; + cursor.pRun = ME_FindItemBack(para, diRun); + if (cursor.pRun) + editor->pCursors[0].pRun = cursor.pRun; + editor->pCursors[0].nOffset = 0; + editor->pCursors[1] = editor->pCursors[0]; + ME_InsertTextFromCursor(editor, 0, &endl, 1, + editor->pCursors[0].pRun->member.run.style); + } else { + editor->pCursors[1] = editor->pCursors[0]; + para = ME_AppendTableRow(editor, para); + editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun); + editor->pCursors[0].nOffset = 0; + editor->pCursors[1] = editor->pCursors[0]; + } + ME_CommitCoalescingUndo(editor); + ME_UpdateRepaint(editor); + return 0; + } + } } /* FIXME maybe it would make sense to call EM_REPLACESEL instead ? */ /* WM_CHAR is restricted to nTextLimit */ diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 5e6f4cb..5e73c97 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -296,6 +296,7 @@ ME_DisplayItem *ME_GetTableRowEnd(ME_DisplayItem *para); ME_DisplayItem *ME_GetTableRowStart(ME_DisplayItem *para); void ME_CheckTablesForCorruption(ME_TextEditor *editor); void ME_ProtectPartialTableDeletion(ME_TextEditor *editor, int nOfs,int *nChars); +ME_DisplayItem* ME_AppendTableRow(ME_TextEditor *editor, ME_DisplayItem *table_row); void ME_TabPressedInTable(ME_TextEditor *editor, BOOL bSelectedRow); struct RTFTable *ME_MakeTableDef(ME_TextEditor *editor); void ME_InitTableDef(ME_TextEditor *editor, struct RTFTable *tableDef); diff --git a/dlls/riched20/table.c b/dlls/riched20/table.c index 1e2f5fa..6289e34 100644 --- a/dlls/riched20/table.c +++ b/dlls/riched20/table.c @@ -381,8 +381,8 @@ void ME_ProtectPartialTableDeletion(ME_TextEditor *editor, int nOfs,int *nChars) } } -static ME_DisplayItem* ME_AppendTableRow(ME_TextEditor *editor, - ME_DisplayItem *table_row) +ME_DisplayItem* ME_AppendTableRow(ME_TextEditor *editor, + ME_DisplayItem *table_row) { WCHAR endl = '\r', tab = '\t'; ME_DisplayItem *run; @@ -390,9 +390,13 @@ static ME_DisplayItem* ME_AppendTableRow(ME_TextEditor *editor, int i; assert(table_row); + assert(table_row->type == diParagraph); if (!editor->bEmulateVersion10) { /* v4.1 */ ME_DisplayItem *insertedCell, *para, *cell; - cell = ME_FindItemFwd(table_row, diCell); + if (table_row->member.para.nFlags & MEPF_ROWEND) + cell = ME_FindItemBack(table_row, diCell); + else + cell = ME_FindItemFwd(table_row, diCell); run = ME_GetTableRowEnd(table_row)->member.para.next_para; run = ME_FindItemFwd(run, diRun); editor->pCursors[0].pRun = run;
1
0
0
0
Dylan Smith : richedit: Prevent streaming in rich text at end of table row.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: 36be721027c21bac824bcc8592c40c60cc2c9d7c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36be721027c21bac824bcc859…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Thu Aug 28 15:24:27 2008 -0400 richedit: Prevent streaming in rich text at end of table row. --- dlls/riched20/editor.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index e8720e9..3e6c79b 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1410,6 +1410,28 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre style = ME_GetSelectionInsertStyle(editor); ME_InternalDeleteText(editor, from, to-from, FALSE); + + /* Don't insert text at the end of the table row */ + if (!editor->bEmulateVersion10) { /* v4.1 */ + ME_DisplayItem *para = ME_GetParagraph(editor->pCursors->pRun); + if (para->member.para.nFlags & MEPF_ROWEND) + { + para = para->member.para.next_para; + editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun); + editor->pCursors[0].nOffset = 0; + } + if (para->member.para.nFlags & MEPF_ROWSTART) + { + para = para->member.para.next_para; + editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun); + editor->pCursors[0].nOffset = 0; + } + editor->pCursors[1] = editor->pCursors[0]; + } else { /* v1.0 - 3.0 */ + if (editor->pCursors[0].pRun->member.run.nFlags & MERF_ENDPARA && + ME_IsInTable(editor->pCursors[0].pRun)) + return 0; + } } else { ME_DisplayItem *para_item;
1
0
0
0
Dylan Smith : richedit: Copy cell border properties when appending a row to the table.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: ff1f3d76b73fe2cc4b9a980d9eb85d87e0b98e74 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff1f3d76b73fe2cc4b9a980d9…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Thu Aug 28 15:24:15 2008 -0400 richedit: Copy cell border properties when appending a row to the table. --- dlls/riched20/table.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/riched20/table.c b/dlls/riched20/table.c index aa82c62..1e2f5fa 100644 --- a/dlls/riched20/table.c +++ b/dlls/riched20/table.c @@ -402,12 +402,14 @@ static ME_DisplayItem* ME_AppendTableRow(ME_TextEditor *editor, insertedCell = ME_FindItemFwd(para, diCell); /* Copy cell properties */ insertedCell->member.cell.nRightBoundary = cell->member.cell.nRightBoundary; + insertedCell->member.cell.border = cell->member.cell.border; while (cell->member.cell.next_cell) { cell = cell->member.cell.next_cell; para = ME_InsertTableCellFromCursor(editor); insertedCell = ME_FindItemBack(para, diCell); /* Copy cell properties */ insertedCell->member.cell.nRightBoundary = cell->member.cell.nRightBoundary; + insertedCell->member.cell.border = cell->member.cell.border; }; ME_InsertTableRowEndFromCursor(editor); /* return the table row start for the inserted paragraph */
1
0
0
0
Dylan Smith : richedit: Fixed a bug in protecting table cell boundaries.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: ab6ca01471c434205105655d12959458d6011771 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab6ca01471c434205105655d1…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Thu Aug 28 15:24:07 2008 -0400 richedit: Fixed a bug in protecting table cell boundaries. --- dlls/riched20/table.c | 30 ++++++++---------------------- 1 files changed, 8 insertions(+), 22 deletions(-) diff --git a/dlls/riched20/table.c b/dlls/riched20/table.c index 248ea11..aa82c62 100644 --- a/dlls/riched20/table.c +++ b/dlls/riched20/table.c @@ -345,7 +345,7 @@ void ME_ProtectPartialTableDeletion(ME_TextEditor *editor, int nOfs,int *nChars) ME_DisplayItem *pRun; int nCharsToBoundary; - if (this_para->member.para.nCharOfs != nOfs && + if ((this_para->member.para.nCharOfs != nOfs || this_para == end_para) && this_para->member.para.pFmt->dwMask & PFM_TABLE && this_para->member.para.pFmt->wEffects & PFE_TABLE) { @@ -360,27 +360,13 @@ void ME_ProtectPartialTableDeletion(ME_TextEditor *editor, int nOfs,int *nChars) } else if (end_para->member.para.pFmt->dwMask & PFM_TABLE && end_para->member.para.pFmt->wEffects & PFE_TABLE) { - if (this_para == end_para) - { - pRun = c2.pRun; - /* Find the previous tab or end paragraph to use as a delete boundary */ - while (pRun && !(pRun->member.run.nFlags & (MERF_TAB|MERF_ENDPARA))) - pRun = ME_FindItemBack(pRun, diRun); - if (pRun && pRun->member.run.nFlags & MERF_ENDPARA) - { - /* We are in the first cell, and have gone back to the previous - * paragraph, so nothing needs to be protected. */ - pRun = NULL; - } - } else { - /* The deletion starts from before the row, so don't join it with - * previous non-empty paragraphs. */ - pRun = NULL; - if (nOfs > this_para->member.para.nCharOfs) - pRun = ME_FindItemBack(end_para, diRun); - if (!pRun) - pRun = ME_FindItemFwd(end_para, diRun); - } + /* The deletion starts from before the row, so don't join it with + * previous non-empty paragraphs. */ + pRun = NULL; + if (nOfs > this_para->member.para.nCharOfs) + pRun = ME_FindItemBack(end_para, diRun); + if (!pRun) + pRun = ME_FindItemFwd(end_para, diRun); if (pRun) { nCharsToBoundary = ME_GetParagraph(pRun)->member.para.nCharOfs
1
0
0
0
Dylan Smith : richedit: Pressing tab with selection back to start of table.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: 238fd58a09cb6f8b8833df805782a04174462365 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=238fd58a09cb6f8b8833df805…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com> Date: Thu Aug 28 15:23:53 2008 -0400 richedit: Pressing tab with selection back to start of table. --- dlls/riched20/editor.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index aa59383..e8720e9 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -3678,6 +3678,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, para = ME_GetParagraph(cursor.pRun); if (ME_IsSelection(editor) && cursor.pRun->member.run.nCharOfs + cursor.nOffset == 0 && + to == ME_GetCursorOfs(editor, 0) && para->member.para.prev_para->type == diParagraph) { para = para->member.para.prev_para;
1
0
0
0
Alexandre Julliard : winex11: Always set the z-order when a window is being made visible.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: ac40efa91141d87abe1aaa02526b79cc65efcef6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ac40efa91141d87abe1aaa025…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Aug 29 13:34:55 2008 +0200 winex11: Always set the z-order when a window is being made visible. --- dlls/winex11.drv/window.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 3143765..2bf41a6 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1194,7 +1194,7 @@ static void sync_window_position( Display *display, struct x11drv_win_data *data mask |= CWX | CWY; } - if (!(swp_flags & SWP_NOZORDER)) + if (!(swp_flags & SWP_NOZORDER) || (swp_flags & SWP_SHOWWINDOW)) { /* find window that this one must be after */ HWND prev = GetWindow( data->hwnd, GW_HWNDPREV );
1
0
0
0
Alexandre Julliard : winex11: Allocate image data from the process heap where possible.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: 90ef43ab26a9bac0ddb3aa9deaf75ad951e2c60a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90ef43ab26a9bac0ddb3aa9de…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Aug 29 13:34:11 2008 +0200 winex11: Allocate image data from the process heap where possible. --- dlls/winex11.drv/bitblt.c | 4 ++-- dlls/winex11.drv/bitmap.c | 6 ++++-- dlls/winex11.drv/dib.c | 40 ++++++++++++++++++++++++++-------------- dlls/winex11.drv/x11drv.h | 1 + 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 8bbc252..dcde11b 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -896,7 +896,7 @@ static int BITBLT_GetSrcAreaStretch( X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE XPutImage( gdi_display, pixmap, gc, imageDst, 0, 0, 0, 0, rectDst.right - rectDst.left, rectDst.bottom - rectDst.top ); XDestroyImage( imageSrc ); - XDestroyImage( imageDst ); + X11DRV_DIB_DestroyXImage( imageDst ); wine_tsx11_unlock(); return 0; /* no exposure events generated */ } @@ -1026,7 +1026,7 @@ static int BITBLT_GetSrcArea( X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDe XPutImage( gdi_display, pixmap, gc, imageDst, 0, 0, 0, 0, width, height ); XDestroyImage( imageSrc ); - XDestroyImage( imageDst ); + X11DRV_DIB_DestroyXImage( imageDst ); wine_tsx11_unlock(); } } diff --git a/dlls/winex11.drv/bitmap.c b/dlls/winex11.drv/bitmap.c index 0bcb087..32018c8 100644 --- a/dlls/winex11.drv/bitmap.c +++ b/dlls/winex11.drv/bitmap.c @@ -316,7 +316,7 @@ LONG X11DRV_SetBitmapBits( HBITMAP hbitmap, const void *bits, LONG count ) wine_tsx11_lock(); image = XCreateImage( gdi_display, visual, physBitmap->pixmap_depth, ZPixmap, 0, NULL, bitmap.bmWidth, height, 32, 0 ); - if (!(image->data = malloc(image->bytes_per_line * height))) + if (!(image->data = HeapAlloc( GetProcessHeap(), 0, image->bytes_per_line * height ))) { WARN("No memory to create image data.\n"); XDestroyImage( image ); @@ -407,7 +407,9 @@ LONG X11DRV_SetBitmapBits( HBITMAP hbitmap, const void *bits, LONG count ) } XPutImage( gdi_display, physBitmap->pixmap, BITMAP_GC(physBitmap), image, 0, 0, 0, 0, bitmap.bmWidth, height ); - XDestroyImage( image ); /* frees image->data too */ + HeapFree( GetProcessHeap(), 0, image->data ); + image->data = NULL; + XDestroyImage( image ); wine_tsx11_unlock(); return count; } diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index b2a5b5a..461da16 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -221,19 +221,36 @@ int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) XImage *X11DRV_DIB_CreateXImage( int width, int height, int depth ) { int width_bytes; - XImage *image; + XImage *image = NULL; + void *data; wine_tsx11_lock(); width_bytes = X11DRV_DIB_GetXImageWidthBytes( width, depth ); - image = XCreateImage( gdi_display, visual, depth, ZPixmap, 0, - calloc( height, width_bytes ), - width, height, 32, width_bytes ); + data = HeapAlloc( GetProcessHeap(), 0, height * width_bytes ); + if (data) image = XCreateImage( gdi_display, visual, depth, ZPixmap, 0, + data, width, height, 32, width_bytes ); + if (!image) HeapFree( GetProcessHeap(), 0, data ); wine_tsx11_unlock(); return image; } /*********************************************************************** + * X11DRV_DIB_DestroyXImage + * + * Destroy an X image created with X11DRV_DIB_CreateXImage. + */ +void X11DRV_DIB_DestroyXImage( XImage *image ) +{ + HeapFree( GetProcessHeap(), 0, image->data ); + image->data = NULL; + wine_tsx11_lock(); + XDestroyImage( image ); + wine_tsx11_unlock(); +} + + +/*********************************************************************** * DIB_GetBitmapInfoEx * * Get the info from a bitmap header. @@ -3520,7 +3537,7 @@ static int X11DRV_DIB_SetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr ) else { bmpImage = XCreateImage( gdi_display, visual, descr->depth, ZPixmap, 0, NULL, descr->infoWidth, lines, 32, 0 ); - bmpImage->data = calloc( lines, bmpImage->bytes_per_line ); + bmpImage->data = HeapAlloc( GetProcessHeap(), 0, lines * bmpImage->bytes_per_line ); if(bmpImage->data == NULL) { ERR("Out of memory!\n"); XDestroyImage( bmpImage ); @@ -3628,7 +3645,7 @@ static int X11DRV_DIB_SetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr ) descr->xSrc, descr->ySrc, descr->xDest, descr->yDest, descr->width, descr->height ); } - if (!descr->image) XDestroyImage( bmpImage ); + if (!descr->image) X11DRV_DIB_DestroyXImage( bmpImage ); wine_tsx11_unlock(); return lines; } @@ -3649,7 +3666,7 @@ static int X11DRV_DIB_GetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr ) else { bmpImage = XCreateImage( gdi_display, visual, descr->depth, ZPixmap, 0, NULL, descr->infoWidth, lines, 32, 0 ); - bmpImage->data = calloc( lines, bmpImage->bytes_per_line ); + bmpImage->data = HeapAlloc( GetProcessHeap(), 0, lines * bmpImage->bytes_per_line ); if(bmpImage->data == NULL) { ERR("Out of memory!\n"); XDestroyImage( bmpImage ); @@ -3766,12 +3783,7 @@ static int X11DRV_DIB_GetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr ) break; } - if (!descr->image) - { - wine_tsx11_lock(); - XDestroyImage( bmpImage ); - wine_tsx11_unlock(); - } + if (!descr->image) X11DRV_DIB_DestroyXImage( bmpImage ); return lines; } @@ -4751,7 +4763,7 @@ void X11DRV_DIB_DeleteDIBSection(X_PHYSBITMAP *physBitmap, DIBSECTION *dib) } else #endif - XDestroyImage( physBitmap->image ); + X11DRV_DIB_DestroyXImage( physBitmap->image ); wine_tsx11_unlock(); } diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 7bcec06..8f5c828 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -237,6 +237,7 @@ extern void X11DRV_FONT_Init( int log_pixels_x, int log_pixels_y ); extern int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ); extern XImage *X11DRV_DIB_CreateXImage( int width, int height, int depth ); +extern void X11DRV_DIB_DestroyXImage( XImage *image ); extern HGLOBAL X11DRV_DIB_CreateDIBFromBitmap(HDC hdc, HBITMAP hBmp); extern HGLOBAL X11DRV_DIB_CreateDIBFromPixmap(Pixmap pixmap, HDC hdc); extern Pixmap X11DRV_DIB_CreatePixmapFromDIB( HGLOBAL hPackedDIB, HDC hdc );
1
0
0
0
James Hawkins : kernel32: Add tests for LoadLibraryEx.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: 816f57cbb13e6177bcefef9dd5d4e2d00ba44b32 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=816f57cbb13e6177bcefef9dd…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Aug 28 21:22:01 2008 -0500 kernel32: Add tests for LoadLibraryEx. --- dlls/kernel32/tests/module.c | 106 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 106 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/tests/module.c b/dlls/kernel32/tests/module.c index f524be7..ca31aaf 100644 --- a/dlls/kernel32/tests/module.c +++ b/dlls/kernel32/tests/module.c @@ -216,6 +216,111 @@ static void testGetProcAddress_Wrong(void) "Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_HANDLE(win9x), got %d\n", GetLastError()); } +static void testLoadLibraryEx(void) +{ + CHAR path[MAX_PATH]; + HMODULE hmodule; + HANDLE hfile; + + hfile = CreateFileA("testfile.dll", GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); + ok(hfile != INVALID_HANDLE_VALUE, "Expected a valid file handle\n"); + + /* NULL lpFileName */ + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA(NULL, NULL, 0); + ok(hmodule == 0, "Expected 0, got %p\n", hmodule); + ok(GetLastError() == ERROR_MOD_NOT_FOUND, + "Expected ERROR_MOD_NOT_FOUND, got %d\n", GetLastError()); + + /* empty lpFileName */ + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA("", NULL, 0); + ok(hmodule == 0, "Expected 0, got %p\n", hmodule); + ok(GetLastError() == ERROR_MOD_NOT_FOUND, + "Expected ERROR_MOD_NOT_FOUND, got %d\n", GetLastError()); + + /* hFile is non-NULL */ + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA("testfile.dll", hfile, 0); + ok(hmodule == 0, "Expected 0, got %p\n", hmodule); + todo_wine + { + ok(GetLastError() == ERROR_SHARING_VIOLATION, + "Expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); + } + + /* has nothing to do with hFile */ + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA("testfile.dll", NULL, 0); + ok(hmodule == 0, "Expected 0, got %p\n", hmodule); + todo_wine + { + ok(GetLastError() == ERROR_SHARING_VIOLATION, + "Expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); + } + + /* one last try with hFile */ + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA(NULL, hfile, 0); + ok(hmodule == 0, "Expected 0, got %p\n", hmodule); + ok(GetLastError() == ERROR_MOD_NOT_FOUND, + "Expected ERROR_MOD_NOT_FOUND, got %d\n", GetLastError()); + + CloseHandle(hfile); + + /* load empty file */ + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA("testfile.dll", NULL, LOAD_LIBRARY_AS_DATAFILE); + ok(hmodule == 0, "Expected 0, got %p\n", hmodule); + todo_wine + { + ok(GetLastError() == ERROR_FILE_INVALID, + "Expected ERROR_FILE_INVALID, got %d\n", GetLastError()); + } + + DeleteFileA("testfile.dll"); + + GetSystemDirectoryA(path, MAX_PATH); + if (path[lstrlenA(path) - 1] != '\\') + lstrcatA(path, "\\"); + lstrcatA(path, "kernel32.dll"); + + /* load kernel32.dll with an absolute path */ + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA(path, NULL, LOAD_LIBRARY_AS_DATAFILE); + ok(hmodule != 0, "Expected valid module handle\n"); + ok(GetLastError() == 0xdeadbeef, + "Expected 0xdeadbeef, got %d\n", GetLastError()); + + CloseHandle(hmodule); + + /* load kernel32.dll with no path */ + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA("kernel32.dll", NULL, LOAD_LIBRARY_AS_DATAFILE); + ok(hmodule != 0, "Expected valid module handle\n"); + ok(GetLastError() == 0xdeadbeef, + "Expected 0xdeadbeef, got %d\n", GetLastError()); + + CloseHandle(hmodule); + + GetCurrentDirectoryA(MAX_PATH, path); + if (path[lstrlenA(path) - 1] != '\\') + lstrcatA(path, "\\"); + lstrcatA(path, "kernel32.dll"); + + /* load kernel32.dll with an absolute path that does not exist */ + SetLastError(0xdeadbeef); + hmodule = LoadLibraryExA(path, NULL, LOAD_LIBRARY_AS_DATAFILE); + todo_wine + { + ok(hmodule == 0, "Expected 0, got %p\n", hmodule); + } + ok(GetLastError() == ERROR_FILE_NOT_FOUND, + "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); +} + START_TEST(module) { WCHAR filenameW[MAX_PATH]; @@ -238,4 +343,5 @@ START_TEST(module) testNestedLoadLibraryA(); testLoadLibraryA_Wrong(); testGetProcAddress_Wrong(); + testLoadLibraryEx(); }
1
0
0
0
James Hawkins : msi: Add tests for opening an empty package.
by Alexandre Julliard
29 Aug '08
29 Aug '08
Module: wine Branch: master Commit: f40890c9405d7c593b3e4872000fdb09718a8e28 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f40890c9405d7c593b3e48720…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Thu Aug 28 21:21:22 2008 -0500 msi: Add tests for opening an empty package. --- dlls/msi/tests/package.c | 160 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 160 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index ec299ea..3775cbd 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -7869,6 +7869,165 @@ static void test_access(void) DeleteFileA(msifile); } +static void test_emptypackage(void) +{ + MSIHANDLE hpkg, hdb, hsuminfo; + MSIHANDLE hview, hrec; + MSICONDITION condition; + CHAR buffer[MAX_PATH]; + DWORD size; + UINT r; + + r = MsiOpenPackageA("", &hpkg); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + + hdb = MsiGetActiveDatabase(hpkg); + todo_wine + { + ok(hdb != 0, "Expected a valid database handle\n"); + } + + r = MsiDatabaseOpenView(hdb, "SELECT * FROM `_Tables`", &hview); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + r = MsiViewExecute(hview, 0); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + + r = MsiViewFetch(hview, &hrec); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + + size = MAX_PATH; + r = MsiRecordGetString(hrec, 1, buffer, &size); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(buffer, "_Property"), + "Expected \"_Property\", got \"%s\"\n", buffer); + } + + MsiCloseHandle(hrec); + + r = MsiViewFetch(hview, &hrec); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + + size = MAX_PATH; + r = MsiRecordGetString(hrec, 1, buffer, &size); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmpA(buffer, "#_FolderCache"), + "Expected \"_Property\", got \"%s\"\n", buffer); + } + + MsiCloseHandle(hrec); + MsiViewClose(hview); + MsiCloseHandle(hview); + + condition = MsiDatabaseIsTablePersistentA(hdb, "_Property"); + todo_wine + { + ok(condition == MSICONDITION_FALSE, + "Expected MSICONDITION_FALSE, got %d\n", condition); + } + + r = MsiDatabaseOpenView(hdb, "SELECT * FROM `_Property`", &hview); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + r = MsiViewExecute(hview, 0); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + + /* _Property table is not empty */ + r = MsiViewFetch(hview, &hrec); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + + MsiCloseHandle(hrec); + MsiViewClose(hview); + MsiCloseHandle(hview); + + condition = MsiDatabaseIsTablePersistentA(hdb, "#_FolderCache"); + todo_wine + { + ok(condition == MSICONDITION_FALSE, + "Expected MSICONDITION_FALSE, got %d\n", condition); + } + + r = MsiDatabaseOpenView(hdb, "SELECT * FROM `#_FolderCache`", &hview); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + r = MsiViewExecute(hview, 0); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + + /* #_FolderCache is not empty */ + r = MsiViewFetch(hview, &hrec); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + + MsiCloseHandle(hrec); + MsiViewClose(hview); + MsiCloseHandle(hview); + + r = MsiDatabaseOpenView(hdb, "SELECT * FROM `_Streams`", &hview); + todo_wine + { + ok(r == ERROR_BAD_QUERY_SYNTAX, + "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); + } + + r = MsiDatabaseOpenView(hdb, "SELECT * FROM `_Storages`", &hview); + todo_wine + { + ok(r == ERROR_BAD_QUERY_SYNTAX, + "Expected ERROR_BAD_QUERY_SYNTAX, got %d\n", r); + } + + r = MsiGetSummaryInformationA(hdb, NULL, 0, &hsuminfo); + todo_wine + { + ok(r == ERROR_INSTALL_PACKAGE_INVALID, + "Expected ERROR_INSTALL_PACKAGE_INVALID, got %d\n", r); + } + + MsiCloseHandle(hsuminfo); + + r = MsiDatabaseCommit(hdb); + todo_wine + { + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + } + + MsiCloseHandle(hdb); + MsiCloseHandle(hpkg); +} + START_TEST(package) { GetCurrentDirectoryA(MAX_PATH, CURR_DIR); @@ -7895,4 +8054,5 @@ START_TEST(package) test_shortlongsource(); test_sourcedir(); test_access(); + test_emptypackage(); }
1
0
0
0
← Newer
1
2
3
4
5
...
84
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Results per page:
10
25
50
100
200