0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.0038

This commit is contained in:
Bram Moolenaar
2005-01-14 21:42:54 +00:00
parent 31c67ef813
commit fd371684fa
10 changed files with 36 additions and 19 deletions

View File

@@ -263,11 +263,14 @@
* multi-byte characters if needed.
* 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.
*/
#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++
#else
# define mb_ptr_adv(p) ++p
# define mb_ptr_back(s, p) --p
# define MB_COPY_CHAR(f, t) *t++ = *f++
#endif