Mercurial > mplayer.hg
changeset 5220:4afbe13150e6
splitted mp_msg_init and mp_msg_set_level and added i18n support to init
author | alex |
---|---|
date | Wed, 20 Mar 2002 15:14:59 +0000 |
parents | 9a2e8b32db2a |
children | 533a58023392 |
files | mp_msg.c mp_msg.h |
diffstat | 2 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mp_msg.c Wed Mar 20 14:56:26 2002 +0000 +++ b/mp_msg.c Wed Mar 20 15:14:59 2002 +0000 @@ -16,7 +16,21 @@ #if 1 -void mp_msg_init(int verbose){ +void mp_msg_init(){ +#ifdef USE_I18N + fprintf(stdout, "Using GNU internationalization\n"); + fprintf(stdout, "Original domain: %s\n", textdomain(NULL)); + fprintf(stdout, "Original dirname: %s\n", bindtextdomain(textdomain(NULL),NULL)); + setlocale(LC_ALL, ""); /* set from the environment variables */ + bindtextdomain("mplayer", PREFIX"/share/locale"); + textdomain("mplayer"); + fprintf(stdout, "Current domain: %s\n", textdomain(NULL)); + fprintf(stdout, "Current dirname: %s\n", bindtextdomain(textdomain(NULL),NULL)); +#endif + mp_msg_set_level(MSGL_STATUS); +} + +void mp_msg_set_level(int verbose){ int i; for(i=0;i<MSGT_MAX;i++){ mp_msg_levels[i]=verbose;
--- a/mp_msg.h Wed Mar 20 14:56:26 2002 +0000 +++ b/mp_msg.h Wed Mar 20 15:14:59 2002 +0000 @@ -68,13 +68,15 @@ #define MSGT_MAX 64 -void mp_msg_init(int verbose); +void mp_msg_init(); +void mp_msg_set_level(int verbose); void mp_msg_c( int x, const char *format, ... ); #include "config.h" #ifdef USE_I18N #include <libintl.h> +#include <locale.h> #define mp_gettext(String) gettext(String) #else #define mp_gettext(String) String