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
July 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
3 participants
1114 discussions
Start a n
N
ew thread
Maarten Lankhorst : quartz: Fix incorrect use of mtCurrent in transform filter.
by Alexandre Julliard
14 Jul '08
14 Jul '08
Module: wine Branch: master Commit: 36418d8ad162df4ff237853adf5c048e830ef016 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36418d8ad162df4ff237853ad…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Thu Jul 10 21:41:35 2008 -0700 quartz: Fix incorrect use of mtCurrent in transform filter. --- dlls/quartz/acmwrapper.c | 4 +++- dlls/quartz/avidec.c | 3 ++- dlls/quartz/pin.c | 14 +++++++++++--- dlls/quartz/transform.c | 5 ++++- dlls/quartz/transform.h | 1 + 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index 8a63554..2dc49da 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -248,7 +248,9 @@ static HRESULT ACMWrapper_ConnectInput(TransformFilterImpl* pTransformFilter, co (IsEqualIID(&pmt->formattype, &FORMAT_WaveFormatEx))) { HACMSTREAM drv; - AM_MEDIA_TYPE* outpmt = &((OutputPin*)This->tf.ppPins[1])->pin.mtCurrent; + AM_MEDIA_TYPE* outpmt = &This->tf.pmt; + FreeMediaType(outpmt); + This->pWfIn = (LPWAVEFORMATEX)pmt->pbFormat; /* HACK */ diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index 84cb296..476e0d3 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -213,11 +213,12 @@ static HRESULT AVIDec_ConnectInput(TransformFilterImpl* pTransformFilter, const This->hvid = ICLocate(pmt->majortype.Data1, pmt->subtype.Data1, bmi, NULL, ICMODE_DECOMPRESS); if (This->hvid) { - AM_MEDIA_TYPE* outpmt = &((OutputPin*)This->tf.ppPins[1])->pin.mtCurrent; + AM_MEDIA_TYPE* outpmt = &This->tf.pmt; const CLSID* outsubtype; DWORD bih_size; DWORD output_depth = bmi->biBitCount; DWORD result; + FreeMediaType(outpmt); switch(bmi->biBitCount) { diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index e45db96..0abeb13 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -928,7 +928,7 @@ HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDI /* negotiate media type */ IEnumMediaTypes * pEnumCandidates; - AM_MEDIA_TYPE * pmtCandidate; /* Candidate media type */ + AM_MEDIA_TYPE * pmtCandidate = NULL; /* Candidate media type */ if (SUCCEEDED(hr = IPin_EnumMediaTypes(iface, &pEnumCandidates))) { @@ -937,6 +937,9 @@ HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDI /* try this filter's media types first */ while (S_OK == IEnumMediaTypes_Next(pEnumCandidates, 1, &pmtCandidate, NULL)) { + assert(pmtCandidate); + if (!IsEqualGUID(&FORMAT_None, &pmtCandidate->formattype)) + assert(pmtCandidate->pbFormat); if (( !pmt || CompareMediaTypes(pmt, pmtCandidate, TRUE) ) && (This->pConnectSpecific(iface, pReceivePin, pmtCandidate) == S_OK)) { @@ -944,7 +947,8 @@ HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDI CoTaskMemFree(pmtCandidate); break; } - CoTaskMemFree(pmtCandidate); + DeleteMediaType(pmtCandidate); + pmtCandidate = NULL; } IEnumMediaTypes_Release(pEnumCandidates); } @@ -956,6 +960,9 @@ HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDI while (S_OK == IEnumMediaTypes_Next(pEnumCandidates, 1, &pmtCandidate, NULL)) { + assert(pmtCandidate); + if (!IsEqualGUID(&FORMAT_None, &pmtCandidate->formattype)) + assert(pmtCandidate->pbFormat); if (( !pmt || CompareMediaTypes(pmt, pmtCandidate, TRUE) ) && (This->pConnectSpecific(iface, pReceivePin, pmtCandidate) == S_OK)) { @@ -963,7 +970,8 @@ HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDI CoTaskMemFree(pmtCandidate); break; } - CoTaskMemFree(pmtCandidate); + DeleteMediaType(pmtCandidate); + pmtCandidate = NULL; } /* while */ IEnumMediaTypes_Release(pEnumCandidates); } /* if not found */ diff --git a/dlls/quartz/transform.c b/dlls/quartz/transform.c index 9df01f2..97812bd 100644 --- a/dlls/quartz/transform.c +++ b/dlls/quartz/transform.c @@ -164,6 +164,7 @@ HRESULT TransformFilter_Create(TransformFilterImpl* pTransformFilter, const CLSI pTransformFilter->state = State_Stopped; pTransformFilter->pClock = NULL; ZeroMemory(&pTransformFilter->filterInfo, sizeof(FILTER_INFO)); + ZeroMemory(&pTransformFilter->pmt, sizeof(pTransformFilter->pmt)); pTransformFilter->ppPins = CoTaskMemAlloc(2 * sizeof(IPin *)); @@ -288,6 +289,7 @@ static ULONG WINAPI TransformFilter_Release(IBaseFilter * iface) DeleteCriticalSection(&This->csFilter); TRACE("Destroying transform filter\n"); + FreeMediaType(&This->pmt); CoTaskMemFree(This); return 0; @@ -603,12 +605,13 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl = static HRESULT WINAPI TransformFilter_Output_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum) { IPinImpl *This = (IPinImpl *)iface; + TransformFilterImpl *pTransform = (TransformFilterImpl *)This->pinInfo.pFilter; ENUMMEDIADETAILS emd; TRACE("(%p/%p)->(%p)\n", This, iface, ppEnum); emd.cMediaTypes = 1; - emd.pMediaTypes = &This->mtCurrent; + emd.pMediaTypes = &pTransform->pmt; return IEnumMediaTypesImpl_Construct(&emd, ppEnum); } diff --git a/dlls/quartz/transform.h b/dlls/quartz/transform.h index 89d7dfb..0f20b6e 100644 --- a/dlls/quartz/transform.h +++ b/dlls/quartz/transform.h @@ -45,6 +45,7 @@ struct TransformFilterImpl struct MediaSeekingImpl mediaSeeking; IPin ** ppPins; + AM_MEDIA_TYPE pmt; const TransformFuncsTable * pFuncsTable; };
1
0
0
0
Eric Pouech : winhelp: Double clicking in the index list should open the page.
by Alexandre Julliard
14 Jul '08
14 Jul '08
Module: wine Branch: master Commit: 8291034d014dba722c106d0dfb0cebe302344983 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8291034d014dba722c106d0df…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Jul 12 10:37:38 2008 +0200 winhelp: Double clicking in the index list should open the page. --- programs/winhlp32/winhelp.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c index 0ad3243..d65a752 100644 --- a/programs/winhlp32/winhelp.c +++ b/programs/winhlp32/winhelp.c @@ -1593,6 +1593,15 @@ INT_PTR CALLBACK WINHELP_IndexDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM id->jump = FALSE; id->offset = 1; return TRUE; + case WM_COMMAND: + switch (HIWORD(wParam)) + { + case LBN_DBLCLK: + if (LOWORD(wParam) == IDC_INDEXLIST) + SendMessage(GetParent(hWnd), PSM_PRESSBUTTON, PSBTN_OK, 0); + break; + } + break; case WM_NOTIFY: switch (((NMHDR*)lParam)->code) {
1
0
0
0
Eric Pouech : winhelp: Constify the internal .hlp file parsing.
by Alexandre Julliard
14 Jul '08
14 Jul '08
Module: wine Branch: master Commit: cdd235e24a14cf779380cf002ab83653e820f145 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cdd235e24a14cf779380cf002…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Jul 12 10:37:31 2008 +0200 winhelp: Constify the internal .hlp file parsing. --- programs/winhlp32/hlpfile.c | 94 ++++++++++++++++++++++-------------------- 1 files changed, 49 insertions(+), 45 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=cdd235e24a14cf779380c…
1
0
0
0
Eric Pouech : winhelp: Move the check about correct RLE decoding inside the decoding routine itself .
by Alexandre Julliard
14 Jul '08
14 Jul '08
Module: wine Branch: master Commit: ace5171df623ce1cb3645d0a8d3c1dde6306deeb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ace5171df623ce1cb3645d0a8…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Jul 12 10:37:25 2008 +0200 winhelp: Move the check about correct RLE decoding inside the decoding routine itself. --- programs/winhlp32/hlpfile.c | 33 ++++++++++++++------------------- 1 files changed, 14 insertions(+), 19 deletions(-) diff --git a/programs/winhlp32/hlpfile.c b/programs/winhlp32/hlpfile.c index 8d03b99..bac3293 100644 --- a/programs/winhlp32/hlpfile.c +++ b/programs/winhlp32/hlpfile.c @@ -67,7 +67,7 @@ static BOOL HLPFILE_AddPage(HLPFILE*, BYTE*, BYTE*, unsigned, unsigned); static BOOL HLPFILE_SkipParagraph(HLPFILE*, BYTE *, BYTE*, unsigned*); static void HLPFILE_Uncompress2(HLPFILE*, const BYTE*, const BYTE*, BYTE*, const BYTE*); static BOOL HLPFILE_Uncompress3(HLPFILE*, char*, const char*, const BYTE*, const BYTE*); -static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE** dst, unsigned dstsz); +static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE* dst, unsigned dstsz); static BOOL HLPFILE_ReadFont(HLPFILE* hlpfile); /*********************************************************************** @@ -557,7 +557,6 @@ static BYTE* HLPFILE_DecompressGfx(BYTE* src, unsigned csz, unsigned sz, BYTE { BYTE* dst; BYTE* tmp; - BYTE* tmp2; unsigned sz77; WINE_TRACE("Unpacking (%d) from %u bytes to %u bytes\n", packing, csz, sz); @@ -570,11 +569,9 @@ static BYTE* HLPFILE_DecompressGfx(BYTE* src, unsigned csz, unsigned sz, BYTE dst = src; break; case 1: /* RunLen */ - tmp = dst = HeapAlloc(GetProcessHeap(), 0, sz); + dst = HeapAlloc(GetProcessHeap(), 0, sz); if (!dst) return NULL; - HLPFILE_UncompressRLE(src, src + csz, &tmp, sz); - if (tmp - dst != sz) - WINE_WARN("Bogus gfx sizes (RunLen): %lu/%u\n", (SIZE_T)(tmp - dst), sz); + HLPFILE_UncompressRLE(src, src + csz, dst, sz); break; case 2: /* LZ77 */ sz77 = HLPFILE_UncompressedLZ77_Size(src, src + csz); @@ -589,15 +586,13 @@ static BYTE* HLPFILE_DecompressGfx(BYTE* src, unsigned csz, unsigned sz, BYTE tmp = HeapAlloc(GetProcessHeap(), 0, sz77); if (!tmp) return FALSE; HLPFILE_UncompressLZ77(src, src + csz, tmp); - dst = tmp2 = HeapAlloc(GetProcessHeap(), 0, sz); + dst = HeapAlloc(GetProcessHeap(), 0, sz); if (!dst) { HeapFree(GetProcessHeap(), 0, tmp); return FALSE; } - HLPFILE_UncompressRLE(tmp, tmp + sz77, &tmp2, sz); - if (tmp2 - dst != sz) - WINE_WARN("Bogus gfx sizes (LZ77+RunLen): %lu / %u\n", (SIZE_T)(tmp2 - dst), sz); + HLPFILE_UncompressRLE(tmp, tmp + sz77, dst, sz); HeapFree(GetProcessHeap(), 0, tmp); break; default: @@ -2349,10 +2344,10 @@ static BOOL HLPFILE_Uncompress3(HLPFILE* hlpfile, char* dst, const char* dst_end * * */ -static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE** dst, unsigned dstsz) +static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE* dst, unsigned dstsz) { BYTE ch; - BYTE* sdst = *dst + dstsz; + BYTE* sdst = dst + dstsz; while (src < end) { @@ -2360,21 +2355,21 @@ static void HLPFILE_UncompressRLE(const BYTE* src, const BYTE* end, BYTE** dst, if (ch & 0x80) { ch &= 0x7F; - if ((*dst) + ch <= sdst) - memcpy(*dst, src, ch); + if (dst + ch <= sdst) + memcpy(dst, src, ch); src += ch; } else { - if ((*dst) + ch <= sdst) - memset(*dst, (char)*src, ch); + if (dst + ch <= sdst) + memset(dst, (char)*src, ch); src++; } - *dst += ch; + dst += ch; } - if (*dst != sdst) + if (dst != sdst) WINE_WARN("Buffer X-flow: d(%lu) instead of d(%u)\n", - (SIZE_T)(*dst - (sdst - dstsz)), dstsz); + (SIZE_T)(dst - (sdst - dstsz)), dstsz); } /**************************************************************************
1
0
0
0
Eric Pouech : winhelp: Allow MACRO_Execute to be called recursively.
by Alexandre Julliard
14 Jul '08
14 Jul '08
Module: wine Branch: master Commit: 81168297e2eb077e011b5c0f2078e8506ab31e90 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=81168297e2eb077e011b5c0f2…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Jul 12 10:37:19 2008 +0200 winhelp: Allow MACRO_Execute to be called recursively. --- programs/winhlp32/macro.lex.l | 65 ++++++++++++++++++++++------------------ 1 files changed, 36 insertions(+), 29 deletions(-) diff --git a/programs/winhlp32/macro.lex.l b/programs/winhlp32/macro.lex.l index 83457b5..f3366b0 100644 --- a/programs/winhlp32/macro.lex.l +++ b/programs/winhlp32/macro.lex.l @@ -3,7 +3,7 @@ * Help Viewer * * Copyright 1996 Ulrich Schmid - * Copyright 2002 Eric Pouech + * Copyright 2002,2008 Eric Pouech * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -36,16 +36,20 @@ WINE_DEFAULT_DEBUG_CHANNEL(winhelp); -static LPCSTR macroptr; -static LPSTR strptr; -static int quote_stack[32]; -static unsigned int quote_stk_idx = 0; -static LPSTR cache_string[32]; -static int cache_used; +struct lex_data { + LPCSTR macroptr; + LPSTR strptr; + int quote_stack[32]; + unsigned quote_stk_idx; + LPSTR cache_string[32]; + int cache_used; +}; +static struct lex_data* lex_data = NULL; + struct lexret yylval; #define YY_INPUT(buf,result,max_size)\ - if ((result = *macroptr ? 1 : 0)) buf[0] = *macroptr++; + if ((result = *lex_data->macroptr ? 1 : 0)) buf[0] = *lex_data->macroptr++; %} %% @@ -61,39 +65,39 @@ struct lexret yylval; <quote>\` | <quote>\" | <quote>\' { - if (quote_stk_idx == 0 || - (yytext[0] == '\"' && quote_stack[quote_stk_idx - 1] != '\"') || + if (lex_data->quote_stk_idx == 0 || + (yytext[0] == '\"' && lex_data->quote_stack[lex_data->quote_stk_idx - 1] != '\"') || (yytext[0] == '`')) { /* opening a new one */ - if (quote_stk_idx == 0) + if (lex_data->quote_stk_idx == 0) { - assert(cache_used < sizeof(cache_string) / sizeof(cache_string[0])); - strptr = cache_string[cache_used] = HeapAlloc(GetProcessHeap(), 0, strlen(macroptr) + 1); - yylval.string = strptr; - cache_used++; + assert(lex_data->cache_used < sizeof(lex_data->cache_string) / sizeof(lex_data->cache_string[0])); + lex_data->strptr = lex_data->cache_string[lex_data->cache_used] = HeapAlloc(GetProcessHeap(), 0, strlen(lex_data->macroptr) + 1); + yylval.string = lex_data->strptr; + lex_data->cache_used++; BEGIN(quote); } - else *strptr++ = yytext[0]; - quote_stack[quote_stk_idx++] = yytext[0]; - assert(quote_stk_idx < sizeof(quote_stack) / sizeof(quote_stack[0])); + else *lex_data->strptr++ = yytext[0]; + lex_data->quote_stack[lex_data->quote_stk_idx++] = yytext[0]; + assert(lex_data->quote_stk_idx < sizeof(lex_data->quote_stack) / sizeof(lex_data->quote_stack[0])); } else { if (yytext[0] == '`') assert(0); /* close the current quote */ - if (--quote_stk_idx == 0) + if (--lex_data->quote_stk_idx == 0) { BEGIN INITIAL; - *strptr++ = '\0'; + *lex_data->strptr++ = '\0'; return STRING; } - else *strptr++ = yytext[0]; + else *lex_data->strptr++ = yytext[0]; } } -<quote>. *strptr++ = yytext[0]; -<quote>\\. *strptr++ = yytext[1]; +<quote>. *lex_data->strptr++ = yytext[0]; +<quote>\\. *lex_data->strptr++ = yytext[1]; <quote><<EOF>> return 0; " " @@ -264,12 +268,17 @@ static int MACRO_CallVoidFunc(FARPROC fn, const char* args) BOOL MACRO_ExecuteMacro(LPCSTR macro) { + struct lex_data curr_lex_data, *prev_lex_data; BOOL ret = TRUE; int t; WINE_TRACE("%s\n", wine_dbgstr_a(macro)); - macroptr = macro; + prev_lex_data = lex_data; + lex_data = &curr_lex_data; + + memset(lex_data, 0, sizeof(*lex_data)); + lex_data->macroptr = macro; while ((t = yylex()) != EMPTY) { @@ -295,11 +304,9 @@ BOOL MACRO_ExecuteMacro(LPCSTR macro) } done: - strptr = NULL; - quote_stk_idx = 0; - for (t = 0; t < cache_used; t++) - HeapFree(GetProcessHeap(), 0, cache_string[t]); - cache_used = 0; + for (t = 0; t < lex_data->cache_used; t++) + HeapFree(GetProcessHeap(), 0, lex_data->cache_string[t]); + lex_data = prev_lex_data; return ret; }
1
0
0
0
Eric Pouech : winhelp: Implemented SetPopupColor macro.
by Alexandre Julliard
14 Jul '08
14 Jul '08
Module: wine Branch: master Commit: 7d0b6bd4a6620732b5e6c7d2e7bf739e65bd9440 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d0b6bd4a6620732b5e6c7d2e…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Jul 12 10:37:08 2008 +0200 winhelp: Implemented SetPopupColor macro. --- programs/winhlp32/hlpfile.h | 3 +++ programs/winhlp32/macro.c | 6 ++++-- programs/winhlp32/winhelp.c | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/programs/winhlp32/hlpfile.h b/programs/winhlp32/hlpfile.h index f25fc62..5097259 100644 --- a/programs/winhlp32/hlpfile.h +++ b/programs/winhlp32/hlpfile.h @@ -133,6 +133,9 @@ typedef struct tagHlpFileFile HLPFILE_WINDOWINFO* windows; HICON hIcon; + BOOL has_popup_color; + COLORREF popup_color; + LPSTR help_on_file; } HLPFILE; diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c index 6a3c9da..7179dca 100644 --- a/programs/winhlp32/macro.c +++ b/programs/winhlp32/macro.c @@ -904,9 +904,11 @@ void CALLBACK MACRO_SetHelpOnFile(LPCSTR str) strcpy(Globals.active_win->page->file->help_on_file, str); } -void CALLBACK MACRO_SetPopupColor(LONG u1, LONG u2, LONG u3) +void CALLBACK MACRO_SetPopupColor(LONG r, LONG g, LONG b) { - WINE_FIXME("(%u, %u, %u)\n", u1, u2, u3); + 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); } void CALLBACK MACRO_ShellExecute(LPCSTR str1, LPCSTR str2, LONG u1, LONG u2, LPCSTR str3, LPCSTR str4) diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c index 13114f7..0ad3243 100644 --- a/programs/winhlp32/winhelp.c +++ b/programs/winhlp32/winhelp.c @@ -228,7 +228,10 @@ static HLPFILE_WINDOWINFO* WINHELP_GetPopupWindowInfo(HLPFILE* hlpfile, wi.style = SW_SHOW; wi.win_style = WS_POPUP | WS_BORDER; - wi.sr_color = parent->info->sr_color; + if (parent->page->file->has_popup_color) + wi.sr_color = parent->page->file->popup_color; + else + wi.sr_color = parent->info->sr_color; wi.nsr_color = 0xFFFFFF; return &wi;
1
0
0
0
Eric Pouech : winhelp: Implemented SetHelpOnFile macro.
by Alexandre Julliard
14 Jul '08
14 Jul '08
Module: wine Branch: master Commit: 448fed2055fdd7b83311630e7d35762aafb65c1e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=448fed2055fdd7b83311630e7…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Jul 12 10:37:01 2008 +0200 winhelp: Implemented SetHelpOnFile macro. --- programs/winhlp32/hlpfile.c | 1 + programs/winhlp32/hlpfile.h | 2 ++ programs/winhlp32/macro.c | 17 ++++++++++++++--- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/programs/winhlp32/hlpfile.c b/programs/winhlp32/hlpfile.c index 046d25a..8d03b99 100644 --- a/programs/winhlp32/hlpfile.c +++ b/programs/winhlp32/hlpfile.c @@ -2641,5 +2641,6 @@ void HLPFILE_FreeHlpFile(HLPFILE* hlpfile) HeapFree(GetProcessHeap(), 0, hlpfile->phrases_offsets); HeapFree(GetProcessHeap(), 0, hlpfile->phrases_buffer); HeapFree(GetProcessHeap(), 0, hlpfile->topic_map); + HeapFree(GetProcessHeap(), 0, hlpfile->help_on_file); HeapFree(GetProcessHeap(), 0, hlpfile); } diff --git a/programs/winhlp32/hlpfile.h b/programs/winhlp32/hlpfile.h index 9b086c2..f25fc62 100644 --- a/programs/winhlp32/hlpfile.h +++ b/programs/winhlp32/hlpfile.h @@ -132,6 +132,8 @@ typedef struct tagHlpFileFile unsigned numWindows; HLPFILE_WINDOWINFO* windows; HICON hIcon; + + LPSTR help_on_file; } HLPFILE; /* diff --git a/programs/winhlp32/macro.c b/programs/winhlp32/macro.c index 06aa2d7..6a3c9da 100644 --- a/programs/winhlp32/macro.c +++ b/programs/winhlp32/macro.c @@ -2,7 +2,7 @@ * Help Viewer * * Copyright 1996 Ulrich Schmid - * Copyright 2002 Eric Pouech + * Copyright 2002, 2008 Eric Pouech * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -555,8 +555,14 @@ void CALLBACK MACRO_GotoMark(LPCSTR str) void CALLBACK MACRO_HelpOn(void) { + LPCSTR file; + WINE_TRACE("()\n"); - MACRO_JumpContents((Globals.wVersion > 4) ? "winhelp32.hlp" : "winhelp.hlp", NULL); + file = Globals.active_win->page->file->help_on_file; + if (!file) + file = (Globals.wVersion > 4) ? "winhlp32.hlp" : "winhelp.hlp"; + + MACRO_JumpContents(file, NULL); } void CALLBACK MACRO_HelpOnTop(void) @@ -890,7 +896,12 @@ void CALLBACK MACRO_SetContents(LPCSTR str, LONG u) void CALLBACK MACRO_SetHelpOnFile(LPCSTR str) { - WINE_FIXME("(\"%s\")\n", str); + 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); } void CALLBACK MACRO_SetPopupColor(LONG u1, LONG u2, LONG u3)
1
0
0
0
Eric Pouech : winhelp: Fixed memory leak in macro handling.
by Alexandre Julliard
14 Jul '08
14 Jul '08
Module: wine Branch: master Commit: f6e93ea2d38602a0f665c3289b99c51db5e3aeca URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6e93ea2d38602a0f665c3289…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Jul 12 10:36:55 2008 +0200 winhelp: Fixed memory leak in macro handling. --- programs/winhlp32/macro.lex.l | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/programs/winhlp32/macro.lex.l b/programs/winhlp32/macro.lex.l index b8d6ac2..83457b5 100644 --- a/programs/winhlp32/macro.lex.l +++ b/programs/winhlp32/macro.lex.l @@ -40,6 +40,8 @@ static LPCSTR macroptr; static LPSTR strptr; static int quote_stack[32]; static unsigned int quote_stk_idx = 0; +static LPSTR cache_string[32]; +static int cache_used; struct lexret yylval; #define YY_INPUT(buf,result,max_size)\ @@ -66,8 +68,10 @@ struct lexret yylval; /* opening a new one */ if (quote_stk_idx == 0) { - strptr = HeapAlloc(GetProcessHeap(), 0, strlen(macroptr) + 1); + assert(cache_used < sizeof(cache_string) / sizeof(cache_string[0])); + strptr = cache_string[cache_used] = HeapAlloc(GetProcessHeap(), 0, strlen(macroptr) + 1); yylval.string = strptr; + cache_used++; BEGIN(quote); } else *strptr++ = yytext[0]; @@ -260,6 +264,7 @@ static int MACRO_CallVoidFunc(FARPROC fn, const char* args) BOOL MACRO_ExecuteMacro(LPCSTR macro) { + BOOL ret = TRUE; int t; WINE_TRACE("%s\n", wine_dbgstr_a(macro)); @@ -283,17 +288,20 @@ BOOL MACRO_ExecuteMacro(LPCSTR macro) } switch (t = yylex()) { - case EMPTY: return 1; + case EMPTY: goto done; case ';': break; - default: return 0; + default: ret = FALSE; goto done; } } - HeapFree(GetProcessHeap(), 0, strptr); +done: strptr = NULL; quote_stk_idx = 0; + for (t = 0; t < cache_used; t++) + HeapFree(GetProcessHeap(), 0, cache_string[t]); + cache_used = 0; - return 1; + return ret; } #ifndef yywrap
1
0
0
0
Eric Pouech : winhelp: Pick nicer fonts for buttons.
by Alexandre Julliard
14 Jul '08
14 Jul '08
Module: wine Branch: master Commit: 6346250ed80166cfa03a825023191bc910c5196a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6346250ed80166cfa03a82502…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sat Jul 12 10:36:49 2008 +0200 winhelp: Pick nicer fonts for buttons. --- programs/winhlp32/winhelp.c | 15 +++++++++++++-- programs/winhlp32/winhelp.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c index df22988..13114f7 100644 --- a/programs/winhlp32/winhelp.c +++ b/programs/winhlp32/winhelp.c @@ -58,7 +58,7 @@ static void WINHELP_DeleteButtons(WINHELP_WINDOW*); static void WINHELP_SetupText(HWND hWnd, WINHELP_WINDOW *win, ULONG relative); static void WINHELP_DeletePageLinks(HLPFILE_PAGE* page); -WINHELP_GLOBALS Globals = {3, NULL, TRUE, NULL, NULL, NULL, NULL, NULL, {{{NULL,NULL}},0}}; +WINHELP_GLOBALS Globals = {3, NULL, TRUE, NULL, NULL, NULL, NULL, NULL, {{{NULL,NULL}},0}, NULL}; #define CTL_ID_BUTTON 0x700 #define CTL_ID_TEXT 0x701 @@ -1169,10 +1169,21 @@ static LRESULT CALLBACK WINHELP_ButtonBoxWndProc(HWND hWnd, UINT msg, WPARAM wPa 0, 0, 0, 0, hWnd, (HMENU) button->wParam, Globals.hInstance, 0); - if (button->hWnd) { + if (button->hWnd) + { if (Globals.button_proc == NULL) + { + NONCLIENTMETRICSW ncm; Globals.button_proc = (WNDPROC) GetWindowLongPtr(button->hWnd, GWLP_WNDPROC); + + ncm.cbSize = sizeof(NONCLIENTMETRICSW); + SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, + sizeof(NONCLIENTMETRICSW), &ncm, 0); + Globals.hButtonFont = CreateFontIndirectW(&ncm.lfMenuFont); + } SetWindowLongPtr(button->hWnd, GWLP_WNDPROC, (LONG_PTR) WINHELP_ButtonWndProc); + if (Globals.hButtonFont) + SendMessage(button->hWnd, WM_SETFONT, (WPARAM)Globals.hButtonFont, TRUE); } } hDc = GetDC(button->hWnd); diff --git a/programs/winhlp32/winhelp.h b/programs/winhlp32/winhelp.h index 7d959af..f06b082 100644 --- a/programs/winhlp32/winhelp.h +++ b/programs/winhlp32/winhelp.h @@ -137,6 +137,7 @@ typedef struct WNDPROC button_proc; WINHELP_DLL* dlls; WINHELP_PAGESET history; + HFONT hButtonFont; } WINHELP_GLOBALS; extern WINHELP_GLOBALS Globals;
1
0
0
0
James Hawkins : comctl32: Free the trackbar tics.
by Alexandre Julliard
14 Jul '08
14 Jul '08
Module: wine Branch: master Commit: b04ae273de9af85f10c6ff8bb86f21e49d81566a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b04ae273de9af85f10c6ff8bb…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Fri Jul 11 19:57:22 2008 -0500 comctl32: Free the trackbar tics. --- dlls/comctl32/trackbar.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index fbd03dd..67cf32d 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -1453,6 +1453,9 @@ TRACKBAR_Destroy (TRACKBAR_INFO *infoPtr) if (infoPtr->hwndToolTip) DestroyWindow (infoPtr->hwndToolTip); + Free (infoPtr->tics); + infoPtr->tics = NULL; + SetWindowLongPtrW (infoPtr->hwndSelf, 0, 0); CloseThemeData (GetWindowTheme (infoPtr->hwndSelf)); Free (infoPtr);
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
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