Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
f9c875dd
Commit
f9c875dd
authored
Apr 02, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Fixed status text cache implementation.
parent
2d206abe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
main.c
dlls/mshtml/main.c
+14
-15
resource.h
dlls/mshtml/resource.h
+4
-3
No files found.
dlls/mshtml/main.c
View file @
f9c875dd
...
...
@@ -49,7 +49,7 @@ DWORD mshtml_tls = TLS_OUT_OF_INDEXES;
static
HINSTANCE
shdoclc
=
NULL
;
static
HDC
display_dc
;
static
LPWSTR
status_strings
[
NUM_STATUS_STRINGS
];
static
WCHAR
*
status_strings
[
IDS_STATUS_LAST
-
IDS_STATUS_FIRST
+
1
];
static
void
thread_detach
(
void
)
{
...
...
@@ -68,7 +68,7 @@ static void thread_detach(void)
static
void
free_strings
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
NUM_STATUS_STRINGS
;
i
++
)
for
(
i
=
0
;
i
<
sizeof
(
status_strings
)
/
sizeof
(
*
status_strings
)
;
i
++
)
heap_free
(
status_strings
[
i
]);
}
...
...
@@ -89,30 +89,29 @@ static void process_detach(void)
void
set_statustext
(
HTMLDocumentObj
*
doc
,
INT
id
,
LPCWSTR
arg
)
{
int
index
=
id
-
IDS_STATUS_DONE
;
LPWSTR
p
=
status_strings
[
index
];
int
index
=
id
-
IDS_STATUS_FIRST
;
WCHAR
*
p
=
status_strings
[
index
];
DWORD
len
;
if
(
!
doc
->
frame
)
return
;
if
(
!
p
)
{
DWORD
len
=
255
;
if
(
!
p
)
{
len
=
255
;
p
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
len
=
LoadStringW
(
hInst
,
id
,
p
,
len
);
len
++
;
len
=
LoadStringW
(
hInst
,
id
,
p
,
len
)
+
1
;
p
=
heap_realloc
(
p
,
len
*
sizeof
(
WCHAR
));
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
status_strings
[
index
],
p
,
NULL
))
{
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
status_strings
[
index
],
p
,
NULL
))
{
heap_free
(
p
);
p
=
status_strings
[
index
];
}
}
if
(
arg
)
{
DWORD
len
=
lstrlenW
(
p
)
+
lstrlenW
(
arg
)
-
1
;
LPWSTR
buf
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
if
(
arg
)
{
WCHAR
*
buf
;
len
=
lstrlenW
(
p
)
+
lstrlenW
(
arg
)
-
1
;
buf
=
heap_alloc
(
len
*
sizeof
(
WCHAR
));
snprintfW
(
buf
,
len
,
p
,
arg
);
...
...
dlls/mshtml/resource.h
View file @
f9c875dd
...
...
@@ -23,9 +23,10 @@
#define IDS_HTMLDISABLED 7500
#define IDS_HTMLDOCUMENT 7501
#define NUM_STATUS_STRINGS 2
#define IDS_STATUS_DOWNLOADINGFROM 7550
#define IDS_STATUS_DONE 7551
#define IDS_STATUS_FIRST 7550
#define IDS_STATUS_DOWNLOADINGFROM IDS_STATUS_FIRST
#define IDS_STATUS_DONE (IDS_STATUS_FIRST+1)
#define IDS_STATUS_LAST IDS_STATUS_DONE
#define ID_PROMPT_DIALOG 7700
#define ID_PROMPT_PROMPT 7701
...
...
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