Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
04ba3066
Commit
04ba3066
authored
Feb 22, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
browseui: Code clean up.
parent
be1e2080
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
68 deletions
+68
-68
aclmulti.c
dlls/browseui/aclmulti.c
+2
-2
browseui.h
dlls/browseui/browseui.h
+5
-0
browseui_main.c
dlls/browseui/browseui_main.c
+13
-14
compcatcachedaemon.c
dlls/browseui/compcatcachedaemon.c
+21
-23
progressdlg.c
dlls/browseui/progressdlg.c
+27
-29
No files found.
dlls/browseui/aclmulti.c
View file @
04ba3066
...
...
@@ -310,10 +310,10 @@ HRESULT ACLMulti_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
heap_alloc
(
sizeof
(
ACLMulti
));
This
=
heap_alloc
_zero
(
sizeof
(
ACLMulti
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
ZeroMemory
(
This
,
sizeof
(
*
This
));
This
->
vtbl
=
&
ACLMultiVtbl
;
This
->
aclVtbl
=
&
ACLMulti_ACListVtbl
;
This
->
objmgrVtbl
=
&
ACLMulti_ObjMgrVtbl
;
...
...
dlls/browseui/browseui.h
View file @
04ba3066
...
...
@@ -35,6 +35,11 @@ static inline void *heap_alloc(size_t size)
return
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
}
static
inline
void
*
heap_alloc_zero
(
size_t
size
)
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
}
static
inline
void
*
heap_realloc
(
void
*
mem
,
size_t
size
)
{
return
mem
?
HeapReAlloc
(
GetProcessHeap
(),
0
,
mem
,
size
)
:
heap_alloc
(
size
);
...
...
dlls/browseui/browseui_main.c
View file @
04ba3066
...
...
@@ -64,24 +64,11 @@ typedef struct tagClassFactory
LONG
ref
;
LPFNCONSTRUCTOR
ctor
;
}
ClassFactory
;
static
const
IClassFactoryVtbl
ClassFactoryVtbl
;
static
HRESULT
ClassFactory_Constructor
(
LPFNCONSTRUCTOR
ctor
,
LPVOID
*
ppvOut
)
{
ClassFactory
*
This
=
CoTaskMemAlloc
(
sizeof
(
ClassFactory
));
This
->
vtbl
=
&
ClassFactoryVtbl
;
This
->
ref
=
1
;
This
->
ctor
=
ctor
;
*
ppvOut
=
(
LPVOID
)
This
;
TRACE
(
"Created class factory %p
\n
"
,
This
);
BROWSEUI_refCount
++
;
return
S_OK
;
}
static
void
ClassFactory_Destructor
(
ClassFactory
*
This
)
{
TRACE
(
"Destroying class factory %p
\n
"
,
This
);
CoTaskMemF
ree
(
This
);
heap_f
ree
(
This
);
BROWSEUI_refCount
--
;
}
...
...
@@ -154,6 +141,18 @@ static const IClassFactoryVtbl ClassFactoryVtbl = {
ClassFactory_LockServer
};
static
HRESULT
ClassFactory_Constructor
(
LPFNCONSTRUCTOR
ctor
,
LPVOID
*
ppvOut
)
{
ClassFactory
*
This
=
heap_alloc
(
sizeof
(
ClassFactory
));
This
->
vtbl
=
&
ClassFactoryVtbl
;
This
->
ref
=
1
;
This
->
ctor
=
ctor
;
*
ppvOut
=
(
LPVOID
)
This
;
TRACE
(
"Created class factory %p
\n
"
,
This
);
BROWSEUI_refCount
++
;
return
S_OK
;
}
/*************************************************************************
* BROWSEUI DllMain
*/
...
...
dlls/browseui/compcatcachedaemon.c
View file @
04ba3066
...
...
@@ -49,33 +49,11 @@ typedef struct tagCCCD {
CRITICAL_SECTION
cs
;
}
CompCatCacheDaemon
;
static
const
IRunnableTaskVtbl
CompCatCacheDaemonVtbl
;
HRESULT
CompCatCacheDaemon_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
)
{
CompCatCacheDaemon
*
This
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
CoTaskMemAlloc
(
sizeof
(
CompCatCacheDaemon
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
ZeroMemory
(
This
,
sizeof
(
*
This
));
This
->
vtbl
=
&
CompCatCacheDaemonVtbl
;
This
->
refCount
=
1
;
InitializeCriticalSection
(
&
This
->
cs
);
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
IUnknown
*
)
This
;
BROWSEUI_refCount
++
;
return
S_OK
;
}
static
void
CompCatCacheDaemon_Destructor
(
CompCatCacheDaemon
*
This
)
{
TRACE
(
"destroying %p
\n
"
,
This
);
DeleteCriticalSection
(
&
This
->
cs
);
CoTaskMemF
ree
(
This
);
heap_f
ree
(
This
);
BROWSEUI_refCount
--
;
}
...
...
@@ -157,3 +135,23 @@ static const IRunnableTaskVtbl CompCatCacheDaemonVtbl =
CompCatCacheDaemon_Resume
,
CompCatCacheDaemon_IsRunning
};
HRESULT
CompCatCacheDaemon_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
)
{
CompCatCacheDaemon
*
This
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
heap_alloc
(
sizeof
(
CompCatCacheDaemon
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
This
->
vtbl
=
&
CompCatCacheDaemonVtbl
;
This
->
refCount
=
1
;
InitializeCriticalSection
(
&
This
->
cs
);
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
IUnknown
*
)
This
;
BROWSEUI_refCount
++
;
return
S_OK
;
}
dlls/browseui/progressdlg.c
View file @
04ba3066
...
...
@@ -74,8 +74,6 @@ typedef struct tagProgressDialog {
HWND
hwndDisabledParent
;
/* For modal dialog: the parent that need to be re-enabled when the dialog ends */
}
ProgressDialog
;
static
const
IProgressDialogVtbl
ProgressDialogVtbl
;
static
void
set_buffer
(
LPWSTR
*
buffer
,
LPCWSTR
string
)
{
static
const
WCHAR
empty_string
[]
=
{
0
};
...
...
@@ -246,37 +244,17 @@ static DWORD WINAPI dialog_thread(LPVOID lpParameter)
return
0
;
}
HRESULT
ProgressDialog_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
)
{
ProgressDialog
*
This
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
CoTaskMemAlloc
(
sizeof
(
ProgressDialog
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
ZeroMemory
(
This
,
sizeof
(
*
This
));
This
->
vtbl
=
&
ProgressDialogVtbl
;
This
->
refCount
=
1
;
InitializeCriticalSection
(
&
This
->
cs
);
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
IUnknown
*
)
This
;
BROWSEUI_refCount
++
;
return
S_OK
;
}
static
void
WINAPI
ProgressDialog_Destructor
(
ProgressDialog
*
This
)
static
void
ProgressDialog_Destructor
(
ProgressDialog
*
This
)
{
TRACE
(
"destroying %p
\n
"
,
This
);
if
(
This
->
hwnd
)
end_dialog
(
This
);
CoTaskMemF
ree
(
This
->
lines
[
0
]);
CoTaskMemF
ree
(
This
->
lines
[
1
]);
CoTaskMemF
ree
(
This
->
lines
[
2
]);
CoTaskMemF
ree
(
This
->
cancelMsg
);
CoTaskMemF
ree
(
This
->
title
);
CoTaskMemF
ree
(
This
);
heap_f
ree
(
This
->
lines
[
0
]);
heap_f
ree
(
This
->
lines
[
1
]);
heap_f
ree
(
This
->
lines
[
2
]);
heap_f
ree
(
This
->
cancelMsg
);
heap_f
ree
(
This
->
title
);
heap_f
ree
(
This
);
BROWSEUI_refCount
--
;
}
...
...
@@ -504,3 +482,23 @@ static const IProgressDialogVtbl ProgressDialogVtbl =
ProgressDialog_SetCancelMsg
,
ProgressDialog_Timer
};
HRESULT
ProgressDialog_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
)
{
ProgressDialog
*
This
;
if
(
pUnkOuter
)
return
CLASS_E_NOAGGREGATION
;
This
=
heap_alloc_zero
(
sizeof
(
ProgressDialog
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
This
->
vtbl
=
&
ProgressDialogVtbl
;
This
->
refCount
=
1
;
InitializeCriticalSection
(
&
This
->
cs
);
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
IUnknown
*
)
This
;
BROWSEUI_refCount
++
;
return
S_OK
;
}
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