pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/audio/yasr
Module Name: pkgsrc
Committed By: wiz
Date: Sat Nov 28 21:04:18 UTC 2026
Modified Files:
pkgsrc/audio/yasr: Makefile distinfo
pkgsrc/audio/yasr/patches: patch-meson.build patch-yasr_main.c
patch-yasr_tts.c patch-yasr_yasr.h
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/audio/yasr/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/audio/yasr/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/audio/yasr/patches/patch-meson.build \
pkgsrc/audio/yasr/patches/patch-yasr_main.c \
pkgsrc/audio/yasr/patches/patch-yasr_tts.c \
pkgsrc/audio/yasr/patches/patch-yasr_yasr.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/audio/yasr/Makefile
diff -u pkgsrc/audio/yasr/Makefile:1.5 pkgsrc/audio/yasr/Makefile:1.6
--- pkgsrc/audio/yasr/Makefile:1.5 Tue Sep 29 06:03:59 2026
+++ pkgsrc/audio/yasr/Makefile Sat Nov 28 21:04:18 2026
@@ -1,16 +1,15 @@
-# $NetBSD: Makefile,v 1.5 2026/09/29 06:03:59 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2026/11/28 21:04:18 wiz Exp $
-COMMITS= 144
+COMMITS= 156
DISTNAME= yasr-0.0.0.${COMMITS}
-PKGREVISION= 4
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_GITHUB:=mgorse/}
-GITHUB_TAG= f60db19350542e6f4b7d268a310b9f2b9f3076c0
+GITHUB_TAG= 4b1799010f0453d822e1d246ef06f5ca204c6bdc
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= https://github.com/mgorse/yasr
COMMENT= Lightweight and portable screen reader
-LICENSE= gnu-gpl-v2
+LICENSE= gnu-lgpl-v2.1
USE_LANGUAGES= c
USE_TOOLS= pkg-config msgfmt xgettext
Index: pkgsrc/audio/yasr/distinfo
diff -u pkgsrc/audio/yasr/distinfo:1.1 pkgsrc/audio/yasr/distinfo:1.2
--- pkgsrc/audio/yasr/distinfo:1.1 Mon Mar 11 07:52:38 2024
+++ pkgsrc/audio/yasr/distinfo Sat Nov 28 21:04:18 2026
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.1 2024/03/11 07:52:38 wiz Exp $
+$NetBSD: distinfo,v 1.2 2026/11/28 21:04:18 wiz Exp $
-BLAKE2s (yasr-0.0.0.144-f60db19350542e6f4b7d268a310b9f2b9f3076c0.tar.gz) = 72d9fca67181fbc0761515cf44ab01e07f97e4f90863d54df2bb614a7cd88a6c
-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) = 5e6493b9a995b3fb15b160569d21c893e99ed9d9
-SHA1 (patch-yasr_tts.c) = c7cd92e8530785e682d61f9423d4b796391fa453
-SHA1 (patch-yasr_yasr.h) = 8c1f5fdeb8c9f05e9145ee60983c707834c04b16
+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
Index: pkgsrc/audio/yasr/patches/patch-meson.build
diff -u pkgsrc/audio/yasr/patches/patch-meson.build:1.1 pkgsrc/audio/yasr/patches/patch-meson.build:1.2
--- pkgsrc/audio/yasr/patches/patch-meson.build:1.1 Mon Mar 11 07:52:38 2024
+++ pkgsrc/audio/yasr/patches/patch-meson.build Sat Nov 28 21:04:18 2026
@@ -1,15 +1,15 @@
-$NetBSD: patch-meson.build,v 1.1 2024/03/11 07:52:38 wiz Exp $
+$NetBSD: patch-meson.build,v 1.2 2026/11/28 21:04:18 wiz Exp $
Add test for necessary headers
---- meson.build.orig 2023-04-08 21:22:57.000000000 +0000
+--- meson.build.orig 2026-08-05 17:05:38.000000000 +0000
+++ meson.build
-@@ -26,7 +26,7 @@ localedir = join_paths(prefix, get_optio
+@@ -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', 'libutil.h', 'pty.h', 'locale.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
Index: pkgsrc/audio/yasr/patches/patch-yasr_main.c
diff -u pkgsrc/audio/yasr/patches/patch-yasr_main.c:1.1 pkgsrc/audio/yasr/patches/patch-yasr_main.c:1.2
--- pkgsrc/audio/yasr/patches/patch-yasr_main.c:1.1 Mon Mar 11 07:52:38 2024
+++ pkgsrc/audio/yasr/patches/patch-yasr_main.c Sat Nov 28 21:04:18 2026
@@ -1,4 +1,4 @@
-$NetBSD: patch-yasr_main.c,v 1.1 2024/03/11 07:52:38 wiz Exp $
+$NetBSD: patch-yasr_main.c,v 1.2 2026/11/28 21:04:18 wiz Exp $
Remove non-portable use of WCHAR_T in iconv code.
Remove the enforcing of UTF-8 (but the code is expeting multibyte
@@ -12,9 +12,9 @@ a time (bug in NetBSD's pty implementati
into account.
Simplify formatting now that we are there, but according to the rest of the code.
---- yasr/main.c.orig 2023-04-08 21:22:57.000000000 +0000
+--- yasr/main.c.orig 2026-08-05 17:05:38.000000000 +0000
+++ yasr/main.c
-@@ -39,8 +39,10 @@ static int cpid;
+@@ -42,8 +42,10 @@ char *conffile = NULL;
static int size, wsize;
static int master, slave;
char *conffile = NULL;
@@ -27,7 +27,7 @@ Simplify formatting now that we are ther
char usershell[OPT_STR_SIZE];
static struct termios t;
Win *win;
-@@ -50,9 +52,10 @@ Tts tts;
+@@ -53,9 +55,10 @@ static int speaking = 1;
Ui ui;
Uirev rev;
static int speaking = 1;
@@ -40,7 +40,7 @@ Simplify formatting now that we are ther
static int okbuflen = 0;
static int oldcr = 0, oldcc = 0, oldch = 0;
Voices voices;
-@@ -307,40 +310,22 @@ is_separator (int ch)
+@@ -311,40 +314,22 @@ getkey_buf ()
static int
getkey_buf ()
{
@@ -84,7 +84,7 @@ Simplify formatting now that we are ther
/* Convert high-bit meta keys to escape form */
#ifndef __linux__
-@@ -355,11 +340,9 @@ getinput ()
+@@ -359,11 +344,9 @@ getinput ()
{
int key;
@@ -97,7 +97,7 @@ Simplify formatting now that we are ther
key = getkey_buf ();
if (key == ui.disable)
{
-@@ -385,9 +368,7 @@ getinput ()
+@@ -389,9 +372,7 @@ getinput ()
tts_silence ();
if (ui.silent == -1)
@@ -107,7 +107,7 @@ Simplify formatting now that we are ther
ui.silent = -ui.silent;
if (ui.meta)
{
-@@ -401,9 +382,7 @@ getinput ()
+@@ -405,9 +386,7 @@ getinput ()
okbuflen = tts.oflag = 0;
}
if (!ui_keypress (key))
@@ -117,7 +117,7 @@ Simplify formatting now that we are ther
}
static void
-@@ -418,9 +397,7 @@ wincpy (Win ** d, Win * s)
+@@ -422,9 +401,7 @@ wincpy (Win ** d, Win * s)
(*d)->cc = s->cc;
(*d)->mode = s->mode;
for (i = 0; i < s->rows; i++)
@@ -127,7 +127,7 @@ Simplify formatting now that we are ther
(void) memcpy (&(*d)->savecp, &s->savecp, sizeof (Curpos));
}
-@@ -430,9 +407,7 @@ win_end (Win * win)
+@@ -434,9 +411,7 @@ win_end (Win * win)
int i;
for (i = 0; i < win->rows; i++)
@@ -137,7 +137,7 @@ Simplify formatting now that we are ther
free (win->row);
free (win->tab);
}
-@@ -450,9 +425,7 @@ win_scrollup ()
+@@ -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++)
@@ -147,7 +147,7 @@ Simplify formatting now that we are ther
win->row[i] = tmpc;
win->cr--;
}
-@@ -472,9 +445,7 @@ win_lf ()
+@@ -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++)
@@ -157,7 +157,7 @@ Simplify formatting now that we are ther
win->row[i] = tmpc;
win->cr--;
}
-@@ -490,9 +461,7 @@ win_scrolldown ()
+@@ -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--)
@@ -167,7 +167,7 @@ Simplify formatting now that we are ther
win->row[win->cr] = tmpc;
}
-@@ -533,41 +502,44 @@ oldgulp (unsigned char *buf, int *size,
+@@ -537,41 +506,44 @@ oldgulp (unsigned char *buf, int *size, unsigned char
if (ep)
{
n = buf + *size - *ep;
@@ -214,7 +214,7 @@ Simplify formatting now that we are ther
+ 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);
@@ -224,7 +224,7 @@ Simplify formatting now that we are ther
if (size < 0)
{
perror ("read");
-@@ -577,39 +549,43 @@ read_buf (int leave)
+@@ -581,39 +553,43 @@ read_buf (int leave)
size += bytes_left;
buf[size] = 0;
bytes_left = 0;
@@ -236,10 +236,6 @@ Simplify formatting now that we are ther
- s1 = size;
- s2 = (255 - leave) * sizeof (wchar_t);
- while (s1 > 0)
-- {
--
-- iconv (ih_inp, NULL, NULL, NULL, NULL);
-- if (iconv (ih_inp, &b1, &s1, &b2, &s2) == (size_t) -1)
+ mbb = buf;
+ wcb = wide_buf + leave;
+ if (leave != 0 && leave < wsize){
@@ -249,35 +245,37 @@ Simplify formatting now that we are ther
+ 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 */
- {
-+ if (mbcharsize == (size_t)-2) /* incomplete sequence at end of buffer */
- break;
+- 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--;
-- }
-- }
-- bytes_left = s1;
-- bytes_left_start = b1;
-- wsize = (wchar_t *) b2 - wide_buf;
-- wide_buf[wsize] = 0;
+ 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';
@@ -292,7 +290,7 @@ Simplify formatting now that we are ther
if (!ep)
leave = 0;
else
-@@ -619,7 +595,7 @@ gulp (wchar_t *cp, wchar_t **ep)
+@@ -623,7 +599,7 @@ gulp (wchar_t *cp, wchar_t **ep)
read_buf (leave);
if (ep)
*ep = wide_buf;
@@ -301,7 +299,7 @@ Simplify formatting now that we are ther
}
static void
-@@ -627,12 +603,10 @@ kbsay ()
+@@ -631,12 +607,10 @@ kbsay ()
{
if (!ui.kbsay)
return;
@@ -315,7 +313,7 @@ Simplify formatting now that we are ther
/*tts_say(_("back")); */
return;
-@@ -644,10 +618,8 @@ kbsay ()
+@@ -648,10 +622,8 @@ kbsay ()
}
/* ui.kbsay == 2 -- handle word echo */
@@ -327,7 +325,7 @@ Simplify formatting now that we are ther
}
#define MIN(a, b) ((a)>(b)? (b): (a))
-@@ -656,9 +628,7 @@ strwtol (wchar_t **p)
+@@ -660,9 +632,7 @@ strwtol (wchar_t **p)
{
long t = 0;
while (iswdigit (**p))
@@ -337,12 +335,12 @@ Simplify formatting now that we are ther
return t;
}
-@@ -671,24 +641,33 @@ win_csi (wchar_t **pp)
+@@ -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))
@@ -351,10 +349,10 @@ Simplify formatting now that we are ther
+ }
+
p = *pp;
-+
++
if (*p == '[')
p++;
-+
++
+ if (!*p && !(p = gulp (pp)))
+ return;
if (*p == '?')
@@ -365,9 +363,10 @@ Simplify formatting now that we are ther
{
- if (!(p = gulp (p, pp)))
- {
-+ if (!(p = gulp (pp)))
- return;
+- return;
- }
++ if (!(p = gulp (pp)))
++ return;
}
else
- {
@@ -376,7 +375,7 @@ Simplify formatting now that we are ther
}
p = *pp;
if (*p == '[')
-@@ -697,9 +676,7 @@ win_csi (wchar_t **pp)
+@@ -701,9 +680,7 @@ win_csi (wchar_t **pp)
p++;
}
if (*p == '?')
@@ -386,21 +385,23 @@ Simplify formatting now that we are ther
(void) memset (&parm, 0, sizeof (int) * 16);
while (numparms < 16 && (*p == ';' || iswdigit ((int) *p)))
{
-@@ -709,12 +686,10 @@ win_csi (wchar_t **pp)
+@@ -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 */
-@@ -727,9 +702,7 @@ win_csi (wchar_t **pp)
+@@ -734,9 +707,7 @@ win_csi (wchar_t **pp)
case 'A': /* move up */
win->cr -= PARM1;
if (win->cr < 0)
@@ -410,32 +411,35 @@ Simplify formatting now that we are ther
break;
case 'B': /* move down */
-@@ -780,24 +753,18 @@ win_csi (wchar_t **pp)
+@@ -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);
- }
++ (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);
- }
++ (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);
- }
++ (void) memset (win->row[i], 0, win->cols * CHARSIZE);
break;
}
break;
-@@ -823,29 +790,19 @@ win_csi (wchar_t **pp)
+@@ -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--)
@@ -465,7 +469,7 @@ Simplify formatting now that we are ther
break;
case 'P': /* delete characters */
-@@ -858,16 +815,12 @@ win_csi (wchar_t **pp)
+@@ -865,16 +820,12 @@ win_csi (wchar_t **pp)
case 'S': /* Scroll up */
for (i = 0; i < PARM1; i++)
@@ -482,17 +486,18 @@ Simplify formatting now that we are ther
break;
case 'X': /* Erase characters */
-@@ -884,9 +837,7 @@ win_csi (wchar_t **pp)
+@@ -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;
- }
++ win->tab[i] = 0;
break;
case 0:
-@@ -956,13 +907,9 @@ win_csi (wchar_t **pp)
+@@ -963,13 +912,9 @@ win_csi (wchar_t **pp)
}
if (win->cr >= win->rows)
@@ -506,7 +511,16 @@ Simplify formatting now that we are ther
if (win->cc >= win->cols - 1)
win->cc = win->cols - 1;
else if (win->cc < 0)
-@@ -979,20 +926,14 @@ win_addchr (wchar_t ch, int tflag)
+@@ -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)
@@ -527,7 +541,7 @@ Simplify formatting now that we are ther
}
wchar_t
-@@ -1012,12 +953,8 @@ bol (int cr, int cc)
+@@ -1041,12 +980,8 @@ bol (int cr, int cc)
rptr = win->row[cr];
for (i = 0; i < cc; i++)
@@ -540,7 +554,7 @@ Simplify formatting now that we are ther
return (1);
}
-@@ -1032,12 +969,8 @@ eol (int cr, int cc)
+@@ -1061,12 +996,8 @@ eol (int cr, int cc)
rptr = win->row[cr];
for (i = cc + 1; i < win->cols; i++)
@@ -553,7 +567,7 @@ Simplify formatting now that we are ther
return (1);
}
-@@ -1053,16 +986,10 @@ firstword (int cr, int cc)
+@@ -1082,16 +1013,10 @@ firstword (int cr, int cc)
rptr = win->row[cr];
i = cc;
while (i && !y_isblank (rptr[i].wchar))
@@ -570,7 +584,7 @@ Simplify formatting now that we are ther
return (1);
}
-@@ -1077,20 +1004,12 @@ lastword (int cr, int cc)
+@@ -1106,20 +1031,12 @@ lastword (int cr, int cc)
rptr = win->row[cr];
if (y_isblank (rptr[i].wchar))
@@ -591,7 +605,7 @@ Simplify formatting now that we are ther
return (1);
}
-@@ -1105,14 +1024,13 @@ getoutput ()
+@@ -1143,14 +1060,13 @@ getoutput ()
static int stathit = 0, oldoflag = 0;
read_buf (0);
@@ -599,8 +613,7 @@ Simplify formatting now that we are ther
#ifdef TERMTEST
(void) printf ("size=%d buf=%s\n", size, buf);
#endif
--
-+
+
if (!size)
- {
finish (0);
@@ -608,73 +621,145 @@ Simplify formatting now that we are ther
p = wide_buf;
while (p - wide_buf < wsize)
-@@ -1126,6 +1044,7 @@ getoutput ()
+@@ -1163,37 +1079,33 @@ getoutput ()
+
case 8:
if (win->cc)
- win->cc--;
-+
+- win->cc--;
++ win->cc--;
else if (win->carry && win->cr)
{
- win->cr--;
-@@ -1138,9 +1057,7 @@ getoutput ()
- ui_saychar (win->cr, win->cc);
+- 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--;
- }
++ tts.outlen--;
break;
case 9:
-@@ -1153,9 +1070,7 @@ getoutput ()
- }
+ 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;
- }
++ win->cc = i - 1;
break;
case 10:
-@@ -1173,15 +1088,13 @@ getoutput ()
+@@ -1211,36 +1123,34 @@ getoutput ()
break; /* may need to change in the future */
case 27:
- if (!*p && !(p = gulp (p, NULL)))
- {
-+ if (!*p && !(p = gulp (NULL)))
- return;
+- return;
- }
++ if (!*p && !(p = gulp (NULL)))
++ return;
switch (*p++)
{
case 'D':
- win_lf ();
+- win_lf ();
- break;
++ win_lf ();
+ break;
case 'E':
- break; /* FIXME -- new line */
+- break; /* FIXME -- new line */
++ break; /* FIXME -- new line */
case 'H':
-@@ -1212,13 +1125,9 @@ getoutput ()
+- 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 == '<')
+- if (ch == '<')
- {
- speaking = 0; /* hack for medievia.com */
+- speaking = 0; /* hack for medievia.com */
- }
- else if (ch == '>')
+- else if (ch == '>')
- {
- speaking = 1;
+- 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)
-@@ -1229,19 +1138,13 @@ getoutput ()
- (void) memmove (kbuf, kbuf + 1, (--kbuflen) * sizeof (int));
+ {
+ /* 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 && (!special || !win->cr));
+- 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'))
@@ -688,7 +773,7 @@ Simplify formatting now that we are ther
if ((!win->cc && win->cr > win->rows - 3) || win->cr == win->rows - 1)
{
stathit = win->cr;
-@@ -1253,10 +1156,17 @@ getoutput ()
+@@ -1294,10 +1194,17 @@ getoutput ()
tts.oflag = oldoflag;
}
}
@@ -708,7 +793,7 @@ Simplify formatting now that we are ther
if (size > 1)
{
if (!readable (master, 0))
-@@ -1265,9 +1175,7 @@ getoutput ()
+@@ -1306,9 +1213,7 @@ getoutput ()
return;
}
else if (ch == 32 || ch == 13)
@@ -718,22 +803,24 @@ Simplify formatting now that we are ther
if (tts.oflag || kbuf[0] == 13 || kbuf[0] == 3 || ui.silent)
{
tts.oflag = stathit = 0;
-@@ -1288,25 +1196,18 @@ getoutput ()
+@@ -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)))
- {
-+ ((y_isblank (oldch) && kbuf[0] == 32)))
- break;
+- break;
- }
- if (kbuf[0] == 0x1b5b43 ||
- ((ui.curtrack == 2) && (ui.kbsay != 2 || is_separator (kbuf[0]))))
- {
-+ if (ui.curtrack == 2 && (ui.kbsay != 2 || is_separator (kbuf[0])))
- ui_saychar (win->cr, win->cc);
+- 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;
@@ -747,7 +834,7 @@ Simplify formatting now that we are ther
break;
default:
-@@ -1315,18 +1216,11 @@ getoutput ()
+@@ -1356,18 +1254,11 @@ getoutput ()
if (eol (win->cr, win->cc))
ui_saychar (win->cr, win->cc);
else
@@ -766,52 +853,68 @@ Simplify formatting now that we are ther
else
{
switch (win->cr - oldcr)
-@@ -1337,24 +1231,18 @@ getoutput ()
+@@ -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;
++ ui_saychar (win->cr, win->cc);
++ break;
}
if (ui.curtrack < 2)
- {
- break;
+- break;
- }
++ break;
if (win->cc && bol (win->cr, win->cc) && lastword (oldcr, oldcc)
- && oldcc)
+- && oldcc)
- {
- ui_sayword (win->cr, win->cc);
+- ui_sayword (win->cr, win->cc);
- }
++ && oldcc)
++ ui_sayword (win->cr, win->cc);
else
- {
- ui_sayline (win->cr, 1);
+- ui_sayline (win->cr, 1);
- }
++ ui_sayline (win->cr, 1);
break;
case -1: /* cursor moved up a line */
if (kbuf[0] == 0x1b5b41)
-@@ -1364,17 +1252,13 @@ getoutput ()
+ {
+- ui_sayline (win->cr, 1);
+- break;
++ ui_sayline (win->cr, 1);
++ break;
}
if (ui.curtrack < 2)
- break;
+- break;
- if (win->cc == win->cols - 1 && (oldcr == 0 || kbuf[0] == 0x1b5b44))
- {
-+ if (win->cc == win->cols - 1 && oldcr == 0)
- ui_saychar (win->cr, win->cc);
+- 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);
- }
++ ui_sayword (win->cr, win->cc);
else
- ui_sayline (win->cr, 1);
+- ui_sayline (win->cr, 1);
++ ui_sayline (win->cr, 1);
break;
-@@ -1429,18 +1313,14 @@ parent ()
+ }
+ }
+@@ -1470,18 +1351,14 @@ parent (void *arg)
}
}
if (FD_ISSET (0, &rf))
@@ -829,9 +932,9 @@ Simplify formatting now that we are ther
get_tts_input ();
- }
}
+ return NULL;
}
-
-@@ -1470,25 +1350,12 @@ main (int argc, char *argv[])
+@@ -1512,25 +1389,12 @@ main (int argc, char *argv[])
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
textdomain (GETTEXT_PACKAGE);
strcpy (charmap, nl_langinfo (CODESET));
@@ -857,7 +960,7 @@ Simplify formatting now that we are ther
if (!winsz.ws_row)
{
winsz.ws_row = 25;
-@@ -1529,9 +1396,7 @@ main (int argc, char *argv[])
+@@ -1571,9 +1435,7 @@ main (int argc, char *argv[])
}
}
if (argv[optind])
@@ -867,7 +970,7 @@ Simplify formatting now that we are ther
readconf ();
#if 0 /* this doesn't work */
-@@ -1539,9 +1404,7 @@ main (int argc, char *argv[])
+@@ -1581,9 +1443,7 @@ main (int argc, char *argv[])
{
cp = usershell + strlen (usershell) - 1;
while (*cp && *cp != '/')
@@ -877,28 +980,35 @@ Simplify formatting now that we are ther
cp++;
argv[0] = cp;
(void) execv (usershell, argv);
-@@ -1620,9 +1483,7 @@ w_speak (wchar_t *ibuf, int len)
+@@ -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);
- }
++ tts_out_w (wstart, olen);
olen = 0;
while (i < len1 && ibuf[i + 1] == lc)
{
-@@ -1641,22 +1502,16 @@ w_speak (wchar_t *ibuf, int len)
- wstart = ibuf + i;
+@@ -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;
- }
++ nc = 0;
if (!iswalnum (ibuf[i]) &&
ibuf[i] != 32 && ibuf[i] != '=' && ibuf[i] >= 0)
- {
- lc = ibuf[i];
+- lc = ibuf[i];
- }
++ lc = ibuf[i];
else
lc = 0;
}
@@ -910,32 +1020,48 @@ Simplify formatting now that we are ther
}
#if 0
-@@ -1678,9 +1533,7 @@ speak (char *ibuf, int len)
+@@ -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);
- }
++ tts_out ((unsigned char *) obuf, olen);
olen = 0;
while (i < len1 && ibuf[i + 1] == lc)
{
-@@ -1697,14 +1550,10 @@ speak (char *ibuf, int len)
+- 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;
- }
++ 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];
- }
++ lc = ibuf[i];
else
- lc = 0;
+- lc = 0;
++ lc = 0;
if (olen > 250 && !nc)
-@@ -1715,8 +1564,6 @@ speak (char *ibuf, int len)
+ {
+- tts_out ((unsigned char *) obuf, olen);
+- olen = 0;
++ tts_out ((unsigned char *) obuf, olen);
++ olen = 0;
+ }
}
}
if (olen)
Index: pkgsrc/audio/yasr/patches/patch-yasr_tts.c
diff -u pkgsrc/audio/yasr/patches/patch-yasr_tts.c:1.1 pkgsrc/audio/yasr/patches/patch-yasr_tts.c:1.2
--- pkgsrc/audio/yasr/patches/patch-yasr_tts.c:1.1 Mon Mar 11 07:52:38 2024
+++ pkgsrc/audio/yasr/patches/patch-yasr_tts.c Sat Nov 28 21:04:18 2026
@@ -1,12 +1,12 @@
-$NetBSD: patch-yasr_tts.c,v 1.1 2024/03/11 07:52:38 wiz Exp $
+$NetBSD: patch-yasr_tts.c,v 1.2 2026/11/28 21:04:18 wiz Exp $
Remove non-portable use of WCHAR_T in iconv code.
Fix comment's alignment.
---- yasr/tts.c.orig 2023-04-08 21:22:57.000000000 +0000
+--- yasr/tts.c.orig 2026-08-05 17:05:38.000000000 +0000
+++ yasr/tts.c
-@@ -53,7 +53,8 @@ static Tts_synth synth[] = {
- {NULL, NULL, "CANCEL SELF\r\n", NULL, NULL, FALSE, "", "quit\r\n"},
+@@ -55,7 +55,8 @@ static Tts_synth synth[] = {
+ {NULL, NULL, NULL, NULL, NULL, FALSE, NULL, NULL},
};
-static char *dict[256];
@@ -15,7 +15,7 @@ Fix comment's alignment.
static int tts_flushed = 0;
-@@ -67,9 +68,7 @@ dict_read (char *buf)
+@@ -69,9 +70,7 @@ dict_read (char *buf)
{
c = strtol (buf, &p, 0);
if (c > 255)
@@ -25,7 +25,7 @@ Fix comment's alignment.
p++;
}
else
-@@ -88,20 +87,14 @@ dict_write (FILE * fp)
+@@ -90,20 +89,14 @@ dict_write (FILE * fp)
{
int i;
@@ -36,18 +36,20 @@ Fix comment's alignment.
{
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]);
- }
++ (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]);
- }
++ (void) fprintf (fp, "0x%.2x=%s\n", i, dict[i]);
}
- }
}
-@@ -111,9 +104,7 @@ void
+@@ -113,9 +106,7 @@ tts_flush ()
tts_flush ()
{
if (tts.outlen)
@@ -57,7 +59,7 @@ Fix comment's alignment.
tts.outlen = 0;
-@@ -128,9 +119,7 @@ tts_wait (int usecs)
+@@ -130,9 +121,7 @@ tts_wait (int usecs)
if (usecs != -1 && !readable (tts.fd, usecs))
return;
while (readable (tts.fd, 0))
@@ -67,7 +69,7 @@ Fix comment's alignment.
}
#endif
-@@ -140,9 +129,7 @@ tts_silence ()
+@@ -142,9 +131,7 @@ tts_silence ()
char tmp[1] = { 0 };
if (tts_flushed)
@@ -77,7 +79,7 @@ Fix comment's alignment.
tts.obufhead = tts.obuftail = tts.flood = 0;
#ifdef ENABLE_SPEECHD
if (tts.synth == TTS_SPEECHD)
-@@ -200,17 +187,13 @@ tts_obufout (int x)
+@@ -209,17 +196,13 @@ tts_obufout (int x)
int oldoflag;
if (!tts.flood)
@@ -95,7 +97,7 @@ Fix comment's alignment.
len2 = write (tts.fd, tts.obuf + tts.obufhead, len);
#ifdef TTSLOG
(void) write (ofd, tts.obuf + tts.obufhead, len2);
-@@ -225,9 +208,7 @@ tts_obufout (int x)
+@@ -234,9 +217,7 @@ tts_obufout (int x)
return;
}
while (tts.obufhead < tts.obuftail && !tts.obuf[tts.obufhead])
@@ -105,7 +107,7 @@ Fix comment's alignment.
}
tts.flood = 0;
tts.oflag = oldoflag;
-@@ -242,9 +223,7 @@ tts_addbuf (char *buf, int len, int len2
+@@ -251,9 +232,7 @@ tts_addbuf (char *buf, int len, int len2)
tts.flood = 1;
if (len2 == -1)
@@ -115,7 +117,7 @@ Fix comment's alignment.
else
{
ptr = buf + len2;
-@@ -258,9 +237,7 @@ tts_addbuf (char *buf, int len, int len2
+@@ -267,9 +246,7 @@ tts_addbuf (char *buf, int len, int len2)
tts.obuf = realloc (tts.obuf, tts.obuflen);
}
else
@@ -125,7 +127,7 @@ Fix comment's alignment.
}
(void) memcpy (tts.obuf + tts.obuftail, ptr, len);
tts.obuftail += len;
-@@ -276,13 +253,9 @@ tts_send (char *buf, int len)
+@@ -285,13 +262,9 @@ tts_send (char *buf, int len)
int len2;
if (!len)
@@ -139,7 +141,7 @@ Fix comment's alignment.
#ifndef SILENT
if (!tts.flood)
{
-@@ -293,9 +266,7 @@ tts_send (char *buf, int len)
+@@ -302,9 +275,7 @@ tts_send (char *buf, int len)
#endif
if (len2 < len)
@@ -149,7 +151,7 @@ Fix comment's alignment.
}
else
tts_addbuf (buf, len, 0);
-@@ -315,10 +286,8 @@ unspeakable (unsigned char ch)
+@@ -327,10 +298,8 @@ unspeakable (unsigned char ch)
if (ch < 32)
return 1;
while (*p)
@@ -160,35 +162,148 @@ Fix comment's alignment.
return (0);
}
-@@ -412,7 +381,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)
-@@ -420,9 +388,7 @@ tts_out_w (wchar_t *buf, int len)
+@@ -438,26 +407,24 @@ tts_out_w (wchar_t *buf, int len)
while (len > 0)
{
if (*buf < 0x80)
- {
- obuf[obo++] = *buf;
+- obuf[obo++] = *buf;
- }
++ obuf[obo++] = *buf;
else if (*buf < 0x800)
{
- obuf[obo++] = 0xc0 | (*buf >> 6);
-@@ -514,9 +480,7 @@ tts_out_w (wchar_t *buf, int len)
+- obuf[obo++] = 0xc0 | (*buf >> 6);
+- obuf[obo++] = 0x80 | (*buf & 0x3f);
++ obuf[obo++] = 0xc0 | (*buf >> 6);
++ obuf[obo++] = 0x80 | (*buf & 0x3f);
}
- }
- else
-- {
- obuf[obo++] = *p;
-- }
- p++;
- }
- tts_send (obuf, obo);
-@@ -619,9 +583,7 @@ tts_out (unsigned char *buf, int len)
+ 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
@@ -198,17 +313,17 @@ Fix comment's alignment.
p++;
}
tts_send (obuf, obo);
-@@ -656,9 +618,7 @@ tts_saychar (wchar_t ch)
- char buf[8];
+@@ -678,9 +643,7 @@ tts_saychar (wchar_t ch)
+ #endif
if (!ch)
- {
ch = 32;
- }
- if (tts.synth == TTS_SPEECHD)
+ if (tts.synth == TTS_SPEECHD || tts.synth == TTS_MAC)
{
- #ifdef ENABLE_SPEECHD
-@@ -674,21 +634,22 @@ tts_saychar (wchar_t ch)
+ #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)
@@ -224,21 +339,22 @@ Fix comment's alignment.
- cd = iconv_open ("UTF-8", "WCHAR_T");
+ cd = iconv_open ("UTF-8", nl_langinfo (CODESET));
if (cd == (iconv_t) - 1)
- return;
+- return;
- l1 = sizeof (wchar_t);
- l2 = 7;
- cin = (char *) &ch;
++ return;
+ l1 = wctomb (tmpbuf, ch);
+ if (l1 == -1)
-+ return;
++ return;
+ l2 = sizeof (buf) - 1;
+ cin = tmpbuf;
cout = buf;
-+
++
iconv (cd, &cin, &l1, &cout, &l2);
iconv_close (cd);
*cout = 0;
-@@ -704,7 +665,8 @@ tts_saychar (wchar_t ch)
+@@ -730,7 +694,8 @@ tts_saychar (wchar_t ch)
return;
}
if (!synth[tts.synth].charoff)
@@ -248,7 +364,7 @@ Fix comment's alignment.
(void) sprintf (ttsbuf, synth[tts.synth].charon, ch);
tts_send (ttsbuf, strlen (ttsbuf));
return;
-@@ -725,9 +687,7 @@ tts_saychar (wchar_t ch)
+@@ -751,9 +716,7 @@ tts_saychar (wchar_t ch)
ttsbuf[0] = ch;
tts_send (ttsbuf, 1);
if (synth[tts.synth].saychar_needs_flush)
@@ -258,7 +374,7 @@ Fix comment's alignment.
while (j)
{
j -= 2;
-@@ -887,9 +847,7 @@ tts_init (int first_call)
+@@ -913,9 +876,7 @@ tts_init (int first_call)
#ifdef TTSLOG
ofd = open ("tts.log", O_WRONLY | O_CREAT);
if (ofd == -1)
@@ -268,7 +384,7 @@ Fix comment's alignment.
#endif
#ifdef ENABLE_SPEECHD
-@@ -920,17 +878,11 @@ tts_init (int first_call)
+@@ -954,17 +915,11 @@ tts_init (int first_call)
else if (tts.port[0] != '|')
{
if (tts.synth == TTS_DECTALK)
@@ -286,29 +402,32 @@ Fix comment's alignment.
if (tts.fd == -1)
{
perror ("tts");
-@@ -958,21 +910,15 @@ tts_init (int first_call)
+@@ -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;
- }
- }
++ break;
if (first_call)
- {
if (openpty (&tts.fd, &tts.fd_slave, NULL, NULL, NULL) == -1)
{
- perror ("openpty");
- exit (1);
+- perror ("openpty");
+- exit (1);
++ perror ("openpty");
++ exit (1);
}
- }
if (!(tts.pid = fork ()))
{
-@@ -989,9 +935,7 @@ tts_init (int first_call)
+@@ -1023,9 +972,7 @@ tts_init (int first_call)
}
(void) usleep (10000);
if (tts.pid == -1)
@@ -318,7 +437,7 @@ Fix comment's alignment.
}
if (tts.synth == TTS_SPEECHD)
{
-@@ -1043,10 +987,8 @@ void
+@@ -1077,10 +1024,8 @@ tts_addchr (wchar_t ch)
tts_addchr (wchar_t ch)
{
tts.buf[tts.outlen++] = ch;
@@ -330,7 +449,7 @@ Fix comment's alignment.
}
-@@ -1065,9 +1007,7 @@ tts_initsynth (int *argp)
+@@ -1099,9 +1044,7 @@ tts_initsynth (int *argp)
}
}
if (!ui.silent)
@@ -340,7 +459,7 @@ Fix comment's alignment.
}
-@@ -1078,9 +1018,7 @@ tts_reinit (int *argp)
+@@ -1112,9 +1055,7 @@ tts_reinit (int *argp)
int pid = tts.pid;
if (pid == 0)
@@ -350,7 +469,7 @@ Fix comment's alignment.
tts.reinit = 1; /* Start reinit */
-@@ -1090,20 +1028,14 @@ tts_reinit (int *argp)
+@@ -1124,20 +1065,14 @@ tts_reinit (int *argp)
if (kill (pid, SIGTERM) != 0)
{
if (errno == ESRCH)
Index: pkgsrc/audio/yasr/patches/patch-yasr_yasr.h
diff -u pkgsrc/audio/yasr/patches/patch-yasr_yasr.h:1.1 pkgsrc/audio/yasr/patches/patch-yasr_yasr.h:1.2
--- pkgsrc/audio/yasr/patches/patch-yasr_yasr.h:1.1 Mon Mar 11 07:52:38 2024
+++ pkgsrc/audio/yasr/patches/patch-yasr_yasr.h Sat Nov 28 21:04:18 2026
@@ -1,18 +1,18 @@
-$NetBSD: patch-yasr_yasr.h,v 1.1 2024/03/11 07:52:38 wiz Exp $
+$NetBSD: patch-yasr_yasr.h,v 1.2 2026/11/28 21:04:18 wiz Exp $
Remove size of array declarations defined elsewhere
---- yasr/yasr.h.orig 2023-04-08 21:22:57.000000000 +0000
+--- yasr/yasr.h.orig 2026-08-05 17:05:38.000000000 +0000
+++ yasr/yasr.h
-@@ -128,6 +128,7 @@ enum mpunct
+@@ -127,6 +127,7 @@ enum mpunct
+ };
#define OPT_STR_SIZE 256
-
+#define TTS_BUF_SIZE 256
+
typedef struct Tts Tts;
struct Tts
- {
-@@ -140,7 +141,7 @@ 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;
@@ -21,7 +21,7 @@ Remove size of array declarations define
int synth;
pid_t pid;
char port[OPT_STR_SIZE];
-@@ -304,11 +305,11 @@ extern int cl_synthport;
+@@ -313,11 +314,11 @@ extern char *conffile;
extern Opt opt[];
extern int synthopt;
extern char *conffile;
@@ -35,5 +35,5 @@ Remove size of array declarations define
+extern char usershell[];
+extern char ttsbuf[];
extern Voices voices;
- extern int special;
+ extern int sw_top, sw_left, sw_bottom, sw_right;
extern char charmap[];
Home |
Main Index |
Thread Index |
Old Index