Author: akhaldi Date: Tue Apr 22 16:12:47 2014 New Revision: 62890
URL: http://svn.reactos.org/svn/reactos?rev=62890&view=rev Log: [HHCTRL.OCX] * Sync with Wine 1.7.17. CORE-8080
Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c trunk/reactos/dll/win32/hhctrl.ocx/hhctrl_tlb.idl trunk/reactos/dll/win32/hhctrl.ocx/stream.c trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctrl... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c [iso-8859-1] Tue Apr 22 16:12:47 2014 @@ -188,7 +188,20 @@ case HH_DISPLAY_TOPIC: case HH_DISPLAY_TOC: if (data) - index = (const WCHAR *)data; + { + static const WCHAR delimW[] = {':',':',0}; + const WCHAR *i = (const WCHAR *)data; + + index = strstrW(i, delimW); + if(index) + { + if(memcmp(info->pCHMInfo->szFile, i, index-i)) + FIXME("Opening a CHM file in the context of another is not supported.\n"); + index += strlenW(delimW); + } + else + index = i; + } break; }
@@ -258,6 +271,8 @@ url = FindContextAlias(info->pCHMInfo, data); if(!url) { + if(!data) /* there may legitimately be no context alias for id 0 */ + return info->WinType.hwndHelp; ReleaseHelpViewer(info); return NULL; }
Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl_tlb.idl URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctrl... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl_tlb.idl [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl_tlb.idl [iso-8859-1] Tue Apr 22 16:12:47 2014 @@ -17,6 +17,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ + +#pragma makedep regtypelib
import "unknwn.idl"; import "objidl.idl";
Modified: trunk/reactos/dll/win32/hhctrl.ocx/stream.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/stream... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/stream.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/stream.c [iso-8859-1] Tue Apr 22 16:12:47 2014 @@ -105,12 +105,52 @@ return TRUE; }
+static BOOL find_node_end(stream_t *stream, strbuf_t *buf) +{ + int tag_count = 0, b = buf->len; + char *p; + + while(1) + { + if(!stream_chr(stream, buf, '>')) + return FALSE; + if(buf->len == 0) + break; + p = &buf->buf[b]; + while((p = memchr(p+1, '"', buf->len-(p-buf->buf))) != NULL) + tag_count++; + b = buf->len; + if(tag_count % 2 != 0) + { + if(!stream_chr(stream, buf, '"')) + return FALSE; + tag_count++; + } + else + break; + } + return TRUE; +} + BOOL next_node(stream_t *stream, strbuf_t *buf) { + strbuf_t tmpbuf; + + /* search through the end of the current node */ + strbuf_init(&tmpbuf); + if(!find_node_end(stream, &tmpbuf)) + { + strbuf_free(&tmpbuf); + return FALSE; + } + strbuf_free(&tmpbuf); + + /* find the beginning of the next node */ if(!stream_chr(stream, NULL, '<')) return FALSE;
- if(!stream_chr(stream, buf, '>')) + /* read out the data of the next node */ + if(!find_node_end(stream, buf)) return FALSE;
strbuf_append(buf, ">", 2);
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=6... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Tue Apr 22 16:12:47 2014 @@ -75,7 +75,7 @@ reactos/dll/win32/faultrep # Synced to Wine-1.7.1 reactos/dll/win32/fusion # Synced to Wine-1.7.1 reactos/dll/win32/gdiplus # Synced to Wine-1.7.17 -reactos/dll/win32/hhctrl.ocx # Synced to Wine-1.7.1 +reactos/dll/win32/hhctrl.ocx # Synced to Wine-1.7.17 reactos/dll/win32/hlink # Synced to Wine-1.7.1 reactos/dll/win32/hnetcfg # Synced to Wine-1.7.1 reactos/dll/win32/httpapi # Synced to Wine-1.7.1