From: Jiri Slaby <jirislaby@kernel.org>
To: Nicolas Pitre <nico@fluxnic.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nicolas Pitre <npitre@baylibre.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/8] vt: process the full-width ASCII fallback range programmatically
Date: Tue, 6 May 2025 07:55:59 +0200 [thread overview]
Message-ID: <58ee071e-b2d9-4e1a-b150-c2be59827676@kernel.org> (raw)
In-Reply-To: <20250505170021.29944-9-nico@fluxnic.net>
On 05. 05. 25, 18:55, Nicolas Pitre wrote:
> From: Nicolas Pitre <npitre@baylibre.com>
>
> This saves about 258 bytes of text.
You mean .rodata, actually?
> --- a/drivers/tty/vt/ucs.c
> +++ b/drivers/tty/vt/ucs.c
> @@ -222,5 +222,13 @@ u32 ucs_get_fallback(u32 cp)
> if (single)
> return ucs_fallback_singles_subs[single - ucs_fallback_singles];
>
> + /*
> + * Full-width to ASCII mapping (covering all printable ASCII 33-126)
> + * 0xFF01 (!) to 0xFF5E (~) -> ASCII 33 (!) to 126 (~)
> + * We process them programmatically to reduce the table size.
> + */
> + if (cp >= 0xFF01 && cp <= 0xFF5E)
> + return cp - 0xFF01 + 33;
So do really »+ '!'« instead of »+ 33«.
thanks,
--
js
suse labs
next prev parent reply other threads:[~2025-05-06 5:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 16:55 [PATCH 0/8] vt: more Unicode handling changes Nicolas Pitre
2025-05-05 16:55 ` [PATCH 1/8] vt: ucs.c: fix misappropriate in_range() usage Nicolas Pitre
2025-05-06 5:58 ` Jiri Slaby
2025-05-05 16:55 ` [PATCH 2/8] vt: make sure displayed double-width characters are remembered as such Nicolas Pitre
2025-05-05 16:55 ` [PATCH 3/8] vt: move glyph determination to a separate function Nicolas Pitre
2025-05-06 6:06 ` Jiri Slaby
2025-05-05 16:55 ` [PATCH 4/8] vt: introduce gen_ucs_fallback_table.py to create ucs_fallback_table.h Nicolas Pitre
2025-05-06 6:33 ` Jiri Slaby
2025-05-07 14:11 ` Nicolas Pitre
2025-05-05 16:55 ` [PATCH 5/8] vt: create ucs_fallback_table.h_shipped with gen_ucs_fallback_table.py Nicolas Pitre
2025-05-05 16:55 ` [PATCH 6/8] vt: add ucs_get_fallback() Nicolas Pitre
2025-05-05 16:55 ` [PATCH 7/8] vt: make use of ucs_get_fallback() when glyph is unavailable Nicolas Pitre
2025-05-05 16:55 ` [PATCH 8/8] vt: process the full-width ASCII fallback range programmatically Nicolas Pitre
2025-05-06 5:55 ` Jiri Slaby [this message]
2025-05-07 14:04 ` Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58ee071e-b2d9-4e1a-b150-c2be59827676@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nico@fluxnic.net \
--cc=npitre@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®