From dc056e6c773e203af74d290393819b7fdc4043e0 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 30 Jun 2009 13:08:07 -0500 Subject: [PATCH] broke the queue definitions out into their own header file --- Makefile | 12 ++++++------ espeakup.h | 8 ++------ queue.h | 30 ++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 queue.h diff --git a/Makefile b/Makefile index f784aac..ab01acc 100644 --- a/Makefile +++ b/Makefile @@ -44,14 +44,14 @@ espeakup: $(OBJS) cli.o: cli.c espeakup.h -espeakup.o: espeakup.c espeakup.h +espeakup.o: espeakup.c espeakup.h queue.h -queue.o: queue.c espeakup.h +queue.o: queue.c queue.h -softsynth.o: softsynth.c espeakup.h +softsynth.o: softsynth.c espeakup.h queue.h -synth.o: synth.c espeakup.h +synth.o: synth.c espeakup.h queue.h -alsa.o: alsa.c espeakup.h +alsa.o: alsa.c espeakup.h -espeak_sound.o: espeak_sound.c espeakup.h +espeak_sound.o: espeak_sound.c espeakup.h diff --git a/espeakup.h b/espeakup.h index 604f240..b0844a5 100644 --- a/espeakup.h +++ b/espeakup.h @@ -26,6 +26,8 @@ #include +#include "queue.h" + enum command_t { CMD_SET_FREQUENCY, CMD_SET_PITCH, @@ -63,16 +65,10 @@ struct synth_t { int len; }; -struct queue_t; /* An opaque type. */ - extern struct queue_t *synth_queue; extern int debug; extern void process_cli(int argc, char **argv); -extern struct queue_t *new_queue(void); -extern int queue_add(struct queue_t *q, void *entry); -extern void queue_remove(struct queue_t *q); -extern void *queue_peek(struct queue_t *q); extern void *signal_thread(void *arg); extern int initialize_espeak(struct synth_t *s); extern void *espeak_thread(void *arg); diff --git a/queue.h b/queue.h new file mode 100644 index 0000000..e1cf3ee --- /dev/null +++ b/queue.h @@ -0,0 +1,30 @@ +/* + * espeakup - interface which allows speakup to use espeak + * + * Copyright (C) 2008 William Hubbs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __QUEUE_H +#define __QUEUE_H + +struct queue_t; /* An opaque type. */ + +extern struct queue_t *new_queue(void); +extern int queue_add(struct queue_t *q, void *entry); +extern void queue_remove(struct queue_t *q); +extern void *queue_peek(struct queue_t *q); + +#endif