Author: winesync Date: Fri Jul 27 13:34:02 2007 New Revision: 27906
URL: http://svn.reactos.org/svn/reactos?rev=27906&view=rev Log: Autosyncing with Wine HEAD
Modified: trunk/reactos/dll/win32/hhctrl.ocx/Ko.rc trunk/reactos/dll/win32/hhctrl.ocx/No.rc trunk/reactos/dll/win32/hhctrl.ocx/chm.c (props changed) trunk/reactos/dll/win32/hhctrl.ocx/content.c (contents, props changed) trunk/reactos/dll/win32/hhctrl.ocx/help.c (props changed) trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c (contents, props changed) trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.h (contents, props changed) trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild (contents, props changed) trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.spec (props changed) trunk/reactos/dll/win32/hhctrl.ocx/regsvr.c (props changed) trunk/reactos/dll/win32/hhctrl.ocx/resource.h (props changed) trunk/reactos/dll/win32/hhctrl.ocx/version.rc (props changed) trunk/reactos/dll/win32/hhctrl.ocx/webbrowser.c (props changed)
Modified: trunk/reactos/dll/win32/hhctrl.ocx/Ko.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/Ko.rc?... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/Ko.rc (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/Ko.rc Fri Jul 27 13:34:02 2007 @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT +LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
STRINGTABLE BEGIN
Modified: trunk/reactos/dll/win32/hhctrl.ocx/No.rc URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/No.rc?... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/No.rc (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/No.rc Fri Jul 27 13:34:02 2007 @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL +LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
STRINGTABLE BEGIN
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/chm.c ------------------------------------------------------------------------------ svn:eol-style = native
Modified: trunk/reactos/dll/win32/hhctrl.ocx/content.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/conten... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/content.c (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/content.c Fri Jul 27 13:34:02 2007 @@ -32,6 +32,24 @@ INSERT_CHILD } insert_type_t;
+static void free_content_item(ContentItem *item) +{ + ContentItem *next; + + while(item) { + next = item->next; + + free_content_item(item->child); + + hhctrl_free(item->name); + hhctrl_free(item->local); + hhctrl_free(item->merge.chm_file); + hhctrl_free(item->merge.chm_index); + + item = next; + } +} + typedef struct { char *buf; int size; @@ -206,6 +224,9 @@ { if(!item) return new_item; + + if(!new_item) + return item;
switch(insert_type) { case INSERT_NEXT: @@ -265,6 +286,11 @@ }else { WARN("Could not get %s::%s stream\n", debugstr_w(item->merge.chm_file), debugstr_w(item->merge.chm_file)); + + if(!item->name) { + free_content_item(item); + item = NULL; + } }
} @@ -411,24 +437,6 @@ fill_content_tree(info->tabs[TAB_CONTENTS].hwnd, NULL, info->content); }
-static void free_content_item(ContentItem *item) -{ - ContentItem *next; - - while(item) { - next = item->next; - - free_content_item(item->child); - - hhctrl_free(item->name); - hhctrl_free(item->local); - hhctrl_free(item->merge.chm_file); - hhctrl_free(item->merge.chm_index); - - item = next; - } -} - void ReleaseContent(HHInfo *info) { free_content_item(info->content);
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/content.c ------------------------------------------------------------------------------ svn:eol-style = native
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/help.c ------------------------------------------------------------------------------ svn:eol-style = native
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 (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c Fri Jul 27 13:34:02 2007 @@ -78,6 +78,7 @@ X( HH_SET_EXCLUSIVE_FILTER ); X( HH_INITIALIZE ); X( HH_UNINITIALIZE ); + X( HH_SAFE_DISPLAY_TOPIC ); X( HH_PRETRANSLATEMESSAGE ); X( HH_SET_GLOBAL_PROPERTY ); default: return "???"; @@ -86,11 +87,11 @@ }
/****************************************************************** - * HtmlHelpW (hhctrl.ocx.15) - */ -HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD data) -{ - TRACE("(%p, %s, command=%s, data=%d)\n", + * HtmlHelpW (HHCTRL.OCX.15) + */ +HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR data) +{ + TRACE("(%p, %s, command=%s, data=%lx)\n", caller, debugstr_w( filename ), command_to_string( command ), data);
@@ -99,16 +100,37 @@ case HH_DISPLAY_TOPIC: case HH_DISPLAY_TOC: case HH_DISPLAY_SEARCH:{ + static const WCHAR delimW[] = {':',':',0}; HHInfo *info; BOOL res; + WCHAR chm_file[MAX_PATH]; + const WCHAR *index;
FIXME("Not all HH cases handled correctly\n");
+ index = strstrW(filename, delimW); + if (index) + { + memcpy(chm_file, filename, (index-filename)*sizeof(WCHAR)); + chm_file[index-filename] = 0; + filename = chm_file; + } + else + { + if (command!=HH_DISPLAY_SEARCH) /* FIXME - use HH_FTS_QUERYW structure in data */ + index = (const WCHAR*)data; + } + info = CreateHelpViewer(filename);
- res = NavigateToChm(info, info->pCHMInfo->szFile, info->WinType.pszFile); - if(!res) - ReleaseHelpViewer(info); + if (info) + { + if (!index) + index = info->WinType.pszFile; + res = NavigateToChm(info, info->pCHMInfo->szFile, index); + if(!res) + ReleaseHelpViewer(info); + }
return NULL; /* FIXME */ } @@ -137,29 +159,71 @@ }
/****************************************************************** - * HtmlHelpA (hhctrl.ocx.14) - */ -HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD data) -{ - WCHAR *wfile = NULL; + * HtmlHelpA (HHCTRL.OCX.14) + */ +HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD_PTR data) +{ + WCHAR *wfile = NULL, *wdata = NULL; + DWORD len; HWND result;
if (filename) { - DWORD len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 ); - + len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 ); wfile = hhctrl_alloc(len*sizeof(WCHAR)); MultiByteToWideChar( CP_ACP, 0, filename, -1, wfile, len ); }
- result = HtmlHelpW( caller, wfile, command, data ); + if (data) + { + switch(command) + { + case HH_ALINK_LOOKUP: + case HH_DISPLAY_SEARCH: + case HH_DISPLAY_TEXT_POPUP: + case HH_GET_LAST_ERROR: + case HH_GET_WIN_TYPE: + case HH_KEYWORD_LOOKUP: + case HH_SET_WIN_TYPE: + case HH_SYNC: + FIXME("structures not handled yet\n"); + break; + + case HH_DISPLAY_INDEX: + case HH_DISPLAY_TOPIC: + case HH_DISPLAY_TOC: + case HH_GET_WIN_HANDLE: + case HH_SAFE_DISPLAY_TOPIC: + len = MultiByteToWideChar( CP_ACP, 0, (const char*)data, -1, NULL, 0 ); + wdata = hhctrl_alloc(len*sizeof(WCHAR)); + MultiByteToWideChar( CP_ACP, 0, (const char*)data, -1, wdata, len ); + break; + + case HH_CLOSE_ALL: + case HH_HELP_CONTEXT: + case HH_INITIALIZE: + case HH_PRETRANSLATEMESSAGE: + case HH_TP_HELP_CONTEXTMENU: + case HH_TP_HELP_WM_HELP: + case HH_UNINITIALIZE: + /* either scalar or pointer to scalar - do nothing */ + break; + + default: + FIXME("Unknown command: %s (%d)\n", command_to_string(command), command); + break; + } + } + + result = HtmlHelpW( caller, wfile, command, wdata ? (DWORD_PTR)wdata : data );
hhctrl_free(wfile); + hhctrl_free(wdata); return result; }
/****************************************************************** - * doWinMain (hhctrl.ocx.13) + * doWinMain (HHCTRL.OCX.13) */ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine) { @@ -180,7 +244,7 @@ }
/****************************************************************** - * DllGetClassObject (hhctrl.ocx.@) + * DllGetClassObject (HHCTRL.OCX.@) */ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.c ------------------------------------------------------------------------------ svn:eol-style = native
Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctrl... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.h (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.h Fri Jul 27 13:34:02 2007 @@ -38,7 +38,7 @@ #include "initguid.h" #endif
-#include "itss.h" +#include "wine/itss.h" #include "wine/unicode.h"
#define WB_GOBACK 0
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.h ------------------------------------------------------------------------------ svn:eol-style = native
Modified: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/hhctrl.ocx/hhctrl... ============================================================================== --- trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild (original) +++ trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild Fri Jul 27 13:34:02 2007 @@ -1,34 +1,32 @@ -<module name="hhctrl" type="win32ocx" baseaddress="${BASEADDRESS_HHCTRL}" installbase="system32" installname="hhctrl.ocx" usewrc="false" allowwarnings="true"> - <importlibrary definition="hhctrl.ocx.spec.def" /> - <include base="hhctrl">.</include> - <include base="ReactOS">include/reactos/wine</include> - <include base="ReactOS" root="intermediate">include/reactos/wine</include> - <define name="__REACTOS__" /> - <define name="__WINESRC__" /> - <define name="__USE_W32API" /> - <define name="_WIN32_IE">0x600</define> - <define name="_WIN32_WINNT">0x501</define> - <define name="WINVER">0x501</define> - <dependency>wineheaders</dependency> - <library>wine</library> - <library>uuid</library> - <library>kernel32</library> - <library>user32</library> - <library>gdi32</library> - <library>shell32</library> - <library>comctl32</library> - <library>advapi32</library> - <library>gdi32</library> - <library>ntdll</library> - <library>ole32</library> - <library>oleaut32</library> - <library>shlwapi</library> - <file>chm.c</file> - <file>content.c</file> - <file>help.c</file> - <file>hhctrl.c</file> - <file>regsvr.c</file> - <file>webbrowser.c</file> - <file>hhctrl.rc</file> - <file>hhctrl.ocx.spec</file> -</module> +<module name="hhctrl" type="win32ocx" baseaddress="${BASEADDRESS_HHCTRL}" installbase="system32" installname="hhctrl.ocx" allowwarnings="true"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> + <importlibrary definition="hhctrl.ocx.spec.def" /> + <include base="hhctrl">.</include> + <include base="ReactOS">include/reactos/wine</include> + <define name="__REACTOS__" /> + <define name="__WINESRC__" /> + <define name="__USE_W32API" /> + <define name="_WIN32_IE">0x600</define> + <define name="_WIN32_WINNT">0x501</define> + <define name="WINVER">0x501</define> + <library>wine</library> + <library>advapi32</library> + <library>comctl32</library> + <library>shell32</library> + <library>shlwapi</library> + <library>ole32</library> + <library>oleaut32</library> + <library>user32</library> + <library>gdi32</library> + <library>kernel32</library> + <library>uuid</library> + <library>ntdll</library> + <file>chm.c</file> + <file>content.c</file> + <file>help.c</file> + <file>hhctrl.c</file> + <file>regsvr.c</file> + <file>webbrowser.c</file> + <file>hhctrl.rc</file> + <file>hhctrl.ocx.spec</file> +</module>
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.rbuild ------------------------------------------------------------------------------ svn:eol-style = native
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/hhctrl.ocx.spec ------------------------------------------------------------------------------ svn:eol-style = native
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/regsvr.c ------------------------------------------------------------------------------ svn:eol-style = native
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/resource.h ------------------------------------------------------------------------------ svn:eol-style = native
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/version.rc ------------------------------------------------------------------------------ svn:eol-style = native
Propchange: trunk/reactos/dll/win32/hhctrl.ocx/webbrowser.c ------------------------------------------------------------------------------ svn:eol-style = native