pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

yasr: fix saying character after a space when moving the cursor



Module Name:	pkgsrc-wip
Committed By:	adr <adr%sdf.org@localhost>
Pushed By:	adr
Date:		Sun Mar 3 22:05:44 2024 +0000
Changeset:	56723a98b81b1d69a7b783769f42ad8d695e116c

Modified Files:
	yasr/distinfo
	yasr/patches/patch-yasr_main.c
	yasr/patches/patch-yasr_tts.c

Log Message:
yasr: fix saying character after a space when moving the cursor

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=56723a98b81b1d69a7b783769f42ad8d695e116c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 yasr/distinfo                  |  4 ++--
 yasr/patches/patch-yasr_main.c | 41 +++++++++++++++++++++++++++++++++++++----
 yasr/patches/patch-yasr_tts.c  | 12 ++++++++++--
 3 files changed, 49 insertions(+), 8 deletions(-)

diffs:
diff --git a/yasr/distinfo b/yasr/distinfo
index b5324e7146..00d5c7c3f8 100644
--- a/yasr/distinfo
+++ b/yasr/distinfo
@@ -4,7 +4,7 @@ BLAKE2s (yasr-0.0.0.144-f60db19350542e6f4b7d268a310b9f2b9f3076c0.tar.gz) = 72d9f
 SHA512 (yasr-0.0.0.144-f60db19350542e6f4b7d268a310b9f2b9f3076c0.tar.gz) = 1a97f4d18586e9e72a01b05b0c6240a7e346b44d920771d662a0cbf9cba26467732d5681f391938d01cf0bd9e269bf0879fd7fcbf48f9678b5eafa30cbecca63
 Size (yasr-0.0.0.144-f60db19350542e6f4b7d268a310b9f2b9f3076c0.tar.gz) = 99434 bytes
 SHA1 (patch-meson.build) = 81c27075691073e33799681441e4662275e62d3a
-SHA1 (patch-yasr_main.c) = a8c406c6703f31471f4c607ea404134cdb0b5f86
-SHA1 (patch-yasr_tts.c) = 67656ad2e02a734deb136c56bf3e2ea79989b005
+SHA1 (patch-yasr_main.c) = a769cd70d9e0e727ad1038d12eee6e7813a91450
+SHA1 (patch-yasr_tts.c) = 8827f021dda2f2b07ec6810b5f2a43e43e72aa47
 SHA1 (patch-yasr_yasr.conf) = 73157a2dec79cb39050a4617af99e59349ca9531
 SHA1 (patch-yasr_yasr.h) = 68c15be283d0c21e94d0acf890cbea95634b5827
diff --git a/yasr/patches/patch-yasr_main.c b/yasr/patches/patch-yasr_main.c
index b1fa3e631e..9676602169 100644
--- a/yasr/patches/patch-yasr_main.c
+++ b/yasr/patches/patch-yasr_main.c
@@ -183,15 +183,48 @@ Remove the enforcing of UTF-8
    wide_buf[wsize] = 0;
  }
  
-@@ -1253,6 +1259,7 @@ getoutput ()
+@@ -1108,7 +1114,7 @@ getoutput ()
+ #ifdef TERMTEST
+   (void) printf ("size=%d buf=%s\n", size, buf);
+ #endif
+-
++  
+   if (!size)
+   {
+     finish (0);
+@@ -1253,8 +1259,9 @@ getoutput ()
        tts.oflag = oldoflag;
      }
    }
+-  if (ch == 13 || ch == 10 || ch == 32)
+-  {
 +
-   if (ch == 13 || ch == 10 || ch == 32)
-   {
++
++  if (ch == 13 || ch == 10){
      tts_flush ();
-@@ -1470,17 +1477,6 @@ main (int argc, char *argv[])
+   }
+   if (size > 1)
+@@ -1264,10 +1271,6 @@ getoutput ()
+     else
+       return;
+   }
+-  else if (ch == 32 || ch == 13)
+-  {
+-    tts_flush ();
+-  }
+   if (tts.oflag || kbuf[0] == 13 || kbuf[0] == 3 || ui.silent)
+   {
+     tts.oflag = stathit = 0;
+@@ -1288,7 +1291,7 @@ getoutput ()
+     case 1:			/* cursor moved right one character */
+       if ((realchar (win->row[win->cr][win->cc - 1].wchar) == kbuf[0] &&
+ 	   realchar (oldch) != kbuf[0]) ||
+-	  ((y_isblank (oldch) && kbuf[0] == 32)))
++		  ((y_isblank (oldch) && kbuf[0] == 32)))
+       {
+ 	break;
+       }
+@@ -1470,17 +1473,6 @@ main (int argc, char *argv[])
    bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
    textdomain (GETTEXT_PACKAGE);
    strcpy (charmap, nl_langinfo (CODESET));
diff --git a/yasr/patches/patch-yasr_tts.c b/yasr/patches/patch-yasr_tts.c
index ad0b3f62b6..c03fc70e02 100644
--- a/yasr/patches/patch-yasr_tts.c
+++ b/yasr/patches/patch-yasr_tts.c
@@ -5,7 +5,15 @@ Fix comment's alignment.
 
 --- yasr/tts.c.orig	2023-04-08 21:22:57.000000000 +0000
 +++ yasr/tts.c
-@@ -674,21 +674,22 @@ tts_saychar (wchar_t ch)
+@@ -412,7 +412,6 @@ tts_out_w (wchar_t *buf, int len)
+   char *p;
+   int i;
+   int xml = 0;			/* what's this? */
+-
+   if (!len)
+     return;
+   if (tts.synth == TTS_SPEECHD)
+@@ -674,21 +673,22 @@ tts_saychar (wchar_t ch)
        tts_printf_ll ("CHAR %c\r\n", ch);
  #else
      else if (ch < 0x80)
@@ -35,7 +43,7 @@ Fix comment's alignment.
        iconv (cd, &cin, &l1, &cout, &l2);
        iconv_close (cd);
        *cout = 0;
-@@ -704,7 +705,8 @@ tts_saychar (wchar_t ch)
+@@ -704,7 +704,8 @@ tts_saychar (wchar_t ch)
      return;
    }
    if (!synth[tts.synth].charoff)


Home | Main Index | Thread Index | Old Index