Skip to content

Commit

Permalink
Fix one oops and a couple of mistakes in comments, found by review.
Browse files Browse the repository at this point in the history
  • Loading branch information
kugel- committed Dec 3, 2018
1 parent c058370 commit 7fdd360
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/utils.c
Expand Up @@ -2046,10 +2046,10 @@ gchar **utils_strv_join(gchar **first, gchar **second)

/* * Returns the common prefix in a list of strings.
*
* The size of the list may be given explicitely automatically determined if passed a GStrv.
* The size of the list may be given explicitely, but defaults to @c g_strv_length(strv).
*
* @param strv 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
* @param num The number of strings contained in @a strv. Can be 0 if it's terminated by @c NULL.
*
* @return The common prefix that is part of all strings (maybe empty), or NULL if an empty list
* was passed in.
Expand All @@ -2068,7 +2068,6 @@ static gchar *utils_strv_find_common_prefix(gchar **strv, size_t num)

for (gint i = 0; prefix[i]; i++)
{
foreach_strv(ptr, &strv[1])
for (gint j = 1; j < num; j++)
{
gchar *s = strv[j];
Expand All @@ -2085,12 +2084,12 @@ static gchar *utils_strv_find_common_prefix(gchar **strv, size_t num)
return prefix;
}

/* * Returns the common prefix in a list of strings.
/* * Returns the longest common substring in a list of strings.
*
* The size of the list may be given explicitely automatically determined if passed a GStrv.
* The size of the list may be given explicitely, but defaults to @c g_strv_length(strv).
*
* @param strv 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
* @param num The number of strings contained in @a strv. Can be 0 if it's terminated by @c NULL.
*
* @return The common prefix that is part of all strings.
*/
Expand Down Expand Up @@ -2154,11 +2153,12 @@ gchar *utils_strv_find_lcs(gchar **strv, size_t num)
* in duplicates (showing the full path might be inappropriate).
*
* The algorthm strips the common prefix (e-g. the user's home directory) and
* replaces the longest common substring with "...".
* replaces the longest common substring with an ellipsis ("...").
*
* @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 @transfer{full} A newly-allocated NULL-terminated array of transformed paths strings. Use @c g_strfreev() to free it.
* @param num The number of strings contained in @a file_names. Can be 0 if it's terminated by @c NULL.
* @return @transfer{full} A newly-allocated array of transformed paths strings, terminated by
@c NULL. Use @c g_strfreev() to free it.
*
* @since 1.34 (API 239)
*/
Expand Down

0 comments on commit 7fdd360

Please sign in to comment.