Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
de6f347b
Commit
de6f347b
authored
Feb 10, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
551f97c7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
33 deletions
+32
-33
Makefile.in
dlls/hhctrl.ocx/Makefile.in
+0
-1
chm.c
dlls/hhctrl.ocx/chm.c
+19
-19
help.c
dlls/hhctrl.ocx/help.c
+4
-4
hhctrl.c
dlls/hhctrl.ocx/hhctrl.c
+3
-3
search.c
dlls/hhctrl.ocx/search.c
+3
-3
webbrowser.c
dlls/hhctrl.ocx/webbrowser.c
+3
-3
No files found.
dlls/hhctrl.ocx/Makefile.in
View file @
de6f347b
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
hhctrl.ocx
IMPORTLIB
=
htmlhelp
IMPORTS
=
uuid advapi32 comctl32 shlwapi ole32 oleaut32 user32 gdi32
...
...
dlls/hhctrl.ocx/chm.c
View file @
de6f347b
...
...
@@ -55,7 +55,7 @@ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset)
pos
.
QuadPart
=
offset
&
~
BLOCK_MASK
;
hres
=
IStream_Seek
(
chm
->
strings_stream
,
pos
,
STREAM_SEEK_SET
,
NULL
);
if
(
FAILED
(
hres
))
{
WARN
(
"Seek failed: %08x
\n
"
,
hres
);
WARN
(
"Seek failed: %08
l
x
\n
"
,
hres
);
return
NULL
;
}
...
...
@@ -64,7 +64,7 @@ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset)
hres
=
IStream_Read
(
chm
->
strings_stream
,
chm
->
strings
[
offset
>>
BLOCK_BITS
],
BLOCK_SIZE
,
&
read
);
if
(
FAILED
(
hres
))
{
WARN
(
"Read failed: %08x
\n
"
,
hres
);
WARN
(
"Read failed: %08
l
x
\n
"
,
hres
);
heap_free
(
chm
->
strings
[
offset
>>
BLOCK_BITS
]);
chm
->
strings
[
offset
>>
BLOCK_BITS
]
=
NULL
;
return
NULL
;
...
...
@@ -72,7 +72,7 @@ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset)
}
str
=
chm
->
strings
[
offset
>>
BLOCK_BITS
]
+
(
offset
&
BLOCK_MASK
);
TRACE
(
"offset %#x => %s
\n
"
,
offset
,
debugstr_a
(
str
));
TRACE
(
"offset %#
l
x => %s
\n
"
,
offset
,
debugstr_a
(
str
));
return
str
;
}
...
...
@@ -92,12 +92,12 @@ static BOOL ReadChmSystem(CHMInfo *chm)
hres
=
IStorage_OpenStream
(
chm
->
pStorage
,
wszSYSTEM
,
NULL
,
STGM_READ
,
0
,
&
stream
);
if
(
FAILED
(
hres
))
{
WARN
(
"Could not open #SYSTEM stream: %08x
\n
"
,
hres
);
WARN
(
"Could not open #SYSTEM stream: %08
l
x
\n
"
,
hres
);
return
FALSE
;
}
IStream_Read
(
stream
,
&
ver
,
sizeof
(
ver
),
&
read
);
TRACE
(
"version is %x
\n
"
,
ver
);
TRACE
(
"version is %
l
x
\n
"
,
ver
);
buf
=
heap_alloc
(
8
*
sizeof
(
DWORD
));
buf_size
=
8
*
sizeof
(
DWORD
);
...
...
@@ -132,7 +132,7 @@ static BOOL ReadChmSystem(CHMInfo *chm)
break
;
case
0x4
:
/* TODO: Currently only the Locale ID is loaded from this field */
TRACE
(
"Locale is: %d
\n
"
,
*
(
LCID
*
)
&
buf
[
0
]);
TRACE
(
"Locale is: %
l
d
\n
"
,
*
(
LCID
*
)
&
buf
[
0
]);
if
(
!
GetLocaleInfoW
(
*
(
LCID
*
)
&
buf
[
0
],
LOCALE_IDEFAULTANSICODEPAGE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
chm
->
codePage
,
sizeof
(
chm
->
codePage
)
/
sizeof
(
WCHAR
)))
chm
->
codePage
=
CP_ACP
;
...
...
@@ -150,13 +150,13 @@ static BOOL ReadChmSystem(CHMInfo *chm)
TRACE
(
"Version is %s
\n
"
,
debugstr_an
(
buf
,
entry
.
len
));
break
;
case
0xa
:
TRACE
(
"Time is %08x
\n
"
,
*
(
DWORD
*
)
buf
);
TRACE
(
"Time is %08
l
x
\n
"
,
*
(
DWORD
*
)
buf
);
break
;
case
0xc
:
TRACE
(
"Number of info types: %d
\n
"
,
*
(
DWORD
*
)
buf
);
TRACE
(
"Number of info types: %
l
d
\n
"
,
*
(
DWORD
*
)
buf
);
break
;
case
0xf
:
TRACE
(
"Check sum: %x
\n
"
,
*
(
DWORD
*
)
buf
);
TRACE
(
"Check sum: %
l
x
\n
"
,
*
(
DWORD
*
)
buf
);
break
;
default:
TRACE
(
"unhandled code %x, size %x
\n
"
,
entry
.
code
,
entry
.
len
);
...
...
@@ -181,13 +181,13 @@ LPWSTR FindContextAlias(CHMInfo *chm, DWORD index)
hres
=
IStorage_OpenStream
(
chm
->
pStorage
,
wszIVB
,
NULL
,
STGM_READ
,
0
,
&
ivb_stream
);
if
(
FAILED
(
hres
))
{
WARN
(
"Could not open #IVB stream: %08x
\n
"
,
hres
);
WARN
(
"Could not open #IVB stream: %08
l
x
\n
"
,
hres
);
return
NULL
;
}
hres
=
IStream_Read
(
ivb_stream
,
&
size
,
sizeof
(
size
),
&
read
);
if
(
FAILED
(
hres
))
{
WARN
(
"Read failed: %08x
\n
"
,
hres
);
WARN
(
"Read failed: %08
l
x
\n
"
,
hres
);
IStream_Release
(
ivb_stream
);
return
NULL
;
}
...
...
@@ -196,7 +196,7 @@ LPWSTR FindContextAlias(CHMInfo *chm, DWORD index)
hres
=
IStream_Read
(
ivb_stream
,
buf
,
size
,
&
read
);
IStream_Release
(
ivb_stream
);
if
(
FAILED
(
hres
))
{
WARN
(
"Read failed: %08x
\n
"
,
hres
);
WARN
(
"Read failed: %08
l
x
\n
"
,
hres
);
heap_free
(
buf
);
return
NULL
;
}
...
...
@@ -261,7 +261,7 @@ void MergeChmProperties(HH_WINTYPEW *src, HHInfo *info, BOOL override)
DWORD
merge
=
override
?
src
->
fsValidMembers
:
src
->
fsValidMembers
&
~
dst
->
fsValidMembers
;
if
(
unhandled_params
)
FIXME
(
"Unsupported fsValidMembers fields: 0x%x
\n
"
,
unhandled_params
);
FIXME
(
"Unsupported fsValidMembers fields: 0x%
l
x
\n
"
,
unhandled_params
);
dst
->
fsValidMembers
|=
merge
;
if
(
dst
->
cbStruct
==
0
)
...
...
@@ -543,7 +543,7 @@ IStream *GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file)
chm_file
->
chm_file
?
chm_file
->
chm_file
:
parent_chm
,
NULL
,
STGM_READ
|
STGM_SHARE_DENY_WRITE
,
NULL
,
0
,
&
storage
);
if
(
FAILED
(
hres
))
{
WARN
(
"Could not open storage: %08x
\n
"
,
hres
);
WARN
(
"Could not open storage: %08
l
x
\n
"
,
hres
);
return
NULL
;
}
}
else
{
...
...
@@ -554,7 +554,7 @@ IStream *GetChmStream(CHMInfo *info, LPCWSTR parent_chm, ChmPath *chm_file)
hres
=
IStorage_OpenStream
(
storage
,
chm_file
->
chm_index
,
NULL
,
STGM_READ
,
0
,
&
stream
);
IStorage_Release
(
storage
);
if
(
FAILED
(
hres
))
WARN
(
"Could not open stream: %08x
\n
"
,
hres
);
WARN
(
"Could not open stream: %08
l
x
\n
"
,
hres
);
return
stream
;
}
...
...
@@ -583,7 +583,7 @@ WCHAR *GetDocumentTitle(CHMInfo *info, LPCWSTR document)
hres
=
IStorage_OpenStream
(
storage
,
document
,
NULL
,
STGM_READ
,
0
,
&
str
);
IStorage_Release
(
storage
);
if
(
FAILED
(
hres
))
WARN
(
"Could not open stream: %08x
\n
"
,
hres
);
WARN
(
"Could not open stream: %08
l
x
\n
"
,
hres
);
stream_init
(
&
stream
,
str
);
strbuf_init
(
&
node
);
...
...
@@ -635,20 +635,20 @@ CHMInfo *OpenCHM(LPCWSTR szFile)
hres
=
CoCreateInstance
(
&
CLSID_ITStorage
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IITStorage
,
(
void
**
)
&
ret
->
pITStorage
)
;
if
(
FAILED
(
hres
))
{
WARN
(
"Could not create ITStorage: %08x
\n
"
,
hres
);
WARN
(
"Could not create ITStorage: %08
l
x
\n
"
,
hres
);
return
CloseCHM
(
ret
);
}
hres
=
IITStorage_StgOpenStorage
(
ret
->
pITStorage
,
szFile
,
NULL
,
STGM_READ
|
STGM_SHARE_DENY_WRITE
,
NULL
,
0
,
&
ret
->
pStorage
);
if
(
FAILED
(
hres
))
{
WARN
(
"Could not open storage: %08x
\n
"
,
hres
);
WARN
(
"Could not open storage: %08
l
x
\n
"
,
hres
);
return
CloseCHM
(
ret
);
}
hres
=
IStorage_OpenStream
(
ret
->
pStorage
,
wszSTRINGS
,
NULL
,
STGM_READ
,
0
,
&
ret
->
strings_stream
);
if
(
FAILED
(
hres
))
{
WARN
(
"Could not open #STRINGS stream: %08x
\n
"
,
hres
);
WARN
(
"Could not open #STRINGS stream: %08
l
x
\n
"
,
hres
);
/* It's not critical, so we pass */
}
...
...
dlls/hhctrl.ocx/help.c
View file @
de6f347b
...
...
@@ -201,7 +201,7 @@ static HRESULT navigate_url(HHInfo *info, LPCWSTR surl)
VariantClear
(
&
url
);
if
(
FAILED
(
hres
))
TRACE
(
"Navigation failed: %08x
\n
"
,
hres
);
TRACE
(
"Navigation failed: %08
l
x
\n
"
,
hres
);
return
hres
;
}
...
...
@@ -242,7 +242,7 @@ static BOOL AppendFullPathURL(LPCWSTR file, LPWSTR buf, LPCWSTR index)
TRACE
(
"%s %p %s
\n
"
,
debugstr_w
(
file
),
buf
,
debugstr_w
(
index
));
if
(
!
GetFullPathNameW
(
file
,
ARRAY_SIZE
(
full_path
),
full_path
,
NULL
))
{
WARN
(
"GetFullPathName failed: %u
\n
"
,
GetLastError
());
WARN
(
"GetFullPathName failed: %
l
u
\n
"
,
GetLastError
());
return
FALSE
;
}
...
...
@@ -272,7 +272,7 @@ static void DoSync(HHInfo *info)
if
(
FAILED
(
hres
))
{
WARN
(
"get_LocationURL failed: %08x
\n
"
,
hres
);
WARN
(
"get_LocationURL failed: %08
l
x
\n
"
,
hres
);
return
;
}
...
...
@@ -954,7 +954,7 @@ static void TB_AddButtonsFromFlags(HHInfo *pHHInfo, TBBUTTON *pButtons, DWORD dw
HHWIN_BUTTON_FAVORITES
|
HHWIN_BUTTON_JUMP1
|
HHWIN_BUTTON_JUMP2
|
HHWIN_BUTTON_ZOOM
|
HHWIN_BUTTON_TOC_NEXT
|
HHWIN_BUTTON_TOC_PREV
);
if
(
unsupported
)
FIXME
(
"got asked for unsupported buttons: %06x
\n
"
,
unsupported
);
FIXME
(
"got asked for unsupported buttons: %06
l
x
\n
"
,
unsupported
);
if
(
dwButtonFlags
&
HHWIN_BUTTON_EXPAND
)
{
...
...
dlls/hhctrl.ocx/hhctrl.c
View file @
de6f347b
...
...
@@ -44,7 +44,7 @@ BOOL hh_process = FALSE;
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstance
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
TRACE
(
"(%p,%d,%p)
\n
"
,
hInstance
,
fdwReason
,
lpvReserved
);
TRACE
(
"(%p,%
l
d,%p)
\n
"
,
hInstance
,
fdwReason
,
lpvReserved
);
switch
(
fdwReason
)
{
...
...
@@ -158,7 +158,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
{
WCHAR
fullname
[
MAX_PATH
];
TRACE
(
"(%p, %s, command=%s, data=%
l
x)
\n
"
,
TRACE
(
"(%p, %s, command=%s, data=%
I
x)
\n
"
,
caller
,
debugstr_w
(
filename
),
command_to_string
(
command
),
data
);
...
...
@@ -345,7 +345,7 @@ HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD_PTR dat
else
heap_free
(
window
);
TRACE
(
"Changing WINTYPE, fsValidMembers=0x%x
\n
"
,
wintype
->
fsValidMembers
);
TRACE
(
"Changing WINTYPE, fsValidMembers=0x%
l
x
\n
"
,
wintype
->
fsValidMembers
);
MergeChmProperties
(
wintype
,
info
,
TRUE
);
UpdateHelpWindow
(
info
);
...
...
dlls/hhctrl.ocx/search.c
View file @
de6f347b
...
...
@@ -83,7 +83,7 @@ static WCHAR *SearchCHM_File(IStorage *pStorage, const WCHAR *file, const char *
hres
=
IStorage_OpenStream
(
pStorage
,
file
,
NULL
,
STGM_READ
,
0
,
&
temp_stream
);
if
(
FAILED
(
hres
))
{
FIXME
(
"Could not open '%s' stream: %08x
\n
"
,
debugstr_w
(
file
),
hres
);
FIXME
(
"Could not open '%s' stream: %08
l
x
\n
"
,
debugstr_w
(
file
),
hres
);
goto
cleanup
;
}
...
...
@@ -162,7 +162,7 @@ static SearchItem *SearchCHM_Storage(SearchItem *item, IStorage *pStorage,
hres
=
IStorage_EnumElements
(
pStorage
,
0
,
NULL
,
0
,
&
elem
);
if
(
hres
!=
S_OK
)
{
FIXME
(
"Could not enumerate '/' storage elements: %08x
\n
"
,
hres
);
FIXME
(
"Could not enumerate '/' storage elements: %08
l
x
\n
"
,
hres
);
return
NULL
;
}
while
(
IEnumSTATSTG_Next
(
elem
,
1
,
&
entries
,
&
retr
)
==
NOERROR
)
...
...
@@ -206,7 +206,7 @@ static SearchItem *SearchCHM_Folder(SearchItem *item, IStorage *pStorage,
hres
=
IStorage_OpenStorage
(
pStorage
,
folder
,
NULL
,
STGM_READ
,
NULL
,
0
,
&
temp_storage
);
if
(
FAILED
(
hres
))
{
FIXME
(
"Could not open '%s' storage object: %08x
\n
"
,
debugstr_w
(
folder
),
hres
);
FIXME
(
"Could not open '%s' storage object: %08
l
x
\n
"
,
debugstr_w
(
folder
),
hres
);
return
NULL
;
}
item
=
SearchCHM_Storage
(
item
,
temp_storage
,
needle
);
...
...
dlls/hhctrl.ocx/webbrowser.c
View file @
de6f347b
...
...
@@ -64,7 +64,7 @@ static ULONG STDMETHODCALLTYPE Site_AddRef(IOleClientSite *iface)
WebBrowserContainer
*
This
=
impl_from_IOleClientSite
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%
l
d
\n
"
,
This
,
ref
);
return
ref
;
}
...
...
@@ -74,7 +74,7 @@ static ULONG STDMETHODCALLTYPE Site_Release(IOleClientSite *iface)
WebBrowserContainer
*
This
=
impl_from_IOleClientSite
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
TRACE
(
"(%p) ref=%
l
d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
ole_obj
)
...
...
@@ -164,7 +164,7 @@ static HRESULT STDMETHODCALLTYPE UI_ShowContextMenu(IDocHostUIHandler *iface, DW
DWORD
cmdid
,
menu_id
=
0
;
HMENU
menu
,
submenu
;
TRACE
(
"(%p)->(%d %s)
\n
"
,
This
,
dwID
,
wine_dbgstr_point
(
ppt
));
TRACE
(
"(%p)->(%
l
d %s)
\n
"
,
This
,
dwID
,
wine_dbgstr_point
(
ppt
));
menu
=
LoadMenuW
(
hhctrl_hinstance
,
MAKEINTRESOURCEW
(
MENU_WEBBROWSER
));
if
(
!
menu
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment