From 70d808bb6ccd5e4469e1b6eda8c97f14fb350fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Tue, 17 May 2016 21:17:10 +0300 Subject: [PATCH] Rename str_format_meta() to strfinput() Not the best naming convention known to mankind, but still better than starting with "str". --- 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 98e329b998..1bbb82fa74 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 19483dc4e8..f6394adf52 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 19c3af8f12..4b230ec980 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 3b8df794aa..6847969e24 100644 --- a/modules/gui/qt/input_manager.cpp +++ b/modules/gui/qt/input_manager.cpp @@ -32,7 +32,7 @@ #include /* ACTION_ID */ #include /* vlc_uri_decode */ -#include /* str_format_meta */ +#include /* vlc_strfinput */ #include /* audio_output_t */ #include @@ -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 e8f8088fab..305806d9b1 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 f0206f5428..4683e2ceb1 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 41b58bd834..96f6795c07 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 b151ae2c02..c5cd3fd86f 100644 --- a/src/text/strings.c +++ b/src/text/strings.c @@ -39,7 +39,7 @@ #include #include -/* Needed by str_format_meta */ +/* Needed by vlc_strfinput */ #include #include #include @@ -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;