Remove pa_bool_t and replace it with bool.

commands used for this (executed from the pulseaudio/src directory):
    find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
        -a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
        -a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
        -exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
        -e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;

and:
    sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
        -e '181,194!s/\bTRUE\b/true/' -e \
        '181,194!s/\bFALSE\b/false/' pulsecore/macro.h
This commit is contained in:
poljar (Damir Jelić) 2013-06-27 19:28:09 +02:00 committed by Tanu Kaskinen
parent e9822bfcb0
commit d806b19714
288 changed files with 3360 additions and 3360 deletions

View file

@ -61,7 +61,7 @@ void pa_headerlist_free(pa_headerlist* p) {
int pa_headerlist_puts(pa_headerlist *p, const char *key, const char *value) {
struct header *hdr;
pa_bool_t add = FALSE;
bool add = false;
pa_assert(p);
pa_assert(key);
@ -69,7 +69,7 @@ int pa_headerlist_puts(pa_headerlist *p, const char *key, const char *value) {
if (!(hdr = pa_hashmap_get(MAKE_HASHMAP(p), key))) {
hdr = pa_xnew(struct header, 1);
hdr->key = pa_xstrdup(key);
add = TRUE;
add = true;
} else
pa_xfree(hdr->value);
@ -84,7 +84,7 @@ int pa_headerlist_puts(pa_headerlist *p, const char *key, const char *value) {
int pa_headerlist_putsappend(pa_headerlist *p, const char *key, const char *value) {
struct header *hdr;
pa_bool_t add = FALSE;
bool add = false;
pa_assert(p);
pa_assert(key);
@ -93,7 +93,7 @@ int pa_headerlist_putsappend(pa_headerlist *p, const char *key, const char *valu
hdr = pa_xnew(struct header, 1);
hdr->key = pa_xstrdup(key);
hdr->value = pa_xstrdup(value);
add = TRUE;
add = true;
} else {
void *newval = pa_sprintf_malloc("%s%s", (char*)hdr->value, value);
pa_xfree(hdr->value);

View file

@ -64,7 +64,7 @@
PA_MODULE_AUTHOR("Lennart Poettering");
PA_MODULE_DESCRIPTION("Receive data from a network via RTP/SAP/SDP");
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_LOAD_ONCE(false);
PA_MODULE_USAGE(
"sink=<name of the sink> "
"sap_address=<multicast address to listen on> "
@ -91,7 +91,7 @@ struct session {
pa_sink_input *sink_input;
pa_memblockq *memblockq;
pa_bool_t first_packet;
bool first_packet;
uint32_t ssrc;
uint32_t offset;
@ -191,7 +191,7 @@ static void sink_input_kill(pa_sink_input* i) {
}
/* Called from IO context */
static void sink_input_suspend_within_thread(pa_sink_input* i, pa_bool_t b) {
static void sink_input_suspend_within_thread(pa_sink_input* i, bool b) {
struct session *s;
pa_sink_input_assert_ref(i);
pa_assert_se(s = i->userdata);
@ -199,7 +199,7 @@ static void sink_input_suspend_within_thread(pa_sink_input* i, pa_bool_t b) {
if (b)
pa_memblockq_flush_read(s->memblockq);
else
s->first_packet = FALSE;
s->first_packet = false;
}
/* Called from I/O thread context */
@ -234,7 +234,7 @@ static int rtpoll_work_cb(pa_rtpoll_item *i) {
}
if (!s->first_packet) {
s->first_packet = TRUE;
s->first_packet = true;
s->ssrc = s->rtp_context.ssrc;
s->offset = s->rtp_context.timestamp;
@ -257,7 +257,7 @@ static int rtpoll_work_cb(pa_rtpoll_item *i) {
else
delta = j;
pa_memblockq_seek(s->memblockq, delta * (int64_t) s->rtp_context.frame_size, PA_SEEK_RELATIVE, TRUE);
pa_memblockq_seek(s->memblockq, delta * (int64_t) s->rtp_context.frame_size, PA_SEEK_RELATIVE, true);
if (now.tv_sec == 0) {
PA_ONCE_BEGIN {
@ -269,7 +269,7 @@ static int rtpoll_work_cb(pa_rtpoll_item *i) {
if (pa_memblockq_push(s->memblockq, &chunk) < 0) {
pa_log_warn("Queue overrun");
pa_memblockq_seek(s->memblockq, (int64_t) chunk.length, PA_SEEK_RELATIVE, TRUE);
pa_memblockq_seek(s->memblockq, (int64_t) chunk.length, PA_SEEK_RELATIVE, true);
}
/* pa_log("blocks in q: %u", pa_memblockq_get_nblocks(s->memblockq)); */
@ -378,7 +378,7 @@ static int rtpoll_work_cb(pa_rtpoll_item *i) {
pa_log_debug("Requesting rewind due to end of underrun");
pa_sink_input_request_rewind(s->sink_input,
(size_t) (s->sink_input->thread_info.underrun_for == (uint64_t) -1 ? 0 : s->sink_input->thread_info.underrun_for),
FALSE, TRUE, FALSE);
false, true, false);
}
return 1;
@ -505,7 +505,7 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in
s = pa_xnew0(struct session, 1);
s->userdata = u;
s->first_packet = FALSE;
s->first_packet = false;
s->sdp_info = *sdp_info;
s->rtpoll_item = NULL;
s->intended_latency = LATENCY_USEC;
@ -519,7 +519,7 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in
goto fail;
pa_sink_input_new_data_init(&data);
pa_sink_input_new_data_set_sink(&data, sink, FALSE);
pa_sink_input_new_data_set_sink(&data, sink, false);
data.driver = __FILE__;
pa_proplist_sets(data.proplist, PA_PROP_MEDIA_ROLE, "stream");
pa_proplist_setf(data.proplist, PA_PROP_MEDIA_NAME,
@ -617,7 +617,7 @@ static void session_free(struct session *s) {
static void sap_event_cb(pa_mainloop_api *m, pa_io_event *e, int fd, pa_io_event_flags_t flags, void *userdata) {
struct userdata *u = userdata;
pa_bool_t goodbye = FALSE;
bool goodbye = false;
pa_sdp_info info;
struct session *s;

View file

@ -57,7 +57,7 @@
PA_MODULE_AUTHOR("Lennart Poettering");
PA_MODULE_DESCRIPTION("Read data from source and send it to the network via RTP/SAP/SDP");
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_LOAD_ONCE(false);
PA_MODULE_USAGE(
"source=<name of the source> "
"format=<sample format> "
@ -145,7 +145,7 @@ static void source_output_kill(pa_source_output* o) {
pa_source_output_assert_ref(o);
pa_assert_se(u = o->userdata);
pa_module_unload_request(u->module, TRUE);
pa_module_unload_request(u->module, true);
pa_source_output_unlink(u->source_output);
pa_source_output_unref(u->source_output);
@ -187,7 +187,7 @@ int pa__init(pa_module*m) {
int r, j;
socklen_t k;
char hn[128], *n;
pa_bool_t loop = FALSE;
bool loop = false;
pa_source_output_new_data data;
pa_assert(m);
@ -368,7 +368,7 @@ int pa__init(pa_module*m) {
pa_proplist_setf(data.proplist, "rtp.ttl", "%lu", (unsigned long) ttl);
data.driver = __FILE__;
data.module = m;
pa_source_output_new_data_set_source(&data, s, FALSE);
pa_source_output_new_data_set_source(&data, s, false);
pa_source_output_new_data_set_sample_spec(&data, &ss);
pa_source_output_new_data_set_channel_map(&data, &cm);
data.flags = PA_SOURCE_OUTPUT_DONT_INHIBIT_AUTO_SUSPEND;

View file

@ -170,7 +170,7 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct
unsigned cc;
ssize_t r;
uint8_t aux[1024];
pa_bool_t found_tstamp = FALSE;
bool found_tstamp = false;
pa_assert(c);
pa_assert(chunk);
@ -280,7 +280,7 @@ int pa_rtp_recv(pa_rtp_context *c, pa_memchunk *chunk, pa_mempool *pool, struct
for (cm = CMSG_FIRSTHDR(&m); cm; cm = CMSG_NXTHDR(&m, cm))
if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_TIMESTAMP) {
memcpy(tstamp, CMSG_DATA(cm), sizeof(struct timeval));
found_tstamp = TRUE;
found_tstamp = true;
break;
}

View file

@ -329,7 +329,7 @@ int pa_rtsp_connect(pa_rtsp_client *c) {
c->session = NULL;
pa_log_debug("Attempting to connect to server '%s:%d'", c->hostname, c->port);
if (!(c->sc = pa_socket_client_new_string(c->mainloop, TRUE, c->hostname, c->port))) {
if (!(c->sc = pa_socket_client_new_string(c->mainloop, true, c->hostname, c->port))) {
pa_log("failed to connect to server '%s:%d'", c->hostname, c->port);
return -1;
}

View file

@ -72,7 +72,7 @@ void pa_sap_context_destroy(pa_sap_context *c) {
pa_xfree(c->sdp_data);
}
int pa_sap_send(pa_sap_context *c, pa_bool_t goodbye) {
int pa_sap_send(pa_sap_context *c, bool goodbye) {
uint32_t header;
struct sockaddr_storage sa_buf;
struct sockaddr *sa = (struct sockaddr*) &sa_buf;
@ -141,7 +141,7 @@ pa_sap_context* pa_sap_context_init_recv(pa_sap_context *c, int fd) {
return c;
}
int pa_sap_recv(pa_sap_context *c, pa_bool_t *goodbye) {
int pa_sap_recv(pa_sap_context *c, bool *goodbye) {
struct msghdr m;
struct iovec iov;
int size;

View file

@ -38,9 +38,9 @@ typedef struct pa_sap_context {
pa_sap_context* pa_sap_context_init_send(pa_sap_context *c, int fd, char *sdp_data);
void pa_sap_context_destroy(pa_sap_context *c);
int pa_sap_send(pa_sap_context *c, pa_bool_t goodbye);
int pa_sap_send(pa_sap_context *c, bool goodbye);
pa_sap_context* pa_sap_context_init_recv(pa_sap_context *c, int fd);
int pa_sap_recv(pa_sap_context *c, pa_bool_t *goodbye);
int pa_sap_recv(pa_sap_context *c, bool *goodbye);
#endif

View file

@ -120,7 +120,7 @@ static pa_sample_spec *parse_sdp_sample_spec(pa_sample_spec *ss, char *c) {
pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) {
uint16_t port = 0;
pa_bool_t ss_valid = FALSE;
bool ss_valid = false;
pa_assert(t);
pa_assert(i);
@ -207,7 +207,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) {
i->payload = (uint8_t) _payload;
if (pa_rtp_sample_spec_from_payload(i->payload, &i->sample_spec))
ss_valid = TRUE;
ss_valid = true;
}
}
} else if (pa_startswith(t, "a=rtpmap:")) {
@ -227,7 +227,7 @@ pa_sdp_info *pa_sdp_parse(const char *t, pa_sdp_info *i, int is_goodbye) {
c[strcspn(c, "\n")] = 0;
if (parse_sdp_sample_spec(&i->sample_spec, c))
ss_valid = TRUE;
ss_valid = true;
}
}
}