summaryrefslogtreecommitdiff
path: root/src/macros.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-06-30 21:56:01 +0000
committerBram Moolenaar <Bram@vim.org>2005-06-30 21:56:01 +0000
commite6b165e0f4f70d22a4fbcc5c9a1818417bdb1b04 (patch)
tree584373ca902692085457b72a232ad58956987f6e /src/macros.h
parent9c96f592af7a88e63ebf63f82d1b36b3954af401 (diff)
downloadvim-git-e6b165e0f4f70d22a4fbcc5c9a1818417bdb1b04.tar.gz
updated for version 7.0098
Diffstat (limited to 'src/macros.h')
-rw-r--r--src/macros.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/macros.h b/src/macros.h
index 07b02d707..0e258dfc2 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -214,10 +214,6 @@
#ifdef FEAT_CRYPT
-#ifndef __MINGW32__
-# define PWLEN 80
-#endif
-
/* encode byte c, using temp t. Warning: c must not have side effects. */
# define ZENCODE(c, t) (t = decrypt_byte(), update_keys(c), t^(c))
@@ -257,13 +253,13 @@
* MB_COPY_CHAR(f, t): copy one char from "f" to "t" and advance the pointers.
*/
#ifdef FEAT_MBYTE
-# define mb_ptr_adv(p) p += has_mbyte ? (*mb_ptr2len_check)(p) : 1
-# define mb_ptr_back(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
+# define mb_ptr_adv(p) p += has_mbyte ? (*mb_ptr2len_check)(p) : 1
+# define mb_ptr_back(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
# define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
-# define MB_CHARLEN(p) mb_charlen(p)
+# define MB_CHARLEN(p) (has_mbyte ? mb_charlen(p) : STRLEN(p))
#else
-# define mb_ptr_adv(p) ++p
-# define mb_ptr_back(s, p) --p
+# define mb_ptr_adv(p) ++p
+# define mb_ptr_back(s, p) --p
# define MB_COPY_CHAR(f, t) *t++ = *f++
-# define MB_CHARLEN(p) STRLEN(p)
+# define MB_CHARLEN(p) STRLEN(p)
#endif