--- src/pulse/channelmap.c | 2 +- src/pulse/client-conf-x11.c | 2 +- src/pulse/client-conf.h | 4 ++-- src/pulse/context.c | 6 +++--- src/pulse/ext-stream-restore.c | 2 +- src/pulse/format.c | 2 +- src/pulse/internal.h | 34 +++++++++++++++++----------------- src/pulse/introspect.c | 12 ++++++------ src/pulse/mainloop.c | 34 +++++++++++++++++----------------- src/pulse/proplist.c | 12 ++++++------ src/pulse/stream.c | 18 +++++++++--------- src/pulse/utf8.c | 4 ++-- src/pulse/volume.c | 18 +++++++++--------- 13 files changed, 75 insertions(+), 75 deletions(-) diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c index 0d199f3..0e635a0 100644 --- a/src/pulse/channelmap.c +++ b/src/pulse/channelmap.c @@ -471,7 +471,7 @@ int pa_channel_map_equal(const pa_channel_map *a, const pa_channel_map *b) { char* pa_channel_map_snprint(char *s, size_t l, const pa_channel_map *map) { unsigned channel; - pa_bool_t first = TRUE; + bool first = TRUE; char *e; pa_assert(s); diff --git a/src/pulse/client-conf-x11.c b/src/pulse/client-conf-x11.c index 76b9f6f..f842324 100644 --- a/src/pulse/client-conf-x11.c +++ b/src/pulse/client-conf-x11.c @@ -61,7 +61,7 @@ int pa_client_conf_from_x11(pa_client_conf *c, const char *dname) { } if (pa_x11_get_prop(xcb, screen, "PULSE_SERVER", t, sizeof(t))) { - pa_bool_t disable_autospawn = TRUE; + bool disable_autospawn = TRUE; pa_xfree(c->default_server); c->default_server = pa_xstrdup(t); diff --git a/src/pulse/client-conf.h b/src/pulse/client-conf.h index f281f4e..9c509f7 100644 --- a/src/pulse/client-conf.h +++ b/src/pulse/client-conf.h @@ -29,9 +29,9 @@ typedef struct pa_client_conf { char *daemon_binary, *extra_arguments, *default_sink, *default_source, *default_server, *default_dbus_server, *cookie_file; - pa_bool_t autospawn, disable_shm, auto_connect_localhost, auto_connect_display; + bool autospawn, disable_shm, auto_connect_localhost, auto_connect_display; uint8_t cookie[PA_NATIVE_COOKIE_LENGTH]; - pa_bool_t cookie_valid; /* non-zero, when cookie is valid */ + bool cookie_valid; /* non-zero, when cookie is valid */ size_t shm_size; } pa_client_conf; diff --git a/src/pulse/context.c b/src/pulse/context.c index 4618635..431bd3d 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c @@ -369,7 +369,7 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o pa_context_unref(c); } -int pa_context_handle_error(pa_context *c, uint32_t command, pa_tagstruct *t, pa_bool_t fail) { +int pa_context_handle_error(pa_context *c, uint32_t command, pa_tagstruct *t, bool fail) { uint32_t err; pa_assert(c); pa_assert(PA_REFCNT_VALUE(c) >= 1); @@ -425,7 +425,7 @@ static void setup_complete_callback(pa_pdispatch *pd, uint32_t command, uint32_t switch(c->state) { case PA_CONTEXT_AUTHORIZING: { pa_tagstruct *reply; - pa_bool_t shm_on_remote = FALSE; + bool shm_on_remote = FALSE; if (pa_tagstruct_getu32(t, &c->version) < 0 || !pa_tagstruct_eof(t)) { @@ -830,7 +830,7 @@ finish: #ifdef HAVE_DBUS static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *message, void *userdata) { pa_context *c = userdata; - pa_bool_t is_session; + bool is_session; pa_assert(bus); pa_assert(message); diff --git a/src/pulse/ext-stream-restore.c b/src/pulse/ext-stream-restore.c index 1f72c1c..faad7f2 100644 --- a/src/pulse/ext-stream-restore.c +++ b/src/pulse/ext-stream-restore.c @@ -122,7 +122,7 @@ static void ext_stream_restore_read_cb(pa_pdispatch *pd, uint32_t command, uint3 while (!pa_tagstruct_eof(t)) { pa_ext_stream_restore_info i; - pa_bool_t mute = FALSE; + bool mute = FALSE; memset(&i, 0, sizeof(i)); diff --git a/src/pulse/format.c b/src/pulse/format.c index 542d119..f3a184a 100644 --- a/src/pulse/format.c +++ b/src/pulse/format.c @@ -645,7 +645,7 @@ void pa_format_info_set_prop_string_array(pa_format_info *f, const char *key, co json_object_put(o); } -static pa_bool_t pa_json_is_fixed_type(json_object *o) +static bool pa_json_is_fixed_type(json_object *o) { switch(json_object_get_type(o)) { case json_type_object: diff --git a/src/pulse/internal.h b/src/pulse/internal.h index c5bdcb1..6df10fb 100644 --- a/src/pulse/internal.h +++ b/src/pulse/internal.h @@ -85,13 +85,13 @@ struct pa_context { pa_mempool *mempool; - pa_bool_t is_local:1; - pa_bool_t do_shm:1; - pa_bool_t server_specified:1; - pa_bool_t no_fail:1; - pa_bool_t do_autospawn:1; - pa_bool_t use_rtclock:1; - pa_bool_t filter_added:1; + bool is_local:1; + bool do_shm:1; + bool server_specified:1; + bool no_fail:1; + bool do_autospawn:1; + bool use_rtclock:1; + bool filter_added:1; pa_spawn_api spawn_api; pa_strlist *server_list; @@ -122,9 +122,9 @@ struct pa_context { typedef struct pa_index_correction { uint32_t tag; int64_t value; - pa_bool_t valid:1; - pa_bool_t absolute:1; - pa_bool_t corrupt:1; + bool valid:1; + bool absolute:1; + bool corrupt:1; } pa_index_correction; #define PA_MAX_FORMATS (PA_ENCODING_MAX) @@ -150,11 +150,11 @@ struct pa_stream { pa_proplist *proplist; - pa_bool_t channel_valid:1; - pa_bool_t suspended:1; - pa_bool_t corked:1; - pa_bool_t timing_info_valid:1; - pa_bool_t auto_timing_update_requested:1; + bool channel_valid:1; + bool suspended:1; + bool corked:1; + bool timing_info_valid:1; + bool auto_timing_update_requested:1; uint32_t channel; uint32_t syncid; @@ -260,7 +260,7 @@ void pa_stream_simple_ack_callback(pa_pdispatch *pd, uint32_t command, uint32_t void pa_context_fail(pa_context *c, int error); int pa_context_set_error(pa_context *c, int error); void pa_context_set_state(pa_context *c, pa_context_state_t st); -int pa_context_handle_error(pa_context *c, uint32_t command, pa_tagstruct *t, pa_bool_t fail); +int pa_context_handle_error(pa_context *c, uint32_t command, pa_tagstruct *t, bool fail); pa_operation* pa_context_send_simple_command(pa_context *c, uint32_t command, void (*internal_callback)(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata), void (*cb)(void), void *userdata); void pa_stream_set_state(pa_stream *s, pa_stream_state_t st); @@ -305,6 +305,6 @@ void pa_ext_stream_restore_command(pa_context *c, uint32_t tag, pa_tagstruct *t) void pa_format_info_free2(pa_format_info *f, void *userdata); -pa_bool_t pa_mainloop_is_our_api(pa_mainloop_api*m); +bool pa_mainloop_is_our_api(pa_mainloop_api*m); #endif diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c index 38a9d1c..e3fe932 100644 --- a/src/pulse/introspect.c +++ b/src/pulse/introspect.c @@ -158,7 +158,7 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, u } else { while (!pa_tagstruct_eof(t)) { - pa_bool_t mute; + bool mute; uint32_t flags; uint32_t state; const char *ap = NULL; @@ -431,7 +431,7 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command, } else { while (!pa_tagstruct_eof(t)) { - pa_bool_t mute; + bool mute; uint32_t flags; uint32_t state; const char *ap; @@ -1085,7 +1085,7 @@ static void context_get_module_info_callback(pa_pdispatch *pd, uint32_t command, while (!pa_tagstruct_eof(t)) { pa_module_info i; - pa_bool_t auto_unload = FALSE; + bool auto_unload = FALSE; pa_zero(i); i.proplist = pa_proplist_new(); @@ -1170,7 +1170,7 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm while (!pa_tagstruct_eof(t)) { pa_sink_input_info i; - pa_bool_t mute = FALSE, corked = FALSE, has_volume = FALSE, volume_writable = TRUE; + bool mute = FALSE, corked = FALSE, has_volume = FALSE, volume_writable = TRUE; pa_zero(i); i.proplist = pa_proplist_new(); @@ -1275,7 +1275,7 @@ static void context_get_source_output_info_callback(pa_pdispatch *pd, uint32_t c while (!pa_tagstruct_eof(t)) { pa_source_output_info i; - pa_bool_t mute = FALSE, corked = FALSE, has_volume = FALSE, volume_writable = TRUE; + bool mute = FALSE, corked = FALSE, has_volume = FALSE, volume_writable = TRUE; pa_zero(i); i.proplist = pa_proplist_new(); @@ -1681,7 +1681,7 @@ static void context_get_sample_info_callback(pa_pdispatch *pd, uint32_t command, while (!pa_tagstruct_eof(t)) { pa_sample_info i; - pa_bool_t lazy = FALSE; + bool lazy = FALSE; pa_zero(i); i.proplist = pa_proplist_new(); diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c index 5c0345e..679a2a1 100644 --- a/src/pulse/mainloop.c +++ b/src/pulse/mainloop.c @@ -53,7 +53,7 @@ struct pa_io_event { pa_mainloop *mainloop; - pa_bool_t dead:1; + bool dead:1; int fd; pa_io_event_flags_t events; @@ -68,10 +68,10 @@ struct pa_io_event { struct pa_time_event { pa_mainloop *mainloop; - pa_bool_t dead:1; + bool dead:1; - pa_bool_t enabled:1; - pa_bool_t use_rtclock:1; + bool enabled:1; + bool use_rtclock:1; pa_usec_t time; pa_time_event_cb_t callback; @@ -83,9 +83,9 @@ struct pa_time_event { struct pa_defer_event { pa_mainloop *mainloop; - pa_bool_t dead:1; + bool dead:1; - pa_bool_t enabled:1; + bool enabled:1; pa_defer_event_cb_t callback; void *userdata; @@ -102,7 +102,7 @@ struct pa_mainloop { unsigned n_enabled_defer_events, n_enabled_time_events, n_io_events; unsigned io_events_please_scan, time_events_please_scan, defer_events_please_scan; - pa_bool_t rebuild_pollfds:1; + bool rebuild_pollfds:1; struct pollfd *pollfds; unsigned max_pollfds, n_pollfds; @@ -112,9 +112,9 @@ struct pa_mainloop { pa_mainloop_api api; int retval; - pa_bool_t quit:1; + bool quit:1; - pa_bool_t wakeup_requested:1; + bool wakeup_requested:1; int wakeup_pipe[2]; int wakeup_pipe_type; @@ -307,7 +307,7 @@ static void mainloop_defer_set_destroy(pa_defer_event *e, pa_defer_event_destroy } /* Time events */ -static pa_usec_t make_rt(const struct timeval *tv, pa_bool_t *use_rtclock) { +static pa_usec_t make_rt(const struct timeval *tv, bool *use_rtclock) { struct timeval ttv; if (!tv) { @@ -335,7 +335,7 @@ static pa_time_event* mainloop_time_new( pa_mainloop *m; pa_time_event *e; pa_usec_t t; - pa_bool_t use_rtclock = FALSE; + bool use_rtclock = FALSE; pa_assert(a); pa_assert(a->userdata); @@ -375,9 +375,9 @@ static pa_time_event* mainloop_time_new( } static void mainloop_time_restart(pa_time_event *e, const struct timeval *tv) { - pa_bool_t valid; + bool valid; pa_usec_t t; - pa_bool_t use_rtclock = FALSE; + bool use_rtclock = FALSE; pa_assert(e); pa_assert(!e->dead); @@ -494,7 +494,7 @@ pa_mainloop *pa_mainloop_new(void) { return m; } -static void cleanup_io_events(pa_mainloop *m, pa_bool_t force) { +static void cleanup_io_events(pa_mainloop *m, bool force) { pa_io_event *e, *n; PA_LLIST_FOREACH_SAFE(e, n, m->io_events) { @@ -522,7 +522,7 @@ static void cleanup_io_events(pa_mainloop *m, pa_bool_t force) { pa_assert(m->io_events_please_scan == 0); } -static void cleanup_time_events(pa_mainloop *m, pa_bool_t force) { +static void cleanup_time_events(pa_mainloop *m, bool force) { pa_time_event *e, *n; PA_LLIST_FOREACH_SAFE(e, n, m->time_events) { @@ -554,7 +554,7 @@ static void cleanup_time_events(pa_mainloop *m, pa_bool_t force) { pa_assert(m->time_events_please_scan == 0); } -static void cleanup_defer_events(pa_mainloop *m, pa_bool_t force) { +static void cleanup_defer_events(pa_mainloop *m, bool force) { pa_defer_event *e, *n; PA_LLIST_FOREACH_SAFE(e, n, m->defer_events) { @@ -1002,7 +1002,7 @@ void pa_mainloop_set_poll_func(pa_mainloop *m, pa_poll_func poll_func, void *use m->poll_func_userdata = userdata; } -pa_bool_t pa_mainloop_is_our_api(pa_mainloop_api *m) { +bool pa_mainloop_is_our_api(pa_mainloop_api *m) { pa_assert(m); return m->io_new == mainloop_io_new; diff --git a/src/pulse/proplist.c b/src/pulse/proplist.c index 649138c..61daedc 100644 --- a/src/pulse/proplist.c +++ b/src/pulse/proplist.c @@ -44,7 +44,7 @@ struct property { #define MAKE_HASHMAP(p) ((pa_hashmap*) (p)) #define MAKE_PROPLIST(p) ((pa_proplist*) (p)) -static pa_bool_t property_name_valid(const char *key) { +static bool property_name_valid(const char *key) { if (!pa_ascii_valid(key)) return FALSE; @@ -77,7 +77,7 @@ void pa_proplist_free(pa_proplist* p) { /** Will accept only valid UTF-8 */ int pa_proplist_sets(pa_proplist *p, const char *key, const char *value) { struct property *prop; - pa_bool_t add = FALSE; + bool add = FALSE; pa_assert(p); pa_assert(key); @@ -105,7 +105,7 @@ int pa_proplist_sets(pa_proplist *p, const char *key, const char *value) { /** Will accept only valid UTF-8 */ static int proplist_setn(pa_proplist *p, const char *key, size_t key_length, const char *value, size_t value_length) { struct property *prop; - pa_bool_t add = FALSE; + bool add = FALSE; char *k, *v; pa_assert(p); @@ -156,7 +156,7 @@ int pa_proplist_setp(pa_proplist *p, const char *pair) { static int proplist_sethex(pa_proplist *p, const char *key, size_t key_length, const char *value, size_t value_length) { struct property *prop; - pa_bool_t add = FALSE; + bool add = FALSE; char *k, *v; uint8_t *d; size_t dn; @@ -206,7 +206,7 @@ static int proplist_sethex(pa_proplist *p, const char *key, size_t key_length, c /** Will accept only valid UTF-8 */ int pa_proplist_setf(pa_proplist *p, const char *key, const char *format, ...) { struct property *prop; - pa_bool_t add = FALSE; + bool add = FALSE; va_list ap; char *v; @@ -246,7 +246,7 @@ fail: int pa_proplist_set(pa_proplist *p, const char *key, const void *data, size_t nbytes) { struct property *prop; - pa_bool_t add = FALSE; + bool add = FALSE; pa_assert(p); pa_assert(key); diff --git a/src/pulse/stream.c b/src/pulse/stream.c index 39338c1..cd5bdd5 100644 --- a/src/pulse/stream.c +++ b/src/pulse/stream.c @@ -374,7 +374,7 @@ void pa_stream_set_state(pa_stream *s, pa_stream_state_t st) { pa_stream_unref(s); } -static void request_auto_timing_update(pa_stream *s, pa_bool_t force) { +static void request_auto_timing_update(pa_stream *s, bool force) { pa_assert(s); pa_assert(PA_REFCNT_VALUE(s) >= 1); @@ -441,7 +441,7 @@ finish: pa_context_unref(c); } -static void check_smoother_status(pa_stream *s, pa_bool_t aposteriori, pa_bool_t force_start, pa_bool_t force_stop) { +static void check_smoother_status(pa_stream *s, bool aposteriori, bool force_start, bool force_stop) { pa_usec_t x; pa_assert(s); @@ -493,7 +493,7 @@ void pa_command_stream_moved(pa_pdispatch *pd, uint32_t command, uint32_t tag, p pa_stream *s; uint32_t channel; const char *dn; - pa_bool_t suspended; + bool suspended; uint32_t di; pa_usec_t usec = 0; uint32_t maxlength = 0, fragsize = 0, minreq = 0, tlength = 0, prebuf = 0; @@ -669,7 +669,7 @@ void pa_command_stream_suspended(pa_pdispatch *pd, uint32_t command, uint32_t ta pa_context *c = userdata; pa_stream *s; uint32_t channel; - pa_bool_t suspended; + bool suspended; pa_assert(pd); pa_assert(command == PA_COMMAND_PLAYBACK_STREAM_SUSPENDED || command == PA_COMMAND_RECORD_STREAM_SUSPENDED); @@ -908,7 +908,7 @@ finish: pa_context_unref(c); } -static void invalidate_indexes(pa_stream *s, pa_bool_t r, pa_bool_t w) { +static void invalidate_indexes(pa_stream *s, bool r, bool w) { pa_assert(s); pa_assert(PA_REFCNT_VALUE(s) >= 1); @@ -1069,7 +1069,7 @@ void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_sample_spec ss; pa_channel_map cm; const char *dn = NULL; - pa_bool_t suspended; + bool suspended; if (pa_tagstruct_get_sample_spec(t, &ss) < 0 || pa_tagstruct_get_channel_map(t, &cm) < 0 || @@ -1172,7 +1172,7 @@ static int create_stream( pa_tagstruct *t; uint32_t tag; - pa_bool_t volume_set = !!volume; + bool volume_set = !!volume; pa_cvolume cv; uint32_t i; @@ -1684,7 +1684,7 @@ pa_operation * pa_stream_drain(pa_stream *s, pa_stream_success_cb_t cb, void *us return o; } -static pa_usec_t calc_time(pa_stream *s, pa_bool_t ignore_transport) { +static pa_usec_t calc_time(pa_stream *s, bool ignore_transport) { pa_usec_t usec; pa_assert(s); @@ -1749,7 +1749,7 @@ static void stream_get_timing_info_callback(pa_pdispatch *pd, uint32_t command, pa_operation *o = userdata; struct timeval local, remote, now; pa_timing_info *i; - pa_bool_t playing = FALSE; + bool playing = FALSE; uint64_t underrun_for = 0, playing_for = 0; pa_assert(pd); diff --git a/src/pulse/utf8.c b/src/pulse/utf8.c index 773a1f8..93234b7 100644 --- a/src/pulse/utf8.c +++ b/src/pulse/utf8.c @@ -64,7 +64,7 @@ #define FILTER_CHAR '_' -static inline pa_bool_t is_unicode_valid(uint32_t ch) { +static inline bool is_unicode_valid(uint32_t ch) { if (ch >= 0x110000) /* End of unicode space */ return FALSE; @@ -78,7 +78,7 @@ static inline pa_bool_t is_unicode_valid(uint32_t ch) { return TRUE; } -static inline pa_bool_t is_continuation_char(uint8_t ch) { +static inline bool is_continuation_char(uint8_t ch) { if ((ch & 0xc0) != 0x80) /* 10xxxxxx */ return FALSE; return TRUE; diff --git a/src/pulse/volume.c b/src/pulse/volume.c index cf0a226..f33a853 100644 --- a/src/pulse/volume.c +++ b/src/pulse/volume.c @@ -284,7 +284,7 @@ double pa_sw_volume_to_linear(pa_volume_t v) { char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c) { unsigned channel; - pa_bool_t first = TRUE; + bool first = TRUE; char *e; pa_assert(s); @@ -330,7 +330,7 @@ char *pa_volume_snprint(char *s, size_t l, pa_volume_t v) { char *pa_sw_cvolume_snprint_dB(char *s, size_t l, const pa_cvolume *c) { unsigned channel; - pa_bool_t first = TRUE; + bool first = TRUE; char *e; pa_assert(s); @@ -479,27 +479,27 @@ int pa_cvolume_valid(const pa_cvolume *v) { return 1; } -static pa_bool_t on_left(pa_channel_position_t p) { +static bool on_left(pa_channel_position_t p) { return !!(PA_CHANNEL_POSITION_MASK(p) & PA_CHANNEL_POSITION_MASK_LEFT); } -static pa_bool_t on_right(pa_channel_position_t p) { +static bool on_right(pa_channel_position_t p) { return !!(PA_CHANNEL_POSITION_MASK(p) & PA_CHANNEL_POSITION_MASK_RIGHT); } -static pa_bool_t on_center(pa_channel_position_t p) { +static bool on_center(pa_channel_position_t p) { return !!(PA_CHANNEL_POSITION_MASK(p) & PA_CHANNEL_POSITION_MASK_CENTER); } -static pa_bool_t on_lfe(pa_channel_position_t p) { +static bool on_lfe(pa_channel_position_t p) { return p == PA_CHANNEL_POSITION_LFE; } -static pa_bool_t on_front(pa_channel_position_t p) { +static bool on_front(pa_channel_position_t p) { return !!(PA_CHANNEL_POSITION_MASK(p) & PA_CHANNEL_POSITION_MASK_FRONT); } -static pa_bool_t on_rear(pa_channel_position_t p) { +static bool on_rear(pa_channel_position_t p) { return !!(PA_CHANNEL_POSITION_MASK(p) & PA_CHANNEL_POSITION_MASK_REAR); } @@ -828,7 +828,7 @@ pa_cvolume* pa_cvolume_set_position( pa_volume_t v) { unsigned c; - pa_bool_t good = FALSE; + bool good = FALSE; pa_assert(cv); pa_assert(map); -- 1.7.7.6