Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
5960c93c
Commit
5960c93c
authored
Mar 29, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless indirection
parent
f4889b14
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
src/config/cmdline.c
src/config/cmdline.c
+5
-5
src/config/configuration.h
src/config/configuration.h
+1
-1
src/libvlc.c
src/libvlc.c
+2
-2
No files found.
src/config/cmdline.c
View file @
5960c93c
...
...
@@ -47,7 +47,7 @@
* options used (ie. exported) by each module.
*
* @param p_this object to write command line options as variables to
* @param
pi_argc number of command line arguments [IN/OUT]
* @param
i_argc number of command line arguments
* @param ppsz_args commandl ine arguments [IN/OUT]
* @param b_ignore_errors whether to ignore parsing errors
* @return 0 on success, -1 on error.
...
...
@@ -55,7 +55,7 @@
* @warning This function is not re-entrant (because of getopt_long()).
* It must be called with the module bank initialization global lock held.
*/
int
config_LoadCmdLine
(
vlc_object_t
*
p_this
,
int
*
p
i_argc
,
int
config_LoadCmdLine
(
vlc_object_t
*
p_this
,
int
i_argc
,
const
char
*
ppsz_argv
[],
bool
b_ignore_errors
)
{
int
i_cmd
,
i_index
,
i_opts
,
i_shortopts
,
flag
,
i_verbose
=
0
;
...
...
@@ -101,7 +101,7 @@ int config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
* us, ignoring the arity of the options */
if
(
b_ignore_errors
)
{
argv_copy
=
(
const
char
**
)
malloc
(
*
p
i_argc
*
sizeof
(
char
*
)
);
argv_copy
=
(
const
char
**
)
malloc
(
i_argc
*
sizeof
(
char
*
)
);
if
(
argv_copy
==
NULL
)
{
free
(
psz_shortopts
);
...
...
@@ -109,7 +109,7 @@ int config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
module_list_free
(
list
);
return
-
1
;
}
memcpy
(
argv_copy
,
ppsz_argv
,
*
p
i_argc
*
sizeof
(
char
*
)
);
memcpy
(
argv_copy
,
ppsz_argv
,
i_argc
*
sizeof
(
char
*
)
);
ppsz_argv
=
argv_copy
;
}
...
...
@@ -199,7 +199,7 @@ int config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
* Parse the command line options
*/
vlc_optind
=
0
;
/* set to 0 to tell GNU getopt to reinitialize */
while
(
(
i_cmd
=
vlc_getopt_long
(
*
p
i_argc
,
(
char
**
)
ppsz_argv
,
while
(
(
i_cmd
=
vlc_getopt_long
(
i_argc
,
(
char
**
)
ppsz_argv
,
psz_shortopts
,
p_longopts
,
&
i_index
)
)
!=
-
1
)
{
...
...
src/config/configuration.h
View file @
5960c93c
...
...
@@ -36,7 +36,7 @@ int config_AutoSaveConfigFile( vlc_object_t * );
void
config_Free
(
module_t
*
);
int
config_LoadCmdLine
(
vlc_object_t
*
,
int
*
,
const
char
*
[],
bool
);
int
config_LoadCmdLine
(
vlc_object_t
*
,
int
,
const
char
*
[],
bool
);
int
config_LoadConfigFile
(
vlc_object_t
*
,
const
char
*
);
#define config_LoadCmdLine(a,b,c,d) config_LoadCmdLine(VLC_OBJECT(a),b,c,d)
#define config_LoadConfigFile(a,b) config_LoadConfigFile(VLC_OBJECT(a),b)
...
...
src/libvlc.c
View file @
5960c93c
...
...
@@ -321,7 +321,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
* options) */
module_InitBank
(
p_libvlc
);
if
(
config_LoadCmdLine
(
p_libvlc
,
&
i_argc
,
ppsz_argv
,
true
)
)
if
(
config_LoadCmdLine
(
p_libvlc
,
i_argc
,
ppsz_argv
,
true
)
)
{
module_EndBank
(
p_libvlc
,
false
);
return
VLC_EGENERIC
;
...
...
@@ -537,7 +537,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/* config_LoadCmdLine(), DBus (below) and Win32-specific use vlc_optind,
* vlc_optarg and vlc_optopt globals. This is not thread-safe!! */
#warning BUG!
if
(
config_LoadCmdLine
(
p_libvlc
,
&
i_argc
,
ppsz_argv
,
false
)
)
if
(
config_LoadCmdLine
(
p_libvlc
,
i_argc
,
ppsz_argv
,
false
)
)
{
#ifdef WIN32
ShowConsole
(
false
);
...
...
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