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
April 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
4 participants
1278 discussions
Start a n
N
ew thread
Andrew Talbot : secur32: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 49939ed5445cbe37c08d7222e7cf0c9ede5d92ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=49939ed5445cbe37c08d7222e…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:45 2008 +0100 secur32: Remove unused variables. --- dlls/secur32/ntlm.c | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c index f971fc1..bcd65ef 100644 --- a/dlls/secur32/ntlm.c +++ b/dlls/secur32/ntlm.c @@ -615,8 +615,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( lstrcpyA(want_flags, "SF"); if(fContextReq & ISC_REQ_CONFIDENTIALITY) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SEAL")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SEAL") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SEAL"); } if(fContextReq & ISC_REQ_CONNECTION) @@ -625,22 +624,19 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( ctxt_attr |= ISC_RET_EXTENDED_ERROR; if(fContextReq & ISC_REQ_INTEGRITY) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SIGN")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SIGN") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SIGN"); } if(fContextReq & ISC_REQ_MUTUAL_AUTH) ctxt_attr |= ISC_RET_MUTUAL_AUTH; if(fContextReq & ISC_REQ_REPLAY_DETECT) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SIGN")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SIGN") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SIGN"); } if(fContextReq & ISC_REQ_SEQUENCE_DETECT) { - char *ptr; - if((ptr = strstr(want_flags, "NTLMSSP_FEATURE_SIGN")) == NULL) + if(strstr(want_flags, "NTLMSSP_FEATURE_SIGN") == NULL) lstrcatA(want_flags, " NTLMSSP_FEATURE_SIGN"); } if(fContextReq & ISC_REQ_STREAM) @@ -1974,7 +1970,6 @@ static const SecPkgInfoA infoA = { void SECUR32_initNTLMSP(void) { - SECURITY_STATUS ret; PNegoHelper helper; static CHAR version[] = "--version"; @@ -1983,7 +1978,7 @@ void SECUR32_initNTLMSP(void) version, NULL }; - if((ret = fork_helper(&helper, ntlm_auth, args)) != SEC_E_OK) + if(fork_helper(&helper, ntlm_auth, args) != SEC_E_OK) { /* Cheat and allocate a helper anyway, so cleanup later will work. */ helper = HeapAlloc(GetProcessHeap(),0, sizeof(PNegoHelper));
1
0
0
0
Andrew Talbot : setupapi: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 362cd67d3b689b26d91db6974f2fd7da4b176ee8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=362cd67d3b689b26d91db6974…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:51 2008 +0100 setupapi: Remove unused variables. --- dlls/setupapi/parser.c | 4 ++-- dlls/setupapi/setupx_main.c | 12 +++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dlls/setupapi/parser.c b/dlls/setupapi/parser.c index a00e068..8c8a518 100644 --- a/dlls/setupapi/parser.c +++ b/dlls/setupapi/parser.c @@ -778,7 +778,7 @@ static const WCHAR *eol_backslash_state( struct parser *parser, const WCHAR *pos /* handler for parser QUOTES state */ static const WCHAR *quotes_state( struct parser *parser, const WCHAR *pos ) { - const WCHAR *p, *token_end = parser->start; + const WCHAR *p; for (p = pos; !is_eol( parser, p ); p++) { @@ -787,7 +787,7 @@ static const WCHAR *quotes_state( struct parser *parser, const WCHAR *pos ) if (p+1 < parser->end && p[1] == '"') /* double quotes */ { push_token( parser, p + 1 ); - parser->start = token_end = p + 2; + parser->start = p + 2; p++; } else /* end of quotes */ diff --git a/dlls/setupapi/setupx_main.c b/dlls/setupapi/setupx_main.c index 606ffb8..82593f3 100644 --- a/dlls/setupapi/setupx_main.c +++ b/dlls/setupapi/setupx_main.c @@ -401,7 +401,7 @@ RETERR16 WINAPI CtlDelLdd16(LOGDISKID16 ldid) */ RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC pldd) { - LDD_LIST *pCurr, *pPrev = NULL; + LDD_LIST *pCurr; TRACE("(%p)\n", pldd); @@ -414,10 +414,7 @@ RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC pldd) pCurr = pFirstLDD; /* search until we find the appropriate LDD or hit the end */ while ((pCurr != NULL) && (pldd->ldid > pCurr->pldd->ldid)) - { - pPrev = pCurr; pCurr = pCurr->next; - } if ( (pCurr == NULL) /* hit end of list */ || (pldd->ldid != pCurr->pldd->ldid) ) return ERR_VCP_LDDFIND; /* correct ? */ @@ -534,7 +531,7 @@ RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC pldd) */ static RETERR16 SETUPX_GetLdd(LPLOGDISKDESC pldd) { - LDD_LIST *pCurr, *pPrev = NULL; + LDD_LIST *pCurr; if (!std_LDDs_done) SETUPX_CreateStandardLDDs(); @@ -545,10 +542,7 @@ static RETERR16 SETUPX_GetLdd(LPLOGDISKDESC pldd) pCurr = pFirstLDD; /* search until we find the appropriate LDD or hit the end */ while ((pCurr != NULL) && (pldd->ldid > pCurr->pldd->ldid)) - { - pPrev = pCurr; - pCurr = pCurr->next; - } + pCurr = pCurr->next; if (pCurr == NULL) /* hit end of list */ return ERR_VCP_LDDFIND; /* correct ? */
1
0
0
0
Andrew Talbot : shell32: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: f692f19531fb1c552758e112608be24a2815d73a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f692f19531fb1c552758e1126…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:56 2008 +0100 shell32: Remove unused variables. --- dlls/shell32/shlfileop.c | 4 ++-- dlls/shell32/shlmenu.c | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 76f1309..7c10588 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -1002,7 +1002,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles) { LPCWSTR ptr = szFiles; WCHAR szCurFile[MAX_PATH]; - DWORD i = 0, dwDirLen; + DWORD i = 0; if (!szFiles) return ERROR_INVALID_PARAMETER; @@ -1027,7 +1027,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles) /* change relative to absolute path */ if (PathIsRelativeW(ptr)) { - dwDirLen = GetCurrentDirectoryW(MAX_PATH, szCurFile) + 1; + GetCurrentDirectoryW(MAX_PATH, szCurFile); PathCombineW(szCurFile, szCurFile, ptr); flList->feFiles[i].bFromRelative = TRUE; } diff --git a/dlls/shell32/shlmenu.c b/dlls/shell32/shlmenu.c index cdd08c9..c44f8c1 100644 --- a/dlls/shell32/shlmenu.c +++ b/dlls/shell32/shlmenu.c @@ -132,7 +132,7 @@ static LPFMINFO FM_SetMenuParameter( static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl) { IShellFolder *lpsf, *lpsf2; ULONG ulItemAttr = SFGAO_FOLDER; - UINT uID, uFlags, uEnumFlags; + UINT uID, uEnumFlags; LPFNFMCALLBACK lpfnCallback; LPCITEMIDLIST pidl; WCHAR sTemp[MAX_PATH]; @@ -164,7 +164,6 @@ static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl) return 0; uID = menudata->uID; - uFlags = menudata->uFlags; uEnumFlags = menudata->uEnumFlags; lpfnCallback = menudata->lpfnCallback; menudata->bInitialized = FALSE; @@ -593,7 +592,7 @@ LRESULT WINAPI FileMenu_DrawItem( COLORREF clrPrevText, clrPrevBkgnd; int xi,yi,xt,yt; HIMAGELIST hImageList; - RECT TextRect, BorderRect; + RECT TextRect; LPFMINFO menuinfo; TRACE("%p %p %s\n", hWnd, lpdis, debugstr_w(pMyItem->szItemText)); @@ -616,9 +615,6 @@ LRESULT WINAPI FileMenu_DrawItem( if (menuinfo->nBorderWidth) TextRect.left += menuinfo->nBorderWidth; - BorderRect.right = menuinfo->nBorderWidth; -/* FillRect(lpdis->hDC, &BorderRect, CreateSolidBrush( menuinfo->crBorderColor)); -*/ TextRect.left += FM_LEFTBORDER; xi = TextRect.left + FM_SPACE1; yi = TextRect.top + FM_Y_SPACE/2;
1
0
0
0
Andrew Talbot : rpcrt4: Remove unused variables.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 649c7aeb7c1fda49a76ad02105adde12baa2cf9c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=649c7aeb7c1fda49a76ad0210…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Apr 24 21:43:40 2008 +0100 rpcrt4: Remove unused variables. --- dlls/rpcrt4/ndr_marshall.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index d2ef11b..25e6853 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2996,7 +2996,6 @@ ULONG WINAPI NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, { unsigned size = *(const WORD*)(pFormat+2); PFORMAT_STRING conf_array = NULL; - PFORMAT_STRING pointer_desc = NULL; TRACE("(%p,%p)\n", pStubMsg, pFormat); @@ -3004,9 +3003,7 @@ ULONG WINAPI NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg, pFormat += 4; if (*(const WORD*)pFormat) conf_array = pFormat + *(const WORD*)pFormat; - pFormat += 2; - if (*(const WORD*)pFormat) pointer_desc = pFormat + *(const WORD*)pFormat; - pFormat += 2; + pFormat += 4; ComplexStructMemorySize(pStubMsg, pFormat); @@ -4124,7 +4121,6 @@ void WINAPI NdrConformantStructFree(PMIDL_STUB_MESSAGE pStubMsg, { const NDR_CSTRUCT_FORMAT *pCStructFormat = (const NDR_CSTRUCT_FORMAT *)pFormat; PFORMAT_STRING pCArrayFormat; - ULONG esize; TRACE("(%p, %p, %p)\n", pStubMsg, pMemory, pFormat); @@ -4144,7 +4140,6 @@ void WINAPI NdrConformantStructFree(PMIDL_STUB_MESSAGE pStubMsg, RpcRaiseException(RPC_S_INTERNAL_ERROR); return; } - esize = *(const WORD*)(pCArrayFormat+2); ComputeConformance(pStubMsg, pMemory + pCStructFormat->memory_size, pCArrayFormat + 4, 0); @@ -4490,7 +4485,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, { const NDR_CVSTRUCT_FORMAT *pCVStructFormat = (const NDR_CVSTRUCT_FORMAT *)pFormat; PFORMAT_STRING pCVArrayFormat; - ULONG esize; TRACE("(%p, %p, %p)\n", pStubMsg, pMemory, pFormat); @@ -4507,8 +4501,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, switch (*pCVArrayFormat) { case RPC_FC_CVARRAY: - esize = *(const WORD*)(pCVArrayFormat+2); - pCVArrayFormat = ComputeConformance(pStubMsg, pMemory + pCVStructFormat->memory_size, pCVArrayFormat + 4, 0); pCVArrayFormat = ComputeVariance(pStubMsg, pMemory + pCVStructFormat->memory_size, @@ -4517,7 +4509,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, case RPC_FC_C_CSTRING: TRACE("string=%s\n", debugstr_a((char*)pMemory + pCVStructFormat->memory_size)); pStubMsg->ActualCount = strlen((char*)pMemory + pCVStructFormat->memory_size)+1; - esize = sizeof(char); if (pCVArrayFormat[1] == RPC_FC_STRING_SIZED) pCVArrayFormat = ComputeConformance(pStubMsg, pMemory + pCVStructFormat->memory_size, pCVArrayFormat + 2, 0); @@ -4527,7 +4518,6 @@ void WINAPI NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE pStubMsg, case RPC_FC_C_WSTRING: TRACE("string=%s\n", debugstr_w((LPWSTR)pMemory + pCVStructFormat->memory_size)); pStubMsg->ActualCount = strlenW((LPWSTR)pMemory + pCVStructFormat->memory_size)+1; - esize = sizeof(WCHAR); if (pCVArrayFormat[1] == RPC_FC_STRING_SIZED) pCVArrayFormat = ComputeConformance(pStubMsg, pMemory + pCVStructFormat->memory_size, pCVArrayFormat + 2, 0); @@ -5012,7 +5002,6 @@ void WINAPI NdrVaryingArrayFree(PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pMemory, PFORMAT_STRING pFormat) { - unsigned char alignment; DWORD elements; TRACE("(%p, %p, %p)\n", pStubMsg, pMemory, pFormat); @@ -5025,8 +5014,6 @@ void WINAPI NdrVaryingArrayFree(PMIDL_STUB_MESSAGE pStubMsg, return; } - alignment = pFormat[1] + 1; - if (pFormat[0] == RPC_FC_SMVARRAY) { pFormat += 2;
1
0
0
0
Eric Pouech : winhelp: Emit the proper RTF stream for a metafile to RichEdit.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 5da401950c65a250af986f1469515313cca2ef47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5da401950c65a250af986f146…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:34 2008 +0200 winhelp: Emit the proper RTF stream for a metafile to RichEdit. --- programs/winhelp/hlpfile.c | 38 +++++++++++++++++++++++++++++++++++++- 1 files changed, 37 insertions(+), 1 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index 6417c90..f5935a1 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -806,7 +806,43 @@ done: */ static BOOL HLPFILE_RtfAddMetaFile(struct RtfData* rd, BYTE* beg, BYTE pack) { - return TRUE; + BYTE* ptr; + unsigned long size, csize; + unsigned long off, hsoff; + BYTE* bits; + char tmp[256]; + unsigned mm; + BOOL ret; + + WINE_TRACE("Loading metafile\n"); + + ptr = beg + 2; /* for type and pack */ + + mm = fetch_ushort(&ptr); /* mapping mode */ + sprintf(tmp, "{\\pict\\wmetafile%d\\picw%d\\pich%d", + mm, GET_USHORT(ptr, 0), GET_USHORT(ptr, 2)); + if (!HLPFILE_RtfAddControl(rd, tmp)) return FALSE; + ptr += 4; + + size = fetch_ulong(&ptr); /* decompressed size */ + csize = fetch_ulong(&ptr); /* compressed size */ + fetch_ulong(&ptr); /* hotspot size */ + off = GET_UINT(ptr, 0); + hsoff = GET_UINT(ptr, 4); + ptr += 8; + + WINE_TRACE("sz=%lu csz=%lu offs=%lu/%u,%lu\n", + size, csize, off, ptr - beg, hsoff); + + bits = HLPFILE_DecompressGfx(beg + off, csize, size, pack); + if (!bits) return FALSE; + + ret = HLPFILE_RtfAddHexBytes(rd, bits, size) && + HLPFILE_RtfAddControl(rd, "}"); + + if (bits != beg + off) HeapFree(GetProcessHeap(), 0, bits); + + return ret; } /******************************************************************
1
0
0
0
Eric Pouech : winhelp: Emit proper RTF tokens for a bitmap.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 5309ad1c8f77cb29a208d68630aa747482ec44d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5309ad1c8f77cb29a208d6863…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:28 2008 +0200 winhelp: Emit proper RTF tokens for a bitmap. --- programs/winhelp/hlpfile.c | 207 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 206 insertions(+), 1 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index 2230cf6..6417c90 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -679,6 +679,203 @@ static BOOL HLPFILE_RtfAddText(struct RtfData* rd, const char* str) } /****************************************************************** + * RtfAddHexBytes + * + */ +static BOOL HLPFILE_RtfAddHexBytes(struct RtfData* rd, const void* _ptr, unsigned sz) +{ + char tmp[512]; + unsigned i, step; + const BYTE* ptr = _ptr; + static const char* _2hex = "0123456789abcdef"; + + if (!rd) return TRUE; /* FIXME: TEMP */ + if (!rd->in_text) + { + if (!HLPFILE_RtfAddRawString(rd, " ", 1)) return FALSE; + rd->in_text = TRUE; + } + for (; sz; sz -= step) + { + step = min(256, sz); + for (i = 0; i < step; i++) + { + tmp[2 * i + 0] = _2hex[*ptr >> 4]; + tmp[2 * i + 1] = _2hex[*ptr++ & 0xF]; + } + if (!HLPFILE_RtfAddRawString(rd, tmp, 2 * step)) return FALSE; + } + return TRUE; +} + +/****************************************************************** + * HLPFILE_RtfAddBitmap + * + */ +static BOOL HLPFILE_RtfAddBitmap(struct RtfData* rd, BYTE* beg, BYTE type, BYTE pack) +{ + BYTE* ptr; + BYTE* pict_beg; + BITMAPINFO* bi; + unsigned long off, csz; + unsigned nc = 0; + BOOL ret = FALSE; + char tmp[256]; + + bi = HeapAlloc(GetProcessHeap(), 0, sizeof(*bi)); + if (!bi) return FALSE; + + ptr = beg + 2; /* for type and pack */ + + bi->bmiHeader.biSize = sizeof(bi->bmiHeader); + bi->bmiHeader.biXPelsPerMeter = fetch_ulong(&ptr); + bi->bmiHeader.biYPelsPerMeter = fetch_ulong(&ptr); + bi->bmiHeader.biPlanes = fetch_ushort(&ptr); + bi->bmiHeader.biBitCount = fetch_ushort(&ptr); + bi->bmiHeader.biWidth = fetch_ulong(&ptr); + bi->bmiHeader.biHeight = fetch_ulong(&ptr); + bi->bmiHeader.biClrUsed = fetch_ulong(&ptr); + bi->bmiHeader.biClrImportant = fetch_ulong(&ptr); + bi->bmiHeader.biCompression = BI_RGB; + if (bi->bmiHeader.biBitCount > 32) WINE_FIXME("Unknown bit count %u\n", bi->bmiHeader.biBitCount); + if (bi->bmiHeader.biPlanes != 1) WINE_FIXME("Unsupported planes %u\n", bi->bmiHeader.biPlanes); + bi->bmiHeader.biSizeImage = (((bi->bmiHeader.biWidth * bi->bmiHeader.biBitCount + 31) & ~31) / 8) * bi->bmiHeader.biHeight; + WINE_TRACE("planes=%d bc=%d size=(%d,%d)\n", + bi->bmiHeader.biPlanes, bi->bmiHeader.biBitCount, + bi->bmiHeader.biWidth, bi->bmiHeader.biHeight); + + csz = fetch_ulong(&ptr); + fetch_ulong(&ptr); /* hotspot size */ + + off = GET_UINT(ptr, 0); ptr += 4; + /* GET_UINT(ptr, 0); hotspot offset */ ptr += 4; + + /* now read palette info */ + if (type == 0x06) + { + unsigned i; + + nc = bi->bmiHeader.biClrUsed; + /* not quite right, especially for bitfields type of compression */ + if (!nc && bi->bmiHeader.biBitCount <= 8) + nc = 1 << bi->bmiHeader.biBitCount; + + bi = HeapReAlloc(GetProcessHeap(), 0, bi, sizeof(*bi) + nc * sizeof(RGBQUAD)); + if (!bi) return FALSE; + for (i = 0; i < nc; i++) + { + bi->bmiColors[i].rgbBlue = ptr[0]; + bi->bmiColors[i].rgbGreen = ptr[1]; + bi->bmiColors[i].rgbRed = ptr[2]; + bi->bmiColors[i].rgbReserved = 0; + ptr += 4; + } + } + pict_beg = HLPFILE_DecompressGfx(beg + off, csz, bi->bmiHeader.biSizeImage, pack); + + + if (!HLPFILE_RtfAddControl(rd, "{\\pict")) goto done; + if (type == 0x06) + { + sprintf(tmp, "\\dibitmap0\\picw%d\\pich%d", + bi->bmiHeader.biWidth, bi->bmiHeader.biHeight); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + if (!HLPFILE_RtfAddHexBytes(rd, bi, sizeof(*bi) + nc * sizeof(RGBQUAD))) goto done; + } + else + { + sprintf(tmp, "\\wbitmap0\\wbmbitspixel%d\\wbmplanes%d\\picw%d\\pich%d", + bi->bmiHeader.biBitCount, bi->bmiHeader.biPlanes, + bi->bmiHeader.biWidth, bi->bmiHeader.biHeight); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (!HLPFILE_RtfAddHexBytes(rd, pict_beg, bi->bmiHeader.biSizeImage)) goto done; + if (!HLPFILE_RtfAddControl(rd, "}")) goto done; + + ret = TRUE; +done: + HeapFree(GetProcessHeap(), 0, bi); + if (pict_beg != beg + off) HeapFree(GetProcessHeap(), 0, pict_beg); + + return ret; +} + +/****************************************************************** + * HLPFILE_RtfAddMetaFile + * + */ +static BOOL HLPFILE_RtfAddMetaFile(struct RtfData* rd, BYTE* beg, BYTE pack) +{ + return TRUE; +} + +/****************************************************************** + * HLPFILE_RtfAddGfxByAddr + * + */ +static BOOL HLPFILE_RtfAddGfxByAddr(struct RtfData* rd, HLPFILE *hlpfile, + BYTE* ref, unsigned long size) +{ + unsigned i, numpict; + + numpict = GET_USHORT(ref, 2); + WINE_TRACE("Got picture magic=%04x #=%d\n", GET_USHORT(ref, 0), numpict); + + for (i = 0; i < numpict; i++) + { + BYTE* beg; + BYTE* ptr; + BYTE type, pack; + + WINE_TRACE("Offset[%d] = %x\n", i, GET_UINT(ref, (1 + i) * 4)); + beg = ptr = ref + GET_UINT(ref, (1 + i) * 4); + + type = *ptr++; + pack = *ptr++; + + switch (type) + { + case 5: /* device dependent bmp */ + case 6: /* device independent bmp */ + HLPFILE_RtfAddBitmap(rd, beg, type, pack); + break; + case 8: + HLPFILE_RtfAddMetaFile(rd, beg, pack); + break; + default: WINE_FIXME("Unknown type %u\n", type); return FALSE; + } + + /* FIXME: hotspots */ + + /* FIXME: implement support for multiple picture format */ + if (numpict != 1) WINE_FIXME("Supporting only one bitmap format per logical bitmap (for now). Using first format\n"); + break; + } + return TRUE; +} + +/****************************************************************** + * HLPFILE_RtfAddGfxByIndex + * + * + */ +static BOOL HLPFILE_RtfAddGfxByIndex(struct RtfData* rd, HLPFILE *hlpfile, + unsigned index) +{ + char tmp[16]; + BYTE *ref, *end; + + WINE_TRACE("Loading picture #%d\n", index); + + sprintf(tmp, "|bm%u", index); + + if (!HLPFILE_FindSubFile(hlpfile, tmp, &ref, &end)) {WINE_WARN("no sub file\n"); return FALSE;} + + ref += 9; + return HLPFILE_RtfAddGfxByAddr(rd, hlpfile, ref, end - ref); +} + +/****************************************************************** * HLPFILE_LoadBitmap * * @@ -1273,6 +1470,10 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE case 0: HLPFILE_LoadGfxByIndex(page->file, GET_SHORT(format, 2), paragraph); + if (rd) { /* FIXME: TEMP */ + HLPFILE_RtfAddGfxByIndex(rd, page->file, GET_SHORT(format, 2)); + rd->char_pos++; + } break; case 1: WINE_FIXME("does it work ??? %x<%lu>#%u\n", @@ -1280,7 +1481,11 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE size, GET_SHORT(format, 2)); HLPFILE_LoadGfxByAddr(page->file, format + 2, size - 4, paragraph); - break; + if (rd) { /* FIXME: TEMP */ + HLPFILE_RtfAddGfxByAddr(rd, page->file, format + 2, size - 4); + rd->char_pos++; + } + break; default: WINE_FIXME("??? %u\n", GET_SHORT(format, 0)); break;
1
0
0
0
Eric Pouech : winhelp: Properly decode the keep bit in paragraph style.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 666bf7b8925e52186477ab5ac2db4427bf60ca1a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=666bf7b8925e52186477ab5ac…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:22 2008 +0200 winhelp: Properly decode the keep bit in paragraph style. --- programs/winhelp/hlpfile.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index 1f5b735..2230cf6 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -1122,6 +1122,7 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE } /* 0x1000 doesn't need space */ + if ((bits & 0x1000) && !HLPFILE_RtfAddControl(rd, "\\keep")) goto done; if ((bits & 0xE080) != 0) WINE_FIXME("Unsupported bits %04x, potential trouble ahead\n", bits);
1
0
0
0
Eric Pouech : winhelp: Set the borders of a paragraph in richedit.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 3299f1b8694074bd024cdee9691985c6fcdb587b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3299f1b8694074bd024cdee96…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:16 2008 +0200 winhelp: Set the borders of a paragraph in richedit. --- programs/winhelp/hlpfile.c | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index cbac2c3..1f5b735 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -1067,7 +1067,28 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE sprintf(tmp, "\\fi%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } - if (bits & 0x0100) format += 3; + if (bits & 0x0100) + { + BYTE brdr = *format++; + short w; + + if (brdr & 0x01 && !HLPFILE_RtfAddControl(rd, "\\box")) goto done; + if (brdr & 0x02 && !HLPFILE_RtfAddControl(rd, "\\brdrt")) goto done; + if (brdr & 0x04 && !HLPFILE_RtfAddControl(rd, "\\brdrl")) goto done; + if (brdr & 0x08 && !HLPFILE_RtfAddControl(rd, "\\brdrb")) goto done; + if (brdr & 0x10 && !HLPFILE_RtfAddControl(rd, "\\brdrr")) goto done; + if (brdr & 0x20 && !HLPFILE_RtfAddControl(rd, "\\brdrth")) goto done; + if (!(brdr & 0x20) && !HLPFILE_RtfAddControl(rd, "\\brdrs")) goto done; + if (brdr & 0x40 && !HLPFILE_RtfAddControl(rd, "\\brdrdb")) goto done; + /* 0x80: unknown */ + + w = GET_SHORT(format, 0); format += 2; + if (w) + { + sprintf(tmp, "\\brdrw%d", HLPFILE_HalfPointsToTwips(w)); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + } if (bits & 0x0200) { int i, ntab = fetch_short(&format);
1
0
0
0
Eric Pouech : winhelp: Set the alignment of paragraph in richedit.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 300fa962452985e8e2775867d36c92423fc9bb98 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=300fa962452985e8e2775867d…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:10 2008 +0200 winhelp: Set the alignment of paragraph in richedit. --- programs/winhelp/hlpfile.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index cf9ab0b..cbac2c3 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -1092,7 +1092,15 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; } } - /* 0x0400, 0x0800 and 0x1000 don't need space */ + switch (bits & 0xc00) + { + default: WINE_FIXME("Unsupported alignment 0xC00\n"); break; + case 0: if (!HLPFILE_RtfAddControl(rd, "\\ql")) goto done; break; + case 0x400: if (!HLPFILE_RtfAddControl(rd, "\\qr")) goto done; break; + case 0x800: if (!HLPFILE_RtfAddControl(rd, "\\qc")) goto done; break; + } + + /* 0x1000 doesn't need space */ if ((bits & 0xE080) != 0) WINE_FIXME("Unsupported bits %04x, potential trouble ahead\n", bits);
1
0
0
0
Eric Pouech : winhelp: Added support for paragraph information.
by Alexandre Julliard
25 Apr '08
25 Apr '08
Module: wine Branch: master Commit: 26de7ddcd46172d5152ce970da6c77b86e2a923c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26de7ddcd46172d5152ce970d…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Thu Apr 24 22:06:05 2008 +0200 winhelp: Added support for paragraph information. --- programs/winhelp/hlpfile.c | 36 ++++++++++++++++++++++++++++++------ 1 files changed, 30 insertions(+), 6 deletions(-) diff --git a/programs/winhelp/hlpfile.c b/programs/winhelp/hlpfile.c index 3e85dc3..cf9ab0b 100644 --- a/programs/winhelp/hlpfile.c +++ b/programs/winhelp/hlpfile.c @@ -1037,12 +1037,36 @@ static BOOL HLPFILE_BrowseParagraph(HLPFILE_PAGE* page, struct RtfData* rd, BYTE format += 4; bits = GET_USHORT(format, 0); format += 2; if (bits & 0x0001) fetch_long(&format); - if (bits & 0x0002) fetch_short(&format); - if (bits & 0x0004) fetch_short(&format); - if (bits & 0x0008) fetch_short(&format); - if (bits & 0x0010) fetch_short(&format); - if (bits & 0x0020) fetch_short(&format); - if (bits & 0x0040) fetch_short(&format); + if (bits & 0x0002) + { + sprintf(tmp, "\\sb%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (bits & 0x0004) + { + sprintf(tmp, "\\sa%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (bits & 0x0008) + { + sprintf(tmp, "\\sl%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (bits & 0x0010) + { + sprintf(tmp, "\\li%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (bits & 0x0020) + { + sprintf(tmp, "\\ri%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } + if (bits & 0x0040) + { + sprintf(tmp, "\\fi%d", HLPFILE_HalfPointsToTwips(fetch_short(&format))); + if (!HLPFILE_RtfAddControl(rd, tmp)) goto done; + } if (bits & 0x0100) format += 3; if (bits & 0x0200) {
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
128
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Results per page:
10
25
50
100
200