Merge "[RCAR] Update Rcar gen3 BSP to 3.6"
[AGL/meta-agl.git] / meta-ivi-common / recipes-multimedia / pulseaudio / pulseaudio / 0020-core-util-Add-pa_join.patch
1 --- a/src/pulsecore/core-util.c 2016-04-13 16:17:33.314016929 +0200
2 +++ b/src/pulsecore/core-util.c 2016-04-13 16:18:31.186016833 +0200
3 @@ -1104,6 +1104,24 @@
4      return pa_xstrndup(current, l);
5  }
6  
7 +char *pa_join(const char * const *strings, unsigned n_strings, const char *delimiter) {
8 +    pa_strbuf *buf;
9 +    unsigned i;
10 +
11 +    pa_assert(strings || n_strings == 0);
12 +
13 +    buf = pa_strbuf_new();
14 +
15 +    for (i = 0; i < n_strings; i++) {
16 +        if (i > 0 && delimiter)
17 +            pa_strbuf_puts(buf, delimiter);
18 +
19 +        pa_strbuf_puts(buf, strings[i]);
20 +    }
21 +
22 +    return pa_strbuf_tostring_free(buf);
23 +}
24 +
25  PA_STATIC_TLS_DECLARE(signame, pa_xfree);
26  
27  /* Return the name of an UNIX signal. Similar to Solaris sig2str() */
28 --- a/src/pulsecore/core-util.h 2016-04-13 16:17:39.177016919 +0200
29 +++ b/src/pulsecore/core-util.h 2016-04-13 16:19:09.141016769 +0200
30 @@ -108,6 +108,7 @@
31  char *pa_split(const char *c, const char*delimiters, const char **state);
32  const char *pa_split_in_place(const char *c, const char*delimiters, int *n, const char **state);
33  char *pa_split_spaces(const char *c, const char **state);
34 +char *pa_join(const char * const *strings, unsigned n_strings, const char *delimiter);
35  
36  char *pa_strip_nl(char *s);
37  char *pa_strip(char *s);