[MPlayer-cvslog] r32386 - in trunk: m_config.c m_config.h
diego
subversion at mplayerhq.hu
Mon Sep 27 13:54:17 CEST 2010
Author: diego
Date: Mon Sep 27 13:54:17 2010
New Revision: 32386
Log:
Mark some function parameters that are not modified as const.
patch by Clément Bœsch, ubitux gmail com
Modified:
trunk/m_config.c
trunk/m_config.h
Modified: trunk/m_config.c
==============================================================================
--- trunk/m_config.c Mon Sep 27 10:35:33 2010 (r32385)
+++ trunk/m_config.c Mon Sep 27 13:54:17 2010 (r32386)
@@ -279,7 +279,7 @@ m_config_register_options(m_config_t *co
}
static m_config_option_t*
-m_config_get_co(m_config_t *config, char* arg) {
+m_config_get_co(const m_config_t *config, char *arg) {
m_config_option_t *co;
for(co = config->opts ; co ; co = co->next ) {
@@ -295,7 +295,7 @@ m_config_get_co(m_config_t *config, char
}
static int
-m_config_parse_option(m_config_t *config, char* arg, char* param,int set) {
+m_config_parse_option(const m_config_t *config, char *arg, char *param, int set) {
m_config_option_t *co;
int r = 0;
@@ -386,7 +386,7 @@ m_config_set_option(m_config_t *config,
}
int
-m_config_check_option(m_config_t *config, char* arg, char* param) {
+m_config_check_option(const m_config_t *config, char *arg, char *param) {
int r;
mp_msg(MSGT_CFGPARSER, MSGL_DBG2,"Checking %s=%s\n",arg,param);
r=m_config_parse_option(config,arg,param,0);
@@ -399,7 +399,7 @@ m_config_check_option(m_config_t *config
const m_option_t*
-m_config_get_option(m_config_t *config, char* arg) {
+m_config_get_option(const m_config_t *config, char *arg) {
m_config_option_t *co;
#ifdef MP_DEBUG
@@ -417,7 +417,7 @@ m_config_get_option(m_config_t *config,
void
-m_config_print_option_list(m_config_t *config) {
+m_config_print_option_list(const m_config_t *config) {
char min[50],max[50];
m_config_option_t* co;
int count = 0;
@@ -450,7 +450,7 @@ m_config_print_option_list(m_config_t *c
}
m_profile_t*
-m_config_get_profile(m_config_t* config, char* name) {
+m_config_get_profile(const m_config_t *config, char *name) {
m_profile_t* p;
for(p = config->profiles ; p ; p = p->next)
if(!strcmp(p->name,name)) return p;
Modified: trunk/m_config.h
==============================================================================
--- trunk/m_config.h Mon Sep 27 10:35:33 2010 (r32385)
+++ trunk/m_config.h Mon Sep 27 13:54:17 2010 (r32386)
@@ -156,20 +156,20 @@ m_config_set_option(m_config_t *config,
* \return See \ref OptionParserReturn.
*/
int
-m_config_check_option(m_config_t *config, char* arg, char* param);
+m_config_check_option(const m_config_t *config, char *arg, char *param);
/// Get the option matching the given name.
/** \param config The config object.
* \param arg The option's name.
*/
const struct m_option*
-m_config_get_option(m_config_t *config, char* arg);
+m_config_get_option(const m_config_t *config, char *arg);
/// Print a list of all registered options.
/** \param config The config object.
*/
void
-m_config_print_option_list(m_config_t *config);
+m_config_print_option_list(const m_config_t *config);
/// \addtogroup ConfigProfiles
///@{
@@ -180,7 +180,7 @@ m_config_print_option_list(m_config_t *c
* \return The profile object or NULL.
*/
m_profile_t*
-m_config_get_profile(m_config_t* config, char* name);
+m_config_get_profile(const m_config_t *config, char *name);
/// Get the profile with the given name, creating it if necessary.
/** \param config The config object.
More information about the MPlayer-cvslog
mailing list