pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
yasr: remove, used for updating pkgsrc
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By: wiz
Date: Sat Nov 28 22:04:44 2026 +0100
Changeset: 864c282fa67fb0708855366987329a29e6d614f1
Modified Files:
Makefile
Removed Files:
yasr/COMMIT_MSG
yasr/DESCR
yasr/Makefile
yasr/PLIST
yasr/distinfo
yasr/patches/patch-meson.build
yasr/patches/patch-yasr_main.c
yasr/patches/patch-yasr_tts.c
yasr/patches/patch-yasr_yasr.h
Log Message:
yasr: remove, used for updating pkgsrc
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=864c282fa67fb0708855366987329a29e6d614f1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 -
yasr/COMMIT_MSG | 26 -
yasr/DESCR | 7 -
yasr/Makefile | 33 --
yasr/PLIST | 6 -
yasr/distinfo | 9 -
yasr/patches/patch-meson.build | 15 -
yasr/patches/patch-yasr_main.c | 1072 ----------------------------------------
yasr/patches/patch-yasr_tts.c | 492 ------------------
yasr/patches/patch-yasr_yasr.h | 39 --
10 files changed, 1700 deletions(-)
diffs:
diff --git a/Makefile b/Makefile
index 423145b27f..665edec8db 100644
--- a/Makefile
+++ b/Makefile
@@ -6313,7 +6313,6 @@ SUBDIR+= yakuake
SUBDIR+= yamlfmt
SUBDIR+= yamusic-tui-git
SUBDIR+= yap
-SUBDIR+= yasr
SUBDIR+= yaupspe
SUBDIR+= yayamlls
SUBDIR+= yder
diff --git a/yasr/COMMIT_MSG b/yasr/COMMIT_MSG
deleted file mode 100644
index ec3cbfb4b7..0000000000
--- a/yasr/COMMIT_MSG
+++ /dev/null
@@ -1,26 +0,0 @@
-audio/yasr: Update yasr to version 0.0.0.156
-
-Update prepared in wip by adr
-
-Update patches
-Change license
-
-Commits on Aug 5, 2026
- First pass at porting to MacOS
-Commits on Aug 2, 2026
- Re-license under the GNU Lesser General Public License v2.1
-Commits on Jul 11, 2026
- meson: Link with libintl when needed
- meson: Check for util.h
- meson: Add Homebrew include directory on MacOS
-Commits on May 24, 2026
- Parse OSC sequences
-Commits on May 6, 2026
- win_csi: Ignore intermediate characters
-Commits on Sep 5, 2025
- Update yasr.conf to account for "special" being deleted
- Add a "silent window" key binding
- Allow restricting speech to a particular region of the screen
-Commits on Feb 18, 2025
- Fix build with speech-dispatcher disabled
- Fix a prototype
diff --git a/yasr/DESCR b/yasr/DESCR
deleted file mode 100644
index 0c14f7b9a9..0000000000
--- a/yasr/DESCR
+++ /dev/null
@@ -1,7 +0,0 @@
-YASR ("Yet Another Screen Reader") is an attempt at a lightweight,
-portable screen reader. It works by opening a shell in a pty and
-intercepting all user input/output, maintaining a window of what
-should be on the screen by looking at the codes and text sent to the
-screen. It thus uses no Linuxisms such as /dev/vcsa0 and does not
-necessarily need to be setuid root (the only requirement being that
-the user be able to access the tts device).
diff --git a/yasr/Makefile b/yasr/Makefile
deleted file mode 100644
index 3c816c103e..0000000000
--- a/yasr/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# $NetBSD: Makefile,v 1.5 2026/09/29 06:03:59 wiz Exp $
-
-COMMITS= 156
-DISTNAME= yasr-0.0.0.${COMMITS}
-CATEGORIES= audio
-MASTER_SITES= ${MASTER_SITE_GITHUB:=mgorse/}
-GITHUB_TAG= 4b1799010f0453d822e1d246ef06f5ca204c6bdc
-
-MAINTAINER= pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE= https://github.com/mgorse/yasr
-COMMENT= Lightweight and portable screen reader
-LICENSE= gnu-lgpl-v2.1
-
-USE_LANGUAGES= c
-USE_TOOLS= pkg-config msgfmt xgettext
-
-# Replace bash with sh in configuration example
-SUBST_CLASSES+= use-sh
-SUBST_STAGE.use-sh= pre-configure
-SUBST_MESSAGE.use-sh= Use sh instead of bash
-SUBST_FILES.use-sh= yasr/yasr.conf
-SUBST_SED.use-sh= -e 's,/bin/bash,/bin/sh,'
-
-# Fix eflite path in configuration example
-SUBST_CLASSES+= fix-eflite
-SUBST_STAGE.fix-eflite= pre-configure
-SUBST_MESSAGE.fix-eflite= Fix eflite path
-SUBST_FILES.fix-eflite= yasr/yasr.conf
-SUBST_SED.fix-eflite= -e 's,/usr/local/bin/eflite,${PREFIX}/bin/eflite,'
-
-.include "../../devel/meson/build.mk"
-.include "../../audio/speech-dispatcher/buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/yasr/PLIST b/yasr/PLIST
deleted file mode 100644
index 494a24d9c7..0000000000
--- a/yasr/PLIST
+++ /dev/null
@@ -1,6 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2024/03/11 07:52:38 wiz Exp $
-bin/yasr
-man/man1/yasr.1
-share/locale/es/LC_MESSAGES/yasr.mo
-share/locale/fr/LC_MESSAGES/yasr.mo
-share/yasr/yasr.conf
diff --git a/yasr/distinfo b/yasr/distinfo
deleted file mode 100644
index d7919c23aa..0000000000
--- a/yasr/distinfo
+++ /dev/null
@@ -1,9 +0,0 @@
-$NetBSD: distinfo,v 1.1 2024/03/11 07:52:38 wiz Exp $
-
-BLAKE2s (yasr-0.0.0.156-4b1799010f0453d822e1d246ef06f5ca204c6bdc.tar.gz) = 8295f71eb9af1adf5911e5cad999fe8df1367d9f24bb26a5b84cac827a61c135
-SHA512 (yasr-0.0.0.156-4b1799010f0453d822e1d246ef06f5ca204c6bdc.tar.gz) = a6aeac2e684c68ac4adedd2d10dd034877c1028f7b391476e34f72ea82d92b0411e30e49971e74502ea69880b7205e8177a3e7b720387fc2420b2092b52ba1fc
-Size (yasr-0.0.0.156-4b1799010f0453d822e1d246ef06f5ca204c6bdc.tar.gz) = 100866 bytes
-SHA1 (patch-meson.build) = a6df4edfa35fbfb863e42a3e6a7c33e5edcc2d2c
-SHA1 (patch-yasr_main.c) = db9c480d97a3ca20ada091696f8a1fa0030115b2
-SHA1 (patch-yasr_tts.c) = c96764b76e176c7fda5aa166831d647a70b6c382
-SHA1 (patch-yasr_yasr.h) = c36abd284d8d7e80766131b4332cfe527fab455b
diff --git a/yasr/patches/patch-meson.build b/yasr/patches/patch-meson.build
deleted file mode 100644
index dc7229a722..0000000000
--- a/yasr/patches/patch-meson.build
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-meson.build,v 1.1 2024/03/11 07:52:38 wiz Exp $
-
-Add test for necessary headers
-
---- meson.build.orig 2026-08-05 17:05:38.000000000 +0000
-+++ meson.build
-@@ -42,7 +42,7 @@ foreach h : [ 'fcntl.h', 'sys/ioctl.h', 'sys/time.h',
- conf.set_quoted('LOCALEDIR', localedir)
-
- foreach h : [ 'fcntl.h', 'sys/ioctl.h', 'sys/time.h', 'unistd.h', 'utmpx.h',
-- 'pty.h', 'locale.h', 'util.h']
-+ 'pty.h', 'locale.h', 'util.h', 'libutil.h' ]
- if cc.check_header(h)
- conf.set('HAVE_@0@'.format(h.underscorify().to_upper()), 1)
- endif
diff --git a/yasr/patches/patch-yasr_main.c b/yasr/patches/patch-yasr_main.c
deleted file mode 100644
index a7eaae7c20..0000000000
--- a/yasr/patches/patch-yasr_main.c
+++ /dev/null
@@ -1,1072 +0,0 @@
-$NetBSD: patch-yasr_main.c,v 1.1 2024/03/11 07:52:38 wiz Exp $
-
-Remove non-portable use of WCHAR_T in iconv code.
-Remove the enforcing of UTF-8 (but the code is expeting multibyte
-encodings or ASCII).
-Fix the reading of char after space using right cursor key.
-Use defined constants in buffer sizes when they are used elsewhere.
-Remove unused argument of gulp().
-Fix bug: buf[] used instead of kbuf[].
-Fix bug: the reading of master can be truncated even just getting one char at
-a time (bug in NetBSD's pty implementation?), the code has to take that
-into account.
-Simplify formatting now that we are there, but according to the rest of the code.
-
---- yasr/main.c.orig 2026-08-05 17:05:38.000000000 +0000
-+++ yasr/main.c
-@@ -42,8 +42,10 @@ char *conffile = NULL;
- static int size, wsize;
- static int master, slave;
- char *conffile = NULL;
--unsigned char buf[256];
--wchar_t wide_buf[256];
-+#define BUF_SIZE 256
-+#define WIDE_BUF_SIZE 256
-+char buf[BUF_SIZE];
-+wchar_t wide_buf[WIDE_BUF_SIZE];
- char usershell[OPT_STR_SIZE];
- static struct termios t;
- Win *win;
-@@ -53,9 +55,10 @@ static int speaking = 1;
- Ui ui;
- Uirev rev;
- static int speaking = 1;
--int kbuf[100];
-+#define KBUF_SIZE 100
-+int kbuf[KBUF_SIZE];
- int kbuflen = 0;
--static wchar_t okbuf[100];
-+static wchar_t okbuf[KBUF_SIZE];
- static int okbuflen = 0;
- static int oldcr = 0, oldcc = 0, oldch = 0;
- Voices voices;
-@@ -311,40 +314,22 @@ getkey_buf ()
- static int
- getkey_buf ()
- {
-- char *b1, *b2;
-- size_t s1, s2;
- wchar_t ch;
- int key;
- int result;
-
-- s1 = size;
-- s2 = sizeof (wchar_t);
-- b1 = (char *) buf;
-- b2 = (char *) &ch;
-- iconv (ih_inp, NULL, NULL, NULL, NULL);
-- result = iconv (ih_inp, &b1, &s1, &b2, &s2);
-- if (result != -1)
-- {
-- if (!s1)
-- return ch;
-- }
-+ result = mbtowc(&ch, buf, size);
-+ if (result == size && result != -1)
-+ return (int)ch;
- key = (int) buf[0];
- if (size > 1)
-- {
- key = (key << 8) + buf[1];
-- }
- if (size > 2)
-- {
- key = (key << 8) + buf[2];
-- }
- if (size > 3)
-- {
- key = (key << 8) + buf[3];
-- }
- if (key >> 8 == 0x1b4f)
-- {
- key += 0x000c00;
-- }
-
- /* Convert high-bit meta keys to escape form */
- #ifndef __linux__
-@@ -359,11 +344,9 @@ getinput ()
- {
- int key;
-
-- size = read (0, buf, 255);
-+ size = read (0, buf, BUF_SIZE);
- if (size <= 0)
-- {
- finish (0);
-- }
- key = getkey_buf ();
- if (key == ui.disable)
- {
-@@ -389,9 +372,7 @@ getinput ()
-
- tts_silence ();
- if (ui.silent == -1)
-- {
- ui.silent = 0;
-- }
- ui.silent = -ui.silent;
- if (ui.meta)
- {
-@@ -405,9 +386,7 @@ getinput ()
- okbuflen = tts.oflag = 0;
- }
- if (!ui_keypress (key))
-- {
- (void) write (master, buf, size);
-- }
- }
-
- static void
-@@ -422,9 +401,7 @@ wincpy (Win ** d, Win * s)
- (*d)->cc = s->cc;
- (*d)->mode = s->mode;
- for (i = 0; i < s->rows; i++)
-- {
- (void) memcpy ((*d)->row[i], s->row[i], s->cols * CHARSIZE);
-- }
- (void) memcpy (&(*d)->savecp, &s->savecp, sizeof (Curpos));
- }
-
-@@ -434,9 +411,7 @@ win_end (Win * win)
- int i;
-
- for (i = 0; i < win->rows; i++)
-- {
- free (win->row[i]);
-- }
- free (win->row);
- free (win->tab);
- }
-@@ -454,9 +429,7 @@ win_scrollup ()
- tmpc = win->row[win_scrollmin];
- (void) memset (tmpc, 0, win->cols * CHARSIZE);
- for (i = win_scrollmin; i < win_scrollmax; i++)
-- {
- win->row[i] = win->row[i + 1];
-- }
- win->row[i] = tmpc;
- win->cr--;
- }
-@@ -476,9 +449,7 @@ win_lf ()
- tmpc = win->row[win_scrollmin];
- (void) memset (tmpc, 0, win->cols * CHARSIZE);
- for (i = win_scrollmin; i < win_scrollmax; i++)
-- {
- win->row[i] = win->row[i + 1];
-- }
- win->row[i] = tmpc;
- win->cr--;
- }
-@@ -494,9 +465,7 @@ win_scrolldown ()
- tmpc = win->row[win_scrollmax];
- (void) memset (tmpc, 0, CHARSIZE * win->cols);
- for (i = win_scrollmax - 1; i >= win->cr; i--)
-- {
- win->row[i + 1] = win->row[i];
-- }
- win->row[win->cr] = tmpc;
- }
-
-@@ -537,41 +506,44 @@ oldgulp (unsigned char *buf, int *size, unsigned char
- if (ep)
- {
- n = buf + *size - *ep;
-- (void) memmove (buf, *ep, 256 - n);
-- *size = n + read (master, buf + n, 255 - n);
-+ (void) memmove (buf, *ep, BUF_SIZE - n);
-+ *size = n + read (master, buf + n, BUF_SIZE - 1 - n);
- buf[*size] = '\0';
- (void) write (1, buf + n, *size - n);
- *ep = buf;
- return ((char *) buf + n);
- }
-- *size = read (master, buf, 255);
-+ *size = read (master, buf, BUF_SIZE - 1);
- buf[*size] = '\0';
- (void) write (1, buf, *size);
- return ((char *) buf);
- }
-- *size += read (master, buf + *size, 255 - *size);
-+ *size += read (master, buf + *size, BUF_SIZE - 1 - *size);
- buf[*size] = '\0';
- return ((char *) (buf + os));
- }
-
- #endif
-
--/*!
-+/*
- function reads portion of data into buf and converts
- to wide string, leaving 'leave' character in wide_buf;
- */
--static int bytes_left;
-+static int bytes_left = 0;
- static char *bytes_left_start;
- static void
- read_buf (int leave)
- {
-- char *b1, *b2;
-- size_t s1, s2;
-- if (bytes_left)
-- {
-- memcpy (buf, bytes_left_start, bytes_left);
-+ int mbcharsize;
-+ char *mbb;
-+ wchar_t *wcb, tmpb[WIDE_BUF_SIZE];
-+ size_t mbs;
-+
-+ if (bytes_left){
-+ memcpy (tmpb, bytes_left_start, bytes_left);
-+ memcpy (buf, tmpb, bytes_left);
- }
-- size = read (master, buf + bytes_left, 255 - bytes_left - leave);
-+ size = read (master, buf + bytes_left, BUF_SIZE - bytes_left - 1);
- if (size < 0)
- {
- perror ("read");
-@@ -581,39 +553,43 @@ read_buf (int leave)
- size += bytes_left;
- buf[size] = 0;
- bytes_left = 0;
-- b1 = (char *) buf;
-- b2 = (char *) (wide_buf + leave);
-- if (leave)
-- memcpy (wide_buf, wide_buf + wsize - leave,
-- sizeof (wchar_t) * (wsize - leave));
-- s1 = size;
-- s2 = (255 - leave) * sizeof (wchar_t);
-- while (s1 > 0)
-+ mbb = buf;
-+ wcb = wide_buf + leave;
-+ if (leave != 0 && leave < wsize){
-+ memcpy (tmpb, wide_buf + wsize - leave, sizeof (wchar_t) * leave);
-+ memcpy (wide_buf, tmpb, sizeof (wchar_t) * leave);
-+ }
-+ mbs = size;
-+ wsize = leave;
-+ while (mbs > 0 && wsize < (WIDE_BUF_SIZE - 1))
- {
--
-- iconv (ih_inp, NULL, NULL, NULL, NULL);
-- if (iconv (ih_inp, &b1, &s1, &b2, &s2) == (size_t) -1)
-+ mbcharsize = mbrtowc (wcb, mbb, mbs, NULL);
-+ /* '\0's will not be copyed to wide_buf */
-+ if (mbcharsize <= 0)
- {
-- if (errno == EINVAL) /* incomplete sequence at end of buffer */
-- {
-- break;
-- }
-+ if (mbcharsize == (size_t)-2) /* incomplete sequence at end of buffer */
-+ break;
- /* invalid multibyte sequence - should we ignore or insert
- some character meaning 'invalid'? */
-- b1++;
-- s1--;
-+ mbb++;
-+ mbs--;
-+ continue;
- }
-+ wcb++;
-+ wsize++;
-+ mbb += mbcharsize;
-+ mbs -= mbcharsize;
- }
-- bytes_left = s1;
-- bytes_left_start = b1;
-- wsize = (wchar_t *) b2 - wide_buf;
-- wide_buf[wsize] = 0;
-+ bytes_left = mbs;
-+ bytes_left_start = mbb;
-+ wide_buf[wsize] = L'\0';
- }
-
- static wchar_t *
--gulp (wchar_t *cp, wchar_t **ep)
-+gulp (wchar_t **ep)
- {
- int leave;
-+
- if (!ep)
- leave = 0;
- else
-@@ -623,7 +599,7 @@ gulp (wchar_t *cp, wchar_t **ep)
- read_buf (leave);
- if (ep)
- *ep = wide_buf;
-- return wide_buf;
-+ return wide_buf + leave;
- }
-
- static void
-@@ -631,12 +607,10 @@ kbsay ()
- {
- if (!ui.kbsay)
- return;
-- if (buf[0] == 8 || kbuf[0] == 127)
-+ if (kbuf[0] == 8 || kbuf[0] == 127)
- {
- if ((ui.kbsay == 2) && (okbuflen != 0))
-- {
- okbuf[--okbuflen] = 0;
-- }
-
- /*tts_say(_("back")); */
- return;
-@@ -648,10 +622,8 @@ kbsay ()
- }
-
- /* ui.kbsay == 2 -- handle word echo */
-- if (okbuflen < sizeof (kbuf) - 1 && is_char (kbuf[0]))
-- {
-+ if (okbuflen < KBUF_SIZE - 1 && is_char (kbuf[0]))
- okbuf[okbuflen++] = kbuf[0];
-- }
- }
-
- #define MIN(a, b) ((a)>(b)? (b): (a))
-@@ -660,9 +632,7 @@ strwtol (wchar_t **p)
- {
- long t = 0;
- while (iswdigit (**p))
-- {
- t = 10 * t + *(*p)++ - '0';
-- }
- return t;
- }
-
-@@ -675,24 +645,33 @@ win_csi (wchar_t **pp)
- int i;
- int x;
-
-+ /* last gulp could be just 1 char... */
-+
-+ if (!**pp)
-+ {
-+ if (!gulp (NULL))
-+ return;
-+ *pp = wide_buf;
-+ }
-+
- p = *pp;
-+
- if (*p == '[')
- p++;
-+
-+ if (!*p && !(p = gulp (pp)))
-+ return;
- if (*p == '?')
- p++;
- while (!*p || iswdigit ((int) *p) || *p == ';')
- {
- if (!*p)
- {
-- if (!(p = gulp (p, pp)))
-- {
-- return;
-- }
-+ if (!(p = gulp (pp)))
-+ return;
- }
- else
-- {
- p++;
-- }
- }
- p = *pp;
- if (*p == '[')
-@@ -701,9 +680,7 @@ win_csi (wchar_t **pp)
- p++;
- }
- if (*p == '?')
-- {
- p++;
-- }
- (void) memset (&parm, 0, sizeof (int) * 16);
- while (numparms < 16 && (*p == ';' || iswdigit ((int) *p)))
- {
-@@ -713,15 +690,11 @@ win_csi (wchar_t **pp)
- else
- break; /* TODO: is this redundant? */
- }
--
- if (*p >= 0x20&& *p <= 0x2f)
- p++;
--
- *pp = p + 1;
- if (ignore)
-- {
- return;
-- }
- switch (*p)
- {
- case '@': /* insert characters */
-@@ -734,9 +707,7 @@ win_csi (wchar_t **pp)
- case 'A': /* move up */
- win->cr -= PARM1;
- if (win->cr < 0)
-- {
- win->cr = 0;
-- }
- break;
-
- case 'B': /* move down */
-@@ -787,24 +758,18 @@ win_csi (wchar_t **pp)
- (void) memset (win->row[win->cr] + win->cc, 0,
- CHARSIZE * (win->cols - win->cc));
- for (i = win->cr + 1; i < win->rows; i++)
-- {
-- (void) memset (win->row[i], 0, win->cols * CHARSIZE);
-- }
-+ (void) memset (win->row[i], 0, win->cols * CHARSIZE);
- break;
-
- case 1: /* erase from start to cursor */
- (void) memset (win->row[win->cr], 0, win->cc);
- for (i = 0; i < win->cr; i++)
-- {
-- (void) memset (win->row[i], 0, win->cols * CHARSIZE);
-- }
-+ (void) memset (win->row[i], 0, win->cols * CHARSIZE);
- break;
-
- case 2: /* erase whole screen */
- for (i = 0; i < win->rows; i++)
-- {
-- (void) memset (win->row[i], 0, win->cols * CHARSIZE);
-- }
-+ (void) memset (win->row[i], 0, win->cols * CHARSIZE);
- break;
- }
- break;
-@@ -830,29 +795,19 @@ win_csi (wchar_t **pp)
- case 'L': /* insert rows */
- x = MIN (PARM1, win_scrollmax - win->cr);
- for (i = win_scrollmax; i >= win->cr + x; i--)
-- {
- (void) memcpy (win->row[i], win->row[i - x], win->cols * CHARSIZE);
-- }
- for (i = win->cr; i < win->cr + x; i++)
-- {
- (void) memset (win->row[i], 0, win->cols * CHARSIZE);
-- }
- break;
-
- case 'M':
- x = MIN (PARM1, win_scrollmax - win->cr);
- if (x + win->cr > win_scrollmax)
-- {
- x = win_scrollmax - win->cr;
-- }
- for (i = win->cr; i <= win_scrollmax - x; i++)
-- {
- (void) memcpy (win->row[i], win->row[i + x], win->cols * CHARSIZE);
-- }
- for (i = win_scrollmax - x + 1; i <= win_scrollmax; i++)
-- {
- (void) memset (win->row[i], 0, win->cols * CHARSIZE);
-- }
- break;
-
- case 'P': /* delete characters */
-@@ -865,16 +820,12 @@ win_csi (wchar_t **pp)
-
- case 'S': /* Scroll up */
- for (i = 0; i < PARM1; i++)
-- {
- win_scrollup ();
-- }
- break;
-
- case 'T': /* Scroll down */
- for (i = 0; i < PARM1; i++)
-- {
- win_scrolldown ();;
-- }
- break;
-
- case 'X': /* Erase characters */
-@@ -891,9 +842,7 @@ win_csi (wchar_t **pp)
- {
- case 3:
- for (i = 0; i < win->cols; i++)
-- {
-- win->tab[i] = 0;
-- }
-+ win->tab[i] = 0;
- break;
-
- case 0:
-@@ -963,13 +912,9 @@ win_csi (wchar_t **pp)
- }
-
- if (win->cr >= win->rows)
-- {
- win->cr = win->rows - 1;
-- }
- else if (win->cr < 0)
-- {
- win->cr = 0;
-- }
- if (win->cc >= win->cols - 1)
- win->cc = win->cols - 1;
- else if (win->cc < 0)
-@@ -988,7 +933,7 @@ win_osc (wchar_t **pp)
- {
- if (!*p)
- {
-- if (!(p = gulp (p, pp)))
-+ if (!(p = gulp (pp)))
- return;
- }
- p++;
-@@ -1008,20 +953,14 @@ win_addchr (wchar_t ch, int tflag)
- win->carry++;
- }
- if (win->mode & 0x08)
-- {
- (void) memmove (win->row[win->cr] + win->cc + 1,
- win->row[win->cr] + win->cc,
- (win->cols - win->cc - 1) * CHARSIZE);
-- }
- win->row[win->cr][win->cc].attr = win->attr;
- win->row[win->cr][win->cc++].wchar = ch;
- if (tflag)
-- {
- if (ui.silent != 1)
-- {
- tts_addchr (ch);
-- }
-- }
- }
-
- wchar_t
-@@ -1041,12 +980,8 @@ bol (int cr, int cc)
-
- rptr = win->row[cr];
- for (i = 0; i < cc; i++)
-- {
- if (y_isblank (rptr[i].wchar))
-- {
- return (0);
-- }
-- }
-
- return (1);
- }
-@@ -1061,12 +996,8 @@ eol (int cr, int cc)
-
- rptr = win->row[cr];
- for (i = cc + 1; i < win->cols; i++)
-- {
- if (y_isblank (rptr[i].wchar))
-- {
- return (0);
-- }
-- }
-
- return (1);
- }
-@@ -1082,16 +1013,10 @@ firstword (int cr, int cc)
- rptr = win->row[cr];
- i = cc;
- while (i && !y_isblank (rptr[i].wchar))
-- {
- i--;
-- }
- for (; i; i--)
-- {
- if (!y_isblank (rptr[i].wchar))
-- {
- return (0);
-- }
-- }
-
- return (1);
- }
-@@ -1106,20 +1031,12 @@ lastword (int cr, int cc)
-
- rptr = win->row[cr];
- if (y_isblank (rptr[i].wchar))
-- {
- i++;
-- }
- while (i < win->cols && !y_isblank (rptr[i].wchar))
-- {
- i++;
-- }
- while (i < win->cols)
-- {
- if (!y_isblank (rptr[i++].wchar))
-- {
- return (0);
-- }
-- }
-
- return (1);
- }
-@@ -1143,14 +1060,13 @@ getoutput ()
- static int stathit = 0, oldoflag = 0;
-
- read_buf (0);
-+
- #ifdef TERMTEST
- (void) printf ("size=%d buf=%s\n", size, buf);
- #endif
-
- if (!size)
-- {
- finish (0);
-- }
- p = wide_buf;
-
- while (p - wide_buf < wsize)
-@@ -1163,37 +1079,33 @@ getoutput ()
-
- case 8:
- if (win->cc)
-- win->cc--;
-+ win->cc--;
- else if (win->carry && win->cr)
- {
-- win->cr--;
-- win->cc = win->cols - 1;
-- win->carry--;
-+ win->cr--;
-+ win->cc = win->cols - 1;
-+ win->carry--;
- }
- if ((kbuf[0] == 8 || kbuf[0] == 127) && !tts.oflag && !ui.silent)
- {
-- kbsay ();
-- ui_saychar (win->cr, win->cc);
-+ kbsay ();
-+ ui_saychar (win->cr, win->cc);
- }
- if (tts.outlen)
-- {
-- tts.outlen--;
-- }
-+ tts.outlen--;
- break;
-
- case 9:
- for (i = win->cc + 1; i < win->cols; i++)
- {
-- if (win->tab[i])
-- {
-- win->cc = i;
-- break;
-- }
-+ if (win->tab[i])
-+ {
-+ win->cc = i;
-+ break;
-+ }
- }
- if (i == win->cols)
-- {
-- win->cc = i - 1;
-- }
-+ win->cc = i - 1;
- break;
-
- case 10:
-@@ -1211,36 +1123,34 @@ getoutput ()
- break; /* may need to change in the future */
-
- case 27:
-- if (!*p && !(p = gulp (p, NULL)))
-- {
-- return;
-- }
-+ if (!*p && !(p = gulp (NULL)))
-+ return;
- switch (*p++)
- {
- case 'D':
-- win_lf ();
-- break;
-+ win_lf ();
-+ break;
- case 'E':
-- break; /* FIXME -- new line */
-+ break; /* FIXME -- new line */
- case 'H':
-- win->tab[win->cc] = 1;
-- break;
-+ win->tab[win->cc] = 1;
-+ break;
- case 'M':
-- win_rlf ();
-- break;
-+ win_rlf ();
-+ break;
- case '7':
-- wincpy (&winsave, win);
-- oldcr = oldcc = 255;
-- break;
-+ wincpy (&winsave, win);
-+ oldcr = oldcc = 255;
-+ break;
- case '8':
-- wincpy (&win, winsave);
-- break;
-+ wincpy (&win, winsave);
-+ break;
- case '[':
-- win_csi (&p);
-- break;
-+ win_csi (&p);
-+ break;
- case ']':
-- win_osc (&p);
-- break;
-+ win_osc (&p);
-+ break;
- }
- break;
-
-@@ -1252,37 +1162,27 @@ getoutput ()
- #if 0
- if (special)
- {
-- if (ch == '<')
-- {
-- speaking = 0; /* hack for medievia.com */
-- }
-- else if (ch == '>')
-- {
-- speaking = 1;
-- }
-+ if (ch == '<')
-+ speaking = 0; /* hack for medievia.com */
-+ else if (ch == '>')
-+ speaking = 1;
- }
- #endif
- if (ch == kbuf[0] && win->cr == oldcr && win->cc == oldcc && kbuflen)
- {
- /* this character was (probably) echoed as a result of a keystroke */
-- kbsay ();
-- win_addchr (ch, 0);
-- (void) memmove (kbuf, kbuf + 1, (--kbuflen) * sizeof (int));
-+ kbsay ();
-+ win_addchr (ch, 0);
-+ (void) memmove (kbuf, kbuf + 1, (--kbuflen) * sizeof (int));
- }
- else
-- {
-- win_addchr (ch, speaking && in_speaking_window ());
-- }
-+ win_addchr (ch, speaking && in_speaking_window ());
- chr = 1;
- }
- if (!chr && ch != 8 && (stathit == 0 || ch < '0' || ch > '9'))
-- {
- tts_flush ();
-- }
- else
-- {
- chr = 0;
-- }
- if ((!win->cc && win->cr > win->rows - 3) || win->cr == win->rows - 1)
- {
- stathit = win->cr;
-@@ -1294,10 +1194,17 @@ getoutput ()
- tts.oflag = oldoflag;
- }
- }
-- if (ch == 13 || ch == 10 || ch == 32)
-+ /* If last key was cursor left or cursor right just say char at cursor */
-+ if (kbuf[0] == 0x1b5b43 || kbuf[0] == 0x1b5b44)
- {
-- tts_flush ();
-+ ui_saychar (win->cr, win->cc);
-+ oldcr = win->cr;
-+ oldcc = win->cc;
-+ oldch = win->row[win->cr][win->cc].wchar;
-+ return;
- }
-+ if (ch == 13 || ch == 10 || ch == 32)
-+ tts_flush ();
- if (size > 1)
- {
- if (!readable (master, 0))
-@@ -1306,9 +1213,7 @@ getoutput ()
- return;
- }
- else if (ch == 32 || ch == 13)
-- {
- tts_flush ();
-- }
- if (tts.oflag || kbuf[0] == 13 || kbuf[0] == 3 || ui.silent)
- {
- tts.oflag = stathit = 0;
-@@ -1329,25 +1234,18 @@ 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)))
-- {
-- break;
-- }
-- if (kbuf[0] == 0x1b5b43 ||
-- ((ui.curtrack == 2) && (ui.kbsay != 2 || is_separator (kbuf[0]))))
-- {
-- ui_saychar (win->cr, win->cc);
-- }
-+ ((y_isblank (oldch) && kbuf[0] == 32)))
- break;
-+ if (ui.curtrack == 2 && (ui.kbsay != 2 || is_separator (kbuf[0])))
-+ ui_saychar (win->cr, win->cc);
-+ break;
-
- case 0:
- break;
-
- case -1:
-- if (kbuf[0] == 0x1b5b44 || ui.curtrack == 2)
-- {
-+ if (ui.curtrack == 2)
- ui_saychar (win->cr, win->cc);
-- }
- break;
-
- default:
-@@ -1356,18 +1254,11 @@ getoutput ()
- if (eol (win->cr, win->cc))
- ui_saychar (win->cr, win->cc);
- else
-- {
- ui_sayword (win->cr, cblank (win->cr, win->cc) ?
- win->cc + 1 : win->cc);
-- }
- }
- }
- }
-- else if ((kbuf[0] == 0x1b5b43 && bol (win->cr, win->cc)) ||
-- (kbuf[0] == 0x1b5b44 && eol (win->cr, win->cc)))
-- {
-- ui_saychar (win->cr, win->cc);
-- }
- else
- {
- switch (win->cr - oldcr)
-@@ -1378,46 +1269,36 @@ getoutput ()
- ui_sayline (win->cr, 1);
- break;
- }
-- if (win->cc == 0 && (oldcr == win->cols - 1 || kbuf[0] == 0x1b5b43))
-+ if (win->cc == 0 && oldcr == win->cols - 1)
- {
-- ui_saychar (win->cr, win->cc);
-- break;
-+ ui_saychar (win->cr, win->cc);
-+ break;
- }
- if (ui.curtrack < 2)
-- {
-- break;
-- }
-+ break;
- if (win->cc && bol (win->cr, win->cc) && lastword (oldcr, oldcc)
-- && oldcc)
-- {
-- ui_sayword (win->cr, win->cc);
-- }
-+ && oldcc)
-+ ui_sayword (win->cr, win->cc);
- else
-- {
-- ui_sayline (win->cr, 1);
-- }
-+ ui_sayline (win->cr, 1);
- break;
- case -1: /* cursor moved up a line */
- if (kbuf[0] == 0x1b5b41)
- {
-- ui_sayline (win->cr, 1);
-- break;
-+ ui_sayline (win->cr, 1);
-+ break;
- }
- if (ui.curtrack < 2)
-- break;
-- if (win->cc == win->cols - 1 && (oldcr == 0 || kbuf[0] == 0x1b5b44))
-- {
-- ui_saychar (win->cr, win->cc);
-- }
-+ break;
-+ if (win->cc == win->cols - 1 && oldcr == 0)
-+ ui_saychar (win->cr, win->cc);
- else if (lastword (win->cr, win->cc) &&
- !firstword (win->cr, win->cc) &&
- (!win->cc || cblank (win->cr, win->cc - 1)) &&
- firstword (oldcr, oldcc))
-- {
-- ui_sayword (win->cr, win->cc);
-- }
-+ ui_sayword (win->cr, win->cc);
- else
-- ui_sayline (win->cr, 1);
-+ ui_sayline (win->cr, 1);
- break;
- }
- }
-@@ -1470,18 +1351,14 @@ parent (void *arg)
- }
- }
- if (FD_ISSET (0, &rf))
-- {
- getinput ();
-- }
- if (FD_ISSET (master, &rf))
- {
- getoutput ();
-- kbuflen = 0;
-+ kbuf[0] = kbuflen = 0;
- }
- if (FD_ISSET (tts.fd, &rf))
-- {
- get_tts_input ();
-- }
- }
- return NULL;
- }
-@@ -1512,25 +1389,12 @@ main (int argc, char *argv[])
- bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
- textdomain (GETTEXT_PACKAGE);
- strcpy (charmap, nl_langinfo (CODESET));
-- if (!strcmp (charmap, "ANSI_X3.4-1968"))
-- strcpy (charmap, "UTF-8");
--
-- ih_inp = iconv_open ("WCHAR_T", charmap);
-- if (ih_inp == (iconv_t) - 1)
-- {
-- fprintf (stderr, "Codeset %s not supported\n", charmap);
-- exit (1);
-- }
--
--
- #endif
-
- if (argv[0][0] == '-')
- shell = 1;
- if (isatty (0))
-- {
- (void) ioctl (0, TIOCGWINSZ, &winsz);
-- }
- if (!winsz.ws_row)
- {
- winsz.ws_row = 25;
-@@ -1571,9 +1435,7 @@ main (int argc, char *argv[])
- }
- }
- if (argv[optind])
-- {
- subprog = argv + optind;
-- }
- readconf ();
-
- #if 0 /* this doesn't work */
-@@ -1581,9 +1443,7 @@ main (int argc, char *argv[])
- {
- cp = usershell + strlen (usershell) - 1;
- while (*cp && *cp != '/')
-- {
- cp--;
-- }
- cp++;
- argv[0] = cp;
- (void) execv (usershell, argv);
-@@ -1672,9 +1532,7 @@ w_speak (wchar_t *ibuf, int len)
- {
- olen -= nc;
- if (olen)
-- {
-- tts_out_w (wstart, olen);
-- }
-+ tts_out_w (wstart, olen);
- olen = 0;
- while (i < len1 && ibuf[i + 1] == lc)
- {
-@@ -1690,25 +1548,19 @@ w_speak (wchar_t *ibuf, int len)
- else
- {
- if (!olen)
-- wstart = ibuf + i;
-+ wstart = ibuf + i;
- olen++;
- if (ibuf[i] != lc)
-- {
-- nc = 0;
-- }
-+ nc = 0;
- if (!iswalnum (ibuf[i]) &&
- ibuf[i] != 32 && ibuf[i] != '=' && ibuf[i] >= 0)
-- {
-- lc = ibuf[i];
-- }
-+ lc = ibuf[i];
- else
- lc = 0;
- }
- }
- if (olen)
-- {
- tts_out_w (wstart, olen);
-- }
- }
-
- #if 0
-@@ -1730,14 +1582,12 @@ speak (char *ibuf, int len)
- {
- olen -= nc;
- if (olen)
-- {
-- tts_out ((unsigned char *) obuf, olen);
-- }
-+ tts_out ((unsigned char *) obuf, olen);
- olen = 0;
- while (i < len1 && ibuf[i + 1] == lc)
- {
-- i++;
-- nc++;
-+ i++;
-+ nc++;
- }
- tts_saychar (lc);
- tts_out ((unsigned char *) obuf,
-@@ -1749,26 +1599,20 @@ speak (char *ibuf, int len)
- {
- obuf[olen++] = ibuf[i];
- if (ibuf[i] != lc)
-- {
-- nc = 0;
-- }
-+ nc = 0;
- if (!isalpha ((int) ibuf[i]) && !isdigit ((int) ibuf[i]) &&
- ibuf[i] != 32 && ibuf[i] != '=' && ibuf[i] >= 0)
-- {
-- lc = ibuf[i];
-- }
-+ lc = ibuf[i];
- else
-- lc = 0;
-+ lc = 0;
- if (olen > 250 && !nc)
- {
-- tts_out ((unsigned char *) obuf, olen);
-- olen = 0;
-+ tts_out ((unsigned char *) obuf, olen);
-+ olen = 0;
- }
- }
- }
- if (olen)
-- {
- tts_out ((unsigned char *) obuf, olen);
-- }
- }
- #endif
diff --git a/yasr/patches/patch-yasr_tts.c b/yasr/patches/patch-yasr_tts.c
deleted file mode 100644
index c10299ad17..0000000000
--- a/yasr/patches/patch-yasr_tts.c
+++ /dev/null
@@ -1,492 +0,0 @@
-$NetBSD: patch-yasr_tts.c,v 1.1 2024/03/11 07:52:38 wiz Exp $
-
-Remove non-portable use of WCHAR_T in iconv code.
-Fix comment's alignment.
-
---- yasr/tts.c.orig 2026-08-05 17:05:38.000000000 +0000
-+++ yasr/tts.c
-@@ -55,7 +55,8 @@ static Tts_synth synth[] = {
- {NULL, NULL, NULL, NULL, NULL, FALSE, NULL, NULL},
- };
-
--static char *dict[256];
-+#define DICT_SIZE 256
-+static char *dict[DICT_SIZE];
- static int tts_flushed = 0;
-
-
-@@ -69,9 +70,7 @@ dict_read (char *buf)
- {
- c = strtol (buf, &p, 0);
- if (c > 255)
-- {
- return (1);
-- }
- p++;
- }
- else
-@@ -90,20 +89,14 @@ dict_write (FILE * fp)
- {
- int i;
-
-- for (i = 0; i < 256; i++)
-- {
-+ for (i = 0; i < DICT_SIZE; i++)
- if (dict[i])
- {
- if (i > 31 && i < 127 && i != 35 && i != 91)
-- {
-- (void) fprintf (fp, "%c=%s\n", i, dict[i]);
-- }
-+ (void) fprintf (fp, "%c=%s\n", i, dict[i]);
- else
-- {
-- (void) fprintf (fp, "0x%.2x=%s\n", i, dict[i]);
-- }
-+ (void) fprintf (fp, "0x%.2x=%s\n", i, dict[i]);
- }
-- }
- }
-
-
-@@ -113,9 +106,7 @@ tts_flush ()
- tts_flush ()
- {
- if (tts.outlen)
-- {
- w_speak (tts.buf, tts.outlen);
-- }
-
- tts.outlen = 0;
-
-@@ -130,9 +121,7 @@ tts_wait (int usecs)
- if (usecs != -1 && !readable (tts.fd, usecs))
- return;
- while (readable (tts.fd, 0))
-- {
- read (tts.fd, buf, sizeof (buf));
-- }
- }
- #endif
-
-@@ -142,9 +131,7 @@ tts_silence ()
- char tmp[1] = { 0 };
-
- if (tts_flushed)
-- {
- return;
-- }
- tts.obufhead = tts.obuftail = tts.flood = 0;
- #ifdef ENABLE_SPEECHD
- if (tts.synth == TTS_SPEECHD)
-@@ -209,17 +196,13 @@ tts_obufout (int x)
- int oldoflag;
-
- if (!tts.flood)
-- {
- opt_queue_empty (2);
-- }
- oldoflag = tts.oflag;
- while (tts.obufhead < tts.obuftail)
- {
- len = strlen (tts.obuf + tts.obufhead);
- if (len > 1024)
-- {
- len = 1024;
-- }
- len2 = write (tts.fd, tts.obuf + tts.obufhead, len);
- #ifdef TTSLOG
- (void) write (ofd, tts.obuf + tts.obufhead, len2);
-@@ -234,9 +217,7 @@ tts_obufout (int x)
- return;
- }
- while (tts.obufhead < tts.obuftail && !tts.obuf[tts.obufhead])
-- {
- tts.obufhead++;
-- }
- }
- tts.flood = 0;
- tts.oflag = oldoflag;
-@@ -251,9 +232,7 @@ tts_addbuf (char *buf, int len, int len2)
-
- tts.flood = 1;
- if (len2 == -1)
-- {
- ptr = buf;
-- }
- else
- {
- ptr = buf + len2;
-@@ -267,9 +246,7 @@ tts_addbuf (char *buf, int len, int len2)
- tts.obuf = realloc (tts.obuf, tts.obuflen);
- }
- else
-- {
- tts_obufpack ();
-- }
- }
- (void) memcpy (tts.obuf + tts.obuftail, ptr, len);
- tts.obuftail += len;
-@@ -285,13 +262,9 @@ tts_send (char *buf, int len)
- int len2;
-
- if (!len)
-- {
- return;
-- }
- if (tts_flushed)
-- {
- tts_flushed = 0;
-- }
- #ifndef SILENT
- if (!tts.flood)
- {
-@@ -302,9 +275,7 @@ tts_send (char *buf, int len)
- #endif
-
- if (len2 < len)
-- {
- tts_addbuf (buf, len, len2);
-- }
- }
- else
- tts_addbuf (buf, len, 0);
-@@ -327,10 +298,8 @@ unspeakable (unsigned char ch)
- if (ch < 32)
- return 1;
- while (*p)
-- {
- if (*p++ == ch)
- return 1;
-- }
- return (0);
- }
-
-@@ -438,26 +407,24 @@ tts_out_w (wchar_t *buf, int len)
- while (len > 0)
- {
- if (*buf < 0x80)
-- {
-- obuf[obo++] = *buf;
-- }
-+ obuf[obo++] = *buf;
- else if (*buf < 0x800)
- {
-- obuf[obo++] = 0xc0 | (*buf >> 6);
-- obuf[obo++] = 0x80 | (*buf & 0x3f);
-+ obuf[obo++] = 0xc0 | (*buf >> 6);
-+ obuf[obo++] = 0x80 | (*buf & 0x3f);
- }
- else if (*buf < 0x10000)
- {
-- obuf[obo++] = 0xe0 | (*buf >> 12);
-- obuf[obo++] = 0x80 | ((*buf >> 6) & 0x3f);
-- obuf[obo++] = 0x80 | (*buf & 0x3f);
-+ obuf[obo++] = 0xe0 | (*buf >> 12);
-+ obuf[obo++] = 0x80 | ((*buf >> 6) & 0x3f);
-+ obuf[obo++] = 0x80 | (*buf & 0x3f);
- }
- else
-- obuf[obo++] = ' ';
-+ obuf[obo++] = ' ';
- if (obo >= 1020)
- {
-- tts_out ((unsigned char *) obuf, obo);
-- obo = 0;
-+ tts_out ((unsigned char *) obuf, obo);
-+ obo = 0;
- }
- buf++;
- len--;
-@@ -478,63 +445,61 @@ tts_out_w (wchar_t *buf, int len)
- p++;
- for (i = 0; i < len; i++)
- {
-- if (buf[i] > 255 || unspeakable ((unsigned char) buf[i]))
-- {
-- if (obo > 0 && obuf[obo - 1] != ' ')
-- {
-- obuf[obo++] = ' ';
-- tts_send (obuf, obo);
-- obo = 0;
-- }
-- else if (buf[i] < 256 && dict[buf[i]])
-- {
-- (void) strcpy (obuf + obo, dict[buf[i]]);
-- obo = strlen (obuf);
-- }
-- obuf[obo++] = 32;
-- }
-- else if (xml)
-- {
-- switch (buf[i])
-- {
-- /* For some reason, < does not work for me with Voxeo */
-- case '<':
-- strcpy (obuf + obo, " less than ");
-- obo += 11;
-- break;
-- case '>':
-- strcpy (obuf + obo, ">");
-- obo += 4;
-- break;
-- case '&':
-- strcpy (obuf + obo, "&");
-- obo += 5;
-- break;
-- default:
-- obuf[obo++] = buf[i];
-- break;
-- }
-- }
-- else
-- {
-- if (ui.split_caps && i > 0 && iswlower (buf[i - 1])
-- && iswupper (buf[i]))
-- {
-- obuf[obo++] = ' ';
-- }
-- obuf[obo++] = buf[i];
-- }
-- if (obo > (sizeof (obuf) / sizeof (obuf[0])) - 6)
-- {
-- tts_send (obuf, obo);
-- obo = 0;
-- }
-+ if (buf[i] > 255 || unspeakable ((unsigned char) buf[i]))
-+ {
-+ if (obo > 0 && obuf[obo - 1] != ' ')
-+ {
-+ obuf[obo++] = ' ';
-+ tts_send (obuf, obo);
-+ obo = 0;
-+ }
-+ else if (buf[i] < 256 && dict[buf[i]])
-+ {
-+ (void) strcpy (obuf + obo, dict[buf[i]]);
-+ obo = strlen (obuf);
-+ }
-+ obuf[obo++] = 32;
-+ }
-+ else if (xml)
-+ {
-+ switch (buf[i])
-+ {
-+ /* For some reason, < does not work for me with Voxeo */
-+ case '<':
-+ strcpy (obuf + obo, " less than ");
-+ obo += 11;
-+ break;
-+ case '>':
-+ strcpy (obuf + obo, ">");
-+ obo += 4;
-+ break;
-+ case '&':
-+ strcpy (obuf + obo, "&");
-+ obo += 5;
-+ break;
-+ default:
-+ obuf[obo++] = buf[i];
-+ break;
-+ }
-+ }
-+ else
-+ {
-+ if (ui.split_caps && i > 0 && iswlower (buf[i - 1])
-+ && iswupper (buf[i]))
-+ {
-+ obuf[obo++] = ' ';
-+ }
-+ obuf[obo++] = buf[i];
-+ }
-+ if (obo > (sizeof (obuf) / sizeof (obuf[0])) - 6)
-+ {
-+ tts_send (obuf, obo);
-+ obo = 0;
-+ }
- }
- }
- else
-- {
- obuf[obo++] = *p;
-- }
- p++;
- }
- tts_send (obuf, obo);
-@@ -678,9 +643,7 @@ tts_saychar (wchar_t ch)
- #endif
-
- if (!ch)
-- {
- ch = 32;
-- }
- if (tts.synth == TTS_SPEECHD || tts.synth == TTS_MAC)
- {
- #if defined(ENABLE_SPEECHD) || defined(__APPLE__)
-@@ -700,21 +663,22 @@ tts_saychar (wchar_t ch)
- tts_printf_ll ("CHAR %c\r\n", ch);
- #else
- else if (ch < 0x80)
-- {
- tts_printf_ll ("CHAR %c\r\n", ch);
-- }
- else
- {
-- char buf[8], *cin, *cout;
-+ char tmpbuf[MB_CUR_MAX], buf[MB_CUR_MAX], *cin, *cout;
- size_t l1, l2;
- iconv_t cd;
-- cd = iconv_open ("UTF-8", "WCHAR_T");
-+ cd = iconv_open ("UTF-8", nl_langinfo (CODESET));
- if (cd == (iconv_t) - 1)
-- return;
-- l1 = sizeof (wchar_t);
-- l2 = 7;
-- cin = (char *) &ch;
-+ return;
-+ l1 = wctomb (tmpbuf, ch);
-+ if (l1 == -1)
-+ return;
-+ l2 = sizeof (buf) - 1;
-+ cin = tmpbuf;
- cout = buf;
-+
- iconv (cd, &cin, &l1, &cout, &l2);
- iconv_close (cd);
- *cout = 0;
-@@ -730,7 +694,8 @@ tts_saychar (wchar_t ch)
- return;
- }
- if (!synth[tts.synth].charoff)
-- { /* assume on string does everything */
-+ {
-+ /* assume on string does everything */
- (void) sprintf (ttsbuf, synth[tts.synth].charon, ch);
- tts_send (ttsbuf, strlen (ttsbuf));
- return;
-@@ -751,9 +716,7 @@ tts_saychar (wchar_t ch)
- ttsbuf[0] = ch;
- tts_send (ttsbuf, 1);
- if (synth[tts.synth].saychar_needs_flush)
-- {
- tts_send (synth[tts.synth].say + 2, strlen (synth[tts.synth].say) - 2);
-- }
- while (j)
- {
- j -= 2;
-@@ -913,9 +876,7 @@ tts_init (int first_call)
- #ifdef TTSLOG
- ofd = open ("tts.log", O_WRONLY | O_CREAT);
- if (ofd == -1)
-- {
- perror ("open");
-- }
- #endif
-
- #ifdef ENABLE_SPEECHD
-@@ -954,17 +915,11 @@ tts_init (int first_call)
- else if (tts.port[0] != '|')
- {
- if (tts.synth == TTS_DECTALK)
-- {
- mode = O_NOCTTY | O_RDWR;
-- }
- else if (tts.synth == TTS_EMACSPEAK_SERVER)
-- {
- mode = O_WRONLY;
-- }
- if (first_call)
-- {
- tts.fd = open (portname, mode);
-- }
- if (tts.fd == -1)
- {
- perror ("tts");
-@@ -992,21 +947,15 @@ tts_init (int first_call)
- (void) strcpy (buf, tts.port + 1);
- arg[i = 0] = strtok (buf, " ");
- while (i < 7)
-- {
- if (!(arg[++i] = strtok (NULL, " ")))
-- {
-- break;
-- }
-- }
-+ break;
-
- if (first_call)
-- {
- if (openpty (&tts.fd, &tts.fd_slave, NULL, NULL, NULL) == -1)
- {
-- perror ("openpty");
-- exit (1);
-+ perror ("openpty");
-+ exit (1);
- }
-- }
-
- if (!(tts.pid = fork ()))
- {
-@@ -1023,9 +972,7 @@ tts_init (int first_call)
- }
- (void) usleep (10000);
- if (tts.pid == -1)
-- {
- perror ("forkpty");
-- }
- }
- if (tts.synth == TTS_SPEECHD)
- {
-@@ -1077,10 +1024,8 @@ tts_addchr (wchar_t ch)
- tts_addchr (wchar_t ch)
- {
- tts.buf[tts.outlen++] = ch;
-- if (tts.outlen > 250)
-- {
-+ if (tts.outlen > TTS_BUF_SIZE)
- tts_flush ();
-- }
- }
-
-
-@@ -1099,9 +1044,7 @@ tts_initsynth (int *argp)
- }
- }
- if (!ui.silent)
-- {
- tts_say (_("Synthesizer reinitialized."));
-- }
- }
-
-
-@@ -1112,9 +1055,7 @@ tts_reinit (int *argp)
- int pid = tts.pid;
-
- if (pid == 0)
-- {
- return;
-- }
-
- tts.reinit = 1; /* Start reinit */
-
-@@ -1124,20 +1065,14 @@ tts_reinit (int *argp)
- if (kill (pid, SIGTERM) != 0)
- {
- if (errno == ESRCH)
-- {
- tts_reinit2 ();
-- }
- else
-- {
- kill (pid, SIGKILL);
-- }
- }
-
- /* wait init completion (tts.fd must be available) */
- while (tts.reinit)
-- {
- usleep (100000);
-- }
- }
-
-
diff --git a/yasr/patches/patch-yasr_yasr.h b/yasr/patches/patch-yasr_yasr.h
deleted file mode 100644
index 5b15246441..0000000000
--- a/yasr/patches/patch-yasr_yasr.h
+++ /dev/null
@@ -1,39 +0,0 @@
-$NetBSD: patch-yasr_yasr.h,v 1.1 2024/03/11 07:52:38 wiz Exp $
-
-Remove size of array declarations defined elsewhere
-
---- yasr/yasr.h.orig 2026-08-05 17:05:38.000000000 +0000
-+++ yasr/yasr.h
-@@ -127,6 +127,7 @@ enum mpunct
- };
-
- #define OPT_STR_SIZE 256
-+#define TTS_BUF_SIZE 256
-
- typedef struct Tts Tts;
- struct Tts
-@@ -142,7 +143,7 @@ struct Tts
- int obufhead, obuflen, obuftail;
- int oflag; /* set to 1 every time tts_send is called */
- int outlen;
-- wchar_t buf[256];
-+ wchar_t buf[TTS_BUF_SIZE];
- int synth;
- pid_t pid;
- char port[OPT_STR_SIZE];
-@@ -313,11 +314,11 @@ extern char *conffile;
- extern Opt opt[];
- extern int synthopt;
- extern char *conffile;
--extern unsigned char buf[256];
--extern int kbuf[100];
-+extern char buf[];
-+extern int kbuf[];
- extern int kbuflen;
--extern char usershell[OPT_STR_SIZE];
--extern char ttsbuf[80];
-+extern char usershell[];
-+extern char ttsbuf[];
- extern Voices voices;
- extern int sw_top, sw_left, sw_bottom, sw_right;
- extern char charmap[];
Home |
Main Index |
Thread Index |
Old Index