Commit 8f982856 authored by Peter Stephenson's avatar Peter Stephenson

22765: rename some MB_ macros to WC_ for consistency.

parent 71fa876d
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,
......
......@@ -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++;
......
......@@ -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)
......
......@@ -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('\''):
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment