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
abdbced4
Commit
abdbced4
authored
Apr 29, 2000
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Apr 29, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some HEAP_xalloc calls.
parent
d34abdd1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
20 deletions
+45
-20
lzexpand_main.c
dlls/lzexpand/lzexpand_main.c
+12
-4
dos_fs.c
files/dos_fs.c
+2
-2
profile.c
files/profile.c
+20
-9
painting.c
graphics/painting.c
+7
-3
event.c
windows/x11drv/event.c
+4
-2
No files found.
dlls/lzexpand/lzexpand_main.c
View file @
abdbced4
...
...
@@ -178,16 +178,23 @@ HFILE WINAPI LZInit( HFILE hfSrc )
for
(
i
=
0
;
i
<
MAX_LZSTATES
;
i
++
)
if
(
!
lzstates
[
i
])
break
;
if
(
i
==
MAX_LZSTATES
)
return
LZERROR_GLOBALLOC
;
lzstates
[
i
]
=
lzs
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
lzstate
)
);
if
(
lzs
==
NULL
)
return
LZERROR_GLOBALLOC
;
memset
(
lzs
,
'\0'
,
sizeof
(
*
lzs
));
lzs
->
realfd
=
hfSrc
;
lzs
->
lastchar
=
head
.
lastchar
;
lzs
->
reallength
=
head
.
reallength
;
lzs
->
get
=
H
EAP_xa
lloc
(
GetProcessHeap
(),
0
,
GETLEN
);
lzs
->
get
=
H
eapA
lloc
(
GetProcessHeap
(),
0
,
GETLEN
);
lzs
->
getlen
=
0
;
lzs
->
getcur
=
0
;
if
(
lzs
->
get
==
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
lzs
);
lzstates
[
i
]
=
NULL
;
return
LZERROR_GLOBALLOC
;
}
/* Yes, preinitialize with spaces */
memset
(
lzs
->
table
,
' '
,
0x1000
);
/* Yes, start 16 byte from the END of the table */
...
...
@@ -534,8 +541,9 @@ LONG WINAPI LZCopy( HFILE src, HFILE dest )
static
LPSTR
LZEXPAND_MangleName
(
LPCSTR
fn
)
{
char
*
p
;
char
*
mfn
=
(
char
*
)
HEAP_xalloc
(
GetProcessHeap
(),
0
,
strlen
(
fn
)
+
3
);
/* "._" and \0 */
char
*
mfn
=
(
char
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
fn
)
+
3
);
/* "._" and \0 */
if
(
mfn
==
NULL
)
return
NULL
;
strcpy
(
mfn
,
fn
);
if
(
!
(
p
=
strrchr
(
mfn
,
'\\'
)))
p
=
mfn
;
if
((
p
=
strchr
(
p
,
'.'
)))
...
...
files/dos_fs.c
View file @
abdbced4
...
...
@@ -992,7 +992,7 @@ DWORD WINAPI GetShortPathNameW( LPCWSTR longpath, LPWSTR shortpath,
DWORD
ret
=
0
;
longpathA
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
longpath
);
shortpathA
=
H
EAP_xa
lloc
(
GetProcessHeap
(),
0
,
shortlen
);
shortpathA
=
H
eapA
lloc
(
GetProcessHeap
(),
0
,
shortlen
);
ret
=
GetShortPathNameA
(
longpathA
,
shortpathA
,
shortlen
);
lstrcpynAtoW
(
shortpath
,
shortpathA
,
shortlen
);
...
...
@@ -1953,7 +1953,7 @@ DWORD WINAPI QueryDosDeviceA(LPCSTR devname,LPSTR target,DWORD bufsize)
DWORD
WINAPI
QueryDosDeviceW
(
LPCWSTR
devname
,
LPWSTR
target
,
DWORD
bufsize
)
{
LPSTR
devnameA
=
devname
?
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
devname
)
:
NULL
;
LPSTR
targetA
=
(
LPSTR
)
H
EAP_xa
lloc
(
GetProcessHeap
(),
0
,
bufsize
);
LPSTR
targetA
=
(
LPSTR
)
H
eapA
lloc
(
GetProcessHeap
(),
0
,
bufsize
);
DWORD
ret
=
QueryDosDeviceA
(
devnameA
,
targetA
,
bufsize
);
lstrcpynAtoW
(
target
,
targetA
,
bufsize
);
...
...
files/profile.c
View file @
abdbced4
...
...
@@ -202,7 +202,8 @@ static PROFILESECTION *PROFILE_Load( FILE *file )
PROFILESECTION
**
next_section
;
PROFILEKEY
*
key
,
*
prev_key
,
**
next_key
;
first_section
=
HEAP_xalloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
section
)
);
first_section
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
section
)
);
if
(
first_section
==
NULL
)
return
NULL
;
first_section
->
name
=
NULL
;
first_section
->
key
=
NULL
;
first_section
->
next
=
NULL
;
...
...
@@ -226,7 +227,8 @@ static PROFILESECTION *PROFILE_Load( FILE *file )
{
*
p2
=
'\0'
;
p
++
;
section
=
HEAP_xalloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
section
)
);
section
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
section
)
);
if
(
section
==
NULL
)
break
;
section
->
name
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
p
);
section
->
key
=
NULL
;
section
->
next
=
NULL
;
...
...
@@ -253,8 +255,9 @@ static PROFILESECTION *PROFILE_Load( FILE *file )
}
if
(
*
p
||
!
prev_key
||
*
prev_key
->
name
)
{
key
=
HEAP_xalloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
key
)
);
{
key
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
key
)
);
if
(
key
==
NULL
)
break
;
key
->
name
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
p
);
key
->
value
=
p2
?
HEAP_strdupA
(
GetProcessHeap
(),
0
,
p2
)
:
NULL
;
key
->
next
=
NULL
;
...
...
@@ -263,7 +266,7 @@ static PROFILESECTION *PROFILE_Load( FILE *file )
prev_key
=
key
;
TRACE
(
"New key: name='%s', value='%s'
\n
"
,
key
->
name
,
key
->
value
?
key
->
value
:
"(none)"
);
}
}
}
return
first_section
;
}
...
...
@@ -426,7 +429,8 @@ static PROFILEKEY *PROFILE_Find( PROFILESECTION **section,
key
=
&
(
*
key
)
->
next
;
}
if
(
!
create
)
return
NULL
;
*
key
=
HEAP_xalloc
(
GetProcessHeap
(),
0
,
sizeof
(
PROFILEKEY
)
);
*
key
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
PROFILEKEY
)
);
if
(
*
key
==
NULL
)
return
NULL
;
(
*
key
)
->
name
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
key_name
);
(
*
key
)
->
value
=
NULL
;
(
*
key
)
->
next
=
NULL
;
...
...
@@ -435,10 +439,16 @@ static PROFILEKEY *PROFILE_Find( PROFILESECTION **section,
section
=
&
(
*
section
)
->
next
;
}
if
(
!
create
)
return
NULL
;
*
section
=
HEAP_xalloc
(
GetProcessHeap
(),
0
,
sizeof
(
PROFILESECTION
)
);
*
section
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
PROFILESECTION
)
);
if
(
*
section
==
NULL
)
return
NULL
;
(
*
section
)
->
name
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
section_name
);
(
*
section
)
->
next
=
NULL
;
(
*
section
)
->
key
=
HEAP_xalloc
(
GetProcessHeap
(),
0
,
sizeof
(
PROFILEKEY
)
);
(
*
section
)
->
key
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
PROFILEKEY
)
);
if
((
*
section
)
->
key
==
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
*
section
);
return
NULL
;
}
(
*
section
)
->
key
->
name
=
HEAP_strdupA
(
GetProcessHeap
(),
0
,
key_name
);
(
*
section
)
->
key
->
value
=
NULL
;
(
*
section
)
->
key
->
next
=
NULL
;
...
...
@@ -535,7 +545,8 @@ static BOOL PROFILE_Open( LPCSTR filename )
if
(
!
CurProfile
)
for
(
i
=
0
;
i
<
N_CACHED_PROFILES
;
i
++
)
{
MRUProfile
[
i
]
=
HEAP_xalloc
(
GetProcessHeap
(),
0
,
sizeof
(
PROFILE
)
);
MRUProfile
[
i
]
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
PROFILE
)
);
if
(
MRUProfile
[
i
]
==
NULL
)
break
;
MRUProfile
[
i
]
->
changed
=
FALSE
;
MRUProfile
[
i
]
->
section
=
NULL
;
MRUProfile
[
i
]
->
dos_name
=
NULL
;
...
...
graphics/painting.c
View file @
abdbced4
...
...
@@ -712,11 +712,15 @@ BOOL16 WINAPI PolyPolygon16( HDC16 hdc, const POINT16* pt, const INT16* counts,
nrpts
=
0
;
for
(
i
=
polygons
;
i
--
;)
nrpts
+=
counts
[
i
];
pt32
=
(
LPPOINT
)
HEAP_xalloc
(
GetProcessHeap
(),
0
,
sizeof
(
POINT
)
*
nrpts
);
pt32
=
(
LPPOINT
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
POINT
)
*
nrpts
);
if
(
pt32
==
NULL
)
return
FALSE
;
for
(
i
=
nrpts
;
i
--
;)
CONV_POINT16TO32
(
&
(
pt
[
i
]),
&
(
pt32
[
i
]));
counts32
=
(
LPINT
)
HEAP_xalloc
(
GetProcessHeap
(),
0
,
polygons
*
sizeof
(
INT
)
);
counts32
=
(
LPINT
)
HeapAlloc
(
GetProcessHeap
(),
0
,
polygons
*
sizeof
(
INT
)
);
if
(
counts32
==
NULL
)
{
HeapFree
(
GetProcessHeap
(),
0
,
pt32
);
return
FALSE
;
}
for
(
i
=
polygons
;
i
--
;)
counts32
[
i
]
=
counts
[
i
];
ret
=
PolyPolygon
(
hdc
,
pt32
,
counts32
,
polygons
);
...
...
windows/x11drv/event.c
View file @
abdbced4
...
...
@@ -984,7 +984,8 @@ static Atom EVENT_SelectionRequest_TARGETS( Window requestor, Atom target, Atom
cTargets
++
;
/* Allocate temp buffer */
targets
=
(
Atom
*
)
HEAP_xalloc
(
GetProcessHeap
(),
0
,
cTargets
*
sizeof
(
Atom
));
targets
=
(
Atom
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
cTargets
*
sizeof
(
Atom
));
if
(
targets
==
NULL
)
return
None
;
/* Create TARGETS property list (First item in list is TARGETS itself) */
...
...
@@ -1080,7 +1081,8 @@ static Atom EVENT_SelectionRequest_STRING( Window requestor, Atom target, Atom r
size
=
GlobalSize16
(
hText
);
/* remove carriage returns */
lpstr
=
(
char
*
)
HEAP_xalloc
(
GetProcessHeap
(),
0
,
size
--
);
lpstr
=
(
char
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
size
--
);
if
(
lpstr
==
NULL
)
return
None
;
for
(
i
=
0
,
j
=
0
;
i
<
size
&&
text
[
i
];
i
++
)
{
if
(
text
[
i
]
==
'\r'
&&
...
...
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