vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Tue May 17 21:17:10 2016 +0300| [70d808bb6ccd5e4469e1b6eda8c97f14fb350fc9] | committer: Rémi Denis-Courmont
Rename str_format_meta() to strfinput() Not the best naming convention known to mankind, but still better than starting with "str". > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=70d808bb6ccd5e4469e1b6eda8c97f14fb350fc9 --- include/vlc_strings.h | 10 ++++++++-- modules/gui/macosx/CoreInteraction.m | 2 +- modules/gui/macosx/MainWindow.m | 2 +- modules/gui/qt/input_manager.cpp | 4 ++-- modules/gui/skins2/src/vlcproc.cpp | 2 +- src/check_symbols | 2 +- src/libvlccore.sym | 2 +- src/text/strings.c | 4 ++-- 8 files changed, 17 insertions(+), 11 deletions(-) diff --git a/include/vlc_strings.h b/include/vlc_strings.h index 98e329b..1bbb82f 100644 --- a/include/vlc_strings.h +++ b/include/vlc_strings.h @@ -132,12 +132,18 @@ VLC_API char * vlc_b64_decode( const char *psz_src ); * @return an allocated string (must be free()'d), or NULL on memory error. */ VLC_API char *vlc_strftime( const char * ); -VLC_API char * str_format_meta( input_thread_t *, const char * ); + +/** + * Formats input meta-data. + * + * Formats input and input item meta-informations into a heap-allocated string. + */ +VLC_API char *vlc_strfinput( input_thread_t *, const char * ); static inline char *str_format( input_thread_t *input, const char *fmt ) { char *s1 = vlc_strftime( fmt ); - char *s2 = str_format_meta( input, s1 ); + char *s2 = vlc_strfinput( input, s1 ); free( s1 ); return s2; } diff --git a/modules/gui/macosx/CoreInteraction.m b/modules/gui/macosx/CoreInteraction.m index 19483dc..f6394ad 100644 --- a/modules/gui/macosx/CoreInteraction.m +++ b/modules/gui/macosx/CoreInteraction.m @@ -309,7 +309,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var, NSString *o_name = @""; char *format = var_InheritString(getIntf(), "input-title-format"); if (format) { - char *formated = str_format_meta(p_input, format); + char *formated = vlc_strfinput(p_input, format); free(format); o_name = toNSStr(formated); free(formated); diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m index 19c3af8..4b230ec 100644 --- a/modules/gui/macosx/MainWindow.m +++ b/modules/gui/macosx/MainWindow.m @@ -691,7 +691,7 @@ static const float f_min_window_height = 307.; if (!config_GetPsz(getIntf(), "video-title")) { char *format = var_InheritString(getIntf(), "input-title-format"); if (format) { - char *formated = str_format_meta(p_input, format); + char *formated = vlc_strfinput(p_input, format); free(format); aString = toNSStr(formated); free(formated); diff --git a/modules/gui/qt/input_manager.cpp b/modules/gui/qt/input_manager.cpp index 3b8df79..6847969 100644 --- a/modules/gui/qt/input_manager.cpp +++ b/modules/gui/qt/input_manager.cpp @@ -32,7 +32,7 @@ #include <vlc_keys.h> /* ACTION_ID */ #include <vlc_url.h> /* vlc_uri_decode */ -#include <vlc_strings.h> /* str_format_meta */ +#include <vlc_strings.h> /* vlc_strfinput */ #include <vlc_aout.h> /* audio_output_t */ #include <QApplication> @@ -520,7 +520,7 @@ void InputManager::UpdateName() char *formatted = NULL; if (format != NULL) { - formatted = str_format_meta( p_input, format ); + formatted = vlc_strfinput( p_input, format ); free( format ); if( formatted != NULL ) { diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp index e8f8088..305806d 100644 --- a/modules/gui/skins2/src/vlcproc.cpp +++ b/modules/gui/skins2/src/vlcproc.cpp @@ -744,7 +744,7 @@ void VlcProc::update_current_input() char *psz_name = NULL; if( psz_fmt != NULL ) { - psz_name = str_format_meta( pInput, psz_fmt ); + psz_name = vlc_strfinput( pInput, psz_fmt ); free( psz_fmt ); } diff --git a/src/check_symbols b/src/check_symbols index f0206f5..4683e2c 100755 --- a/src/check_symbols +++ b/src/check_symbols @@ -20,7 +20,7 @@ cat libvlccore.sym | grep -v \ -e '^net_' -e '^httpd_' \ -e '^config_' -e '^module_' -e '^var_' \ -e '^date_' -e '^sdp_' -e '^plane_' \ - -e '^us_' -e '^utf8_' -e '^xml_' -e '^str_format_' -e '^GetLang_' \ + -e '^us_' -e '^utf8_' -e '^xml_' -e '^GetLang_' \ -e '^m\(date\|sleep\|wait\)$' -e '^[A-Z][a-z]*Charset$' -e 'MD5$' \ -e '^NTPtime64$' -e '^secstotimestr$' \ && exit 1 diff --git a/src/libvlccore.sym b/src/libvlccore.sym index 41b58bd..96f6795 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -405,7 +405,7 @@ stream_UrlNew stream_vaControl stream_ReadDir stream_FilterDefaultReadDir -str_format_meta +vlc_strfinput vlc_strftime subpicture_Delete subpicture_New diff --git a/src/text/strings.c b/src/text/strings.c index b151ae2..c5cd3fd 100644 --- a/src/text/strings.c +++ b/src/text/strings.c @@ -39,7 +39,7 @@ #include <limits.h> #include <math.h> -/* Needed by str_format_meta */ +/* Needed by vlc_strfinput */ #include <vlc_input.h> #include <vlc_meta.h> #include <vlc_aout.h> @@ -524,7 +524,7 @@ static int write_meta(FILE *stream, input_item_t *item, vlc_meta_type_t type) return ret; } -char *str_format_meta(input_thread_t *input, const char *s) +char *vlc_strfinput(input_thread_t *input, const char *s) { char *str; size_t len; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
