From: RĂ©mi Denis-Courmont Date: Tue, 27 May 2008 19:16:52 +0000 (+0300) Subject: A lot of missing const in options lists X-Git-Tag: 0.9.0-test0~650 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=5e15258c9ef28558fe2abc941fc1527e02b04c21;p=vlc A lot of missing const in options lists --- diff --git a/modules/access/bda/bda.c b/modules/access/bda/bda.c index b5d6572da7..32958518d0 100644 --- a/modules/access/bda/bda.c +++ b/modules/access/bda/bda.c @@ -59,7 +59,7 @@ static int Control( access_t *, int, va_list ); #define INVERSION_TEXT N_("Inversion mode") #define INVERSION_LONGTEXT N_("Inversion mode [0=off, 1=on, 2=auto]") static const int i_inversion_list[] = { -1, 0, 1, 2 }; -static const char *ppsz_inversion_text[] = { N_("Undefined"), N_("Off"), +static const char *const ppsz_inversion_text[] = { N_("Undefined"), N_("Off"), N_("On"), N_("Auto") }; #define PROBE_TEXT N_("Probe DVB card for capabilities") @@ -111,47 +111,47 @@ static const char *ppsz_inversion_text[] = { N_("Undefined"), N_("Off"), #define MODULATION_LONGTEXT N_("QAM constellation points " \ "[16, 32, 64, 128, 256]") static const int i_qam_list[] = { -1, 16, 32, 64, 128, 256 }; -static const char *ppsz_qam_text[] = { N_("Undefined"), N_("16"), N_("32"), - N_("64"), N_("128"), N_("256") }; +static const char *const ppsz_qam_text[] = { + N_("Undefined"), N_("16"), N_("32"), N_("64"), N_("128"), N_("256") }; /* Terrestrial */ #define CODE_RATE_HP_TEXT N_("Terrestrial high priority stream code rate (FEC)") #define CODE_RATE_HP_LONGTEXT N_("High Priority FEC Rate " \ "[Undefined,1/2,2/3,3/4,5/6,7/8]") static const int i_hp_fec_list[] = { -1, 1, 2, 3, 4, 5 }; -static const char *ppsz_hp_fec_text[] = { N_("Undefined"), N_("1/2"), N_("2/3"), - N_("3/4"), N_("5/6"), N_("7/8") }; +static const char *const ppsz_hp_fec_text[] = { + N_("Undefined"), N_("1/2"), N_("2/3"), N_("3/4"), N_("5/6"), N_("7/8") }; #define CODE_RATE_LP_TEXT N_("Terrestrial low priority stream code rate (FEC)") #define CODE_RATE_LP_LONGTEXT N_("Low Priority FEC Rate " \ "[Undefined,1/2,2/3,3/4,5/6,7/8]") static const int i_lp_fec_list[] = { -1, 1, 2, 3, 4, 5 }; -static const char *ppsz_lp_fec_text[] = { N_("Undefined"), N_("1/2"), N_("2/3"), - N_("3/4"), N_("5/6"), N_("7/8") }; +static const char *const ppsz_lp_fec_text[] = { + N_("Undefined"), N_("1/2"), N_("2/3"), N_("3/4"), N_("5/6"), N_("7/8") }; #define BANDWIDTH_TEXT N_("Terrestrial bandwidth") #define BANDWIDTH_LONGTEXT N_("Terrestrial bandwidth [0=auto,6,7,8 in MHz]") static const int i_band_list[] = { -1, 6, 7, 8 }; -static const char *ppsz_band_text[] = { N_("Undefined"), N_("6 MHz"), - N_("7 MHz"), N_("8 MHz") }; +static const char *const ppsz_band_text[] = { + N_("Undefined"), N_("6 MHz"), N_("7 MHz"), N_("8 MHz") }; #define GUARD_TEXT N_("Terrestrial guard interval") #define GUARD_LONGTEXT N_("Guard interval [Undefined,1/4,1/8,1/16,1/32]") static const int i_guard_list[] = { -1, 4, 8, 16, 32 }; -static const char *ppsz_guard_text[] = { N_("Undefined"), N_("1/4"), N_("1/8"), - N_("1/16"), N_("1/32") }; +static const char *const ppsz_guard_text[] = { + N_("Undefined"), N_("1/4"), N_("1/8"), N_("1/16"), N_("1/32") }; #define TRANSMISSION_TEXT N_("Terrestrial transmission mode") #define TRANSMISSION_LONGTEXT N_("Transmission mode [Undefined,2k,8k]") static const int i_transmission_list[] = { -1, 2, 8 }; -static const char *ppsz_transmission_text[] = { N_("Undefined"), N_("2k"), - N_("8k") }; +static const char *const ppsz_transmission_text[] = { + N_("Undefined"), N_("2k"), N_("8k") }; #define HIERARCHY_TEXT N_("Terrestrial hierarchy mode") #define HIERARCHY_LONGTEXT N_("Hierarchy alpha value [Undefined,1,2,4]") static const int i_hierarchy_list[] = { -1, 1, 2, 4 }; -static const char *ppsz_hierarchy_text[] = { N_("Undefined"), N_("1"), - N_("2"), N_("4") }; +static const char *const ppsz_hierarchy_text[] = { + N_("Undefined"), N_("1"), N_("2"), N_("4") }; /* BDA module additional DVB-S Parameters */ #define AZIMUTH_TEXT N_("Satellite Azimuth") @@ -163,8 +163,9 @@ static const char *ppsz_hierarchy_text[] = { N_("Undefined"), N_("1"), "Satellite Longitude in 10ths of degree, -ve=West") #define POLARISATION_TEXT N_("Satellite Polarisation") #define POLARISATION_LONGTEXT N_("Satellite Polarisation [H/V/L/R]") -static const char *ppsz_polar_list[] = { "H", "V", "L", "R" }; -static const char *ppsz_polar_text[] = { N_("Horizontal"), N_("Vertical"), +static const char *const ppsz_polar_list[] = { "H", "V", "L", "R" }; +static const char *const ppsz_polar_text[] = { + N_("Horizontal"), N_("Vertical"), N_("Circular Left"), N_("Circular Right") }; vlc_module_begin(); diff --git a/modules/access/cdda/cdda.c b/modules/access/cdda/cdda.c index d1c44ae20d..9bbcc29217 100644 --- a/modules/access/cdda/cdda.c +++ b/modules/access/cdda/cdda.c @@ -39,8 +39,8 @@ *****************************************************************************/ #if LIBCDIO_VERSION_NUM >= 72 -static const char *psz_paranoia_list[] = { "none", "overlap", "full" }; -static const char *psz_paranoia_list_text[] = { N_("none"), N_("overlap"), +static const char *const psz_paranoia_list[] = { "none", "overlap", "full" }; +static const char *const psz_paranoia_list_text[] = { N_("none"), N_("overlap"), N_("full") }; #endif diff --git a/modules/access/directory.c b/modules/access/directory.c index 0fb421aebb..1e41dec79c 100644 --- a/modules/access/directory.c +++ b/modules/access/directory.c @@ -79,9 +79,9 @@ static int DemuxOpen ( vlc_object_t * ); "collapse: subdirectories appear but are expanded on first play.\n" \ "expand: all subdirectories are expanded.\n" ) -static const char *psz_recursive_list[] = { "none", "collapse", "expand" }; -static const char *psz_recursive_list_text[] = { N_("none"), N_("collapse"), - N_("expand") }; +static const char *const psz_recursive_list[] = { "none", "collapse", "expand" }; +static const char *const psz_recursive_list_text[] = { + N_("none"), N_("collapse"), N_("expand") }; #define IGNORE_TEXT N_("Ignored extensions") #define IGNORE_LONGTEXT N_( \ diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp index 64f07843d5..a52b56b764 100644 --- a/modules/access/dshow/dshow.cpp +++ b/modules/access/dshow/dshow.cpp @@ -77,19 +77,19 @@ static void ConfigTuner( vlc_object_t *, ICaptureGraphBuilder2 *, /***************************************************************************** * Module descriptor *****************************************************************************/ -static const char *ppsz_vdev[] = { "", "none" }; -static const char *ppsz_vdev_text[] = { N_("Default"), N_("None") }; -static const char *ppsz_adev[] = { "", "none" }; -static const char *ppsz_adev_text[] = { N_("Default"), N_("None") }; -static int pi_tuner_input[] = { 0, 1, 2 }; -static const char *ppsz_tuner_input_text[] = +static const char *const ppsz_vdev[] = { "", "none" }; +static const char *const ppsz_vdev_text[] = { N_("Default"), N_("None") }; +static const char *const ppsz_adev[] = { "", "none" }; +static const char *const ppsz_adev_text[] = { N_("Default"), N_("None") }; +static const int pi_tuner_input[] = { 0, 1, 2 }; +static const char *const ppsz_tuner_input_text[] = {N_("Default"), N_("Cable"), N_("Antenna")}; static const int pi_amtuner_mode[] = { AMTUNER_MODE_DEFAULT, AMTUNER_MODE_TV, AMTUNER_MODE_FM_RADIO, AMTUNER_MODE_AM_RADIO, AMTUNER_MODE_DSS }; -static const char *ppsz_amtuner_mode_text[] = { N_("Default"), +static const char *const ppsz_amtuner_mode_text[] = { N_("Default"), N_("TV"), N_("FM radio"), N_("AM radio"), diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c index 43bd24734f..12f7530d2a 100644 --- a/modules/access/dvdread.c +++ b/modules/access/dvdread.c @@ -87,8 +87,8 @@ "libcss.\n" \ "The default method is: key.") -static const char *psz_css_list[] = { "title", "disc", "key" }; -static const char *psz_css_list_text[] = { N_("title"), N_("Disc"), N_("Key") }; +static const char *const psz_css_list[] = { "title", "disc", "key" }; +static const char *const psz_css_list_text[] = { N_("title"), N_("Disc"), N_("Key") }; static int Open ( vlc_object_t * ); static void Close( vlc_object_t * ); diff --git a/modules/access/pvr.c b/modules/access/pvr.c index fe76771a31..4bb300e2c3 100644 --- a/modules/access/pvr.c +++ b/modules/access/pvr.c @@ -114,15 +114,15 @@ static void Close( vlc_object_t * ); #define CHAN_LONGTEXT N_( "Channel of the card to use (Usually, 0 = tuner, " \ "1 = composite, 2 = svideo)" ) -static int i_norm_list[] = +static const int i_norm_list[] = { V4L2_STD_UNKNOWN, V4L2_STD_SECAM, V4L2_STD_PAL, V4L2_STD_NTSC }; -static const char *psz_norm_list_text[] = +static const char *const psz_norm_list_text[] = { N_("Automatic"), N_("SECAM"), N_("PAL"), N_("NTSC") }; -static int i_bitrates[] = { 0, 1 }; -static const char *psz_bitrates_list_text[] = { N_("vbr"), N_("cbr") }; +static const int i_bitrates[] = { 0, 1 }; +static const char *const psz_bitrates_list_text[] = { N_("vbr"), N_("cbr") }; -static int pi_radio_range[2] = { 65000, 108000 }; +static const int pi_radio_range[2] = { 65000, 108000 }; vlc_module_begin(); set_shortname( N_("PVR") ); diff --git a/modules/access/v4l.c b/modules/access/v4l.c index 32f800e394..a1ffaf1aa3 100644 --- a/modules/access/v4l.c +++ b/modules/access/v4l.c @@ -143,7 +143,7 @@ static void Close( vlc_object_t * ); static int i_norm_list[] = { VIDEO_MODE_AUTO, VIDEO_MODE_SECAM, VIDEO_MODE_PAL, VIDEO_MODE_NTSC }; -static const char *psz_norm_list_text[] = +static const char *const psz_norm_list_text[] = { N_("Automatic"), N_("SECAM"), N_("PAL"), N_("NTSC") }; vlc_module_begin(); diff --git a/modules/access/v4l2/v4l2.c b/modules/access/v4l2/v4l2.c index 98167aafb2..df497733bb 100644 --- a/modules/access/v4l2/v4l2.c +++ b/modules/access/v4l2/v4l2.c @@ -240,21 +240,21 @@ typedef enum { IO_METHOD_USERPTR, } io_method; -static int i_standards_list[] = +static const int i_standards_list[] = { V4L2_STD_UNKNOWN, V4L2_STD_SECAM, V4L2_STD_PAL, V4L2_STD_NTSC }; -static const char *psz_standards_list_text[] = +static const char *const psz_standards_list_text[] = { N_("Default"), N_("SECAM"), N_("PAL"), N_("NTSC") }; -static int i_iomethod_list[] = +static const int i_iomethod_list[] = { IO_METHOD_READ, IO_METHOD_MMAP, IO_METHOD_USERPTR }; -static const char *psz_iomethod_list_text[] = +static const char *const psz_iomethod_list_text[] = { N_("READ"), N_("MMAP"), N_("USERPTR") }; -static int i_tuner_audio_modes_list[] = +static const int i_tuner_audio_modes_list[] = { V4L2_TUNER_MODE_MONO, V4L2_TUNER_MODE_STEREO, V4L2_TUNER_MODE_LANG1, V4L2_TUNER_MODE_LANG2, V4L2_TUNER_MODE_SAP, V4L2_TUNER_MODE_LANG1_LANG2 }; -static const char *psz_tuner_audio_modes_list_text[] = +static const char *const psz_tuner_audio_modes_list_text[] = { N_( "Mono" ), N_( "Stereo" ), N_( "Primary language (Analog TV tuners only)" ), diff --git a/modules/access_output/file.c b/modules/access_output/file.c index eac4d116b7..d5ad889a74 100644 --- a/modules/access_output/file.c +++ b/modules/access_output/file.c @@ -81,7 +81,7 @@ vlc_module_end(); /***************************************************************************** * Exported prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "append", NULL }; diff --git a/modules/access_output/http.c b/modules/access_output/http.c index 77e4a8042b..7f2de0d1a7 100644 --- a/modules/access_output/http.c +++ b/modules/access_output/http.c @@ -123,7 +123,7 @@ vlc_module_end(); /***************************************************************************** * Exported prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "user", "pwd", "mime", "cert", "key", "ca", "crl", NULL }; diff --git a/modules/access_output/shout.c b/modules/access_output/shout.c index 176f095089..169aeaeb50 100644 --- a/modules/access_output/shout.c +++ b/modules/access_output/shout.c @@ -140,7 +140,7 @@ vlc_module_end(); /***************************************************************************** * Exported prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "name", "description", "mp3", "genre", "url", "bitrate", "samplerate", "channels", "quality", "public", NULL }; diff --git a/modules/audio_filter/channel_mixer/mono.c b/modules/audio_filter/channel_mixer/mono.c index 655c17b865..eff910ca79 100644 --- a/modules/audio_filter/channel_mixer/mono.c +++ b/modules/audio_filter/channel_mixer/mono.c @@ -97,7 +97,7 @@ struct filter_sys_t "2=rear left, 3=rear right, 4=center, 5=left front)") static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5 }; -static const char *ppsz_pos_descriptions[] = +static const char *const ppsz_pos_descriptions[] = { N_("Left"), N_("Right"), N_("Left rear"), N_("Right rear"), N_("Center"), N_("Left front") }; diff --git a/modules/audio_filter/equalizer_presets.h b/modules/audio_filter/equalizer_presets.h index 6c1f2f1b7f..1e52d94cb9 100644 --- a/modules/audio_filter/equalizer_presets.h +++ b/modules/audio_filter/equalizer_presets.h @@ -31,12 +31,12 @@ #define EQZ_BANDS_MAX 10 #define NB_PRESETS 18 -static const char *preset_list[] = { +static const char *const preset_list[] = { "flat", "classical", "club", "dance", "fullbass", "fullbasstreble", "fulltreble", "headphones","largehall", "live", "party", "pop", "reggae", "rock", "ska", "soft", "softrock", "techno" }; -static const char *preset_list_text[] = { +static const char *const preset_list_text[] = { N_("Flat"), N_("Classical"), N_("Club"), N_("Dance"), N_("Full bass"), N_("Full bass and treble"), N_("Full treble"), N_("Headphones"), N_("Large Hall"), N_("Live"), N_("Party"), N_("Pop"), N_("Reggae"), diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c index 13a2255864..1dbc2c6fd3 100644 --- a/modules/audio_output/alsa.c +++ b/modules/audio_output/alsa.c @@ -101,8 +101,8 @@ static int FindDevicesCallback( vlc_object_t *p_this, char const *psz_name, /***************************************************************************** * Module descriptor *****************************************************************************/ -static const char *ppsz_devices[] = { "default" }; -static const char *ppsz_devices_text[] = { N_("Default") }; +static const char *const ppsz_devices[] = { "default" }; +static const char *const ppsz_devices_text[] = { N_("Default") }; vlc_module_begin(); set_shortname( "ALSA" ); set_description( N_("ALSA audio output") ); diff --git a/modules/audio_output/file.c b/modules/audio_output/file.c index 3dcddb0b9a..0c877eb439 100644 --- a/modules/audio_output/file.c +++ b/modules/audio_output/file.c @@ -91,19 +91,19 @@ static void Play ( aout_instance_t * ); #define WAV_LONGTEXT N_("Instead of writing a raw file, you can add a WAV " \ "header to the file.") -static const char *format_list[] = { "u8", "s8", "u16", "s16", "u16_le", +static const char *const format_list[] = { "u8", "s8", "u16", "s16", "u16_le", "s16_le", "u16_be", "s16_be", "fixed32", "float32", "spdif" }; -static int format_int[] = { VLC_FOURCC('u','8',' ',' '), - VLC_FOURCC('s','8',' ',' '), - AOUT_FMT_U16_NE, AOUT_FMT_S16_NE, - VLC_FOURCC('u','1','6','l'), - VLC_FOURCC('s','1','6','l'), - VLC_FOURCC('u','1','6','b'), - VLC_FOURCC('s','1','6','b'), - VLC_FOURCC('f','i','3','2'), - VLC_FOURCC('f','l','3','2'), - VLC_FOURCC('s','p','i','f') }; +static const int format_int[] = { VLC_FOURCC('u','8',' ',' '), + VLC_FOURCC('s','8',' ',' '), + AOUT_FMT_U16_NE, AOUT_FMT_S16_NE, + VLC_FOURCC('u','1','6','l'), + VLC_FOURCC('s','1','6','l'), + VLC_FOURCC('u','1','6','b'), + VLC_FOURCC('s','1','6','b'), + VLC_FOURCC('f','i','3','2'), + VLC_FOURCC('f','l','3','2'), + VLC_FOURCC('s','p','i','f') }; #define FILE_TEXT N_("Output file") #define FILE_LONGTEXT N_("File to which the audio samples will be written to. (\"-\" for stdout") diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c index 4f1c28f01f..93be9c2acf 100644 --- a/modules/audio_output/waveout.c +++ b/modules/audio_output/waveout.c @@ -144,8 +144,8 @@ static uint32_t findDeviceID(char *); static const char psz_device_name_fmt[] = "%s ($%x,$%x)"; -static const char *ppsz_adev[] = { "wavemapper", }; -static const char *ppsz_adev_text[] = { N_("Microsoft Soundmapper") }; +static const char *const ppsz_adev[] = { "wavemapper", }; +static const char *const ppsz_adev_text[] = { N_("Microsoft Soundmapper") }; diff --git a/modules/codec/dirac.c b/modules/codec/dirac.c index cb5d8b5436..8c7818a1a9 100644 --- a/modules/codec/dirac.c +++ b/modules/codec/dirac.c @@ -62,7 +62,7 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict ); #define ENC_CFG_PREFIX "sout-dirac-" -static const char *ppsz_enc_options[] = { +static const char *const ppsz_enc_options[] = { "quality", NULL }; diff --git a/modules/codec/dvbsub.c b/modules/codec/dvbsub.c index 48faa8afe0..6424859779 100644 --- a/modules/codec/dvbsub.c +++ b/modules/codec/dvbsub.c @@ -70,8 +70,8 @@ #define ENC_POSY_TEXT N_("Encoding Y coordinate") #define ENC_POSY_LONGTEXT N_("Y coordinate of the encoded subtitle" ) -static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; -static const char *ppsz_pos_descriptions[] = +static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; +static const char *const ppsz_pos_descriptions[] = { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; @@ -110,7 +110,7 @@ vlc_module_begin(); add_obsolete_integer( ENC_CFG_PREFIX "timeout" ); /* Suppressed since 0.8.5 */ vlc_module_end(); -static const char *ppsz_enc_options[] = { "x", "y", NULL }; +static const char *const ppsz_enc_options[] = { "x", "y", NULL }; /**************************************************************************** * Local structures diff --git a/modules/codec/fake.c b/modules/codec/fake.c index 2e4c589b94..eddb2b0cc3 100644 --- a/modules/codec/fake.c +++ b/modules/codec/fake.c @@ -78,7 +78,7 @@ static int FakeCallback( vlc_object_t *, char const *, #define CHROMA_LONGTEXT N_( \ "Force use of a specific chroma for output. Default is I420." ) -static const char *ppsz_deinterlace_type[] = +static const char *const ppsz_deinterlace_type[] = { "deinterlace", "ffmpeg-deinterlace" }; diff --git a/modules/codec/ffmpeg/encoder.c b/modules/codec/ffmpeg/encoder.c index f48d0ab0b3..ea413d3b90 100644 --- a/modules/codec/ffmpeg/encoder.c +++ b/modules/codec/ffmpeg/encoder.c @@ -149,7 +149,7 @@ struct encoder_sys_t mtime_t pi_delay_pts[MAX_FRAME_DELAY]; }; -static const char *ppsz_enc_options[] = { +static const char *const ppsz_enc_options[] = { "keyint", "bframes", "vt", "qmin", "qmax", "hq", "strict-rc", "rc-buffer-size", "rc-buffer-aggressivity", "pre-me", "hurry-up", "interlace", "i-quant-factor", "noise-reduction", "mpeg4-matrix", diff --git a/modules/codec/ffmpeg/ffmpeg.c b/modules/codec/ffmpeg/ffmpeg.c index 7c7d86ece7..69dca5425c 100644 --- a/modules/codec/ffmpeg/ffmpeg.c +++ b/modules/codec/ffmpeg/ffmpeg.c @@ -70,18 +70,19 @@ struct decoder_sys_t static int OpenDecoder( vlc_object_t * ); static void CloseDecoder( vlc_object_t * ); -static int nloopf_list[] = { 0, 1, 2, 3, 4 }; -static const char *nloopf_list_text[] = +static const int nloopf_list[] = { 0, 1, 2, 3, 4 }; +static const char *const nloopf_list_text[] = { N_("None"), N_("Non-ref"), N_("Bidir"), N_("Non-key"), N_("All") }; #ifdef ENABLE_SOUT -static const char *enc_hq_list[] = { "rd", "bits", "simple" }; -static const char *enc_hq_list_text[] = { N_("rd"), N_("bits"), N_("simple") }; +static const char *const enc_hq_list[] = { "rd", "bits", "simple" }; +static const char *const enc_hq_list_text[] = { + N_("rd"), N_("bits"), N_("simple") }; #endif #if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H) -static int pi_mode_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; -static const char *ppsz_mode_descriptions[] = +static const int pi_mode_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; +static const char *const ppsz_mode_descriptions[] = { N_("Fast bilinear"), N_("Bilinear"), N_("Bicubic (good quality)"), N_("Experimental"), N_("Nearest neighbour (bad quality)"), N_("Area"), N_("Luma bicubic / chroma bilinear"), N_("Gauss"), diff --git a/modules/codec/ffmpeg/mux.c b/modules/codec/ffmpeg/mux.c index 107077f6e1..7ed78ad357 100644 --- a/modules/codec/ffmpeg/mux.c +++ b/modules/codec/ffmpeg/mux.c @@ -47,7 +47,7 @@ /* Version checking */ #if defined(HAVE_LIBAVFORMAT_AVFORMAT_H) || defined(HAVE_FFMPEG_AVFORMAT_H) -static const char *ppsz_mux_options[] = { +static const char *const ppsz_mux_options[] = { "mux", NULL }; diff --git a/modules/codec/subtitles/subsdec.c b/modules/codec/subtitles/subsdec.c index 76114f06ef..cfb83a6e3d 100644 --- a/modules/codec/subtitles/subsdec.c +++ b/modules/codec/subtitles/subsdec.c @@ -49,7 +49,8 @@ static char *CreateHtmlSubtitle ( char * ); /***************************************************************************** * Module descriptor. *****************************************************************************/ -static const char *ppsz_encodings[] = { DEFAULT_NAME, "ASCII", "UTF-8", "", +static const char *const ppsz_encodings[] = { + DEFAULT_NAME, "ASCII", "UTF-8", "", "ISO-8859-1", "CP1252", "MacRoman", "MacIceland","ISO-8859-15", "", "ISO-8859-2", "CP1250", "MacCentralEurope", "MacCroatian", "MacRomania", "", "ISO-8859-5", "CP1251", "MacCyrillic", "MacUkraine", "KOI8-R", "KOI8-U", "KOI8-RU", "", @@ -96,8 +97,9 @@ The following known charsets are used: 254 = PC 437 */ -static int pi_justification[] = { 0, 1, 2 }; -static const char *ppsz_justification_text[] = {N_("Center"),N_("Left"),N_("Right")}; +static const int pi_justification[] = { 0, 1, 2 }; +static const char *const ppsz_justification_text[] = { + N_("Center"),N_("Left"),N_("Right")}; #define ENCODING_TEXT N_("Subtitles text encoding") #define ENCODING_LONGTEXT N_("Set the encoding used in text subtitles") diff --git a/modules/codec/theora.c b/modules/codec/theora.c index 6e90e9480a..dffc28d221 100644 --- a/modules/codec/theora.c +++ b/modules/codec/theora.c @@ -121,7 +121,7 @@ vlc_module_begin(); ENC_QUALITY_LONGTEXT, false ); vlc_module_end(); -static const char *ppsz_enc_options[] = { +static const char *const ppsz_enc_options[] = { "quality", NULL }; diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c index ee784583dc..cdd8251a72 100644 --- a/modules/codec/twolame.c +++ b/modules/codec/twolame.c @@ -66,8 +66,8 @@ static block_t *Encode ( encoder_t *, aout_buffer_t * ); #define ENC_PSY_LONGTEXT N_( \ "Integer from -1 (no model) to 4." ) -static int pi_stereo_values[] = { 0, 1, 2 }; -static char *ppsz_stereo_descriptions[] = +static const int pi_stereo_values[] = { 0, 1, 2 }; +static const char *const ppsz_stereo_descriptions[] = { N_("Stereo"), N_("Dual mono"), N_("Joint stereo") }; @@ -90,7 +90,7 @@ vlc_module_begin(); ENC_PSY_LONGTEXT, false ); vlc_module_end(); -static const char *ppsz_enc_options[] = { +static const char *const ppsz_enc_options[] = { "quality", "mode", "vbr", "psy", NULL }; diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c index 0ecb5da947..a9a7784417 100644 --- a/modules/codec/vorbis.c +++ b/modules/codec/vorbis.c @@ -223,7 +223,7 @@ vlc_module_begin(); vlc_module_end(); #ifndef MODULE_NAME_IS_tremor -static const char *ppsz_enc_options[] = { +static const char *const ppsz_enc_options[] = { "quality", "max-bitrate", "min-bitrate", "cbr", NULL }; #endif diff --git a/modules/codec/x264.c b/modules/codec/x264.c index fef80c2d34..49c2081979 100644 --- a/modules/codec/x264.c +++ b/modules/codec/x264.c @@ -373,33 +373,33 @@ static void Close( vlc_object_t * ); #define AUD_LONGTEXT N_( "Generate access unit delimiter NAL units.") #if X264_BUILD >= 24 && X264_BUILD < 58 -static const char *enc_me_list[] = +static const char *const enc_me_list[] = { "dia", "hex", "umh", "esa" }; -static const char *enc_me_list_text[] = +static const char *const enc_me_list_text[] = { N_("dia"), N_("hex"), N_("umh"), N_("esa") }; #endif #if X264_BUILD >= 58 /* r728 */ -static const char *enc_me_list[] = +static const char *const enc_me_list[] = { "dia", "hex", "umh", "esa", "tesa" }; -static const char *enc_me_list_text[] = +static const char *const enc_me_list_text[] = { N_("dia"), N_("hex"), N_("umh"), N_("esa"), N_("tesa") }; #endif -static const char *enc_analyse_list[] = +static const char *const enc_analyse_list[] = { "none", "fast", "normal", "slow", "all" }; -static const char *enc_analyse_list_text[] = +static const char *const enc_analyse_list_text[] = { N_("none"), N_("fast"), N_("normal"), N_("slow"), N_("all") }; #if X264_BUILD >= 45 /* r457 */ -static const char *direct_pred_list[] = +static const char *const direct_pred_list[] = { "none", "spatial", "temporal", "auto" }; -static const char *direct_pred_list_text[] = +static const char *const direct_pred_list_text[] = { N_("none"), N_("spatial"), N_("temporal"), N_("auto") }; #else -static const char *direct_pred_list[] = +static const char *const direct_pred_list[] = { "none", "spatial", "temporal" }; -static const char *direct_pred_list_text[] = +static const char *const direct_pred_list_text[] = { N_("none"), N_("spatial"), N_("temporal") }; #endif @@ -690,7 +690,7 @@ vlc_module_end(); /***************************************************************************** * Local prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "8x8dct", "analyse", "asm", "aud", "bframes", "bime", "bpyramid", "b-adapt", "b-bias", "b-rdo", "cabac", "chroma-me", "chroma-qp-offset", "cplxblur", "crf", "dct-decimate", "deadzone-inter", "deadzone-intra", diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c index 05b9c6581d..97df63ada4 100644 --- a/modules/codec/zvbi.c +++ b/modules/codec/zvbi.c @@ -96,14 +96,14 @@ static subpicture_t *Decode( decoder_t *, block_t ** ); // #define ZVBI_DEBUG -static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; -static const char *ppsz_pos_descriptions[] = +static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; +static const char *const ppsz_pos_descriptions[] = { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; vlc_module_begin(); set_description( N_("VBI and Teletext decoder") ); - set_shortname( "VBI & Teletext" ); + set_shortname( N_("VBI & Teletext") ); set_capability( "decoder", 51 ); set_category( CAT_INPUT ); set_subcategory( SUBCAT_INPUT_SCODEC ); diff --git a/modules/control/gestures.c b/modules/control/gestures.c index 79ffb5347e..e92624657b 100644 --- a/modules/control/gestures.c +++ b/modules/control/gestures.c @@ -87,8 +87,8 @@ static void RunIntf ( intf_thread_t *p_intf ); #define BUTTON_LONGTEXT N_( \ "Trigger button for mouse gestures." ) -static const char *button_list[] = { "left", "middle", "right" }; -static const char *button_list_text[] = +static const char *const button_list[] = { "left", "middle", "right" }; +static const char *const button_list_text[] = { N_("Left"), N_("Middle"), N_("Right") }; vlc_module_begin(); diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c index 7256f9ace9..ab34db7848 100644 --- a/modules/demux/avi/avi.c +++ b/modules/demux/avi/avi.c @@ -55,9 +55,9 @@ static int Open ( vlc_object_t * ); static void Close( vlc_object_t * ); -static int pi_index[] = {0,1,2}; +static const int pi_index[] = {0,1,2}; -static const char *ppsz_indexes[] = { N_("Ask"), N_("Always fix"), +static const char *const ppsz_indexes[] = { N_("Ask"), N_("Always fix"), N_("Never fix") }; vlc_module_begin(); diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c index af09d58889..48486623b9 100644 --- a/modules/demux/subtitle.c +++ b/modules/demux/subtitle.c @@ -62,7 +62,7 @@ static void Close( vlc_object_t *p_this ); "\"mpsub\", \"jacosub\", \"psb\", \"realtext\", \"dks\", \"subviewer1\", " \ " and \"auto\" (meaning autodetection, this should always work).") -static const char *ppsz_sub_type[] = +static const char *const ppsz_sub_type[] = { "auto", "microdvd", "subrip", "subviewer", "ssa1", "ssa2-4", "ass", "vplayer", "sami", "dvdsubtitle", "mpl2", diff --git a/modules/gui/fbosd.c b/modules/gui/fbosd.c index ec58670475..a886949d1e 100644 --- a/modules/gui/fbosd.c +++ b/modules/gui/fbosd.c @@ -159,16 +159,18 @@ static picture_t *RenderText( intf_thread_t *, const char *, #define DISPLAY_LONGTEXT N_( "All rendered images and text will be " \ "displayed on the overlay framebuffer." ) -static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; -static const char *ppsz_pos_descriptions[] = +static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; +static const char *const ppsz_pos_descriptions[] = { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; -static int pi_color_values[] = { 0xf0000000, 0x00000000, 0x00808080, 0x00C0C0C0, +static const int pi_color_values[] = { + 0xf0000000, 0x00000000, 0x00808080, 0x00C0C0C0, 0x00FFFFFF, 0x00800000, 0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x00808000, 0x00008000, 0x00008080, 0x0000FF00, 0x00800080, 0x00000080, 0x000000FF, 0x0000FFFF}; -static const char *ppsz_color_descriptions[] = { N_("Default"), N_("Black"), +static const char *const ppsz_color_descriptions[] = { + N_("Default"), N_("Black"), N_("Gray"), N_("Silver"), N_("White"), N_("Maroon"), N_("Red"), N_("Fuchsia"), N_("Yellow"), N_("Olive"), N_("Green"), N_("Teal"), N_("Lime"), N_("Purple"), N_("Navy"), N_("Blue"), diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp index 28b4c7cb70..97ea6266bd 100644 --- a/modules/gui/qt4/qt4.cpp +++ b/modules/gui/qt4/qt4.cpp @@ -131,14 +131,14 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); #define QT_ALWAYS_VIDEO_MODE_TEXT N_( "Complete look with information area" ) #define QT_MINIMAL_MODE_TEXT N_( "Minimal look with no menus" ) -static int i_mode_list[] = +static const int i_mode_list[] = { QT_NORMAL_MODE, QT_ALWAYS_VIDEO_MODE, QT_MINIMAL_MODE }; -static const char *psz_mode_list_text[] = +static const char *const psz_mode_list_text[] = { QT_NORMAL_MODE_TEXT, QT_ALWAYS_VIDEO_MODE_TEXT, QT_MINIMAL_MODE_TEXT }; vlc_module_begin(); - set_shortname( (char *)"Qt" ); - set_description( (char*)_("Qt interface") ); + set_shortname( "Qt" ); + set_description( N_("Qt interface") ); set_category( CAT_INTERFACE ) ; set_subcategory( SUBCAT_INTERFACE_MAIN ); set_capability( "interface", 151 ); diff --git a/modules/gui/wxwidgets/wxwidgets.cpp b/modules/gui/wxwidgets/wxwidgets.cpp index 715a43b772..95add92fe7 100644 --- a/modules/gui/wxwidgets/wxwidgets.cpp +++ b/modules/gui/wxwidgets/wxwidgets.cpp @@ -112,17 +112,16 @@ private: "less features). You can select which one will be available " \ "on the toolbar (or both)." ) -static int pi_playlist_views[] = { 0,1,2 }; -static const char *psz_playlist_views[] = { N_("Normal" ), N_("Embedded" ) , - N_("Both") }; +static const int pi_playlist_views[] = { 0,1,2 }; +static const char *const psz_playlist_views[] = { + N_("Normal" ), N_("Embedded" ), N_("Both") }; vlc_module_begin(); - int i_score = 150; - set_shortname( (char*) "wxWidgets" ); - set_description( (char *) _("wxWidgets interface module") ); + set_shortname( "wxWidgets" ); + set_description( N_("wxWidgets interface module") ); set_category( CAT_INTERFACE ); set_subcategory( SUBCAT_INTERFACE_MAIN ); - set_capability( "interface", i_score ); + set_capability( "interface", 150 ); set_callbacks( Open, Close ); add_shortcut( "wxwindows" ); add_shortcut( "wxwin" ); @@ -191,10 +190,7 @@ static int Open( vlc_object_t *p_this ) /* Allocate instance and initialize some members */ p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) - { - msg_Err( p_intf, "out of memory" ); return VLC_ENOMEM; - } memset( p_intf->p_sys, 0, sizeof( intf_sys_t ) ); p_intf->pf_run = Run; diff --git a/modules/misc/freetype.c b/modules/misc/freetype.c index f90ac48ab9..573c57d100 100644 --- a/modules/misc/freetype.c +++ b/modules/misc/freetype.c @@ -127,9 +127,9 @@ static void YUVFromRGB( uint32_t i_argb, "fonts that will be rendered on the video. If absolute font size is set, "\ "relative size will be overriden." ) -static int pi_sizes[] = { 20, 18, 16, 12, 6 }; -static const char *ppsz_sizes_text[] = { N_("Smaller"), N_("Small"), N_("Normal"), - N_("Large"), N_("Larger") }; +static const int pi_sizes[] = { 20, 18, 16, 12, 6 }; +static const char *const ppsz_sizes_text[] = { + N_("Smaller"), N_("Small"), N_("Normal"), N_("Large"), N_("Larger") }; #define YUVP_TEXT N_("Use YUVP renderer") #define YUVP_LONGTEXT N_("This renders the font using \"paletized YUV\". " \ "This option is only needed if you want to encode into DVB subtitles" ) @@ -141,15 +141,15 @@ static const char *ppsz_sizes_text[] = { N_("Smaller"), N_("Small"), N_("Normal" #define EFFECT_OUTLINE 2 #define EFFECT_OUTLINE_FAT 3 -static int pi_effects[] = { 1, 2, 3 }; -static const char *ppsz_effects_text[] = { N_("Background"),N_("Outline"), - N_("Fat Outline") }; -static int pi_color_values[] = { +static int const pi_effects[] = { 1, 2, 3 }; +static const char *const ppsz_effects_text[] = { + N_("Background"),N_("Outline"), N_("Fat Outline") }; +static const int pi_color_values[] = { 0x00000000, 0x00808080, 0x00C0C0C0, 0x00FFFFFF, 0x00800000, 0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x00808000, 0x00008000, 0x00008080, 0x0000FF00, 0x00800080, 0x00000080, 0x000000FF, 0x0000FFFF }; -static const char *ppsz_color_descriptions[] = { +static const char *const ppsz_color_descriptions[] = { N_("Black"), N_("Gray"), N_("Silver"), N_("White"), N_("Maroon"), N_("Red"), N_("Fuchsia"), N_("Yellow"), N_("Olive"), N_("Green"), N_("Teal"), N_("Lime"), N_("Purple"), N_("Navy"), N_("Blue"), N_("Aqua") }; diff --git a/modules/misc/logger.c b/modules/misc/logger.c index 2cf84a740f..d454a074fd 100644 --- a/modules/misc/logger.c +++ b/modules/misc/logger.c @@ -111,12 +111,12 @@ static void DoRRD( intf_thread_t *p_intf ); /***************************************************************************** * Module descriptor *****************************************************************************/ -static const char *mode_list[] = { "text", "html" +static const char *const mode_list[] = { "text", "html" #ifdef HAVE_SYSLOG_H ,"syslog" #endif }; -static const char *mode_list_text[] = { N_("Text"), "HTML" +static const char *const mode_list_text[] = { N_("Text"), "HTML" #ifdef HAVE_SYSLOG_H , "syslog" #endif diff --git a/modules/misc/win32text.c b/modules/misc/win32text.c index ded5605d9c..43539d0d9c 100644 --- a/modules/misc/win32text.c +++ b/modules/misc/win32text.c @@ -75,15 +75,15 @@ static int SetFont( filter_t *, int ); "fonts that will be rendered on the video. If absolute font size is set, "\ "relative size will be overriden." ) -static int pi_sizes[] = { 20, 18, 16, 12, 6 }; -static char *ppsz_sizes_text[] = { N_("Smaller"), N_("Small"), N_("Normal"), - N_("Large"), N_("Larger") }; -static int pi_color_values[] = { +static int const pi_sizes[] = { 20, 18, 16, 12, 6 }; +static char *const ppsz_sizes_text[] = { + N_("Smaller"), N_("Small"), N_("Normal"), N_("Large"), N_("Larger") }; +static const int pi_color_values[] = { 0x00000000, 0x00808080, 0x00C0C0C0, 0x00FFFFFF, 0x00800000, 0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x00808000, 0x00008000, 0x00008080, 0x0000FF00, 0x00800080, 0x00000080, 0x000000FF, 0x0000FFFF }; -static char *ppsz_color_descriptions[] = { +static const char *const ppsz_color_descriptions[] = { N_("Black"), N_("Gray"), N_("Silver"), N_("White"), N_("Maroon"), N_("Red"), N_("Fuchsia"), N_("Yellow"), N_("Olive"), N_("Green"), N_("Teal"), N_("Lime"), N_("Purple"), N_("Navy"), N_("Blue"), N_("Aqua") }; diff --git a/modules/mux/asf.c b/modules/mux/asf.c index e836ca9f23..d6fac27704 100644 --- a/modules/mux/asf.c +++ b/modules/mux/asf.c @@ -90,7 +90,7 @@ vlc_module_end(); /***************************************************************************** * Locales prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "title", "author", "copyright", "comment", "rating", NULL }; diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c index 22322db090..0babc2b076 100644 --- a/modules/mux/mp4.c +++ b/modules/mux/mp4.c @@ -75,7 +75,7 @@ vlc_module_end(); /***************************************************************************** * Exported prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "faststart", NULL }; diff --git a/modules/mux/mpeg/ps.c b/modules/mux/mpeg/ps.c index 2cbd5cf884..c3879bd2aa 100644 --- a/modules/mux/mpeg/ps.c +++ b/modules/mux/mpeg/ps.c @@ -139,7 +139,7 @@ struct sout_mux_sys_t uint32_t crc32_table[256]; }; -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "dts-delay", "pes-max-size", NULL }; diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c index bd4b70b68b..fa1c67bc61 100644 --- a/modules/mux/mpeg/ts.c +++ b/modules/mux/mpeg/ts.c @@ -235,7 +235,7 @@ vlc_module_end(); /***************************************************************************** * Local data structures *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "pid-video", "pid-audio", "pid-spu", "pid-pmt", "tsid", "netid", "es-id-pid", "shaping", "pcr", "bmin", "bmax", "use-key-frames", "dts-delay", "csa-ck", "csa-pkt", "crypt-audio", "crypt-video", diff --git a/modules/stream_out/bridge.c b/modules/stream_out/bridge.c index 322e12f9dd..e2dac1e763 100644 --- a/modules/stream_out/bridge.c +++ b/modules/stream_out/bridge.c @@ -91,11 +91,11 @@ vlc_module_end(); /***************************************************************************** * Local prototypes *****************************************************************************/ -static const char *ppsz_sout_options_out[] = { +static const char *const ppsz_sout_options_out[] = { "id", NULL }; -static const char *ppsz_sout_options_in[] = { +static const char *const ppsz_sout_options_in[] = { "delay", "id-offset", NULL }; diff --git a/modules/stream_out/display.c b/modules/stream_out/display.c index b8774ed3c4..48d13b5520 100644 --- a/modules/stream_out/display.c +++ b/modules/stream_out/display.c @@ -70,7 +70,7 @@ vlc_module_end(); /***************************************************************************** * Exported prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "audio", "video", "delay", NULL }; diff --git a/modules/stream_out/es.c b/modules/stream_out/es.c index 3b97b5211a..0f67ed85db 100644 --- a/modules/stream_out/es.c +++ b/modules/stream_out/es.c @@ -112,7 +112,7 @@ vlc_module_end(); /***************************************************************************** * Exported prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "access", "access-audio", "access-video", "mux", "mux-audio", "mux-video", "dst", "dst-audio", "dst-video", diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c index 01c0e72ace..871b190a51 100644 --- a/modules/stream_out/mosaic_bridge.c +++ b/modules/stream_out/mosaic_bridge.c @@ -196,7 +196,7 @@ vlc_module_begin(); set_callbacks( Open, Close ); vlc_module_end(); -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "id", "width", "height", "sar", "vfilter", "chroma", "alpha", "x", "y", NULL }; diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c index 1cd6ee53b7..6a16374dc3 100644 --- a/modules/stream_out/rtp.c +++ b/modules/stream_out/rtp.c @@ -201,7 +201,7 @@ vlc_module_end(); /***************************************************************************** * Exported prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "dst", "name", "port", "port-audio", "port-video", "*sdp", "ttl", "mux", "sap", "description", "url", "email", "phone", "proto", "rtcp-mux", diff --git a/modules/stream_out/standard.c b/modules/stream_out/standard.c index 0e4addf7ec..ff561b830c 100644 --- a/modules/stream_out/standard.c +++ b/modules/stream_out/standard.c @@ -136,7 +136,7 @@ vlc_module_end(); /***************************************************************************** * Exported prototypes *****************************************************************************/ -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "access", "mux", "url", "dst", "sap", "name", "group", "description", "url", "email", "phone", "bind", "path", NULL diff --git a/modules/stream_out/switcher.c b/modules/stream_out/switcher.c index 7d9af86f3a..f27ba1dba4 100644 --- a/modules/stream_out/switcher.c +++ b/modules/stream_out/switcher.c @@ -132,7 +132,7 @@ vlc_module_begin(); AUDIO_TEXT, AUDIO_LONGTEXT, true ); vlc_module_end(); -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "files", "sizes", "aspect-ratio", "port", "command", "gop", "qscale", "mute-audio", NULL }; diff --git a/modules/stream_out/transcode.c b/modules/stream_out/transcode.c index 60d721fcee..5fcf030860 100644 --- a/modules/stream_out/transcode.c +++ b/modules/stream_out/transcode.c @@ -183,7 +183,7 @@ #define HURRYUP_LONGTEXT N_( "The transcoder will drop frames if your CPU " \ "can't keep up with the encoding rate." ) -static const char *ppsz_deinterlace_type[] = +static const char *const ppsz_deinterlace_type[] = { "deinterlace", "ffmpeg-deinterlace" }; @@ -297,7 +297,7 @@ vlc_module_begin(); vlc_module_end(); -static const char *ppsz_sout_options[] = { +static const char *const ppsz_sout_options[] = { "venc", "vcodec", "vb", "croptop", "cropbottom", "cropleft", "cropright", "paddtop", "paddbottom", "paddleft", "paddright", "canvas-width", "canvas-height", "canvas-aspect", diff --git a/modules/video_filter/adjust.c b/modules/video_filter/adjust.c index d75ddb063c..8492fb6fb3 100644 --- a/modules/video_filter/adjust.c +++ b/modules/video_filter/adjust.c @@ -102,7 +102,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "contrast", "brightness", "hue", "saturation", "gamma", "brightness-threshold", NULL }; diff --git a/modules/video_filter/alphamask.c b/modules/video_filter/alphamask.c index fe85337a3b..28d42a8c35 100644 --- a/modules/video_filter/alphamask.c +++ b/modules/video_filter/alphamask.c @@ -74,7 +74,7 @@ vlc_module_begin(); MASK_LONGTEXT, false ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "mask", NULL }; diff --git a/modules/video_filter/atmo/atmo.cpp b/modules/video_filter/atmo/atmo.cpp index cadf18d584..80f04bb08d 100644 --- a/modules/video_filter/atmo/atmo.cpp +++ b/modules/video_filter/atmo/atmo.cpp @@ -469,9 +469,9 @@ set_callbacks( CreateFilter, DestroyFilter ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { #if defined(WIN32) - "usebuildin", + "usebuildin", #endif "serialdev", diff --git a/modules/video_filter/blendbench.c b/modules/video_filter/blendbench.c index ca12b14702..dab13aba8b 100644 --- a/modules/video_filter/blendbench.c +++ b/modules/video_filter/blendbench.c @@ -98,7 +98,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "loops", "alpha", "base-image", "base-chroma", "blend-image", "blend-chroma", NULL }; diff --git a/modules/video_filter/bluescreen.c b/modules/video_filter/bluescreen.c index 83ba1cc0ec..80a50649bc 100644 --- a/modules/video_filter/bluescreen.c +++ b/modules/video_filter/bluescreen.c @@ -97,7 +97,7 @@ vlc_module_begin(); false ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "u", "v", "ut", "vt", NULL }; diff --git a/modules/video_filter/clone.c b/modules/video_filter/clone.c index 2444af44dc..fefc8f8394 100644 --- a/modules/video_filter/clone.c +++ b/modules/video_filter/clone.c @@ -79,7 +79,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "count", "vout-list", NULL }; diff --git a/modules/video_filter/colorthres.c b/modules/video_filter/colorthres.c index c01496a5e9..5092ce7b35 100644 --- a/modules/video_filter/colorthres.c +++ b/modules/video_filter/colorthres.c @@ -54,10 +54,10 @@ static picture_t *Filter( filter_t *, picture_t * ); "grayscaled. This must be an hexadecimal (like HTML colors). The first two "\ "chars are for red, then green, then blue. #000000 = black, #FF0000 = red,"\ " #00FF00 = green, #FFFF00 = yellow (red + green), #FFFFFF = white" ) -static int pi_color_values[] = { +static const int pi_color_values[] = { 0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x0000FF00, 0x000000FF, 0x0000FFFF }; -static const char *ppsz_color_descriptions[] = { +static const char *const ppsz_color_descriptions[] = { N_("Red"), N_("Fuchsia"), N_("Yellow"), N_("Lime"), N_("Blue"), N_("Aqua") }; #define CFG_PREFIX "colorthres-" @@ -78,7 +78,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "color", "saturationthes", "similaritythres", NULL }; diff --git a/modules/video_filter/deinterlace.c b/modules/video_filter/deinterlace.c index e01bf7ae76..5dc4eeb828 100644 --- a/modules/video_filter/deinterlace.c +++ b/modules/video_filter/deinterlace.c @@ -116,9 +116,10 @@ static int FilterCallback ( vlc_object_t *, char const *, #define FILTER_CFG_PREFIX "sout-deinterlace-" -static const char *mode_list[] = { "discard", "blend", "mean", "bob", "linear", "x" }; -static const char *mode_list_text[] = { N_("Discard"), N_("Blend"), N_("Mean"), - N_("Bob"), N_("Linear"), "X" }; +static const char *const mode_list[] = { + "discard", "blend", "mean", "bob", "linear", "x" }; +static const char *const mode_list_text[] = { + N_("Discard"), N_("Blend"), N_("Mean"), N_("Bob"), N_("Linear"), "X" }; vlc_module_begin(); set_description( N_("Deinterlacing video filter") ); @@ -144,7 +145,7 @@ vlc_module_begin(); set_callbacks( OpenFilter, CloseFilter ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "mode", NULL }; diff --git a/modules/video_filter/dynamicoverlay/dynamicoverlay.c b/modules/video_filter/dynamicoverlay/dynamicoverlay.c index 79316461fe..bf279dc88c 100644 --- a/modules/video_filter/dynamicoverlay/dynamicoverlay.c +++ b/modules/video_filter/dynamicoverlay/dynamicoverlay.c @@ -77,7 +77,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "input", "output", NULL }; diff --git a/modules/video_filter/erase.c b/modules/video_filter/erase.c index 45feb15a8c..23e29291ef 100644 --- a/modules/video_filter/erase.c +++ b/modules/video_filter/erase.c @@ -77,7 +77,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "mask", "x", "y", NULL }; diff --git a/modules/video_filter/extract.c b/modules/video_filter/extract.c index e848b5a0ce..441807bf6e 100644 --- a/modules/video_filter/extract.c +++ b/modules/video_filter/extract.c @@ -64,8 +64,9 @@ static void get_custom_from_packedyuv422( picture_t *, picture_t *, int * ); #define COMPONENT_LONGTEXT N_("RGB component to extract. 0 for Red, 1 for Green and 2 for Blue.") #define FILTER_PREFIX "extract-" -static int pi_component_values[] = { 0xFF0000, 0x00FF00, 0x0000FF }; -static const char *ppsz_component_descriptions[] = { "Red", "Green", "Blue" }; +static const int pi_component_values[] = { 0xFF0000, 0x00FF00, 0x0000FF }; +static const char *const ppsz_component_descriptions[] = { + "Red", "Green", "Blue" }; /***************************************************************************** * Module descriptor @@ -85,7 +86,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "component", NULL }; diff --git a/modules/video_filter/gaussianblur.c b/modules/video_filter/gaussianblur.c index eefb4cce82..0a8341134c 100644 --- a/modules/video_filter/gaussianblur.c +++ b/modules/video_filter/gaussianblur.c @@ -68,7 +68,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "sigma", NULL }; diff --git a/modules/video_filter/gradient.c b/modules/video_filter/gradient.c index 731f5b0a76..f600835ef5 100644 --- a/modules/video_filter/gradient.c +++ b/modules/video_filter/gradient.c @@ -70,8 +70,8 @@ static void FilterHough ( filter_t *, picture_t *, picture_t * ); #define CARTOON_LONGTEXT N_("Apply cartoon effect. It is only used by " \ "\"gradient\" and \"edge\".") -static const char *mode_list[] = { "gradient", "edge", "hough" }; -static const char *mode_list_text[] = { N_("Gradient"), N_("Edge"), N_("Hough") }; +static const char *const mode_list[] = { "gradient", "edge", "hough" }; +static const char *const mode_list_text[] = { N_("Gradient"), N_("Edge"), N_("Hough") }; #define FILTER_PREFIX "gradient-" @@ -95,7 +95,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "mode", "type", "cartoon", NULL }; diff --git a/modules/video_filter/grain.c b/modules/video_filter/grain.c index 78e8b24aa6..041e87378f 100644 --- a/modules/video_filter/grain.c +++ b/modules/video_filter/grain.c @@ -58,10 +58,6 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { - NULL -}; - struct filter_sys_t { int *p_noise; @@ -81,9 +77,6 @@ static int Create( vlc_object_t *p_this ) return VLC_ENOMEM; } - config_ChainParse( p_filter, FILTER_PREFIX, ppsz_filter_options, - p_filter->p_cfg ); - p_filter->pf_video_filter = Filter; p_filter->p_sys->p_noise = NULL; diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c index 6711479e5d..aad0f1d7bf 100644 --- a/modules/video_filter/logo.c +++ b/modules/video_filter/logo.c @@ -95,8 +95,8 @@ static int LogoCallback( vlc_object_t *, char const *, #define CFG_PREFIX "logo-" -static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; -static const char *ppsz_pos_descriptions[] = +static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; +static const char *const ppsz_pos_descriptions[] = { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; @@ -127,7 +127,7 @@ vlc_module_begin(); set_description( N_("Logo sub filter") ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "file", "x", "y", "delay", "repeat", "transparency", "position", NULL }; diff --git a/modules/video_filter/marq.c b/modules/video_filter/marq.c index 5320632c94..a4c12b493d 100644 --- a/modules/video_filter/marq.c +++ b/modules/video_filter/marq.c @@ -52,12 +52,14 @@ static subpicture_t *Filter( filter_t *, mtime_t ); static int MarqueeCallback( vlc_object_t *p_this, char const *psz_var, vlc_value_t oldval, vlc_value_t newval, void *p_data ); -static int pi_color_values[] = { 0xf0000000, 0x00000000, 0x00808080, 0x00C0C0C0, +static const int pi_color_values[] = { + 0xf0000000, 0x00000000, 0x00808080, 0x00C0C0C0, 0x00FFFFFF, 0x00800000, 0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x00808000, 0x00008000, 0x00008080, 0x0000FF00, 0x00800080, 0x00000080, 0x000000FF, 0x0000FFFF}; -static const char *ppsz_color_descriptions[] = { N_("Default"), N_("Black"), - N_("Gray"), N_("Silver"), N_("White"), N_("Maroon"), N_("Red"), +static const char *const ppsz_color_descriptions[] = { + N_("Default"), N_("Black"), N_("Gray"), + N_("Silver"), N_("White"), N_("Maroon"), N_("Red"), N_("Fuchsia"), N_("Yellow"), N_("Olive"), N_("Green"), N_("Teal"), N_("Lime"), N_("Purple"), N_("Navy"), N_("Blue"), N_("Aqua") }; @@ -129,8 +131,8 @@ struct filter_sys_t "(0=center, 1=left, 2=right, 4=top, 8=bottom, you can " \ "also use combinations of these values, eg 6 = top-right).") -static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; -static const char *ppsz_pos_descriptions[] = +static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; +static const char *const ppsz_pos_descriptions[] = { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; @@ -181,7 +183,7 @@ vlc_module_begin(); add_obsolete_string( "time-size" ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "marquee", "x", "y", "position", "color", "size", "timeout", "refresh", NULL }; diff --git a/modules/video_filter/mosaic.c b/modules/video_filter/mosaic.c index 13e7b672d8..667a16c1e0 100644 --- a/modules/video_filter/mosaic.c +++ b/modules/video_filter/mosaic.c @@ -163,12 +163,12 @@ enum { position_auto = 0, position_fixed = 1, position_offsets = 2 }; -static int pi_pos_values[] = { 0, 1, 2 }; -static const char *ppsz_pos_descriptions[] = +static const int pi_pos_values[] = { 0, 1, 2 }; +static const char *const ppsz_pos_descriptions[] = { N_("auto"), N_("fixed"), N_("offsets") }; -static int pi_align_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; -static const char *ppsz_align_descriptions[] = +static const int pi_align_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; +static const char *const ppsz_align_descriptions[] = { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; @@ -229,7 +229,7 @@ vlc_module_begin(); false ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "alpha", "height", "width", "align", "xoffset", "yoffset", "borderw", "borderh", "position", "rows", "cols", "keep-aspect-ratio", "keep-picture", "order", "offsets", diff --git a/modules/video_filter/motionblur.c b/modules/video_filter/motionblur.c index 81934131c7..441c378851 100644 --- a/modules/video_filter/motionblur.c +++ b/modules/video_filter/motionblur.c @@ -70,7 +70,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "factor", NULL }; diff --git a/modules/video_filter/motiondetect.c b/modules/video_filter/motiondetect.c index 6a81530b23..7f3c706a98 100644 --- a/modules/video_filter/motiondetect.c +++ b/modules/video_filter/motiondetect.c @@ -62,12 +62,6 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -#if 0 -static const char *ppsz_filter_options[] = { - NULL -}; -#endif - struct filter_sys_t { uint8_t *p_oldpix; @@ -98,10 +92,6 @@ static int Create( vlc_object_t *p_this ) p_filter->p_sys->p_oldpix = NULL; p_filter->p_sys->p_buf = NULL; -#if 0 - config_ChainParse( p_filter, FILTER_PREFIX, ppsz_filter_options, - p_filter->p_cfg ); -#endif vlc_mutex_init( &p_filter->p_sys->lock ); return VLC_SUCCESS; diff --git a/modules/video_filter/noise.c b/modules/video_filter/noise.c index 99a3e0c671..49740c465e 100644 --- a/modules/video_filter/noise.c +++ b/modules/video_filter/noise.c @@ -59,10 +59,6 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { - NULL -}; - /***************************************************************************** * vout_sys_t: Distort video output method descriptor ***************************************************************************** @@ -91,9 +87,6 @@ static int Create( vlc_object_t *p_this ) return VLC_ENOMEM; } - config_ChainParse( p_filter, FILTER_PREFIX, ppsz_filter_options, - p_filter->p_cfg ); - p_filter->pf_video_filter = Filter; p_filter->p_sys->last_date = 0; diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c index 1c0446c06f..dfa964e16f 100644 --- a/modules/video_filter/opencv_wrapper.c +++ b/modules/video_filter/opencv_wrapper.c @@ -66,16 +66,16 @@ static void VlcPictureToIplImage( vout_thread_t *p_vout, picture_t *p_in ); * Module descriptor *****************************************************************************/ -static char *chroma_list[] = { "input", "I420", "RGB32"}; -static char *chroma_list_text[] = { N_("Use input chroma unaltered"), +static const char *const chroma_list[] = { "input", "I420", "RGB32"}; +static const char *const chroma_list_text[] = { N_("Use input chroma unaltered"), N_("I420 - first plane is greyscale"), N_("RGB32")}; -static char *output_list[] = { "none", "input", "processed"}; -static char *output_list_text[] = { N_("Don't display any video"), +static const char *const output_list[] = { "none", "input", "processed"}; +static const char *const output_list_text[] = { N_("Don't display any video"), N_("Display the input video"), N_("Display the processed video")}; -static char *verbosity_list[] = { "error", "warning", "debug"}; -static char *verbosity_list_text[] = { N_("Show only errors"), +static const char *const verbosity_list[] = { "error", "warning", "debug"}; +static const char *const verbosity_list_text[] = { N_("Show only errors"), N_("Show errors and warnings"), N_("Show everything including debug messages")}; vlc_module_begin(); diff --git a/modules/video_filter/osdmenu.c b/modules/video_filter/osdmenu.c index 0e0b9d4084..65da3a7d5c 100644 --- a/modules/video_filter/osdmenu.c +++ b/modules/video_filter/osdmenu.c @@ -80,8 +80,8 @@ "means less transparency. The default is being not transparent " \ "(value 255) the minimum is fully transparent (value 0)." ) -static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; -static const char *ppsz_pos_descriptions[] = +static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; +static const char *const ppsz_pos_descriptions[] = { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; diff --git a/modules/video_filter/panoramix.c b/modules/video_filter/panoramix.c index 7dddc226ec..5894baba1a 100644 --- a/modules/video_filter/panoramix.c +++ b/modules/video_filter/panoramix.c @@ -201,7 +201,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "cols", "rows", "offset-x", "bz-length", "bz-height", "attenuate", "bz-begin", "bz-middle", "bz-end", "bz-middle-pos", "bz-gamma-red", "bz-gamma-green", "bz-gamma-blue", "bz-blackcrush-red", diff --git a/modules/video_filter/puzzle.c b/modules/video_filter/puzzle.c index e7eac52fca..200e89e99d 100644 --- a/modules/video_filter/puzzle.c +++ b/modules/video_filter/puzzle.c @@ -88,7 +88,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "rows", "cols", "black-slot", NULL }; diff --git a/modules/video_filter/rotate.c b/modules/video_filter/rotate.c index 0787bdfb3b..d3c1169751 100644 --- a/modules/video_filter/rotate.c +++ b/modules/video_filter/rotate.c @@ -75,7 +75,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "angle", NULL }; diff --git a/modules/video_filter/rss.c b/modules/video_filter/rss.c index c70f75c790..768720422d 100644 --- a/modules/video_filter/rss.c +++ b/modules/video_filter/rss.c @@ -61,11 +61,13 @@ static subpicture_t *Filter( filter_t *, mtime_t ); static int FetchRSS( filter_t * ); static void FreeRSS( filter_t * ); -static int pi_color_values[] = { 0xf0000000, 0x00000000, 0x00808080, 0x00C0C0C0, +static const int pi_color_values[] = { + 0xf0000000, 0x00000000, 0x00808080, 0x00C0C0C0, 0x00FFFFFF, 0x00800000, 0x00FF0000, 0x00FF00FF, 0x00FFFF00, 0x00808000, 0x00008000, 0x00008080, 0x0000FF00, 0x00800080, 0x00000080, 0x000000FF, 0x0000FFFF}; -static const char *ppsz_color_descriptions[] = { N_("Default"), N_("Black"), +static const char *const ppsz_color_descriptions[] = { + N_("Default"), N_("Black"), N_("Gray"), N_("Silver"), N_("White"), N_("Maroon"), N_("Red"), N_("Fuchsia"), N_("Yellow"), N_("Olive"), N_("Green"), N_("Teal"), N_("Lime"), N_("Purple"), N_("Navy"), N_("Blue"), @@ -164,8 +166,8 @@ struct filter_sys_t #define TITLE_TEXT N_("Title display mode") #define TITLE_LONGTEXT N_("Title display mode. Default is 0 (hidden) if the feed has an image and feed images are enabled, 1 otherwise.") -static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; -static const char *ppsz_pos_descriptions[] = +static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; +static const char *const ppsz_pos_descriptions[] = { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; @@ -175,8 +177,8 @@ enum title_modes { prepend_title, scroll_title }; -static int pi_title_modes[] = { default_title, hide_title, prepend_title, scroll_title }; -static const char *ppsz_title_modes[] = +static const int pi_title_modes[] = { default_title, hide_title, prepend_title, scroll_title }; +static const char *const ppsz_title_modes[] = { N_("Default"), N_("Don't show"), N_("Always visible"), N_("Scroll with feed") }; #define CFG_PREFIX "rss-" @@ -222,7 +224,7 @@ vlc_module_begin(); add_shortcut( "atom" ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "urls", "x", "y", "position", "color", "size", "speed", "length", "ttl", "images", "title", NULL }; diff --git a/modules/video_filter/seamcarving.c b/modules/video_filter/seamcarving.c index 22b7e7b2ec..66d0c32e2f 100644 --- a/modules/video_filter/seamcarving.c +++ b/modules/video_filter/seamcarving.c @@ -68,10 +68,6 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { - NULL -}; - struct filter_sys_t { int *p_energy; @@ -97,9 +93,6 @@ static int Create( vlc_object_t *p_this ) p_filter->p_sys->p_grad = NULL; p_filter->p_sys->i_crop = 0; - config_ChainParse( p_filter, FILTER_PREFIX, ppsz_filter_options, - p_filter->p_cfg ); - var_Create( p_filter, "crop", VLC_VAR_INTEGER|VLC_VAR_ISCOMMAND ); var_AddCallback( p_filter, "crop", CropCallback, p_filter->p_sys ); diff --git a/modules/video_filter/sharpen.c b/modules/video_filter/sharpen.c index 9d105cd8c5..8447e2b5d7 100644 --- a/modules/video_filter/sharpen.c +++ b/modules/video_filter/sharpen.c @@ -73,7 +73,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "sigma", NULL }; diff --git a/modules/video_filter/transform.c b/modules/video_filter/transform.c index 709896406b..3eb2b58eac 100644 --- a/modules/video_filter/transform.c +++ b/modules/video_filter/transform.c @@ -65,8 +65,8 @@ static int SendEvents( vlc_object_t *, char const *, #define TYPE_TEXT N_("Transform type") #define TYPE_LONGTEXT N_("One of '90', '180', '270', 'hflip' and 'vflip'") -static const char *type_list[] = { "90", "180", "270", "hflip", "vflip" }; -static const char *type_list_text[] = { N_("Rotate by 90 degrees"), +static const char *const type_list[] = { "90", "180", "270", "hflip", "vflip" }; +static const char *const type_list_text[] = { N_("Rotate by 90 degrees"), N_("Rotate by 180 degrees"), N_("Rotate by 270 degrees"), N_("Flip horizontally"), N_("Flip vertically") }; @@ -87,7 +87,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "type", NULL }; diff --git a/modules/video_filter/wall.c b/modules/video_filter/wall.c index 3b1f4ace06..09f3cda7a4 100644 --- a/modules/video_filter/wall.c +++ b/modules/video_filter/wall.c @@ -88,7 +88,7 @@ vlc_module_begin(); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "cols", "rows", "active", "element-aspect", NULL }; diff --git a/modules/video_output/image.c b/modules/video_output/image.c index 4225b98700..164fb1c6d0 100644 --- a/modules/video_output/image.c +++ b/modules/video_output/image.c @@ -77,8 +77,8 @@ static void Display ( vout_thread_t *, picture_t * ); "creating one file per image. In this case, " \ "the number is not appended to the filename." ) -static const char *psz_format_list[] = { "png", "jpeg" }; -static const char *psz_format_list_text[] = { "PNG", "JPEG" }; +static const char *const psz_format_list[] = { "png", "jpeg" }; +static const char *const psz_format_list_text[] = { "PNG", "JPEG" }; #define CFG_PREFIX "image-out-" @@ -107,7 +107,7 @@ vlc_module_begin( ); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_vout_options[] = { +static const char *const ppsz_vout_options[] = { "format", "width", "height", "ratio", "prefix", "replace", NULL }; diff --git a/modules/video_output/msw/directx.c b/modules/video_output/msw/directx.c index ec72dcd134..afc6be2fec 100644 --- a/modules/video_output/msw/directx.c +++ b/modules/video_output/msw/directx.c @@ -157,8 +157,8 @@ static int WallpaperCallback( vlc_object_t *, char const *, "background. Note that this feature only works in overlay mode and " \ "the desktop must not already have a wallpaper." ) -static char *ppsz_dev[] = { "" }; -static char *ppsz_dev_text[] = { N_("Default") }; +static const char *const ppsz_dev[] = { "" }; +static const char *const ppsz_dev_text[] = { N_("Default") }; vlc_module_begin(); set_shortname( "DirectX" ); diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c index 13666f9b38..74a5b3b154 100644 --- a/modules/video_output/opengl.c +++ b/modules/video_output/opengl.c @@ -119,9 +119,9 @@ #define SIGN(x) (x < 0 ? (-1) : 1) #define PID2 1.570796326794896619231322 - static const char *ppsz_effects[] = { + static const char *const ppsz_effects[] = { "none", "cube", "transparent-cube", "cylinder", "torus", "sphere","SQUAREXY","SQUARER", "ASINXY", "ASINR", "SINEXY", "SINER" }; - static const char *ppsz_effects_text[] = { + static const char *const ppsz_effects_text[] = { N_("None"), N_("Cube"), N_("Transparent Cube"), N_("Cylinder"), N_("Torus"), N_("Sphere"), N_("SQUAREXY"),N_("SQUARER"), N_("ASINXY"), N_("ASINR"), N_("SINEXY"), N_("SINER") }; #endif @@ -175,9 +175,9 @@ static void Transform ( int, float, float, int, int, int, int, double *, doub "Several visual OpenGL effects are available." ) #ifndef OPENGL_MORE_EFFECT -static const char *ppsz_effects[] = { +static const char *const ppsz_effects[] = { "none", "cube", "transparent-cube" }; -static const char *ppsz_effects_text[] = { +static const char *const ppsz_effects_text[] = { N_("None"), N_("Cube"), N_("Transparent Cube") }; #endif diff --git a/src/libvlc-module.c b/src/libvlc-module.c index 547ddc81a8..abc6fa9aae 100644 --- a/src/libvlc-module.c +++ b/src/libvlc-module.c @@ -43,7 +43,7 @@ #include "vlc_meta.h" #if defined (WIN32) || defined (__APPLE__) -static const char *ppsz_language[] = +static const char *const ppsz_language[] = { "auto", "en", @@ -79,7 +79,7 @@ static const char *ppsz_language[] = "tr" }; -static const char *ppsz_language_text[] = +static const char *const ppsz_language_text[] = { N_("Auto"), N_("American English"), @@ -116,7 +116,7 @@ static const char *ppsz_language_text[] = }; #endif -static const char *ppsz_snap_formats[] = +static const char *const ppsz_snap_formats[] = { "png", "jpg" }; /***************************************************************************** @@ -272,8 +272,9 @@ static const char *ppsz_snap_formats[] = "not actually encoded with Dolby Surround, turning on this option might "\ "enhance your experience, especially when combined with the Headphone "\ "Channel Mixer." ) -static int pi_force_dolby_values[] = { 0, 1, 2 }; -static const char *ppsz_force_dolby_descriptions[] = { N_("Auto"), N_("On"), N_("Off") }; +static const int pi_force_dolby_values[] = { 0, 1, 2 }; +static const char *const ppsz_force_dolby_descriptions[] = { + N_("Auto"), N_("On"), N_("Off") }; #define AUDIO_FILTER_TEXT N_("Audio filters") @@ -304,8 +305,10 @@ static const char *ppsz_force_dolby_descriptions[] = { N_("Auto"), N_("On"), N_( #define AUDIO_REPLAY_GAIN_PEAK_PROTECTION_LONGTEXT N_( \ "Protect against sound clipping" ) -static const char *ppsz_replay_gain_mode[] = { "none", "track", "album" }; -static const char *ppsz_replay_gain_mode_text[] = { N_("None"), N_("Track"), N_("Album") }; +static const char *const ppsz_replay_gain_mode[] = { + "none", "track", "album" }; +static const char *const ppsz_replay_gain_mode_text[] = { + N_("None"), N_("Track"), N_("Album") }; /***************************************************************************** * Video @@ -359,8 +362,8 @@ static const char *ppsz_replay_gain_mode_text[] = { N_("None"), N_("Track"), N_( "Enforce the alignment of the video in its window. By default (0) it " \ "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).") -static int pi_align_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; -static const char *ppsz_align_descriptions[] = +static const int pi_align_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; +static const char *const ppsz_align_descriptions[] = { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; @@ -408,8 +411,8 @@ static const char *ppsz_align_descriptions[] = "Hide mouse cursor and fullscreen controller after " \ "n miliseconds, default is 3000 ms (3 sec.)") -static int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; -static const char *ppsz_pos_descriptions[] = +static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; +static const char *const ppsz_pos_descriptions[] = { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), N_("Top-Left"), N_("Top-Right"), N_("Bottom-Left"), N_("Bottom-Right") }; @@ -548,8 +551,8 @@ static const char *ppsz_pos_descriptions[] = "synchronise clocks for server and client. The detailed settings " \ "are available in Advanced / Network Sync." ) -static int pi_clock_values[] = { -1, 0, 1 }; -static const char *ppsz_clock_descriptions[] = +static const int pi_clock_values[] = { -1, 0, 1 }; +static const char *const ppsz_clock_descriptions[] = { N_("Default"), N_("Disable"), N_("Enable") }; #define SERVER_PORT_TEXT N_("UDP port") @@ -1081,10 +1084,10 @@ static const char *ppsz_clock_descriptions[] = #define ALBUM_ART_LONGTEXT N_( \ "Choose how album art will be downloaded." ) -static int pi_albumart_values[] = { ALBUM_ART_WHEN_ASKED, - ALBUM_ART_WHEN_PLAYED, - ALBUM_ART_ALL }; -static const char *ppsz_albumart_descriptions[] = +static const int pi_albumart_values[] = { ALBUM_ART_WHEN_ASKED, + ALBUM_ART_WHEN_PLAYED, + ALBUM_ART_ALL }; +static const char *const ppsz_albumart_descriptions[] = { N_("Manual download only"), N_("When track starts playing"), N_("As soon as track is added") };