[HHCTRL.OCX]

* Sync with Wine 1.7.17.
CORE-8080

svn path=/trunk/; revision=62890
This commit is contained in:
Amine Khaldi 2014-04-22 16:12:47 +00:00
parent f201819ae8
commit ced9742b29
4 changed files with 60 additions and 3 deletions

View file

@ -188,7 +188,20 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
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 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
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;
}

View file

@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep regtypelib
import "unknwn.idl";
import "objidl.idl";
import "oaidl.idl";

View file

@ -105,12 +105,52 @@ BOOL next_content(stream_t *stream, strbuf_t *buf)
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);

View file

@ -75,7 +75,7 @@ reactos/dll/win32/dwmapi # Synced to Wine-1.7.17
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