( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
static void SetLanguage ( char const * );
#endif
-static inline int LoadMessages ( libvlc_int_t * );
+static inline int LoadMessages (void);
static int GetFilenames ( libvlc_int_t *, int, const char *[] );
static void Help ( libvlc_int_t *, char const *psz_help_name );
static void Usage ( libvlc_int_t *, char const *psz_search );
/*
* Support for gettext
*/
- LoadMessages( p_libvlc );
+ LoadMessages ();
/* Initialize the module bank and load the configuration of the
* main module. We need to do this at this stage to be able to display
struct hotkey *p_keys =
malloc( (libvlc_actions_count + 1) * sizeof (*p_keys) );
- /* Initialize from configuration */
+ /* Initialize from configuration */
for( size_t i = 0; i < libvlc_actions_count; i++ )
{
p_keys[i].psz_action = libvlc_actions[i].name;
#endif
-static inline int LoadMessages (libvlc_int_t *p_libvlc)
+static inline int LoadMessages (void)
{
#if defined( ENABLE_NLS ) \
&& ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
#if !defined( __APPLE__ ) && !defined( WIN32 ) && !defined( SYS_BEOS )
static const char psz_path[] = LOCALEDIR;
#else
- char *psz_datapath = config_GetDataDir (p_libvlc);
char psz_path[1024];
if (snprintf (psz_path, sizeof (psz_path), "%s" DIR_SEP "%s",
- psz_datapath, "locale")
+ config_GetDataDirDefault(), "locale")
>= (int)sizeof (psz_path))
- {
- free (psz_datapath);
return -1;
- }
- free (psz_datapath);
#endif
if (bindtextdomain (PACKAGE_NAME, psz_path) == NULL)
#ifdef WIN32
ShowConsole( true );
+ b_color = false; // don't put color control codes in a .txt file
+#else
+ if( !isatty( 1 ) )
+ b_color = false;
#endif
/* List all modules */