zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: PATCH: multibyte characters in patterns.
Date: Sun, 09 Apr 2006 22:53:03 +0100	[thread overview]
Message-ID: <200604092153.k39Lr3UW032469@pwslaptop.csr.com> (raw)

Peter Stephenson wrote:
> It's very likely the result is still typographically challenged.

This fixes compilation with --disable-multibyte.

Index: Src/pattern.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/pattern.c,v
retrieving revision 1.30
diff -u -r1.30 pattern.c
--- Src/pattern.c	9 Apr 2006 21:47:22 -0000	1.30
+++ Src/pattern.c	9 Apr 2006 21:52:13 -0000
@@ -1043,11 +1043,7 @@
     union upat up;
     char *nptr, *str0, *ptr, *patprev;
     zrange_t from, to;
-#ifdef MULTIBYTE_SUPPORT
     char *charstart;
-#else
-    char cbuf[2];
-#endif
 
     flags = 0;
     str0 = patprev = patparse;
@@ -2133,7 +2129,7 @@
 #else
 #define ISUPPER(x)	isupper(x)
 #define ISLOWER(x)	islower(x)
-#define TOUPPER(x)	toupperr(x)
+#define TOUPPER(x)	toupper(x)
 #define TOLOWER(x)	tolower(x)
 #define ISDIGIT(x)	idigit(x)
 #endif
@@ -2722,7 +2718,10 @@
 		if (P_OP(next) == P_EXACTLY && P_LS_LEN(next) &&
 		    !(patglobflags & 0xff)) {
 		    char *nextop = P_LS_STR(next);
+#ifdef MULTIBYTE_SUPPORT
+		    /* else second argument of CHARREF isn't used */
 		    int nextlen = P_LS_LEN(next);
+#endif
 		    /*
 		     * If that P_EXACTLY is last (common in simple patterns,
 		     * such as *.c), then it can be only be matched at one

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page still at http://www.pwstephenson.fsnet.co.uk/


             reply	other threads:[~2006-04-09 21:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-09 21:53 Peter Stephenson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-04-10 16:00 Peter Stephenson
2006-04-10 15:40 Vincent Lefevre
2006-04-09 21:38 Peter Stephenson
2006-05-31  1:16 ` Wayne Davison
2006-05-31  9:25   ` Peter Stephenson

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=200604092153.k39Lr3UW032469@pwslaptop.csr.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).