diff options
author | Bruno Haible <bruno@clisp.org> | 2009-12-12 12:22:07 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-12-12 16:13:42 +0100 |
commit | c4031b5252bc3c539b5c041c2e30fd7fb88382d9 (patch) | |
tree | aa1e352796505a4b7def4083ace1dedb94e96c98 /gettext-tools/src/str-list.c | |
parent | 24d34031721a97d3e7b498ccbf8b5779d2acc93e (diff) | |
download | gettext-c4031b5252bc3c539b5c041c2e30fd7fb88382d9.tar.gz |
Untabify.
Diffstat (limited to 'gettext-tools/src/str-list.c')
-rw-r--r-- | gettext-tools/src/str-list.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gettext-tools/src/str-list.c b/gettext-tools/src/str-list.c index a63212cc4..3f929c2cf 100644 --- a/gettext-tools/src/str-list.c +++ b/gettext-tools/src/str-list.c @@ -91,8 +91,8 @@ string_list_append_unique (string_list_ty *slp, const char *s) { slp->nitems_max = slp->nitems_max * 2 + 4; slp->item = (const char **) xrealloc (slp->item, - slp->nitems_max - * sizeof (slp->item[0])); + slp->nitems_max + * sizeof (slp->item[0])); } /* Add a copy of the string to the end of the list. */ @@ -182,7 +182,7 @@ string_list_concat_destroy (string_list_ty *slp) the terminator. */ char * string_list_join (const string_list_ty *slp, const char *separator, - char terminator, bool drop_redundant_terminator) + char terminator, bool drop_redundant_terminator) { size_t separator_len = strlen (separator); size_t len; @@ -194,7 +194,7 @@ string_list_join (const string_list_ty *slp, const char *separator, for (j = 0; j < slp->nitems; ++j) { if (j > 0) - len += separator_len; + len += separator_len; len += strlen (slp->item[j]); } if (terminator) @@ -204,19 +204,19 @@ string_list_join (const string_list_ty *slp, const char *separator, for (j = 0; j < slp->nitems; ++j) { if (j > 0) - { - memcpy (result + pos, separator, separator_len); - pos += separator_len; - } + { + memcpy (result + pos, separator, separator_len); + pos += separator_len; + } len = strlen (slp->item[j]); memcpy (result + pos, slp->item[j], len); pos += len; } if (terminator && !(drop_redundant_terminator - && slp->nitems > 0 - && (len = strlen (slp->item[slp->nitems - 1])) > 0 - && slp->item[slp->nitems - 1][len - 1] == terminator)) + && slp->nitems > 0 + && (len = strlen (slp->item[slp->nitems - 1])) > 0 + && slp->item[slp->nitems - 1][len - 1] == terminator)) result[pos++] = terminator; result[pos] = '\0'; return result; |