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
aac079a8
Commit
aac079a8
authored
Feb 20, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
browseui: Code clean up.
parent
9e1e80a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
31 deletions
+42
-31
aclmulti.c
dlls/browseui/aclmulti.c
+26
-30
browseui.h
dlls/browseui/browseui.h
+16
-1
No files found.
dlls/browseui/aclmulti.c
View file @
aac079a8
...
...
@@ -58,10 +58,6 @@ typedef struct tagACLMulti {
struct
ACLMultiSublist
*
objs
;
}
ACLMulti
;
static
const
IEnumStringVtbl
ACLMultiVtbl
;
static
const
IACListVtbl
ACLMulti_ACListVtbl
;
static
const
IObjMgrVtbl
ACLMulti_ObjMgrVtbl
;
static
inline
ACLMulti
*
impl_from_IACList
(
IACList
*
iface
)
{
return
(
ACLMulti
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
ACLMulti
,
aclVtbl
));
...
...
@@ -81,35 +77,14 @@ static void release_obj(struct ACLMultiSublist *obj)
IACList_Release
(
obj
->
pACL
);
}
HRESULT
ACLMulti_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
)
{
ACLMulti
*
This
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
CoTaskMemAlloc
(
sizeof
(
ACLMulti
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
ZeroMemory
(
This
,
sizeof
(
*
This
));
This
->
vtbl
=
&
ACLMultiVtbl
;
This
->
aclVtbl
=
&
ACLMulti_ACListVtbl
;
This
->
objmgrVtbl
=
&
ACLMulti_ObjMgrVtbl
;
This
->
refCount
=
1
;
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
IUnknown
*
)
This
;
BROWSEUI_refCount
++
;
return
S_OK
;
}
static
void
WINAPI
ACLMulti_Destructor
(
ACLMulti
*
This
)
static
void
ACLMulti_Destructor
(
ACLMulti
*
This
)
{
int
i
;
TRACE
(
"destroying %p
\n
"
,
This
);
for
(
i
=
0
;
i
<
This
->
nObjs
;
i
++
)
release_obj
(
&
This
->
objs
[
i
]);
CoTaskMemF
ree
(
This
->
objs
);
CoTaskMemF
ree
(
This
);
heap_f
ree
(
This
->
objs
);
heap_f
ree
(
This
);
BROWSEUI_refCount
--
;
}
...
...
@@ -166,7 +141,7 @@ static HRESULT WINAPI ACLMulti_Append(IObjMgr *iface, IUnknown *obj)
if
(
obj
==
NULL
)
return
E_FAIL
;
This
->
objs
=
CoTaskMemR
ealloc
(
This
->
objs
,
sizeof
(
This
->
objs
[
0
])
*
(
This
->
nObjs
+
1
));
This
->
objs
=
heap_r
ealloc
(
This
->
objs
,
sizeof
(
This
->
objs
[
0
])
*
(
This
->
nObjs
+
1
));
This
->
objs
[
This
->
nObjs
].
punk
=
obj
;
IUnknown_AddRef
(
obj
);
if
(
FAILED
(
IUnknown_QueryInterface
(
obj
,
&
IID_IEnumString
,
(
LPVOID
*
)
&
This
->
objs
[
This
->
nObjs
].
pEnum
)))
...
...
@@ -189,7 +164,7 @@ static HRESULT WINAPI ACLMulti_Remove(IObjMgr *iface, IUnknown *obj)
release_obj
(
&
This
->
objs
[
i
]);
memmove
(
&
This
->
objs
[
i
],
&
This
->
objs
[
i
+
1
],
(
This
->
nObjs
-
i
-
1
)
*
sizeof
(
struct
ACLMultiSublist
));
This
->
nObjs
--
;
This
->
objs
=
CoTaskMemR
ealloc
(
This
->
objs
,
sizeof
(
This
->
objs
[
0
])
*
This
->
nObjs
);
This
->
objs
=
heap_r
ealloc
(
This
->
objs
,
sizeof
(
This
->
objs
[
0
])
*
This
->
nObjs
);
return
S_OK
;
}
...
...
@@ -328,3 +303,24 @@ static const IACListVtbl ACLMulti_ACListVtbl =
ACLMulti_Expand
};
HRESULT
ACLMulti_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
)
{
ACLMulti
*
This
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
heap_alloc
(
sizeof
(
ACLMulti
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
ZeroMemory
(
This
,
sizeof
(
*
This
));
This
->
vtbl
=
&
ACLMultiVtbl
;
This
->
aclVtbl
=
&
ACLMulti_ACListVtbl
;
This
->
objmgrVtbl
=
&
ACLMulti_ObjMgrVtbl
;
This
->
refCount
=
1
;
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
IUnknown
*
)
This
;
BROWSEUI_refCount
++
;
return
S_OK
;
}
dlls/browseui/browseui.h
View file @
aac079a8
...
...
@@ -30,4 +30,19 @@ extern HRESULT CompCatCacheDaemon_Constructor(IUnknown *punkOuter, IUnknown **pp
extern
const
GUID
CLSID_CompCatCacheDaemon
;
#endif
/* __WINE_SHDOCVW_H */
static
inline
void
*
heap_alloc
(
size_t
size
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
}
static
inline
void
*
heap_realloc
(
void
*
mem
,
size_t
size
)
{
return
mem
?
HeapReAlloc
(
GetProcessHeap
(),
0
,
mem
,
size
)
:
heap_alloc
(
size
);
}
static
inline
BOOL
heap_free
(
void
*
mem
)
{
return
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
}
#endif
/* __WINE_BROWSEUI_H */
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