winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2020
----- 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
1 participants
851 discussions
Start a n
N
ew thread
Huw Davies : riched20: Use para_in_table() instead of IsInTable().
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: c8fef268846221fa161d920c10c2b8290b64b476 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c8fef268846221fa161d920c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Nov 4 06:56:25 2020 +0000 riched20: Use para_in_table() instead of IsInTable(). Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.h | 1 - dlls/riched20/table.c | 17 ++--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index e884cbee2f3..05a6a7ee37f 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -289,7 +289,6 @@ ME_Paragraph *editor_end_para( ME_TextEditor *editor ) DECLSPEC_HIDDEN; ME_Paragraph *editor_first_para( ME_TextEditor *editor ) DECLSPEC_HIDDEN; /* table.c */ -BOOL ME_IsInTable(ME_DisplayItem *pItem) DECLSPEC_HIDDEN; ME_Paragraph *cell_end_para( ME_Cell *cell ) DECLSPEC_HIDDEN; ME_Paragraph *cell_first_para( ME_Cell *cell ) DECLSPEC_HIDDEN; ME_Cell *cell_next( ME_Cell *cell ) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/table.c b/dlls/riched20/table.c index e08876d29bd..9d0d24fa1c3 100644 --- a/dlls/riched20/table.c +++ b/dlls/riched20/table.c @@ -212,19 +212,6 @@ ME_Paragraph *cell_end_para( ME_Cell *cell ) return &ME_FindItemBack( cell_get_di( next ), diParagraph )->member.para; } -BOOL ME_IsInTable(ME_DisplayItem *pItem) -{ - PARAFORMAT2 *pFmt; - if (!pItem) - return FALSE; - if (pItem->type == diRun) - pItem = ME_GetParagraph(pItem); - if (pItem->type != diParagraph) - return FALSE; - pFmt = &pItem->member.para.fmt; - return pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE; -} - /* Table rows should either be deleted completely or not at all. */ void table_protect_partial_deletion( ME_TextEditor *editor, ME_Cursor *c, int *num_chars ) { @@ -504,7 +491,7 @@ void table_handle_tab( ME_TextEditor *editor, BOOL selected_row ) } if (!editor->bEmulateVersion10) /* v4.1 */ { - if (!ME_IsInTable(toCursor.pRun)) + if (!para_in_table( &toCursor.pPara->member.para )) { editor->pCursors[0] = toCursor; editor->pCursors[1] = toCursor; @@ -513,7 +500,7 @@ void table_handle_tab( ME_TextEditor *editor, BOOL selected_row ) } else /* v1.0 - 3.0 */ { - if (!ME_IsInTable(fromCursor.pRun)) + if (!para_in_table( &fromCursor.pPara->member.para) ) { editor->pCursors[0] = fromCursor; editor->pCursors[1] = fromCursor;
1
0
0
0
Huw Davies : riched20: Return a row ptr from the row creation function.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 507f5170941041b9dfbcdea51ef7e545c882542a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=507f5170941041b9dfbcdea5…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Nov 4 06:56:24 2020 +0000 riched20: Return a row ptr from the row creation function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/wrap.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index 75bbb2c05c5..5fc20dbf83b 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -173,14 +173,14 @@ static int find_split_point( ME_Context *c, int cx, ME_Run *run ) return ME_CharFromPointContext( c, cx, run, FALSE, FALSE ); } -static ME_DisplayItem *ME_MakeRow(int height, int baseline, int width) +static ME_Row *row_create( int height, int baseline, int width ) { ME_DisplayItem *item = ME_MakeDI(diStartRow); item->member.row.nHeight = height; item->member.row.nBaseline = baseline; item->member.row.nWidth = width; - return item; + return &item->member.row; } static void ME_BeginRow(ME_WrapContext *wc) @@ -284,7 +284,7 @@ static void layout_row( ME_Run *start, ME_Run *last ) static void ME_InsertRowStart( ME_WrapContext *wc, ME_Run *last ) { ME_Run *run; - ME_DisplayItem *row; + ME_Row *row; BOOL bSkippingSpaces = TRUE; int ascent = 0, descent = 0, width = 0, shift = 0, align = 0; @@ -328,7 +328,7 @@ static void ME_InsertRowStart( ME_WrapContext *wc, ME_Run *last ) } wc->para->nWidth = max( wc->para->nWidth, width ); - row = ME_MakeRow( ascent + descent, ascent, width ); + row = row_create( ascent + descent, ascent, width ); if (wc->context->editor->bEmulateVersion10 && /* v1.0 - 3.0 */ (wc->para->fmt.dwMask & PFM_TABLE) && (wc->para->fmt.wEffects & PFE_TABLE)) { @@ -336,11 +336,11 @@ static void ME_InsertRowStart( ME_WrapContext *wc, ME_Run *last ) * back to where it should be. */ wc->pt.y--; /* The height of the row is increased by the borders. */ - row->member.row.nHeight += 2; + row->nHeight += 2; } - row->member.row.pt = wc->pt; - row->member.row.nLMargin = (!wc->nRow ? wc->nFirstMargin : wc->nLeftMargin); - row->member.row.nRMargin = wc->nRightMargin; + row->pt = wc->pt; + row->nLMargin = (!wc->nRow ? wc->nFirstMargin : wc->nLeftMargin); + row->nRMargin = wc->nRightMargin; assert(wc->para->fmt.dwMask & PFM_ALIGNMENT); align = wc->para->fmt.wAlignment; if (align == PFA_CENTER) shift = max((wc->nAvailWidth-width)/2, 0); @@ -348,23 +348,23 @@ static void ME_InsertRowStart( ME_WrapContext *wc, ME_Run *last ) if (wc->para->nFlags & MEPF_COMPLEX) layout_row( wc->pRowStart, last ); - row->member.row.pt.x = row->member.row.nLMargin + shift; + row->pt.x = row->nLMargin + shift; for (run = wc->pRowStart; run; run = run_next( run )) { - run->pt.x += row->member.row.nLMargin+shift; + run->pt.x += row->nLMargin + shift; if (run == last) break; } if (wc->nRow == 0 && wc->para->fmt.wNumbering) { wc->para->para_num.pt.x = wc->nParaNumOffset + shift; - wc->para->para_num.pt.y = wc->pt.y + row->member.row.nBaseline; + wc->para->para_num.pt.y = wc->pt.y + row->nBaseline; } - ME_InsertBefore( run_get_di( wc->pRowStart ), row ); + ME_InsertBefore( run_get_di( wc->pRowStart ), row_get_di( row ) ); wc->nRow++; - wc->pt.y += row->member.row.nHeight; + wc->pt.y += row->nHeight; ME_BeginRow( wc ); }
1
0
0
0
Huw Davies : riched20: Use a cell helper in the split paragraph undo function.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 3c10a3eff74f3ef6b8a55e8ac09ef390bc369fe3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3c10a3eff74f3ef6b8a55e8a…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Nov 4 06:56:23 2020 +0000 riched20: Use a cell helper in the split paragraph undo function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/undo.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/riched20/undo.c b/dlls/riched20/undo.c index 884f87b56fd..d6665bfd104 100644 --- a/dlls/riched20/undo.c +++ b/dlls/riched20/undo.c @@ -399,9 +399,8 @@ static void ME_PlayUndoItem(ME_TextEditor *editor, struct undo_item *undo) new_para->border = undo->u.split_para.border; if (paraFlags) { - ME_DisplayItem *pCell = new_para->pCell; - pCell->member.cell.nRightBoundary = undo->u.split_para.cell_right_boundary; - pCell->member.cell.border = undo->u.split_para.cell_border; + para_cell( new_para )->nRightBoundary = undo->u.split_para.cell_right_boundary; + para_cell( new_para )->border = undo->u.split_para.cell_border; } break; }
1
0
0
0
Huw Davies : riched20: Use a paragraph ptr in the rtf writer function.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 04158801f9aab32881bbd2dba7846302a5f1fa2d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=04158801f9aab32881bbd2db…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Nov 4 06:56:22 2020 +0000 riched20: Use a paragraph ptr in the rtf writer function. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/writer.c | 58 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/dlls/riched20/writer.c b/dlls/riched20/writer.c index 98ae352ab7b..72242194127 100644 --- a/dlls/riched20/writer.c +++ b/dlls/riched20/writer.c @@ -995,7 +995,7 @@ static BOOL ME_StreamOutRTF(ME_TextEditor *editor, ME_OutStream *pStream, const ME_Cursor *start, int nChars, int dwFormat) { ME_Cursor cursor = *start; - ME_DisplayItem *prev_para = NULL; + ME_Paragraph *prev_para = NULL; ME_Cursor endCur = cursor; ME_MoveCursorChars(editor, &endCur, nChars, TRUE); @@ -1019,64 +1019,82 @@ static BOOL ME_StreamOutRTF(ME_TextEditor *editor, ME_OutStream *pStream, /* TODO: section formatting properties */ - do { - if (cursor.pPara != prev_para) + do + { + if (&cursor.pPara->member.para != prev_para) { - prev_para = cursor.pPara; + prev_para = &cursor.pPara->member.para; if (!stream_out_para_props( editor, pStream, &cursor.pPara->member.para )) return FALSE; } if (cursor.pRun == endCur.pRun && !endCur.nOffset) break; + TRACE("flags %xh\n", cursor.pRun->member.run.nFlags); /* TODO: emit embedded objects */ - if (cursor.pPara->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND)) + if (cursor.pPara->member.para.nFlags & (MEPF_ROWSTART | MEPF_ROWEND)) continue; - if (cursor.pRun->member.run.nFlags & MERF_GRAPHICS) { + if (cursor.pRun->member.run.nFlags & MERF_GRAPHICS) + { if (!stream_out_graphics(editor, pStream, &cursor.pRun->member.run)) return FALSE; - } else if (cursor.pRun->member.run.nFlags & MERF_TAB) { + } + else if (cursor.pRun->member.run.nFlags & MERF_TAB) + { if (editor->bEmulateVersion10 && /* v1.0 - 3.0 */ - cursor.pPara->member.para.fmt.dwMask & PFM_TABLE && - cursor.pPara->member.para.fmt.wEffects & PFE_TABLE) + para_in_table( &cursor.pPara->member.para )) { if (!ME_StreamOutPrint(pStream, "\\cell ")) return FALSE; - } else { + } + else + { if (!ME_StreamOutPrint(pStream, "\\tab ")) return FALSE; } - } else if (cursor.pRun->member.run.nFlags & MERF_ENDCELL) { - if (pStream->nNestingLevel > 1) { + } + else if (cursor.pRun->member.run.nFlags & MERF_ENDCELL) + { + if (pStream->nNestingLevel > 1) + { if (!ME_StreamOutPrint(pStream, "\\nestcell ")) return FALSE; - } else { + } + else + { if (!ME_StreamOutPrint(pStream, "\\cell ")) return FALSE; } nChars--; - } else if (cursor.pRun->member.run.nFlags & MERF_ENDPARA) { + } + else if (cursor.pRun->member.run.nFlags & MERF_ENDPARA) + { if (!ME_StreamOutRTFCharProps(pStream, &cursor.pRun->member.run.style->fmt)) return FALSE; - if (cursor.pPara->member.para.fmt.dwMask & PFM_TABLE && - cursor.pPara->member.para.fmt.wEffects & PFE_TABLE && - !(cursor.pPara->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND|MEPF_CELL))) + if (para_in_table( &cursor.pPara->member.para) && + !(cursor.pPara->member.para.nFlags & (MEPF_ROWSTART | MEPF_ROWEND | MEPF_CELL))) { if (!ME_StreamOutPrint(pStream, "\\row\r\n")) return FALSE; - } else { + } + else + { if (!ME_StreamOutPrint(pStream, "\\par\r\n")) return FALSE; } /* Skip as many characters as required by current line break */ nChars = max(0, nChars - cursor.pRun->member.run.len); - } else if (cursor.pRun->member.run.nFlags & MERF_ENDROW) { + } + else if (cursor.pRun->member.run.nFlags & MERF_ENDROW) + { if (!ME_StreamOutPrint(pStream, "\\line\r\n")) return FALSE; nChars--; - } else { + } + else + { int nEnd; TRACE("style %p\n", cursor.pRun->member.run.style);
1
0
0
0
Michael Stefaniuc : svchost: Inline a simple string.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: f629166425b6d91aaaa5da58a20b8bc78479f984 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f629166425b6d91aaaa5da58…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Nov 3 23:34:39 2020 +0100 svchost: Inline a simple string. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/svchost/svchost.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/programs/svchost/svchost.c b/programs/svchost/svchost.c index 0daaa6ebf47..603deef1abd 100644 --- a/programs/svchost/svchost.c +++ b/programs/svchost/svchost.c @@ -37,8 +37,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(svchost); static const WCHAR service_reg_path[] = L"System\\CurrentControlSet\\Services"; static const WCHAR svchost_path[] = L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Svchost"; -static const CHAR service_main[] = "ServiceMain"; - /* Allocate and initialize a WSTR containing the queried value */ static LPWSTR GetRegValue(HKEY service_key, const WCHAR *value_name) { @@ -162,14 +160,14 @@ static BOOL AddServiceElem(LPWSTR service_name, } /* Look for alternate to default ServiceMain entry point */ - ret = RegQueryValueExA(service_hkey, service_main, NULL, NULL, NULL, ®_size); + ret = RegQueryValueExA(service_hkey, "ServiceMain", NULL, NULL, NULL, ®_size); if (ret == ERROR_SUCCESS) { /* Add space for potentially missing NULL terminator, allocate, and * fill with the registry value */ size = reg_size + 1; dll_service_main = HeapAlloc(GetProcessHeap(), 0, size); - ret = RegQueryValueExA(service_hkey, service_main, NULL, NULL, + ret = RegQueryValueExA(service_hkey, "ServiceMain", NULL, NULL, (LPBYTE)dll_service_main, ®_size); if (ret != ERROR_SUCCESS) { @@ -196,7 +194,7 @@ static BOOL AddServiceElem(LPWSTR service_name, else { service_main_func = - (LPSERVICE_MAIN_FUNCTIONW) GetProcAddress(library, service_main); + (LPSERVICE_MAIN_FUNCTIONW) GetProcAddress(library, "ServiceMain"); } if (!service_main_func) {
1
0
0
0
Michael Stefaniuc : svchost: Use wide-char string literals.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 7ceb23ef7c13326ee777ba3f19fc0313585103ce URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7ceb23ef7c13326ee777ba3f…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Nov 3 23:34:38 2020 +0100 svchost: Use wide-char string literals. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/svchost/svchost.c | 46 +++++++++++----------------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/programs/svchost/svchost.c b/programs/svchost/svchost.c index 30c35616990..0daaa6ebf47 100644 --- a/programs/svchost/svchost.c +++ b/programs/svchost/svchost.c @@ -34,30 +34,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(svchost); -/* Static strings used throughout svchost */ -static const WCHAR kd[] = {'-','k',0}; - -static const WCHAR ks[] = {'/','k',0}; - -static const WCHAR reg_separator[] = {'\\',0}; - -static const WCHAR service_reg_path[] = { - 'S','y','s','t','e','m', - '\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t', - '\\','S','e','r','v','i','c','e','s',0}; - -static const WCHAR parameters[] = { - 'P','a','r','a','m','e','t','e','r','s',0}; - -static const WCHAR service_dll[] = { - 'S','e','r','v','i','c','e','D','l','l',0}; - -static const WCHAR svchost_path[] = { - 'S','o','f','t','w','a','r','e', - '\\','M','i','c','r','o','s','o','f','t', - '\\','W','i','n','d','o','w','s',' ','N','T', - '\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n', - '\\','S','v','c','h','o','s','t',0}; +static const WCHAR service_reg_path[] = L"System\\CurrentControlSet\\Services"; +static const WCHAR svchost_path[] = L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Svchost"; static const CHAR service_main[] = "ServiceMain"; @@ -145,15 +123,14 @@ static BOOL AddServiceElem(LPWSTR service_name, WINE_TRACE("Adding element for %s\n", wine_dbgstr_w(service_name)); /* Construct registry path to the service's parameters key */ - size = (lstrlenW(service_reg_path) + lstrlenW(reg_separator) + - lstrlenW(service_name) + lstrlenW(reg_separator) + - lstrlenW(parameters) + 1); + size = lstrlenW(service_reg_path) + lstrlenW(L"\\") + lstrlenW(service_name) + lstrlenW(L"\\") + + lstrlenW(L"Parameters") + 1; service_param_key = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR)); lstrcpyW(service_param_key, service_reg_path); - lstrcatW(service_param_key, reg_separator); + lstrcatW(service_param_key, L"\\"); lstrcatW(service_param_key, service_name); - lstrcatW(service_param_key, reg_separator); - lstrcatW(service_param_key, parameters); + lstrcatW(service_param_key, L"\\"); + lstrcatW(service_param_key, L"Parameters"); service_param_key[size - 1] = '\0'; ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, service_param_key, 0, KEY_READ, &service_hkey); @@ -165,11 +142,11 @@ static BOOL AddServiceElem(LPWSTR service_name, } /* Find DLL associate with service from key */ - dll_name_short = GetRegValue(service_hkey, service_dll); + dll_name_short = GetRegValue(service_hkey, L"ServiceDll"); if (!dll_name_short) { - WINE_ERR("cannot find registry value %s for service %s\n", - wine_dbgstr_w(service_dll), wine_dbgstr_w(service_name)); + WINE_ERR("cannot find registry value ServiceDll for service %s\n", + wine_dbgstr_w(service_name)); RegCloseKey(service_hkey); goto cleanup; } @@ -340,8 +317,7 @@ int __cdecl wmain(int argc, WCHAR *argv[]) for (option_index = 1; option_index < argc; option_index++) { - if (lstrcmpiW(argv[option_index], ks) == 0 || - lstrcmpiW(argv[option_index], kd) == 0) + if (lstrcmpiW(argv[option_index], L"/k") == 0 || lstrcmpiW(argv[option_index], L"-k") == 0) { ++option_index; if (option_index >= argc)
1
0
0
0
Michael Stefaniuc : winedevice: Use wide-char string literals.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 6f6cead416d23226c8f341c0842c46b62e0a4d75 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6f6cead416d23226c8f341c0…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Nov 3 23:34:37 2020 +0100 winedevice: Use wide-char string literals. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winedevice/device.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/programs/winedevice/device.c b/programs/winedevice/device.c index 7bada000520..c591d743337 100644 --- a/programs/winedevice/device.c +++ b/programs/winedevice/device.c @@ -32,12 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(winedevice); -static const WCHAR servicesW[] = {'\\','R','e','g','i','s','t','r','y', - '\\','M','a','c','h','i','n','e', - '\\','S','y','s','t','e','m', - '\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t', - '\\','S','e','r','v','i','c','e','s', - '\\',0}; +static const WCHAR servicesW[] = L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\"; extern NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event );
1
0
0
0
Michael Stefaniuc : winedevice: Don't make a variable const just to cast the const away.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: d0361560a62eeebad1c3368fdf4f1e8dde6f51c2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d0361560a62eeebad1c3368f…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Nov 3 23:34:36 2020 +0100 winedevice: Don't make a variable const just to cast the const away. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winedevice/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/winedevice/device.c b/programs/winedevice/device.c index 0755caaafb0..7bada000520 100644 --- a/programs/winedevice/device.c +++ b/programs/winedevice/device.c @@ -41,7 +41,7 @@ static const WCHAR servicesW[] = {'\\','R','e','g','i','s','t','r','y', extern NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event ); -static const WCHAR winedeviceW[] = {'w','i','n','e','d','e','v','i','c','e',0}; +static WCHAR winedeviceW[] = L"winedevice"; static SERVICE_STATUS_HANDLE service_handle; static SC_HANDLE manager_handle; static HANDLE stop_event; @@ -145,7 +145,7 @@ int __cdecl wmain( int argc, WCHAR *argv[] ) { SERVICE_TABLE_ENTRYW service_table[2]; - service_table[0].lpServiceName = (void *)winedeviceW; + service_table[0].lpServiceName = winedeviceW; service_table[0].lpServiceProc = ServiceMain; service_table[1].lpServiceName = NULL; service_table[1].lpServiceProc = NULL;
1
0
0
0
Michael Stefaniuc : wscript: Use a zero terminated wchar string.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 453c461095d59600e646be483119bc83885c9c1d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=453c461095d59600e646be48…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Nov 3 23:34:35 2020 +0100 wscript: Use a zero terminated wchar string. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wscript/host.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index ba3a32a935d..e20d3132f16 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -76,8 +76,7 @@ static void print_string(const WCHAR *string) len = lstrlenW(string); ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), string, len, &count, NULL); if(ret) { - static const WCHAR crnlW[] = {'\r','\n'}; - WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), crnlW, ARRAY_SIZE(crnlW), &count, NULL); + WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), L"\r\n", lstrlenW(L"\r\n"), &count, NULL); return; }
1
0
0
0
Michael Stefaniuc : wscript: Zero terminate the host version string to avoid random garbage.
by Alexandre Julliard
04 Nov '20
04 Nov '20
Module: wine Branch: master Commit: 7f955f289ac68ef49e73eaa4a8d8f12168f47785 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7f955f289ac68ef49e73eaa4…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Nov 3 23:34:34 2020 +0100 wscript: Zero terminate the host version string to avoid random garbage. String is used only once and passed to SysAllocString() which assumes a zero terminated string. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wscript/host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 9541994d3b0..ba3a32a935d 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -33,7 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wscript); #define BUILDVERSION 16535 -static const WCHAR wshVersionW[] = {'5','.','8'}; +static const WCHAR wshVersionW[] = L"5.8"; VARIANT_BOOL wshInteractive = #ifndef CSCRIPT_BUILD
1
0
0
0
← Newer
1
...
75
76
77
78
79
80
81
...
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200