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
June 2009
----- 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
5 participants
1115 discussions
Start a n
N
ew thread
Eric Pouech : winhlp32: Remove the lpszName field from the window structure , as it's given by the window info.
by Alexandre Julliard
01 Jun '09
01 Jun '09
Module: wine Branch: master Commit: e3beef0af592100ae7495e1adcfe032eeaf6eab3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e3beef0af592100ae7495e1ad…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat May 30 14:26:58 2009 +0200 winhlp32: Remove the lpszName field from the window structure, as it's given by the window info. --- programs/winhlp32/macro.c | 6 +++--- programs/winhlp32/winhelp.c | 13 ++++--------- programs/winhlp32/winhelp.h | 2 -- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c index 9a7f3fd..3383545 100644 --- a/programs/winhlp32/macro.c +++ b/programs/winhlp32/macro.c @@ -280,7 +280,7 @@ static void CALLBACK MACRO_CloseSecondarys(void) WINE_TRACE("()\n"); for (win = Globals.win_list; win; win = win->next) - if (win->lpszName && lstrcmpi(win->lpszName, "main")) + if (lstrcmpi(win->info->name, "main")) DestroyWindow(win->hMainWnd); } @@ -293,7 +293,7 @@ static void CALLBACK MACRO_CloseWindow(LPCSTR lpszWindow) if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main"; for (win = Globals.win_list; win; win = win->next) - if (win->lpszName && !lstrcmpi(win->lpszName, lpszWindow)) + if (!lstrcmpi(win->info->name, lpszWindow)) DestroyWindow(win->hMainWnd); } @@ -430,7 +430,7 @@ static void CALLBACK MACRO_FocusWindow(LPCSTR lpszWindow) if (!lpszWindow || !lpszWindow[0]) lpszWindow = "main"; for (win = Globals.win_list; win; win = win->next) - if (win->lpszName && !lstrcmpi(win->lpszName, lpszWindow)) + if (!lstrcmpi(win->info->name, lpszWindow)) SetFocus(win->hMainWnd); } diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c index e361335..8e6ba50 100644 --- a/programs/winhlp32/winhelp.c +++ b/programs/winhlp32/winhelp.c @@ -257,7 +257,7 @@ HLPFILE_WINDOWINFO* WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name) unsigned int i; if (!name || !name[0]) - name = Globals.active_win->lpszName; + name = Globals.active_win->info->name; if (hlpfile) for (i = 0; i < hlpfile->numWindows; i++) @@ -645,7 +645,6 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe { WINHELP_WINDOW* win = NULL; BOOL bPrimary, bPopup, bReUsed = FALSE; - LPSTR name; HICON hIcon; HWND hTextWnd = NULL; @@ -656,7 +655,7 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe { for (win = Globals.win_list; win; win = win->next) { - if (!lstrcmpi(win->lpszName, wpage->wininfo->name)) + if (!lstrcmpi(win->info->name, wpage->wininfo->name)) { POINT pt = {0, 0}; SIZE sz = {0, 0}; @@ -699,15 +698,11 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe if (!win) { /* Initialize WINHELP_WINDOW struct */ - win = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(WINHELP_WINDOW) + strlen(wpage->wininfo->name) + 1); + win = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WINHELP_WINDOW)); if (!win) return FALSE; win->next = Globals.win_list; Globals.win_list = win; - name = (char*)win + sizeof(WINHELP_WINDOW); - lstrcpy(name, wpage->wininfo->name); - win->lpszName = name; win->hHandCur = LoadCursorW(0, (LPWSTR)IDC_HAND); win->back.index = 0; win->font_scale = 1; @@ -1496,7 +1491,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, { BOOL bExit; win = (WINHELP_WINDOW*) GetWindowLongPtr(hWnd, 0); - bExit = (Globals.wVersion >= 4 && !lstrcmpi(win->lpszName, "main")); + bExit = (Globals.wVersion >= 4 && !lstrcmpi(win->info->name, "main")); WINHELP_DeleteWindow(win); if (bExit) MACRO_Exit(); diff --git a/programs/winhlp32/winhelp.h b/programs/winhlp32/winhelp.h index 994547b..70e2dc2 100644 --- a/programs/winhlp32/winhelp.h +++ b/programs/winhlp32/winhelp.h @@ -71,8 +71,6 @@ typedef struct tagPageSet typedef struct tagWinHelp { - LPCSTR lpszName; - WINHELP_BUTTON* first_button; HLPFILE_PAGE* page;
1
0
0
0
Eric Pouech : winhlp32: Window name lookup is supposed to be insensitive.
by Alexandre Julliard
01 Jun '09
01 Jun '09
Module: wine Branch: master Commit: a6104304f43129cf753756a26216180cae4d3124 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a6104304f43129cf753756a26…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat May 30 14:26:52 2009 +0200 winhlp32: Window name lookup is supposed to be insensitive. --- programs/winhlp32/winhelp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c index 9c69d48..e361335 100644 --- a/programs/winhlp32/winhelp.c +++ b/programs/winhlp32/winhelp.c @@ -261,7 +261,7 @@ HLPFILE_WINDOWINFO* WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name) if (hlpfile) for (i = 0; i < hlpfile->numWindows; i++) - if (!strcmp(hlpfile->windows[i].name, name)) + if (!lstrcmpi(hlpfile->windows[i].name, name)) return &hlpfile->windows[i]; if (strcmp(name, "main") != 0)
1
0
0
0
Eric Pouech : winhlp32: Use current file when no file is specified in JumpHash.
by Alexandre Julliard
01 Jun '09
01 Jun '09
Module: wine Branch: master Commit: aba7b3df90a33fc032f6066338862d0082c9ef89 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aba7b3df90a33fc032f606633…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat May 30 14:26:46 2009 +0200 winhlp32: Use current file when no file is specified in JumpHash. --- programs/winhlp32/macro.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c index c2318ce..9a7f3fd 100644 --- a/programs/winhlp32/macro.c +++ b/programs/winhlp32/macro.c @@ -535,7 +535,10 @@ void CALLBACK MACRO_JumpHash(LPCSTR lpszPath, LPCSTR lpszWindow, LONG lHash) HLPFILE* hlpfile; WINE_TRACE("(\"%s\", \"%s\", %u)\n", lpszPath, lpszWindow, lHash); - hlpfile = WINHELP_LookupHelpFile(lpszPath); + if (!lpszPath || !lpszPath[0]) + hlpfile = MACRO_CurrentWindow()->page->file; + else + hlpfile = WINHELP_LookupHelpFile(lpszPath); WINHELP_OpenHelpWindow(HLPFILE_PageByHash, hlpfile, lHash, WINHELP_GetWindowInfo(hlpfile, lpszWindow), SW_NORMAL);
1
0
0
0
Eric Pouech : winhlp32: Make use of the hlpfile for the running macro to handle correctly some macro implementations .
by Alexandre Julliard
01 Jun '09
01 Jun '09
Module: wine Branch: master Commit: 29f865c5c1dcb1d3061c275a6eb078829a9b9b31 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=29f865c5c1dcb1d3061c275a6…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat May 30 14:26:39 2009 +0200 winhlp32: Make use of the hlpfile for the running macro to handle correctly some macro implementations. --- programs/winhlp32/macro.c | 48 +++++++++++++++++++++++++------------------- 1 files changed, 27 insertions(+), 21 deletions(-) diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c index 92a1abd..c2318ce 100644 --- a/programs/winhlp32/macro.c +++ b/programs/winhlp32/macro.c @@ -68,7 +68,7 @@ static WINHELP_BUTTON** MACRO_LookupButton(WINHELP_WINDOW* win, LPCSTR na void CALLBACK MACRO_CreateButton(LPCSTR id, LPCSTR name, LPCSTR macro) { - WINHELP_WINDOW *win = Globals.active_win; + WINHELP_WINDOW *win = MACRO_CurrentWindow(); WINHELP_BUTTON *button, **b; LONG size; LPSTR ptr; @@ -115,7 +115,7 @@ void CALLBACK MACRO_DisableButton(LPCSTR id) WINE_TRACE("(\"%s\")\n", id); - b = MACRO_LookupButton(Globals.active_win, id); + b = MACRO_LookupButton(MACRO_CurrentWindow(), id); if (!*b) {WINE_FIXME("Couldn't find button '%s'\n", id); return;} EnableWindow((*b)->hWnd, FALSE); @@ -127,7 +127,7 @@ static void CALLBACK MACRO_EnableButton(LPCSTR id) WINE_TRACE("(\"%s\")\n", id); - b = MACRO_LookupButton(Globals.active_win, id); + b = MACRO_LookupButton(MACRO_CurrentWindow(), id); if (!*b) {WINE_FIXME("Couldn't find button '%s'\n", id); return;} EnableWindow((*b)->hWnd, TRUE); @@ -172,7 +172,7 @@ static void CALLBACK MACRO_AppendItem(LPCSTR str1, LPCSTR str2, LPCSTR str3, LPC static void CALLBACK MACRO_Back(void) { - WINHELP_WINDOW* win = Globals.active_win; + WINHELP_WINDOW* win = MACRO_CurrentWindow(); WINE_TRACE("()\n"); @@ -182,7 +182,7 @@ static void CALLBACK MACRO_Back(void) static void CALLBACK MACRO_BackFlush(void) { - WINHELP_WINDOW* win = Globals.active_win; + WINHELP_WINDOW* win = MACRO_CurrentWindow(); WINE_TRACE("()\n"); @@ -201,7 +201,7 @@ static void CALLBACK MACRO_BookmarkMore(void) static void CALLBACK MACRO_BrowseButtons(void) { - HLPFILE_PAGE* page = Globals.active_win->page; + HLPFILE_PAGE* page = MACRO_CurrentWindow()->page; ULONG relative; WINE_TRACE("()\n"); @@ -217,7 +217,7 @@ static void CALLBACK MACRO_BrowseButtons(void) static void CALLBACK MACRO_ChangeButtonBinding(LPCSTR id, LPCSTR macro) { - WINHELP_WINDOW* win = Globals.active_win; + WINHELP_WINDOW* win = MACRO_CurrentWindow(); WINHELP_BUTTON* button; WINHELP_BUTTON** b; LONG size; @@ -304,10 +304,12 @@ static void CALLBACK MACRO_Compare(LPCSTR str) static void CALLBACK MACRO_Contents(void) { + HLPFILE_PAGE* page = MACRO_CurrentWindow()->page; + WINE_TRACE("()\n"); - if (Globals.active_win->page) - MACRO_JumpContents(Globals.active_win->page->file->lpszPath, NULL); + if (page) + MACRO_JumpContents(page->file->lpszPath, NULL); } static void CALLBACK MACRO_ControlPanel(LPCSTR str1, LPCSTR str2, LONG u) @@ -447,7 +449,7 @@ void CALLBACK MACRO_HelpOn(void) LPCSTR file; WINE_TRACE("()\n"); - file = Globals.active_win->page->file->help_on_file; + file = MACRO_CurrentWindow()->page->file->help_on_file; if (!file) file = (Globals.wVersion > 4) ? "winhlp32.hlp" : "winhelp.hlp"; @@ -600,12 +602,12 @@ static void CALLBACK MACRO_Next(void) WINHELP_WNDPAGE wp; WINE_TRACE("()\n"); - wp.page = Globals.active_win->page; + wp.page = MACRO_CurrentWindow()->page; wp.page = HLPFILE_PageByOffset(wp.page->file, wp.page->browse_fwd, &wp.relative); if (wp.page) { wp.page->file->wRefCount++; - wp.wininfo = Globals.active_win->info; + wp.wininfo = MACRO_CurrentWindow()->info; WINHELP_CreateHelpWindow(&wp, SW_NORMAL, TRUE); } } @@ -640,12 +642,12 @@ static void CALLBACK MACRO_Prev(void) WINHELP_WNDPAGE wp; WINE_TRACE("()\n"); - wp.page = Globals.active_win->page; + wp.page = MACRO_CurrentWindow()->page; wp.page = HLPFILE_PageByOffset(wp.page->file, wp.page->browse_bwd, &wp.relative); if (wp.page) { wp.page->file->wRefCount++; - wp.wininfo = Globals.active_win->info; + wp.wininfo = MACRO_CurrentWindow()->info; WINHELP_CreateHelpWindow(&wp, SW_NORMAL, TRUE); } } @@ -657,7 +659,7 @@ void CALLBACK MACRO_Print(void) WINE_TRACE("()\n"); printer.lStructSize = sizeof(printer); - printer.hwndOwner = Globals.active_win->hMainWnd; + printer.hwndOwner = MACRO_CurrentWindow()->hMainWnd; printer.hInstance = Globals.hInstance; printer.hDevMode = 0; printer.hDevNames = 0; @@ -775,19 +777,23 @@ void CALLBACK MACRO_SetContents(LPCSTR str, LONG u) static void CALLBACK MACRO_SetHelpOnFile(LPCSTR str) { + HLPFILE_PAGE* page = MACRO_CurrentWindow()->page; + WINE_TRACE("(\"%s\")\n", str); - HeapFree(GetProcessHeap(), 0, Globals.active_win->page->file->help_on_file); - Globals.active_win->page->file->help_on_file = HeapAlloc(GetProcessHeap(), 0, strlen(str) + 1); - if (Globals.active_win->page->file->help_on_file) - strcpy(Globals.active_win->page->file->help_on_file, str); + HeapFree(GetProcessHeap(), 0, page->file->help_on_file); + page->file->help_on_file = HeapAlloc(GetProcessHeap(), 0, strlen(str) + 1); + if (page->file->help_on_file) + strcpy(page->file->help_on_file, str); } static void CALLBACK MACRO_SetPopupColor(LONG r, LONG g, LONG b) { + HLPFILE_PAGE* page = MACRO_CurrentWindow()->page; + WINE_TRACE("(%x, %x, %x)\n", r, g, b); - Globals.active_win->page->file->has_popup_color = TRUE; - Globals.active_win->page->file->popup_color = RGB(r, g, b); + page->file->has_popup_color = TRUE; + page->file->popup_color = RGB(r, g, b); } static void CALLBACK MACRO_ShellExecute(LPCSTR str1, LPCSTR str2, LONG u1, LONG u2, LPCSTR str3, LPCSTR str4)
1
0
0
0
Eric Pouech : winhlp32: Force the handling of a current help window while processing a macro.
by Alexandre Julliard
01 Jun '09
01 Jun '09
Module: wine Branch: master Commit: 042bbf9a412009ec848a9ff966955a3961a49ed7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=042bbf9a412009ec848a9ff96…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat May 30 14:26:33 2009 +0200 winhlp32: Force the handling of a current help window while processing a macro. --- programs/winhlp32/macro.c | 5 +++-- programs/winhlp32/macro.h | 6 ++++-- programs/winhlp32/macro.lex.l | 16 ++++++++++++++-- programs/winhlp32/winhelp.c | 8 ++++---- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c index 276d89c..92a1abd 100644 --- a/programs/winhlp32/macro.c +++ b/programs/winhlp32/macro.c @@ -473,12 +473,13 @@ void CALLBACK MACRO_History(void) static void CALLBACK MACRO_IfThen(BOOL b, LPCSTR t) { - if (b) MACRO_ExecuteMacro(t); + if (b) MACRO_ExecuteMacro(MACRO_CurrentWindow(), t); } static void CALLBACK MACRO_IfThenElse(BOOL b, LPCSTR t, LPCSTR f) { - if (b) MACRO_ExecuteMacro(t); else MACRO_ExecuteMacro(f); + if (b) MACRO_ExecuteMacro(MACRO_CurrentWindow(), t); + else MACRO_ExecuteMacro(MACRO_CurrentWindow(), f); } static BOOL CALLBACK MACRO_InitMPrint(void) diff --git a/programs/winhlp32/macro.h b/programs/winhlp32/macro.h index 8b15719..910782d 100644 --- a/programs/winhlp32/macro.h +++ b/programs/winhlp32/macro.h @@ -33,9 +33,11 @@ struct lexret { }; extern struct lexret yylval; +struct tagWinHelp; -BOOL MACRO_ExecuteMacro(LPCSTR); -int MACRO_Lookup(const char* name, struct lexret* lr); +BOOL MACRO_ExecuteMacro(struct tagWinHelp*, LPCSTR); +int MACRO_Lookup(const char* name, struct lexret* lr); +struct tagWinHelp* MACRO_CurrentWindow(void); enum token_types {EMPTY, VOID_FUNCTION, BOOL_FUNCTION, INTEGER, STRING, IDENTIFIER}; void CALLBACK MACRO_About(void); diff --git a/programs/winhlp32/macro.lex.l b/programs/winhlp32/macro.lex.l index 4442473..bf65fa0 100644 --- a/programs/winhlp32/macro.lex.l +++ b/programs/winhlp32/macro.lex.l @@ -25,12 +25,17 @@ %{ #include "config.h" #include <assert.h> +#include <stdarg.h> #ifndef HAVE_UNISTD_H #define YY_NO_UNISTD_H #endif -#include "macro.h" +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "winhelp.h" #include "wine/debug.h" @@ -43,6 +48,7 @@ struct lex_data { unsigned quote_stk_idx; LPSTR cache_string[32]; int cache_used; + WINHELP_WINDOW* window; }; static struct lex_data* lex_data = NULL; @@ -266,7 +272,7 @@ static int MACRO_CallVoidFunc(FARPROC fn, const char* args) return 1; } -BOOL MACRO_ExecuteMacro(LPCSTR macro) +BOOL MACRO_ExecuteMacro(WINHELP_WINDOW* window, LPCSTR macro) { struct lex_data curr_lex_data, *prev_lex_data; BOOL ret = TRUE; @@ -279,6 +285,7 @@ BOOL MACRO_ExecuteMacro(LPCSTR macro) memset(lex_data, 0, sizeof(*lex_data)); lex_data->macroptr = macro; + lex_data->window = window; while ((t = yylex()) != EMPTY) { @@ -313,6 +320,11 @@ done: return ret; } +WINHELP_WINDOW* MACRO_CurrentWindow(void) +{ + return lex_data ? lex_data->window : Globals.active_win; +} + #ifndef yywrap int yywrap(void) { return 1; } #endif diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c index 7f74d8b..9c69d48 100644 --- a/programs/winhlp32/winhelp.c +++ b/programs/winhlp32/winhelp.c @@ -772,10 +772,10 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe { HLPFILE_MACRO *macro; for (macro = wpage->page->file->first_macro; macro; macro = macro->next) - MACRO_ExecuteMacro(macro->lpszMacro); + MACRO_ExecuteMacro(win, macro->lpszMacro); for (macro = wpage->page->first_macro; macro; macro = macro->next) - MACRO_ExecuteMacro(macro->lpszMacro); + MACRO_ExecuteMacro(win, macro->lpszMacro); } if (bPopup) @@ -870,7 +870,7 @@ static BOOL WINHELP_HandleTextMouse(WINHELP_WINDOW* win, UINT msg, LPARAM lParam SW_NORMAL); break; case hlp_link_macro: - MACRO_ExecuteMacro(link->string); + MACRO_ExecuteMacro(win, link->string); break; default: WINE_FIXME("Unknown link cookie %d\n", link->cookie); @@ -1368,7 +1368,7 @@ static LRESULT CALLBACK WINHELP_MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, for (button = win->first_button; button; button = button->next) if (wParam == button->wParam) break; if (button) - MACRO_ExecuteMacro(button->lpszMacro); + MACRO_ExecuteMacro(win, button->lpszMacro); else if (!HIWORD(wParam)) MessageBox(0, MAKEINTRESOURCE(STID_NOT_IMPLEMENTED), MAKEINTRESOURCE(STID_WHERROR), MB_OK);
1
0
0
0
Eric Pouech : winhlp32: NoShow macro has NS as shortcut.
by Alexandre Julliard
01 Jun '09
01 Jun '09
Module: wine Branch: master Commit: ae20d4708b43264559bd693b4ac9c64bb909c5e4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ae20d4708b43264559bd693b4…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat May 30 14:26:27 2009 +0200 winhlp32: NoShow macro has NS as shortcut. --- programs/winhlp32/macro.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c index 9e6e5f8..276d89c 100644 --- a/programs/winhlp32/macro.c +++ b/programs/winhlp32/macro.c @@ -911,7 +911,7 @@ static struct MacroDesc MACRO_Builtins[] = { {"MPrintHash", NULL, 0, "U", (FARPROC)MACRO_MPrintHash}, {"MPrintID", NULL, 0, "S", (FARPROC)MACRO_MPrintID}, {"Next", NULL, 0, "", (FARPROC)MACRO_Next}, - {"NoShow", NULL, 0, "", (FARPROC)MACRO_NoShow}, + {"NoShow", "NS", 0, "", (FARPROC)MACRO_NoShow}, {"PopupContext", "PC", 0, "SU", (FARPROC)MACRO_PopupContext}, {"PopupHash", NULL, 0, "SU", (FARPROC)MACRO_PopupHash}, {"PopupId", "PI", 0, "SS", (FARPROC)MACRO_PopupId},
1
0
0
0
Eric Pouech : winhlp32: Properly handle a syntax error inside a macro.
by Alexandre Julliard
01 Jun '09
01 Jun '09
Module: wine Branch: master Commit: b936855d0765b3f1565e8a698b4a3b03924e7371 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b936855d0765b3f1565e8a698…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat May 30 14:26:21 2009 +0200 winhlp32: Properly handle a syntax error inside a macro. --- programs/winhlp32/macro.lex.l | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/programs/winhlp32/macro.lex.l b/programs/winhlp32/macro.lex.l index f3366b0..4442473 100644 --- a/programs/winhlp32/macro.lex.l +++ b/programs/winhlp32/macro.lex.l @@ -293,13 +293,15 @@ BOOL MACRO_ExecuteMacro(LPCSTR macro) break; default: WINE_WARN("got unexpected type %s\n", ts(t)); - return 0; + YY_FLUSH_BUFFER; + ret = FALSE; + goto done; } switch (t = yylex()) { case EMPTY: goto done; case ';': break; - default: ret = FALSE; goto done; + default: ret = FALSE; YY_FLUSH_BUFFER; goto done; } }
1
0
0
0
Vincent Povirk : ole32: Don' t ignore a failure to delete the old element in CreateStorage.
by Alexandre Julliard
01 Jun '09
01 Jun '09
Module: wine Branch: master Commit: 6f05770fbf4fb47937b5266b3820cca99141ebd9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6f05770fbf4fb47937b5266b3…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri May 29 16:54:06 2009 -0500 ole32: Don't ignore a failure to delete the old element in CreateStorage. --- dlls/ole32/storage32.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index ff95fad..9266bb7 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -1232,7 +1232,11 @@ static HRESULT WINAPI StorageImpl_CreateStorage( */ if (STGM_CREATE_MODE(grfMode) == STGM_CREATE && STGM_ACCESS_MODE(This->base.openFlags) != STGM_READ) - IStorage_DestroyElement(iface, pwcsName); + { + hr = IStorage_DestroyElement(iface, pwcsName); + if (FAILED(hr)) + return hr; + } else { WARN("file already exists\n");
1
0
0
0
Vincent Povirk : ole32: Fix return code of DeleteStorage for read only storage.
by Alexandre Julliard
01 Jun '09
01 Jun '09
Module: wine Branch: master Commit: e21adbf45ad80056b105c6d843ba278ca6eb1410 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e21adbf45ad80056b105c6d84…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri May 29 16:45:44 2009 -0500 ole32: Fix return code of DeleteStorage for read only storage. --- dlls/ole32/storage32.c | 3 +++ dlls/ole32/tests/storage32.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 9f3930e..ff95fad 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -1797,6 +1797,9 @@ static HRESULT WINAPI StorageImpl_DestroyElement( if (pwcsName==NULL) return STG_E_INVALIDPOINTER; + if ( STGM_ACCESS_MODE( This->base.openFlags ) == STGM_READ ) + return STG_E_ACCESSDENIED; + /* * Create a property enumeration to search the property with the given name */ diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index 84c4b0f..55f7145 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -1328,11 +1328,11 @@ void test_readonly(void) /* DestroyElement on read-only storage, name exists */ hr = IStorage_DestroyElement( stg2, streamW ); - todo_wine ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); + ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); /* DestroyElement on read-only storage, name does not exist */ hr = IStorage_DestroyElement( stg2, storageW ); - todo_wine ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); + ok(hr == STG_E_ACCESSDENIED, "should fail, res=%x\n", hr); IStorage_Release(stg2); }
1
0
0
0
Vincent Povirk : ole32: Fix crash when calling CreateStorage on read only storage.
by Alexandre Julliard
01 Jun '09
01 Jun '09
Module: wine Branch: master Commit: 93a155381fe3dbba61ac7e367e060cdf7f873bf8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=93a155381fe3dbba61ac7e367…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri May 29 16:40:15 2009 -0500 ole32: Fix crash when calling CreateStorage on read only storage. --- dlls/ole32/storage32.c | 3 ++- dlls/ole32/tests/storage32.c | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index d68f09f..9f3930e 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -1230,7 +1230,8 @@ static HRESULT WINAPI StorageImpl_CreateStorage( /* * An element with this name already exists */ - if (STGM_CREATE_MODE(grfMode) == STGM_CREATE) + if (STGM_CREATE_MODE(grfMode) == STGM_CREATE && + STGM_ACCESS_MODE(This->base.openFlags) != STGM_READ) IStorage_DestroyElement(iface, pwcsName); else { diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index f932765..84c4b0f 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -1314,13 +1314,11 @@ void test_readonly(void) if (SUCCEEDED(hr)) IStream_Release(stream); -#if 0 /* crashes on Wine */ /* CreateStorage on read-only storage, name exists */ hr = IStorage_CreateStorage( stg2, streamW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stg3 ); ok(hr == STG_E_FILEALREADYEXISTS, "should fail, res=%x\n", hr); if (SUCCEEDED(hr)) IStream_Release(stg3); -#endif /* CreateStorage on read-only storage, name does not exist */ hr = IStorage_CreateStorage( stg2, storageW, STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READ, 0, 0, &stg3 );
1
0
0
0
← Newer
1
...
106
107
108
109
110
111
112
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200