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

@ -52,7 +52,7 @@ struct pa_memblockq {
unsigned n_blocks;
size_t maxlength, tlength, base, prebuf, minreq, maxrewind;
int64_t read_index, write_index;
pa_bool_t in_prebuf;
bool in_prebuf;
pa_memchunk silence;
pa_mcalign *mcalign;
int64_t missing, requested;
@ -86,7 +86,7 @@ pa_memblockq* pa_memblockq_new(
pa_log_debug("memblockq requested: maxlength=%lu, tlength=%lu, base=%lu, prebuf=%lu, minreq=%lu maxrewind=%lu",
(unsigned long) maxlength, (unsigned long) tlength, (unsigned long) bq->base, (unsigned long) prebuf, (unsigned long) minreq, (unsigned long) maxrewind);
bq->in_prebuf = TRUE;
bq->in_prebuf = true;
pa_memblockq_set_maxlength(bq, maxlength);
pa_memblockq_set_tlength(bq, tlength);
@ -222,7 +222,7 @@ static void drop_backlog(pa_memblockq *bq) {
drop_block(bq, bq->blocks);
}
static pa_bool_t can_push(pa_memblockq *bq, size_t l) {
static bool can_push(pa_memblockq *bq, size_t l) {
int64_t end;
pa_assert(bq);
@ -233,7 +233,7 @@ static pa_bool_t can_push(pa_memblockq *bq, size_t l) {
if ((int64_t) l > d)
l -= (size_t) d;
else
return TRUE;
return true;
}
end = bq->blocks_tail ? bq->blocks_tail->index + (int64_t) bq->blocks_tail->chunk.length : bq->write_index;
@ -241,12 +241,12 @@ static pa_bool_t can_push(pa_memblockq *bq, size_t l) {
/* Make sure that the list doesn't get too long */
if (bq->write_index + (int64_t) l > end)
if (bq->write_index + (int64_t) l - bq->read_index > (int64_t) bq->maxlength)
return FALSE;
return false;
return TRUE;
return true;
}
static void write_index_changed(pa_memblockq *bq, int64_t old_write_index, pa_bool_t account) {
static void write_index_changed(pa_memblockq *bq, int64_t old_write_index, bool account) {
int64_t delta;
pa_assert(bq);
@ -438,11 +438,11 @@ int pa_memblockq_push(pa_memblockq* bq, const pa_memchunk *uchunk) {
finish:
write_index_changed(bq, old, TRUE);
write_index_changed(bq, old, true);
return 0;
}
pa_bool_t pa_memblockq_prebuf_active(pa_memblockq *bq) {
bool pa_memblockq_prebuf_active(pa_memblockq *bq) {
pa_assert(bq);
if (bq->in_prebuf)
@ -451,24 +451,24 @@ pa_bool_t pa_memblockq_prebuf_active(pa_memblockq *bq) {
return bq->prebuf > 0 && bq->read_index >= bq->write_index;
}
static pa_bool_t update_prebuf(pa_memblockq *bq) {
static bool update_prebuf(pa_memblockq *bq) {
pa_assert(bq);
if (bq->in_prebuf) {
if (pa_memblockq_get_length(bq) < bq->prebuf)
return TRUE;
return true;
bq->in_prebuf = FALSE;
return FALSE;
bq->in_prebuf = false;
return false;
} else {
if (bq->prebuf > 0 && bq->read_index >= bq->write_index) {
bq->in_prebuf = TRUE;
return TRUE;
bq->in_prebuf = true;
return true;
}
return FALSE;
return false;
}
}
@ -657,16 +657,16 @@ void pa_memblockq_rewind(pa_memblockq *bq, size_t length) {
read_index_changed(bq, old);
}
pa_bool_t pa_memblockq_is_readable(pa_memblockq *bq) {
bool pa_memblockq_is_readable(pa_memblockq *bq) {
pa_assert(bq);
if (pa_memblockq_prebuf_active(bq))
return FALSE;
return false;
if (pa_memblockq_get_length(bq) <= 0)
return FALSE;
return false;
return TRUE;
return true;
}
size_t pa_memblockq_get_length(pa_memblockq *bq) {
@ -690,7 +690,7 @@ size_t pa_memblockq_missing(pa_memblockq *bq) {
return l >= bq->minreq ? l : 0;
}
void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek, pa_bool_t account) {
void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek, bool account) {
int64_t old;
pa_assert(bq);
@ -717,7 +717,7 @@ void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek, pa
write_index_changed(bq, old, account);
}
void pa_memblockq_flush_write(pa_memblockq *bq, pa_bool_t account) {
void pa_memblockq_flush_write(pa_memblockq *bq, bool account) {
int64_t old;
pa_assert(bq);
@ -804,14 +804,14 @@ int pa_memblockq_push_align(pa_memblockq* bq, const pa_memchunk *chunk) {
void pa_memblockq_prebuf_disable(pa_memblockq *bq) {
pa_assert(bq);
bq->in_prebuf = FALSE;
bq->in_prebuf = false;
}
void pa_memblockq_prebuf_force(pa_memblockq *bq) {
pa_assert(bq);
if (bq->prebuf > 0)
bq->in_prebuf = TRUE;
bq->in_prebuf = true;
}
size_t pa_memblockq_get_maxlength(pa_memblockq *bq) {
@ -914,7 +914,7 @@ void pa_memblockq_set_prebuf(pa_memblockq *bq, size_t prebuf) {
bq->prebuf = bq->tlength+bq->base-bq->minreq;
if (bq->prebuf <= 0 || pa_memblockq_get_length(bq) >= bq->prebuf)
bq->in_prebuf = FALSE;
bq->in_prebuf = false;
}
void pa_memblockq_set_maxrewind(pa_memblockq *bq, size_t maxrewind) {
@ -967,7 +967,7 @@ int pa_memblockq_splice(pa_memblockq *bq, pa_memblockq *source) {
pa_memblock_unref(chunk.memblock);
} else
pa_memblockq_seek(bq, (int64_t) chunk.length, PA_SEEK_RELATIVE, TRUE);
pa_memblockq_seek(bq, (int64_t) chunk.length, PA_SEEK_RELATIVE, true);
pa_memblockq_drop(bq, chunk.length);
}
@ -997,7 +997,7 @@ void pa_memblockq_set_silence(pa_memblockq *bq, pa_memchunk *silence) {
pa_memchunk_reset(&bq->silence);
}
pa_bool_t pa_memblockq_is_empty(pa_memblockq *bq) {
bool pa_memblockq_is_empty(pa_memblockq *bq) {
pa_assert(bq);
return !bq->blocks;