mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
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:
parent
bb88d90950
commit
2d5eec2d2c
24 changed files with 46 additions and 46 deletions
|
|
@ -395,7 +395,7 @@ int pa_cmdline_parse(pa_daemon_conf *conf, int argc, char *const argv [], int *d
|
|||
}
|
||||
|
||||
pa_xfree(conf->script_commands);
|
||||
conf->script_commands = pa_strbuf_tostring_free(buf);
|
||||
conf->script_commands = pa_strbuf_to_string_free(buf);
|
||||
|
||||
*d = optind;
|
||||
|
||||
|
|
|
|||
|
|
@ -804,5 +804,5 @@ char *pa_daemon_conf_dump(pa_daemon_conf *c) {
|
|||
|
||||
pa_xfree(log_target);
|
||||
|
||||
return pa_strbuf_tostring_free(s);
|
||||
return pa_strbuf_to_string_free(s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1082,7 +1082,7 @@ int main(int argc, char *argv[]) {
|
|||
if (r >= 0)
|
||||
r = pa_cli_command_execute(c, conf->script_commands, buf, &conf->fail);
|
||||
|
||||
pa_log_error("%s", s = pa_strbuf_tostring_free(buf));
|
||||
pa_log_error("%s", s = pa_strbuf_to_string_free(buf));
|
||||
pa_xfree(s);
|
||||
|
||||
if (r < 0 && conf->fail) {
|
||||
|
|
|
|||
|
|
@ -4273,7 +4273,7 @@ static int profile_verify(pa_alsa_profile *p) {
|
|||
pa_strbuf_printf(sb, _("%s Input"), m->description);
|
||||
}
|
||||
|
||||
p->description = pa_strbuf_tostring_free(sb);
|
||||
p->description = pa_strbuf_to_string_free(sb);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -4333,7 +4333,7 @@ void pa_alsa_decibel_fix_dump(pa_alsa_decibel_fix *db_fix) {
|
|||
for (i = 0; i < nsteps; ++i)
|
||||
pa_strbuf_printf(buf, "[%li]:%0.2f ", i + db_fix->min_step, db_fix->db_values[i] / 100.0);
|
||||
|
||||
db_values = pa_strbuf_tostring_free(buf);
|
||||
db_values = pa_strbuf_to_string_free(buf);
|
||||
}
|
||||
|
||||
pa_log_debug("Decibel fix %s, min_step=%li, max_step=%li, db_values=%s",
|
||||
|
|
|
|||
|
|
@ -1504,7 +1504,7 @@ static void handle_load_module(DBusConnection *conn, DBusMessage *msg, void *use
|
|||
dbus_message_iter_next(&dict_iter);
|
||||
}
|
||||
|
||||
arg_string = pa_strbuf_tostring(arg_buffer);
|
||||
arg_string = pa_strbuf_to_string(arg_buffer);
|
||||
|
||||
if (!(module = pa_module_load(c->core, name, arg_string))) {
|
||||
pa_dbus_send_error(conn, msg, DBUS_ERROR_FAILED, "Failed to load module.");
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@ static int ca_device_create_sink(pa_module *m, AudioBuffer *buf, int channel_idx
|
|||
pa_strbuf_puts(strbuf, tmp);
|
||||
}
|
||||
|
||||
ca_sink->name = pa_strbuf_tostring_free(strbuf);
|
||||
ca_sink->name = pa_strbuf_to_string_free(strbuf);
|
||||
|
||||
pa_log_debug("Stream name is >%s<", ca_sink->name);
|
||||
|
||||
|
|
@ -529,7 +529,7 @@ static int ca_device_create_source(pa_module *m, AudioBuffer *buf, int channel_i
|
|||
pa_strbuf_puts(strbuf, tmp);
|
||||
}
|
||||
|
||||
ca_source->name = pa_strbuf_tostring_free(strbuf);
|
||||
ca_source->name = pa_strbuf_to_string_free(strbuf);
|
||||
|
||||
pa_log_debug("Stream name is >%s<", ca_source->name);
|
||||
|
||||
|
|
|
|||
|
|
@ -937,7 +937,7 @@ static DBusHandlerResult sinks_and_sources_handler(DBusConnection *c, DBusMessag
|
|||
}
|
||||
|
||||
pa_strbuf_puts(sb, CONTAINER_INTROSPECT_XML_POSTFIX);
|
||||
xml = pa_strbuf_tostring_free(sb);
|
||||
xml = pa_strbuf_to_string_free(sb);
|
||||
|
||||
pa_assert_se(r = dbus_message_new_method_return(m));
|
||||
pa_assert_se(dbus_message_append_args(r, DBUS_TYPE_STRING, &xml, DBUS_TYPE_INVALID));
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ static void card_changed(struct userdata *u, struct udev_device *dev) {
|
|||
if (u->tsched_buffer_size_valid)
|
||||
pa_strbuf_printf(args_buf, " tsched_buffer_size=%" PRIu32, u->tsched_buffer_size);
|
||||
|
||||
d->args = pa_strbuf_tostring_free(args_buf);
|
||||
d->args = pa_strbuf_to_string_free(args_buf);
|
||||
|
||||
pa_hashmap_put(u->devices, d->path, d);
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ char *pa_headerlist_to_string(pa_headerlist *p) {
|
|||
pa_strbuf_printf(buf, "%s: %s\r\n", key, v);
|
||||
}
|
||||
|
||||
return pa_strbuf_tostring_free(buf);
|
||||
return pa_strbuf_to_string_free(buf);
|
||||
}
|
||||
|
||||
int pa_headerlist_contains(pa_headerlist *p, const char *key) {
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
|
|||
/* End of headers */
|
||||
/* We will have a header left from our looping iteration, so add it in :) */
|
||||
if (c->last_header) {
|
||||
char *tmp = pa_strbuf_tostring_free(c->header_buffer);
|
||||
char *tmp = pa_strbuf_to_string_free(c->header_buffer);
|
||||
/* This is not a continuation header so let's dump it into our proplist */
|
||||
pa_headerlist_puts(c->response_headers, c->last_header, tmp);
|
||||
pa_xfree(tmp);
|
||||
|
|
@ -233,7 +233,7 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
|
|||
}
|
||||
|
||||
if (c->last_header) {
|
||||
char *tmp = pa_strbuf_tostring_free(c->header_buffer);
|
||||
char *tmp = pa_strbuf_to_string_free(c->header_buffer);
|
||||
/* This is not a continuation header so let's dump the full
|
||||
header/value into our proplist */
|
||||
pa_headerlist_puts(c->response_headers, c->last_header, tmp);
|
||||
|
|
@ -432,7 +432,7 @@ static int rtsp_exec(pa_rtsp_client* c, const char* cmd,
|
|||
}
|
||||
|
||||
/* Our packet is created... now we can send it :) */
|
||||
hdrs = pa_strbuf_tostring_free(buf);
|
||||
hdrs = pa_strbuf_to_string_free(buf);
|
||||
/*pa_log_debug("Submitting request:");
|
||||
pa_log_debug(hdrs);*/
|
||||
pa_ioline_puts(c->ioline, hdrs);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ static void publish_servers(struct userdata *u, pa_strlist *l) {
|
|||
char *s;
|
||||
|
||||
l = pa_strlist_reverse(l);
|
||||
s = pa_strlist_tostring(l);
|
||||
s = pa_strlist_to_string(l);
|
||||
pa_strlist_reverse(l);
|
||||
|
||||
pa_x11_set_prop(pa_x11_wrapper_get_xcb_connection(u->x11_wrapper), screen, "PULSE_SERVER", s);
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ char *pa_proplist_to_string_sep(pa_proplist *p, const char *sep) {
|
|||
}
|
||||
}
|
||||
|
||||
return pa_strbuf_tostring_free(buf);
|
||||
return pa_strbuf_to_string_free(buf);
|
||||
}
|
||||
|
||||
char *pa_proplist_to_string(pa_proplist *p) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ static void dump(pa_memblockq *bq, int n) {
|
|||
buf = pa_strbuf_new();
|
||||
dump_chunk(&out, buf);
|
||||
pa_memblock_unref(out.memblock);
|
||||
str = pa_strbuf_tostring_free(buf);
|
||||
str = pa_strbuf_to_string_free(buf);
|
||||
fail_unless(pa_streq(str, fixed[n]));
|
||||
pa_xfree(str);
|
||||
fprintf(stderr, "<\n");
|
||||
|
|
@ -87,7 +87,7 @@ static void dump(pa_memblockq *bq, int n) {
|
|||
pa_memblock_unref(out.memblock);
|
||||
pa_memblockq_drop(bq, out.length);
|
||||
}
|
||||
str = pa_strbuf_tostring_free(buf);
|
||||
str = pa_strbuf_to_string_free(buf);
|
||||
fail_unless(pa_streq(str, manual[n]));
|
||||
pa_xfree(str);
|
||||
fprintf(stderr, "<\n");
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ START_TEST (strlist_test) {
|
|||
l = pa_strlist_prepend(l, "b");
|
||||
l = pa_strlist_prepend(l, "a");
|
||||
|
||||
t = pa_strlist_tostring(l);
|
||||
t = pa_strlist_to_string(l);
|
||||
pa_strlist_free(l);
|
||||
|
||||
fprintf(stderr, "1: %s\n", t);
|
||||
|
|
@ -29,7 +29,7 @@ START_TEST (strlist_test) {
|
|||
l = pa_strlist_parse(t);
|
||||
pa_xfree(t);
|
||||
|
||||
t = pa_strlist_tostring(l);
|
||||
t = pa_strlist_to_string(l);
|
||||
fprintf(stderr, "2: %s\n", t);
|
||||
fail_unless(pa_streq(t, "a b c d e"));
|
||||
pa_xfree(t);
|
||||
|
|
@ -41,7 +41,7 @@ START_TEST (strlist_test) {
|
|||
|
||||
l = pa_strlist_remove(l, "c");
|
||||
|
||||
t = pa_strlist_tostring(l);
|
||||
t = pa_strlist_to_string(l);
|
||||
fprintf(stderr, "4: %s\n", t);
|
||||
fail_unless(pa_streq(t, "b d e"));
|
||||
pa_xfree(t);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue