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
537bcadb
Commit
537bcadb
authored
Sep 07, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Sep 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintab32: Use CRT allocation functions.
parent
6dae924d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
context.c
dlls/wintab32/context.c
+7
-8
No files found.
dlls/wintab32/context.c
View file @
537bcadb
...
@@ -423,10 +423,10 @@ static UINT WTInfoT(UINT wCategory, UINT nIndex, LPVOID lpOutput, BOOL bUnicode)
...
@@ -423,10 +423,10 @@ static UINT WTInfoT(UINT wCategory, UINT nIndex, LPVOID lpOutput, BOOL bUnicode)
else
if
(
is_string_field
(
wCategory
,
nIndex
)
&&
!
bUnicode
)
else
if
(
is_string_field
(
wCategory
,
nIndex
)
&&
!
bUnicode
)
{
{
int
size
=
pWTInfoW
(
wCategory
,
nIndex
,
NULL
);
int
size
=
pWTInfoW
(
wCategory
,
nIndex
,
NULL
);
WCHAR
*
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
WCHAR
*
buf
=
malloc
(
size
);
pWTInfoW
(
wCategory
,
nIndex
,
buf
);
pWTInfoW
(
wCategory
,
nIndex
,
buf
);
result
=
WideCharToMultiByte
(
CP_ACP
,
0
,
buf
,
size
/
sizeof
(
WCHAR
),
lpOutput
,
lpOutput
?
2
*
size
:
0
,
NULL
,
NULL
);
result
=
WideCharToMultiByte
(
CP_ACP
,
0
,
buf
,
size
/
sizeof
(
WCHAR
),
lpOutput
,
lpOutput
?
2
*
size
:
0
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
free
(
buf
);
}
}
else
else
result
=
pWTInfoW
(
wCategory
,
nIndex
,
lpOutput
);
result
=
pWTInfoW
(
wCategory
,
nIndex
,
lpOutput
);
...
@@ -464,13 +464,13 @@ HCTX WINAPI WTOpenW(HWND hWnd, LPLOGCONTEXTW lpLogCtx, BOOL fEnable)
...
@@ -464,13 +464,13 @@ HCTX WINAPI WTOpenW(HWND hWnd, LPLOGCONTEXTW lpLogCtx, BOOL fEnable)
TRACE
(
"hWnd=%p, lpLogCtx=%p, fEnable=%u
\n
"
,
hWnd
,
lpLogCtx
,
fEnable
);
TRACE
(
"hWnd=%p, lpLogCtx=%p, fEnable=%u
\n
"
,
hWnd
,
lpLogCtx
,
fEnable
);
DUMPCONTEXT
(
*
lpLogCtx
);
DUMPCONTEXT
(
*
lpLogCtx
);
newcontext
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
OPENCONTEXT
));
newcontext
=
malloc
(
sizeof
(
OPENCONTEXT
));
newcontext
->
context
=
*
lpLogCtx
;
newcontext
->
context
=
*
lpLogCtx
;
newcontext
->
hwndOwner
=
hWnd
;
newcontext
->
hwndOwner
=
hWnd
;
newcontext
->
ActiveCursor
=
-
1
;
newcontext
->
ActiveCursor
=
-
1
;
newcontext
->
QueueSize
=
10
;
newcontext
->
QueueSize
=
10
;
newcontext
->
PacketsQueued
=
0
;
newcontext
->
PacketsQueued
=
0
;
newcontext
->
PacketQueue
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WTPACKET
)
*
10
);
newcontext
->
PacketQueue
=
malloc
(
sizeof
(
WTPACKET
)
*
10
);
EnterCriticalSection
(
&
csTablet
);
EnterCriticalSection
(
&
csTablet
);
newcontext
->
handle
=
gTopContext
++
;
newcontext
->
handle
=
gTopContext
++
;
...
@@ -547,8 +547,8 @@ BOOL WINAPI WTClose(HCTX hCtx)
...
@@ -547,8 +547,8 @@ BOOL WINAPI WTClose(HCTX hCtx)
TABLET_PostTabletMessage
(
context
,
_WT_CTXCLOSE
(
context
->
context
.
lcMsgBase
),
(
WPARAM
)
context
->
handle
,
TABLET_PostTabletMessage
(
context
,
_WT_CTXCLOSE
(
context
->
context
.
lcMsgBase
),
(
WPARAM
)
context
->
handle
,
context
->
context
.
lcStatus
,
TRUE
);
context
->
context
.
lcStatus
,
TRUE
);
HeapFree
(
GetProcessHeap
(),
0
,
context
->
PacketQueue
);
free
(
context
->
PacketQueue
);
HeapFree
(
GetProcessHeap
(),
0
,
context
);
free
(
context
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -1124,8 +1124,7 @@ BOOL WINAPI WTQueueSizeSet(HCTX hCtx, int nPkts)
...
@@ -1124,8 +1124,7 @@ BOOL WINAPI WTQueueSizeSet(HCTX hCtx, int nPkts)
return
FALSE
;
return
FALSE
;
}
}
context
->
PacketQueue
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
context
->
PacketQueue
=
realloc
(
context
->
PacketQueue
,
sizeof
(
WTPACKET
)
*
nPkts
);
context
->
PacketQueue
,
sizeof
(
WTPACKET
)
*
nPkts
);
context
->
QueueSize
=
nPkts
;
context
->
QueueSize
=
nPkts
;
LeaveCriticalSection
(
&
csTablet
);
LeaveCriticalSection
(
&
csTablet
);
...
...
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