[geany/geany] c05837: api: export new utils_strv_shorten_file_list() function

Thomas Martitz git-noreply at xxxxx
Mon Dec 3 21:33:59 UTC 2018


Branch:      refs/heads/master
Author:      Thomas Martitz <kugel at rockbox.org>
Committer:   Thomas Martitz <kugel at rockbox.org>
Date:        Mon, 03 Dec 2018 21:33:59 UTC
Commit:      c05837055b0533504b85966852b6f26551616e30
             https://github.com/geany/geany/commit/c05837055b0533504b85966852b6f26551616e30

Log Message:
-----------
api: export new utils_strv_shorten_file_list() function

Since I based the algorithm of the above function on code in one of my python
plugins, I would like to remove the implementation in my plugin and call
Geany's function.


Modified Paths:
--------------
    src/utils.c

Modified: src/utils.c
9 lines changed, 6 insertions(+), 3 deletions(-)
===================================================================
@@ -2146,7 +2146,7 @@ gchar *utils_strv_find_lcs(gchar **strv, size_t num)
 }
 
 
-/* * Transform file names in a list to be shorter.
+/** Transform file names in a list to be shorter.
  *
  * This function takes a list of file names (porbably with absolute paths), and
  * transforms the paths such that they are short but still unique. This is intended
@@ -2156,10 +2156,13 @@ gchar *utils_strv_find_lcs(gchar **strv, size_t num)
  * The algorthm strips the common prefix (e-g. the user's home directory) and
  * replaces the longest common substring with "...".
  *
- * @param file_names The list of strings to process.
+ * @param file_names @arraylen{num} The list of strings to process.
  * @param num The number of strings contained in @a strv. Can be 0 if @a strv is a @c GStrv
- * @return A newly-allocated NULL-terminated array of transformed paths strings. Use @c g_strfreev() to free it.
+ * @return @transfer{full} A newly-allocated NULL-terminated array of transformed paths strings. Use @c g_strfreev() to free it.
+ *
+ * @since 1.34 (API 239)
  */
+GEANY_API_SYMBOL
 gchar **utils_strv_shorten_file_list(gchar **file_names, size_t num)
 {
 	gint i, j;



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list