summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-09-23 20:25:05 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-09-23 20:25:05 +0000
commit8f982856626fb000ba722373566ec089208ff67c (patch)
tree4702377bb411ae1ed7cc48c48e2ae9d9ce45d4e9
parent71fa876defaafe49874b93fdff0c7c4a4e72c878 (diff)
downloadzsh-8f982856626fb000ba722373566ec089208ff67c.tar.gz
zsh-8f982856626fb000ba722373566ec089208ff67c.tar.xz
zsh-8f982856626fb000ba722373566ec089208ff67c.zip
22765: rename some MB_ macros to WC_ for consistency.
-rw-r--r--ChangeLog6
-rw-r--r--Src/Zle/zle_main.c4
-rw-r--r--Src/subst.c4
-rw-r--r--Src/utils.c8
-rw-r--r--Src/ztype.h8
5 files changed, 18 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d0d3bc10..3fc1aed9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-23  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 22765: Src/subst.c, Src/utils.c, Src/ztype.h,
+	Src/Zle/zle_main.c: rename some MB_ macros to WC_ since they
+	act on wchar_t's.
+
 2006-09-23  Andrey Borzenkov <bor@zsh.org>
 
 	* unposted: Test/A06assign.ztst, Test/B03print.ztst,
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 8c65d217f..7aa0948ad 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1457,7 +1457,7 @@ bin_vared(char *name, char **args, Options ops, UNUSED(int func))
 			sepcount++;
 		    } else {
 			t += MB_METACHARLENCONV(t, &c);
-			if (MB_ZISTYPE(c, ISEP))
+			if (WC_ZISTYPE(c, ISEP))
 			    sepcount++;
 		    }
 		}
@@ -1473,7 +1473,7 @@ bin_vared(char *name, char **args, Options ops, UNUSED(int func))
 			    *nptr++ = *t++;
 			} else {
 			    clen = MB_METACHARLENCONV(t, &c);
-			    if (MB_ZISTYPE(c, ISEP))
+			    if (WC_ZISTYPE(c, ISEP))
 				*nptr++ = '\\';
 			    while (clen--)
 				*nptr++ = *t++;
diff --git a/Src/subst.c b/Src/subst.c
index 865c16b1a..0f351df4c 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -360,7 +360,7 @@ multsub(char **s, int split, char ***a, int *isarr, char *sep)
 		l = 1;
 	    } else {
 		l = MB_METACHARLENCONV(x, &c);
-		if (!inq && !inp && MB_ZISTYPE(c, ISEP)) {
+		if (!inq && !inp && WC_ZISTYPE(c, ISEP)) {
 		    *x = '\0';
 		    for (x += l; *x; x += l) {
 			if (itok(STOUC(*x))) {
@@ -370,7 +370,7 @@ multsub(char **s, int split, char ***a, int *isarr, char *sep)
 			    break;
 			}
 			l = MB_METACHARLENCONV(x, &c);
-			if (!MB_ZISTYPE(c, ISEP))
+			if (!WC_ZISTYPE(c, ISEP))
 			    break;
 		    }
 		    if (!*x)
diff --git a/Src/utils.c b/Src/utils.c
index e91baf970..99b0eb743 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -2616,7 +2616,7 @@ findsep(char **s, char *sep, int quote)
 		    continue;
 		} else {
 		    ilen = MB_METACHARLENCONV(t+1, &c);
-		    if (MB_ZISTYPE(c, ISEP)) {
+		    if (WC_ZISTYPE(c, ISEP)) {
 			chuck(t);
 			/* then advance over new character, length ilen */
 		    } else {
@@ -2628,7 +2628,7 @@ findsep(char **s, char *sep, int quote)
 		}
 	    } else {
 		ilen = MB_METACHARLENCONV(t, &c);
-		if (MB_ZISTYPE(c, ISEP))
+		if (WC_ZISTYPE(c, ISEP))
 		    break;
 	    }
 	}
@@ -2683,7 +2683,7 @@ findword(char **s, char *sep)
     for (t = *s; *t; t += sl) {
 	convchar_t c;
 	sl = MB_METACHARLENCONV(t, &c);
-	if (!MB_ZISTYPE(c, ISEP))
+	if (!WC_ZISTYPE(c, ISEP))
 	    break;
     }
     *s = t;
@@ -4172,7 +4172,7 @@ bslashquote(const char *s, char **e, int instring)
 #ifdef MULTIBYTE_SUPPORT
 		cc != WEOF && 
 #endif
-		MB_ISPRINT(cc)) {
+		WC_ISPRINT(cc)) {
 		switch (cc) {
 		case ZWC('\\'):
 		case ZWC('\''):
diff --git a/Src/ztype.h b/Src/ztype.h
index 27402fba4..14f66101c 100644
--- a/Src/ztype.h
+++ b/Src/ztype.h
@@ -60,9 +60,9 @@
 #define inull(X) zistype(X,INULL)
 
 #ifdef MULTIBYTE_SUPPORT
-#define MB_ZISTYPE(X,Y) wcsitype((X),(Y))
-#define MB_ISPRINT(X)	iswprint(X)
+#define WC_ZISTYPE(X,Y) wcsitype((X),(Y))
+#define WC_ISPRINT(X)	iswprint(X)
 #else
-#define MB_ZISTYPE(X,Y)	zistype((X),(Y))
-#define MB_ISPRINT(X)	isprint(X)
+#define WC_ZISTYPE(X,Y)	zistype((X),(Y))
+#define WC_ISPRINT(X)	isprint(X)
 #endif