Commit e634fbcf authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

const rulez

parent 8f1b2445
...@@ -113,18 +113,18 @@ ...@@ -113,18 +113,18 @@
struct config_category_t struct config_category_t
{ {
int i_id; int i_id;
char *psz_name; const char *psz_name;
char *psz_help; const char *psz_help;
}; };
struct module_config_t struct module_config_t
{ {
int i_type; /* Configuration type */ int i_type; /* Configuration type */
char *psz_type; /* Configuration subtype */ const char *psz_type; /* Configuration subtype */
char *psz_name; /* Option name */ const char *psz_name; /* Option name */
char i_short; /* Optional short option name */ char i_short; /* Optional short option name */
char *psz_text; /* Short comment on the configuration option */ const char *psz_text; /* Short comment on the configuration option */
char *psz_longtext; /* Long comment on the configuration option */ const char *psz_longtext; /* Long comment on the configuration option */
char *psz_value; /* Option value */ char *psz_value; /* Option value */
int i_value; /* Option value */ int i_value; /* Option value */
float f_value; /* Option value */ float f_value; /* Option value */
...@@ -138,18 +138,18 @@ struct module_config_t ...@@ -138,18 +138,18 @@ struct module_config_t
void *p_callback_data; void *p_callback_data;
/* Values list */ /* Values list */
char **ppsz_list; /* List of possible values for the option */ const char **ppsz_list; /* List of possible values for the option */
int *pi_list; /* Idem for integers */ int *pi_list; /* Idem for integers */
char **ppsz_list_text; /* Friendly names for list values */ const char **ppsz_list_text; /* Friendly names for list values */
int i_list; /* Options list size */ int i_list; /* Options list size */
/* Actions list */ /* Actions list */
vlc_callback_t *ppf_action; /* List of possible actions for a config */ vlc_callback_t *ppf_action; /* List of possible actions for a config */
char **ppsz_action_text; /* Friendly names for actions */ const char **ppsz_action_text; /* Friendly names for actions */
int i_action; /* actions list size */ int i_action; /* actions list size */
/* Deprecated */ /* Deprecated */
char *psz_current; /* Good option name */ const char *psz_current; /* Good option name */
vlc_bool_t b_strict; /* Transitionnal or strict */ vlc_bool_t b_strict; /* Transitionnal or strict */
/* Misc */ /* Misc */
vlc_mutex_t *p_lock; /* Lock to use when modifying the config */ vlc_mutex_t *p_lock; /* Lock to use when modifying the config */
...@@ -160,12 +160,12 @@ struct module_config_t ...@@ -160,12 +160,12 @@ struct module_config_t
/* to take effect */ /* to take effect */
/* Original option values */ /* Original option values */
char *psz_value_orig; const char *psz_value_orig;
int i_value_orig; int i_value_orig;
float f_value_orig; float f_value_orig;
/* Option values loaded from config file */ /* Option values loaded from config file */
char *psz_value_saved; const char *psz_value_saved;
int i_value_saved; int i_value_saved;
float f_value_saved; float f_value_saved;
vlc_bool_t b_autosave; /* Config will be auto-saved at exit time */ vlc_bool_t b_autosave; /* Config will be auto-saved at exit time */
......
...@@ -85,18 +85,18 @@ struct module_t ...@@ -85,18 +85,18 @@ struct module_t
/* /*
* Variables set by the module to identify itself * Variables set by the module to identify itself
*/ */
char *psz_shortname; /* Module name */ const char *psz_shortname; /* Module name */
char *psz_longname; /* Module descriptive name */ const char *psz_longname; /* Module descriptive name */
char *psz_help; /* Long help string for "special" modules */ const char *psz_help; /* Long help string for "special" modules */
/* /*
* Variables set by the module to tell us what it can do * Variables set by the module to tell us what it can do
*/ */
char *psz_program; /* Program name which will activate the module */ const char *psz_program; /* Program name which will activate the module */
char *pp_shortcuts[ MODULE_SHORTCUT_MAX ]; /* Shortcuts to the module */ const char *pp_shortcuts[ MODULE_SHORTCUT_MAX ]; /* Shortcuts to the module */
char *psz_capability; /* Capability */ const char *psz_capability; /* Capability */
int i_score; /* Score for each capability */ int i_score; /* Score for each capability */
uint32_t i_cpu; /* Required CPU capabilities */ uint32_t i_cpu; /* Required CPU capabilities */
......
...@@ -499,7 +499,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ ...@@ -499,7 +499,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
int i_object_id; \ int i_object_id; \
int i_object_type; \ int i_object_type; \
const char *psz_object_type; \ const char *psz_object_type; \
char *psz_object_name; \ const char *psz_object_name; \
\ \
/* Messages header */ \ /* Messages header */ \
char *psz_header; \ char *psz_header; \
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
typedef struct key_descriptor_s typedef struct key_descriptor_s
{ {
char *psz_key_string; const char *psz_key_string;
int i_key_code; int i_key_code;
} key_descriptor_t; } key_descriptor_t;
...@@ -188,7 +188,7 @@ static const struct key_descriptor_s vlc_keys[] = ...@@ -188,7 +188,7 @@ static const struct key_descriptor_s vlc_keys[] =
{ "Media Play Pause", KEY_MEDIA_PLAY_PAUSE } { "Media Play Pause", KEY_MEDIA_PLAY_PAUSE }
}; };
static inline char *KeyToString( int i_key ) static inline const char *KeyToString( int i_key )
{ {
unsigned int i = 0; unsigned int i = 0;
for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ ) for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ )
......
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
#include "vlc_meta.h" #include "vlc_meta.h"
#if defined (WIN32) || defined (__APPLE__) #if defined (WIN32) || defined (__APPLE__)
static char *ppsz_language[] = static const char *ppsz_language[] =
{ "auto", "en", "en_GB", "ca", "cs", "da", "de", "es", "fr", "gl", "he", "hu", { "auto", "en", "en_GB", "ca", "cs", "da", "de", "es", "fr", "gl", "he", "hu",
"it", "ja", "ka", "ko", "ms", "nl", "oc", "pt_BR", "ro", "ru", "sk", "sv", "tr", "it", "ja", "ka", "ko", "ms", "nl", "oc", "pt_BR", "ro", "ru", "sk", "sv", "tr",
"zh_CN", "zh_TW" }; "zh_CN", "zh_TW" };
static char *ppsz_language_text[] = static const char *ppsz_language_text[] =
{ N_("Auto"), N_("American English"), N_("British English"), { N_("Auto"), N_("American English"), N_("British English"),
N_("Catalan"), N_("Czech"), N_("Danish"), N_("German"), N_("Spanish"), N_("Catalan"), N_("Czech"), N_("Danish"), N_("German"), N_("Spanish"),
N_("French"), N_("Galician"), N_("Hebrew"), N_("Hungarian"),N_("Italian"), N_("French"), N_("Galician"), N_("Hebrew"), N_("Hungarian"),N_("Italian"),
...@@ -44,7 +44,7 @@ N_("Slovak"), N_("Turkish"), N_("Simplified Chinese"), ...@@ -44,7 +44,7 @@ N_("Slovak"), N_("Turkish"), N_("Simplified Chinese"),
N_("Chinese Traditional") }; N_("Chinese Traditional") };
#endif #endif
static char *ppsz_snap_formats[] = static const char *ppsz_snap_formats[] =
{ "png", "jpg" }; { "png", "jpg" };
/***************************************************************************** /*****************************************************************************
...@@ -199,7 +199,7 @@ static char *ppsz_snap_formats[] = ...@@ -199,7 +199,7 @@ static char *ppsz_snap_formats[] =
"enhance your experience, especially when combined with the Headphone "\ "enhance your experience, especially when combined with the Headphone "\
"Channel Mixer." ) "Channel Mixer." )
static int pi_force_dolby_values[] = { 0, 1, 2 }; static int pi_force_dolby_values[] = { 0, 1, 2 };
static char *ppsz_force_dolby_descriptions[] = { N_("Auto"), N_("On"), N_("Off") }; static const char *ppsz_force_dolby_descriptions[] = { N_("Auto"), N_("On"), N_("Off") };
#define AUDIO_FILTER_TEXT N_("Audio filters") #define AUDIO_FILTER_TEXT N_("Audio filters")
...@@ -264,7 +264,7 @@ static char *ppsz_force_dolby_descriptions[] = { N_("Auto"), N_("On"), N_("Off") ...@@ -264,7 +264,7 @@ static char *ppsz_force_dolby_descriptions[] = { N_("Auto"), N_("On"), N_("Off")
"will be centered (0=center, 1=left, 2=right, 4=top, 8=bottom, you can " \ "will be centered (0=center, 1=left, 2=right, 4=top, 8=bottom, you can " \
"also use combinations of these values, like 6=4+2 meaning top-right).") "also use combinations of these values, like 6=4+2 meaning top-right).")
static int pi_align_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; static int pi_align_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static char *ppsz_align_descriptions[] = static const char *ppsz_align_descriptions[] =
{ N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"),
N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") };
...@@ -419,7 +419,7 @@ static char *ppsz_align_descriptions[] = ...@@ -419,7 +419,7 @@ static char *ppsz_align_descriptions[] =
"are available in Advanced / Network Sync." ) "are available in Advanced / Network Sync." )
static int pi_clock_values[] = { -1, 0, 1 }; static int pi_clock_values[] = { -1, 0, 1 };
static char *ppsz_clock_descriptions[] = static const char *ppsz_clock_descriptions[] =
{ N_("Default"), N_("Disable"), N_("Enable") }; { N_("Default"), N_("Disable"), N_("Enable") };
#define SERVER_PORT_TEXT N_("UDP port") #define SERVER_PORT_TEXT N_("UDP port")
...@@ -948,7 +948,7 @@ static int pi_albumart_values[] = { ALBUM_ART_NEVER, ...@@ -948,7 +948,7 @@ static int pi_albumart_values[] = { ALBUM_ART_NEVER,
ALBUM_ART_WHEN_ASKED, ALBUM_ART_WHEN_ASKED,
ALBUM_ART_WHEN_PLAYED, ALBUM_ART_WHEN_PLAYED,
ALBUM_ART_ALL }; ALBUM_ART_ALL };
static char *ppsz_albumart_descriptions[] = static const char *ppsz_albumart_descriptions[] =
{ N_("Never download"), N_("Download when asked"), { N_("Never download"), N_("Download when asked"),
N_("Download when track starts playing"), N_("Download when track starts playing"),
N_("Download everything ASAP") }; N_("Download everything ASAP") };
...@@ -989,7 +989,7 @@ static char *ppsz_albumart_descriptions[] = ...@@ -989,7 +989,7 @@ static char *ppsz_albumart_descriptions[] =
"contents of a directory. \"Default\" means that the tree will only " \ "contents of a directory. \"Default\" means that the tree will only " \
"be used when really needed." ) "be used when really needed." )
static int pi_pltree_values[] = { 0, 1, 2 }; static int pi_pltree_values[] = { 0, 1, 2 };
static char *ppsz_pltree_descriptions[] = { N_("Default"), N_("Always"), N_("Never") }; static const char *ppsz_pltree_descriptions[] = { N_("Default"), N_("Always"), N_("Never") };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment