diff options
author | ZyX <kp-pav@yandex.ru> | 2018-04-08 16:01:19 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2018-04-09 01:39:33 +0300 |
commit | 0d7daaad98d5874b345453073f6e21b024ee42d4 (patch) | |
tree | dd82055b961041f42a73decbdd60cf11c3c990eb /src/nvim/mbyte.c | |
parent | e67075667678a0df6f43d0600f947be91b0b1e2e (diff) | |
download | rneovim-0d7daaad98d5874b345453073f6e21b024ee42d4.tar.gz rneovim-0d7daaad98d5874b345453073f6e21b024ee42d4.tar.bz2 rneovim-0d7daaad98d5874b345453073f6e21b024ee42d4.zip |
charset,*: Refactor transstr()
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 008bce6df6..446063e33b 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -704,12 +704,14 @@ bool utf_composinglike(const char_u *p1, const char_u *p2) return arabic_combine(utf_ptr2char(p1), c2); } -/* - * Convert a UTF-8 byte string to a wide character. Also get up to MAX_MCO - * composing characters. - * - * @param [out] pcc: composing chars, last one is 0 - */ +/// Convert a UTF-8 string to a wide character +/// +/// Also gets up to #MAX_MCO composing characters. +/// +/// @param[out] pcc Location where to store composing characters. Must have +/// space at least for #MAX_MCO + 1 elements. +/// +/// @return leading character. int utfc_ptr2char(const char_u *p, int *pcc) { int len; |