mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 17:24:50 +01:00
22765: rename some MB_ macros to WC_ for consistency.
This commit is contained in:
parent
71fa876def
commit
8f98285662
5 changed files with 18 additions and 12 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue