indentation fixes

This commit is contained in:
William Hubbs 2009-05-29 23:17:28 -05:00
commit d7c81f5117
3 changed files with 11 additions and 12 deletions

View file

@ -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;

17
queue.c
View file

@ -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);
}

View file

@ -178,4 +178,3 @@ void main_loop(struct synth_t *s)
process_buffer(s, buf, length);
}
}