Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Oct 2023 11:52:53 -0400
From:      Oleg Lelchuk <oleglelchuk@gmail.com>
To:        garyj@gmx.de
Cc:        current@freebsd.org
Subject:   Re: 'teken_utf8_bytes_to_codepoint' [-Wunused-function]
Message-ID:  <CA%2BGqWgvE0UycV=7k%2BizHDEzzbN0spSJPHk8aEvZcY0d=y6Goww@mail.gmail.com>
In-Reply-To: <20231008133431.274b9184@ernst.home>
References:  <20231008133431.274b9184@ernst.home>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000001453f3060736785d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I typed "stty iutf8" after updating to the latest world and kernel and the
backspace key still seems to erase only one byte when erasing Russian
letters. For example, I compile this program:

#include <iostream>
#include <string>

int main()
{
	std::cout << "Enter something: ";
	std::string sentence;
	std::getline(std::cin,sentence);
	std::cout << sentence << std::endl;
}

And when running the program, I type something using Russian letters,
use the backspace key to erase some letters, hit enter, and what I see
on the screen is some garbage. My LANG variable is set to C.UTF-8.


On Sun, Oct 8, 2023 at 10:00=E2=80=AFAM Gary Jennejohn <garyj@gmx.de> wrote=
:

> I just updated my current sources and did a buildworld and buildkernel.
>
> This warning was spit out, although it didn't result in buildkernel
> failing:
>
> In file included from /usr/src/sys/teken/teken.c:70:
> /usr/src/sys/teken/teken_wcwidth.h:128:1: warning: unused function
> 'teken_utf8_bytes_to_codepoint' [-Wunused-function]
> teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes)
> ^
> 1 warning generated.
>
> Just FYI.
>
> --
> Gary Jennejohn
>
>

--0000000000001453f3060736785d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I typed &quot;stty iutf8&quot; after=C2=A0updating to the =
latest world and kernel and the backspace key still seems to erase only one=
 byte when erasing Russian letters. For example, I compile this program:<di=
v><pre style=3D"color:rgb(0,0,0)">#include &lt;iostream&gt;
#include &lt;string&gt;

int main()
{
	std::cout &lt;&lt; &quot;Enter something: &quot;;
	std::string sentence;
	std::getline(std::cin,sentence);
	std::cout &lt;&lt; sentence &lt;&lt; std::endl;
}</pre><pre style=3D"color:rgb(0,0,0)">And when running the program, I type=
 something using Russian letters, use the backspace key to erase some lette=
rs, hit enter, and what I see on the screen is some garbage. My LANG variab=
le is set to C.UTF-8.</pre></div></div><br><div class=3D"gmail_quote"><div =
dir=3D"ltr" class=3D"gmail_attr">On Sun, Oct 8, 2023 at 10:00=E2=80=AFAM Ga=
ry Jennejohn &lt;<a href=3D"mailto:garyj@gmx.de">garyj@gmx.de</a>&gt; wrote=
:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I just updated=
 my current sources and did a buildworld and buildkernel.<br>
<br>
This warning was spit out, although it didn&#39;t result in buildkernel<br>
failing:<br>
<br>
In file included from /usr/src/sys/teken/teken.c:70:<br>
/usr/src/sys/teken/teken_wcwidth.h:128:1: warning: unused function<br>
&#39;teken_utf8_bytes_to_codepoint&#39; [-Wunused-function]<br>
teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes)<br>
^<br>
1 warning generated.<br>
<br>
Just FYI.<br>
<br>
--<br>
Gary Jennejohn<br>
<br>
</blockquote></div>

--0000000000001453f3060736785d--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BGqWgvE0UycV=7k%2BizHDEzzbN0spSJPHk8aEvZcY0d=y6Goww>