Commit graph

21 commits

Author SHA1 Message Date
William Hubbs
a3901a7e4c fixed a bug in process_command
One of the switch statements in process_command did not have a default
label, which lead to undefined behavior.
Thanks to Chris Brannon for the patch.
2008-10-22 19:17:03 -05:00
William Hubbs
36b05aec41 Added support for the punctuation command from speakup 2008-10-18 16:56:47 -05:00
William Hubbs
d7e8dc2b34 Revert "fixed the length calculation when a flush is processed."
This reverts commit 66cb5a7b5c.
2008-10-09 09:05:56 -05:00
William Hubbs
66cb5a7b5c fixed the length calculation when a flush is processed. 2008-10-09 08:17:07 -05:00
William Hubbs
62deb008bc fixed the number of bytes to move in the memmove() call 2008-10-09 07:58:58 -05:00
William Hubbs
14858818d3 changed strcpy to memmove
The areas pointed to by strcpy() cannot overlap, so we need to use
memmove() in case that happens.
Thanks to Chris Brannon for pointing this out.
2008-10-08 21:59:36 -05:00
William Hubbs
6bec55ca57 changed process_buffer to use the isprint() call. 2008-10-08 18:14:17 -05:00
William Hubbs
1b608481a4 the main loop now uses strrchr and strcpy
The idea for this change came from another patch submitted by Chris
Brannon.  We now use strrchr to look for the flush character and strcpy
to move the remainder of the buffer to the beginning.
2008-10-05 16:22:16 -05:00
William Hubbs
faab189389 Fixed the select call
The select call was moved to be in the if statement below it since the
return code is not needed after that statement is processed.
2008-10-05 16:12:37 -05:00
William Hubbs
24607b1cc8 made the synth flush character a constant for readability 2008-10-05 14:47:52 -05:00
William Hubbs
c8e2a35763 fixed an off-by-one error
The loop can start at length-1 since we know that the last character in
the buffer is a null.
Thanks again to Chris Brannon for finding this.
2008-10-04 12:43:40 -05:00
William Hubbs
5ddeb1e978 indentation fixes 2008-09-01 12:50:16 -05:00
William Hubbs
96a3b19850 fix flush processing
This removes flush processing from process_command() and fixes
the code in the main loop so that it does not ignore the 0 position
in the buffer.
2008-08-31 10:29:00 -05:00
William Hubbs
ebcbcac9d2 removed an extra assignment statement 2008-08-30 16:34:59 -05:00
William Hubbs
d2d763b36b moved flush processing into main loop
This patch from Kirk Reiser attempts to increase
responsiveness by moving the flush processing into the main loop.
2008-08-30 15:02:26 -05:00
William Hubbs
564db7981e put back the select code
This needed to be put back to keep espeakup from using 100% of the cpu.
2008-08-29 19:16:10 -05:00
William Hubbs
5005b9ddde removed code that uses select
I was using the wrong type for the return value for read().
2008-08-17 18:32:05 -05:00
William Hubbs
498ce65db7 cleaned up process_command 2008-08-17 00:44:06 -05:00
William Hubbs
655894ee2a added queueing support
I have added queueing support so that when we read from the softsynth we
can put the text and commands we have read into a queue.  This will
allow us to retry calling espeak_synth() if we fill espeak's internal
buffer.
2008-08-16 19:48:40 -05:00
William Hubbs
86e93edeb0 removed softsynth code from main module 2008-08-15 22:34:49 -05:00
William Hubbs
029dd03251 modularize the code
This commit just re-arranges the source so that it is easier to work with.
2008-08-15 00:11:48 -05:00