From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: [PATCH] add STOUC() to casemodify() without MULTIBYTE_SUPPORT
Date: Mon, 18 Apr 2022 16:54:39 +0900 [thread overview]
Message-ID: <F36A61C8-8BBE-48DD-8473-7A75DE30F055@kba.biglobe.ne.jp> (raw)
On NetBSD, with --disable-multibyte, D01prompt.zsh fails as follows:
@@ -1 +1 @@
-
+V
Test ./D01prompt.ztst failed: output differs from expected as shown above for:
print ${(%U)Y-%(v}
Was testing: Regression test for test on empty psvar
We need to add STOUC() in casemodify():
diff --git a/Src/hist.c b/Src/hist.c
index f9440dba7..bff0abe61 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -2254,10 +2254,10 @@ casemodify(char *str, int how)
int c;
int mod = 0;
if (*str == Meta) {
- c = str[1] ^ 32;
+ c = STOUC(str[1] ^ 32);
str += 2;
} else
- c = *str++;
+ c = STOUC(*str++);
switch (how) {
case CASMOD_LOWER:
if (isupper(c)) {
reply other threads:[~2022-04-18 7:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=F36A61C8-8BBE-48DD-8473-7A75DE30F055@kba.biglobe.ne.jp \
--to=takimoto-j@kba.biglobe.ne.jp \
--cc=zsh-workers@zsh.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).