Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fe6a1d89
Commit
fe6a1d89
authored
Aug 30, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemenubuilder: Use static initalizer for mimeProgidTree and nativeMimeTypes.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ccdbc176
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
32 deletions
+2
-32
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+2
-32
No files found.
programs/winemenubuilder/winemenubuilder.c
View file @
fe6a1d89
...
...
@@ -262,21 +262,6 @@ static int winemenubuilder_rb_string_compare(const void *key, const struct wine_
return
strcmp
((
char
*
)
key
,
t
->
string
);
}
static
void
*
winemenubuilder_rb_alloc
(
size_t
size
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
}
static
void
*
winemenubuilder_rb_realloc
(
void
*
ptr
,
size_t
size
)
{
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
ptr
,
size
);
}
static
void
winemenubuilder_rb_free
(
void
*
ptr
)
{
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
}
static
void
winemenubuilder_rb_destroy
(
struct
wine_rb_entry
*
entry
,
void
*
context
)
{
struct
rb_string_entry
*
t
=
WINE_RB_ENTRY_VALUE
(
entry
,
struct
rb_string_entry
,
entry
);
...
...
@@ -284,14 +269,6 @@ static void winemenubuilder_rb_destroy(struct wine_rb_entry *entry, void *contex
HeapFree
(
GetProcessHeap
(),
0
,
t
);
}
static
const
struct
wine_rb_functions
winemenubuilder_rb_functions
=
{
winemenubuilder_rb_alloc
,
winemenubuilder_rb_realloc
,
winemenubuilder_rb_free
,
winemenubuilder_rb_string_compare
,
};
static
void
write_xml_text
(
FILE
*
file
,
const
char
*
text
)
{
int
i
;
...
...
@@ -2538,19 +2515,12 @@ static BOOL write_freedesktop_association_entry(const char *desktopPath, const c
static
BOOL
generate_associations
(
const
char
*
xdg_data_home
,
const
char
*
packages_dir
,
const
char
*
applications_dir
)
{
static
const
WCHAR
openW
[]
=
{
'o'
,
'p'
,
'e'
,
'n'
,
0
};
struct
wine_rb_tree
mimeProgidTree
;
struct
list
nativeMimeTypes
;
struct
wine_rb_tree
mimeProgidTree
=
{
winemenubuilder_rb_string_compare
}
;
struct
list
nativeMimeTypes
=
LIST_INIT
(
nativeMimeTypes
)
;
LSTATUS
ret
=
0
;
int
i
;
BOOL
hasChanged
=
FALSE
;
if
(
wine_rb_init
(
&
mimeProgidTree
,
&
winemenubuilder_rb_functions
))
{
WINE_ERR
(
"wine_rb_init failed
\n
"
);
return
FALSE
;
}
list_init
(
&
nativeMimeTypes
);
if
(
!
build_native_mime_types
(
xdg_data_home
,
&
nativeMimeTypes
))
{
WINE_ERR
(
"could not build native MIME types
\n
"
);
...
...
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