]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
Support for pgettext
[vlc] / include / vlc_common.h
index 495904540914d747d2bb7838b5a710eb788184fa..869bfc4945223fa15cd5eb9a1416461b07070eb7 100644 (file)
@@ -179,10 +179,7 @@ typedef struct config_category_t config_category_t;
 /* Interface */
 typedef struct intf_thread_t intf_thread_t;
 typedef struct intf_sys_t intf_sys_t;
-typedef struct intf_console_t intf_console_t;
 typedef struct intf_msg_t intf_msg_t;
-typedef struct interaction_t interaction_t;
-typedef struct interaction_dialog_t interaction_dialog_t;
 typedef struct user_widget_t user_widget_t;
 
 /* Input */
@@ -362,7 +359,6 @@ typedef struct counter_t     counter_t;
 typedef struct counter_sample_t counter_sample_t;
 typedef struct stats_handler_t stats_handler_t;
 typedef struct input_stats_t input_stats_t;
-typedef struct global_stats_t global_stats_t;
 
 /* Update */
 typedef struct update_t update_t;
@@ -510,7 +506,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
  * these members are common for all vlc objects                             \
  */                                                                         \
 /**@{*/                                                                     \
-    int   i_object_type;                                                    \
     const char *psz_object_type;                                            \
     char *psz_object_name;                                                  \
                                                                             \
@@ -736,10 +731,6 @@ static inline uint64_t ntoh64 (uint64_t ll)
 #define VLC_UNUSED(x) (void)(x)
 
 /* Stuff defined in src/extras/libc.c */
-VLC_EXPORT( size_t, vlc_strlcpy, ( char *, const char *, size_t ) );
-VLC_EXPORT( long long, vlc_strtoll, ( const char *nptr, char **endptr, int base ) LIBVLC_USED );
-
-VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) LIBVLC_USED );
 
 #if defined(WIN32) || defined(UNDER_CE)
 /* win32, cl and icl support */
@@ -788,14 +779,6 @@ VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) LIBVLC_US
 
 #   ifndef alloca
 #       define alloca _alloca
-#   endif
-
-    /* These two are not defined in mingw32 (bug?) */
-#   ifndef snprintf
-#       define snprintf _snprintf
-#   endif
-#   ifndef vsnprintf
-#       define vsnprintf _vsnprintf
 #   endif
 
 #   include <tchar.h>
@@ -803,10 +786,6 @@ VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) LIBVLC_US
 
 VLC_EXPORT( bool, vlc_ureduce, ( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ) );
 
-/* vlc_wraptext (defined in src/extras/libc.c) */
-#define wraptext vlc_wraptext
-VLC_EXPORT( char *, vlc_wraptext, ( const char *, int ) LIBVLC_USED );
-
 /* iconv wrappers (defined in src/extras/libc.c) */
 typedef void *vlc_iconv_t;
 VLC_EXPORT( vlc_iconv_t, vlc_iconv_open, ( const char *, const char * ) LIBVLC_USED );
@@ -848,6 +827,12 @@ VLC_EXPORT( void *, vlc_memset, ( void *, int, size_t ) );
  *****************************************************************************/
 VLC_EXPORT( char *, vlc_gettext, ( const char *msgid ) LIBVLC_USED );
 
+static inline const char *vlc_pgettext( const char *ctx, const char *id )
+{
+    const char *tr = vlc_gettext( id );
+    return (tr == ctx) ? id : tr;
+}
+
 /*****************************************************************************
  * libvlc features
  *****************************************************************************/
@@ -857,7 +842,6 @@ VLC_EXPORT( const char *, VLC_CompileHost, ( void ) LIBVLC_USED );
 VLC_EXPORT( const char *, VLC_CompileDomain, ( void ) LIBVLC_USED );
 VLC_EXPORT( const char *, VLC_Compiler, ( void ) LIBVLC_USED );
 VLC_EXPORT( const char *, VLC_Error, ( int ) LIBVLC_USED );
-VLC_EXPORT( const char *, VLC_Changeset, ( void ) LIBVLC_USED );
 
 /*****************************************************************************
  * Additional vlc stuff