[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/5] Let the spd-say client speak messages that begin with dash.
From: |
Christopher Brannon |
Subject: |
[PATCH 5/5] Let the spd-say client speak messages that begin with dash. |
Date: |
Mon, 7 Jun 2010 12:08:49 -0500 |
Previously, the following command did not work.
spd-say -- '-this is a test'
The message was silently discarded.
---
src/c/clients/say/say.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/c/clients/say/say.c b/src/c/clients/say/say.c
index 696b0e8..bdb8b8c 100644
--- a/src/c/clients/say/say.c
+++ b/src/c/clients/say/say.c
@@ -219,12 +219,8 @@ int main(int argc, char **argv) {
} else {
/* Say the message with priority "text" */
assert(argv[argc-1]);
- if (argv[argc-1][0] != '-'){
- err = spd_sayf(conn, spd_priority, (char*) argv[argc-1]);
- if (err == -1) FATAL("Speech Dispatcher failed to say message");
- } else{
- wait_till_end = 0;
- }
+ err = spd_sayf(conn, spd_priority, (char*) argv[argc-1]);
+ if (err == -1) FATAL("Speech Dispatcher failed to say message");
/* Wait till the callback is called */
if (wait_till_end) sem_wait(&semaphore);
--
1.7.1