Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
7fb3ea1b
Commit
7fb3ea1b
authored
Jan 03, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some cleanup. Use strlen().
parent
a5673ea1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
30 deletions
+13
-30
src/misc/modules.c
src/misc/modules.c
+13
-30
No files found.
src/misc/modules.c
View file @
7fb3ea1b
...
...
@@ -503,61 +503,42 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
if
(
i_shortcuts
>
0
)
{
vlc_bool_t
b_trash
;
int
i_dummy
,
i_short
=
i_shortcuts
;
char
*
psz_name
=
psz_shortcuts
;
const
char
*
psz_name
=
psz_shortcuts
;
/* Let's drop modules with a <= 0 score (unless they are
* explicitly requested) */
b_trash
=
p_module
->
i_score
<=
0
;
while
(
i_short
>
0
)
for
(
unsigned
i_short
=
i_shortcuts
;
i_short
>
0
;
i_short
--
)
{
for
(
i_dummy
=
0
;
p_module
->
pp_shortcuts
[
i_dummy
];
i_dummy
++
)
for
(
unsigned
i
=
0
;
p_module
->
pp_shortcuts
[
i
];
i
++
)
{
if
(
!
strcasecmp
(
psz_name
,
p_module
->
pp_shortcuts
[
i_dummy
]
)
)
if
(
!
strcasecmp
(
psz_name
,
p_module
->
pp_shortcuts
[
i
]
)
)
{
/* Found it */
b_trash
=
VLC_FALSE
;
i_shortcut_bonus
=
i_short
*
10000
;
break
;
goto
found_shortcut
;
}
}
if
(
i_shortcut_bonus
)
{
/* We found it... remember ? */
break
;
}
/* Go to the next shortcut... This is so lame! */
while
(
*
psz_name
)
{
psz_name
++
;
}
psz_name
++
;
i_short
--
;
psz_name
+=
strlen
(
psz_name
)
+
1
;
}
/* If we are in "strict" mode and we couldn't
* find the module in the list of provided shortcuts,
* then kick the bastard out of here!!! */
if
(
i_short
==
0
&&
b_strict
)
{
b_trash
=
VLC_TRUE
;
}
if
(
b_trash
)
{
if
(
b_strict
)
continue
;
}
}
/* If we didn't require a shortcut, trash <= 0 scored plugins */
else
if
(
p_module
->
i_score
<=
0
)
{
continue
;
}
found_shortcut:
/* Special case: test if we requested a particular intf plugin */
if
(
!
i_shortcuts
&&
p_module
->
psz_program
&&
!
strcmp
(
psz_capability
,
"interface"
)
...
...
@@ -636,8 +617,10 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
{
#ifdef HAVE_DYNAMIC_PLUGINS
/* Make sure the module is loaded in mem */
module_t
*
p_module
=
p_tmp
->
p_module
->
b_submodule
?
(
module_t
*
)
p_tmp
->
p_module
->
p_parent
:
p_tmp
->
p_module
;
module_t
*
p_module
=
p_tmp
->
p_module
;
if
(
p_module
->
b_submodule
)
p_module
=
(
module_t
*
)
p_module
->
p_parent
;
if
(
!
p_module
->
b_builtin
&&
!
p_module
->
b_loaded
)
{
module_t
*
p_new_module
=
...
...
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