summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-04-09 21:55:10 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-04-09 21:55:10 +0000
commit3f7d4db1e5b4b8e800ff633933f12c27fe1f1a94 (patch)
tree25bc7c27ff9666d33322a81227486fe902577796
parentef330a5dfddc763b83fe2406a91c61519279de68 (diff)
downloadzsh-3f7d4db1e5b4b8e800ff633933f12c27fe1f1a94.tar.gz
zsh-3f7d4db1e5b4b8e800ff633933f12c27fe1f1a94.tar.xz
zsh-3f7d4db1e5b4b8e800ff633933f12c27fe1f1a94.zip
22409: fix --disable-multibyte patterns
-rw-r--r--ChangeLog2
-rw-r--r--Src/pattern.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e0f7db06..daf8d19bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2006-04-09  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* 22409: Src/pattern.c: fix compilation with --disable-multibyte.
+
 	* 22408: Doc/Zsh/expn.yo, Doc/Zsh/options.yo, Src/options.c,
 	Src/pattern.c, Src/utils.c, Src/zsh.h, Src/Zle/zle.h: add
 	MULTIBYTE option, (#u) and (#U) globbing flags, and support
diff --git a/Src/pattern.c b/Src/pattern.c
index c26ee9573..8f8b25610 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -1043,11 +1043,7 @@ patcomppiece(int *flagp)
     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 @@ patmatchlen(void)
 #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 @@ patmatch(Upat prog)
 		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