* and spawn threads.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: main.c,v 1.178 2002/04/15 14:06:19 jobi Exp $
+ * $Id: main.c,v 1.189 2002/04/27 22:11:22 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#endif
#ifdef HAVE_LOCALE_H
-# include <locale.h>
+# include <locale.h>
#endif
#include <errno.h> /* ENOMEM */
#include "video.h"
#include "video_output.h"
-#include "debug.h"
-
/*****************************************************************************
- * Configuration options for the main program. Each plugin will also separatly
+ * Configuration options for the main program. Each module will also separatly
* define its own configuration options.
* Look into configuration.h if you need to know more about the following
* macros.
*
*****************************************************************************/
-#define BUILTIN
+#define __BUILTIN__
#define MODULE_NAME main
#include "modules_inner.h" /* for configuration stuff */
-#define INTF_TEXT "interface method"
-#define INTF_LONGTEXT "This option allows you to select the interface used by"\
- " vlc.\nNote that the default behaviour is to" \
- " automatically select the best method available"
-
-#define WARNING_TEXT "warning level (or use -v, -vv, etc...)"
-#define WARNING_LONGTEXT "Increasing the warning level will allow you to see" \
- " more debug messages and can sometimes help you to" \
- " troubleshoot a problem"
-
-#define STATS_TEXT "output statistics"
-#define STATS_LONGTEXT "Enabling the stats mode will flood your log console" \
- " with various statistics messages"
-
-#define INTF_PATH_TEXT "interface default search path"
-#define INTF_PATH_LONGTEXT "This option allows you to set the default path" \
- " that the interface will open when looking for a" \
- " file"
-
-#define AOUT_TEXT "audio output method"
-#define AOUT_LONGTEXT "This option allows you to select the audio" \
- " audio output method used by vlc.\nNote that the" \
- " default behaviour is to automatically select the best"\
- " method available"
-
-#define NOAUDIO_TEXT "disable audio"
-#define NOAUDIO_LONGTEXT "This will completely disable the audio output. The" \
- " audio decoding stage shouldn't even be done, so it"\
- " can allow you to save some processing power"
-
-#define MONO_TEXT "mono audio"
-#define MONO_LONGTEXT "This will force a mono audio output"
-
-#define VOLUME_TEXT "audio output volume"
-#define VOLUME_LONGTEXT "You can set the default audio output volume here," \
- " in a range from 0 to 1024"
-
-#define FORMAT_TEXT "audio output format"
-#define FORMAT_LONGTEXT "You can force the audio output format here.\n" \
- "0 -> 16 bits signed native endian (default)\n" \
- "1 -> 8 bits unsigned\n" \
- "2 -> 16 bits signed little endian\n" \
- "3 -> 16 bits signed big endian\n" \
- "4 -> 8 bits signed\n" \
- "5 -> 16 bits unsigned little endian\n" \
- "6 -> 16 bits unsigned big endian\n" \
- "7 -> mpeg2 audio (unsupported)\n" \
- "8 -> ac3 pass-through"
-
-#define RATE_TEXT "audio output frequency (Hz)"
-#define RATE_LONGTEXT "You can force the audio output frequency here.\n" \
- "Common values are 48000, 44100, 32000, 22050," \
- " 16000, 11025, 8000"
-
-#define DESYNC_TEXT "Compensate desynchronization of audio (in ms)"
-#define DESYNC_LONGTEXT "This option allows you to delay the audio output." \
- " This can be handy if you notice a lag between the" \
- " video and the audio"
-
-#define VOUT_TEXT "video output method"
-#define VOUT_LONGTEXT "This option allows you to select the video output" \
- " method used by vlc.\nNote that the default behaviour" \
- " is to automatically select the best method available"
-
-#define NOVIDEO_TEXT "disable video"
-#define NOVIDEO_LONGTEXT "This will completely disable the video output. The" \
- " video decoding stage shouldn't even be done, so" \
- " it can allow you to save some processing power"
-
-#define DISPLAY_TEXT "display identifier"
-#define DISPLAY_LONGTEXT NULL
-
-#define WIDTH_TEXT "video width"
-#define WIDTH_LONGTEXT "You can enforce the video width here.\nNote" \
- " that by default vlc will adapt to the video" \
- " characteristics"
-
-#define HEIGHT_TEXT "video height"
-#define HEIGHT_LONGTEXT "You can enforce the video height here.\nNote" \
- " that by default vlc will adapt to the video " \
- " characteristics"
-
-#define GRAYSCALE_TEXT "grayscale video output"
-#define GRAYSCALE_LONGTEXT "Using this option, vlc will not decode the color "\
- "information from the video (this can also allow " \
- "you to save some processing power)"
-
-#define FULLSCREEN_TEXT "fullscreen video output"
-#define FULLSCREEN_LONGTEXT "If this option is enabled, vlc will always " \
- "start a video in fullscreen mode"
-
-#define NOOVERLAY_TEXT "disable hardware acceleration for the video output"
-#define NOOVERLAY_LONGTEXT "By default vlc will try to take advantage of the "\
- "overlay capabilities of you graphics card.\n"
+#define INTF_TEXT N_("interface module")
+#define INTF_LONGTEXT N_( \
+ "This option allows you to select the interface used by vlc.\nNote that " \
+ "the default behavior is to automatically select the best method " \
+ "available.")
+
+#define WARNING_TEXT N_("warning level (or use -v, -vv, etc...)")
+#define WARNING_LONGTEXT N_( \
+ "Increasing the warning level will allow you to see more debug messages " \
+ "and can sometimes help you to troubleshoot a problem.")
+
+#define STATS_TEXT N_("output statistics")
+#define STATS_LONGTEXT N_( \
+ "Enabling the stats mode will flood your log console with various " \
+ "statistics messages.")
+
+#define INTF_PATH_TEXT N_("interface default search path")
+#define INTF_PATH_LONGTEXT N_( \
+ "This option allows you to set the default path that the interface will " \
+ "open when looking for a file.")
+
+#define AOUT_TEXT N_("audio output module")
+#define AOUT_LONGTEXT N_( \
+ "This option allows you to select the audio audio output method used by " \
+ "vlc.\nNote that the default behavior is to automatically select the " \
+ "best method available.")
+
+#define NOAUDIO_TEXT N_("disable audio")
+#define NOAUDIO_LONGTEXT N_( \
+ "This will completely disable the audio output. The audio decoding " \
+ "stage shouldn't even be done, so it can allow you to save some " \
+ "processing power.")
+
+#define MONO_TEXT N_("mono audio")
+#define MONO_LONGTEXT N_("This will force a mono audio output")
+
+#define VOLUME_TEXT N_("audio output volume")
+#define VOLUME_LONGTEXT N_( \
+ "You can set the default audio output volume here, in a range from 0 to " \
+ "1024.")
+
+#define FORMAT_TEXT N_("audio output format")
+#define FORMAT_LONGTEXT N_( \
+ "You can force the audio output format here.\n" \
+ "0 -> 16 bits signed native endian (default)\n" \
+ "1 -> 8 bits unsigned\n" \
+ "2 -> 16 bits signed little endian\n" \
+ "3 -> 16 bits signed big endian\n" \
+ "4 -> 8 bits signed\n" \
+ "5 -> 16 bits unsigned little endian\n" \
+ "6 -> 16 bits unsigned big endian\n" \
+ "7 -> mpeg2 audio (unsupported)\n" \
+ "8 -> ac3 pass-through")
+
+#define RATE_TEXT N_("audio output frequency (Hz)")
+#define RATE_LONGTEXT N_( \
+ "You can force the audio output frequency here.\nCommon values are " \
+ "48000, 44100, 32000, 22050, 16000, 11025, 8000.")
+
+#define DESYNC_TEXT N_("compensate desynchronization of audio (in ms)")
+#define DESYNC_LONGTEXT N_( \
+ "This option allows you to delay the audio output. This can be handy if " \
+ "you notice a lag between the video and the audio.")
+
+#define VOUT_TEXT N_("video output module")
+#define VOUT_LONGTEXT N_( \
+ "This option allows you to select the video output method used by vlc.\n" \
+ "Note that the default behavior is to automatically select the best " \
+ "method available.")
+
+#define NOVIDEO_TEXT N_("disable video")
+#define NOVIDEO_LONGTEXT N_( \
+ "This will completely disable the video output. The video decoding " \
+ "stage shouldn't even be done, so it can allow you to save some " \
+ "processing power.")
-#define SPUMARGIN_TEXT "force SPU position"
-#define SPUMARGIN_LONGTEXT NULL
+#define DISPLAY_TEXT N_("display identifier")
+#define DISPLAY_LONGTEXT ""
-#define FILTER_TEXT "video filter module"
-#define FILTER_LONGTEXT NULL
+#define WIDTH_TEXT N_("video width")
+#define WIDTH_LONGTEXT N_( \
+ "You can enforce the video width here.\nNote that by default vlc will " \
+ "adapt to the video characteristics.")
-#define SERVER_PORT_TEXT "server port"
-#define SERVER_PORT_LONGTEXT NULL
+#define HEIGHT_TEXT N_("video height")
+#define HEIGHT_LONGTEXT N_( \
+ "You can enforce the video height here.\nNote that by default vlc will " \
+ "adapt to the video characteristics.")
-#define NETCHANNEL_TEXT "enable network channel mode"
-#define NETCHANNEL_LONGTEXT NULL
+#define ZOOM_TEXT N_("zoom video")
+#define ZOOM_LONGTEXT N_( \
+ "You can zoom the video by the specified factor.")
-#define CHAN_SERV_TEXT "channel server address"
-#define CHAN_SERV_LONGTEXT NULL
+#define GRAYSCALE_TEXT N_("grayscale video output")
+#define GRAYSCALE_LONGTEXT N_( \
+ "Using this option, vlc will not decode the color information from the " \
+ "video (this can also allow you to save some processing power).")
-#define CHAN_PORT_TEXT "channel server port"
-#define CHAN_PORT_LONGTEXT NULL
+#define FULLSCREEN_TEXT N_("fullscreen video output")
+#define FULLSCREEN_LONGTEXT N_( \
+ "If this option is enabled, vlc will always start a video in fullscreen " \
+ "mode.")
-#define IFACE_TEXT "network interface"
-#define IFACE_LONGTEXT NULL
+#define NOOVERLAY_TEXT N_("disable hardware acceleration for the video output")
+#define NOOVERLAY_LONGTEXT N_( \
+ "By default vlc will try to take advantage of the overlay capabilities " \
+ "of you graphics card.")
-#define INPUT_PROGRAM_TEXT "choose program (SID)"
-#define INPUT_PROGRAM_LONGTEXT "choose the program to select by giving its"\
- "Service ID"
+#define SPUMARGIN_TEXT N_("force SPU position")
+#define SPUMARGIN_LONGTEXT ""
-#define INPUT_AUDIO_TEXT "choose audio"
-#define INPUT_AUDIO_LONGTEXT NULL
+#define FILTER_TEXT N_("video filter module")
+#define FILTER_LONGTEXT ""
-#define INPUT_CHAN_TEXT "choose channel"
-#define INPUT_CHAN_LONGTEXT NULL
+#define SERVER_PORT_TEXT N_("server port")
+#define SERVER_PORT_LONGTEXT ""
-#define INPUT_SUBT_TEXT "choose subtitles"
-#define INPUT_SUBT_LONGTEXT NULL
+#define NETCHANNEL_TEXT N_("enable network channel mode")
+#define NETCHANNEL_LONGTEXT ""
-#define DVD_DEV_TEXT "DVD device"
-#define DVD_DEV_LONGTEXT NULL
+#define CHAN_SERV_TEXT N_("channel server address")
+#define CHAN_SERV_LONGTEXT ""
-#define VCD_DEV_TEXT "VCD device"
-#define VCD_DEV_LONGTEXT NULL
+#define CHAN_PORT_TEXT N_("channel server port")
+#define CHAN_PORT_LONGTEXT ""
-#define SAT_FREQ_TEXT "Satellite transponder frequency"
-#define SAT_FREQ_LONGTEXT NULL
+#define IFACE_TEXT N_("network interface")
+#define IFACE_LONGTEXT ""
-#define SAT_POL_TEXT "Satellite transponder polarization"
-#define SAT_POL_LONGTEXT NULL
+#define INPUT_PROGRAM_TEXT N_("choose program (SID)")
+#define INPUT_PROGRAM_LONGTEXT N_( \
+ "Choose the program to select by giving its Service ID.")
-#define SAT_FEC_TEXT "Satellite transponder FEC"
-#define SAT_FEC_LONGTEXT NULL
+#define INPUT_AUDIO_TEXT N_("choose audio")
+#define INPUT_AUDIO_LONGTEXT ""
-#define SAT_SRATE_TEXT "Satellite transponder symbol rate"
-#define SAT_SRATE_LONGTEXT NULL
+#define INPUT_CHAN_TEXT N_("choose channel")
+#define INPUT_CHAN_LONGTEXT ""
-#define SAT_DISEQC_TEXT "Use diseqc with antenna"
-#define SAT_DISEQC_LONGTEXT NULL
+#define INPUT_SUBT_TEXT N_("choose subtitles")
+#define INPUT_SUBT_LONGTEXT ""
-#define SAT_LNB_LOF1_TEXT "Antenna lnb_lof1 (kHz)"
-#define SAT_LNB_LOF1_LONGTEXT NULL
+#define DVD_DEV_TEXT N_("DVD device")
+#define DVD_DEV_LONGTEXT ""
-#define SAT_LNB_LOF2_TEXT "Antenna lnb_lof2 (kHz)"
-#define SAT_LNB_LOF2_LONGTEXT NULL
+#define VCD_DEV_TEXT N_("VCD device")
+#define VCD_DEV_LONGTEXT ""
-#define SAT_LNB_SLOF_TEXT "Antenna lnb_slof (kHz)"
-#define SAT_LNB_SLOF_LONGTEXT NULL
+#define IPV6_TEXT N_("force IPv6")
+#define IPV6_LONGTEXT ""
-#define IPV6_TEXT "force IPv6"
-#define IPV6_LONGTEXT NULL
+#define IPV4_TEXT N_("force IPv4")
+#define IPV4_LONGTEXT ""
-#define IPV4_TEXT "force IPv4"
-#define IPV4_LONGTEXT NULL
+#define ADEC_MPEG_TEXT N_("choose MPEG audio decoder")
+#define ADEC_MPEG_LONGTEXT ""
-#define ADEC_MPEG_TEXT "choose MPEG audio decoder"
-#define ADEC_MPEG_LONGTEXT NULL
+#define ADEC_AC3_TEXT N_("choose AC3 audio decoder")
+#define ADEC_AC3_LONGTEXT ""
-#define ADEC_AC3_TEXT "choose AC3 audio decoder"
-#define ADEC_AC3_LONGTEXT NULL
+#define VDEC_SMP_TEXT N_("use additional processors")
+#define VDEC_SMP_LONGTEXT ""
-#define VDEC_SMP_TEXT "use additional processors"
-#define VDEC_SMP_LONGTEXT NULL
+#define VPAR_SYNCHRO_TEXT N_("force synchro algorithm {I|I+|IP|IP+|IPB}")
+#define VPAR_SYNCHRO_LONGTEXT ""
-#define VPAR_SYNCHRO_TEXT "force synchro algorithm {I|I+|IP|IP+|IPB}"
-#define VPAR_SYNCHRO_LONGTEXT NULL
+#define NOMMX_TEXT N_("disable CPU's MMX support")
+#define NOMMX_LONGTEXT ""
-#define NOMMX_TEXT "disable CPU's MMX support"
-#define NOMMX_LONGTEXT NULL
+#define NO3DN_TEXT N_("disable CPU's 3D Now! support")
+#define NO3DN_LONGTEXT ""
-#define NO3DN_TEXT "disable CPU's 3D Now! support"
-#define NO3DN_LONGTEXT NULL
+#define NOMMXEXT_TEXT N_("disable CPU's MMX EXT support")
+#define NOMMXEXT_LONGTEXT ""
-#define NOMMXEXT_TEXT "disable CPU's MMX EXT support"
-#define NOMMXEXT_LONGTEXT NULL
+#define NOSSE_TEXT N_("disable CPU's SSE support")
+#define NOSSE_LONGTEXT ""
-#define NOSSE_TEXT "disable CPU's SSE support"
-#define NOSSE_LONGTEXT NULL
+#define NOALTIVEC_TEXT N_("disable CPU's AltiVec support")
+#define NOALTIVEC_LONGTEXT ""
-#define NOALTIVEC_TEXT "disable CPU's AltiVec support"
-#define NOALTIVEC_LONGTEXT NULL
+#define PLAYLIST_LAUNCH_TEXT N_("launch playlist on startup")
+#define PLAYLIST_LAUNCH_LONGTEXT ""
-#define PLAYLIST_LAUNCH_TEXT "launch playlist on startup"
-#define PLAYLIST_LAUNCH_LONGTEXT NULL
+#define PLAYLIST_ENQUEUE_TEXT N_("enqueue playlist as default")
+#define PLAYLIST_ENQUEUE_LONGTEXT ""
-#define PLAYLIST_ENQUEUE_TEXT "enqueue playlist as default"
-#define PLAYLIST_ENQUEUE_LONGTEXT NULL
+#define PLAYLIST_LOOP_TEXT N_("loop playlist on end")
+#define PLAYLIST_LOOP_LONGTEXT ""
-#define PLAYLIST_LOOP_TEXT "loop playlist on end"
-#define PLAYLIST_LOOP_LONGTEXT NULL
+#define MEMCPY_TEXT N_("memory copy module")
+#define MEMCPY_LONGTEXT ""
-#define MEMCPY_TEXT "memory copy method"
-#define MEMCPY_LONGTEXT NULL
+#define FAST_PTHREAD_TEXT N_("fast pthread on NT/2K/XP (developpers only)")
+#define FAST_PTHREAD_LONGTEXT N_( \
+ "On Windows NT/2K/XP we use a slow but correct pthread implementation, " \
+ "you can also use this faster implementation but you might experience " \
+ "problems with it.")
-#define FAST_PTHREAD_TEXT "fast pthread on NT/2K/XP (developpers only)"
-#define FAST_PTHREAD_LONGTEXT "On Windows NT/2K/XP we use a slow but correct "\
- "pthread implementation, you can also use this "\
- "faster implementation but you might "\
- "experience problems with it"
-
-/* Quick usage guide
-MODULE_CONFIG_START
-MODULE_CONFIG_STOP
-ADD_CATEGORY_HINT( text, longtext )
-ADD_SUBCATEGORY_HINT( text, longtext )
-ADD_STRING( option_name, value, p_callback, text, longtext )
-ADD_FILE( option_name, psz_value, p_callback, text, longtext )
-ADD_PLUGIN( option_name, psz_value, i_capability, p_callback, text, longtext )
-ADD_INTEGER( option_name, i_value, p_callback, text, longtext )
-ADD_BOOL( option_name, p_callback, text, longtext )
-*/
+/*
+ * Quick usage guide for the configuration options:
+ *
+ * MODULE_CONFIG_START
+ * MODULE_CONFIG_STOP
+ * ADD_CATEGORY_HINT( N_(text), longtext )
+ * ADD_SUBCATEGORY_HINT( N_(text), longtext )
+ * ADD_STRING( option_name, value, p_callback, N_(text), N_(longtext) )
+ * ADD_FILE( option_name, psz_value, p_callback, N_(text), N_(longtext) )
+ * ADD_MODULE( option_name, psz_value, i_capability, p_callback,
+ * N_(text), N_(longtext) )
+ * ADD_INTEGER( option_name, i_value, p_callback, N_(text), N_(longtext) )
+ * ADD_BOOL( option_name, p_callback, N_(text), N_(longtext) )
+ */
MODULE_CONFIG_START
/* Interface options */
-ADD_CATEGORY_HINT( "Interface", NULL)
-ADD_PLUGIN ( "intf", MODULE_CAPABILITY_INTF, NULL, NULL, INTF_TEXT, INTF_LONGTEXT )
+ADD_CATEGORY_HINT( N_("Interface"), NULL)
+ADD_MODULE_WITH_SHORT ( "intf", 'I', MODULE_CAPABILITY_INTF, NULL, NULL, INTF_TEXT, INTF_LONGTEXT )
ADD_INTEGER ( "warning", 0, NULL, WARNING_TEXT, WARNING_LONGTEXT )
ADD_BOOL ( "stats", NULL, STATS_TEXT, STATS_LONGTEXT )
-ADD_STRING ( "search_path", NULL, NULL, INTF_PATH_TEXT, INTF_PATH_LONGTEXT )
+ADD_STRING ( "search-path", NULL, NULL, INTF_PATH_TEXT, INTF_PATH_LONGTEXT )
/* Audio options */
-ADD_CATEGORY_HINT( "Audio", NULL)
-ADD_PLUGIN ( "aout", MODULE_CAPABILITY_AOUT, NULL, NULL, AOUT_TEXT, AOUT_LONGTEXT )
+ADD_CATEGORY_HINT( N_("Audio"), NULL)
+ADD_MODULE_WITH_SHORT ( "aout", 'A', MODULE_CAPABILITY_AOUT, NULL, NULL, AOUT_TEXT, AOUT_LONGTEXT )
ADD_BOOL ( "noaudio", NULL, NOAUDIO_TEXT, NOAUDIO_LONGTEXT )
ADD_BOOL ( "mono", NULL, MONO_TEXT, MONO_LONGTEXT )
ADD_INTEGER ( "volume", VOLUME_DEFAULT, NULL, VOLUME_TEXT, VOLUME_LONGTEXT )
ADD_INTEGER ( "rate", 44100, NULL, RATE_TEXT, RATE_LONGTEXT )
ADD_INTEGER ( "desync", 0, NULL, DESYNC_TEXT, DESYNC_LONGTEXT )
-ADD_INTEGER ( "aout_format", 0, NULL, FORMAT_TEXT,
+ADD_INTEGER ( "audio-format", 0, NULL, FORMAT_TEXT,
FORMAT_LONGTEXT )
/* Video options */
-ADD_CATEGORY_HINT( "Video", NULL )
-ADD_PLUGIN ( "vout", MODULE_CAPABILITY_VOUT, NULL, NULL, VOUT_TEXT, VOUT_LONGTEXT )
+ADD_CATEGORY_HINT( N_("Video"), NULL )
+ADD_MODULE_WITH_SHORT ( "vout", 'V', MODULE_CAPABILITY_VOUT, NULL, NULL, VOUT_TEXT, VOUT_LONGTEXT )
ADD_BOOL ( "novideo", NULL, NOVIDEO_TEXT, NOVIDEO_LONGTEXT )
ADD_INTEGER ( "width", -1, NULL, WIDTH_TEXT, WIDTH_LONGTEXT )
ADD_INTEGER ( "height", -1, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT )
+ADD_FLOAT ( "zoom", 1, NULL, ZOOM_TEXT, ZOOM_LONGTEXT )
ADD_BOOL ( "grayscale", NULL, GRAYSCALE_TEXT, GRAYSCALE_LONGTEXT )
ADD_BOOL ( "fullscreen", NULL, FULLSCREEN_TEXT, FULLSCREEN_LONGTEXT )
ADD_BOOL ( "nooverlay", NULL, NOOVERLAY_TEXT, NOOVERLAY_LONGTEXT )
ADD_INTEGER ( "spumargin", -1, NULL, SPUMARGIN_TEXT, SPUMARGIN_LONGTEXT )
-ADD_PLUGIN ( "filter", MODULE_CAPABILITY_VOUT, NULL, NULL, FILTER_TEXT, FILTER_LONGTEXT )
+ADD_MODULE ( "filter", MODULE_CAPABILITY_VOUT, NULL, NULL, FILTER_TEXT, FILTER_LONGTEXT )
/* Input options */
-ADD_CATEGORY_HINT( "Input", NULL )
-ADD_INTEGER ( "server_port", 1234, NULL, SERVER_PORT_TEXT, SERVER_PORT_LONGTEXT )
-ADD_BOOL ( "network_channel", NULL, NETCHANNEL_TEXT, NETCHANNEL_LONGTEXT )
-ADD_STRING ( "channel_server", "localhost", NULL, CHAN_SERV_TEXT, CHAN_SERV_LONGTEXT )
-ADD_INTEGER ( "channel_port", 6010, NULL, CHAN_PORT_TEXT, CHAN_PORT_LONGTEXT )
+ADD_CATEGORY_HINT( N_("Input"), NULL )
+ADD_INTEGER ( "server-port", 1234, NULL, SERVER_PORT_TEXT, SERVER_PORT_LONGTEXT )
+ADD_BOOL ( "network-channel", NULL, NETCHANNEL_TEXT, NETCHANNEL_LONGTEXT )
+ADD_STRING ( "channel-server", "localhost", NULL, CHAN_SERV_TEXT, CHAN_SERV_LONGTEXT )
+ADD_INTEGER ( "channel-port", 6010, NULL, CHAN_PORT_TEXT, CHAN_PORT_LONGTEXT )
ADD_STRING ( "iface", "eth0", NULL, IFACE_TEXT, IFACE_LONGTEXT )
-ADD_INTEGER ( "input_program", 0, NULL, INPUT_PROGRAM_TEXT,
- INPUT_PROGRAM_LONGTEXT )
-ADD_INTEGER ( "input_audio", -1, NULL, INPUT_AUDIO_TEXT, INPUT_AUDIO_LONGTEXT )
-ADD_INTEGER ( "input_channel", -1, NULL, INPUT_CHAN_TEXT, INPUT_CHAN_LONGTEXT )
-ADD_INTEGER ( "input_subtitle", -1, NULL, INPUT_SUBT_TEXT, INPUT_SUBT_LONGTEXT )
-
-ADD_STRING ( "dvd_device", "/dev/dvd", NULL, DVD_DEV_TEXT, DVD_DEV_LONGTEXT )
-ADD_STRING ( "vcd_device", "/dev/cdrom", NULL, VCD_DEV_TEXT, VCD_DEV_LONGTEXT )
-#ifdef HAVE_SATELLITE
-ADD_INTEGER ( "sat_frequency", 11954, NULL, SAT_FREQ_TEXT, SAT_FREQ_LONGTEXT )
-ADD_INTEGER ( "sat_polarization", 0, NULL, SAT_POL_TEXT, SAT_POL_LONGTEXT )
-ADD_INTEGER ( "sat_fec", 3, NULL, SAT_FEC_TEXT, SAT_FEC_LONGTEXT )
-ADD_INTEGER ( "sat_symbol_rate", 27500, NULL, SAT_SRATE_TEXT,
- SAT_SRATE_LONGTEXT )
-ADD_BOOL ( "sat_diseqc", 0, SAT_DISEQC_TEXT, SAT_DISEQC_LONGTEXT )
-ADD_INTEGER ( "sat_lnb_lof1", 10000, NULL, SAT_LNB_LOF1_TEXT,
- SAT_LNB_LOF1_LONGTEXT )
-ADD_INTEGER ( "sat_lnb_lof2", 10000, NULL, SAT_LNB_LOF2_TEXT,
- SAT_LNB_LOF2_LONGTEXT )
-ADD_INTEGER ( "sat_lnb_slof", 11700, NULL, SAT_LNB_SLOF_TEXT,
- SAT_LNB_SLOF_LONGTEXT )
-#endif
+ADD_INTEGER ( "program", 0, NULL, INPUT_PROGRAM_TEXT, INPUT_PROGRAM_LONGTEXT )
+ADD_INTEGER ( "audio-type", -1, NULL, INPUT_AUDIO_TEXT, INPUT_AUDIO_LONGTEXT )
+ADD_INTEGER ( "audio-channel", -1, NULL, INPUT_CHAN_TEXT, INPUT_CHAN_LONGTEXT )
+ADD_INTEGER ( "spu-channel", -1, NULL, INPUT_SUBT_TEXT, INPUT_SUBT_LONGTEXT )
+
+ADD_STRING ( "dvd", "/dev/dvd", NULL, DVD_DEV_TEXT, DVD_DEV_LONGTEXT )
+ADD_STRING ( "vcd", "/dev/cdrom", NULL, VCD_DEV_TEXT, VCD_DEV_LONGTEXT )
-ADD_BOOL ( "ipv6", NULL, IPV6_TEXT, IPV6_LONGTEXT )
-ADD_BOOL ( "ipv4", NULL, IPV4_TEXT, IPV4_LONGTEXT )
+ADD_BOOL_WITH_SHORT ( "ipv6", '6', NULL, IPV6_TEXT, IPV6_LONGTEXT )
+ADD_BOOL_WITH_SHORT ( "ipv4", '4', NULL, IPV4_TEXT, IPV4_LONGTEXT )
/* Decoder options */
-ADD_CATEGORY_HINT( "Decoders", NULL )
-ADD_PLUGIN ( "mpeg_adec", MODULE_CAPABILITY_DECODER, NULL, NULL, ADEC_MPEG_TEXT, ADEC_MPEG_LONGTEXT )
-ADD_PLUGIN ( "ac3_adec", MODULE_CAPABILITY_DECODER, NULL, NULL, ADEC_AC3_TEXT, ADEC_AC3_LONGTEXT )
-ADD_INTEGER ( "vdec_smp", 0, NULL, VDEC_SMP_TEXT, VDEC_SMP_LONGTEXT )
-ADD_STRING ( "vpar_synchro", NULL, NULL, VPAR_SYNCHRO_TEXT, VPAR_SYNCHRO_LONGTEXT )
+ADD_CATEGORY_HINT( N_("Decoders"), NULL )
+ADD_MODULE ( "mpeg-adec", MODULE_CAPABILITY_DECODER, NULL, NULL, ADEC_MPEG_TEXT, ADEC_MPEG_LONGTEXT )
+ADD_MODULE ( "ac3-adec", MODULE_CAPABILITY_DECODER, NULL, NULL, ADEC_AC3_TEXT, ADEC_AC3_LONGTEXT )
+ADD_INTEGER ( "vdec-smp", 0, NULL, VDEC_SMP_TEXT, VDEC_SMP_LONGTEXT )
+ADD_STRING ( "vpar-synchro", NULL, NULL, VPAR_SYNCHRO_TEXT, VPAR_SYNCHRO_LONGTEXT )
/* CPU options */
-ADD_CATEGORY_HINT( "CPU", NULL )
+ADD_CATEGORY_HINT( N_("CPU"), NULL )
ADD_BOOL ( "nommx", NULL, NOMMX_TEXT, NOMMX_LONGTEXT )
ADD_BOOL ( "no3dn", NULL, NO3DN_TEXT, NO3DN_LONGTEXT )
ADD_BOOL ( "nommxext", NULL, NOMMXEXT_TEXT, NOMMXEXT_LONGTEXT )
ADD_BOOL ( "noaltivec", NULL, NOALTIVEC_TEXT, NOALTIVEC_LONGTEXT )
/* Playlist options */
-ADD_CATEGORY_HINT( "Playlist", NULL )
-ADD_BOOL ( "playlist_launch", NULL, PLAYLIST_LAUNCH_TEXT, PLAYLIST_LAUNCH_LONGTEXT )
-ADD_BOOL ( "playlist_enqueue", NULL, PLAYLIST_ENQUEUE_TEXT, PLAYLIST_ENQUEUE_LONGTEXT )
-ADD_BOOL ( "playlist_loop", NULL, PLAYLIST_LOOP_TEXT, PLAYLIST_LOOP_LONGTEXT )
+ADD_CATEGORY_HINT( N_("Playlist"), NULL )
+ADD_BOOL ( "launch-playlist", NULL, PLAYLIST_LAUNCH_TEXT, PLAYLIST_LAUNCH_LONGTEXT )
+ADD_BOOL ( "enqueue-playlist", NULL, PLAYLIST_ENQUEUE_TEXT, PLAYLIST_ENQUEUE_LONGTEXT )
+ADD_BOOL ( "loop-playlist", NULL, PLAYLIST_LOOP_TEXT, PLAYLIST_LOOP_LONGTEXT )
/* Misc options */
-ADD_CATEGORY_HINT( "Miscellaneous", NULL )
-ADD_PLUGIN ( "memcpy", MODULE_CAPABILITY_MEMCPY, NULL, NULL, MEMCPY_TEXT, MEMCPY_LONGTEXT )
+ADD_CATEGORY_HINT( N_("Miscellaneous"), NULL )
+ADD_MODULE ( "memcpy", MODULE_CAPABILITY_MEMCPY, NULL, NULL, MEMCPY_TEXT, MEMCPY_LONGTEXT )
+ADD_MODULE ( "access", MODULE_CAPABILITY_ACCESS, NULL, NULL, "access module", "This is a legacy entry to let you configure access modules" )
+ADD_MODULE ( "demux", MODULE_CAPABILITY_DEMUX, NULL, NULL, "demux module", "This is a legacy entry to let you configure demux modules" )
#if defined(WIN32)
ADD_BOOL ( "fast_pthread", NULL, FAST_PTHREAD_TEXT, FAST_PTHREAD_LONGTEXT )
MODULE_CONFIG_STOP
MODULE_INIT_START
- SET_DESCRIPTION( "Main program" )
+ SET_DESCRIPTION( N_("main program") )
ADD_CAPABILITY( MAIN, 100/*whatever*/ )
MODULE_INIT_STOP
/* Hack for help options */
static module_t help_module;
-static module_config_t p_help_config[] = {
- { MODULE_CONFIG_ITEM_BOOL, "help", "print help (or use -h)",
- NULL, NULL, 0, NULL, NULL, 0 },
- { MODULE_CONFIG_ITEM_BOOL, "longhelp", "print detailed help (or use -H)",
- NULL, NULL, 0, NULL, NULL, 0 },
- { MODULE_CONFIG_ITEM_BOOL, "list", "print a list of available plugins "
- "(or use -l)", NULL, NULL, 0, NULL, NULL, 0 },
- { MODULE_CONFIG_ITEM_STRING, "plugin", "print help on plugin (or use -p)",
- NULL, NULL, 0, NULL, &help_module.config_lock, 0 },
- { MODULE_CONFIG_ITEM_BOOL, "version", "print version information",
- NULL, NULL, 0, NULL, NULL, 0 },
- { MODULE_CONFIG_HINT_END, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0 } };
-
+static module_config_t p_help_config[] =
+{
+ { MODULE_CONFIG_ITEM_BOOL, "help", 'h', N_("print help"),
+ NULL, NULL, 0, 0, NULL, NULL, 0 },
+ { MODULE_CONFIG_ITEM_BOOL, "longhelp", 'H', N_("print detailed help"),
+ NULL, NULL, 0, 0, NULL, NULL, 0 },
+ { MODULE_CONFIG_ITEM_BOOL, "list", 'l', N_("print a list of available "
+ "modules"), NULL, NULL, 0, 0, NULL, NULL, 0 },
+ { MODULE_CONFIG_ITEM_STRING, "module", 'p', N_("print help on module "
+ "<string>"), NULL, NULL, 0, 0, NULL, &help_module.config_lock, 0 },
+ { MODULE_CONFIG_ITEM_BOOL, "version", '\0',
+ N_("print version information"), NULL, NULL, 0, 0, NULL, NULL, 0 },
+ { MODULE_CONFIG_HINT_END, NULL, '\0', NULL, NULL, NULL, 0, 0,
+ NULL, NULL, 0 }
+};
/*****************************************************************************
* End configuration.
* Global variables - these are the only ones, see main.h and modules.h
*****************************************************************************/
main_t *p_main;
-p_main_sys_t p_main_sys;
module_bank_t *p_module_bank;
input_bank_t *p_input_bank;
aout_bank_t *p_aout_bank;
input_bank_t input_bank;
aout_bank_t aout_bank;
vout_bank_t vout_bank;
- char *psz_plugin;
+ char *psz_module;
char *p_tmp;
+ struct module_config_s *p_item;
p_main = &main_data; /* set up the global variables */
p_module_bank = &module_bank;
p_main->i_warning_level = 0;
-#if defined( ENABLE_NLS ) && defined ( HAVE_GETTEXT )
/*
- * Support for getext
+ * Support for gettext
*/
-#if defined( HAVE_LOCALE_H ) && defined( HAVE_LC_MESSAGES )
+#if defined( ENABLE_NLS ) && defined ( HAVE_GETTEXT )
+# if defined( HAVE_LOCALE_H ) && defined( HAVE_LC_MESSAGES )
if( !setlocale( LC_MESSAGES, "" ) )
{
- fprintf( stderr, "warning: unsupported locale.\n" );
+ fprintf( stderr, "warning: unsupported locale settings\n" );
}
-#endif
+
+ setlocale( LC_CTYPE, "" );
+# endif
if( !bindtextdomain( PACKAGE, LOCALEDIR ) )
{
/* Get the executable name (similar to the basename command) */
- p_main->psz_arg0 = p_tmp = ppsz_argv[ 0 ];
- while( *p_tmp )
+ if( i_argc > 0 )
{
- if( *p_tmp == '/' ) p_main->psz_arg0 = ++p_tmp;
- else ++p_tmp;
+ p_main->psz_arg0 = p_tmp = ppsz_argv[ 0 ];
+ while( *p_tmp )
+ {
+ if( *p_tmp == '/' ) p_main->psz_arg0 = ++p_tmp;
+ else ++p_tmp;
+ }
+ }
+ else
+ {
+ p_main->psz_arg0 = "vlc";
}
/*
/* Hack: insert the help module here */
help_module.psz_name = "help";
- help_module.i_config_lines = sizeof(p_help_config) /
- sizeof(module_config_t);
- help_module.i_config_items = help_module.i_config_lines - 1;
+ help_module.psz_longname = _( "help module" );
+ help_module.i_config_items =
+ sizeof(p_help_config) / sizeof(module_config_t) - 1;
vlc_mutex_init( &help_module.config_lock );
- help_module.p_config = p_help_config;
+ help_module.p_config = config_Duplicate( p_help_config );
+ for( p_item = help_module.p_config;
+ p_item->i_type != MODULE_CONFIG_HINT_END;
+ p_item++ )
+ {
+ p_item->p_lock = &help_module.config_lock;
+ }
help_module.next = p_module_bank->first;
p_module_bank->first = &help_module;
/* end hack */
/* Check for short help option */
if( config_GetIntVariable( "help" ) )
{
- intf_Msg( "Usage: %s [options] [parameters] [file]...\n",
- p_main->psz_arg0 );
+ intf_Msg( _("Usage: %s [options] [parameters] [file]...\n"),
+ p_main->psz_arg0 );
Usage( "help" );
Usage( "main" );
/*
* Load the builtins and plugins into the module_bank.
* We have to do it before config_Load*() because this also gets the
- * list of configuration options exported by each plugin and loads their
+ * list of configuration options exported by each module and loads their
* default values.
*/
module_LoadBuiltins();
p_module_bank->first = &help_module;
/* end hack */
- /* Check for help on plugins */
- if( (p_tmp = config_GetPszVariable( "plugin" )) )
+ /* Check for help on modules */
+ if( (p_tmp = config_GetPszVariable( "module" )) )
{
Usage( p_tmp );
free( p_tmp );
return( -1 );
}
- /* Check for plugin list option */
+ /* Check for module list option */
if( config_GetIntVariable( "list" ) )
{
ListModules();
/*
* System specific configuration
*/
-#if defined( WIN32 )
system_Configure();
-#endif
/* p_main inititalization. FIXME ? */
- p_main->i_desync = (mtime_t)config_GetIntVariable( "desync" )
- * (mtime_t)1000;
+ p_main->i_warning_level = config_GetIntVariable( "warning" );
+ p_main->i_desync = config_GetIntVariable( "desync" ) * (mtime_t)1000;
p_main->b_stats = config_GetIntVariable( "stats" );
p_main->b_audio = !config_GetIntVariable( "noaudio" );
p_main->b_stereo= !config_GetIntVariable( "mono" );
if( p_main->b_stats )
{
- char p_capabilities[200];
+ char p_capabilities[200];
p_capabilities[0] = '\0';
#define PRINT_CAPABILITY( capability, string ) \
/*
* Choose the best memcpy module
*/
- psz_plugin = config_GetPszVariable( "memcpy" );
+ psz_module = config_GetPszVariable( "memcpy" );
p_main->p_memcpy_module = module_Need( MODULE_CAPABILITY_MEMCPY,
- psz_plugin, NULL );
- if( psz_plugin ) free( psz_plugin );
+ psz_module, NULL );
+ if( psz_module ) free( psz_module );
if( p_main->p_memcpy_module == NULL )
{
intf_ErrMsg( "intf error: no suitable memcpy module, "
/*
* Initialize shared resources and libraries
*/
- if( config_GetIntVariable( "network_channel" ) &&
+ if( config_GetIntVariable( "network-channel" ) &&
network_ChannelCreate() )
{
/* On error during Channels initialization, switch off channels */
intf_ErrMsg( "intf error: channels initialization failed, "
"deactivating channels" );
- config_PutIntVariable( "network_channel", 0 );
+ config_PutIntVariable( "network-channel", 0 );
}
/*
/*
* Go back into channel 0 which is the network
*/
- if( config_GetIntVariable( "network_channel" ) && p_main->p_channel )
+ if( config_GetIntVariable( "network-channel" ) && p_main->p_channel )
{
network_ChannelJoin( COMMON_CHANNEL );
}
/*
* System specific cleaning code
*/
-#if defined( SYS_BEOS ) || defined( SYS_DARWIN ) || defined( WIN32 )
system_End();
-#endif
-
/*
* Terminate messages interface and program
*****************************************************************************/
static void Usage( const char *psz_module_name )
{
- int i;
+#define FORMAT_STRING " --%s%s%s%s%s %s"
+ /* option name ---------------' | | | | |
+ * <bra ------------------------' | | | |
+ * option type or "" -------------' | | |
+ * ket> ----------------------------' | |
+ * padding spaces --------------------' |
+ * comment ------------------------------'
+ *
+ * The purpose of having bra and ket is that we might i18n them as well.
+ */
+#define LINE_START 8
+#define PADDING_SPACES 25
module_t *p_module;
- char psz_spaces[30];
+ module_config_t *p_item;
+ char psz_spaces[PADDING_SPACES+LINE_START+1];
+ char psz_format[sizeof(FORMAT_STRING)];
+
+ memset( psz_spaces, ' ', PADDING_SPACES+LINE_START );
+ psz_spaces[PADDING_SPACES+LINE_START] = '\0';
- memset( psz_spaces, 32, 30 );
+ strcpy( psz_format, FORMAT_STRING );
#ifdef WIN32
ShowConsole();
p_module != NULL ;
p_module = p_module->next )
{
-
if( psz_module_name && strcmp( psz_module_name, p_module->psz_name ) )
continue;
- /* ignore plugins without config options */
+ /* ignore modules without config options */
if( !p_module->i_config_items ) continue;
/* print module name */
- intf_Msg( "%s options:\n", p_module->psz_name );
+ intf_Msg( _("%s module options:\n"), p_module->psz_name );
- for( i = 0; i < p_module->i_config_lines; i++ )
+ for( p_item = p_module->p_config;
+ p_item->i_type != MODULE_CONFIG_HINT_END;
+ p_item++ )
{
- int j;
+ char *psz_bra = NULL, *psz_type = NULL, *psz_ket = NULL;
+ int i;
- switch( p_module->p_config[i].i_type )
+ if( p_item->i_short )
+ {
+ psz_format[2] = '-';
+ psz_format[3] = p_item->i_short;
+ psz_format[4] = ',';
+ }
+ else
+ {
+ psz_format[2] = ' ';
+ psz_format[3] = ' ';
+ psz_format[4] = ' ';
+ }
+
+ switch( p_item->i_type )
{
case MODULE_CONFIG_HINT_CATEGORY:
- intf_Msg( " %s", p_module->p_config[i].psz_text );
+ intf_Msg( " %s", p_item->psz_text );
break;
case MODULE_CONFIG_ITEM_STRING:
case MODULE_CONFIG_ITEM_FILE:
- case MODULE_CONFIG_ITEM_PLUGIN:
- /* Nasty hack, but right now I'm too tired to think about
- * a nice solution */
- j = 25 - strlen( p_module->p_config[i].psz_name )
- - strlen(" <string>") - 1;
- if( j < 0 ) j = 0; psz_spaces[j] = 0;
-
- intf_Msg( " --%s <string>%s %s",
- p_module->p_config[i].psz_name, psz_spaces,
- p_module->p_config[i].psz_text );
- psz_spaces[j] = 32;
+ case MODULE_CONFIG_ITEM_MODULE: /* We could also have "=<" here */
+ psz_bra = " <"; psz_type = _("string"); psz_ket = ">";
break;
case MODULE_CONFIG_ITEM_INTEGER:
- /* Nasty hack, but right now I'm too tired to think about
- * a nice solution */
- j = 25 - strlen( p_module->p_config[i].psz_name )
- - strlen(" <integer>") - 1;
- if( j < 0 ) j = 0; psz_spaces[j] = 0;
-
- intf_Msg( " --%s <integer>%s %s",
- p_module->p_config[i].psz_name, psz_spaces,
- p_module->p_config[i].psz_text );
- psz_spaces[j] = 32;
+ psz_bra = " <"; psz_type = _("integer"); psz_ket = ">";
+ break;
+ case MODULE_CONFIG_ITEM_FLOAT:
+ psz_bra = " <"; psz_type = _("float"); psz_ket = ">";
break;
case MODULE_CONFIG_ITEM_BOOL:
- /* Nasty hack, but right now I'm too tired to think about
- * a nice solution */
- j = 25 - strlen( p_module->p_config[i].psz_name ) - 1;
- if( j < 0 ) j = 0; psz_spaces[j] = 0;
-
- intf_Msg( " --%s%s %s",
- p_module->p_config[i].psz_name, psz_spaces,
- p_module->p_config[i].psz_text );
- psz_spaces[j] = 32;
+ psz_bra = ""; psz_type = ""; psz_ket = "";
break;
}
+
+ if( psz_type )
+ {
+ i = PADDING_SPACES - strlen( p_item->psz_name )
+ - strlen( psz_bra ) - strlen( psz_type )
+ - strlen( psz_ket ) - 1;
+ if( i < 0 )
+ {
+ i = 0;
+ psz_spaces[i] = '\n';
+ }
+ else
+ {
+ psz_spaces[i] = '\0';
+ }
+
+ intf_Msg( psz_format, p_item->psz_name, psz_bra, psz_type,
+ psz_ket, psz_spaces, p_item->psz_text );
+ psz_spaces[i] = ' ';
+ }
}
/* Yet another nasty hack.
* Maybe we could use MODULE_CONFIG_ITEM_END to display tail messages
* for each module?? */
if( !strcmp( "main", p_module->psz_name ) )
- intf_Msg( "\nPlaylist items:"
- "\n *.mpg, *.vob \tPlain MPEG-1/2 files"
+ {
+ intf_Msg( _("\nPlaylist items:"
+ "\n *.mpg, *.vob plain MPEG-1/2 files"
"\n [dvd:][device][@raw_device][@[title][,[chapter][,angle]]]"
- "\n \tDVD device"
+ "\n DVD device"
"\n [vcd:][device][@[title][,[chapter]]"
- "\n \tVCD device"
+ "\n VCD device"
"\n udpstream:[@[<bind address>][:<bind port>]]"
- "\n \tUDP stream sent by VLS"
- "\n vlc:loop \tLoop execution of the "
+ "\n UDP stream sent by VLS"
+ "\n vlc:loop loop execution of the "
"playlist"
- "\n vlc:pause \tPause execution of "
+ "\n vlc:pause pause execution of "
"playlist items"
- "\n vlc:quit \tQuit VLC" );
+ "\n vlc:quit quit VLC") );
+ }
intf_Msg( "" );
}
#ifdef WIN32 /* Pause the console because it's destroyed when we exit */
- intf_Msg( "\nPress the RETURN key to continue..." );
+ intf_Msg( _("\nPress the RETURN key to continue...") );
getchar();
#endif
}
static void ListModules( void )
{
module_t *p_module;
- char psz_spaces[20];
+ char psz_spaces[22];
- memset( psz_spaces, 32, 20 );
+ memset( psz_spaces, ' ', 22 );
#ifdef WIN32
ShowConsole();
#endif
/* Usage */
- intf_Msg( "Usage: %s [options] [parameters] [file]...\n",
+ intf_Msg( _("Usage: %s [options] [parameters] [file]...\n"),
p_main->psz_arg0 );
- intf_Msg( "[plugin] [description]" );
+ intf_Msg( _("[module] [description]") );
/* Enumerate each module */
for( p_module = p_module_bank->first ;
/* Nasty hack, but right now I'm too tired to think about a nice
* solution */
- i = 20 - strlen( p_module->psz_name ) - 1;
+ i = 22 - strlen( p_module->psz_name ) - 1;
if( i < 0 ) i = 0;
psz_spaces[i] = 0;
intf_Msg( " %s%s %s", p_module->psz_name, psz_spaces,
p_module->psz_longname );
- psz_spaces[i] = 32;
+ psz_spaces[i] = ' ';
}
#ifdef WIN32 /* Pause the console because it's destroyed when we exit */
- intf_Msg( "\nPress the RETURN key to continue..." );
+ intf_Msg( _("\nPress the RETURN key to continue...") );
getchar();
#endif
}
ShowConsole();
#endif
- intf_Msg( VERSION_MESSAGE
- "This program comes with NO WARRANTY, to the extent permitted by "
+ intf_Msg( VERSION_MESSAGE );
+ intf_Msg(
+ _("This program comes with NO WARRANTY, to the extent permitted by "
"law.\nYou may redistribute it under the terms of the GNU General "
"Public License;\nsee the file named COPYING for details.\n"
- "Written by the VideoLAN team at Ecole Centrale, Paris." );
+ "Written by the VideoLAN team at Ecole Centrale, Paris.") );
#ifdef WIN32 /* Pause the console because it's destroyed when we exit */
- intf_Msg( "\nPress the RETURN key to continue..." );
+ intf_Msg( _("\nPress the RETURN key to continue...") );
getchar();
#endif
}
sigrelse( i_signal );
#endif
+#if defined( __i386__ )
fprintf( stderr, "warning: your CPU has %s instructions, but not your "
"operating system.\n", psz_capability );
fprintf( stderr, " some optimizations will be disabled unless "
"you upgrade your OS\n" );
-#ifdef SYS_LINUX
- fprintf( stderr, " (for instance Linux kernel 2.4.x or later)" );
+# if defined( SYS_LINUX )
+ fprintf( stderr, " (for instance Linux kernel 2.4.x or later)\n" );
+# endif
#endif
longjmp( env, 1 );
i_capabilities |= CPU_CAPABILITY_MMXEXT;
# ifdef CAN_COMPILE_SSE
- /* We test if OS support the SSE instructions */
+ /* We test if OS supports the SSE instructions */
psz_capability = "SSE";
i_illegal = 0;
if( setjmp( env ) == 0 )
/*****************************************************************************
* ShowConsole: On Win32, create an output console for debug messages
*****************************************************************************
- * This function is usefull only on Win32.
+ * This function is useful only on Win32.
*****************************************************************************/
#ifdef WIN32 /* */
static void ShowConsole( void )