r2152 - trunk/packages/speechd-up

alexander at linuxfromscratch.org alexander at linuxfromscratch.org
Fri Dec 28 23:27:32 PST 2007


Author: alexander
Date: 2007-12-29 00:27:32 -0700 (Sat, 29 Dec 2007)
New Revision: 2152

Added:
   trunk/packages/speechd-up/speechd-up-0.4-onechar-1.patch
Modified:
   trunk/packages/speechd-up/Makefile
Log:
Fixed inability of speechd-up to examine punctuation characters and mark
capital letters as such. More details on the bug:

http://lists.freebsoft.org/pipermail/speechd/2007q4/000977.html



Modified: trunk/packages/speechd-up/Makefile
===================================================================
--- trunk/packages/speechd-up/Makefile	2007-12-29 07:24:54 UTC (rev 2151)
+++ trunk/packages/speechd-up/Makefile	2007-12-29 07:27:32 UTC (rev 2152)
@@ -8,6 +8,8 @@
 URL-$(FILE)= http://www.freebsoft.org/pub/projects/speechd-up/$(FILE)
 SHA-$(FILE)= ad31c9a15fd8f5616aff4d35713f736ad8266a92
 
+PATCH1= speechd-up-0.4-onechar-1.patch
+
 # Targets
 
 include $(ROOT)/scripts/functions
@@ -20,6 +22,7 @@
 	$(std_build)
 
 compile-stage2:
+	patch -Np1 -i ../$(PATCH1)
 	./configure --prefix=/usr --sysconfdir=/etc
 	make
 	make install

Added: trunk/packages/speechd-up/speechd-up-0.4-onechar-1.patch
===================================================================
--- trunk/packages/speechd-up/speechd-up-0.4-onechar-1.patch	                        (rev 0)
+++ trunk/packages/speechd-up/speechd-up-0.4-onechar-1.patch	2007-12-29 07:27:32 UTC (rev 2152)
@@ -0,0 +1,35 @@
+diff -ur speechd-up-0.4.bak/speechd-up.c speechd-up-0.4/speechd-up.c
+--- speechd-up-0.4.bak/speechd-up.c	2006-10-21 20:01:34.000000000 +0600
++++ speechd-up-0.4/speechd-up.c	2007-12-28 21:09:40.000000000 +0500
+@@ -324,7 +324,7 @@
+ 
+     /* It seems there is a bug in libspeechd function spd_say_char() */
+     {
+-	snprintf(cmd, 14, "KEY %s", cuu);
++	snprintf(cmd, 14, "CHAR %s", cuu);
+ 	DBG(5, "Saying single character CMD:|%s|", cmd);
+ 	spd_execute_command(conn, "SET SELF PRIORITY TEXT");
+ 	spd_execute_command(conn, cmd);
+@@ -375,18 +375,20 @@
+ 	   make pointer _c_ point to it. If it is the only character
+ 	   in the string, _characters_ is 1, otherwise different. */
+ 	for (i=0; i<=bytes-1; i++){
+-	    if (buf[i] != ' '){
++	    if (buf[i] != ' ' && buf[i] != 24){
+ 		c=buf+i;
+ 		characters++;
+ 		if (characters>1) break;
+ 	    }
+-	    if ((unsigned) buf[i] < 32){
++	    if ((unsigned) buf[i] < 32 && (unsigned) buf[i] != 24){
+ 		characters = -1; break;
+ 	    }
+ 
+ 	}
+ 
+ 	if (characters == 1){
++	    if (buf[0] == 24)
++	        spd_cancel(conn);
+ 	    say_single_character(c, bytes-i, cd);
+ 	    iconv_close(cd);
+ 	    return 0;




More information about the livecd mailing list