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
e7f8aa7d
Commit
e7f8aa7d
authored
May 13, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
May 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhlp32: Use Win32 APIs instead of strdup().
parent
9df5fc58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
macro.c
programs/winhlp32/macro.c
+11
-3
No files found.
programs/winhlp32/macro.c
View file @
e7f8aa7d
...
...
@@ -47,6 +47,14 @@ static unsigned MACRO_NumLoaded /* = 0 */;
/******* helper functions *******/
static
char
*
StrDup
(
const
char
*
str
)
{
char
*
dst
;
dst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
strcpy
(
dst
,
str
);
return
dst
;
}
static
WINHELP_BUTTON
**
MACRO_LookupButton
(
WINHELP_WINDOW
*
win
,
LPCSTR
name
)
{
WINHELP_BUTTON
**
b
;
...
...
@@ -711,7 +719,7 @@ static void CALLBACK MACRO_RegisterRoutine(LPCSTR dll_name, LPCSTR proc, LPCSTR
else
if
((
dll
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
dll
))))
{
dll
->
hLib
=
hLib
;
dll
->
name
=
strdup
(
dll_name
);
/* FIXME
*/
dll
->
name
=
StrDup
(
dll_name
);
/* FIXME: never freed
*/
dll
->
next
=
Globals
.
dlls
;
Globals
.
dlls
=
dll
;
dll
->
handler
=
(
WINHELP_LDLLHandler
)
GetProcAddress
(
dll
->
hLib
,
"LDLLHandler"
);
...
...
@@ -731,10 +739,10 @@ static void CALLBACK MACRO_RegisterRoutine(LPCSTR dll_name, LPCSTR proc, LPCSTR
size
=
++
MACRO_NumLoaded
*
sizeof
(
struct
MacroDesc
);
if
(
!
MACRO_Loaded
)
MACRO_Loaded
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
else
MACRO_Loaded
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
MACRO_Loaded
,
size
);
MACRO_Loaded
[
MACRO_NumLoaded
-
1
].
name
=
strdup
(
proc
);
/* FIXME
*/
MACRO_Loaded
[
MACRO_NumLoaded
-
1
].
name
=
StrDup
(
proc
);
/* FIXME: never freed
*/
MACRO_Loaded
[
MACRO_NumLoaded
-
1
].
alias
=
NULL
;
MACRO_Loaded
[
MACRO_NumLoaded
-
1
].
isBool
=
0
;
MACRO_Loaded
[
MACRO_NumLoaded
-
1
].
arguments
=
strdup
(
args
);
/* FIXME
*/
MACRO_Loaded
[
MACRO_NumLoaded
-
1
].
arguments
=
StrDup
(
args
);
/* FIXME: never freed
*/
MACRO_Loaded
[
MACRO_NumLoaded
-
1
].
fn
=
fn
;
WINE_TRACE
(
"Added %s(%s) at %p
\n
"
,
proc
,
args
,
fn
);
}
...
...
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