diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-08-01 07:19:10 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-08-01 07:19:10 +0000 |
commit | 78984f503c0404ea36674a74076b091b27a9e528 (patch) | |
tree | 89fafa57f1dfefd4a483e20b8ffbb778ea50c498 /src/macros.h | |
parent | 53805d1eaa179509f39048516e344158eedfbbe4 (diff) | |
download | vim-git-78984f503c0404ea36674a74076b091b27a9e528.tar.gz |
updated for version 7.0121v7.0121
Diffstat (limited to 'src/macros.h')
-rw-r--r-- | src/macros.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/macros.h b/src/macros.h index 0e258dfc2..69c32ca80 100644 --- a/src/macros.h +++ b/src/macros.h @@ -251,15 +251,18 @@ * mb_ptr_back(): backup a pointer to the previous character, taking care of * multi-byte characters if needed. * MB_COPY_CHAR(f, t): copy one char from "f" to "t" and advance the pointers. + * PTR2CHAR(): get character from pointer. */ #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_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++ # define MB_CHARLEN(p) (has_mbyte ? mb_charlen(p) : STRLEN(p)) +# define PTR2CHAR(p) (has_mbyte ? mb_ptr2char(p) : *(p)) #else -# 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_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 PTR2CHAR(p) (*(p)) #endif |