From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: Capitalize a parameter containing combined characters
Date: Sat, 26 Apr 2008 19:13:00 +0100 [thread overview]
Message-ID: <200804261813.m3QID0TP022098@pws-pc.ntlworld.com> (raw)
In-Reply-To: Message from "Jun T." <takimoto-j@kba.biglobe.ne.jp> of "Sun, 27 Apr 2008 02:39:38 +0900." <4CB683B0-AA0B-45C1-BC88-29DF5ADFD5F4@kba.biglobe.ne.jp>
"Jun T." wrote:
> I did some quick tests of parameter expansion with combined characters,
> and found a small bug:
> --- Src/hist.c 17 Apr 2008 10:23:53 -0000 1.75
> +++ Src/hist.c 26 Apr 2008 16:53:56 -0000
> @@ -1567,6 +1567,8 @@
>
> case CASMOD_CAPS:
> default: /* shuts up compiler */
> + if (IS_COMBINING(wc))
> + break;
> if (!iswalnum(wc))
> nextupper = 1;
> else if (nextupper) {
>
IS_COMBINING() is only defined in the multibyte world, so it needs to
be as follows.
Index: Src/hist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/hist.c,v
retrieving revision 1.75
diff -u -r1.75 hist.c
--- Src/hist.c 17 Apr 2008 10:23:53 -0000 1.75
+++ Src/hist.c 26 Apr 2008 18:12:45 -0000
@@ -1567,6 +1567,10 @@
case CASMOD_CAPS:
default: /* shuts up compiler */
+#ifdef MULTIBYTE_SUPPORT
+ if (IS_COMBINING(wc))
+ break;
+#endif
if (!iswalnum(wc))
nextupper = 1;
else if (nextupper) {
--
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
next prev parent reply other threads:[~2008-04-26 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <takimoto-j@kba.biglobe.ne.jp>
2008-04-26 17:39 ` Jun T.
2008-04-26 18:13 ` Peter Stephenson [this message]
2008-04-26 19:41 ` Jun T.
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=200804261813.m3QID0TP022098@pws-pc.ntlworld.com \
--to=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@sunsite.dk \
/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).