From 0d44f16f6738c0776edf60b84f49f0c6f875a8fe Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 17 May 2015 14:40:46 +0200 Subject: style + add timed read example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- doc/examples/telephony-and-music/monitor.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'doc/examples/telephony-and-music/monitor.c') diff --git a/doc/examples/telephony-and-music/monitor.c b/doc/examples/telephony-and-music/monitor.c index bf3e290..b3cc832 100644 --- a/doc/examples/telephony-and-music/monitor.c +++ b/doc/examples/telephony-and-music/monitor.c @@ -13,7 +13,8 @@ static char* pausers = NULL; -static int is_moc_playing(void) +static int +is_moc_playing(void) { return !WEXITSTATUS(system("env LANG=C mocp -i 2>/dev/null | grep 'State: PLAY' >/dev/null")); } @@ -25,7 +26,8 @@ static int is_moc_playing(void) * too much for an example, especially since it would also require * a mutex to make sure two threads do not modify data at the same * time, causing chaos. */ -static int callback(const char *message, void *user_data) +static int +callback(const char *message, void *user_data) { char *msg = NULL; size_t len = 0; @@ -83,7 +85,8 @@ done: -int main() +int +main() { bus_t bus; t(bus_open(&bus, "/tmp/example-bus", BUS_RDONLY)); -- cgit v1.2.3-70-g09d2