[vlc-devel] commit: (p?)gettext -> vlc_\1gettext ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Apr 21 11:01:49 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr 21 11:58:21 2009 +0300| [7d5bf1ea1baaaad1dbd494312b725e18b00c1de9] | committer: Rémi Denis-Courmont 

(p?)gettext -> vlc_\1gettext

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7d5bf1ea1baaaad1dbd494312b725e18b00c1de9
---

 include/vlc_config_cat.h           |    4 ++--
 include/vlc_fixups.h               |    7 ++-----
 modules/demux/mkv/mkv.hpp          |    1 -
 modules/demux/playlist/shoutcast.c |    6 ++++--
 modules/demux/ts.c                 |    4 ++--
 modules/demux/ty.c                 |    2 +-
 modules/gui/qt4/qt4.hpp            |    2 +-
 modules/services_discovery/shout.c |    2 +-
 modules/video_output/xcb/window.c  |    4 ++--
 src/config/file.c                  |    2 +-
 src/extras/getopt.c                |    2 +-
 src/extras/libc.c                  |    1 -
 src/input/es_out.c                 |    4 ++--
 src/libvlc.c                       |    1 -
 src/modules/entry.c                |    1 -
 src/video_output/video_output.c    |    2 +-
 16 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/include/vlc_config_cat.h b/include/vlc_config_cat.h
index 5ad70ad..f8686f8 100644
--- a/include/vlc_config_cat.h
+++ b/include/vlc_config_cat.h
@@ -288,7 +288,7 @@ static inline const char *config_CategoryNameGet( int i_value )
     {
         if( categories_array[i].i_id == i_value )
         {
-            return gettext(categories_array[i].psz_name);
+            return vlc_gettext(categories_array[i].psz_name);
         }
         i++;
     }
@@ -303,7 +303,7 @@ static inline const char *config_CategoryHelpGet( int i_value )
     {
         if( categories_array[i].i_id == i_value )
         {
-            return gettext(categories_array[i].psz_help);
+            return vlc_gettext(categories_array[i].psz_help);
         }
         i++;
     }
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index ead019d..98c680a 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -175,11 +175,8 @@ typedef void *locale_t;
 #endif
 
 /* libintl support */
-#define _(str)           gettext(str)
-#define gettext(str)     vlc_gettext (str)
-#define pgettext(ctx,id) vlc_pgettext(ctx,id)
-
-#define N_(str) gettext_noop (str)
+#define _(str)            vlc_gettext (str)
+#define N_(str)           gettext_noop (str)
 #define gettext_noop(str) (str)
 
 #ifndef HAVE_SWAB
diff --git a/modules/demux/mkv/mkv.hpp b/modules/demux/mkv/mkv.hpp
index 0b8964e..c01e5ff 100644
--- a/modules/demux/mkv/mkv.hpp
+++ b/modules/demux/mkv/mkv.hpp
@@ -38,7 +38,6 @@
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
-#undef gettext
 
 #include <inttypes.h>
 
diff --git a/modules/demux/playlist/shoutcast.c b/modules/demux/playlist/shoutcast.c
index cd78bd8..e5257de 100644
--- a/modules/demux/playlist/shoutcast.c
+++ b/modules/demux/playlist/shoutcast.c
@@ -402,8 +402,10 @@ static int DemuxStation( demux_t *p_demux )
                     input_item_CopyOptions( p_sys->p_current_input, p_input );
                     free( psz_mrl );
 
-#define SADD_INFO( type, field ) if( field ) { input_item_AddInfo( \
-                    p_input, _("Shoutcast"), gettext(type), "%s", field ) ; }
+#define SADD_INFO( type, field ) \
+                    if( field ) \
+                        input_item_AddInfo( p_input, _("Shoutcast"), \
+                                            vlc_gettext(type), "%s", field )
                     SADD_INFO( N_("Mime"), psz_mt );
                     SADD_INFO( N_("Bitrate"), psz_br );
                     SADD_INFO( N_("Listeners"), psz_lc );
diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index efed861..5493c47 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -3265,7 +3265,7 @@ static void PMTSetupEsTeletext( demux_t *p_demux, ts_pid_t *pid,
     {
         p_fmt->subs.teletext.i_magazine = -1;
         p_fmt->subs.teletext.i_page = 0;
-        p_fmt->psz_description = strdup( gettext(ppsz_teletext_type[1]) );
+        p_fmt->psz_description = strdup( vlc_gettext(ppsz_teletext_type[1]) );
 
         dvbpsi_descriptor_t *p_dr;
         p_dr = PMTEsFindDescriptor( p_es, 0x46 );
@@ -3320,7 +3320,7 @@ static void PMTSetupEsTeletext( demux_t *p_demux, ts_pid_t *pid,
             /* */
             const ts_teletext_page_t *p = &p_page[i];
             p_es->fmt.psz_language = strndup( p->p_iso639, 3 );
-            p_es->fmt.psz_description = strdup(gettext(ppsz_teletext_type[p->i_type]));
+            p_es->fmt.psz_description = strdup(vlc_gettext(ppsz_teletext_type[p->i_type]));
             p_es->fmt.subs.teletext.i_magazine = p->i_magazine;
             p_es->fmt.subs.teletext.i_page = p->i_page;
 
diff --git a/modules/demux/ty.c b/modules/demux/ty.c
index 68aa57f..2d7594e 100644
--- a/modules/demux/ty.c
+++ b/modules/demux/ty.c
@@ -780,7 +780,7 @@ static int DemuxRecVideo( demux_t *p_demux, ty_rec_hdr_t *rec_hdr, block_t *p_bl
             continue;
 
         es_format_Init( &fmt, SPU_ES, fcc[i] );
-        fmt.psz_description = strdup( gettext(ppsz_description[i]) );
+        fmt.psz_description = strdup( vlc_gettext(ppsz_description[i]) );
         fmt.i_group = TY_ES_GROUP;
         p_sys->p_cc[i] = es_out_Add( p_demux->out, &fmt );
         es_format_Clean( &fmt );
diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp
index 3510084..b764a9c 100644
--- a/modules/gui/qt4/qt4.hpp
+++ b/modules/gui/qt4/qt4.hpp
@@ -86,7 +86,7 @@ struct intf_sys_t
 #define THEMIM MainInputManager::getInstance( p_intf )
 
 #define qfu( i ) QString::fromUtf8( i )
-#define qtr( i ) QString::fromUtf8( gettext(i) )
+#define qtr( i ) QString::fromUtf8( vlc_gettext(i) )
 #define qtu( i ) ((i).toUtf8().constData())
 
 #define CONNECT( a, b, c, d ) connect( a, SIGNAL( b ), c, SLOT(d) )
diff --git a/modules/services_discovery/shout.c b/modules/services_discovery/shout.c
index 8575370..b12dfbd 100644
--- a/modules/services_discovery/shout.c
+++ b/modules/services_discovery/shout.c
@@ -187,7 +187,7 @@ static input_item_t * CreateInputItemFromShoutItem( services_discovery_t *p_sd,
     int i;
     /* Create the item */
     input_item_t *p_input = input_item_New( p_sd, p_item->psz_url,
-                                            gettext(p_item->psz_name) );
+                                            vlc_gettext(p_item->psz_name) );
 
     /* Copy options */
     for( i = 0; p_item->ppsz_options[i] != NULL; i++ )
diff --git a/modules/video_output/xcb/window.c b/modules/video_output/xcb/window.c
index 7f43abc..0353ce3 100644
--- a/modules/video_output/xcb/window.c
+++ b/modules/video_output/xcb/window.c
@@ -162,9 +162,9 @@ static int Open (vlc_object_t *obj)
      * No cut&paste nor drag&drop, only Window Manager communication. */
     /* Plain ASCII localization of VLC for ICCCM window name */
     set_ascii_prop (conn, window, XA_WM_NAME,
-                    pgettext ("ASCII VLC media player", "VLC media player"));
+                  vlc_pgettext ("ASCII VLC media player", "VLC media player"));
     set_ascii_prop (conn, window, XA_WM_ICON_NAME,
-                    pgettext ("ASCII VLC", "VLC"));
+                    vlc_pgettext ("ASCII VLC", "VLC"));
     xcb_change_property (conn, XCB_PROP_MODE_REPLACE, window, XA_WM_CLASS,
                          XA_STRING, 8, 8, "vlc\0Vlc");
     set_hostname_prop (conn, window);
diff --git a/src/config/file.c b/src/config/file.c
index 3f2c355..f170bbe 100644
--- a/src/config/file.c
+++ b/src/config/file.c
@@ -375,7 +375,7 @@ config_Write (FILE *file, const char *type, const char *desc,
     if (desc == NULL)
         desc = "?";
 
-    if (fprintf (file, "# %s (%s)\n%s%s=", desc, gettext (type),
+    if (fprintf (file, "# %s (%s)\n%s%s=", desc, vlc_gettext (type),
                  comment ? "#" : "", name) < 0)
         return -1;
 
diff --git a/src/extras/getopt.c b/src/extras/getopt.c
index 38e8f69..1dbcc89 100644
--- a/src/extras/getopt.c
+++ b/src/extras/getopt.c
@@ -93,7 +93,7 @@
    When compiling libc, the _ macro is predefined.  */
 #ifdef HAVE_LIBINTL_H
 #include <libintl.h>
-#define _(msgid)    gettext (msgid)
+#define _(msgid)    vlc_gettext (msgid)
 #else
 #define _(msgid)    (msgid)
 #endif
diff --git a/src/extras/libc.c b/src/extras/libc.c
index 8e36fe0..6473497 100644
--- a/src/extras/libc.c
+++ b/src/extras/libc.c
@@ -192,7 +192,6 @@ int vlc_wclosedir( void *_p_dir )
 }
 
 #ifdef ENABLE_NLS
-# undef gettext
 # include <libintl.h>
 #endif
 
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 76555e8..143e2d5 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1206,7 +1206,7 @@ static void EsOutProgramMeta( es_out_t *out, int i_group, vlc_meta_t *p_meta )
     for( i = 0; ppsz_all_keys[i]; i++ )
     {
         input_Control( p_input, INPUT_ADD_INFO, psz_cat,
-                       gettext(ppsz_all_keys[i]),
+                       vlc_gettext(ppsz_all_keys[i]),
                        vlc_dictionary_value_for_key( &p_meta->extra_tags,
                        ppsz_all_keys[i] ) );
         free( ppsz_all_keys[i] );
@@ -2759,7 +2759,7 @@ static void EsOutUpdateInfo( es_out_t *out, es_out_id_t *es, const es_format_t *
 
             if( psz_value )
                 input_Control( p_input, INPUT_ADD_INFO, psz_cat,
-                               gettext(psz_key), gettext(psz_value) );
+                               vlc_gettext(psz_key), vlc_gettext(psz_value) );
             free( psz_key );
         }
         free( ppsz_all_keys );
diff --git a/src/libvlc.c b/src/libvlc.c
index 1403995..7b394e7 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -67,7 +67,6 @@
 #endif
 
 #ifdef ENABLE_NLS
-# undef gettext
 # include <libintl.h> /* bindtextdomain */
 #endif
 
diff --git a/src/modules/entry.c b/src/modules/entry.c
index dd83550..4fb35a6 100644
--- a/src/modules/entry.c
+++ b/src/modules/entry.c
@@ -29,7 +29,6 @@
 #include <stdarg.h>
 
 #ifdef ENABLE_NLS
-# undef gettext
 # include <libintl.h>
 #endif
 
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 02ba010..3024eed 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -2038,7 +2038,7 @@ static void DeinterlaceEnable( vout_thread_t *p_vout )
     for( int i = 0; p_deinterlace_mode[i].psz_mode; i++ )
     {
         val.psz_string  = (char*)p_deinterlace_mode[i].psz_mode;
-        text.psz_string = (char*)gettext(p_deinterlace_mode[i].psz_description);
+        text.psz_string = (char*)vlc_gettext(p_deinterlace_mode[i].psz_description);
         var_Change( p_vout, "deinterlace", VLC_VAR_ADDCHOICE, &val, &text );
     }
     var_AddCallback( p_vout, "deinterlace", DeinterlaceCallback, NULL );




More information about the vlc-devel mailing list