Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a87edce4
Commit
a87edce4
authored
Feb 07, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: remove leading underscores
parent
c6a41b08
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
69 deletions
+82
-69
include/vlc_configuration.h
include/vlc_configuration.h
+29
-29
src/config/chain.c
src/config/chain.c
+3
-2
src/config/cmdline.c
src/config/cmdline.c
+3
-3
src/config/configuration.h
src/config/configuration.h
+4
-4
src/config/core.c
src/config/core.c
+17
-10
src/config/dirs.c
src/config/dirs.c
+2
-1
src/config/file.c
src/config/file.c
+4
-3
src/config/intf.c
src/config/intf.c
+6
-3
src/libvlccore.sym
src/libvlccore.sym
+14
-14
No files found.
include/vlc_configuration.h
View file @
a87edce4
...
...
@@ -199,22 +199,22 @@ struct module_config_t
* Prototypes - these methods are used to get, set or manipulate configuration
* data.
*****************************************************************************/
VLC_EXPORT
(
int
,
__
config_GetType
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
int
,
__
config_GetInt
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
void
,
__
config_PutInt
,
(
vlc_object_t
*
,
const
char
*
,
int
)
);
VLC_EXPORT
(
float
,
__
config_GetFloat
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
void
,
__
config_PutFloat
,
(
vlc_object_t
*
,
const
char
*
,
float
)
);
VLC_EXPORT
(
char
*
,
__
config_GetPsz
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
void
,
__
config_PutPsz
,
(
vlc_object_t
*
,
const
char
*
,
const
char
*
)
);
#define config_SaveConfigFile(a,b) __config_SaveConfigFile(VLC_OBJECT(a),b)
VLC_EXPORT
(
int
,
__config_SaveConfigFile
,
(
vlc_object_t
*
,
const
char
*
)
);
#define config_ResetAll(a) __config_ResetAll(VLC_OBJECT(a))
VLC_EXPORT
(
void
,
__config_ResetAll
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
int
,
config_GetType
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
int
,
config_GetInt
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
void
,
config_PutInt
,
(
vlc_object_t
*
,
const
char
*
,
int
)
);
VLC_EXPORT
(
float
,
config_GetFloat
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
void
,
config_PutFloat
,
(
vlc_object_t
*
,
const
char
*
,
float
)
);
VLC_EXPORT
(
char
*
,
config_GetPsz
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
void
,
config_PutPsz
,
(
vlc_object_t
*
,
const
char
*
,
const
char
*
)
);
VLC_EXPORT
(
int
,
config_SaveConfigFile
,
(
vlc_object_t
*
,
const
char
*
)
);
#define config_SaveConfigFile(a,b) config_SaveConfigFile(VLC_OBJECT(a),b)
VLC_EXPORT
(
void
,
config_ResetAll
,
(
vlc_object_t
*
)
);
#define config_ResetAll(a) config_ResetAll(VLC_OBJECT(a))
VLC_EXPORT
(
module_config_t
*
,
config_FindConfig
,(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
char
*
,
__
config_GetDataDir
,
(
vlc_object_t
*
)
LIBVLC_USED
);
#define config_GetDataDir(a)
__
config_GetDataDir(VLC_OBJECT(a))
VLC_EXPORT
(
char
*
,
config_GetDataDir
,
(
vlc_object_t
*
)
LIBVLC_USED
);
#define config_GetDataDir(a) config_GetDataDir(VLC_OBJECT(a))
VLC_EXPORT
(
const
char
*
,
config_GetConfDir
,
(
void
)
LIBVLC_USED
);
typedef
enum
vlc_userdir
...
...
@@ -236,21 +236,21 @@ typedef enum vlc_userdir
VLC_EXPORT
(
char
*
,
config_GetUserDir
,
(
vlc_userdir_t
)
LIBVLC_USED
);
VLC_EXPORT
(
void
,
__
config_AddIntf
,
(
vlc_object_t
*
,
const
char
*
)
);
VLC_EXPORT
(
void
,
__
config_RemoveIntf
,
(
vlc_object_t
*
,
const
char
*
)
);
VLC_EXPORT
(
bool
,
__
config_ExistIntf
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
VLC_EXPORT
(
void
,
config_AddIntf
,
(
vlc_object_t
*
,
const
char
*
)
);
VLC_EXPORT
(
void
,
config_RemoveIntf
,
(
vlc_object_t
*
,
const
char
*
)
);
VLC_EXPORT
(
bool
,
config_ExistIntf
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
);
#define config_GetType(a,b)
__
config_GetType(VLC_OBJECT(a),b)
#define config_GetInt(a,b)
__
config_GetInt(VLC_OBJECT(a),b)
#define config_PutInt(a,b,c)
__
config_PutInt(VLC_OBJECT(a),b,c)
#define config_GetFloat(a,b)
__
config_GetFloat(VLC_OBJECT(a),b)
#define config_PutFloat(a,b,c)
__
config_PutFloat(VLC_OBJECT(a),b,c)
#define config_GetPsz(a,b)
__
config_GetPsz(VLC_OBJECT(a),b)
#define config_PutPsz(a,b,c)
__
config_PutPsz(VLC_OBJECT(a),b,c)
#define config_GetType(a,b) config_GetType(VLC_OBJECT(a),b)
#define config_GetInt(a,b) config_GetInt(VLC_OBJECT(a),b)
#define config_PutInt(a,b,c) config_PutInt(VLC_OBJECT(a),b,c)
#define config_GetFloat(a,b) config_GetFloat(VLC_OBJECT(a),b)
#define config_PutFloat(a,b,c) config_PutFloat(VLC_OBJECT(a),b,c)
#define config_GetPsz(a,b) config_GetPsz(VLC_OBJECT(a),b)
#define config_PutPsz(a,b,c) config_PutPsz(VLC_OBJECT(a),b,c)
#define config_AddIntf(a,b)
__
config_AddIntf(VLC_OBJECT(a),b)
#define config_RemoveIntf(a,b)
__
config_RemoveIntf(VLC_OBJECT(a),b)
#define config_ExistIntf(a,b)
__
config_ExistIntf(VLC_OBJECT(a),b)
#define config_AddIntf(a,b) config_AddIntf(VLC_OBJECT(a),b)
#define config_RemoveIntf(a,b) config_RemoveIntf(VLC_OBJECT(a),b)
#define config_ExistIntf(a,b) config_ExistIntf(VLC_OBJECT(a),b)
/****************************************************************************
* config_chain_t:
...
...
@@ -270,8 +270,8 @@ struct config_chain_t
*
* The option names will be created by adding the psz_prefix prefix.
*/
#define config_ChainParse( a, b, c, d ) __config_ChainParse( VLC_OBJECT(a), b, c, d )
VLC_EXPORT
(
void
,
__config_ChainParse
,
(
vlc_object_t
*
,
const
char
*
psz_prefix
,
const
char
*
const
*
ppsz_options
,
config_chain_t
*
)
);
VLC_EXPORT
(
void
,
config_ChainParse
,
(
vlc_object_t
*
,
const
char
*
psz_prefix
,
const
char
*
const
*
ppsz_options
,
config_chain_t
*
)
);
#define config_ChainParse( a, b, c, d ) config_ChainParse( VLC_OBJECT(a), b, c, d )
/**
* This function will parse a configuration string (psz_string) and
...
...
src/config/chain.c
View file @
a87edce4
...
...
@@ -256,8 +256,9 @@ void config_ChainDestroy( config_chain_t *p_cfg )
}
}
void
__config_ChainParse
(
vlc_object_t
*
p_this
,
const
char
*
psz_prefix
,
const
char
*
const
*
ppsz_options
,
config_chain_t
*
cfg
)
#undef config_ChainParse
void
config_ChainParse
(
vlc_object_t
*
p_this
,
const
char
*
psz_prefix
,
const
char
*
const
*
ppsz_options
,
config_chain_t
*
cfg
)
{
if
(
psz_prefix
==
NULL
)
psz_prefix
=
""
;
size_t
plen
=
1
+
strlen
(
psz_prefix
);
...
...
src/config/cmdline.c
View file @
a87edce4
...
...
@@ -43,6 +43,7 @@
#include <assert.h>
#undef config_LoadCmdLine
/*****************************************************************************
* config_LoadCmdLine: parse command line
*****************************************************************************
...
...
@@ -52,9 +53,8 @@
* because we don't know (and don't want to know) in advance the configuration
* options used (ie. exported) by each module.
*****************************************************************************/
int
__config_LoadCmdLine
(
vlc_object_t
*
p_this
,
int
*
pi_argc
,
const
char
*
ppsz_argv
[],
bool
b_ignore_errors
)
int
config_LoadCmdLine
(
vlc_object_t
*
p_this
,
int
*
pi_argc
,
const
char
*
ppsz_argv
[],
bool
b_ignore_errors
)
{
int
i_cmd
,
i_index
,
i_opts
,
i_shortopts
,
flag
,
i_verbose
=
0
;
module_t
*
p_parser
;
...
...
src/config/configuration.h
View file @
a87edce4
...
...
@@ -36,11 +36,11 @@ int config_AutoSaveConfigFile( vlc_object_t * );
void
config_Free
(
module_t
*
);
#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)
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)
int
__config_LoadCmdLine
(
vlc_object_t
*
,
int
*
,
const
char
*
[],
bool
);
int
__config_LoadConfigFile
(
vlc_object_t
*
,
const
char
*
);
int
config_SortConfig
(
void
);
void
config_UnsortConfig
(
void
);
...
...
src/config/core.c
View file @
a87edce4
...
...
@@ -68,14 +68,14 @@ int IsConfigIntegerType (int type)
return
memchr
(
config_types
,
type
,
sizeof
(
config_types
))
!=
NULL
;
}
#undef config_GetType
/*****************************************************************************
* config_GetType: get the type of a variable (bool, int, float, string)
*****************************************************************************
* This function is used to get the type of a variable from its name.
* Beware, this is quite slow.
*****************************************************************************/
int
__
config_GetType
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
)
int
config_GetType
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
)
{
module_config_t
*
p_config
;
int
i_type
;
...
...
@@ -134,6 +134,7 @@ int __config_GetType( vlc_object_t *p_this, const char *psz_name )
return
i_type
;
}
#undef config_GetInt
/*****************************************************************************
* config_GetInt: get the value of an int variable
*****************************************************************************
...
...
@@ -141,7 +142,7 @@ int __config_GetType( vlc_object_t *p_this, const char *psz_name )
* represented by an integer (CONFIG_ITEM_INTEGER and
* CONFIG_ITEM_BOOL).
*****************************************************************************/
int
__
config_GetInt
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
)
int
config_GetInt
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
)
{
module_config_t
*
p_config
;
...
...
@@ -168,13 +169,14 @@ int __config_GetInt( vlc_object_t *p_this, const char *psz_name )
return
val
;
}
#undef config_GetFloat
/*****************************************************************************
* config_GetFloat: get the value of a float variable
*****************************************************************************
* This function is used to get the value of variables which are internally
* represented by a float (CONFIG_ITEM_FLOAT).
*****************************************************************************/
float
__
config_GetFloat
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
)
float
config_GetFloat
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
)
{
module_config_t
*
p_config
;
...
...
@@ -201,6 +203,7 @@ float __config_GetFloat( vlc_object_t *p_this, const char *psz_name )
return
val
;
}
#undef config_GetPsz
/*****************************************************************************
* config_GetPsz: get the string value of a string variable
*****************************************************************************
...
...
@@ -212,7 +215,7 @@ float __config_GetFloat( vlc_object_t *p_this, const char *psz_name )
* duplicate of the actual value. It isn't safe to return a pointer to the
* actual value as it can be modified at any time.
*****************************************************************************/
char
*
__
config_GetPsz
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
)
char
*
config_GetPsz
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
)
{
module_config_t
*
p_config
;
...
...
@@ -239,6 +242,7 @@ char * __config_GetPsz( vlc_object_t *p_this, const char *psz_name )
return
psz_value
;
}
#undef config_PutPsz
/*****************************************************************************
* config_PutPsz: set the string value of a string variable
*****************************************************************************
...
...
@@ -246,7 +250,7 @@ char * __config_GetPsz( vlc_object_t *p_this, const char *psz_name )
* represented by a string (CONFIG_ITEM_STRING, CONFIG_ITEM_FILE,
* CONFIG_ITEM_DIRECTORY, CONFIG_ITEM_PASSWORD, and CONFIG_ITEM_MODULE).
*****************************************************************************/
void
__
config_PutPsz
(
vlc_object_t
*
p_this
,
void
config_PutPsz
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
,
const
char
*
psz_value
)
{
module_config_t
*
p_config
;
...
...
@@ -294,6 +298,7 @@ void __config_PutPsz( vlc_object_t *p_this,
free
(
oldval
.
psz_string
);
}
#undef config_PutInt
/*****************************************************************************
* config_PutInt: set the integer value of an int variable
*****************************************************************************
...
...
@@ -301,7 +306,7 @@ void __config_PutPsz( vlc_object_t *p_this,
* represented by an integer (CONFIG_ITEM_INTEGER and
* CONFIG_ITEM_BOOL).
*****************************************************************************/
void
__
config_PutInt
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
,
int
i_value
)
void
config_PutInt
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
,
int
i_value
)
{
module_config_t
*
p_config
;
vlc_value_t
oldval
;
...
...
@@ -347,14 +352,15 @@ void __config_PutInt( vlc_object_t *p_this, const char *psz_name, int i_value )
}
}
#undef config_PutFloat
/*****************************************************************************
* config_PutFloat: set the value of a float variable
*****************************************************************************
* This function is used to set the value of variables which are internally
* represented by a float (CONFIG_ITEM_FLOAT).
*****************************************************************************/
void
__
config_PutFloat
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
,
float
f_value
)
void
config_PutFloat
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
,
float
f_value
)
{
module_config_t
*
p_config
;
vlc_value_t
oldval
;
...
...
@@ -544,10 +550,11 @@ void config_Free( module_t *p_module )
p_module
->
p_config
=
NULL
;
}
#undef config_ResetAll
/*****************************************************************************
* config_ResetAll: reset the configuration data for all the modules.
*****************************************************************************/
void
__
config_ResetAll
(
vlc_object_t
*
p_this
)
void
config_ResetAll
(
vlc_object_t
*
p_this
)
{
VLC_UNUSED
(
p_this
);
module_t
*
p_module
;
...
...
src/config/dirs.c
View file @
a87edce4
...
...
@@ -30,12 +30,13 @@
#include "configuration.h"
#undef config_GetDataDir
/**
* Determines the shared data directory
*
* @return a string or NULL. Use free() to release.
*/
char
*
__
config_GetDataDir
(
vlc_object_t
*
p_obj
)
char
*
config_GetDataDir
(
vlc_object_t
*
p_obj
)
{
char
*
psz_path
=
var_InheritString
(
p_obj
,
"data-path"
);
return
psz_path
?
psz_path
:
config_GetDataDirDefault
();
...
...
src/config/file.c
View file @
a87edce4
...
...
@@ -152,14 +152,14 @@ static int strtoi (const char *str)
return
(
int
)
l
;
}
#undef config_LoadConfigFile
/*****************************************************************************
* config_LoadConfigFile: loads the configuration file.
*****************************************************************************
* This function is called to load the config options stored in the config
* file.
*****************************************************************************/
int
__
config_LoadConfigFile
(
vlc_object_t
*
p_this
,
const
char
*
psz_module_name
)
int
config_LoadConfigFile
(
vlc_object_t
*
p_this
,
const
char
*
psz_module_name
)
{
FILE
*
file
;
...
...
@@ -760,7 +760,8 @@ int config_AutoSaveConfigFile( vlc_object_t *p_this )
return
ret
;
}
int
__config_SaveConfigFile
(
vlc_object_t
*
p_this
,
const
char
*
psz_module_name
)
#undef config_SaveConfigFile
int
config_SaveConfigFile
(
vlc_object_t
*
p_this
,
const
char
*
psz_module_name
)
{
return
SaveConfigFile
(
p_this
,
psz_module_name
,
false
);
}
src/config/intf.c
View file @
a87edce4
...
...
@@ -29,8 +29,9 @@
#include <assert.h>
#undef config_AddIntf
/* Adds an extra interface to the configuration */
void
__
config_AddIntf
(
vlc_object_t
*
p_this
,
const
char
*
psz_intf
)
void
config_AddIntf
(
vlc_object_t
*
p_this
,
const
char
*
psz_intf
)
{
assert
(
psz_intf
);
...
...
@@ -78,8 +79,9 @@ void __config_AddIntf( vlc_object_t *p_this, const char *psz_intf )
free
(
psz_config
);
}
#undef config_RemoveIntf
/* Removes an extra interface from the configuration */
void
__
config_RemoveIntf
(
vlc_object_t
*
p_this
,
const
char
*
psz_intf
)
void
config_RemoveIntf
(
vlc_object_t
*
p_this
,
const
char
*
psz_intf
)
{
assert
(
psz_intf
);
...
...
@@ -129,11 +131,12 @@ void __config_RemoveIntf( vlc_object_t *p_this, const char *psz_intf )
free
(
psz_config
);
}
#undef config_ExistIntf
/*
* Returns true if the specified extra interface is present in the
* configuration, false if not
*/
bool
__
config_ExistIntf
(
vlc_object_t
*
p_this
,
const
char
*
psz_intf
)
bool
config_ExistIntf
(
vlc_object_t
*
p_this
,
const
char
*
psz_intf
)
{
assert
(
psz_intf
);
...
...
src/libvlccore.sym
View file @
a87edce4
...
...
@@ -46,26 +46,26 @@ block_heap_Alloc
block_Init
block_mmap_Alloc
block_Realloc
__
config_AddIntf
config_AddIntf
config_ChainCreate
config_ChainDestroy
config_ChainDuplicate
__
config_ChainParse
__
config_ExistIntf
config_ChainParse
config_ExistIntf
config_FindConfig
config_GetConfDir
__
config_GetDataDir
__
config_GetFloat
config_GetDataDir
config_GetFloat
config_GetUserDir
__
config_GetInt
__
config_GetPsz
__
config_GetType
__
config_PutFloat
__
config_PutInt
__
config_PutPsz
__
config_RemoveIntf
__
config_ResetAll
__
config_SaveConfigFile
config_GetInt
config_GetPsz
config_GetType
config_PutFloat
config_PutInt
config_PutPsz
config_RemoveIntf
config_ResetAll
config_SaveConfigFile
config_StringEscape
config_StringUnescape
convert_xml_special_chars
...
...
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