Rename functions with "tostring" in the name to one with "to_string" to conform with the convention.

component: core

<EP-E358F00C1D9A449EAE69225B9D2530F8>
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=88833

Signed-off-by: Deepak Srivastava <srivastava.d@samsung.com>
This commit is contained in:
Deepak Srivastava 2015-06-12 18:17:07 +05:30 committed by Arun Raghavan
parent bb88d90950
commit 2d5eec2d2c
24 changed files with 46 additions and 46 deletions

View file

@ -68,7 +68,7 @@ char *pa_module_list_to_string(pa_core *c) {
pa_xfree(t);
}
return pa_strbuf_tostring_free(s);
return pa_strbuf_to_string_free(s);
}
char *pa_client_list_to_string(pa_core *c) {
@ -98,7 +98,7 @@ char *pa_client_list_to_string(pa_core *c) {
pa_xfree(t);
}
return pa_strbuf_tostring_free(s);
return pa_strbuf_to_string_free(s);
}
static const char *available_to_string(pa_available_t a) {
@ -193,7 +193,7 @@ char *pa_card_list_to_string(pa_core *c) {
append_port_list(s, card->ports);
}
return pa_strbuf_tostring_free(s);
return pa_strbuf_to_string_free(s);
}
static const char *sink_state_to_string(pa_sink_state_t state) {
@ -345,7 +345,7 @@ char *pa_sink_list_to_string(pa_core *c) {
sink->active_port->name);
}
return pa_strbuf_tostring_free(s);
return pa_strbuf_to_string_free(s);
}
char *pa_source_list_to_string(pa_core *c) {
@ -460,7 +460,7 @@ char *pa_source_list_to_string(pa_core *c) {
source->active_port->name);
}
return pa_strbuf_tostring_free(s);
return pa_strbuf_to_string_free(s);
}
char *pa_source_output_list_to_string(pa_core *c) {
@ -557,7 +557,7 @@ char *pa_source_output_list_to_string(pa_core *c) {
pa_xfree(t);
}
return pa_strbuf_tostring_free(s);
return pa_strbuf_to_string_free(s);
}
char *pa_sink_input_list_to_string(pa_core *c) {
@ -653,7 +653,7 @@ char *pa_sink_input_list_to_string(pa_core *c) {
pa_xfree(t);
}
return pa_strbuf_tostring_free(s);
return pa_strbuf_to_string_free(s);
}
char *pa_scache_list_to_string(pa_core *c) {
@ -712,7 +712,7 @@ char *pa_scache_list_to_string(pa_core *c) {
}
}
return pa_strbuf_tostring_free(s);
return pa_strbuf_to_string_free(s);
}
char *pa_full_status_string(pa_core *c) {
@ -755,5 +755,5 @@ char *pa_full_status_string(pa_core *c) {
pa_xfree(t);
}
return pa_strbuf_tostring_free(s);
return pa_strbuf_to_string_free(s);
}

View file

@ -152,7 +152,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
else
pa_cli_command_execute_line(c->core, s, buf, &c->fail);
c->defer_kill--;
pa_ioline_puts(line, p = pa_strbuf_tostring_free(buf));
pa_ioline_puts(line, p = pa_strbuf_to_string_free(buf));
pa_xfree(p);
if (c->kill_requested) {

View file

@ -3202,7 +3202,7 @@ char *pa_replace(const char*s, const char*a, const char *b) {
pa_strbuf_puts(sb, s);
return pa_strbuf_tostring_free(sb);
return pa_strbuf_to_string_free(sb);
}
char *pa_escape(const char *p, const char *chars) {
@ -3224,7 +3224,7 @@ char *pa_escape(const char *p, const char *chars) {
pa_strbuf_putc(buf, *s);
}
return pa_strbuf_tostring_free(buf);
return pa_strbuf_to_string_free(buf);
}
char *pa_unescape(char *p) {

View file

@ -257,7 +257,7 @@ static void update_introspection(struct object_entry *oe) {
pa_strbuf_puts(buf, "</node>\n");
pa_xfree(oe->introspection);
oe->introspection = pa_strbuf_tostring_free(buf);
oe->introspection = pa_strbuf_to_string_free(buf);
}
/* Return value of find_handler() and its subfunctions. */
@ -689,7 +689,7 @@ static pa_hashmap *extract_method_signatures(pa_hashmap *method_handlers) {
pa_strbuf_puts(sig_buf, handler->arguments[i].type);
}
pa_hashmap_put(signatures, (char *) handler->method_name, pa_strbuf_tostring_free(sig_buf));
pa_hashmap_put(signatures, (char *) handler->method_name, pa_strbuf_to_string_free(sig_buf));
}
return signatures;

View file

@ -294,7 +294,7 @@ static char *escape_html(const char *t) {
if (p > e)
pa_strbuf_putsn(sb, e, p-e);
return pa_strbuf_tostring_free(sb);
return pa_strbuf_to_string_free(sb);
}
static void http_response(

View file

@ -1149,7 +1149,7 @@ static void setup_remap(const pa_resampler *r, pa_remap_t *m, bool *lfe_remixed)
pa_strbuf_puts(s, "\n");
}
pa_log_debug("Channel matrix:\n%s", t = pa_strbuf_tostring_free(s));
pa_log_debug("Channel matrix:\n%s", t = pa_strbuf_to_string_free(s));
pa_xfree(t);
/* initialize the remapping function */

View file

@ -69,7 +69,7 @@ void pa_strbuf_free(pa_strbuf *sb) {
/* Make a C string from the string buffer. The caller has to free
* string with pa_xfree(). */
char *pa_strbuf_tostring(pa_strbuf *sb) {
char *pa_strbuf_to_string(pa_strbuf *sb) {
char *t, *e;
struct chunk *c;
@ -91,12 +91,12 @@ char *pa_strbuf_tostring(pa_strbuf *sb) {
return t;
}
/* Combination of pa_strbuf_free() and pa_strbuf_tostring() */
char *pa_strbuf_tostring_free(pa_strbuf *sb) {
/* Combination of pa_strbuf_free() and pa_strbuf_to_string() */
char *pa_strbuf_to_string_free(pa_strbuf *sb) {
char *t;
pa_assert(sb);
t = pa_strbuf_tostring(sb);
t = pa_strbuf_to_string(sb);
pa_strbuf_free(sb);
return t;

View file

@ -27,8 +27,8 @@ typedef struct pa_strbuf pa_strbuf;
pa_strbuf *pa_strbuf_new(void);
void pa_strbuf_free(pa_strbuf *sb);
char *pa_strbuf_tostring(pa_strbuf *sb);
char *pa_strbuf_tostring_free(pa_strbuf *sb);
char *pa_strbuf_to_string(pa_strbuf *sb);
char *pa_strbuf_to_string_free(pa_strbuf *sb);
size_t pa_strbuf_printf(pa_strbuf *sb, const char *format, ...) PA_GCC_PRINTF_ATTR(2,3);
void pa_strbuf_puts(pa_strbuf *sb, const char *t);

View file

@ -50,7 +50,7 @@ pa_strlist* pa_strlist_prepend(pa_strlist *l, const char *s) {
return n;
}
char *pa_strlist_tostring(pa_strlist *l) {
char *pa_strlist_to_string(pa_strlist *l) {
int first = 1;
pa_strbuf *b;
@ -62,7 +62,7 @@ char *pa_strlist_tostring(pa_strlist *l) {
pa_strbuf_puts(b, ITEM_TO_TEXT(l));
}
return pa_strbuf_tostring_free(b);
return pa_strbuf_to_string_free(b);
}
pa_strlist* pa_strlist_remove(pa_strlist *l, const char *s) {

View file

@ -29,7 +29,7 @@ pa_strlist* pa_strlist_prepend(pa_strlist *l, const char *s);
pa_strlist* pa_strlist_remove(pa_strlist *l, const char *s);
/* Make a whitespace separated string of all server strings. Returned memory has to be freed with pa_xfree() */
char *pa_strlist_tostring(pa_strlist *l);
char *pa_strlist_to_string(pa_strlist *l);
/* Free the entire list */
void pa_strlist_free(pa_strlist *l);