diff options
author | Andrey Borzenkov <bor@users.sourceforge.net> | 2005-02-26 07:40:54 +0000 |
---|---|---|
committer | Andrey Borzenkov <bor@users.sourceforge.net> | 2005-02-26 07:40:54 +0000 |
commit | ae6c23ae2c516ac7f65286ee48aedf15e0a4b176 (patch) | |
tree | 85e156d5618d97513d94d639f9f95acd80738d46 /Src | |
parent | f7ceca4fec16666c16be3f5a68feb9e4b9aeb667 (diff) | |
download | zsh-ae6c23ae2c516ac7f65286ee48aedf15e0a4b176.tar.gz zsh-ae6c23ae2c516ac7f65286ee48aedf15e0a4b176.tar.xz zsh-ae6c23ae2c516ac7f65286ee48aedf15e0a4b176.zip |
20872: fix ZS_{icntrl,tolower} vs. ZC_{incntrl,tolower} confusion
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_utils.c | 4 | ||||
-rw-r--r-- | Src/Zle/zle_vi.c | 11 | ||||
-rw-r--r-- | Src/Zle/zle_word.c | 8 |
3 files changed, 12 insertions, 11 deletions
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c index 59cd1be95..5d63a9ebc 100644 --- a/Src/Zle/zle_utils.c +++ b/Src/Zle/zle_utils.c @@ -578,10 +578,10 @@ getzlequery(int yesno) if (yesno) { if (c == ZWC('\t')) c = ZWC('y'); - else if (ZS_icntrl(c) || c == ZLEEOF) + else if (ZC_icntrl(c) || c == ZLEEOF) c = ZWC('n'); else - c = ZS_tolower(c); + c = ZC_tolower(c); } /* echo response and return */ if (c != ZWC('\n')) diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c index 66332e626..b0537d1ac 100644 --- a/Src/Zle/zle_vi.c +++ b/Src/Zle/zle_vi.c @@ -571,9 +571,9 @@ vioperswapcase(UNUSED(char **args)) /* swap the case of all letters within range */ while (zlecs < c2) { if (islower(zleline[zlecs])) - zleline[zlecs] = ZS_toupper(zleline[zlecs]); + zleline[zlecs] = ZC_toupper(zleline[zlecs]); else if (isupper(zleline[zlecs])) - zleline[zlecs] = ZS_tolower(zleline[zlecs]); + zleline[zlecs] = ZC_tolower(zleline[zlecs]); zlecs++; } /* go back to the first line of the range */ @@ -811,9 +811,9 @@ viswapcase(UNUSED(char **args)) eol = findeol(); while (zlecs < eol && n--) { if (islower(zleline[zlecs])) - zleline[zlecs] = ZS_toupper(zleline[zlecs]); + zleline[zlecs] = ZC_toupper(zleline[zlecs]); else if (isupper(zleline[zlecs])) - zleline[zlecs] = ZS_tolower(zleline[zlecs]); + zleline[zlecs] = ZC_tolower(zleline[zlecs]); zlecs++; } if (zlecs && zlecs == eol) @@ -858,7 +858,8 @@ visetbuffer(UNUSED(char **args)) zmod.flags |= MOD_VIAPP; else zmod.flags &= ~MOD_VIAPP; - zmod.vibuf = ZS_tolower(ch); + /* FIXME how portable is it for multibyte encoding? */ + zmod.vibuf = ZC_tolower(ch); if (ch >= ZWC('1') && ch <= ZWC('9')) zmod.vibuf += - (int)ZWC('1') + 26; else diff --git a/Src/Zle/zle_word.c b/Src/Zle/zle_word.c index 7f15cac13..bbdd8f451 100644 --- a/Src/Zle/zle_word.c +++ b/Src/Zle/zle_word.c @@ -359,7 +359,7 @@ upcaseword(UNUSED(char **args)) while (zlecs != zlell && !iword(zleline[zlecs])) zlecs++; while (zlecs != zlell && iword(zleline[zlecs])) { - zleline[zlecs] = ZS_toupper(zleline[zlecs]); + zleline[zlecs] = ZC_toupper(zleline[zlecs]); zlecs++; } } @@ -381,7 +381,7 @@ downcaseword(UNUSED(char **args)) while (zlecs != zlell && !iword(zleline[zlecs])) zlecs++; while (zlecs != zlell && iword(zleline[zlecs])) { - zleline[zlecs] = ZS_tolower(zleline[zlecs]); + zleline[zlecs] = ZC_tolower(zleline[zlecs]); zlecs++; } } @@ -406,8 +406,8 @@ capitalizeword(UNUSED(char **args)) while (zlecs != zlell && iword(zleline[zlecs]) && !isalpha(zleline[zlecs])) zlecs++; while (zlecs != zlell && iword(zleline[zlecs])) { - zleline[zlecs] = (first) ? ZS_toupper(zleline[zlecs]) : - ZS_tolower(zleline[zlecs]); + zleline[zlecs] = (first) ? ZC_toupper(zleline[zlecs]) : + ZC_tolower(zleline[zlecs]); first = 0; zlecs++; } |