From d7c81f5117442d66358efb52232d51f45a90d4e8 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Fri, 29 May 2009 23:17:28 -0500 Subject: [PATCH] indentation fixes --- espeakup.c | 5 ++--- queue.c | 17 +++++++++-------- softsynth.c | 1 - 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/espeakup.c b/espeakup.c index cbd9d40..e75583f 100644 --- a/espeakup.c +++ b/espeakup.c @@ -91,13 +91,11 @@ void espeakup_sighandler(int sig) int main(int argc, char **argv) { -pthread_t queue_thread_id; + pthread_t queue_thread_id; struct synth_t s = { .voice = "", }; - /* Spawn our queue-processing thread. */ - /* process command line options */ process_cli(argc, argv); @@ -118,6 +116,7 @@ pthread_t queue_thread_id; } } + /* Spawn our queue-processing thread. */ int err = pthread_create(&queue_thread_id, NULL, &queue_runner, &s); if (err != 0) { return 4; diff --git a/queue.c b/queue.c index ea43132..83fb979 100644 --- a/queue.c +++ b/queue.c @@ -71,7 +71,7 @@ static struct queue_entry_t *queue_remove(void) { struct queue_entry_t *temp = NULL; - if(last) { + if (last) { temp = last; last = temp->next; @@ -87,7 +87,7 @@ void queue_clear(void) pthread_mutex_lock(&queue_guard); while (last) { struct queue_entry_t *entry = queue_remove(); - if(entry) + if (entry) free_entry(entry); } pthread_mutex_unlock(&queue_guard); @@ -135,9 +135,9 @@ static void queue_process_entry(struct synth_t *s) espeak_ERROR error; struct queue_entry_t *current = queue_remove(); - pthread_mutex_unlock(&queue_guard); /* So "reader" can go. */ + pthread_mutex_unlock(&queue_guard); /* So "reader" can go. */ - if(current) { + if (current) { switch (current->cmd) { case CMD_SET_FREQUENCY: error = set_frequency(s, current->value, current->adjust); @@ -189,13 +189,14 @@ static void queue_process_entry(struct synth_t *s) * 2. We are processing an entry that has just been removed from the queue. */ -void *queue_runner(void *arg) { +void *queue_runner(void *arg) +{ struct synth_t *synth = (struct synth_t *) arg; - pthread_mutex_lock(&queue_guard); - while(1) { + pthread_mutex_lock(&queue_guard); + while (1) { pthread_cond_wait(&runner_awake, &queue_guard); - while(last) { + while (last) { queue_process_entry(synth); pthread_mutex_lock(&queue_guard); } diff --git a/softsynth.c b/softsynth.c index 9cf01c3..15801f4 100644 --- a/softsynth.c +++ b/softsynth.c @@ -178,4 +178,3 @@ void main_loop(struct synth_t *s) process_buffer(s, buf, length); } } -