if( psz_help_name && !strcmp( psz_help_name, "help" ) )
{
- fprintf( stdout, VLC_USAGE, p_this->psz_object_name );
+ utf8_fprintf( stdout, VLC_USAGE, p_this->psz_object_name );
Usage( p_this, "help" );
Usage( p_this, "main" );
}
else if( psz_help_name && !strcmp( psz_help_name, "longhelp" ) )
{
- fprintf( stdout, VLC_USAGE, p_this->psz_object_name );
+ utf8_fprintf( stdout, VLC_USAGE, p_this->psz_object_name );
Usage( p_this, NULL );
}
else if( psz_help_name )
/* Print name of module */
if( strcmp( "main", p_parser->psz_object_name ) )
- fprintf( stdout, "\n %s\n", p_parser->psz_longname );
+ utf8_fprintf( stdout, "\n %s\n", p_parser->psz_longname );
b_help_module = !strcmp( "help", p_parser->psz_object_name );
case CONFIG_HINT_CATEGORY:
case CONFIG_HINT_USAGE:
if( !strcmp( "main", p_parser->psz_object_name ) )
- fprintf( stdout, "\n %s\n", p_item->psz_text );
+ utf8_fprintf( stdout, "\n %s\n", p_item->psz_text );
break;
case CONFIG_ITEM_STRING:
if( p_item->i_type == CONFIG_ITEM_BOOL && !b_help_module )
{
- fprintf( stdout, psz_format, psz_short, p_item->psz_name,
+ utf8_fprintf( stdout, psz_format, psz_short, p_item->psz_name,
psz_prefix, p_item->psz_name, psz_bra, psz_type,
psz_ket, psz_spaces );
}
else
{
- fprintf( stdout, psz_format, psz_short, p_item->psz_name,
+ utf8_fprintf( stdout, psz_format, psz_short, p_item->psz_name,
"", "", psz_bra, psz_type, psz_ket, psz_spaces );
}
/* If the remaining text fits in a line, print it. */
if( i_end <= (size_t)i_width )
{
- fprintf( stdout, "%s\n", psz_text );
+ utf8_fprintf( stdout, "%s\n", psz_text );
break;
}
{
char c = psz_text[i_width];
psz_text[i_width] = '\0';
- fprintf( stdout, "%s\n%s", psz_text, psz_spaces );
+ utf8_fprintf( stdout, "%s\n%s", psz_text, psz_spaces );
psz_text += i_width;
psz_text[0] = c;
}
else
{
psz_word[-1] = '\0';
- fprintf( stdout, "%s\n%s", psz_text, psz_spaces );
+ utf8_fprintf( stdout, "%s\n%s", psz_text, psz_spaces );
psz_text = psz_word;
}
}
sprintf( psz_buffer, "%s%s", p_item->psz_longtext, psz_suf );
b_description = VLC_FALSE;
psz_spaces = psz_spaces_longtext;
- fprintf( stdout, "%s", psz_spaces );
+ utf8_fprintf( stdout, "%s", psz_spaces );
goto description;
}
}
if( i < 0 ) i = 0;
psz_spaces[i] = 0;
- fprintf( stdout, " %s%s %s\n", p_parser->psz_object_name,
+ utf8_fprintf( stdout, " %s%s %s\n", p_parser->psz_object_name,
psz_spaces, p_parser->psz_longname );
psz_spaces[i] = ' ';
ShowConsole( VLC_TRUE );
#endif
- fprintf( stdout, _("VLC version %s\n"), VLC_Version() );
- fprintf( stdout, _("Compiled by %s@%s.%s\n"),
+ utf8_fprintf( stdout, _("VLC version %s\n"), VLC_Version() );
+ utf8_fprintf( stdout, _("Compiled by %s@%s.%s\n"),
VLC_CompileBy(), VLC_CompileHost(), VLC_CompileDomain() );
- fprintf( stdout, _("Compiler: %s\n"), VLC_Compiler() );
+ utf8_fprintf( stdout, _("Compiler: %s\n"), VLC_Compiler() );
if( strcmp( VLC_Changeset(), "exported" ) )
- fprintf( stdout, _("Based upon svn changeset [%s]\n"),
+ utf8_fprintf( stdout, _("Based upon svn changeset [%s]\n"),
VLC_Changeset() );
- fprintf( stdout, LICENSE_MSG );
+ utf8_fprintf( stdout, LICENSE_MSG );
#ifdef WIN32 /* Pause the console because it's destroyed when we exit */
PauseConsole();
{
fclose( f_help );
freopen( "vlc-help.txt", "wt", stdout );
- fprintf( stderr, _("\nDumped content to vlc-help.txt file.\n") );
+ utf8_fprintf( stderr, _("\nDumped content to vlc-help.txt file.\n") );
}
else freopen( "CONOUT$", "w", stdout );
if( getenv( "PWD" ) && getenv( "PS1" ) ) return; /* cygwin shell */
- fprintf( stderr, _("\nPress the RETURN key to continue...\n") );
+ utf8_fprintf( stderr, _("\nPress the RETURN key to continue...\n") );
getchar();
fclose( stdout );
#endif
#include "vlc_interface.h"
+#include "charset.h"
/*****************************************************************************
* Local macros
fprintf( stderr, "main warning: can't store message (%s): ",
strerror(errno) );
vlc_va_copy( args, _args );
+ /* We should use utf8_vfprintf - but it calls malloc()... */
vfprintf( stderr, psz_format, args );
va_end( args );
- fprintf( stderr, "\n" );
+ fputs( "\n", stderr );
return;
}
{
if( p_item->psz_header )
{
- fprintf( stderr, "[" GREEN "%.8i" GRAY "] %s %s %s%s: %s%s" GRAY
+ utf8_fprintf( stderr, "[" GREEN "%.8i" GRAY "] %s %s %s%s: %s%s" GRAY
"\n",
p_item->i_object_id, p_item->psz_header,
p_item->psz_module, psz_object,
}
else
{
- fprintf( stderr, "[" GREEN "%.8i" GRAY "] %s %s%s: %s%s" GRAY "\n",
+ utf8_fprintf( stderr, "[" GREEN "%.8i" GRAY "] %s %s%s: %s%s" GRAY "\n",
p_item->i_object_id, p_item->psz_module, psz_object,
ppsz_type[i_type], ppsz_color[i_type],
p_item->psz_msg );
{
if( p_item->psz_header )
{
- fprintf( stderr, "[%.8i] %s %s %s%s: %s\n", p_item->i_object_id,
+ utf8_fprintf( stderr, "[%.8i] %s %s %s%s: %s\n", p_item->i_object_id,
p_item->psz_header, p_item->psz_module,
psz_object, ppsz_type[i_type], p_item->psz_msg );
}
else
{
- fprintf( stderr, "[%.8i] %s %s%s: %s\n", p_item->i_object_id,
+ utf8_fprintf( stderr, "[%.8i] %s %s%s: %s\n", p_item->i_object_id,
p_item->psz_module, psz_object, ppsz_type[i_type],
p_item->psz_msg );
}